郑永安
2023-06-19 7a6abd05683528032687c75e80e0bd2030a3e46c
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
package com.gkhy.safePlatform.specialWork.service.baseService.impl;
 
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gkhy.safePlatform.commons.enums.E;
import com.gkhy.safePlatform.commons.exception.AusinessException;
import com.gkhy.safePlatform.specialWork.entity.WorkMaterialCheckInfo;
import com.gkhy.safePlatform.specialWork.repository.WorkMaterialCheckRepository;
import com.gkhy.safePlatform.specialWork.service.baseService.WorkMaterialCheckService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.stereotype.Service;
import org.yaml.snakeyaml.events.Event;
 
import java.util.List;
 
@Service("WorkMaterialCheckService")
public class WorkMaterialCheckServiceImpl extends ServiceImpl<WorkMaterialCheckRepository,WorkMaterialCheckInfo> implements WorkMaterialCheckService {
 
    @Override
    public void saveMaterialCheckBatch(List<WorkMaterialCheckInfo> entities) {
        if (CollectionUtils.isEmpty(entities)) {
            throw new AusinessException(E.DATA_PARAM_NULL,"参数不可为空!");
        }
        baseMapper.saveMaterialCheckBatch(entities);
    }
 
    @Override
    public List<WorkMaterialCheckInfo> getListByWpcIds(List<Long> idList) {
        if(CollectionUtils.isEmpty(idList)){
            throw new AusinessException(E.DATA_PARAM_NULL,"作业管理ids不可为空!");
        }
        return baseMapper.getListByWpcIds(idList);
    }
}