| | |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import com.gkhy.safePlatform.commons.utils.StringUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.entity.*; |
| | | import com.gkhy.safePlatform.emergency.enums.EmergencyPlanStatus; |
| | | import com.gkhy.safePlatform.emergency.enums.ApproveStatus; |
| | | import com.gkhy.safePlatform.emergency.enums.EmergencyResultCodes; |
| | | import com.gkhy.safePlatform.emergency.excepiton.EmergencyException; |
| | | import com.gkhy.safePlatform.emergency.model.dto.req.*; |
| | |
| | | import com.gkhy.safePlatform.emergency.query.EmergencyPlanQuery; |
| | | import com.gkhy.safePlatform.emergency.query.db.EmergencyPlanDBQuery; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencyPlanService; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencyWorkApproveService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.*; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.checkerframework.checker.guieffect.qual.UI; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Autowired |
| | | private EmergencyPlanFileInfoService emergencyPlanFileInfoService; |
| | | |
| | | @Autowired |
| | | private EmergencyWorkApproveInfoService emergencyWorkApproveInfoService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | |
| | | |
| | | // 判断审批人 |
| | | for (EmergencyPlanPageRespDTO emergencyPlanPageRespDTO :respList){ |
| | | // 审批中 判断审批人是否人与当前登录人 |
| | | if (emergencyPlanPageRespDTO.getApproveStatus()!=null && emergencyPlanPageRespDTO.getApproveStatus()==2){ |
| | | emergencyPlanPageRespDTO.setCheckApprove(emergencyPlanPageRespDTO.getApprovePersonId().equals(uid)); |
| | | |
| | | //获取对应的审批记录 |
| | | Integer type = ApproveStatus.EMERGENCY.getStatus(); |
| | | List<EmergencyWorkApproveInfoPageDO> emergencyWorkApproveInfoPageDOList = emergencyWorkApproveInfoService.selectWorkApproveByRelateTypeAndRelateId(type,emergencyPlanPageRespDTO.getId()); |
| | | |
| | | if (!CollectionUtils.isEmpty(emergencyWorkApproveInfoPageDOList)) { |
| | | emergencyPlanPageRespDTO.setApproveStatus(emergencyWorkApproveInfoPageDOList.get(0).getApproveStatus()); |
| | | emergencyPlanPageRespDTO.setApprovePersonId(emergencyWorkApproveInfoPageDOList.get(0).getApprovePersonId()); |
| | | // 审批中 判断审批人是否人与当前登录人 |
| | | if (emergencyPlanPageRespDTO.getApproveStatus()!=null && emergencyPlanPageRespDTO.getApproveStatus()==2){ |
| | | emergencyPlanPageRespDTO.setCheckApprove(emergencyPlanPageRespDTO.getApprovePersonId().equals(uid)); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | emergencyPlanInfo.setDelFlag(false); |
| | | emergencyPlanInfo.setCreateUid(uid); |
| | | emergencyPlanInfo.setGmtCreate(nowDate); |
| | | emergencyPlanInfo.setStatus(EmergencyPlanStatus.START.getStatus()); |
| | | emergencyPlanInfoService.addEmergencyPlan(emergencyPlanInfo); |
| | | // 新增应急预案区域表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getAreaList())) { |