diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/DangerousEngineeringRecordController.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/DangerousEngineeringRecordController.java index 4a96af8cb..97c552e09 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/DangerousEngineeringRecordController.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/controller/DangerousEngineeringRecordController.java @@ -225,18 +225,8 @@ public class DangerousEngineeringRecordController { @ApiImplicitParam(name = "id", value = "现场危大工程ID", paramType = "body", required = true, dataType = "Integer") @PostMapping(value = "/delete") public Result delete(@RequestBody Map map) { - Result result = new Result(); - DangerousEngineeringRecord dangerousEngineeringRecord = dangerousEngineeringRecordService.getById(MapUtils.getString(map, "id")); - if (dangerousEngineeringRecord == null) { - result.error500(MessageUtil.get("notFindErr")); - } else { - boolean ok = dangerousEngineeringRecordService.removeById(MapUtils.getString(map, "id")); - if (ok) { - result.successMsg(MessageUtil.get("deleteSucess")); - } - } - - return result; + dangerousEngineeringRecordService.delete(map); + return Result.ok(); } /** diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/service/IDangerousEngineeringRecordService.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/service/IDangerousEngineeringRecordService.java index 234bd223e..77a41cdaf 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/service/IDangerousEngineeringRecordService.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/service/IDangerousEngineeringRecordService.java @@ -66,4 +66,10 @@ public interface IDangerousEngineeringRecordService extends IService map); } diff --git a/src/main/java/com/zhgd/xmgl/modules/dangerous/service/impl/DangerousEngineeringRecordServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/dangerous/service/impl/DangerousEngineeringRecordServiceImpl.java index 7c04a0b6c..69def3744 100644 --- a/src/main/java/com/zhgd/xmgl/modules/dangerous/service/impl/DangerousEngineeringRecordServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/dangerous/service/impl/DangerousEngineeringRecordServiceImpl.java @@ -25,13 +25,16 @@ import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringRecordServic import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; import com.zhgd.xmgl.modules.dangerous.service.IHiddenDangerInspectRecordService; import com.zhgd.xmgl.modules.worker.mapper.EnterpriseInfoMapper; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.entity.vo.GetStatScoreVo; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.util.MapBuilder; import com.zhgd.xmgl.util.MessageUtil; import org.apache.commons.collections.MapUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -53,6 +56,12 @@ public class DangerousEngineeringRecordServiceImpl extends ServiceImpl map) { + String id = MapUtils.getString(map, "id"); + DangerousEngineeringRecord dangerousEngineeringRecord = getById(id); + if (dangerousEngineeringRecord == null) { + throw new OpenAlertException(MessageUtil.get("notFindErr")); + } + removeById(id); + + int val = 1; + dangerousEngineeringProgressRecordService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); + xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() + .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) + .eq(XzSecurityQualityInspectionRecord::getType, val) + ); + } } diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzBlindPlatePlugSafeServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzBlindPlatePlugSafeServiceImpl.java index 9686eb99a..815a024ff 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzBlindPlatePlugSafeServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzBlindPlatePlugSafeServiceImpl.java @@ -9,11 +9,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.enums.ParamEnum; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation; +import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; +import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringProgressRecordServiceImpl; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.modules.xz.special.entity.XzBlindPlatePlugSafe; -import com.zhgd.xmgl.modules.xz.special.entity.vo.CountSpecialByFinalStatusVo; import com.zhgd.xmgl.modules.xz.special.entity.vo.CountSpecialVo; import com.zhgd.xmgl.modules.xz.special.mapper.XzBlindPlatePlugSafeMapper; import com.zhgd.xmgl.modules.xz.special.mapper.XzGasAnalyzeMapper; @@ -47,6 +52,15 @@ public class XzBlindPlatePlugSafeServiceImpl extends ServiceImpl() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) - .eq(XzSecurityQualityInspectionRecord::getType, 4) + .eq(XzSecurityQualityInspectionRecord::getType, val) ); } diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzGroundSafetServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzGroundSafetServiceImpl.java index 863e1fc18..a2ef245bb 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzGroundSafetServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzGroundSafetServiceImpl.java @@ -9,9 +9,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.enums.ParamEnum; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation; +import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; +import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringProgressRecordServiceImpl; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.modules.xz.special.entity.XzGroundSafet; import com.zhgd.xmgl.modules.xz.special.mapper.XzGasAnalyzeMapper; import com.zhgd.xmgl.modules.xz.special.mapper.XzGroundSafetMapper; @@ -41,6 +47,15 @@ import java.util.Objects; public class XzGroundSafetServiceImpl extends ServiceImpl implements IXzGroundSafetService { @Autowired IUserEnterpriseService userEnterpriseService; + @Lazy + @Autowired + DangerousEngineeringProgressRecordServiceImpl dangerousEngineeringProgressRecordService; + @Lazy + @Autowired + IXzDangerousEngineeringAcceptanceService xzDangerousEngineeringAcceptanceService; + @Lazy + @Autowired + IDangerousEngineeringSideStationService dangerousEngineeringSideStationService; @Autowired private XzGroundSafetMapper xzSpecialOperationFireSafetyMapper; @Autowired @@ -48,6 +63,7 @@ public class XzGroundSafetServiceImpl extends ServiceImpl queryPageList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); @@ -102,11 +118,23 @@ public class XzGroundSafetServiceImpl extends ServiceImpl() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) - .eq(XzSecurityQualityInspectionRecord::getType, 8) + .eq(XzSecurityQualityInspectionRecord::getType, val) ); - } @Override diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzHighJobSafeServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzHighJobSafeServiceImpl.java index 9ebb6f199..55f967a5f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzHighJobSafeServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzHighJobSafeServiceImpl.java @@ -9,9 +9,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.enums.ParamEnum; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation; +import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; +import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringProgressRecordServiceImpl; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.modules.xz.special.entity.XzHighJobSafe; import com.zhgd.xmgl.modules.xz.special.mapper.XzGasAnalyzeMapper; import com.zhgd.xmgl.modules.xz.special.mapper.XzHighJobSafeMapper; @@ -41,6 +47,15 @@ import java.util.Objects; public class XzHighJobSafeServiceImpl extends ServiceImpl implements IXzHighJobSafeService { @Autowired IUserEnterpriseService userEnterpriseService; + @Lazy + @Autowired + DangerousEngineeringProgressRecordServiceImpl dangerousEngineeringProgressRecordService; + @Lazy + @Autowired + IXzDangerousEngineeringAcceptanceService xzDangerousEngineeringAcceptanceService; + @Lazy + @Autowired + IDangerousEngineeringSideStationService dangerousEngineeringSideStationService; @Autowired private XzHighJobSafeMapper xzSpecialOperationFireSafetyMapper; @Autowired @@ -48,6 +63,7 @@ public class XzHighJobSafeServiceImpl extends ServiceImpl queryPageList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); @@ -102,9 +118,23 @@ public class XzHighJobSafeServiceImpl extends ServiceImpl() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) - .eq(XzSecurityQualityInspectionRecord::getType, 5) + .eq(XzSecurityQualityInspectionRecord::getType, val) ); } diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzHoistSafetyWorkServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzHoistSafetyWorkServiceImpl.java index 166af912d..d58e7247c 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzHoistSafetyWorkServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzHoistSafetyWorkServiceImpl.java @@ -9,9 +9,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.enums.ParamEnum; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation; +import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; +import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringProgressRecordServiceImpl; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.modules.xz.special.entity.XzHoistSafetyWork; import com.zhgd.xmgl.modules.xz.special.mapper.XzGasAnalyzeMapper; import com.zhgd.xmgl.modules.xz.special.mapper.XzHoistSafetyWorkMapper; @@ -41,6 +47,15 @@ import java.util.Objects; public class XzHoistSafetyWorkServiceImpl extends ServiceImpl implements IXzHoistSafetyWorkService { @Autowired IUserEnterpriseService userEnterpriseService; + @Lazy + @Autowired + DangerousEngineeringProgressRecordServiceImpl dangerousEngineeringProgressRecordService; + @Lazy + @Autowired + IXzDangerousEngineeringAcceptanceService xzDangerousEngineeringAcceptanceService; + @Lazy + @Autowired + IDangerousEngineeringSideStationService dangerousEngineeringSideStationService; @Autowired private XzHoistSafetyWorkMapper xzSpecialOperationFireSafetyMapper; @Autowired @@ -48,6 +63,7 @@ public class XzHoistSafetyWorkServiceImpl extends ServiceImpl queryPageList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); @@ -102,11 +118,23 @@ public class XzHoistSafetyWorkServiceImpl extends ServiceImpl() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) - .eq(XzSecurityQualityInspectionRecord::getType, 6) + .eq(XzSecurityQualityInspectionRecord::getType, val) ); - } @Override diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzLimitSpaceSafeServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzLimitSpaceSafeServiceImpl.java index abfe315ef..64d7ce432 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzLimitSpaceSafeServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzLimitSpaceSafeServiceImpl.java @@ -9,9 +9,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.enums.ParamEnum; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation; +import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; +import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringProgressRecordServiceImpl; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.modules.xz.special.entity.XzLimitSpaceSafe; import com.zhgd.xmgl.modules.xz.special.mapper.XzGasAnalyzeMapper; import com.zhgd.xmgl.modules.xz.special.mapper.XzLimitSpaceSafeMapper; @@ -41,6 +47,15 @@ import java.util.Objects; public class XzLimitSpaceSafeServiceImpl extends ServiceImpl implements IXzLimitSpaceSafeService { @Autowired IUserEnterpriseService userEnterpriseService; + @Lazy + @Autowired + DangerousEngineeringProgressRecordServiceImpl dangerousEngineeringProgressRecordService; + @Lazy + @Autowired + IXzDangerousEngineeringAcceptanceService xzDangerousEngineeringAcceptanceService; + @Lazy + @Autowired + IDangerousEngineeringSideStationService dangerousEngineeringSideStationService; @Autowired private XzLimitSpaceSafeMapper xzSpecialOperationFireSafetyMapper; @Autowired @@ -48,6 +63,7 @@ public class XzLimitSpaceSafeServiceImpl extends ServiceImpl queryPageList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); @@ -101,11 +117,23 @@ public class XzLimitSpaceSafeServiceImpl extends ServiceImpl() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) - .eq(XzSecurityQualityInspectionRecord::getType, 3) + .eq(XzSecurityQualityInspectionRecord::getType, val) ); - } @Override diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzOpenCircuitSafeServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzOpenCircuitSafeServiceImpl.java index 3e9c1f718..eb6372aeb 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzOpenCircuitSafeServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzOpenCircuitSafeServiceImpl.java @@ -9,9 +9,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.enums.ParamEnum; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation; +import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; +import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringProgressRecordServiceImpl; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.modules.xz.special.entity.XzOpenCircuitSafe; import com.zhgd.xmgl.modules.xz.special.mapper.XzGasAnalyzeMapper; import com.zhgd.xmgl.modules.xz.special.mapper.XzOpenCircuitSafeMapper; @@ -41,6 +47,15 @@ import java.util.Objects; public class XzOpenCircuitSafeServiceImpl extends ServiceImpl implements IXzOpenCircuitSafeService { @Autowired IUserEnterpriseService userEnterpriseService; + @Lazy + @Autowired + DangerousEngineeringProgressRecordServiceImpl dangerousEngineeringProgressRecordService; + @Lazy + @Autowired + IXzDangerousEngineeringAcceptanceService xzDangerousEngineeringAcceptanceService; + @Lazy + @Autowired + IDangerousEngineeringSideStationService dangerousEngineeringSideStationService; @Autowired private XzOpenCircuitSafeMapper xzSpecialOperationFireSafetyMapper; @Autowired @@ -48,6 +63,7 @@ public class XzOpenCircuitSafeServiceImpl extends ServiceImpl queryPageList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); @@ -102,11 +118,23 @@ public class XzOpenCircuitSafeServiceImpl extends ServiceImpl() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) - .eq(XzSecurityQualityInspectionRecord::getType, 9) + .eq(XzSecurityQualityInspectionRecord::getType, val) ); - } @Override diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzSpecialOperationFireSafetyServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzSpecialOperationFireSafetyServiceImpl.java index 9f5178940..a4c57174a 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzSpecialOperationFireSafetyServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzSpecialOperationFireSafetyServiceImpl.java @@ -9,9 +9,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.enums.ParamEnum; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation; +import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; +import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringProgressRecordServiceImpl; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.modules.xz.special.entity.XzGasAnalyze; import com.zhgd.xmgl.modules.xz.special.entity.XzSpecialOperationFireSafety; import com.zhgd.xmgl.modules.xz.special.mapper.XzSpecialOperationFireSafetyMapper; @@ -42,6 +48,15 @@ import java.util.Objects; public class XzSpecialOperationFireSafetyServiceImpl extends ServiceImpl implements IXzSpecialOperationFireSafetyService { @Autowired IUserEnterpriseService userEnterpriseService; + @Lazy + @Autowired + DangerousEngineeringProgressRecordServiceImpl dangerousEngineeringProgressRecordService; + @Lazy + @Autowired + IXzDangerousEngineeringAcceptanceService xzDangerousEngineeringAcceptanceService; + @Lazy + @Autowired + IDangerousEngineeringSideStationService dangerousEngineeringSideStationService; @Autowired private XzSpecialOperationFireSafetyMapper xzSpecialOperationFireSafetyMapper; @Autowired @@ -49,6 +64,7 @@ public class XzSpecialOperationFireSafetyServiceImpl extends ServiceImpl queryPageList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); @@ -108,11 +124,23 @@ public class XzSpecialOperationFireSafetyServiceImpl extends ServiceImpl() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) - .eq(XzSecurityQualityInspectionRecord::getType, 2) + .eq(XzSecurityQualityInspectionRecord::getType, val) ); - } @Override diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzTemporaryElectricitySafeServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzTemporaryElectricitySafeServiceImpl.java index a7a5666a4..fef4b75df 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzTemporaryElectricitySafeServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/special/service/impl/XzTemporaryElectricitySafeServiceImpl.java @@ -9,9 +9,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.zhgd.jeecg.common.execption.OpenAlertException; import com.zhgd.jeecg.common.system.query.QueryGenerator; import com.zhgd.xmgl.enums.ParamEnum; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord; +import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation; +import com.zhgd.xmgl.modules.dangerous.service.IDangerousEngineeringSideStationService; +import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringProgressRecordServiceImpl; import com.zhgd.xmgl.modules.worker.service.IUserEnterpriseService; +import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance; import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord; import com.zhgd.xmgl.modules.xz.security.service.IXzSecurityQualityInspectionRecordService; +import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService; import com.zhgd.xmgl.modules.xz.special.entity.XzTemporaryElectricitySafe; import com.zhgd.xmgl.modules.xz.special.mapper.XzGasAnalyzeMapper; import com.zhgd.xmgl.modules.xz.special.mapper.XzTemporaryElectricitySafeMapper; @@ -41,6 +47,15 @@ import java.util.Objects; public class XzTemporaryElectricitySafeServiceImpl extends ServiceImpl implements IXzTemporaryElectricitySafeService { @Autowired IUserEnterpriseService userEnterpriseService; + @Lazy + @Autowired + DangerousEngineeringProgressRecordServiceImpl dangerousEngineeringProgressRecordService; + @Lazy + @Autowired + IXzDangerousEngineeringAcceptanceService xzDangerousEngineeringAcceptanceService; + @Lazy + @Autowired + IDangerousEngineeringSideStationService dangerousEngineeringSideStationService; @Autowired private XzTemporaryElectricitySafeMapper xzSpecialOperationFireSafetyMapper; @Autowired @@ -48,6 +63,7 @@ public class XzTemporaryElectricitySafeServiceImpl extends ServiceImpl queryPageList(HashMap paramMap) { QueryWrapper queryWrapper = getQueryWrapper(paramMap); @@ -102,11 +118,23 @@ public class XzTemporaryElectricitySafeServiceImpl extends ServiceImpl() + .eq(DangerousEngineeringProgressRecord::getEngineeringId, id) + .eq(DangerousEngineeringProgressRecord::getType, val) + ); + dangerousEngineeringSideStationService.remove(new LambdaQueryWrapper() + .eq(DangerousEngineeringSideStation::getDangerousEngineeringId, id) + .eq(DangerousEngineeringSideStation::getType, val) + ); + xzDangerousEngineeringAcceptanceService.remove(new LambdaQueryWrapper() + .eq(XzDangerousEngineeringAcceptance::getEngineeringId, id) + .eq(XzDangerousEngineeringAcceptance::getType, val) + ); xzSecurityQualityInspectionRecordService.remove(new LambdaQueryWrapper() .eq(XzSecurityQualityInspectionRecord::getEngineeringId, id) - .eq(XzSecurityQualityInspectionRecord::getType, 7) + .eq(XzSecurityQualityInspectionRecord::getType, val) ); - } @Override