cuijian
2023-08-19 bdd0875d4b13a3f1ef472f64d4b6a95e0ef64b22
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package org.jeecg.modules.eam.service.impl;
 
 
import org.jeecg.common.constant.CommonConstant;
import org.jeecg.modules.eam.entity.TransferMethod;
import org.jeecg.modules.eam.entity.TransferMethodCategory;
import org.jeecg.modules.eam.mapper.TransferMethodMapper;
import org.jeecg.modules.eam.service.ITransferMethodCategoryService;
import org.jeecg.modules.eam.service.ITransferMethodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 
import java.util.List;
 
/**
 * @Description: 调拨方式
 * @Author: houjie
 * @Date: 2023-03-06
 * @Version: V1.0
 */
@Service
public class TransferMethodServiceImpl extends ServiceImpl<TransferMethodMapper, TransferMethod> implements ITransferMethodService {
    @Autowired
    ITransferMethodCategoryService transferMethodCategoryService;
 
    @Override
    public List<TransferMethod> getListByType(String type) {
        List<TransferMethodCategory> transferMethodCategoryList = transferMethodCategoryService.listByType(type);
        TransferMethodCategory transferMethodCategory = transferMethodCategoryList.size() > 0 ? transferMethodCategoryList.get(0) : new TransferMethodCategory();
        String transferMethodCategoryId = transferMethodCategory.getId();
        List<TransferMethod> transferMethodList = super.lambdaQuery().eq(TransferMethod::getTransferMethodCategoryId, transferMethodCategoryId)
                .eq(TransferMethod::getDelFlag, CommonConstant.DEL_FLAG_0).list();
        return transferMethodList;
    }
}