选煤厂生产管理平台后台代码
dongyukun
2024-12-10 3f07ab2e03e501ae55d1d1b0d031daf50c8e13e5
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
38
39
40
41
42
43
44
45
46
47
48
49
50
package com.iailab.module.pms.coalquality.modules.analysis.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.iailab.framework.common.service.impl.BaseServiceImpl;
import com.iailab.framework.common.util.object.ConvertUtils;
import com.iailab.framework.tenant.core.aop.TenantIgnore;
import com.iailab.module.pms.coalquality.modules.analysis.dao.CoalAnalysisFullDetDao;
import com.iailab.module.pms.coalquality.modules.analysis.dao.ExcelImportDao;
import com.iailab.module.pms.coalquality.modules.analysis.dto.CoalAnalysisFullDetDTO;
import com.iailab.module.pms.coalquality.modules.analysis.entity.CoalAnalysisFullDetEntity;
import com.iailab.module.pms.coalquality.modules.analysis.service.CoalAnalysisFullDetService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
 
/**
 * 全级浮沉实验数据
 *
 * @author PanZhibao
 * @Description
 * @createTime 2023年01月12日 17:09:00
 */
@Service
public class CoalAnalysisFullDetServiceImpl extends BaseServiceImpl<CoalAnalysisFullDetDao, CoalAnalysisFullDetEntity>
        implements CoalAnalysisFullDetService {
 
    @Resource
    private ExcelImportDao excelImportDao;
 
    @Override
    @TenantIgnore
    public List<CoalAnalysisFullDetDTO> queryList(Map<String, Object> params) {
        List<CoalAnalysisFullDetEntity> list = baseDao.selectList(getWrapper(params));
 
        return ConvertUtils.sourceToTarget(list, CoalAnalysisFullDetDTO.class);
    }
 
    private QueryWrapper<CoalAnalysisFullDetEntity> getWrapper(Map<String, Object> params){
        String fullId = (String)params.get("fullId");
 
        QueryWrapper<CoalAnalysisFullDetEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(fullId), "full_id", fullId).orderByAsc("code");
 
        return wrapper;
    }
 
}