12-10-修改事故
This commit is contained in:
@ -242,4 +242,9 @@ public class HseSafetySgdcVo implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String fcjg;
|
private String fcjg;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 事故状态
|
||||||
|
*/
|
||||||
|
private String sgzt;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
package org.dromara.safety.accident.mapper;
|
package org.dromara.safety.accident.mapper;
|
||||||
|
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
import org.apache.ibatis.annotations.Update;
|
||||||
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
|
||||||
import org.dromara.safety.accident.domain.HseSafetySgdc;
|
import org.dromara.safety.accident.domain.HseSafetySgdc;
|
||||||
import org.dromara.safety.accident.domain.HseSafetySgsb;
|
import org.dromara.safety.accident.domain.HseSafetySgsb;
|
||||||
@ -24,4 +25,7 @@ public interface HseSafetySgdcMapper extends BaseMapperPlus<HseSafetySgdc, HseSa
|
|||||||
|
|
||||||
@Select("select * from hse_safety_sgsb where project_id = #{projectId}")
|
@Select("select * from hse_safety_sgsb where project_id = #{projectId}")
|
||||||
List<HseSafetySgsb> getSgsbListByProjectId(Long projectId);
|
List<HseSafetySgsb> getSgsbListByProjectId(Long projectId);
|
||||||
|
|
||||||
|
@Update("update hse_safety_sgsb set sgzt = #{state} where id = #{id}")
|
||||||
|
boolean updateSgzt(Long id, String state);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,6 +179,12 @@ public class HseSafetySgdcServiceImpl extends ServiceImpl<HseSafetySgdcMapper, H
|
|||||||
//如果报错装填审核通过后向事故整改插入数据 这里放在新增
|
//如果报错装填审核通过后向事故整改插入数据 这里放在新增
|
||||||
if (bo.getBczt().equals("1")) {
|
if (bo.getBczt().equals("1")) {
|
||||||
addZgxx(update.getId());
|
addZgxx(update.getId());
|
||||||
|
//同步修改上报中的事故状态
|
||||||
|
HseSafetySgsb sgsb = baseMapper.getSgsb(update.getSgId());
|
||||||
|
if (sgsb != null){
|
||||||
|
//更新为待整改
|
||||||
|
baseMapper.updateSgzt(sgsb.getId(), SGStatusEnum.TO_BE_RECTIFIED.getCode());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return baseMapper.updateById(update) > 0;
|
return baseMapper.updateById(update) > 0;
|
||||||
}
|
}
|
||||||
@ -279,6 +285,13 @@ public class HseSafetySgdcServiceImpl extends ServiceImpl<HseSafetySgdcMapper, H
|
|||||||
vo.setDcfzrmc(sysUserVo.getNickName());
|
vo.setDcfzrmc(sysUserVo.getNickName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//事故状态
|
||||||
|
if (vo.getSgId() != null){
|
||||||
|
HseSafetySgsb sgsb = baseMapper.getSgsb(vo.getSgId());
|
||||||
|
if (sgsb != null){
|
||||||
|
vo.setSgzt(sgsb.getSgzt());
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -359,12 +372,12 @@ public class HseSafetySgdcServiceImpl extends ServiceImpl<HseSafetySgdcMapper, H
|
|||||||
HseSafetySgdcVo sgdcVo = baseMapper.selectVoOne(new LambdaQueryWrapper<HseSafetySgdc>().eq(HseSafetySgdc::getSgId, sgsb.getId()));
|
HseSafetySgdcVo sgdcVo = baseMapper.selectVoOne(new LambdaQueryWrapper<HseSafetySgdc>().eq(HseSafetySgdc::getSgId, sgsb.getId()));
|
||||||
if (sgdcVo != null){
|
if (sgdcVo != null){
|
||||||
//待调查事故 已生成调查事件但还未调查
|
//待调查事故 已生成调查事件但还未调查
|
||||||
if (sgdcVo.getBczt() == null){
|
if (sgdcVo.getBczt() == null || sgdcVo.getBczt().equals(SGStatusEnum.DRAFT.getCode())){
|
||||||
ddcsg++;
|
ddcsg++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//调查中事故 已调查但提交状态为草稿
|
//调查中事故 已调查但提交状态为草稿
|
||||||
if (SGStatusEnum.DRAFT.getCode().equals(sgdcVo.getBczt())){
|
if (SGStatusEnum.SUBMIT.getCode().equals(sgdcVo.getBczt())){
|
||||||
dczsg++;
|
dczsg++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user