动火安全修改
This commit is contained in:
parent
9f4acc7287
commit
e4d557d63a
@ -31,4 +31,6 @@ public interface IDangerousEngineeringRecordService extends IService<DangerousEn
|
||||
void endEngineer(Map<String, Object> paramMap);
|
||||
|
||||
BigDecimal getScore(String projectSn, Date time);
|
||||
|
||||
void finish(Long engineeringId);
|
||||
}
|
||||
|
||||
@ -28,11 +28,13 @@ public class DangerousEngineeringProgressRecordServiceImpl extends ServiceImpl<D
|
||||
|
||||
@Override
|
||||
public List<DangerousEngineeringProgressRecord> selectEngineeringProgressList(Map<String, Object> map) {
|
||||
map.putIfAbsent("type", 1);
|
||||
return dangerousEngineeringProgressRecordMapper.selectEngineeringProgressList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<DangerousEngineeringProgressRecord> selectEngineeringProgressPage(Map<String, Object> map) {
|
||||
map.putIfAbsent("type", 1);
|
||||
Page page = PageUtil.getPage(map);
|
||||
return dangerousEngineeringProgressRecordMapper.selectEngineeringProgressList(map, page);
|
||||
}
|
||||
|
||||
@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -255,4 +256,12 @@ public class DangerousEngineeringRecordServiceImpl extends ServiceImpl<Dangerous
|
||||
}
|
||||
return new BigDecimal(15);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish(Long engineeringId) {
|
||||
dangerousEngineeringRecordMapper.update(null, new LambdaUpdateWrapper<DangerousEngineeringRecord>()
|
||||
.eq(DangerousEngineeringRecord::getId, engineeringId)
|
||||
.set(DangerousEngineeringRecord::getFinalAcceptanceStatus, 2)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,11 +29,13 @@ public class DangerousEngineeringSideStationServiceImpl extends ServiceImpl<Dang
|
||||
|
||||
@Override
|
||||
public List<DangerousEngineeringSideStation> selectSideStationList(Map<String, Object> map) {
|
||||
map.putIfAbsent("type", 1);
|
||||
return dangerousEngineeringSideStationMapper.selectSideStationList(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<DangerousEngineeringSideStation> selectSideStationPage(Map<String, Object> map) {
|
||||
map.putIfAbsent("type", 1);
|
||||
Page page = PageUtil.getPage(map);
|
||||
return dangerousEngineeringSideStationMapper.selectSideStationList(map, page);
|
||||
}
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityInspectionRecordMapper">
|
||||
<sql id="whereCondition">
|
||||
<if test="param.type != null and param.type != ''">
|
||||
and t.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.inspectTime_begin != null and param.inspectTime_begin != ''">
|
||||
and t.inspect_time <![CDATA[>=]]> #{param.inspectTime_begin}
|
||||
</if>
|
||||
@ -261,6 +264,9 @@
|
||||
LEFT join subdivision_project subentry on subentry.id = t.subentry_id
|
||||
LEFT join dangerous_engineering_record der on der.id = t.engineering_id
|
||||
WHERE t.project_sn = #{param.projectSn}
|
||||
<if test="param.type != null and param.type != ''">
|
||||
and t.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.enterpriseId != null and param.enterpriseId != ''">
|
||||
and t.enterprise_id = #{param.enterpriseId}
|
||||
</if>
|
||||
|
||||
@ -171,6 +171,7 @@ public class XzSecurityXzSecurityQualityInspectionRecordServiceImpl extends Serv
|
||||
}
|
||||
}
|
||||
Page<XzSecurityQualityInspectionRecordVo> page = new Page<>(pageNo, pageSize);
|
||||
map.putIfAbsent("type", 1);
|
||||
List<XzSecurityQualityInspectionRecordVo> list = xzSecurityQualityInspectionRecordMapper.selectQualityInspectionRecordPage(page, map);
|
||||
for (XzSecurityQualityInspectionRecordVo vo : list) {
|
||||
setProblemDescription(vo);
|
||||
|
||||
@ -3,7 +3,6 @@ package com.zhgd.xmgl.modules.xz.service.impl;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@ -13,17 +12,17 @@ import com.zhgd.xmgl.modules.basicdata.entity.SystemUser;
|
||||
import com.zhgd.xmgl.modules.basicdata.service.impl.SystemUserServiceImpl;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringControlItem;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringProgressRecord;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringRecord;
|
||||
import com.zhgd.xmgl.modules.dangerous.entity.DangerousEngineeringSideStation;
|
||||
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringProgressRecordMapper;
|
||||
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringRecordMapper;
|
||||
import com.zhgd.xmgl.modules.dangerous.mapper.DangerousEngineeringSideStationMapper;
|
||||
import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringControlItemServiceImpl;
|
||||
import com.zhgd.xmgl.modules.dangerous.service.impl.DangerousEngineeringRecordServiceImpl;
|
||||
import com.zhgd.xmgl.modules.xz.entity.XzDangerousEngineeringAcceptance;
|
||||
import com.zhgd.xmgl.modules.xz.mapper.XzDangerousEngineeringAcceptanceMapper;
|
||||
import com.zhgd.xmgl.modules.xz.security.entity.XzSecurityQualityInspectionRecord;
|
||||
import com.zhgd.xmgl.modules.xz.security.mapper.XzSecurityQualityInspectionRecordMapper;
|
||||
import com.zhgd.xmgl.modules.xz.service.IXzDangerousEngineeringAcceptanceService;
|
||||
import com.zhgd.xmgl.modules.xz.special.service.impl.XzSpecialOperationFireSafetyServiceImpl;
|
||||
import com.zhgd.xmgl.security.util.SecurityUtils;
|
||||
import com.zhgd.xmgl.util.PageUtil;
|
||||
import com.zhgd.xmgl.util.RefUtil;
|
||||
@ -54,11 +53,11 @@ public class XzDangerousEngineeringAcceptanceServiceImpl extends ServiceImpl<XzD
|
||||
@Autowired
|
||||
DangerousEngineeringProgressRecordMapper dangerousEngineeringProgressRecordMapper;
|
||||
@Autowired
|
||||
DangerousEngineeringRecordMapper dangerousEngineeringRecordMapper;
|
||||
@Autowired
|
||||
private XzDangerousEngineeringAcceptanceMapper xzDangerousEngineeringAcceptanceMapper;
|
||||
DangerousEngineeringRecordServiceImpl dangerousEngineeringRecordService;
|
||||
@Autowired
|
||||
private SystemUserServiceImpl systemUserService;
|
||||
@Autowired
|
||||
private XzSpecialOperationFireSafetyServiceImpl xzSpecialOperationFireSafetyService;
|
||||
|
||||
@Override
|
||||
public IPage<XzDangerousEngineeringAcceptance> queryPageList(HashMap<String, Object> paramMap) {
|
||||
@ -76,6 +75,7 @@ public class XzDangerousEngineeringAcceptanceServiceImpl extends ServiceImpl<XzD
|
||||
}
|
||||
|
||||
private QueryWrapper<XzDangerousEngineeringAcceptance> getQueryWrapper(HashMap<String, Object> paramMap) {
|
||||
paramMap.putIfAbsent("type", 1);
|
||||
String alias = "xdea.";
|
||||
QueryWrapper<XzDangerousEngineeringAcceptance> queryWrapper = QueryGenerator.initPageQueryWrapper(XzDangerousEngineeringAcceptance.class, paramMap, alias);
|
||||
queryWrapper.orderByDesc(alias + RefUtil.fieldNameUlc(XzDangerousEngineeringAcceptance::getCreateTime));
|
||||
@ -88,7 +88,7 @@ public class XzDangerousEngineeringAcceptanceServiceImpl extends ServiceImpl<XzD
|
||||
|
||||
@Override
|
||||
public void add(XzDangerousEngineeringAcceptance xzDangerousEngineeringAcceptance) {
|
||||
checkCondition(xzDangerousEngineeringAcceptance);
|
||||
valid(xzDangerousEngineeringAcceptance);
|
||||
xzDangerousEngineeringAcceptance.setId(null);
|
||||
Long userId = SecurityUtils.getUser().getUserId();
|
||||
xzDangerousEngineeringAcceptance.setApplyAcceptanceUserId(userId);
|
||||
@ -102,7 +102,8 @@ public class XzDangerousEngineeringAcceptanceServiceImpl extends ServiceImpl<XzD
|
||||
baseMapper.insert(xzDangerousEngineeringAcceptance);
|
||||
}
|
||||
|
||||
private void checkCondition(XzDangerousEngineeringAcceptance xzDangerousEngineeringAcceptance) {
|
||||
private void valid(XzDangerousEngineeringAcceptance xzDangerousEngineeringAcceptance) {
|
||||
Integer type = xzDangerousEngineeringAcceptance.getType();
|
||||
Long engineeringId = xzDangerousEngineeringAcceptance.getEngineeringId();
|
||||
List<DangerousEngineeringProgressRecord> dangerousEngineeringProgressRecords = dangerousEngineeringProgressRecordMapper.selectList(new LambdaQueryWrapper<DangerousEngineeringProgressRecord>()
|
||||
.eq(DangerousEngineeringProgressRecord::getEngineeringId, engineeringId)
|
||||
@ -119,6 +120,7 @@ public class XzDangerousEngineeringAcceptanceServiceImpl extends ServiceImpl<XzD
|
||||
if (CollUtil.isEmpty(xzSecurityQualityInspectionRecords)) {
|
||||
throw new OpenAlertException("当前安全检查记录为空,无法添加验收");
|
||||
}
|
||||
|
||||
List<XzSecurityQualityInspectionRecord> notCloseList = xzSecurityQualityInspectionRecords.stream().filter(xzSecurityQualityInspectionRecord ->
|
||||
xzSecurityQualityInspectionRecord.getStatus() != 5 && xzSecurityQualityInspectionRecord.getStatus() != 6 && xzSecurityQualityInspectionRecord.getType() == 1).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(notCloseList)) {
|
||||
@ -131,28 +133,32 @@ public class XzDangerousEngineeringAcceptanceServiceImpl extends ServiceImpl<XzD
|
||||
if (CollUtil.isEmpty(dangerousEngineeringSideStations)) {
|
||||
throw new OpenAlertException("施工旁站为空,无法添加验收");
|
||||
}
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("engineeringId", engineeringId);
|
||||
List<DangerousEngineeringControlItem> dangerousEngineeringControlItems = dangerousEngineeringControlItemService.selectEngineeringControlItemList(map);
|
||||
List<DangerousEngineeringControlItem> notCollectList = dangerousEngineeringControlItems.stream().filter(dangerousEngineeringControlItem -> dangerousEngineeringControlItem.getChooseType() == null || Objects.equals(dangerousEngineeringControlItem.getChooseType(), 2)).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(notCollectList)) {
|
||||
throw new OpenAlertException("有管控要点未正确,无法添加验收");
|
||||
|
||||
if (type == 1) {
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("engineeringId", engineeringId);
|
||||
List<DangerousEngineeringControlItem> dangerousEngineeringControlItems = dangerousEngineeringControlItemService.selectEngineeringControlItemList(map);
|
||||
List<DangerousEngineeringControlItem> notCollectList = dangerousEngineeringControlItems.stream().filter(dangerousEngineeringControlItem -> dangerousEngineeringControlItem.getChooseType() == null || Objects.equals(dangerousEngineeringControlItem.getChooseType(), 2)).collect(Collectors.toList());
|
||||
if (CollUtil.isNotEmpty(notCollectList)) {
|
||||
throw new OpenAlertException("有管控要点未正确,无法添加验收");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void edit(XzDangerousEngineeringAcceptance acceptance) {
|
||||
XzDangerousEngineeringAcceptance oldXzDangerousEngineeringAcceptance = baseMapper.selectById(acceptance.getId());
|
||||
if (oldXzDangerousEngineeringAcceptance == null) {
|
||||
XzDangerousEngineeringAcceptance old = baseMapper.selectById(acceptance.getId());
|
||||
if (old == null) {
|
||||
throw new OpenAlertException("未找到对应实体");
|
||||
}
|
||||
baseMapper.updateById(acceptance);
|
||||
|
||||
Long engineeringId = old.getEngineeringId();
|
||||
if (Objects.equals(acceptance.getAcceptanceResult(), 1) && Objects.equals(acceptance.getType(), 1)) {
|
||||
dangerousEngineeringRecordMapper.update(null, new LambdaUpdateWrapper<DangerousEngineeringRecord>()
|
||||
.eq(DangerousEngineeringRecord::getId, oldXzDangerousEngineeringAcceptance.getEngineeringId())
|
||||
.set(DangerousEngineeringRecord::getFinalAcceptanceStatus, 2)
|
||||
);
|
||||
dangerousEngineeringRecordService.finish(engineeringId);
|
||||
} else if (Objects.equals(acceptance.getAcceptanceResult(), 1) && Objects.equals(acceptance.getType(), 2)) {
|
||||
xzSpecialOperationFireSafetyService.finish(engineeringId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -26,4 +26,6 @@ public interface IXzSpecialOperationFireSafetyService extends IService<XzSpecial
|
||||
void delete(String id);
|
||||
|
||||
XzSpecialOperationFireSafety queryById(String id);
|
||||
|
||||
void finish(Long engineeringId);
|
||||
}
|
||||
|
||||
@ -3,11 +3,13 @@ package com.zhgd.xmgl.modules.xz.special.service.impl;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.modules.dangerous.entity.DangerousEngineeringRecord;
|
||||
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.XzGasAnalyzeMapper;
|
||||
@ -104,4 +106,12 @@ public class XzSpecialOperationFireSafetyServiceImpl extends ServiceImpl<XzSpeci
|
||||
return safety;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finish(Long engineeringId) {
|
||||
baseMapper.update(null, new LambdaUpdateWrapper<XzSpecialOperationFireSafety>()
|
||||
.eq(XzSpecialOperationFireSafety::getId, engineeringId)
|
||||
.set(XzSpecialOperationFireSafety::getFinalAcceptanceStatus, 2)
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user