|
@@ -1,6 +1,7 @@
|
|
|
package com.rongwei.sfcommon.sys.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.rongwe.scentity.domian.ApsSpecialInspectionTaskDo;
|
|
|
import com.rongwe.scentity.domian.AspCheckDiscoveryItemDo;
|
|
|
import com.rongwe.scentity.domian.HiddenDangerTrackDo;
|
|
|
import com.rongwei.rwadmincommon.system.vo.SysUserVo;
|
|
@@ -38,28 +39,29 @@ public class SpecialInspectionServiceImpl implements SpecialInspectionService {
|
|
|
|
|
|
/**
|
|
|
* 专项检查生成隐患任务
|
|
|
+ *
|
|
|
* @param id
|
|
|
* @return
|
|
|
*/
|
|
|
@Override
|
|
|
public R createHiddenDangerTrack(String id) {
|
|
|
- log.info("开始根据专项检查任务:{}生成隐患任务",id);
|
|
|
+ log.info("开始根据专项检查任务:{}生成隐患任务", id);
|
|
|
ApsSpecialInspectionTaskDo specialInspectionTaskDo = apsSpecialInspectionTaskService.getById(id);
|
|
|
- JSCommonUtils.parameterCheck(()->specialInspectionTaskDo==null,"无法找到对应的专项检查任务",
|
|
|
- "根据id:{}无法找到对应的专项检查任务",id);
|
|
|
+ JSCommonUtils.parameterCheck(() -> specialInspectionTaskDo == null, "无法找到对应的专项检查任务",
|
|
|
+ "根据id:{}无法找到对应的专项检查任务", id);
|
|
|
// 获取改专项检查任务对应的隐患任务
|
|
|
List<AspCheckDiscoveryItemDo> checkDiscoveryItemDos = aspCheckDiscoveryItemService.list(new LambdaQueryWrapper<AspCheckDiscoveryItemDo>().eq(BaseDo::getDeleted, "0")
|
|
|
.eq(AspCheckDiscoveryItemDo::getThemecheckitemid, id));
|
|
|
- JSCommonUtils.parameterCheck(checkDiscoveryItemDos::isEmpty,"暂无隐患任务需要生成",
|
|
|
+ JSCommonUtils.parameterCheck(checkDiscoveryItemDos::isEmpty, "暂无隐患任务需要生成",
|
|
|
"");
|
|
|
|
|
|
- List<HiddenDangerTrackDo> saveList=new ArrayList<>();
|
|
|
+ List<HiddenDangerTrackDo> saveList = new ArrayList<>();
|
|
|
HiddenDangerTrackDo hiddenDangerTrackDo;
|
|
|
SysUserVo currentUser = JSCommonUtils.getCurrentUser();
|
|
|
for (AspCheckDiscoveryItemDo checkDiscoveryItemDo : checkDiscoveryItemDos) {
|
|
|
- hiddenDangerTrackDo =new HiddenDangerTrackDo();
|
|
|
+ hiddenDangerTrackDo = new HiddenDangerTrackDo();
|
|
|
hiddenDangerTrackDo.setId(SecurityUtil.getUUID());
|
|
|
- JSCommonUtils.setBaseDetail(hiddenDangerTrackDo,currentUser);
|
|
|
+ JSCommonUtils.setBaseDetail(hiddenDangerTrackDo, currentUser);
|
|
|
hiddenDangerTrackDo.setRiskanalysisobjectcode(checkDiscoveryItemDo.getRiskunitcode());
|
|
|
hiddenDangerTrackDo.setHazardlevel(checkDiscoveryItemDo.getGrade());
|
|
|
hiddenDangerTrackDo.setDangersource("10");
|
|
@@ -73,7 +75,7 @@ public class SpecialInspectionServiceImpl implements SpecialInspectionService {
|
|
|
hiddenDangerTrackDo.setTrackuserid(checkDiscoveryItemDo.getTrackuserid());
|
|
|
saveList.add(hiddenDangerTrackDo);
|
|
|
}
|
|
|
- JSCommonUtils.batchChunk(saveList,hiddenDangerTrackService::saveBatch,100);
|
|
|
+ JSCommonUtils.batchChunk(saveList, hiddenDangerTrackService::saveBatch, 100);
|
|
|
return R.ok();
|
|
|
}
|
|
|
}
|