| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencyDrillEvaluationPageRespDTO>> list (@RequestBody PageQuery<EmergencyDrillEvaluationQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return emergencyDrillEvaluationService.selectEmergencyDrillEvaluationList(pageQuery); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 应急演练实施评价删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencyDrillEvaluation(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencyDrillEvaluation(@RequestBody Long[] ids){ |
| | | return emergencyDrillEvaluationService.batchDeleteEmergencyDrillEvaluation(ids); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencyDrillExecutePageRespDTO>> list (@RequestBody PageQuery<EmergencyDrillExecuteQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return emergencyDrillExecuteService.selectEmergencyDrillExecuteList(pageQuery); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 应急演练实施删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencyDrillExecute(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencyDrillExecute(@RequestBody Long[] ids){ |
| | | return emergencyDrillExecuteService.batchDeleteEmergencyDrillExecute(ids); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencyDrillPlanPageRespDTO>> list (@RequestBody PageQuery<EmergencyDrillPlanQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return emergencyDrillPlanService.selectEmergencyDrillPlanList(pageQuery); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 应急演练计划删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencyDrillPlan(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencyDrillPlan(@RequestBody Long[] ids){ |
| | | return emergencyDrillPlanService.batchDeleteEmergencyDrillPlan(ids); |
| | | } |
| | | } |
| | |
| | | * 应急预案列表 |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencyPlanPageRespDTO>> list (@RequestBody PageQuery<EmergencyPlanQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | return emergencyPlanService.selectEmergencyPlanList(pageQuery); |
| | | private ResultVO<List<EmergencyPlanPageRespDTO>> list (Authentication authentication,@RequestBody PageQuery<EmergencyPlanQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery); |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return emergencyPlanService.selectEmergencyPlanList(currentUser.getUid(),pageQuery); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 应急预案删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencyPlan(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencyPlan(@RequestBody Long[] ids){ |
| | | return emergencyPlanService.batchDeleteEmergencyPlan(ids); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案废止/还原 |
| | | */ |
| | | /** |
| | | * 应急预案详情 |
| | | */ |
| | | @RequestMapping(value = "/updateAbolish",method = RequestMethod.GET) |
| | | public ResultVO updateAbolish(Long id ,Boolean abolishStatus){ |
| | | return emergencyPlanService.updateAbolish(id,abolishStatus); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencyPlanLogRespDTO>> list (@RequestBody PageQuery<EmergencyPlanLogQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return emergencyPlanLogService.selectEmergencyPlanLogList(pageQuery); |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO addEmergencyPlanLog(Authentication authentication, @RequestBody EmergencyPlanLogReqDTO emergencyPlanLogReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return emergencyPlanLogService.addEmergencyPlanLog(currentUser.getUid(), emergencyPlanLogReqDTO); |
| | | return emergencyPlanLogService.addEmergencyPlanLog(currentUser, emergencyPlanLogReqDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 应急预案删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencyPlanLog(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencyPlanLog(@RequestBody Long[] ids){ |
| | | return emergencyPlanLogService.batchDeleteEmergencyPlanLog(ids); |
| | | } |
| | | } |
| | |
| | | private EmergencySuppliesService emergencySuppliesService; |
| | | |
| | | /** |
| | | * 应急预案列表 |
| | | * 应急物资列表 |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencySuppliesPageRespDTO>> list (@RequestBody PageQuery<EmergencySuppliesQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return emergencySuppliesService.selectEmergencySuppliesList(pageQuery); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案新增 |
| | | * 应急物资新增 |
| | | */ |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO addEmergencySupplies(Authentication authentication, @RequestBody EmergencySuppliesReqDTO emergencySuppliesReqDTO) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 应急预案详情 |
| | | * 应急物资详情 |
| | | */ |
| | | @RequestMapping(value = "/info/{id}",method = RequestMethod.GET) |
| | | public ResultVO<EmergencySuppliesDetailRespDTO> getEmergencySuppliesById(@PathVariable("id")Long id){ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 应急预案修改 |
| | | * 应急物资修改 |
| | | */ |
| | | @RequestMapping(value = "/update",method = RequestMethod.POST) |
| | | public ResultVO updateEmergencySupplies(Authentication authentication, @RequestBody EmergencySuppliesReqDTO emergencySuppliesReqDTO) { |
| | |
| | | } |
| | | |
| | | /** |
| | | * 应急预案删除/批量删除 |
| | | * 应急物资删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencySupplies(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencySupplies(@RequestBody Long[] ids){ |
| | | return emergencySuppliesService.batchDeleteEmergencySupplies(ids); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencySuppliesInspectPageRespDTO>> list (@RequestBody PageQuery<EmergencySuppliesInspectQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return emergencySuppliesInspectService.selectEmergencySuppliesInspectList(pageQuery); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 应急物资检查删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencySuppliesInspect(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencySuppliesInspect(@RequestBody Long[] ids){ |
| | | return emergencySuppliesInspectService.batchDeleteEmergencySuppliesInspect(ids); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencySuppliesMaintainPageRespDTO>> list (@RequestBody PageQuery<EmergencySuppliesMaintainQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return emergencySuppliesMaintainService.selectEmergencySuppliesMaintainList(pageQuery); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 应急物资检查删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencySuppliesMaintain(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencySuppliesMaintain(@RequestBody Long[] ids){ |
| | | return emergencySuppliesMaintainService.batchDeleteEmergencySuppliesMaintain(ids); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencyTeamPageRespDTO>> list (@RequestBody PageQuery<EmergencyTeamQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return emergencyTeamService.selectEmergencyTeamList(pageQuery); |
| | | } |
| | | |
| | |
| | | * 应急队伍新增 |
| | | */ |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO addEmergencyTeam(Authentication authentication, @RequestBody EmergencyTeamReqDTO emergencyTeamReqDTO) { |
| | | public ResultVO<EmergencyTeamDetailRespDTO> addEmergencyTeam(Authentication authentication, @RequestBody EmergencyTeamReqDTO emergencyTeamReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return emergencyTeamService.addEmergencyTeam(currentUser.getUid(), emergencyTeamReqDTO); |
| | | } |
| | |
| | | /** |
| | | * 应急队伍删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteEmergencyTeam(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteEmergencyTeam(@RequestBody Long[] ids){ |
| | | return emergencyTeamService.batchDeleteEmergencyTeam(ids); |
| | | } |
| | | |
| | |
| | | private EmergencyWorkApproveService workApproveService; |
| | | |
| | | /** |
| | | * 应急预案列表 |
| | | * 应急审批列表 |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<EmergencyWorkApprovePageRespDTO>> list (@RequestBody PageQuery<EmergencyWorkApproveQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return workApproveService.selectWorkApproveList(pageQuery); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案新增 |
| | | * 应急审批新增 |
| | | */ |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO addWorkApprove(Authentication authentication, @RequestBody EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return workApproveService.addWorkApprove(currentUser.getUid(), EmergencyWorkApproveReqDTO); |
| | | return workApproveService.addWorkApprove(currentUser, EmergencyWorkApproveReqDTO); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案详情 |
| | | * 应急审批详情 |
| | | */ |
| | | @RequestMapping(value = "/info/{id}",method = RequestMethod.GET) |
| | | public ResultVO<EmergencyWorkApproveDetailRespDTO> getWorkApproveById(@PathVariable("id")Long id){ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 应急预案修改 |
| | | * 应急审批修改 |
| | | */ |
| | | @RequestMapping(value = "/update",method = RequestMethod.POST) |
| | | public ResultVO updateWorkApprove(Authentication authentication, @RequestBody EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return workApproveService.updateWorkApprove(currentUser.getUid(), EmergencyWorkApproveReqDTO); |
| | | return workApproveService.updateWorkApprove(currentUser, EmergencyWorkApproveReqDTO); |
| | | } |
| | | |
| | | /** |
| | | * 应急预案删除/批量删除 |
| | | * 应急审批删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteWorkApprove(@PathVariable("ids")String ids){ |
| | |
| | | |
| | | |
| | | // 应急演练计划 |
| | | |
| | | private String emergencyPlanName; |
| | | |
| | | private String makingUserName; |
| | | |
| | | public String getEmergencyPlanName() { |
| | | return emergencyPlanName; |
| | | } |
| | | |
| | | public void setEmergencyPlanName(String emergencyPlanName) { |
| | | this.emergencyPlanName = emergencyPlanName; |
| | | } |
| | | |
| | | public String getMakingUserName() { |
| | | return makingUserName; |
| | | } |
| | | |
| | | public void setMakingUserName(String makingUserName) { |
| | | this.makingUserName = makingUserName; |
| | | } |
| | | |
| | | private Date makingPlanDate; |
| | | |
| | | private Date drillPlanDate; |
| | |
| | | private String purpose; |
| | | |
| | | // 应急演练实施 |
| | | |
| | | private String recordUserName; |
| | | |
| | | |
| | | public String getRecordUserName() { |
| | | return recordUserName; |
| | | } |
| | | |
| | | public void setRecordUserName(String recordUserName) { |
| | | this.recordUserName = recordUserName; |
| | | } |
| | | |
| | | private Long drillPlanId; |
| | | |
| | | private Date drillRecordDate; |
| | |
| | | @TableName("emergency_drill_evaluation") |
| | | public class EmergencyDrillEvaluationInfoPageDO { |
| | | |
| | | private String emergencyPlanName; |
| | | |
| | | public String getEmergencyPlanName() { |
| | | return emergencyPlanName; |
| | | } |
| | | |
| | | public void setEmergencyPlanName(String emergencyPlanName) { |
| | | this.emergencyPlanName = emergencyPlanName; |
| | | } |
| | | |
| | | private String drillName; |
| | | |
| | | private String drillAddress; |
| | |
| | | @TableName("emergency_drill_evaluation_user") |
| | | public class EmergencyDrillEvaluationUserInfo { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_drill_evaluation_user") |
| | | public class EmergencyDrillEvaluationUserInfoDO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_drill_execute") |
| | | public class EmergencyDrillExecuteInfo { |
| | | |
| | | private String recordUserName; |
| | | |
| | | public String getRecordUserName() { |
| | | return recordUserName; |
| | | } |
| | | |
| | | public void setRecordUserName(String recordUserName) { |
| | | this.recordUserName = recordUserName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_drill_execute") |
| | | public class EmergencyDrillExecuteInfoDetailDO { |
| | | |
| | | private String recordUserName; |
| | | |
| | | public String getRecordUserName() { |
| | | return recordUserName; |
| | | } |
| | | |
| | | public void setRecordUserName(String recordUserName) { |
| | | this.recordUserName = recordUserName; |
| | | } |
| | | |
| | | private String drillName; |
| | | |
| | | public String getDrillName() { |
| | |
| | | @TableName("emergency_drill_execute_user") |
| | | public class EmergencyDrillExecuteUserInfo { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_drill_execute_user") |
| | | public class EmergencyDrillExecuteUserInfoDO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_drill_plan") |
| | | public class EmergencyDrillPlanInfo { |
| | | |
| | | private String makingUserName; |
| | | |
| | | |
| | | public String getMakingUserName() { |
| | | return makingUserName; |
| | | } |
| | | |
| | | public void setMakingUserName(String makingUserName) { |
| | | this.makingUserName = makingUserName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_drill_plan") |
| | | public class EmergencyDrillPlanInfoDetailDO { |
| | | |
| | | private String planName; |
| | | |
| | | public String getPlanName() { |
| | | return planName; |
| | | } |
| | | |
| | | public void setPlanName(String planName) { |
| | | this.planName = planName; |
| | | } |
| | | |
| | | private String makingUserName; |
| | | |
| | | public String getMakingUserName() { |
| | | return makingUserName; |
| | | } |
| | | |
| | | public void setMakingUserName(String makingUserName) { |
| | | this.makingUserName = makingUserName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_drill_plan_user") |
| | | public class EmergencyDrillPlanUserInfo { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_drill_plan_user") |
| | | public class EmergencyDrillPlanUserInfoDO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_plan") |
| | | public class EmergencyPlanInfo { |
| | | |
| | | private Boolean abolishStatus; |
| | | |
| | | public Boolean getAbolishStatus() { |
| | | return abolishStatus; |
| | | } |
| | | |
| | | public void setAbolishStatus(Boolean abolishStatus) { |
| | | this.abolishStatus = abolishStatus; |
| | | } |
| | | |
| | | private String authorName; |
| | | |
| | | public String getAuthorName() { |
| | | return authorName; |
| | | } |
| | | |
| | | public void setAuthorName(String authorName) { |
| | | this.authorName = authorName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_plan") |
| | | public class EmergencyPlanInfoDetailDO { |
| | | |
| | | private String authorName; |
| | | |
| | | public String getAuthorName() { |
| | | return authorName; |
| | | } |
| | | |
| | | public void setAuthorName(String authorName) { |
| | | this.authorName = authorName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_plan") |
| | | public class EmergencyPlanInfoPageDO { |
| | | |
| | | private String authorName; |
| | | |
| | | public String getAuthorName() { |
| | | return authorName; |
| | | } |
| | | |
| | | public void setAuthorName(String authorName) { |
| | | this.authorName = authorName; |
| | | } |
| | | |
| | | private Boolean abolishStatus; |
| | | |
| | | |
| | | public Boolean getAbolishStatus() { |
| | | return abolishStatus; |
| | | } |
| | | |
| | | public void setAbolishStatus(Boolean abolishStatus) { |
| | | this.abolishStatus = abolishStatus; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private String name ; |
| | |
| | | @TableName("emergency_plan_log") |
| | | public class EmergencyPlanLogInfo { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_plan_log") |
| | | public class EmergencyPlanLogInfoDO { |
| | | |
| | | private String planName; |
| | | |
| | | public String getPlanName() { |
| | | return planName; |
| | | } |
| | | |
| | | public void setPlanName(String planName) { |
| | | this.planName = planName; |
| | | } |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_plan_team") |
| | | public class EmergencyPlanTeamInfoDO { |
| | | |
| | | private String teamName; |
| | | |
| | | public String getTeamName() { |
| | | return teamName; |
| | | } |
| | | |
| | | public void setTeamName(String teamName) { |
| | | this.teamName = teamName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | private Integer usePeriod; |
| | | private Long departmentId; |
| | | private Long principalUserUid; |
| | | private String principalUserName; |
| | | private String status; |
| | | private String classification; |
| | | private String name; |
| | |
| | | this.useExplain = useExplain; |
| | | } |
| | | |
| | | |
| | | public String getPrincipalUserName() { |
| | | return principalUserName; |
| | | } |
| | | |
| | | public void setPrincipalUserName(String principalUserName) { |
| | | this.principalUserName = principalUserName; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "EmergencySuppliesInfo{" + |
| | |
| | | @TableName("emergency_supplies") |
| | | public class EmergencySuppliesInfoDetailDO { |
| | | |
| | | private String principalUserName; |
| | | |
| | | public String getPrincipalUserName() { |
| | | return principalUserName; |
| | | } |
| | | |
| | | public void setPrincipalUserName(String principalUserName) { |
| | | this.principalUserName = principalUserName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | private Date productionDate; |
| | |
| | | @TableName("emergency_supplies_inspect") |
| | | public class EmergencySuppliesInspectInfoDetailDO { |
| | | |
| | | private String suppliesName; |
| | | |
| | | public String getSuppliesName() { |
| | | return suppliesName; |
| | | } |
| | | |
| | | public void setSuppliesName(String suppliesName) { |
| | | this.suppliesName = suppliesName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_supplies_inspect") |
| | | public class EmergencySuppliesInspectInfoPageDO { |
| | | |
| | | private String suppliesName; |
| | | |
| | | public String getSuppliesName() { |
| | | return suppliesName; |
| | | } |
| | | |
| | | public void setSuppliesName(String suppliesName) { |
| | | this.suppliesName = suppliesName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_supplies_inspect") |
| | | public class EmergencySuppliesInspectUserInfo { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | private Boolean delFlag; |
| | |
| | | @TableName("emergency_supplies_inspect") |
| | | public class EmergencySuppliesInspectUserInfoDO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_supplies_maintain") |
| | | public class EmergencySuppliesMaintainInfoDetailDO { |
| | | |
| | | private String suppliesName; |
| | | |
| | | public String getSuppliesName() { |
| | | return suppliesName; |
| | | } |
| | | |
| | | public void setSuppliesName(String suppliesName) { |
| | | this.suppliesName = suppliesName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_supplies_maintain") |
| | | public class EmergencySuppliesMaintainInfoPageDO { |
| | | |
| | | private String suppliesName; |
| | | |
| | | public String getSuppliesName() { |
| | | return suppliesName; |
| | | } |
| | | |
| | | public void setSuppliesName(String suppliesName) { |
| | | this.suppliesName = suppliesName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_supplies_maintain") |
| | | public class EmergencySuppliesMaintainUserInfo { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | private Boolean delFlag; |
| | |
| | | @TableName("emergency_supplies_maintain") |
| | | public class EmergencySuppliesMaintainUserInfoDO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_team") |
| | | public class EmergencyTeamInfo { |
| | | |
| | | private String principalName; |
| | | |
| | | public String getPrincipalName() { |
| | | return principalName; |
| | | } |
| | | |
| | | public void setPrincipalName(String principalName) { |
| | | this.principalName = principalName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | @TableName("emergency_team") |
| | | public class EmergencyTeamInfoDetailDO { |
| | | |
| | | private String principalName; |
| | | |
| | | public String getPrincipalName() { |
| | | return principalName; |
| | | } |
| | | |
| | | public void setPrincipalName(String principalName) { |
| | | this.principalName = principalName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | |
| | | private Long userUid; |
| | | |
| | | private Byte gender; |
| | | private Boolean gender; |
| | | |
| | | private String jobNumber; |
| | | |
| | |
| | | this.userUid = userUid; |
| | | } |
| | | |
| | | public Byte getGender() { |
| | | public Boolean getGender() { |
| | | return gender; |
| | | } |
| | | |
| | | public void setGender(Byte gender) { |
| | | public void setGender(Boolean gender) { |
| | | this.gender = gender; |
| | | } |
| | | |
| | |
| | | @TableName("work_approve") |
| | | public class EmergencyWorkApproveInfo { |
| | | |
| | | private Integer sort ; |
| | | |
| | | public Integer getSort() { |
| | | return sort; |
| | | } |
| | | |
| | | public void setSort(Integer sort) { |
| | | this.sort = sort; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //提交人名称/外键 |
| | | private String submitPersonName; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批人名称/外键 |
| | | private String approvePersonName; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见 |
| | | //审批意见备注 |
| | | private String approveMemo; |
| | | //关联业务类型 1:目标检查 2:目标上报 |
| | | //关联业务类型 1:应急预案 |
| | | private Integer relateType; |
| | | //关联的审批对象表ID |
| | | private Long relateId; |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public String getSubmitPersonName() { |
| | | return submitPersonName; |
| | | } |
| | | |
| | | public void setSubmitPersonName(String submitPersonName) { |
| | | this.submitPersonName = submitPersonName; |
| | | } |
| | | |
| | | public String getApprovePersonName() { |
| | | return approvePersonName; |
| | | } |
| | | |
| | | public void setApprovePersonName(String approvePersonName) { |
| | | this.approvePersonName = approvePersonName; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | @TableName("work_approve") |
| | | public class EmergencyWorkApproveInfoDetailDO { |
| | | |
| | | private Integer sort ; |
| | | |
| | | public Integer getSort() { |
| | | return sort; |
| | | } |
| | | |
| | | public void setSort(Integer sort) { |
| | | this.sort = sort; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //提交人名称/外键 |
| | | private String submitPersonName; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批人名称/外键 |
| | | private String approvePersonName; |
| | | |
| | | public String getSubmitPersonName() { |
| | | return submitPersonName; |
| | | } |
| | | |
| | | public void setSubmitPersonName(String submitPersonName) { |
| | | this.submitPersonName = submitPersonName; |
| | | } |
| | | |
| | | public String getApprovePersonName() { |
| | | return approvePersonName; |
| | | } |
| | | |
| | | public void setApprovePersonName(String approvePersonName) { |
| | | this.approvePersonName = approvePersonName; |
| | | } |
| | | |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | |
| | | @TableName("work_approve") |
| | | public class EmergencyWorkApproveInfoPageDO { |
| | | |
| | | private Integer sort ; |
| | | |
| | | public Integer getSort() { |
| | | return sort; |
| | | } |
| | | |
| | | public void setSort(Integer sort) { |
| | | this.sort = sort; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //提交人名称/外键 |
| | | private String submitPersonName; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批人名称/外键 |
| | | private String approvePersonName; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见备注 |
| | | private String approveMemo; |
| | | |
| | | |
| | | public Boolean getApproveResult() { |
| | | return approveResult; |
| | | } |
| | | |
| | | public void setApproveResult(Boolean approveResult) { |
| | | this.approveResult = approveResult; |
| | | } |
| | | |
| | | public String getApproveMemo() { |
| | | return approveMemo; |
| | | } |
| | | |
| | | public void setApproveMemo(String approveMemo) { |
| | | this.approveMemo = approveMemo; |
| | | } |
| | | |
| | | public String getSubmitPersonName() { |
| | | return submitPersonName; |
| | | } |
| | | |
| | | public void setSubmitPersonName(String submitPersonName) { |
| | | this.submitPersonName = submitPersonName; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public String getApprovePersonName() { |
| | | return approvePersonName; |
| | | } |
| | | |
| | | public void setApprovePersonName(String approvePersonName) { |
| | | this.approvePersonName = approvePersonName; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | |
| | | public enum ApproveStatus { |
| | | |
| | | NOT_APPROVE(1), |
| | | UNDER_APPROVE(2), |
| | | COMPLETED_APPROVE(3); |
| | | // 应急物资 |
| | | EMERGENCY(1); |
| | | |
| | | private Integer status; |
| | | |
| | |
| | | public enum EmergencyPlanStatus { |
| | | |
| | | START(1,"开始"), |
| | | FIRST_LEVEL_APPROEAL(2,"一级审批"), |
| | | SECOND_LEVEL_APPROEAL(3,"二级审批"), |
| | | END(4,"结束"); |
| | | SECOND_LEVEL_APPROVAL(2,"审批中"), |
| | | END(3,"结束"); |
| | | |
| | | private Integer status; |
| | | |
| | |
| | | |
| | | SUPPLIES_MAINTAIN_NOT_EXIST("S1006" , "应急物资保养不存在"), |
| | | |
| | | APPROVE_RELATE_ID_NULL("A1001","审批业务类型不可为空"), |
| | | |
| | | APPROVE_RELATE_TYPE_NULL("A1002","审批业务对象不可为空"), |
| | | |
| | | APPROVE_PERSON_NULL("A1003","审批人不可为空"), |
| | | |
| | | APPROVE_STATUS_NULL("A1004","审批状态不可为空"), |
| | | |
| | | APPROVE_NOT_EXIST("A1005" , "审批记录不存在"), |
| | | |
| | | ERROR("A3000", "未知错误"); |
| | | |
| | |
| | | |
| | | public class EmergencyDrillEvaluationUserReqDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long drillEvaluationId; |
| | |
| | | |
| | | public class EmergencyDrillExecuteReqDTO { |
| | | |
| | | private String recordUserName; |
| | | |
| | | public String getRecordUserName() { |
| | | return recordUserName; |
| | | } |
| | | |
| | | public void setRecordUserName(String recordUserName) { |
| | | this.recordUserName = recordUserName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Boolean status; |
| | |
| | | |
| | | public class EmergencyDrillExecuteUserReqDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long drillExecuteId; |
| | |
| | | |
| | | public class EmergencyDrillPlanReqDTO { |
| | | |
| | | private String makingUserName; |
| | | |
| | | public String getMakingUserName() { |
| | | return makingUserName; |
| | | } |
| | | |
| | | public void setMakingUserName(String makingUserName) { |
| | | this.makingUserName = makingUserName; |
| | | } |
| | | |
| | | |
| | | private Long id; |
| | | |
| | | private Integer status; |
| | |
| | | |
| | | public class EmergencyDrillPlanUserReqDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long drillPlanId; |
| | |
| | | |
| | | public class EmergencyPlanReqDTO { |
| | | |
| | | private String authorName; |
| | | |
| | | public String getAuthorName() { |
| | | return authorName; |
| | | } |
| | | |
| | | public void setAuthorName(String authorName) { |
| | | this.authorName = authorName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Integer status; |
| | |
| | | |
| | | public class EmergencySuppliesInspectUserReqDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long inspectId; |
| | |
| | | |
| | | public class EmergencySuppliesMaintainUserReqDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long maintainId; |
| | |
| | | |
| | | public class EmergencySuppliesReqDTO { |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private String principalUserName; |
| | | |
| | | public String getPrincipalUserName() { |
| | | return principalUserName; |
| | | } |
| | | |
| | | public void setPrincipalUserName(String principalUserName) { |
| | | this.principalUserName = principalUserName; |
| | | } |
| | | |
| | | private Long id; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date productionDate; |
| | |
| | | |
| | | public class EmergencyTeamReqDTO { |
| | | |
| | | private String principalName; |
| | | |
| | | public String getPrincipalName() { |
| | | return principalName; |
| | | } |
| | | |
| | | public void setPrincipalName(String principalName) { |
| | | this.principalName = principalName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long principalUid; |
| | |
| | | |
| | | public class EmergencyWorkApproveReqDTO { |
| | | |
| | | private Integer sort ; |
| | | |
| | | public Integer getSort() { |
| | | return sort; |
| | | } |
| | | |
| | | public void setSort(Integer sort) { |
| | | this.sort = sort; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | //流程名称 |
| | |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //提交人名称/外键 |
| | | private String submitPersonName; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批人名称/外键 |
| | | private String approvePersonName; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public String getSubmitPersonName() { |
| | | return submitPersonName; |
| | | } |
| | | |
| | | public void setSubmitPersonName(String submitPersonName) { |
| | | this.submitPersonName = submitPersonName; |
| | | } |
| | | |
| | | public String getApprovePersonName() { |
| | | return approvePersonName; |
| | | } |
| | | |
| | | public void setApprovePersonName(String approvePersonName) { |
| | | this.approvePersonName = approvePersonName; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | public class EmergencyDrillEvaluationDetailRespDTO { |
| | | |
| | | // 应急演练计划 |
| | | private String emergencyPlanName; |
| | | |
| | | private String makingUserName; |
| | | |
| | | public String getEmergencyPlanName() { |
| | | return emergencyPlanName; |
| | | } |
| | | |
| | | public void setEmergencyPlanName(String emergencyPlanName) { |
| | | this.emergencyPlanName = emergencyPlanName; |
| | | } |
| | | |
| | | public String getMakingUserName() { |
| | | return makingUserName; |
| | | } |
| | | |
| | | public void setMakingUserName(String makingUserName) { |
| | | this.makingUserName = makingUserName; |
| | | } |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date makingPlanDate; |
| | | |
| | |
| | | |
| | | private List<EmergencyDrillPlanUserRespDTO> planUserList; |
| | | |
| | | private List<EmergencyDrillPlanUserRespDTO> planChargeUserList; |
| | | |
| | | public List<EmergencyDrillPlanUserRespDTO> getPlanChargeUserList() { |
| | | return planChargeUserList; |
| | | } |
| | | |
| | | public void setPlanChargeUserList(List<EmergencyDrillPlanUserRespDTO> planChargeUserList) { |
| | | this.planChargeUserList = planChargeUserList; |
| | | } |
| | | |
| | | // 应急演练实施 |
| | | |
| | | private String recordUserName; |
| | | |
| | | public String getRecordUserName() { |
| | | return recordUserName; |
| | | } |
| | | |
| | | public void setRecordUserName(String recordUserName) { |
| | | this.recordUserName = recordUserName; |
| | | } |
| | | |
| | | private Long drillPlanId; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | |
| | | |
| | | public class EmergencyDrillEvaluationPageRespDTO { |
| | | |
| | | private String emergencyPlanName; |
| | | |
| | | public String getEmergencyPlanName() { |
| | | return emergencyPlanName; |
| | | } |
| | | |
| | | public void setEmergencyPlanName(String emergencyPlanName) { |
| | | this.emergencyPlanName = emergencyPlanName; |
| | | } |
| | | |
| | | private String drillName; |
| | | |
| | | private String drillAddress; |
| | |
| | | |
| | | public class EmergencyDrillEvaluationUserRespDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long drillEvaluationId; |
| | |
| | | |
| | | public class EmergencyDrillExecuteDetailRespDTO { |
| | | |
| | | private String recordUserName; |
| | | |
| | | public String getRecordUserName() { |
| | | return recordUserName; |
| | | } |
| | | |
| | | public void setRecordUserName(String recordUserName) { |
| | | this.recordUserName = recordUserName; |
| | | } |
| | | |
| | | private String drillName; |
| | | |
| | | public String getDrillName() { |
| | |
| | | |
| | | private Long drillPlanId; |
| | | |
| | | private Long recordUserUid; |
| | | |
| | | private String processDesc; |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | this.drillPlanId = drillPlanId; |
| | | } |
| | | |
| | | public Long getRecordUserUid() { |
| | | return recordUserUid; |
| | | } |
| | | |
| | | public void setRecordUserUid(Long recordUserUid) { |
| | | this.recordUserUid = recordUserUid; |
| | | } |
| | | |
| | | public String getProcessDesc() { |
| | | return processDesc; |
| | | } |
| | | |
| | | public void setProcessDesc(String processDesc) { |
| | | this.processDesc = processDesc; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "EmergencyDrillExecuteReqDTO{" + |
| | | "id=" + id + |
| | | ", status=" + status + |
| | | ", drillRecordDate=" + drillRecordDate + |
| | | ", drillPlanId=" + drillPlanId + |
| | | ", recordUserUid=" + recordUserUid + |
| | | ", processDesc='" + processDesc + '\'' + |
| | | '}'; |
| | | } |
| | | } |
| | |
| | | |
| | | public class EmergencyDrillExecuteUserRespDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long drillExecuteId; |
| | |
| | | |
| | | public class EmergencyDrillPlanDetailRespDTO { |
| | | |
| | | private String planName; |
| | | |
| | | public String getPlanName() { |
| | | return planName; |
| | | } |
| | | |
| | | public void setPlanName(String planName) { |
| | | this.planName = planName; |
| | | } |
| | | |
| | | private String makingUserName; |
| | | |
| | | public String getMakingUserName() { |
| | | return makingUserName; |
| | | } |
| | | |
| | | public void setMakingUserName(String makingUserName) { |
| | | this.makingUserName = makingUserName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | |
| | | private List<EmergencyDrillPlanUserRespDTO> userList; |
| | | |
| | | private List<EmergencyDrillPlanUserRespDTO> chargeUserList; |
| | | |
| | | public List<EmergencyDrillPlanUserRespDTO> getChargeUserList() { |
| | | return chargeUserList; |
| | | } |
| | | |
| | | public void setChargeUserList(List<EmergencyDrillPlanUserRespDTO> chargeUserList) { |
| | | this.chargeUserList = chargeUserList; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | |
| | | public class EmergencyDrillPlanUserRespDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long drillPlanId; |
| | |
| | | |
| | | public class EmergencyPlanDepartmentRespDTO { |
| | | |
| | | private String departmentName; |
| | | |
| | | public String getDepartmentName() { |
| | | return departmentName; |
| | | } |
| | | |
| | | public void setDepartmentName(String departmentName) { |
| | | this.departmentName = departmentName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long planId; |
| | |
| | | |
| | | public class EmergencyPlanDetailRespDTO { |
| | | |
| | | private String authorName; |
| | | |
| | | public String getAuthorName() { |
| | | return authorName; |
| | | } |
| | | |
| | | public void setAuthorName(String authorName) { |
| | | this.authorName = authorName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Integer status; |
| | |
| | | |
| | | public class EmergencyPlanLogRespDTO { |
| | | |
| | | private String planName; |
| | | |
| | | public String getPlanName() { |
| | | return planName; |
| | | } |
| | | |
| | | public void setPlanName(String planName) { |
| | | this.planName = planName; |
| | | } |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long planId; |
| | |
| | | |
| | | public class EmergencyPlanPageRespDTO { |
| | | |
| | | // 最新的审批id |
| | | private Long approveId; |
| | | |
| | | public Long getApproveId() { |
| | | return approveId; |
| | | } |
| | | |
| | | public void setApproveId(Long approveId) { |
| | | this.approveId = approveId; |
| | | } |
| | | |
| | | // 最新的审批状态 |
| | | private Integer approveStatus; |
| | | |
| | | // 最新的审批人 |
| | | private Long approvePersonId; |
| | | |
| | | // 审批人是否为当前登录人 |
| | | private Boolean checkApprove; |
| | | |
| | | public Integer getApproveStatus() { |
| | | return approveStatus; |
| | | } |
| | | |
| | | public void setApproveStatus(Integer approveStatus) { |
| | | this.approveStatus = approveStatus; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public Boolean getCheckApprove() { |
| | | return checkApprove; |
| | | } |
| | | |
| | | public void setCheckApprove(Boolean checkApprove) { |
| | | this.checkApprove = checkApprove; |
| | | } |
| | | |
| | | private String authorName; |
| | | |
| | | public String getAuthorName() { |
| | | return authorName; |
| | | } |
| | | |
| | | public void setAuthorName(String authorName) { |
| | | this.authorName = authorName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private String name ; |
| | |
| | | |
| | | public class EmergencyPlanTeamRespDTO { |
| | | |
| | | private String teamName; |
| | | |
| | | public String getTeamName() { |
| | | return teamName; |
| | | } |
| | | |
| | | public void setTeamName(String teamName) { |
| | | this.teamName = teamName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long planId; |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencySuppliesMaintainInfoDetailDO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.req.EmergencySuppliesInspectReqDTO; |
| | | import com.gkhy.safePlatform.emergency.model.dto.req.EmergencySuppliesMaintainReqDTO; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | public class EmergencySuppliesDetailRespDTO { |
| | | |
| | | private List<EmergencySuppliesMaintainDetailRespDTO> maintainList; |
| | | |
| | | private List<EmergencySuppliesInspectDetailRespDTO> inspectList; |
| | | |
| | | public List<EmergencySuppliesMaintainDetailRespDTO> getMaintainList() { |
| | | return maintainList; |
| | | } |
| | | |
| | | public void setMaintainList(List<EmergencySuppliesMaintainDetailRespDTO> maintainList) { |
| | | this.maintainList = maintainList; |
| | | } |
| | | |
| | | public List<EmergencySuppliesInspectDetailRespDTO> getInspectList() { |
| | | return inspectList; |
| | | } |
| | | |
| | | public void setInspectList(List<EmergencySuppliesInspectDetailRespDTO> inspectList) { |
| | | this.inspectList = inspectList; |
| | | } |
| | | |
| | | private String principalUserName; |
| | | |
| | | public String getPrincipalUserName() { |
| | | return principalUserName; |
| | | } |
| | | |
| | | public void setPrincipalUserName(String principalUserName) { |
| | | this.principalUserName = principalUserName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | |
| | | public class EmergencySuppliesInspectDetailRespDTO { |
| | | |
| | | private String suppliesName; |
| | | |
| | | public String getSuppliesName() { |
| | | return suppliesName; |
| | | } |
| | | |
| | | public void setSuppliesName(String suppliesName) { |
| | | this.suppliesName = suppliesName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long suppliesId; |
| | |
| | | |
| | | public class EmergencySuppliesInspectPageRespDTO { |
| | | |
| | | private String suppliesName; |
| | | |
| | | public String getSuppliesName() { |
| | | return suppliesName; |
| | | } |
| | | |
| | | public void setSuppliesName(String suppliesName) { |
| | | this.suppliesName = suppliesName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long suppliesId; |
| | |
| | | |
| | | public class EmergencySuppliesInspectUserRespDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long inspectId; |
| | |
| | | |
| | | public class EmergencySuppliesMaintainDetailRespDTO { |
| | | |
| | | private String suppliesName; |
| | | |
| | | public String getSuppliesName() { |
| | | return suppliesName; |
| | | } |
| | | |
| | | public void setSuppliesName(String suppliesName) { |
| | | this.suppliesName = suppliesName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long suppliesId; |
| | |
| | | |
| | | public class EmergencySuppliesMaintainPageRespDTO { |
| | | |
| | | private String suppliesName; |
| | | |
| | | public String getSuppliesName() { |
| | | return suppliesName; |
| | | } |
| | | |
| | | public void setSuppliesName(String suppliesName) { |
| | | this.suppliesName = suppliesName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long suppliesId; |
| | |
| | | |
| | | public class EmergencySuppliesMaintainUserRespDTO { |
| | | |
| | | private String userName; |
| | | |
| | | public String getUserName() { |
| | | return userName; |
| | | } |
| | | |
| | | public void setUserName(String userName) { |
| | | this.userName = userName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long maintainId; |
| | |
| | | |
| | | public class EmergencySuppliesPageRespDTO { |
| | | |
| | | private String deptName; |
| | | |
| | | public String getDeptName() { |
| | | return deptName; |
| | | } |
| | | |
| | | public void setDeptName(String deptName) { |
| | | this.deptName = deptName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private String name; |
| | |
| | | |
| | | public class EmergencyTeamDetailRespDTO { |
| | | |
| | | private String principalName; |
| | | |
| | | public String getPrincipalName() { |
| | | return principalName; |
| | | } |
| | | |
| | | public void setPrincipalName(String principalName) { |
| | | this.principalName = principalName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long principalUid; |
| | |
| | | |
| | | private Long userUid; |
| | | |
| | | private Byte gender; |
| | | private Boolean gender; |
| | | |
| | | private String jobNumber; |
| | | |
| | |
| | | this.userUid = userUid; |
| | | } |
| | | |
| | | public Byte getGender() { |
| | | public Boolean getGender() { |
| | | return gender; |
| | | } |
| | | |
| | | public void setGender(Byte gender) { |
| | | public void setGender(Boolean gender) { |
| | | this.gender = gender; |
| | | } |
| | | |
| | |
| | | |
| | | public class EmergencyWorkApproveDetailRespDTO { |
| | | |
| | | private Integer sort ; |
| | | |
| | | public Integer getSort() { |
| | | return sort; |
| | | } |
| | | |
| | | public void setSort(Integer sort) { |
| | | this.sort = sort; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //提交人名称/外键 |
| | | private String submitPersonName; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批人名称/外键 |
| | | private String approvePersonName; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | //审批意见 |
| | |
| | | //关联业务说明 |
| | | private String relateDesc; |
| | | |
| | | public String getSubmitPersonName() { |
| | | return submitPersonName; |
| | | } |
| | | |
| | | public void setSubmitPersonName(String submitPersonName) { |
| | | this.submitPersonName = submitPersonName; |
| | | } |
| | | |
| | | public String getApprovePersonName() { |
| | | return approvePersonName; |
| | | } |
| | | |
| | | public void setApprovePersonName(String approvePersonName) { |
| | | this.approvePersonName = approvePersonName; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | |
| | | public class EmergencyWorkApprovePageRespDTO { |
| | | |
| | | private Long id; |
| | | private Integer sort ; |
| | | |
| | | public Integer getSort() { |
| | | return sort; |
| | | } |
| | | |
| | | public void setSort(Integer sort) { |
| | | this.sort = sort; |
| | | } |
| | | |
| | | private Long id; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date gmtCreate; |
| | | |
| | |
| | | private String title; |
| | | //提交人ID/外键 |
| | | private Long submitPersonId; |
| | | //提交人名称/外键 |
| | | private String submitPersonName; |
| | | //审批人ID/外键 |
| | | private Long approvePersonId; |
| | | //审批人名称/外键 |
| | | private String approvePersonName; |
| | | //审批状态 1:未审批 2:审批中 3:审批完成 |
| | | private Integer approveStatus; |
| | | |
| | | //审批意见 |
| | | private Boolean approveResult; |
| | | //审批意见备注 |
| | | private String approveMemo; |
| | | |
| | | public String getSubmitPersonName() { |
| | | return submitPersonName; |
| | | } |
| | | |
| | | public void setSubmitPersonName(String submitPersonName) { |
| | | this.submitPersonName = submitPersonName; |
| | | } |
| | | |
| | | public Long getApprovePersonId() { |
| | | return approvePersonId; |
| | | } |
| | | |
| | | public void setApprovePersonId(Long approvePersonId) { |
| | | this.approvePersonId = approvePersonId; |
| | | } |
| | | |
| | | public String getApprovePersonName() { |
| | | return approvePersonName; |
| | | } |
| | | |
| | | public void setApprovePersonName(String approvePersonName) { |
| | | this.approvePersonName = approvePersonName; |
| | | } |
| | | |
| | | public Boolean getApproveResult() { |
| | | return approveResult; |
| | | } |
| | | |
| | | public void setApproveResult(Boolean approveResult) { |
| | | this.approveResult = approveResult; |
| | | } |
| | | |
| | | public String getApproveMemo() { |
| | | return approveMemo; |
| | | } |
| | | |
| | | public void setApproveMemo(String approveMemo) { |
| | | this.approveMemo = approveMemo; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | |
| | | |
| | | public class EmergencyDrillExecuteQuery { |
| | | |
| | | private Boolean status; |
| | | |
| | | public Boolean getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Boolean status) { |
| | | this.status = status; |
| | | } |
| | | } |
| | |
| | | |
| | | public class EmergencyPlanQuery { |
| | | |
| | | private Boolean abolishStatus; |
| | | |
| | | public Boolean getAbolishStatus() { |
| | | return abolishStatus; |
| | | } |
| | | |
| | | public void setAbolishStatus(Boolean abolishStatus) { |
| | | this.abolishStatus = abolishStatus; |
| | | } |
| | | |
| | | private String name ; |
| | | |
| | | private String type ; |
| | |
| | | |
| | | public class EmergencyWorkApproveQuery { |
| | | |
| | | private Integer relateType; |
| | | |
| | | private Long relateId; |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | | |
| | | public void setRelateType(Integer relateType) { |
| | | this.relateType = relateType; |
| | | } |
| | | |
| | | public Long getRelateId() { |
| | | return relateId; |
| | | } |
| | | |
| | | public void setRelateId(Long relateId) { |
| | | this.relateId = relateId; |
| | | } |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | |
| | |
| | | |
| | | public class EmergencyDrillExecuteDBQuery { |
| | | |
| | | private Boolean status; |
| | | |
| | | public Boolean getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Boolean status) { |
| | | this.status = status; |
| | | } |
| | | } |
| | |
| | | |
| | | private String type ; |
| | | |
| | | private Boolean abolishStatus; |
| | | |
| | | public Boolean getAbolishStatus() { |
| | | return abolishStatus; |
| | | } |
| | | |
| | | public void setAbolishStatus(Boolean abolishStatus) { |
| | | this.abolishStatus = abolishStatus; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | |
| | | |
| | | public class EmergencyWorkApproveDBQuery { |
| | | |
| | | private Integer relateType; |
| | | |
| | | private Long relateId; |
| | | |
| | | public Integer getRelateType() { |
| | | return relateType; |
| | | } |
| | | |
| | | public void setRelateType(Integer relateType) { |
| | | this.relateType = relateType; |
| | | } |
| | | |
| | | public Long getRelateId() { |
| | | return relateId; |
| | | } |
| | | |
| | | public void setRelateId(Long relateId) { |
| | | this.relateId = relateId; |
| | | } |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date startTime; |
| | | |
| | |
| | | |
| | | void addEmergencyDrillEvaluation(EmergencyDrillEvaluationInfo emergencyDrillEvaluationInfo); |
| | | |
| | | EmergencyDrillEvaluationInfoDetailDO selectEmergencyDrillEvaluationById(@Param("id") Long id); |
| | | EmergencyDrillEvaluationInfoDetailDO selectEmergencyDrillEvaluationByExecuteId(@Param("id") Long id); |
| | | |
| | | void updateEmergencyDrillEvaluation(EmergencyDrillEvaluationInfo emergencyDrillEvaluationInfo); |
| | | |
| | |
| | | void updateEmergencyDrillExecute(EmergencyDrillExecuteInfo emergencyDrillExecuteInfo); |
| | | |
| | | void deleteEmergencyDrillExecute(@Param("id") Long id); |
| | | |
| | | void updateStatusById(@Param("drillExecuteId")Long drillExecuteId); |
| | | } |
| | |
| | | void updateEmergencyPlan(EmergencyPlanInfo emergencyPlanInfo); |
| | | |
| | | void deleteEmergencyPlan(@Param("id")Long id); |
| | | |
| | | void updateAbolish(@Param("id")Long id,@Param("abolishStatus") Boolean abolishStatus); |
| | | } |
| | |
| | | void updateEmergencySuppliesInspect(EmergencySuppliesInspectInfo emergencySuppliesInspectInfo); |
| | | |
| | | void deleteEmergencySuppliesInspect(@Param("id") Long id); |
| | | |
| | | void deleteBySuppliesId(@Param("id")Long id); |
| | | |
| | | List<EmergencySuppliesInspectInfoDetailDO> selectEmergencySuppliesInspectBySuppliesId(Long id); |
| | | } |
| | |
| | | void updateEmergencySuppliesMaintain(EmergencySuppliesMaintainInfo emergencySuppliesMaintainInfo); |
| | | |
| | | void deleteEmergencySuppliesMaintain(@Param("id") Long id); |
| | | |
| | | void deleteBySuppliesId(@Param("id")Long id); |
| | | |
| | | List<EmergencySuppliesMaintainInfoDetailDO> selectEmergencySuppliesMaintainBySuppliesId(Long id); |
| | | } |
| | |
| | | |
| | | void deleteWorkApproveById(@Param("id") Long id); |
| | | |
| | | List<EmergencyWorkApproveInfoDetailDO> selectWorkApproveByRelateTypeAndRelateId(@Param("type")Integer type, @Param("id")Long id); |
| | | } |
| | |
| | | |
| | | ResultVO updateEmergencyDrillEvaluation(Long uid, EmergencyDrillEvaluationReqDTO emergencyDrillEvaluationReqDTO); |
| | | |
| | | ResultVO batchDeleteEmergencyDrillEvaluation(String ids); |
| | | ResultVO batchDeleteEmergencyDrillEvaluation(Long[] ids); |
| | | } |
| | |
| | | |
| | | ResultVO updateEmergencyDrillExecute(Long uid, EmergencyDrillExecuteReqDTO emergencyDrillExecuteReqDTO); |
| | | |
| | | ResultVO batchDeleteEmergencyDrillExecute(String ids); |
| | | ResultVO batchDeleteEmergencyDrillExecute(Long[] ids); |
| | | } |
| | |
| | | |
| | | ResultVO updateEmergencyDrillPlan(Long uid, EmergencyDrillPlanReqDTO emergencyDrillPlanReqDTO); |
| | | |
| | | ResultVO batchDeleteEmergencyDrillPlan(String ids); |
| | | ResultVO batchDeleteEmergencyDrillPlan(Long[] ids); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.emergency.service; |
| | | |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | |
| | | |
| | | SearchResultVO<List<EmergencyPlanLogRespDTO>> selectEmergencyPlanLogList(PageQuery<EmergencyPlanLogQuery> query); |
| | | |
| | | ResultVO addEmergencyPlanLog(Long uid, EmergencyPlanLogReqDTO emergencyPlanLogReqDTO); |
| | | ResultVO addEmergencyPlanLog(ContextCacheUser currentUser, EmergencyPlanLogReqDTO emergencyPlanLogReqDTO); |
| | | |
| | | ResultVO<EmergencyPlanLogRespDTO> getEmergencyPlanLogById(Long id); |
| | | |
| | | ResultVO updateEmergencyPlanLog(Long uid, EmergencyPlanLogReqDTO emergencyPlanLogReqDTO); |
| | | |
| | | ResultVO batchDeleteEmergencyPlanLog(String ids); |
| | | ResultVO batchDeleteEmergencyPlanLog(Long[] ids); |
| | | } |
| | |
| | | |
| | | public interface EmergencyPlanService { |
| | | |
| | | SearchResultVO<List<EmergencyPlanPageRespDTO>> selectEmergencyPlanList(PageQuery<EmergencyPlanQuery> query); |
| | | SearchResultVO<List<EmergencyPlanPageRespDTO>> selectEmergencyPlanList(Long uid ,PageQuery<EmergencyPlanQuery> query); |
| | | |
| | | ResultVO addEmergencyPlan(Long uid, EmergencyPlanReqDTO emergencyPlanReqDTO); |
| | | |
| | |
| | | |
| | | ResultVO updateEmergencyPlan(Long uid, EmergencyPlanReqDTO emergencyPlanReqDTO); |
| | | |
| | | ResultVO batchDeleteEmergencyPlan(String ids); |
| | | ResultVO batchDeleteEmergencyPlan(Long[] ids); |
| | | |
| | | ResultVO updateAbolish(Long id, Boolean abolishStatus); |
| | | } |
| | |
| | | |
| | | ResultVO updateEmergencySuppliesInspect(Long uid, EmergencySuppliesInspectReqDTO emergencySuppliesInspectReqDTO); |
| | | |
| | | ResultVO batchDeleteEmergencySuppliesInspect(String ids); |
| | | ResultVO batchDeleteEmergencySuppliesInspect(Long[] ids); |
| | | } |
| | |
| | | |
| | | ResultVO updateEmergencySuppliesMaintain(Long uid, EmergencySuppliesMaintainReqDTO emergencySuppliesMaintainReqDTO); |
| | | |
| | | ResultVO batchDeleteEmergencySuppliesMaintain(String ids); |
| | | ResultVO batchDeleteEmergencySuppliesMaintain(Long[] ids); |
| | | } |
| | |
| | | |
| | | ResultVO updateEmergencySupplies(Long uid, EmergencySuppliesReqDTO emergencySuppliesReqDTO); |
| | | |
| | | ResultVO batchDeleteEmergencySupplies(String ids); |
| | | ResultVO batchDeleteEmergencySupplies( Long[] ids); |
| | | } |
| | |
| | | |
| | | SearchResultVO<List<EmergencyTeamPageRespDTO>> selectEmergencyTeamList(PageQuery<EmergencyTeamQuery> query); |
| | | |
| | | ResultVO addEmergencyTeam(Long valueOf, EmergencyTeamReqDTO emergencyTeamReqDTO); |
| | | ResultVO<EmergencyTeamDetailRespDTO> addEmergencyTeam(Long valueOf, EmergencyTeamReqDTO emergencyTeamReqDTO); |
| | | |
| | | ResultVO<EmergencyTeamDetailRespDTO> getEmergencyTeamById(Long id); |
| | | |
| | |
| | | |
| | | ResultVO getEmergencyTeamMemberById(Long id); |
| | | |
| | | ResultVO batchDeleteEmergencyTeam(String ids); |
| | | ResultVO batchDeleteEmergencyTeam(Long[] ids); |
| | | |
| | | ResultVO getEmergencyTeamMemberByTeamId(Long teamId); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.emergency.service; |
| | | |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | |
| | | |
| | | SearchResultVO<List<EmergencyWorkApprovePageRespDTO>> selectWorkApproveList(PageQuery<EmergencyWorkApproveQuery> query); |
| | | |
| | | ResultVO addWorkApprove(Long valueOf, EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO); |
| | | ResultVO addWorkApprove(ContextCacheUser currentUser, EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO); |
| | | |
| | | ResultVO<EmergencyWorkApproveDetailRespDTO> getWorkApproveById(Long id); |
| | | |
| | | ResultVO updateWorkApprove(Long uid, EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO); |
| | | ResultVO updateWorkApprove(ContextCacheUser currentUser, EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO); |
| | | |
| | | ResultVO batchDeleteWorkApprove(String ids); |
| | | |
| | |
| | | |
| | | void addEmergencyDrillEvaluation(EmergencyDrillEvaluationInfo emergencyDrillEvaluationInfo); |
| | | |
| | | EmergencyDrillEvaluationInfoDetailDO selectEmergencyDrillEvaluationById(Long id); |
| | | EmergencyDrillEvaluationInfoDetailDO selectEmergencyDrillEvaluationByExecuteId(Long id); |
| | | |
| | | void updateEmergencyDrillEvaluation(EmergencyDrillEvaluationInfo emergencyDrillEvaluationInfo); |
| | | |
| | |
| | | void updateEmergencyDrillExecute(EmergencyDrillExecuteInfo emergencyDrillExecuteInfo); |
| | | |
| | | void deleteEmergencyDrillExecute(Long DrillExecuteId); |
| | | |
| | | void updateStatusById(Long drillExecuteId); |
| | | } |
| | |
| | | void updateEmergencyPlan(EmergencyPlanInfo emergencyPlanInfo); |
| | | |
| | | void deleteEmergencyPlan(Long planId); |
| | | |
| | | void updateAbolish(Long id, Boolean abolishStatus); |
| | | } |
| | |
| | | void updateEmergencySuppliesInspect(EmergencySuppliesInspectInfo emergencySuppliesInspectInfo); |
| | | |
| | | void deleteEmergencySuppliesInspect(Long SuppliesInspectId); |
| | | |
| | | void deleteBySuppliesId(Long id); |
| | | |
| | | List<EmergencySuppliesInspectInfoDetailDO> selectEmergencySuppliesInspectBySuppliesId(Long id); |
| | | } |
| | |
| | | void updateEmergencySuppliesMaintain(EmergencySuppliesMaintainInfo emergencySuppliesMaintainInfo); |
| | | |
| | | void deleteEmergencySuppliesMaintain(Long SuppliesMaintainId); |
| | | |
| | | void deleteBySuppliesId(Long id); |
| | | |
| | | List<EmergencySuppliesMaintainInfoDetailDO> selectEmergencySuppliesMaintainBySuppliesId(Long id); |
| | | } |
| | |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfo; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfoDetailDO; |
| | | import com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfoPageDO; |
| | | import com.gkhy.safePlatform.emergency.enums.ApproveStatus; |
| | | import com.gkhy.safePlatform.emergency.model.dto.resp.EmergencyPlanPageRespDTO; |
| | | import com.gkhy.safePlatform.emergency.query.db.EmergencyWorkApproveDBQuery; |
| | | |
| | | import java.util.List; |
| | |
| | | void updateWorkApprove(EmergencyWorkApproveInfo EmergencyWorkApproveInfo); |
| | | |
| | | void deleteWorkApproveById(Long teamId); |
| | | |
| | | List<EmergencyWorkApproveInfoDetailDO> selectWorkApproveByRelateTypeAndRelateId(Integer type, Long id); |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public EmergencyDrillEvaluationInfoDetailDO selectEmergencyDrillEvaluationById(Long id) { |
| | | return emergencyDrillEvaluationInfoRepository.selectEmergencyDrillEvaluationById(id); |
| | | public EmergencyDrillEvaluationInfoDetailDO selectEmergencyDrillEvaluationByExecuteId(Long id) { |
| | | return emergencyDrillEvaluationInfoRepository.selectEmergencyDrillEvaluationByExecuteId(id); |
| | | } |
| | | |
| | | @Override |
| | |
| | | emergencyDrillExecuteInfoRepository.deleteEmergencyDrillExecute(DrillExecuteId); |
| | | } |
| | | |
| | | @Override |
| | | public void updateStatusById(Long drillExecuteId) { |
| | | emergencyDrillExecuteInfoRepository.updateStatusById(drillExecuteId); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | emergencyPlanInfoRepository.deleteEmergencyPlan(planId); |
| | | } |
| | | |
| | | @Override |
| | | public void updateAbolish(Long id, Boolean abolishStatus) { |
| | | emergencyPlanInfoRepository.updateAbolish(id,abolishStatus); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | emergencySuppliesInspectInfoRepository.deleteEmergencySuppliesInspect(SuppliesInspectId); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteBySuppliesId(Long id) { |
| | | emergencySuppliesInspectInfoRepository.deleteBySuppliesId(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<EmergencySuppliesInspectInfoDetailDO> selectEmergencySuppliesInspectBySuppliesId(Long id) { |
| | | return emergencySuppliesInspectInfoRepository.selectEmergencySuppliesInspectBySuppliesId(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | emergencySuppliesMaintainInfoRepository.deleteEmergencySuppliesMaintain(SuppliesMaintainId); |
| | | } |
| | | |
| | | @Override |
| | | public void deleteBySuppliesId(Long id) { |
| | | emergencySuppliesMaintainInfoRepository.deleteBySuppliesId(id); |
| | | } |
| | | |
| | | @Override |
| | | public List<EmergencySuppliesMaintainInfoDetailDO> selectEmergencySuppliesMaintainBySuppliesId(Long id) { |
| | | return emergencySuppliesMaintainInfoRepository.selectEmergencySuppliesMaintainBySuppliesId(id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | emergencyWorkApproveInfoRepository.deleteWorkApproveById(teamId); |
| | | } |
| | | |
| | | @Override |
| | | public List<EmergencyWorkApproveInfoDetailDO> selectWorkApproveByRelateTypeAndRelateId(Integer type, Long id) { |
| | | return emergencyWorkApproveInfoRepository.selectWorkApproveByRelateTypeAndRelateId(type,id); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | if (!CollectionUtils.isEmpty(emergencyDrillEvaluationReqDTO.getUserList())) { |
| | | addEmergencyDrillEvaluationUser(uid, emergencyDrillEvaluationInfo.getId(), nowDate, emergencyDrillEvaluationReqDTO.getUserList()); |
| | | } |
| | | |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | public ResultVO<EmergencyDrillEvaluationDetailRespDTO> getEmergencyDrillEvaluationById(Long id) { |
| | | EmergencyDrillEvaluationDetailRespDTO emergencyDrillEvaluationDetailRespDTO = new EmergencyDrillEvaluationDetailRespDTO(); |
| | | // 查询是否存在 |
| | | EmergencyDrillEvaluationInfoDetailDO emergencyDrillEvaluationInfoDetailDO = emergencyDrillEvaluationInfoService.selectEmergencyDrillEvaluationById(id); |
| | | EmergencyDrillEvaluationInfoDetailDO emergencyDrillEvaluationInfoDetailDO = emergencyDrillEvaluationInfoService.selectEmergencyDrillEvaluationByExecuteId(id); |
| | | if (emergencyDrillEvaluationInfoDetailDO == null) { |
| | | throw new EmergencyException(EmergencyResultCodes.DRILL_EVALUATION_NOT_EXIST); |
| | | } else { |
| | |
| | | // 演练计划的人员 |
| | | List<EmergencyDrillPlanUserInfoDO> planUserInfoDOList = emergencyDrillPlanUserInfoService.selectEmergencyDrillPlanUserByDrillPlanId(emergencyDrillEvaluationDetailRespDTO.getDrillPlanId()); |
| | | if (!CollectionUtils.isEmpty(planUserInfoDOList)) { |
| | | List<EmergencyDrillPlanUserRespDTO> emergencyUserUserRespDTOList = BeanCopyUtils.copyBeanList(planUserInfoDOList, EmergencyDrillPlanUserRespDTO.class); |
| | | emergencyDrillEvaluationDetailRespDTO.setPlanUserList(emergencyUserUserRespDTOList); |
| | | List<EmergencyDrillPlanUserRespDTO> emergencyDrillPlanUserRespDTOList = BeanCopyUtils.copyBeanList(planUserInfoDOList, EmergencyDrillPlanUserRespDTO.class); |
| | | |
| | | List<EmergencyDrillPlanUserRespDTO> planUserList = emergencyDrillPlanUserRespDTOList.stream().filter(user -> user.getType()==1 ).collect(Collectors.toList()); |
| | | List<EmergencyDrillPlanUserRespDTO> planChargeUserList = emergencyDrillPlanUserRespDTOList.stream().filter(user -> user.getType()==2 ).collect(Collectors.toList()); |
| | | emergencyDrillEvaluationDetailRespDTO.setPlanUserList(planUserList); |
| | | emergencyDrillEvaluationDetailRespDTO.setPlanChargeUserList(planChargeUserList); |
| | | } |
| | | // 演练实施的人员 |
| | | List<EmergencyDrillExecuteUserInfoDO> executeUserList = emergencyDrillExecuteUserInfoService.selectEmergencyDrillExecuteUserByDrillExecuteId(emergencyDrillEvaluationDetailRespDTO.getDrillExecuteId()); |
| | |
| | | emergencyDrillEvaluationDetailRespDTO.setExecuteUserList(emergencyUserFileRespDTOList); |
| | | } |
| | | // 演练评价的文件 |
| | | List<EmergencyDrillEvaluationFileInfoDO> emergencyDrillEvaluationFileInfoDOList = emergencyDrillEvaluationFileInfoService.selectEmergencyDrillEvaluationFileByDrillEvaluationId(id); |
| | | List<EmergencyDrillEvaluationFileInfoDO> emergencyDrillEvaluationFileInfoDOList = emergencyDrillEvaluationFileInfoService.selectEmergencyDrillEvaluationFileByDrillEvaluationId(emergencyDrillEvaluationDetailRespDTO.getId()); |
| | | if (!CollectionUtils.isEmpty(emergencyDrillEvaluationFileInfoDOList)) { |
| | | List<EmergencyDrillEvaluationFileRespDTO> emergencyUserFileRespDTOList = BeanCopyUtils.copyBeanList(emergencyDrillEvaluationFileInfoDOList, EmergencyDrillEvaluationFileRespDTO.class); |
| | | emergencyDrillEvaluationDetailRespDTO.setEvaluationFileList(emergencyUserFileRespDTOList); |
| | | } |
| | | // 演练评价的人员 |
| | | List<EmergencyDrillEvaluationUserInfoDO> emergencyDrillEvaluationUserInfoDOList = emergencyDrillEvaluationUserInfoService.selectEmergencyDrillEvaluationUserByDrillEvaluationId(id); |
| | | List<EmergencyDrillEvaluationUserInfoDO> emergencyDrillEvaluationUserInfoDOList = emergencyDrillEvaluationUserInfoService.selectEmergencyDrillEvaluationUserByDrillEvaluationId(emergencyDrillEvaluationDetailRespDTO.getId()); |
| | | if (!CollectionUtils.isEmpty(emergencyDrillEvaluationUserInfoDOList)) { |
| | | List<EmergencyDrillEvaluationUserRespDTO> emergencyUserUserRespDTOList = BeanCopyUtils.copyBeanList(emergencyDrillEvaluationUserInfoDOList, EmergencyDrillEvaluationUserRespDTO.class); |
| | | emergencyDrillEvaluationDetailRespDTO.setEvaluationUserList(emergencyUserUserRespDTOList); |
| | | } |
| | | |
| | | |
| | | return new ResultVO<>(ResultCodes.OK, emergencyDrillEvaluationDetailRespDTO); |
| | | } |
| | |
| | | public ResultVO updateEmergencyDrillEvaluation(Long uid, EmergencyDrillEvaluationReqDTO emergencyDrillEvaluationReqDTO) { |
| | | Date nowDate = new Date(); |
| | | // 查询是否存在 |
| | | EmergencyDrillEvaluationInfoDetailDO emergencyDrillEvaluationInfoDetailDO = emergencyDrillEvaluationInfoService.selectEmergencyDrillEvaluationById(emergencyDrillEvaluationReqDTO.getId()); |
| | | EmergencyDrillEvaluationInfoDetailDO emergencyDrillEvaluationInfoDetailDO = emergencyDrillEvaluationInfoService.selectEmergencyDrillEvaluationByExecuteId(emergencyDrillEvaluationReqDTO.getDrillExecuteId()); |
| | | if (emergencyDrillEvaluationInfoDetailDO == null) { |
| | | throw new EmergencyException(EmergencyResultCodes.DRILL_EVALUATION_NOT_EXIST); |
| | | } else { |
| | |
| | | if (!CollectionUtils.isEmpty(emergencyDrillEvaluationReqDTO.getUserList())) { |
| | | updateEmergencyDrillEvaluationUser(uid, emergencyDrillEvaluationInfo.getId(), nowDate, emergencyDrillEvaluationReqDTO.getUserList()); |
| | | } |
| | | |
| | | // 修改实施表的评价状态 |
| | | emergencyDrillExecuteInfoService.updateStatusById(emergencyDrillEvaluationInfoDetailDO.getDrillExecuteId()); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencyDrillEvaluation(String ids) { |
| | | if (StringUtils.isBlank(ids)) { |
| | | public ResultVO batchDeleteEmergencyDrillEvaluation(Long[] ids) { |
| | | |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.DRILL_EVALUATION_NULL); |
| | | } else { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencyDrillEvaluation(Long.valueOf(id)); |
| | | }else{ |
| | | for (Long id : ids){ |
| | | deleteEmergencyDrillEvaluation(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | |
| | | private void deleteEmergencyDrillEvaluation(Long id) { |
| | | //查询是否存在 |
| | | EmergencyDrillEvaluationInfoDetailDO emergencyDrillEvaluationInfoDetailDO = emergencyDrillEvaluationInfoService.selectEmergencyDrillEvaluationById(id); |
| | | EmergencyDrillEvaluationInfoDetailDO emergencyDrillEvaluationInfoDetailDO = emergencyDrillEvaluationInfoService.selectEmergencyDrillEvaluationByExecuteId(id); |
| | | if (emergencyDrillEvaluationInfoDetailDO == null) { |
| | | throw new EmergencyException(EmergencyResultCodes.DRILL_EVALUATION_NOT_EXIST); |
| | | } else { |
| | |
| | | package com.gkhy.safePlatform.emergency.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.commons.enums.E; |
| | | 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.emergency.query.EmergencyDrillExecuteQuery; |
| | | import com.gkhy.safePlatform.emergency.query.db.EmergencyDrillExecuteDBQuery; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencyDrillExecuteService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.EmergencyDrillEvaluationInfoService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.EmergencyDrillExecuteInfoService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.EmergencyDrillExecuteUserInfoService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.EmergencyDrillPlanInfoService; |
| | |
| | | @Autowired |
| | | private EmergencyDrillPlanInfoService emergencyDrillPlanInfoService; |
| | | |
| | | @Autowired |
| | | private EmergencyDrillEvaluationInfoService emergencyDrillEvaluationInfoService; |
| | | |
| | | |
| | | @Override |
| | | public SearchResultVO<List<EmergencyDrillExecutePageRespDTO>> selectEmergencyDrillExecuteList(PageQuery<EmergencyDrillExecuteQuery> query) { |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | emergencyDrillExecuteInfo.setDelFlag(false); |
| | | emergencyDrillExecuteInfo.setCreateUid(uid); |
| | | emergencyDrillExecuteInfo.setGmtCreate(nowDate); |
| | | emergencyDrillExecuteInfo.setStatus(true); |
| | | emergencyDrillExecuteInfo.setStatus(false); |
| | | emergencyDrillExecuteInfoService.addEmergencyDrillExecute(emergencyDrillExecuteInfo); |
| | | |
| | | // 新增应急演练计划实施实际到场人员表 |
| | |
| | | addEmergencyDrillExecuteUser(uid, emergencyDrillExecuteInfo.getId(), nowDate, emergencyDrillExecuteReqDTO.getUserList()); |
| | | |
| | | } |
| | | // 新增评价表一行数据 |
| | | EmergencyDrillEvaluationInfo emergencyDrillEvaluationInfo = new EmergencyDrillEvaluationInfo(); |
| | | emergencyDrillEvaluationInfo.setDelFlag(false); |
| | | emergencyDrillEvaluationInfo.setCreateUid(uid); |
| | | emergencyDrillEvaluationInfo.setGmtCreate(nowDate); |
| | | emergencyDrillEvaluationInfo.setDrillExecuteId(emergencyDrillExecuteInfo.getId()); |
| | | emergencyDrillEvaluationInfoService.addEmergencyDrillEvaluation(emergencyDrillEvaluationInfo); |
| | | |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencyDrillExecute(String ids) { |
| | | if (StringUtils.isBlank(ids)) { |
| | | public ResultVO batchDeleteEmergencyDrillExecute(Long[] ids) { |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.DRILL_EXECUTE_NULL); |
| | | } else { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencyDrillExecute(Long.valueOf(id)); |
| | | }else{ |
| | | for (Long id : ids){ |
| | | deleteEmergencyDrillExecute(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | 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.EmergencyDrillPlanStatus; |
| | | import com.gkhy.safePlatform.emergency.enums.EmergencyResultCodes; |
| | | import com.gkhy.safePlatform.emergency.excepiton.EmergencyException; |
| | | import com.gkhy.safePlatform.emergency.model.dto.req.*; |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | emergencyDrillPlanInfo.setDelFlag(false); |
| | | emergencyDrillPlanInfo.setCreateUid(uid); |
| | | emergencyDrillPlanInfo.setGmtCreate(nowDate); |
| | | emergencyDrillPlanInfo.setStatus(EmergencyDrillPlanStatus.START.getStatus()); |
| | | emergencyDrillPlanInfoService.addEmergencyDrillPlan(emergencyDrillPlanInfo); |
| | | // 新增急演练计划附件表 |
| | | if (!CollectionUtils.isEmpty(emergencyDrillPlanReqDTO.getFileList())) { |
| | |
| | | List<EmergencyDrillPlanUserInfoDO> emergencyDrillPlanUserInfoDOList = emergencyDrillPlanUserInfoService.selectEmergencyDrillPlanUserByDrillPlanId(id); |
| | | if (!CollectionUtils.isEmpty(emergencyDrillPlanUserInfoDOList)) { |
| | | List<EmergencyDrillPlanUserRespDTO> emergencyUserUserRespDTOList = BeanCopyUtils.copyBeanList(emergencyDrillPlanUserInfoDOList, EmergencyDrillPlanUserRespDTO.class); |
| | | emergencyDrillPlanDetailRespDTO.setUserList(emergencyUserUserRespDTOList); |
| | | |
| | | List<EmergencyDrillPlanUserRespDTO> userList = emergencyUserUserRespDTOList.stream().filter(user -> user.getType()==1).collect(Collectors.toList()); |
| | | List<EmergencyDrillPlanUserRespDTO> chargeUserList = emergencyUserUserRespDTOList.stream().filter(user -> user.getType()==2).collect(Collectors.toList()); |
| | | |
| | | emergencyDrillPlanDetailRespDTO.setUserList(userList); |
| | | emergencyDrillPlanDetailRespDTO.setChargeUserList(chargeUserList); |
| | | } |
| | | // 查找对应的附件 |
| | | List<EmergencyDrillPlanFileInfoDO> emergencyDrillPlanFileInfoDOList = emergencyDrillPlanFileInfoService.selectEmergencyDrillPlanFileByDrillPlanId(id); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencyDrillPlan(String ids) { |
| | | if (StringUtils.isBlank(ids)) { |
| | | public ResultVO batchDeleteEmergencyDrillPlan(Long[] ids) { |
| | | |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.DRILL_PLAN_NULL); |
| | | } else { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencyDrillPlan(Long.valueOf(id)); |
| | | }else{ |
| | | for (Long id : ids){ |
| | | deleteEmergencyDrillPlan(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.emergency.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO addEmergencyPlanLog(Long uid, EmergencyPlanLogReqDTO emergencyPlanLogReqDTO) { |
| | | public ResultVO addEmergencyPlanLog(ContextCacheUser currentUser, EmergencyPlanLogReqDTO emergencyPlanLogReqDTO) { |
| | | Long uid = currentUser.getUid(); |
| | | String uname = currentUser.getRealName(); |
| | | // 判断请求中是否存在应急预案id |
| | | if (emergencyPlanLogReqDTO.getPlanId() == null) { |
| | | throw new EmergencyException(EmergencyResultCodes.PLAN_NULL); |
| | |
| | | emergencyPlanLogInfo.setGmtCreate(nowDate); |
| | | |
| | | emergencyPlanLogInfo.setUserUid(uid); |
| | | emergencyPlanLogInfo.setUserName(uname); |
| | | emergencyPlanLogInfo.setStartCreate(nowDate); |
| | | |
| | | emergencyPlanLogInfoService.addEmergencyPlanLog(emergencyPlanLogInfo); |
| | | |
| | | return new ResultVO<>(ResultCodes.OK); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencyPlanLog(String ids) { |
| | | if (StringUtils.isBlank(ids)) { |
| | | public ResultVO batchDeleteEmergencyPlanLog(Long[] ids) { |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.PLAN_LOG_NOT_EXIST); |
| | | } else { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencyPlanLog(Long.valueOf(id)); |
| | | }else{ |
| | | for (Long id : ids){ |
| | | deleteEmergencyPlanLog(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.emergency.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | 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.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service("emergencyPlanService") |
| | |
| | | @Autowired |
| | | private EmergencyPlanFileInfoService emergencyPlanFileInfoService; |
| | | |
| | | @Autowired |
| | | private EmergencyWorkApproveInfoService emergencyWorkApproveInfoService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | | @Override |
| | | public SearchResultVO<List<EmergencyPlanPageRespDTO>> selectEmergencyPlanList(PageQuery<EmergencyPlanQuery> query) { |
| | | public SearchResultVO<List<EmergencyPlanPageRespDTO>> selectEmergencyPlanList(Long uid , PageQuery<EmergencyPlanQuery> query) { |
| | | Long pageIndex = query.getPageIndex(); |
| | | Long pageSize = query.getPageSize(); |
| | | Page<EmergencyPlanInfoPageDO> page = new Page<>(pageIndex, pageSize); |
| | |
| | | if (query.getSearchParams() != null) { |
| | | BeanUtils.copyProperties(query.getSearchParams(), emergencyPlanDBQuery); |
| | | } |
| | | List<EmergencyPlanInfoPageDO> emergencyPlanListDoInfoList = emergencyPlanInfoService.selectEmergencyPlanList(page,emergencyPlanDBQuery); |
| | | List<EmergencyPlanPageRespDTO> respList = BeanCopyUtils.copyBeanList(emergencyPlanListDoInfoList, EmergencyPlanPageRespDTO.class); |
| | | List<EmergencyPlanInfoPageDO> emergencyPlanListDoInfoList = emergencyPlanInfoService.selectEmergencyPlanList(page, emergencyPlanDBQuery); |
| | | List<EmergencyPlanPageRespDTO> respList = BeanCopyUtils.copyBeanList(emergencyPlanListDoInfoList, EmergencyPlanPageRespDTO.class); |
| | | |
| | | // 判断审批人 |
| | | for (EmergencyPlanPageRespDTO emergencyPlanPageRespDTO :respList){ |
| | | |
| | | //获取对应的审批记录 |
| | | Integer type = ApproveStatus.EMERGENCY.getStatus(); |
| | | List<EmergencyWorkApproveInfoDetailDO> emergencyWorkApproveInfoDetailDOList = emergencyWorkApproveInfoService.selectWorkApproveByRelateTypeAndRelateId(type,emergencyPlanPageRespDTO.getId()); |
| | | |
| | | if (!CollectionUtils.isEmpty(emergencyWorkApproveInfoDetailDOList)) { |
| | | emergencyPlanPageRespDTO.setApproveId(emergencyWorkApproveInfoDetailDOList.get(0).getId()); |
| | | emergencyPlanPageRespDTO.setApproveStatus(emergencyWorkApproveInfoDetailDOList.get(0).getApproveStatus()); |
| | | emergencyPlanPageRespDTO.setApprovePersonId(emergencyWorkApproveInfoDetailDOList.get(0).getApprovePersonId()); |
| | | // 审批中 判断审批人是否人与当前登录人 |
| | | if (emergencyPlanPageRespDTO.getApproveStatus()!=null && emergencyPlanPageRespDTO.getApproveStatus()==2){ |
| | | emergencyPlanPageRespDTO.setCheckApprove(emergencyPlanPageRespDTO.getApprovePersonId().equals(uid)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize, page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | | ); |
| | | ); |
| | | } |
| | | |
| | | @Override |
| | |
| | | Date nowDate = new Date(); |
| | | // 新增应急预案 |
| | | EmergencyPlanInfo emergencyPlanInfo = new EmergencyPlanInfo(); |
| | | BeanUtils.copyProperties(emergencyPlanReqDTO,emergencyPlanInfo); |
| | | BeanUtils.copyProperties(emergencyPlanReqDTO, emergencyPlanInfo); |
| | | emergencyPlanInfo.setDelFlag(false); |
| | | emergencyPlanInfo.setCreateUid(uid); |
| | | emergencyPlanInfo.setGmtCreate(nowDate); |
| | | emergencyPlanInfo.setStatus(EmergencyPlanStatus.START.getStatus()); |
| | | emergencyPlanInfoService.addEmergencyPlan(emergencyPlanInfo); |
| | | // 新增应急预案区域表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getAreaList())){ |
| | | addEmergencyPlanArea(uid,emergencyPlanInfo.getId(),nowDate,emergencyPlanReqDTO.getAreaList()); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getAreaList())) { |
| | | addEmergencyPlanArea(uid, emergencyPlanInfo.getId(), nowDate, emergencyPlanReqDTO.getAreaList()); |
| | | } |
| | | // 新增应急预案适用部门表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getDeptList())){ |
| | | addEmergencyPlanDepartment(uid,emergencyPlanInfo.getId(),nowDate,emergencyPlanReqDTO.getDeptList()); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getDeptList())) { |
| | | addEmergencyPlanDepartment(uid, emergencyPlanInfo.getId(), nowDate, emergencyPlanReqDTO.getDeptList()); |
| | | } |
| | | // 新增应急预案附件表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getFileList())){ |
| | | addEmergencyPlanFile(uid,emergencyPlanInfo.getId(),nowDate,emergencyPlanReqDTO.getFileList()); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getFileList())) { |
| | | addEmergencyPlanFile(uid, emergencyPlanInfo.getId(), nowDate, emergencyPlanReqDTO.getFileList()); |
| | | } |
| | | // 新增应急预案应急队伍表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getTeamList())){ |
| | | addEmergencyPlanTeam(uid,emergencyPlanInfo.getId(),nowDate,emergencyPlanReqDTO.getTeamList()); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getTeamList())) { |
| | | addEmergencyPlanTeam(uid, emergencyPlanInfo.getId(), nowDate, emergencyPlanReqDTO.getTeamList()); |
| | | } |
| | | |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | |
| | | private void addEmergencyPlanArea(Long uid,Long planId, Date nowDate,List<EmergencyPlanAreaReqDTO> emergencyPlanAreaReqDTOList){ |
| | | List<EmergencyPlanAreaInfo> emergencyPlanAreaInfoList = BeanCopyUtils.copyBeanList(emergencyPlanAreaReqDTOList,EmergencyPlanAreaInfo.class); |
| | | emergencyPlanAreaInfoList.forEach(EmergencyPlanAreaInfo->{ |
| | | private void addEmergencyPlanArea(Long uid, Long planId, Date nowDate, List<EmergencyPlanAreaReqDTO> emergencyPlanAreaReqDTOList) { |
| | | List<EmergencyPlanAreaInfo> emergencyPlanAreaInfoList = BeanCopyUtils.copyBeanList(emergencyPlanAreaReqDTOList, EmergencyPlanAreaInfo.class); |
| | | emergencyPlanAreaInfoList.forEach(EmergencyPlanAreaInfo -> { |
| | | EmergencyPlanAreaInfo.setDelFlag(false); |
| | | EmergencyPlanAreaInfo.setCreateUid(uid); |
| | | EmergencyPlanAreaInfo.setGmtCreate(nowDate); |
| | | EmergencyPlanAreaInfo.setPlanId(planId); |
| | | }); |
| | | for (EmergencyPlanAreaInfo emergencyPlanAreaInfo : emergencyPlanAreaInfoList){ |
| | | for (EmergencyPlanAreaInfo emergencyPlanAreaInfo : emergencyPlanAreaInfoList) { |
| | | emergencyPlanAreaInfoService.addEmergencyPlanArea(emergencyPlanAreaInfo); |
| | | } |
| | | } |
| | | |
| | | private void addEmergencyPlanDepartment(Long uid,Long planId, Date nowDate,List<EmergencyPlanDepartmentReqDTO> emergencyPlanDepartmentReqDTOList){ |
| | | List<EmergencyPlanDepartmentInfo> emergencyPlanDepartmentInfoList = BeanCopyUtils.copyBeanList(emergencyPlanDepartmentReqDTOList,EmergencyPlanDepartmentInfo.class); |
| | | emergencyPlanDepartmentInfoList.forEach(EmergencyPlanDepartmentInfo->{ |
| | | private void addEmergencyPlanDepartment(Long uid, Long planId, Date nowDate, List<EmergencyPlanDepartmentReqDTO> emergencyPlanDepartmentReqDTOList) { |
| | | List<EmergencyPlanDepartmentInfo> emergencyPlanDepartmentInfoList = BeanCopyUtils.copyBeanList(emergencyPlanDepartmentReqDTOList, EmergencyPlanDepartmentInfo.class); |
| | | emergencyPlanDepartmentInfoList.forEach(EmergencyPlanDepartmentInfo -> { |
| | | EmergencyPlanDepartmentInfo.setDelFlag(false); |
| | | EmergencyPlanDepartmentInfo.setCreateUid(uid); |
| | | EmergencyPlanDepartmentInfo.setGmtCreate(nowDate); |
| | | EmergencyPlanDepartmentInfo.setPlanId(planId); |
| | | }); |
| | | for (EmergencyPlanDepartmentInfo emergencyPlanDepartmentInfo : emergencyPlanDepartmentInfoList){ |
| | | for (EmergencyPlanDepartmentInfo emergencyPlanDepartmentInfo : emergencyPlanDepartmentInfoList) { |
| | | emergencyPlanDepartmentInfoService.addEmergencyPlanDepartment(emergencyPlanDepartmentInfo); |
| | | } |
| | | } |
| | | |
| | | private void addEmergencyPlanFile(Long uid,Long planId, Date nowDate,List<EmergencyPlanFileReqDTO> emergencyPlanFileReqDTOList){ |
| | | List<EmergencyPlanFileInfo> emergencyPlanFileInfoList = BeanCopyUtils.copyBeanList(emergencyPlanFileReqDTOList,EmergencyPlanFileInfo.class); |
| | | emergencyPlanFileInfoList.forEach(EmergencyPlanFileInfo->{ |
| | | private void addEmergencyPlanFile(Long uid, Long planId, Date nowDate, List<EmergencyPlanFileReqDTO> emergencyPlanFileReqDTOList) { |
| | | List<EmergencyPlanFileInfo> emergencyPlanFileInfoList = BeanCopyUtils.copyBeanList(emergencyPlanFileReqDTOList, EmergencyPlanFileInfo.class); |
| | | emergencyPlanFileInfoList.forEach(EmergencyPlanFileInfo -> { |
| | | EmergencyPlanFileInfo.setDelFlag(false); |
| | | EmergencyPlanFileInfo.setCreateUid(uid); |
| | | EmergencyPlanFileInfo.setGmtCreate(nowDate); |
| | | EmergencyPlanFileInfo.setPlanId(planId); |
| | | }); |
| | | for (EmergencyPlanFileInfo emergencyPlanFileInfo : emergencyPlanFileInfoList){ |
| | | for (EmergencyPlanFileInfo emergencyPlanFileInfo : emergencyPlanFileInfoList) { |
| | | emergencyPlanFileInfoService.addEmergencyPlanFile(emergencyPlanFileInfo); |
| | | } |
| | | } |
| | | |
| | | private void addEmergencyPlanTeam(Long uid,Long planId, Date nowDate,List<EmergencyPlanTeamReqDTO> emergencyPlanTeamReqDTOList){ |
| | | List<EmergencyPlanTeamInfo> emergencyPlanTeamInfoList = BeanCopyUtils.copyBeanList(emergencyPlanTeamReqDTOList,EmergencyPlanTeamInfo.class); |
| | | emergencyPlanTeamInfoList.forEach(EmergencyPlanTeamInfo->{ |
| | | private void addEmergencyPlanTeam(Long uid, Long planId, Date nowDate, List<EmergencyPlanTeamReqDTO> emergencyPlanTeamReqDTOList) { |
| | | List<EmergencyPlanTeamInfo> emergencyPlanTeamInfoList = BeanCopyUtils.copyBeanList(emergencyPlanTeamReqDTOList, EmergencyPlanTeamInfo.class); |
| | | emergencyPlanTeamInfoList.forEach(EmergencyPlanTeamInfo -> { |
| | | EmergencyPlanTeamInfo.setDelFlag(false); |
| | | EmergencyPlanTeamInfo.setCreateUid(uid); |
| | | EmergencyPlanTeamInfo.setGmtCreate(nowDate); |
| | | EmergencyPlanTeamInfo.setPlanId(planId); |
| | | }); |
| | | for (EmergencyPlanTeamInfo emergencyPlanTeamInfo : emergencyPlanTeamInfoList){ |
| | | for (EmergencyPlanTeamInfo emergencyPlanTeamInfo : emergencyPlanTeamInfoList) { |
| | | emergencyPlanTeamInfoService.addEmergencyPlanTeam(emergencyPlanTeamInfo); |
| | | } |
| | | } |
| | |
| | | EmergencyPlanDetailRespDTO emergencyPlanDetailRespDTO = new EmergencyPlanDetailRespDTO(); |
| | | // 查询是否存在 |
| | | EmergencyPlanInfoDetailDO emergencyPlanInfoDetailDO = emergencyPlanInfoService.selectEmergencyPlanById(id); |
| | | if (emergencyPlanInfoDetailDO==null){ |
| | | if (emergencyPlanInfoDetailDO == null) { |
| | | throw new EmergencyException(EmergencyResultCodes.PLAN_NOT_EXIST); |
| | | }else{ |
| | | BeanUtils.copyProperties(emergencyPlanInfoDetailDO,emergencyPlanDetailRespDTO); |
| | | } else { |
| | | BeanUtils.copyProperties(emergencyPlanInfoDetailDO, emergencyPlanDetailRespDTO); |
| | | |
| | | // 查找对应的区域 |
| | | List<EmergencyPlanAreaInfoDO> emergencyPlanAreaInfoDOList = emergencyPlanAreaInfoService.selectEmergencyPlanAreaByPlanId(id); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanAreaInfoDOList)){ |
| | | List<EmergencyPlanAreaRespDTO> emergencyTeamFileRespDTOList = BeanCopyUtils.copyBeanList(emergencyPlanAreaInfoDOList , EmergencyPlanAreaRespDTO.class); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanAreaInfoDOList)) { |
| | | List<EmergencyPlanAreaRespDTO> emergencyTeamFileRespDTOList = BeanCopyUtils.copyBeanList(emergencyPlanAreaInfoDOList, EmergencyPlanAreaRespDTO.class); |
| | | emergencyPlanDetailRespDTO.setAreaList(emergencyTeamFileRespDTOList); |
| | | } |
| | | // 查找对应的适用部门 |
| | | List<EmergencyPlanDepartmentInfoDO> emergencyPlanDepartmentInfoDOList = emergencyPlanDepartmentInfoService.selectEmergencyPlanDepartmentByPlanId(id); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanDepartmentInfoDOList)){ |
| | | List<EmergencyPlanDepartmentRespDTO> emergencyTeamDepartmentRespDTOList = BeanCopyUtils.copyBeanList(emergencyPlanDepartmentInfoDOList , EmergencyPlanDepartmentRespDTO.class); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanDepartmentInfoDOList)) { |
| | | List<EmergencyPlanDepartmentRespDTO> emergencyTeamDepartmentRespDTOList = BeanCopyUtils.copyBeanList(emergencyPlanDepartmentInfoDOList, EmergencyPlanDepartmentRespDTO.class); |
| | | |
| | | Map<Long, String> deptPool = new HashMap<>(); |
| | | for (EmergencyPlanDepartmentRespDTO emergencyPlanDepartmentRespDTO : emergencyTeamDepartmentRespDTOList) { |
| | | if (!deptPool.containsKey(emergencyPlanDepartmentRespDTO.getDepartmentId())) { |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(emergencyPlanDepartmentRespDTO.getDepartmentId()); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | |
| | | deptPool.put(dep.getDepId(), dep.getDepName()); |
| | | } |
| | | } |
| | | } |
| | | String depName = deptPool.get(emergencyPlanDepartmentRespDTO.getDepartmentId()); |
| | | emergencyPlanDepartmentRespDTO.setDepartmentName(depName); |
| | | } |
| | | emergencyPlanDetailRespDTO.setDeptList(emergencyTeamDepartmentRespDTOList); |
| | | } |
| | | // 查找对应的应急队伍 |
| | | List<EmergencyPlanTeamInfoDO> emergencyPlanTeamInfoDOList = emergencyPlanTeamInfoService.selectEmergencyPlanTeamByPlanId(id); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanTeamInfoDOList)){ |
| | | List<EmergencyPlanTeamRespDTO> emergencyTeamTeamRespDTOList = BeanCopyUtils.copyBeanList(emergencyPlanTeamInfoDOList , EmergencyPlanTeamRespDTO.class); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanTeamInfoDOList)) { |
| | | List<EmergencyPlanTeamRespDTO> emergencyTeamTeamRespDTOList = BeanCopyUtils.copyBeanList(emergencyPlanTeamInfoDOList, EmergencyPlanTeamRespDTO.class); |
| | | emergencyPlanDetailRespDTO.setTeamList(emergencyTeamTeamRespDTOList); |
| | | } |
| | | // 查找对应的附件 |
| | | List<EmergencyPlanFileInfoDO> emergencyPlanFileInfoDOList = emergencyPlanFileInfoService.selectEmergencyPlanFileByPlanId(id); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanFileInfoDOList)){ |
| | | List<EmergencyPlanFileRespDTO> emergencyTeamFileRespDTOList = BeanCopyUtils.copyBeanList(emergencyPlanFileInfoDOList , EmergencyPlanFileRespDTO.class); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanFileInfoDOList)) { |
| | | List<EmergencyPlanFileRespDTO> emergencyTeamFileRespDTOList = BeanCopyUtils.copyBeanList(emergencyPlanFileInfoDOList, EmergencyPlanFileRespDTO.class); |
| | | emergencyPlanDetailRespDTO.setFileList(emergencyTeamFileRespDTOList); |
| | | } |
| | | return new ResultVO<>(ResultCodes.OK,emergencyPlanDetailRespDTO); |
| | | return new ResultVO<>(ResultCodes.OK, emergencyPlanDetailRespDTO); |
| | | } |
| | | } |
| | | |
| | |
| | | Date nowDate = new Date(); |
| | | // 查询是否存在 |
| | | EmergencyPlanInfoDetailDO emergencyPlanInfoDetailDO = emergencyPlanInfoService.selectEmergencyPlanById(emergencyPlanReqDTO.getId()); |
| | | if (emergencyPlanInfoDetailDO==null){ |
| | | if (emergencyPlanInfoDetailDO == null) { |
| | | throw new EmergencyException(EmergencyResultCodes.PLAN_NOT_EXIST); |
| | | }else{ |
| | | } else { |
| | | EmergencyPlanInfo emergencyPlanInfo = new EmergencyPlanInfo(); |
| | | BeanUtils.copyProperties(emergencyPlanReqDTO,emergencyPlanInfo); |
| | | BeanUtils.copyProperties(emergencyPlanReqDTO, emergencyPlanInfo); |
| | | emergencyPlanInfo.setUpdateUid(uid); |
| | | emergencyPlanInfo.setGmtModitify(nowDate); |
| | | emergencyPlanInfoService.updateEmergencyPlan(emergencyPlanInfo); |
| | | |
| | | // 更新应急预案区域表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getAreaList())){ |
| | | updateEmergencyPlanArea(uid,emergencyPlanInfo.getId(),nowDate,emergencyPlanReqDTO.getAreaList()); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getAreaList())) { |
| | | updateEmergencyPlanArea(uid, emergencyPlanInfo.getId(), nowDate, emergencyPlanReqDTO.getAreaList()); |
| | | } |
| | | // 更新应急预案适用部门表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getDeptList())){ |
| | | updateEmergencyPlanDepartment(uid,emergencyPlanInfo.getId(),nowDate,emergencyPlanReqDTO.getDeptList()); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getDeptList())) { |
| | | updateEmergencyPlanDepartment(uid, emergencyPlanInfo.getId(), nowDate, emergencyPlanReqDTO.getDeptList()); |
| | | } |
| | | // 更新应急预案附件表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getFileList())){ |
| | | updateEmergencyPlanFile(uid,emergencyPlanInfo.getId(),nowDate,emergencyPlanReqDTO.getFileList()); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getFileList())) { |
| | | updateEmergencyPlanFile(uid, emergencyPlanInfo.getId(), nowDate, emergencyPlanReqDTO.getFileList()); |
| | | } |
| | | // 更新应急预案应急队伍表 |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getTeamList())){ |
| | | updateEmergencyPlanTeam(uid,emergencyPlanInfo.getId(),nowDate,emergencyPlanReqDTO.getTeamList()); |
| | | if (!CollectionUtils.isEmpty(emergencyPlanReqDTO.getTeamList())) { |
| | | updateEmergencyPlanTeam(uid, emergencyPlanInfo.getId(), nowDate, emergencyPlanReqDTO.getTeamList()); |
| | | } |
| | | |
| | | return new ResultVO<>(ResultCodes.OK); |
| | |
| | | List<EmergencyPlanAreaInfo> addList = new ArrayList<>(); |
| | | //删除的区域集合(id) |
| | | List<Long> deleteList = new ArrayList<>(); |
| | | for (EmergencyPlanAreaReqDTO emergencyPlanAreaReqDTO : areaReqDTOList){ |
| | | for (EmergencyPlanAreaReqDTO emergencyPlanAreaReqDTO : areaReqDTOList) { |
| | | //如果不存在id则表示页面新增的附件 |
| | | if (emergencyPlanAreaReqDTO.getId() == null){ |
| | | if (emergencyPlanAreaReqDTO.getId() == null) { |
| | | EmergencyPlanAreaInfo emergencyPlanAreaInfo = new EmergencyPlanAreaInfo(); |
| | | BeanUtils.copyProperties(emergencyPlanAreaReqDTO,emergencyPlanAreaInfo); |
| | | BeanUtils.copyProperties(emergencyPlanAreaReqDTO, emergencyPlanAreaInfo); |
| | | emergencyPlanAreaInfo.setDelFlag(false); |
| | | emergencyPlanAreaInfo.setGmtCreate(nowDate); |
| | | emergencyPlanAreaInfo.setCreateUid(uid); |
| | |
| | | addList.add(emergencyPlanAreaInfo); |
| | | } |
| | | //如果存在id则判断页面是否删除 |
| | | else{ |
| | | else { |
| | | newIdsList.add(emergencyPlanAreaReqDTO.getId()); |
| | | } |
| | | } |
| | | for (Long oldId : oldIdsList){ |
| | | if (!newIdsList.contains(oldId)){ |
| | | for (Long oldId : oldIdsList) { |
| | | if (!newIdsList.contains(oldId)) { |
| | | deleteList.add(oldId); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(addList)){ |
| | | for (EmergencyPlanAreaInfo emergencyPlanAreaInfo : addList){ |
| | | if (!CollectionUtils.isEmpty(addList)) { |
| | | for (EmergencyPlanAreaInfo emergencyPlanAreaInfo : addList) { |
| | | emergencyPlanAreaInfoService.addEmergencyPlanArea(emergencyPlanAreaInfo); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(deleteList)){ |
| | | if (!CollectionUtils.isEmpty(deleteList)) { |
| | | emergencyPlanAreaInfoService.deleteEmergencyPlanAreaByIds(deleteList); |
| | | } |
| | | } |
| | |
| | | List<EmergencyPlanDepartmentInfo> addList = new ArrayList<>(); |
| | | //删除的区域集合(id) |
| | | List<Long> deleteList = new ArrayList<>(); |
| | | for (EmergencyPlanDepartmentReqDTO emergencyPlanDepartmentReqDTO : departmentReqDTOList){ |
| | | for (EmergencyPlanDepartmentReqDTO emergencyPlanDepartmentReqDTO : departmentReqDTOList) { |
| | | //如果不存在id则表示页面新增的附件 |
| | | if (emergencyPlanDepartmentReqDTO.getId() == null){ |
| | | if (emergencyPlanDepartmentReqDTO.getId() == null) { |
| | | EmergencyPlanDepartmentInfo emergencyPlanDepartmentInfo = new EmergencyPlanDepartmentInfo(); |
| | | BeanUtils.copyProperties(emergencyPlanDepartmentReqDTO,emergencyPlanDepartmentInfo); |
| | | BeanUtils.copyProperties(emergencyPlanDepartmentReqDTO, emergencyPlanDepartmentInfo); |
| | | emergencyPlanDepartmentInfo.setDelFlag(false); |
| | | emergencyPlanDepartmentInfo.setGmtCreate(nowDate); |
| | | emergencyPlanDepartmentInfo.setCreateUid(uid); |
| | |
| | | addList.add(emergencyPlanDepartmentInfo); |
| | | } |
| | | //如果存在id则判断页面是否删除 |
| | | else{ |
| | | else { |
| | | newIdsList.add(emergencyPlanDepartmentReqDTO.getId()); |
| | | } |
| | | } |
| | | for (Long oldId : oldIdsList){ |
| | | if (!newIdsList.contains(oldId)){ |
| | | for (Long oldId : oldIdsList) { |
| | | if (!newIdsList.contains(oldId)) { |
| | | deleteList.add(oldId); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(addList)){ |
| | | for (EmergencyPlanDepartmentInfo emergencyPlanDepartmentInfo : addList){ |
| | | if (!CollectionUtils.isEmpty(addList)) { |
| | | for (EmergencyPlanDepartmentInfo emergencyPlanDepartmentInfo : addList) { |
| | | emergencyPlanDepartmentInfoService.addEmergencyPlanDepartment(emergencyPlanDepartmentInfo); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(deleteList)){ |
| | | if (!CollectionUtils.isEmpty(deleteList)) { |
| | | emergencyPlanDepartmentInfoService.deleteEmergencyPlanDepartmentByIds(deleteList); |
| | | } |
| | | } |
| | |
| | | List<EmergencyPlanFileInfo> addList = new ArrayList<>(); |
| | | //删除的区域集合(id) |
| | | List<Long> deleteList = new ArrayList<>(); |
| | | for (EmergencyPlanFileReqDTO emergencyPlanFileReqDTO : fileReqDTOList){ |
| | | for (EmergencyPlanFileReqDTO emergencyPlanFileReqDTO : fileReqDTOList) { |
| | | //如果不存在id则表示页面新增的附件 |
| | | if (emergencyPlanFileReqDTO.getId() == null){ |
| | | if (emergencyPlanFileReqDTO.getId() == null) { |
| | | EmergencyPlanFileInfo emergencyPlanFileInfo = new EmergencyPlanFileInfo(); |
| | | BeanUtils.copyProperties(emergencyPlanFileReqDTO,emergencyPlanFileInfo); |
| | | BeanUtils.copyProperties(emergencyPlanFileReqDTO, emergencyPlanFileInfo); |
| | | emergencyPlanFileInfo.setDelFlag(false); |
| | | emergencyPlanFileInfo.setGmtCreate(nowDate); |
| | | emergencyPlanFileInfo.setCreateUid(uid); |
| | |
| | | addList.add(emergencyPlanFileInfo); |
| | | } |
| | | //如果存在id则判断页面是否删除 |
| | | else{ |
| | | else { |
| | | newIdsList.add(emergencyPlanFileReqDTO.getId()); |
| | | } |
| | | } |
| | | for (Long oldId : oldIdsList){ |
| | | if (!newIdsList.contains(oldId)){ |
| | | for (Long oldId : oldIdsList) { |
| | | if (!newIdsList.contains(oldId)) { |
| | | deleteList.add(oldId); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(addList)){ |
| | | for (EmergencyPlanFileInfo emergencyPlanFileInfo : addList){ |
| | | if (!CollectionUtils.isEmpty(addList)) { |
| | | for (EmergencyPlanFileInfo emergencyPlanFileInfo : addList) { |
| | | emergencyPlanFileInfoService.addEmergencyPlanFile(emergencyPlanFileInfo); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(deleteList)){ |
| | | if (!CollectionUtils.isEmpty(deleteList)) { |
| | | emergencyPlanFileInfoService.deleteEmergencyPlanFileByIds(deleteList); |
| | | } |
| | | } |
| | |
| | | List<EmergencyPlanTeamInfo> addList = new ArrayList<>(); |
| | | //删除的区域集合(id) |
| | | List<Long> deleteList = new ArrayList<>(); |
| | | for (EmergencyPlanTeamReqDTO emergencyPlanTeamReqDTO : teamReqDTOList){ |
| | | for (EmergencyPlanTeamReqDTO emergencyPlanTeamReqDTO : teamReqDTOList) { |
| | | //如果不存在id则表示页面新增的附件 |
| | | if (emergencyPlanTeamReqDTO.getId() == null){ |
| | | if (emergencyPlanTeamReqDTO.getId() == null) { |
| | | EmergencyPlanTeamInfo emergencyPlanTeamInfo = new EmergencyPlanTeamInfo(); |
| | | BeanUtils.copyProperties(emergencyPlanTeamReqDTO,emergencyPlanTeamInfo); |
| | | BeanUtils.copyProperties(emergencyPlanTeamReqDTO, emergencyPlanTeamInfo); |
| | | emergencyPlanTeamInfo.setDelFlag(false); |
| | | emergencyPlanTeamInfo.setGmtCreate(nowDate); |
| | | emergencyPlanTeamInfo.setCreateUid(uid); |
| | |
| | | addList.add(emergencyPlanTeamInfo); |
| | | } |
| | | //如果存在id则判断页面是否删除 |
| | | else{ |
| | | else { |
| | | newIdsList.add(emergencyPlanTeamReqDTO.getId()); |
| | | } |
| | | } |
| | | for (Long oldId : oldIdsList){ |
| | | if (!newIdsList.contains(oldId)){ |
| | | for (Long oldId : oldIdsList) { |
| | | if (!newIdsList.contains(oldId)) { |
| | | deleteList.add(oldId); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(addList)){ |
| | | for (EmergencyPlanTeamInfo emergencyPlanTeamInfo : addList){ |
| | | if (!CollectionUtils.isEmpty(addList)) { |
| | | for (EmergencyPlanTeamInfo emergencyPlanTeamInfo : addList) { |
| | | emergencyPlanTeamInfoService.addEmergencyPlanTeam(emergencyPlanTeamInfo); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(deleteList)){ |
| | | if (!CollectionUtils.isEmpty(deleteList)) { |
| | | emergencyPlanTeamInfoService.deleteEmergencyPlanTeamByIds(deleteList); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencyPlan(String ids) { |
| | | if (StringUtils.isBlank(ids)) { |
| | | public ResultVO batchDeleteEmergencyPlan(Long[] ids) { |
| | | |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.PLAN_NOT_EXIST); |
| | | } else { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencyPlan(Long.valueOf(id)); |
| | | }else{ |
| | | for (Long id : ids){ |
| | | deleteEmergencyPlan(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO updateAbolish(Long id, Boolean abolishStatus) { |
| | | emergencyPlanInfoService.updateAbolish(id,abolishStatus); |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | |
| | | private void deleteEmergencyPlan(Long id) { |
| | | //查询是否存在 |
| | | EmergencyPlanInfoDetailDO emergencyPlanInfoDetailDO = emergencyPlanInfoService.selectEmergencyPlanById(id); |
| | | if (emergencyPlanInfoDetailDO==null){ |
| | | if (emergencyPlanInfoDetailDO == null) { |
| | | throw new EmergencyException(EmergencyResultCodes.PLAN_NOT_EXIST); |
| | | }else{ |
| | | } else { |
| | | Long PlanId = emergencyPlanInfoDetailDO.getId(); |
| | | emergencyPlanInfoService.deleteEmergencyPlan(PlanId); |
| | | //删除区域 |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencySuppliesInspect(String ids) { |
| | | if (StringUtils.isBlank(ids)) { |
| | | public ResultVO batchDeleteEmergencySuppliesInspect(Long[] ids) { |
| | | |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.SUPPLIES_INSPECT_NULL); |
| | | } else { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencySuppliesInspect(Long.valueOf(id)); |
| | | }else{ |
| | | for (Long id : ids){ |
| | | deleteEmergencySuppliesInspect(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencySuppliesMaintain(String ids) { |
| | | if (StringUtils.isBlank(ids)) { |
| | | public ResultVO batchDeleteEmergencySuppliesMaintain(Long[] ids) { |
| | | |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.SUPPLIES_MAINTAIN_NULL); |
| | | } else { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencySuppliesMaintain(Long.valueOf(id)); |
| | | }else{ |
| | | for (Long id : ids){ |
| | | deleteEmergencySuppliesMaintain(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.emergency.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | 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.model.dto.resp.*; |
| | | import com.gkhy.safePlatform.emergency.query.EmergencySuppliesQuery; |
| | | import com.gkhy.safePlatform.emergency.query.db.EmergencySuppliesDBQuery; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencySuppliesMaintainService; |
| | | import com.gkhy.safePlatform.emergency.service.EmergencySuppliesService; |
| | | import com.gkhy.safePlatform.emergency.service.baseService.*; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service("emergencySuppliesService") |
| | | public class EmergencySuppliesServiceImpl implements EmergencySuppliesService { |
| | | |
| | | @Autowired |
| | | private EmergencySuppliesInfoService emergencySuppliesInfoService; |
| | | |
| | | @Autowired |
| | | private EmergencySuppliesInspectInfoService emergencySuppliesInspectInfoService; |
| | | |
| | | @Autowired |
| | | private EmergencySuppliesInspectUserInfoService emergencySuppliesInspectUserInfoService; |
| | | |
| | | @Autowired |
| | | private EmergencySuppliesMaintainInfoService emergencySuppliesMaintainInfoService; |
| | | |
| | | @Autowired |
| | | private EmergencySuppliesMaintainUserInfoService emergencySuppliesMaintainUserInfoService; |
| | | |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | | |
| | | @Override |
| | |
| | | List<EmergencySuppliesInfoPageDO> emergencySuppliesListDoInfoList = emergencySuppliesInfoService.selectEmergencySuppliesList(page,emergencySuppliesDBQuery); |
| | | List<EmergencySuppliesPageRespDTO> respList = BeanCopyUtils.copyBeanList(emergencySuppliesListDoInfoList, EmergencySuppliesPageRespDTO.class); |
| | | |
| | | Map<Long, String> depPool = new HashMap<>(); |
| | | |
| | | respList.forEach(AccidentExpressPageRespDTO ->{ |
| | | // 设置部门名称 |
| | | if (!depPool.containsKey(AccidentExpressPageRespDTO.getDepartmentId())) { |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(AccidentExpressPageRespDTO.getDepartmentId()); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | |
| | | depPool.put(dep.getDepId(), dep.getDepName()); |
| | | } |
| | | }} |
| | | |
| | | String depName = depPool.get(AccidentExpressPageRespDTO.getDepartmentId()); |
| | | AccidentExpressPageRespDTO.setDeptName(depName); |
| | | }); |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | throw new EmergencyException(EmergencyResultCodes.SUPPLIES_NOT_EXIST); |
| | | }else{ |
| | | BeanUtils.copyProperties(emergencySuppliesInfoDetailDO,emergencySuppliesDetailRespDTO); |
| | | |
| | | // 查找检查记录 |
| | | List<EmergencySuppliesInspectInfoDetailDO> inspectDetailDOList = emergencySuppliesInspectInfoService.selectEmergencySuppliesInspectBySuppliesId(emergencySuppliesDetailRespDTO.getId()); |
| | | if (!CollectionUtils.isEmpty(inspectDetailDOList)){ |
| | | List<EmergencySuppliesInspectDetailRespDTO> inspectList = BeanCopyUtils.copyBeanList(inspectDetailDOList,EmergencySuppliesInspectDetailRespDTO.class); |
| | | // 创建人 |
| | | for (EmergencySuppliesInspectDetailRespDTO emergencySuppliesInspectDetailRespDTO :inspectList){ |
| | | List<EmergencySuppliesInspectUserInfoDO> inspectUserDOList = emergencySuppliesInspectUserInfoService.selectEmergencySuppliesInspectUserBySuppliesInspectId(emergencySuppliesInspectDetailRespDTO.getId()); |
| | | if (!CollectionUtils.isEmpty(inspectUserDOList)){ |
| | | List<EmergencySuppliesInspectUserRespDTO> inspectUserList = BeanCopyUtils.copyBeanList(inspectUserDOList,EmergencySuppliesInspectUserRespDTO.class); |
| | | emergencySuppliesInspectDetailRespDTO.setUserList(inspectUserList); |
| | | } |
| | | } |
| | | emergencySuppliesDetailRespDTO.setInspectList(inspectList); |
| | | } |
| | | // 查找保养记录 |
| | | List<EmergencySuppliesMaintainInfoDetailDO> maintainDetailDOList = emergencySuppliesMaintainInfoService.selectEmergencySuppliesMaintainBySuppliesId(emergencySuppliesDetailRespDTO.getId()); |
| | | if (!CollectionUtils.isEmpty(maintainDetailDOList)){ |
| | | List<EmergencySuppliesMaintainDetailRespDTO> maintainList = BeanCopyUtils.copyBeanList(maintainDetailDOList,EmergencySuppliesMaintainDetailRespDTO.class); |
| | | // 创建人 |
| | | for (EmergencySuppliesMaintainDetailRespDTO emergencySuppliesMaintainDetailRespDTO :maintainList){ |
| | | List<EmergencySuppliesMaintainUserInfoDO> maintainUserDOList = emergencySuppliesMaintainUserInfoService.selectEmergencySuppliesMaintainUserBySuppliesMaintainId(emergencySuppliesMaintainDetailRespDTO.getId()); |
| | | if (!CollectionUtils.isEmpty(maintainUserDOList)){ |
| | | List<EmergencySuppliesMaintainUserRespDTO> maintainUserList = BeanCopyUtils.copyBeanList(maintainUserDOList,EmergencySuppliesMaintainUserRespDTO.class); |
| | | emergencySuppliesMaintainDetailRespDTO.setUserList(maintainUserList); |
| | | } |
| | | } |
| | | emergencySuppliesDetailRespDTO.setMaintainList(maintainList); |
| | | } |
| | | |
| | | return new ResultVO<>(ResultCodes.OK,emergencySuppliesDetailRespDTO); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencySupplies(String ids) { |
| | | if (StringUtils.isBlank(ids)) { |
| | | public ResultVO batchDeleteEmergencySupplies( Long[] ids) { |
| | | |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.SUPPLIES_NULL); |
| | | } else { |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencySupplies(Long.valueOf(id)); |
| | | }else{ |
| | | for (Long id : ids){ |
| | | deleteEmergencySupplies(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | }else{ |
| | | Long SuppliesId = emergencySuppliesInfoDetailDO.getId(); |
| | | emergencySuppliesInfoService.deleteEmergencySupplies(SuppliesId); |
| | | |
| | | // 删除保养记录 |
| | | emergencySuppliesMaintainInfoService.deleteBySuppliesId(id); |
| | | // 删除检查记录 |
| | | emergencySuppliesInspectInfoService.deleteBySuppliesId(id); |
| | | |
| | | } |
| | | } |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO addEmergencyTeam(Long uid, EmergencyTeamReqDTO emergencyTeamReqDTO) { |
| | | public ResultVO<EmergencyTeamDetailRespDTO> addEmergencyTeam(Long uid, EmergencyTeamReqDTO emergencyTeamReqDTO) { |
| | | //必填项验证 |
| | | checkRequired(emergencyTeamReqDTO); |
| | | |
| | |
| | | if (!CollectionUtils.isEmpty(emergencyTeamReqDTO.getMemberList())){ |
| | | addEmergencyTeamMember(emergencyTeamInfo.getId(),uid,nowDate,emergencyTeamReqDTO.getMemberList()); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | EmergencyTeamDetailRespDTO emergencyTeamDetailRespDTO = new EmergencyTeamDetailRespDTO(); |
| | | BeanUtils.copyProperties(emergencyTeamInfo,emergencyTeamDetailRespDTO); |
| | | return new ResultVO<>(ResultCodes.OK,emergencyTeamDetailRespDTO); |
| | | } |
| | | |
| | | private void addEmergencyTeamFile(Long teamId ,Long uid , Date nowDate , List<EmergencyTeamFileReqDTO> emergencyTeamFileReqDTOList){ |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteEmergencyTeam(String ids) { |
| | | if (StringUtils.isBlank(ids)){ |
| | | public ResultVO batchDeleteEmergencyTeam(Long[] ids) { |
| | | if (ids == null || ids.length==0){ |
| | | throw new EmergencyException(EmergencyResultCodes.TEAM_NULL); |
| | | }else{ |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteEmergencyTeam(Long.valueOf(id)); |
| | | for (Long id : ids){ |
| | | deleteEmergencyTeam(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.emergency.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | 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.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | | import com.gkhy.safePlatform.emergency.entity.*; |
| | | 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.EmergencyWorkApproveReqDTO; |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO addWorkApprove(Long uid, EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO) { |
| | | public ResultVO addWorkApprove(ContextCacheUser currentUser, EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO) { |
| | | |
| | | // 业务类型 |
| | | if (EmergencyWorkApproveReqDTO.getRelateType()==null){ |
| | | throw new EmergencyException(EmergencyResultCodes.APPROVE_RELATE_ID_NULL); |
| | | } |
| | | // 业务主表id |
| | | if (EmergencyWorkApproveReqDTO.getRelateId()==null){ |
| | | throw new EmergencyException(EmergencyResultCodes.APPROVE_RELATE_TYPE_NULL); |
| | | } |
| | | // 审批人 |
| | | if (EmergencyWorkApproveReqDTO.getApprovePersonId()==null){ |
| | | throw new EmergencyException(EmergencyResultCodes.APPROVE_PERSON_NULL); |
| | | } |
| | | // 审批状态 |
| | | if (EmergencyWorkApproveReqDTO.getApproveStatus()==null){ |
| | | throw new EmergencyException(EmergencyResultCodes.APPROVE_STATUS_NULL); |
| | | } |
| | | |
| | | |
| | | Date nowDate = new Date(); |
| | | //1.新增应急队伍 |
| | | Long uid = currentUser.getUid(); |
| | | String uName = currentUser.getRealName(); |
| | | //1.新增应急审批 |
| | | EmergencyWorkApproveInfo EmergencyWorkApproveInfo = new EmergencyWorkApproveInfo(); |
| | | BeanUtils.copyProperties(EmergencyWorkApproveReqDTO, EmergencyWorkApproveInfo); |
| | | EmergencyWorkApproveInfo.setDelFlag(false); |
| | | EmergencyWorkApproveInfo.setCreateUid(uid); |
| | | EmergencyWorkApproveInfo.setGmtCreate(nowDate); |
| | | EmergencyWorkApproveInfo.setApproveStatus(ApproveStatus.NOT_APPROVE.getStatus()); |
| | | EmergencyWorkApproveInfo.setSubmitPersonId(uid); |
| | | EmergencyWorkApproveInfo.setSubmitPersonName(uName); |
| | | EmergencyWorkApproveInfo.setSort(1); |
| | | workApproveInfoService.addWorkApprove(EmergencyWorkApproveInfo); |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO<EmergencyWorkApproveDetailRespDTO> getWorkApproveById(Long id) { |
| | | public ResultVO updateWorkApprove(ContextCacheUser currentUser, EmergencyWorkApproveReqDTO emergencyWorkApproveReqDTO) { |
| | | |
| | | EmergencyWorkApproveInfoDetailDO EmergencyWorkApproveInfoDetailDO = workApproveInfoService.selectWorkApproveById(id); |
| | | EmergencyWorkApproveDetailRespDTO emergencyWorkApproveDetailRespDTO = new EmergencyWorkApproveDetailRespDTO(); |
| | | BeanUtils.copyProperties(EmergencyWorkApproveInfoDetailDO, emergencyWorkApproveDetailRespDTO); |
| | | Date nowDate = new Date(); |
| | | Long uid = currentUser.getUid(); |
| | | String uName = currentUser.getRealName(); |
| | | // 更新原审批记录 |
| | | EmergencyWorkApproveInfo emergencyWorkApproveInfo = new EmergencyWorkApproveInfo(); |
| | | emergencyWorkApproveInfo.setId(emergencyWorkApproveReqDTO.getId()); |
| | | emergencyWorkApproveInfo.setUpdateUid(uid); |
| | | emergencyWorkApproveInfo.setGmtModitify(nowDate); |
| | | emergencyWorkApproveInfo.setApproveStatus(emergencyWorkApproveReqDTO.getApproveStatus()); |
| | | emergencyWorkApproveInfo.setApproveResult(emergencyWorkApproveReqDTO.getApproveResult()); |
| | | emergencyWorkApproveInfo.setApproveMemo(emergencyWorkApproveReqDTO.getApproveMemo()); |
| | | workApproveInfoService.updateWorkApprove(emergencyWorkApproveInfo); |
| | | |
| | | return new ResultVO<>(ResultCodes.OK, emergencyWorkApproveDetailRespDTO); |
| | | //新增下级审批记录 |
| | | if (emergencyWorkApproveReqDTO.getApproveStatus() == 2){ |
| | | EmergencyWorkApproveInfo newEmergencyWorkApproveInfo = new EmergencyWorkApproveInfo(); |
| | | BeanUtils.copyProperties(emergencyWorkApproveReqDTO,newEmergencyWorkApproveInfo); |
| | | |
| | | newEmergencyWorkApproveInfo.setId(null); |
| | | newEmergencyWorkApproveInfo.setDelFlag(false); |
| | | newEmergencyWorkApproveInfo.setCreateUid(uid); |
| | | newEmergencyWorkApproveInfo.setGmtCreate(nowDate); |
| | | newEmergencyWorkApproveInfo.setSubmitPersonId(uid); |
| | | newEmergencyWorkApproveInfo.setSubmitPersonName(uName); |
| | | newEmergencyWorkApproveInfo.setApproveResult(null); |
| | | newEmergencyWorkApproveInfo.setApproveMemo(null); |
| | | newEmergencyWorkApproveInfo.setSort(newEmergencyWorkApproveInfo.getSort()+1); |
| | | workApproveInfoService.addWorkApprove(newEmergencyWorkApproveInfo); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO updateWorkApprove(Long uid, EmergencyWorkApproveReqDTO EmergencyWorkApproveReqDTO) { |
| | | Date nowDate = new Date(); |
| | | EmergencyWorkApproveInfo EmergencyWorkApproveInfo = new EmergencyWorkApproveInfo(); |
| | | BeanUtils.copyProperties(EmergencyWorkApproveReqDTO, EmergencyWorkApproveInfo); |
| | | EmergencyWorkApproveInfo.setUpdateUid(uid); |
| | | EmergencyWorkApproveInfo.setGmtModitify(nowDate); |
| | | workApproveInfoService.updateWorkApprove(EmergencyWorkApproveInfo); |
| | | return new ResultVO(ResultCodes.OK); |
| | | public ResultVO<EmergencyWorkApproveDetailRespDTO> getWorkApproveById(Long id) { |
| | | EmergencyWorkApproveInfoDetailDO EmergencyWorkApproveInfoDetailDO = workApproveInfoService.selectWorkApproveById(id); |
| | | if (EmergencyWorkApproveInfoDetailDO==null){ |
| | | throw new EmergencyException(EmergencyResultCodes.APPROVE_NOT_EXIST); |
| | | } |
| | | EmergencyWorkApproveDetailRespDTO emergencyWorkApproveDetailRespDTO = new EmergencyWorkApproveDetailRespDTO(); |
| | | BeanUtils.copyProperties(EmergencyWorkApproveInfoDetailDO, emergencyWorkApproveDetailRespDTO); |
| | | return new ResultVO<>(ResultCodes.OK, emergencyWorkApproveDetailRespDTO); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteWorkApprove(String ids) { |
| | | if (!StringUtils.isBlank(ids)) { |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyDrillEvaluationList" resultMap="emergencyDrillEvaluationInfoPageDOResult"> |
| | | SELECT |
| | | a.id, |
| | | c.drill_name AS drillName, |
| | | c.drill_address AS drillAddress, |
| | | c.drill_way AS drillWay, |
| | | c.drill_level AS drillLevel, |
| | | c.drill_plan_date AS drillPlanDate, |
| | | b.`drill_record_date` AS drillRecordDate |
| | | FROM |
| | | emergency_drill_evaluation a |
| | | LEFT JOIN emergency_drill_execute b ON a.drill_execute_id = b.id |
| | | LEFT JOIN emergency_drill_plan c ON b.drill_plan_id = c.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | SELECT |
| | | a.id, |
| | | a.drill_execute_id, |
| | | c.drill_name AS drillName, |
| | | c.drill_address AS drillAddress, |
| | | c.drill_way AS drillWay, |
| | | c.drill_level AS drillLevel, |
| | | c.drill_plan_date AS drillPlanDate, |
| | | b.`drill_record_date` AS drillRecordDate, |
| | | d.`name` AS emergencyPlanName |
| | | FROM |
| | | emergency_drill_evaluation a |
| | | LEFT JOIN emergency_drill_execute b ON a.drill_execute_id = b.id |
| | | LEFT JOIN emergency_drill_plan c ON b.drill_plan_id = c.id |
| | | LEFT JOIN emergency_plan d ON c.plan_id = d.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | |
| | | </select> |
| | | |
| | | <insert id="addEmergencyDrillEvaluation" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyDrillEvaluationInfo" |
| | |
| | | <result column="modify_content" property="modifyContent"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyDrillEvaluationById" resultMap="emergencyDrillEvaluationInfoDetailDOResult"> |
| | | <select id="selectEmergencyDrillEvaluationByExecuteId" resultMap="emergencyDrillEvaluationInfoDetailDOResult"> |
| | | SELECT |
| | | a.id, |
| | | a.`drill_execute_id`, |
| | |
| | | a.modify_content, |
| | | b.drill_record_date AS drillRecordDate, |
| | | b.record_user_uid AS recordUserUid, |
| | | b.record_user_name AS recordUserName, |
| | | b.process_desc AS processDesc, |
| | | b.drill_plan_id AS drillPlanId, |
| | | c.making_plan_date AS makingPlanDate, |
| | | c.drill_plan_date AS drillPlanDate, |
| | | c.making_user_uid AS makingUserUid, |
| | | c.making_user_name AS makingUserName, |
| | | c.making_department_id AS makingDepartmentId, |
| | | c.department_id AS departmentId, |
| | | c.drill_expense AS drillExpense, |
| | |
| | | c.drill_way AS drillWay, |
| | | c.insurance_measures AS insuranceMeasures, |
| | | c.remark AS remark, |
| | | c.purpose AS purpose |
| | | c.purpose AS purpose, |
| | | d.`name` AS emergencyPlanName |
| | | FROM |
| | | emergency_drill_evaluation a |
| | | LEFT JOIN emergency_drill_execute b ON a.drill_execute_id = b.id |
| | | LEFT JOIN emergency_drill_plan c ON b.drill_plan_id = c.id |
| | | LEFT JOIN emergency_plan d ON c.plan_id = d.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | AND a.id = #{id} |
| | | AND a.drill_execute_id = #{id} |
| | | </select> |
| | | |
| | | <update id="updateEmergencyDrillEvaluation" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyDrillEvaluationInfo"> |
| | |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="drillEvaluationId != null ">drill_evaluation_id,</if> |
| | | <if test="userUid != null ">user_uid,</if> |
| | | <if test="userName != null and userName != ''">user_name,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null ">#{id},</if> |
| | |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="drillEvaluationId != null ">#{drillEvaluationId},</if> |
| | | <if test="userUid != null ">#{userUid},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="drill_evaluation_id" property="drillEvaluationId" /> |
| | | <result column="user_uid" property="userUid" /> |
| | | <result column="user_name" property="userName" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyDrillEvaluationUserByDrillEvaluationId" resultMap="emergencyDrillEvaluationUserInfoDOResult"> |
| | | select id,`drill_evaluation_id`,`user_uid` from emergency_drill_evaluation_user where del_flag = 0 and drill_evaluation_id = #{drillEvaluationId} |
| | | select id,`drill_evaluation_id`,`user_uid`,user_name from emergency_drill_evaluation_user where del_flag = 0 and drill_evaluation_id = #{drillEvaluationId} |
| | | </select> |
| | | |
| | | <update id = "deleteEmergencyDrillEvaluationUserByIds" > |
| | |
| | | <select id="selectEmergencyDrillExecuteList" resultMap="emergencyDrillExecuteInfoPageDOResult"> |
| | | SELECT |
| | | a.id, |
| | | a.drill_plan_id, |
| | | b.drill_name as drillName, |
| | | b.drill_address as drillAddress, |
| | | b.drill_way as drillWay, |
| | |
| | | LEFT JOIN emergency_plan c ON b.plan_id = c.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | <if test="query.status != null">and a.status = #{query.status}</if> |
| | | </select> |
| | | |
| | | <insert id="addEmergencyDrillExecute" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyDrillExecuteInfo" |
| | |
| | | <if test="drillRecordDate != null ">drill_record_date,</if> |
| | | <if test="drillPlanId != null ">drill_plan_id,</if> |
| | | <if test="recordUserUid != null ">record_user_uid,</if> |
| | | <if test="recordUserName != null and recordUserName != ''">`record_user_name`,</if> |
| | | <if test="processDesc != null and processDesc != ''">`process_desc`,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="drillRecordDate != null ">#{drillRecordDate},</if> |
| | | <if test="drillPlanId != null ">#{drillPlanId},</if> |
| | | <if test="recordUserUid != null ">#{recordUserUid},</if> |
| | | <if test="recordUserName != null and recordUserName != ''">#{recordUserName},</if> |
| | | <if test="processDesc != null and processDesc != ''">#{processDesc},</if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <result column="drill_record_date" property="drillRecordDate"/> |
| | | <result column="drill_plan_id" property="drillPlanId"/> |
| | | <result column="record_user_uid" property="recordUserUid"/> |
| | | <result column="record_user_name" property="recordUserName"/> |
| | | <result column="process_desc" property="processDesc"/> |
| | | </resultMap> |
| | | |
| | |
| | | a.`drill_record_date`, |
| | | a.`drill_plan_id`, |
| | | a.`record_user_uid`, |
| | | a.record_user_name, |
| | | a.process_desc, |
| | | b.drill_name AS drillName |
| | | FROM |
| | |
| | | <if test="drillRecordDate != null ">drill_record_date=#{drillRecordDate},</if> |
| | | <if test="drillPlanId != null ">drill_plan_id=#{drillPlanId},</if> |
| | | <if test="recordUserUid != null ">record_user_uid=#{recordUserUid},</if> |
| | | <if test="recordUserName != null and recordUserName != ''">record_user_name = #{recordUserName},</if> |
| | | <if test="processDesc != null and processDesc != ''">process_desc=#{processDesc},</if> |
| | | |
| | | </trim> |
| | |
| | | <update id="deleteEmergencyDrillExecute"> |
| | | update emergency_drill_execute set del_flag = 1 where id = #{id} |
| | | </update> |
| | | |
| | | <update id="updateStatusById"> |
| | | update emergency_drill_execute set status = 1 where id = #{drillExecuteId} |
| | | </update> |
| | | </mapper> |
| | |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="drillExecuteId != null ">drill_execute_id,</if> |
| | | <if test="userUid != null ">user_uid,</if> |
| | | <if test="userName != null and userName != ''">`user_name`,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null ">#{id},</if> |
| | |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="drillExecuteId != null ">#{drillExecuteId},</if> |
| | | <if test="userUid != null ">#{userUid},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="drill_execute_id" property="drillExecuteId" /> |
| | | <result column="user_uid" property="userUid" /> |
| | | <result column="user_name" property="userName" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyDrillExecuteUserByDrillExecuteId" resultMap="emergencyDrillExecuteUserInfoDOResult"> |
| | | select id,`drill_execute_id`,`user_uid` from emergency_drill_execute_user where del_flag = 0 and drill_execute_id = #{drillExecuteId} |
| | | select id,`drill_execute_id`,`user_uid`,`user_name` from emergency_drill_execute_user where del_flag = 0 and drill_execute_id = #{drillExecuteId} |
| | | </select> |
| | | |
| | | <update id = "deleteEmergencyDrillExecuteUserByIds" > |
| | |
| | | <if test="makingPlanDate != null ">making_plan_date,</if> |
| | | <if test="drillPlanDate != null ">drill_plan_date,</if> |
| | | <if test="makingUserUid != null ">making_user_uid,</if> |
| | | <if test="makingUserName != null and makingUserName != ''">`making_user_name`,</if> |
| | | <if test="makingDepartmentId != null ">making_department_id,</if> |
| | | <if test="planId != null ">plan_id,</if> |
| | | <if test="departmentId != null ">department_id,</if> |
| | |
| | | <if test="makingPlanDate != null ">#{makingPlanDate},</if> |
| | | <if test="drillPlanDate != null ">#{drillPlanDate},</if> |
| | | <if test="makingUserUid != null ">#{makingUserUid},</if> |
| | | <if test="makingUserName != null and makingUserName != ''">#{makingUserName},</if> |
| | | <if test="makingDepartmentId != null ">#{makingDepartmentId},</if> |
| | | <if test="planId != null ">#{planId},</if> |
| | | <if test="departmentId != null ">#{departmentId},</if> |
| | |
| | | <result column="making_plan_date" property="makingPlanDate"/> |
| | | <result column="drill_plan_date" property="drillPlanDate"/> |
| | | <result column="making_user_uid" property="makingUserUid"/> |
| | | <result column="making_user_name" property="makingUserName"/> |
| | | <result column="making_department_id" property="makingDepartmentId"/> |
| | | <result column="plan_id" property="planId"/> |
| | | <result column="department_id" property="departmentId"/> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyDrillPlanById" resultMap="emergencyDrillPlanInfoDetailDOResult"> |
| | | select id ,`status`,`gmt_moditify`,`making_plan_date`,`drill_plan_date`,making_user_uid ,making_department_id ,plan_id ,department_id, |
| | | drill_expense ,drill_name ,drill_address ,drill_way ,drill_level ,insurance_measures ,remark ,purpose |
| | | from emergency_drill_plan |
| | | where del_flag = 0 and id = #{id} |
| | | SELECT |
| | | a.id, |
| | | a.`status`, |
| | | a.`gmt_moditify`, |
| | | a.`making_plan_date`, |
| | | a.`drill_plan_date`, |
| | | a.making_user_uid, |
| | | a.making_user_name, |
| | | a.making_department_id, |
| | | a.plan_id, |
| | | a.department_id, |
| | | a.drill_expense, |
| | | a.drill_name, |
| | | a.drill_address, |
| | | a.drill_way, |
| | | a.drill_level, |
| | | a.insurance_measures, |
| | | a.remark, |
| | | a.purpose, |
| | | b.`name` AS planName |
| | | FROM |
| | | emergency_drill_plan a |
| | | LEFT JOIN emergency_plan b ON a.plan_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | AND a.id = #{id} |
| | | </select> |
| | | |
| | | <update id="updateEmergencyDrillPlan" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyDrillPlanInfo"> |
| | |
| | | <if test="makingPlanDate != null ">making_plan_date=#{makingPlanDate},</if> |
| | | <if test="drillPlanDate != null ">drill_plan_date=#{drillPlanDate},</if> |
| | | <if test="makingUserUid != null ">making_user_uid=#{makingUserUid},</if> |
| | | <if test="makingUserName != null and makingUserName != ''">making_user_name=#{makingUserName},</if> |
| | | <if test="makingDepartmentId != null ">making_department_id=#{makingDepartmentId},</if> |
| | | <if test="planId != null ">plan_id=#{planId},</if> |
| | | <if test="departmentId != null ">department_id=#{departmentId},</if> |
| | |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="drillPlanId != null ">drill_plan_id,</if> |
| | | <if test="userUid != null ">user_uid,</if> |
| | | <if test="userName != null and userName != ''">user_name,</if> |
| | | <if test="type != null ">type</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="drillPlanId != null ">#{drillPlanId},</if> |
| | | <if test="userUid != null ">#{userUid},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | | <if test="type != null ">#{type}</if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="drill_plan_id" property="drillPlanId" /> |
| | | <result column="user_uid" property="userUid" /> |
| | | <result column="user_name" property="userName" /> |
| | | <result column="type" property="type" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyDrillPlanUserByDrillPlanId" resultMap="emergencyDrillPlanUserInfoDOResult"> |
| | | select id,`drill_plan_id`,`user_uid`,`type` from emergency_drill_plan_user where del_flag = 0 and drill_plan_id = #{drillPlanId} |
| | | select id,`drill_plan_id`,`user_uid`,user_name,`type` from emergency_drill_plan_user where del_flag = 0 and drill_plan_id = #{drillPlanId} |
| | | </select> |
| | | |
| | | <update id = "deleteEmergencyDrillPlanUserByIds" > |
| | |
| | | <result column="type" property="type"/> |
| | | <result column="level" property="level"/> |
| | | <result column="release_date" property="releaseDate"/> |
| | | <result column="author_name" property="authorName"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyPlanList" resultMap="emergencyPlanInfoPageDOResult"> |
| | | select id,`name`,`status`,`type`,`level`,release_date from emergency_plan where del_flag = 0 |
| | | <if test="query.name != null and query.name != ''">and `name` like concat('%', #{query.name}, '%')</if> |
| | | <if test="query.type != null and query.type != ''">and `type` = #{query.type}</if> |
| | | SELECT |
| | | a.id, |
| | | a.`name`, |
| | | a.`status`, |
| | | a.`type`, |
| | | a.`level`, |
| | | a.release_date, |
| | | a.author_name |
| | | FROM |
| | | emergency_plan a |
| | | WHERE |
| | | a.del_flag = 0 |
| | | AND a.abolish_status = #{query.abolishStatus} |
| | | <if test="query.name != null and query.name != ''">and a.name like concat('%', #{query.name}, '%')</if> |
| | | <if test="query.type != null and query.type != ''">and a.type = #{query.type}</if> |
| | | </select> |
| | | |
| | | <insert id="addEmergencyPlan" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyPlanInfo" |
| | |
| | | <if test="createUid != null ">create_uid,</if> |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="status != null ">status,</if> |
| | | <if test="abolishStatus != null ">abolish_status,</if> |
| | | <if test="releaseDate != null ">release_date,</if> |
| | | <if test="authorUid != null ">author_uid,</if> |
| | | <if test="authorName != null and authorName != ''">`author_name`,</if> |
| | | <if test="authorDeptId != null ">author_dept_id,</if> |
| | | <if test="associatedDanger != null ">associated_danger,</if> |
| | | <if test="type != null and type != ''">`type`,</if> |
| | |
| | | <if test="createUid != null ">#{createUid},</if> |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="status != null ">#{status},</if> |
| | | <if test="abolishStatus != null ">#{abolishStatus},</if> |
| | | <if test="releaseDate != null ">#{releaseDate},</if> |
| | | <if test="authorUid != null ">#{authorUid},</if> |
| | | <if test="authorName != null and authorName != ''">#{authorName},</if> |
| | | <if test="authorDeptId != null ">#{authorDeptId},</if> |
| | | <if test="associatedDanger!= null ">#{associatedDanger},</if> |
| | | <if test="type != null and type != ''">#{type},</if> |
| | |
| | | <result column="level" property="level"/> |
| | | <result column="release_date" property="releaseDate"/> |
| | | <result column="author_uid" property="authorUid"/> |
| | | <result column="author_name" property="authorName"/> |
| | | <result column="author_dept_id" property="authorDeptId"/> |
| | | <result column="associated_danger" property="associatedDanger"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyPlanById" resultMap="emergencyPlanInfoDetailDOResult"> |
| | | select id ,`name`,`status`,`type`,`level`,release_date ,author_uid ,author_dept_id ,associated_danger from emergency_plan |
| | | select id ,`name`,`status`,`type`,`level`,release_date ,author_uid ,author_dept_id ,associated_danger,author_name from emergency_plan |
| | | where del_flag = 0 and id = #{id} |
| | | </select> |
| | | |
| | |
| | | <if test="gmtModitify != null ">gmt_moditify = #{gmtModitify},</if> |
| | | <if test="updateUid != null ">update_uid = #{updateUid},</if> |
| | | <if test="status != null ">status = #{status},</if> |
| | | <if test="abolishStatus != null ">abolish_status = #{abolishStatus},</if> |
| | | <if test="releaseDate != null ">release_date = #{releaseDate},</if> |
| | | <if test="authorUid != null ">author_uid = #{authorUid},</if> |
| | | <if test="authorName != null and authorName != ''">author_name =#{authorName},</if> |
| | | <if test="authorDeptId != null ">author_dept_id = #{authorDeptId},</if> |
| | | <if test="associatedDanger != null ">associated_danger = #{associatedDanger},</if> |
| | | <if test="type != null and type != ''">type = #{type},</if> |
| | |
| | | <update id="deleteEmergencyPlan"> |
| | | update emergency_plan set del_flag = 1 where id = #{id} |
| | | </update> |
| | | <update id="updateAbolish"> |
| | | update emergency_plan set abolish_status = #{abolishStatus} where id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="plan_id" property="planId"/> |
| | | <result column="user_uid" property="userUid"/> |
| | | <result column="user_name" property="userName"/> |
| | | <result column="start_create" property="startCreate"/> |
| | | <result column="remark" property="remark"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyPlanLogList" resultMap="emergencyPlanLogInfoDOResult"> |
| | | select id,`plan_id`,`user_uid`,`start_create`,`remark` from emergency_plan_log where del_flag = 0 |
| | | <if test="query.planId != null ">and `plan_id` = #{query.planId}</if> |
| | | |
| | | SELECT |
| | | a.id, |
| | | a.`plan_id`, |
| | | a.`user_uid`, |
| | | a.user_name, |
| | | a.`start_create`, |
| | | a.`remark`, |
| | | b.`name` AS planName |
| | | FROM |
| | | emergency_plan_log a |
| | | LEFT JOIN emergency_plan b ON a.plan_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | <if test="query.planId != null ">and a.`plan_id` = #{query.planId}</if> |
| | | </select> |
| | | |
| | | <insert id="addEmergencyPlanLog" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyPlanLogInfo" |
| | |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="planId != null ">plan_id,</if> |
| | | <if test="userUid != null ">user_uid,</if> |
| | | <if test="userName != null and userName != ''">user_name,</if> |
| | | <if test="startCreate != null ">start_create,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | </trim> |
| | |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="planId != null ">#{planId},</if> |
| | | <if test="userUid != null ">#{userUid},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | | <if test="startCreate != null ">#{startCreate},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | </trim> |
| | |
| | | |
| | | |
| | | <select id="selectEmergencyPlanLogById" resultMap="emergencyPlanLogInfoDOResult"> |
| | | select id,`plan_id`,`user_uid`,`start_create`,`remark` from emergency_plan_log where del_flag = 0 and id = #{id} |
| | | SELECT |
| | | a.id, |
| | | a.`plan_id`, |
| | | a.`user_uid`, |
| | | a.user_name, |
| | | a.`start_create`, |
| | | a.`remark`, |
| | | b.`name` AS planName |
| | | FROM |
| | | emergency_plan_log a |
| | | LEFT JOIN emergency_plan b ON a.plan_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | AND a.id = #{id} |
| | | |
| | | </select> |
| | | |
| | | <update id="updateEmergencyPlanLog" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyPlanLogInfo"> |
| | |
| | | <if test="updateUid != null ">update_uid = #{updateUid},</if> |
| | | <if test="planId != null ">plan_id = #{planId},</if> |
| | | <if test="userUid != null ">user_uid = #{userUid},</if> |
| | | <if test="userName != null and userName != ''">user_name = #{userName},</if> |
| | | <if test="startCreate != null ">start_create = #{startCreate},</if> |
| | | <if test="remark != null and remark != ''">remark = #{remark},</if> |
| | | </trim> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyPlanTeamByPlanId" resultMap="emergencyPlanTeamInfoDOResult"> |
| | | select id ,plan_id ,team_id from emergency_plan_team where plan_id=#{planId} and del_flag = 0 |
| | | SELECT |
| | | a.id, |
| | | a.plan_id, |
| | | a.team_id, |
| | | b.team_name AS teamName |
| | | FROM |
| | | emergency_plan_team a |
| | | LEFT JOIN emergency_team b ON a.team_id = b.id |
| | | WHERE |
| | | a.plan_id = #{planId} |
| | | AND a.del_flag = 0 |
| | | </select> |
| | | |
| | | <update id = "deleteEmergencyPlanTeamByIds" > |
| | |
| | | <if test="usePeriod != null ">use_period,</if> |
| | | <if test="departmentId != null ">department_id,</if> |
| | | <if test="principalUserUid != null ">`principal_user_uid`,</if> |
| | | <if test="principalUserName != null and principalUserName != ''">`principal_user_name`,</if> |
| | | <if test="status != null and status != ''">status,</if> |
| | | <if test="classification != null and classification != ''">`classification`,</if> |
| | | <if test="name != null and name != ''">`name`,</if> |
| | |
| | | <if test="usePeriod != null ">#{usePeriod},</if> |
| | | <if test="departmentId != null ">#{departmentId},</if> |
| | | <if test="principalUserUid != null ">#{principalUserUid},</if> |
| | | <if test="principalUserName != null and principalUserName != ''">#{principalUserName},</if> |
| | | <if test="status != null and status != ''">#{status},</if> |
| | | <if test="classification != null and classification != ''">#{classification},</if> |
| | | <if test="name != null and name != ''">#{name},</if> |
| | |
| | | <result column="use_period" property="usePeriod"/> |
| | | <result column="department_id" property="departmentId"/> |
| | | <result column="principal_user_uid" property="principalUserUid"/> |
| | | <result column="principal_user_name" property="principalUserName"/> |
| | | <result column="status" property="status"/> |
| | | <result column="classification" property="classification"/> |
| | | <result column="name" property="name"/> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencySuppliesById" resultMap="emergencySuppliesInfoDetailDOResult"> |
| | | select id ,`production_date`,`use_date`,`inspect_date`,`next_inspect_date`,inspect_period ,`count` ,use_period ,department_id ,principal_user_uid , |
| | | select id ,`production_date`,`use_date`,`inspect_date`,`next_inspect_date`,inspect_period ,`count` ,use_period ,department_id ,principal_user_uid ,principal_user_name, |
| | | status ,classification ,`name` ,`number` ,model ,longitude ,latitude ,`use` ,area_id ,place ,use_explain |
| | | from emergency_supplies where del_flag = 0 and id = #{id} |
| | | </select> |
| | |
| | | <if test="usePeriod != null ">use_period = #{usePeriod},</if> |
| | | <if test="departmentId != null ">department_id = #{departmentId},</if> |
| | | <if test="principalUserUid != null ">`principal_user_uid` = #{principalUserUid},</if> |
| | | <if test="principalUserName != null and principalUserName != ''">principal_user_name = #{principalUserName},</if> |
| | | <if test="status != null and status != ''">status = #{status},</if> |
| | | <if test="classification != null and classification != ''">`classification` = #{classification},</if> |
| | | <if test="name != null and name != ''">`name` = #{name},</if> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencySuppliesInspectList" resultMap="emergencySuppliesInspectInfoPageDOResult"> |
| | | select id,`supplies_id`,`inspect_result`,`inspect_time` from emergency_supplies_inspect where del_flag = 0 |
| | | <if test="query.suppliesId != null and query.suppliesId != ''">and `supplies_id` = #{query.suppliesId}</if> |
| | | SELECT |
| | | a.id, |
| | | a.`supplies_id`, |
| | | a.`inspect_result`, |
| | | a.`inspect_time`, |
| | | b.`name` AS suppliesName |
| | | FROM |
| | | emergency_supplies_inspect a |
| | | LEFT JOIN emergency_supplies b ON a.supplies_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | <if test="query.suppliesId != null and query.suppliesId != ''">and a.supplies_id = #{query.suppliesId}</if> |
| | | </select> |
| | | |
| | | <insert id="addEmergencySuppliesInspect" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencySuppliesInspectInfo" |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencySuppliesInspectById" resultMap="emergencySuppliesInspectInfoDetailDOResult"> |
| | | select id,`supplies_id`,`inspect_result`,`inspect_time` from emergency_supplies_inspect where del_flag = 0 and id = #{id} |
| | | SELECT |
| | | a.id, |
| | | a.`supplies_id`, |
| | | a.`inspect_result`, |
| | | a.`inspect_time`, |
| | | b.`name` AS suppliesName |
| | | FROM |
| | | emergency_supplies_inspect a |
| | | LEFT JOIN emergency_supplies b ON a.supplies_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 and a.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectEmergencySuppliesInspectBySuppliesId" resultMap="emergencySuppliesInspectInfoDetailDOResult"> |
| | | SELECT |
| | | a.id, |
| | | a.`supplies_id`, |
| | | a.`inspect_result`, |
| | | a.`inspect_time`, |
| | | b.`name` AS suppliesName |
| | | FROM |
| | | emergency_supplies_inspect a |
| | | LEFT JOIN emergency_supplies b ON a.supplies_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 and a.supplies_id = #{id} |
| | | </select> |
| | | |
| | | <update id="updateEmergencySuppliesInspect" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencySuppliesInspectInfo"> |
| | |
| | | <update id="deleteEmergencySuppliesInspect"> |
| | | update emergency_supplies_inspect set del_flag = 1 where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteBySuppliesId"> |
| | | update emergency_supplies_inspect set del_flag = 1 where supplies_id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="inspectId != null ">inspect_id,</if> |
| | | <if test="userUid != null ">user_uid,</if> |
| | | <if test="userName != null and userName != ''">user_name,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null ">#{id},</if> |
| | |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="inspectId != null ">#{inspectId},</if> |
| | | <if test="userUid != null ">#{userUid},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="inspect_id" property="inspectId" /> |
| | | <result column="user_uid" property="userUid" /> |
| | | <result column="user_name" property="userName" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencySuppliesInspectUserBySuppliesInspectId" resultMap="emergencySuppliesInspectUserInfoDOResult"> |
| | | select id,`inspect_id`,`user_uid` from emergency_supplies_inspect_user where del_flag = 0 and inspect_id = #{suppliesInspectId} |
| | | select id,`inspect_id`,`user_uid`,user_name from emergency_supplies_inspect_user where del_flag = 0 and inspect_id = #{suppliesInspectId} |
| | | </select> |
| | | |
| | | <update id = "deleteEmergencySuppliesInspectUserByIds" > |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencySuppliesMaintainList" resultMap="emergencySuppliesMaintainInfoPageDOResult"> |
| | | select id,`supplies_id`,`maintain_result`,`maintain_time` from emergency_supplies_maintain where del_flag = 0 |
| | | <if test="query.suppliesId != null and query.suppliesId != ''">and `supplies_id` = #{query.suppliesId}</if> |
| | | SELECT |
| | | a.id, |
| | | a.`supplies_id`, |
| | | a.`maintain_result`, |
| | | a.`maintain_time`, |
| | | b.`name` AS suppliesName |
| | | FROM |
| | | emergency_supplies_maintain a |
| | | LEFT JOIN emergency_supplies b ON a.supplies_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 |
| | | <if test="query.suppliesId != null and query.suppliesId != ''">and a.supplies_id = #{query.suppliesId}</if> |
| | | </select> |
| | | |
| | | <insert id="addEmergencySuppliesMaintain" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencySuppliesMaintainInfo" |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencySuppliesMaintainById" resultMap="emergencySuppliesMaintainInfoDetailDOResult"> |
| | | select id,`supplies_id`,`maintain_result`,`maintain_time` from emergency_supplies_maintain where del_flag = 0 and id = #{id} |
| | | |
| | | SELECT |
| | | a.id, |
| | | a.`supplies_id`, |
| | | a.`maintain_result`, |
| | | a.`maintain_time`, |
| | | b.`name` AS suppliesName |
| | | FROM |
| | | emergency_supplies_maintain a |
| | | LEFT JOIN emergency_supplies b ON a.supplies_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 and a.id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectEmergencySuppliesMaintainBySuppliesId" resultMap="emergencySuppliesMaintainInfoDetailDOResult"> |
| | | |
| | | SELECT |
| | | a.id, |
| | | a.`supplies_id`, |
| | | a.`maintain_result`, |
| | | a.`maintain_time`, |
| | | b.`name` AS suppliesName |
| | | FROM |
| | | emergency_supplies_maintain a |
| | | LEFT JOIN emergency_supplies b ON a.supplies_id = b.id |
| | | WHERE |
| | | a.del_flag = 0 and a.supplies_id = #{id} |
| | | </select> |
| | | |
| | | |
| | | <update id="updateEmergencySuppliesMaintain" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencySuppliesMaintainInfo"> |
| | | update emergency_supplies_maintain |
| | |
| | | <update id="deleteEmergencySuppliesMaintain"> |
| | | update emergency_supplies_maintain set del_flag = 1 where id = #{id} |
| | | </update> |
| | | |
| | | <update id="deleteBySuppliesId"> |
| | | update emergency_supplies_maintain set del_flag = 1 where supplies_id = #{id} |
| | | </update> |
| | | </mapper> |
| | |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="maintainId != null ">maintain_id,</if> |
| | | <if test="userUid != null ">user_uid,</if> |
| | | <if test="userName != null and userName != ''">user_name,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null ">#{id},</if> |
| | |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="maintainId != null ">#{maintainId},</if> |
| | | <if test="userUid != null ">#{userUid},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="maintain_id" property="maintainId" /> |
| | | <result column="user_uid" property="userUid" /> |
| | | <result column="user_name" property="userName" /> |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencySuppliesMaintainUserBySuppliesMaintainId" resultMap="emergencySuppliesMaintainUserInfoDOResult"> |
| | | select id,`maintain_id`,`user_uid` from emergency_supplies_maintain_user where del_flag = 0 and maintain_id = #{suppliesMaintainId} |
| | | select id,`maintain_id`,`user_uid`,user_name from emergency_supplies_maintain_user where del_flag = 0 and maintain_id = #{suppliesMaintainId} |
| | | </select> |
| | | |
| | | <update id = "deleteEmergencySuppliesMaintainUserByIds" > |
| | |
| | | <if test="createUid != null ">create_uid,</if> |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="principalUid != null ">principal_uid,</if> |
| | | <if test="principalName != null and principalName != ''">principal_name,</if> |
| | | <if test="principalDepartmentId != null ">principal_department_id,</if> |
| | | <if test="teamLevel != null and teamLevel != ''">team_level,</if> |
| | | <if test="teamName != null and teamName != ''">team_name,</if> |
| | |
| | | <if test="createUid != null ">#{createUid},</if> |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="principalUid != null ">#{principalUid},</if> |
| | | <if test="principalName != null and principalName != ''">#{principalName},</if> |
| | | <if test="principalDepartmentId != null ">#{principalDepartmentId},</if> |
| | | <if test="teamLevel != null and teamLevel != ''">#{teamLevel},</if> |
| | | <if test="teamName != null and teamName != ''">#{teamName},</if> |
| | |
| | | id="emergencyTeamInfoDetailDOResult"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="principal_uid" property="principalUid"/> |
| | | <result column="principal_name" property="principalName"/> |
| | | <result column="principal_department_id" property="principalDepartmentId"/> |
| | | <result column="team_level" property="teamLevel"/> |
| | | <result column="team_name" property="teamName"/> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectEmergencyTeamById" resultMap="emergencyTeamInfoDetailDOResult"> |
| | | select id,principal_uid,principal_department_id,`team_level`,`team_name`,`principal_phone`,telephone_number,`team_desc` |
| | | select id,principal_uid,principal_department_id,`team_level`,`team_name`,`principal_phone`,telephone_number,`team_desc`,principal_name |
| | | from emergency_team where del_flag = 0 and id = #{id} |
| | | </select> |
| | | |
| | |
| | | <if test="gmtModitify != null ">gmt_moditify = #{gmtModitify},</if> |
| | | <if test="updateUid != null ">update_uid = #{updateUid},</if> |
| | | <if test="principalUid != null ">principal_uid = #{principalUid},</if> |
| | | <if test="principalName != null and principalName != ''">principal_name = #{principalName},</if> |
| | | <if test="principalDepartmentId != null ">principal_department_id = #{principalDepartmentId},</if> |
| | | <if test="teamLevel != null and teamLevel != ''">team_level = #{teamLevel},</if> |
| | | <if test="teamName != null and teamName != ''">team_name = #{teamName},</if> |
| | |
| | | |
| | | <resultMap type="com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfoPageDO" id="emergencyWorkApproveInfoPageDOResult"> |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="gmt_create" property="gmtCreate"/> |
| | | <result column="work_name" property="workName"/> |
| | | <result column="title" property="title"/> |
| | | <result column="submit_person_id" property="submitPersonId"/> |
| | | <result column="submit_person_name" property="submitPersonName"/> |
| | | <result column="approve_person_id" property="approvePersonId"/> |
| | | <result column="approve_person_name" property="approvePersonName"/> |
| | | <result column="approve_status" property="approveStatus"/> |
| | | <result column="approve_result" property="approveResult"/> |
| | | <result column="approve_memo" property="approveMemo"/> |
| | | <result column="sort" property="sort"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectWorkApproveList" resultMap="emergencyWorkApproveInfoPageDOResult"> |
| | | select id,`work_name`,`title`,`submit_person_id`,`approve_status`,gmt_create from emergency_work_approve where del_flag = 0 |
| | | select id,`work_name`,`title`,`submit_person_id`,submit_person_name,approve_person_id,approve_person_name,sort , |
| | | `approve_status`,approve_result ,approve_memo ,gmt_create from emergency_work_approve |
| | | where del_flag = 0 and relate_type = #{query.relateType} and relate_id = #{query.relateId} |
| | | <if test="query.startTime != null "> and gmt_create <![CDATA[ >= ]]> #{query.startTime}</if> |
| | | <if test="query.endTime != null "> and gmt_create <![CDATA[ <= ]]> #{query.endTime}</if> |
| | | order by sort desc |
| | | </select> |
| | | |
| | | <insert id="addWorkApprove" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfo" |
| | |
| | | <if test="workName != null and workName != ''">work_name,</if> |
| | | <if test="title != null and title != ''">title,</if> |
| | | <if test="submitPersonId != null ">submit_person_id,</if> |
| | | <if test="submitPersonName != null and submitPersonName != ''">submit_person_name,</if> |
| | | <if test="approvePersonId != null ">approve_person_id,</if> |
| | | <if test="approvePersonName != null and approvePersonName != ''">approve_person_name,</if> |
| | | <if test="approveStatus != null ">approve_status,</if> |
| | | <if test="approveResult != null ">approve_result,</if> |
| | | <if test="approveMemo != null and approveMemo != ''">approve_memo,</if> |
| | | <if test="relateType != null ">relate_type,</if> |
| | | <if test="relateId != null ">relate_id,</if> |
| | | <if test="relateDesc != null and relateDesc != ''">relate_desc,</if> |
| | | <if test="sort != null ">sort,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null ">#{id},</if> |
| | |
| | | |
| | | <if test="workName != null and workName != ''">#{workName},</if> |
| | | <if test="title != null and title != ''">#{title},</if> |
| | | <if test="submitPersonId != null ">#{submitPersonId},</if> |
| | | <if test="approvePersonId != null ">#{approvePersonId},</if> |
| | | <if test="submitPersonId != null "> #{submitPersonId},</if> |
| | | <if test="submitPersonName != null and submitPersonName != ''"> #{submitPersonName},</if> |
| | | <if test="approvePersonId != null "> #{approvePersonId},</if> |
| | | <if test="approvePersonName != null and approvePersonName != ''"> #{approvePersonName},</if> |
| | | <if test="approveStatus != null ">#{approveStatus},</if> |
| | | <if test="approveResult != null ">#{approveResult},</if> |
| | | <if test="approveMemo != null and approveMemo != ''">#{approveMemo},</if> |
| | | <if test="relateType != null ">#{relateType},</if> |
| | | <if test="relateId != null ">#{relateId},</if> |
| | | <if test="relateDesc != null and relateDesc != ''">#{relateDesc},</if> |
| | | <if test="sort != null ">#{sort},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <result column="relate_type" property="relateType"/> |
| | | <result column="relate_id" property="relateId"/> |
| | | <result column="relate_desc" property="relateDesc"/> |
| | | <result column="sort" property="sort"/> |
| | | </resultMap> |
| | | |
| | | <select id="selectWorkApproveById" resultMap="WorkApproveInfoDetailDOResult"> |
| | | select id,gmt_create ,work_name,title,`submit_person_id`,`approve_person_id`,`approve_status`,approve_result,`approve_memo`, |
| | | `relate_type`,relate_id,`relate_desc` |
| | | select id,`work_name`,`title`,`submit_person_id`,submit_person_name,approve_person_id,approve_person_name,sort , |
| | | `approve_status`,approve_result ,approve_memo ,gmt_create |
| | | from emergency_work_approve where del_flag = 0 and id = #{id} |
| | | </select> |
| | | |
| | | <select id="selectWorkApproveByRelateTypeAndRelateId" resultMap="WorkApproveInfoDetailDOResult"> |
| | | select id,`work_name`,`title`,`submit_person_id`,submit_person_name,approve_person_id,approve_person_name,sort , |
| | | `approve_status`,approve_result ,approve_memo ,gmt_create from emergency_work_approve |
| | | where del_flag = 0 and relate_type = #{type} and relate_id = #{id} |
| | | order by sort desc |
| | | </select> |
| | | |
| | | <update id="updateWorkApprove" parameterType="com.gkhy.safePlatform.emergency.entity.EmergencyWorkApproveInfo"> |
| | |
| | | <if test="workName != null and workName != ''">work_name = #{workName},</if> |
| | | <if test="title != null and title != ''">title = #{title},</if> |
| | | <if test="submitPersonId != null ">submit_person_id = #{submitPersonId},</if> |
| | | <if test="submitPersonName != null and submitPersonName != ''">submit_person_name = #{submitPersonName},</if> |
| | | <if test="approvePersonId != null ">approve_person_id = #{approvePersonId},</if> |
| | | <if test="approvePersonName != null and approvePersonName != ''">approve_person_name = #{approvePersonName},</if> |
| | | <if test="approveStatus != null ">approve_status = #{approveStatus},</if> |
| | | <if test="approveResult != null ">approve_result = #{approveResult},</if> |
| | | <if test="approveMemo != null and approveMemo != ''">approve_memo = #{approveMemo},</if> |
| | | <if test="relateType != null ">relate_type = #{relateType},</if> |
| | | <if test="relateId != null ">relate_id = #{relateId},</if> |
| | | <if test="relateDesc != null and relateDesc != ''">relate_desc = #{relateDesc},</if> |
| | | <if test="sort != null and sort != ''">sort = #{sort},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少infoType"); |
| | | } |
| | | |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.equipmentInfoService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.equipmentInfoService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | infoDto.setDestoryReason(""); |
| | | infoDto.setDestorySubmitDate(new Timestamp(new java.util.Date().getTime())); |
| | | infoDto.setActualDestoryDate(new Timestamp(new java.util.Date().getTime())); |
| | | System.out.println(JSONObject.toJSONString(infoDto)); |
| | | |
| | | System.out.println(JSONObject.toJSONString(infoDto)); |
| | | |
| | | } |
| | | } |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<EquipmentTypeMngQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.equipmentTypeMngService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.equipmentTypeMngService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.keypointEquipmentInfoService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.keypointEquipmentInfoService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | * 设备设施详细信息(EquipmentInfo)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 09:19:29 |
| | | * @since 2022-08-03 10:55:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_info") |
| | |
| | | public void setLeadingPersonId(Long leadingPersonId) { |
| | | this.leadingPersonId = leadingPersonId; |
| | | } |
| | | //负责人名称 |
| | | private String leadingPersonName; |
| | | |
| | | public String getLeadingPersonName() { |
| | | return leadingPersonName; |
| | | } |
| | | |
| | | public void setLeadingPersonName(String leadingPersonName) { |
| | | this.leadingPersonName = leadingPersonName; |
| | | } |
| | | //负责人部门外键 |
| | | private Long leadingPersonDepartmentId; |
| | | |
| | |
| | | public void setStopSubmitPersonId(Long stopSubmitPersonId) { |
| | | this.stopSubmitPersonId = stopSubmitPersonId; |
| | | } |
| | | //停用提交人名称 |
| | | private String stopSubmitPersonName; |
| | | |
| | | public String getStopSubmitPersonName() { |
| | | return stopSubmitPersonName; |
| | | } |
| | | |
| | | public void setStopSubmitPersonName(String stopSubmitPersonName) { |
| | | this.stopSubmitPersonName = stopSubmitPersonName; |
| | | } |
| | | //停用提交日期 |
| | | private Timestamp stopSubmitDate; |
| | | |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | * 设备维修明细(EquipmentRepairDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:10:57 |
| | | * @since 2022-08-03 11:17:00 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_repair_detail") |
| | |
| | | public void setRepairPersonId(Long repairPersonId) { |
| | | this.repairPersonId = repairPersonId; |
| | | } |
| | | //维修负责人名称 |
| | | private String repairPersonName; |
| | | |
| | | public String getRepairPersonName() { |
| | | return repairPersonName; |
| | | } |
| | | |
| | | public void setRepairPersonName(String repairPersonName) { |
| | | this.repairPersonName = repairPersonName; |
| | | } |
| | | //维修开始日期 |
| | | private Timestamp repairStartDate; |
| | | |
| | |
| | | public void setRepairPersonDepartmentId(Long repairPersonDepartmentId) { |
| | | this.repairPersonDepartmentId = repairPersonDepartmentId; |
| | | } |
| | | //维修负责人单位名称 |
| | | private String repairPersonDepartmentName; |
| | | |
| | | public String getRepairPersonDepartmentName() { |
| | | return repairPersonDepartmentName; |
| | | } |
| | | |
| | | public void setRepairPersonDepartmentName(String repairPersonDepartmentName) { |
| | | this.repairPersonDepartmentName = repairPersonDepartmentName; |
| | | } |
| | | //维修情况 |
| | | private String repairMemo; |
| | | |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | * 设备保养明细(EquipmentTakecareDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 14:40:28 |
| | | * @since 2022-08-03 11:14:57 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_takecare_detail") |
| | |
| | | public void setLeadingPersonId(Long leadingPersonId) { |
| | | this.leadingPersonId = leadingPersonId; |
| | | } |
| | | //保养负责人名称 |
| | | private String leadingPersonName; |
| | | |
| | | public String getLeadingPersonName() { |
| | | return leadingPersonName; |
| | | } |
| | | |
| | | public void setLeadingPersonName(String leadingPersonName) { |
| | | this.leadingPersonName = leadingPersonName; |
| | | } |
| | | //保养日期 |
| | | private Timestamp takecareDate; |
| | | |
| | |
| | | public void setLeadingPersonDepartmentId(Long leadingPersonDepartmentId) { |
| | | this.leadingPersonDepartmentId = leadingPersonDepartmentId; |
| | | } |
| | | //保养负责人单位名称 |
| | | private String leadingPersonDepartmentName; |
| | | |
| | | public String getLeadingPersonDepartmentName() { |
| | | return leadingPersonDepartmentName; |
| | | } |
| | | |
| | | public void setLeadingPersonDepartmentName(String leadingPersonDepartmentName) { |
| | | this.leadingPersonDepartmentName = leadingPersonDepartmentName; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.gkhy.safePlatform.equipment.entity; |
| | | |
| | | import java.sql.Timestamp; |
| | | |
| | | import com.gkhy.safePlatform.equipment.entity.BaseDomain; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | |
| | | * 设备检测明细(EquipmentTestDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-19 15:08:23 |
| | | * @since 2022-08-03 11:15:57 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("equipment_test_detail") |
| | |
| | | public void setTestPersonId(Long testPersonId) { |
| | | this.testPersonId = testPersonId; |
| | | } |
| | | //检测人名称 |
| | | private String testPersonName; |
| | | |
| | | public String getTestPersonName() { |
| | | return testPersonName; |
| | | } |
| | | |
| | | public void setTestPersonName(String testPersonName) { |
| | | this.testPersonName = testPersonName; |
| | | } |
| | | //检测日期 |
| | | private Timestamp testDate; |
| | | |
| | |
| | | public void setTestPersonDepartmentId(Long testPersonDepartmentId) { |
| | | this.testPersonDepartmentId = testPersonDepartmentId; |
| | | } |
| | | //检测人单位名称 |
| | | private String testPersonDepartmentName; |
| | | |
| | | public String getTestPersonDepartmentName() { |
| | | return testPersonDepartmentName; |
| | | } |
| | | |
| | | public void setTestPersonDepartmentName(String testPersonDepartmentName) { |
| | | this.testPersonDepartmentName = testPersonDepartmentName; |
| | | } |
| | | //检测内容 |
| | | private String testMemo; |
| | | |
| | |
| | | private Timestamp nextTakecareDate; |
| | | //负责人ID外键 |
| | | private Long leadingPersonId; |
| | | //负责人名称 |
| | | private String leadingPersonName; |
| | | //负责人部门外键 |
| | | private Long leadingPersonDepartmentId; |
| | | //供应商 |
| | |
| | | private Timestamp actualStopDate; |
| | | //停用提交人/外键 |
| | | private Long stopSubmitPersonId; |
| | | //停用提交人名称 |
| | | private String stopSubmitPersonName; |
| | | //停用提交日期 |
| | | private Timestamp stopSubmitDate; |
| | | //恢复理由 |
| | |
| | | //要删除的检查标准 |
| | | private String delCheckStandardeDetails; |
| | | |
| | | public String getLeadingPersonName() { |
| | | return leadingPersonName; |
| | | } |
| | | |
| | | public void setLeadingPersonName(String leadingPersonName) { |
| | | this.leadingPersonName = leadingPersonName; |
| | | } |
| | | |
| | | public String getStopSubmitPersonName() { |
| | | return stopSubmitPersonName; |
| | | } |
| | | |
| | | public void setStopSubmitPersonName(String stopSubmitPersonName) { |
| | | this.stopSubmitPersonName = stopSubmitPersonName; |
| | | } |
| | | |
| | | public String getDelTakecareDetails() { |
| | | return delTakecareDetails; |
| | | } |
| | |
| | | private String model; |
| | | //单位部门外键 |
| | | private Long departmentId; |
| | | //单位部门名称 |
| | | private String departmentName; |
| | | //设置部位 |
| | | private String setPart; |
| | | //生产日期 |
| | |
| | | private Long leadingPersonId; |
| | | //负责人部门外键 |
| | | private Long leadingPersonDepartmentId; |
| | | //负责人部门名称 |
| | | private String leadingPersonDepartmentName; |
| | | //供应商 |
| | | private String supplyName; |
| | | //使用说明 |
| | |
| | | private String checkContent; |
| | | //负责部门/外键 |
| | | private Long leadingDepartmentId; |
| | | //负责部门名称 |
| | | private String leadingDepartmentName; |
| | | //检查指标 |
| | | private String checkPoint; |
| | | //预警值 |
| | |
| | | public List<EquipmentCheckStandardDetail> getCheckStandardeDetailList() { |
| | | return checkStandardeDetailList; |
| | | } |
| | | |
| | | public String getDepartmentName() { |
| | | return departmentName; |
| | | } |
| | | |
| | | public void setDepartmentName(String departmentName) { |
| | | this.departmentName = departmentName; |
| | | } |
| | | |
| | | public String getLeadingPersonDepartmentName() { |
| | | return leadingPersonDepartmentName; |
| | | } |
| | | |
| | | public void setLeadingPersonDepartmentName(String leadingPersonDepartmentName) { |
| | | this.leadingPersonDepartmentName = leadingPersonDepartmentName; |
| | | } |
| | | |
| | | public String getLeadingDepartmentName() { |
| | | return leadingDepartmentName; |
| | | } |
| | | |
| | | public void setLeadingDepartmentName(String leadingDepartmentName) { |
| | | this.leadingDepartmentName = leadingDepartmentName; |
| | | } |
| | | } |
| | |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | |
| | | /** |
| | |
| | | void addOrUpdate(EquipmentInfoSaveOrUpdate infoDto); |
| | | |
| | | Object statistics(); |
| | | |
| | | Map<Long,String> getDepName(Set<Long> collectDepIdSet); |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | 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.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | 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.equipment.repository.EquipmentInfoRepository; |
| | | import com.gkhy.safePlatform.equipment.service.*; |
| | | import com.gkhy.safePlatform.equipment.utils.QueryHelpPlus; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private EquipmentCheckStandardDetailService equipmentCheckStandardDetailService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<EquipmentInfoQueryCriteria> pageQuery) { |
| | | Long pageIndex = pageQuery.getPageIndex(); |
| | |
| | | criteria2.setInfoTpe(pageQuery.getSearchParams().getInfoType()); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailService.queryAll(criteria2); |
| | | f.setRepaireDetailList(repairDetailList); |
| | | |
| | | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | collectDepIdSet.add(f.getDepartmentId()); |
| | | collectDepIdSet.add(f.getLeadingDepartmentId()); |
| | | collectDepIdSet.add(f.getLeadingPersonDepartmentId()); |
| | | takecareDetailList.forEach(info->{collectDepIdSet.add(info.getLeadingPersonDepartmentId());}); |
| | | checkDetailList.forEach(info->{collectDepIdSet.add(info.getTestPersonDepartmentId());}); |
| | | repairDetailList.forEach(info->{collectDepIdSet.add(info.getRepairPersonDepartmentId());}); |
| | | |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = getDepName(collectDepIdSet); |
| | | |
| | | //set |
| | | f.setDepartmentName(depNameMap.get(f.getDepartmentId())); |
| | | f.setLeadingDepartmentName(depNameMap.get(f.getLeadingDepartmentId())); |
| | | f.setLeadingPersonDepartmentName(depNameMap.get(f.getLeadingPersonDepartmentId())); |
| | | takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); |
| | | checkDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); |
| | | repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); |
| | | |
| | | }); |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | if(equipmentInfo == null){ |
| | | return null; |
| | | } |
| | | |
| | | EquipmentInfoDto infoDto = BeanCopyUtils.copyBean(equipmentInfo, EquipmentInfoDto.class); |
| | | |
| | | //设备保养 |
| | |
| | | List<EquipmentTakecareStardardDetail> takecareStardardDetailList = equipmentTakecareStardardDetailService.queryAll(criteria4); |
| | | infoDto.setTakecareStardardeDetailList(takecareStardardDetailList); |
| | | |
| | | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | collectDepIdSet.add(infoDto.getDepartmentId()); |
| | | collectDepIdSet.add(infoDto.getLeadingDepartmentId()); |
| | | collectDepIdSet.add(infoDto.getLeadingPersonDepartmentId()); |
| | | takecareDetailList.forEach(info->{collectDepIdSet.add(info.getLeadingPersonDepartmentId());}); |
| | | checkDetailList.forEach(info->{collectDepIdSet.add(info.getTestPersonDepartmentId());}); |
| | | repairDetailList.forEach(info->{collectDepIdSet.add(info.getRepairPersonDepartmentId());}); |
| | | |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = getDepName(collectDepIdSet); |
| | | |
| | | //set |
| | | infoDto.setDepartmentName(depNameMap.get(infoDto.getDepartmentId())); |
| | | infoDto.setLeadingDepartmentName(depNameMap.get(infoDto.getLeadingDepartmentId())); |
| | | infoDto.setLeadingPersonDepartmentName(depNameMap.get(infoDto.getLeadingPersonDepartmentId())); |
| | | takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); |
| | | checkDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); |
| | | repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); |
| | | return infoDto; |
| | | } |
| | | |
| | |
| | | |
| | | return this.listMaps(wrapper); |
| | | } |
| | | |
| | | @Override |
| | | public Map<Long,String> getDepName(Set<Long> collectDepIdSet) { |
| | | Map<Long, String> depPool = new HashMap<>(); |
| | | collectDepIdSet.forEach(depId ->{ |
| | | // 设置部门名称 |
| | | if (!depPool.containsKey(depId)) { |
| | | try { |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(depId); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | depPool.put(dep.getDepId(), dep.getDepName()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("exception",e); |
| | | } |
| | | } |
| | | }); |
| | | return depPool; |
| | | } |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | 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.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.equipment.entity.*; |
| | | import com.gkhy.safePlatform.equipment.model.dto.req.*; |
| | | import com.gkhy.safePlatform.equipment.repository.KeypointEquipmentInfoRepository; |
| | | import com.gkhy.safePlatform.equipment.service.*; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private EquipmentCheckStandardDetailService equipmentCheckStandardDetailService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | | @Autowired |
| | | private EquipmentInfoService equipmentInfoService; |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<KeypointEquipmentInfoQueryCriteria> pageQuery) { |
| | |
| | | page = baseMapper.selectPage(page, |
| | | QueryHelpPlus.getPredicate(KeypointEquipmentInfo.class, pageQuery.getSearchParams())); |
| | | List<KeypointEquipmentInfoDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), KeypointEquipmentInfoDto.class); |
| | | |
| | | // TODO:获取所属部门名称 |
| | | |
| | | //获取额外信息 |
| | | respList.forEach(f->{ |
| | |
| | | criteria2.setInfoTpe(3); |
| | | List<EquipmentRepairDetail> repairDetailList = equipmentRepairDetailService.queryAll(criteria2); |
| | | f.setRepaireDetailList(repairDetailList); |
| | | |
| | | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | collectDepIdSet.add(f.getDepartmentId()); |
| | | takecareDetailList.forEach(info->{collectDepIdSet.add(info.getLeadingPersonDepartmentId());}); |
| | | checkDetailList.forEach(info->{collectDepIdSet.add(info.getTestPersonDepartmentId());}); |
| | | repairDetailList.forEach(info->{collectDepIdSet.add(info.getRepairPersonDepartmentId());}); |
| | | |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = equipmentInfoService.getDepName(collectDepIdSet); |
| | | |
| | | //set |
| | | f.setDepartmentName(depNameMap.get(f.getDepartmentId())); |
| | | takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); |
| | | checkDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); |
| | | repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); |
| | | }); |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | List<EquipmentTakecareStardardDetail> takecareStardardDetailList = equipmentTakecareStardardDetailService.queryAll(criteria4); |
| | | infoDto.setTakecareStardardeDetailList(takecareStardardDetailList); |
| | | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | collectDepIdSet.add(infoDto.getDepartmentId()); |
| | | takecareDetailList.forEach(info->{collectDepIdSet.add(info.getLeadingPersonDepartmentId());}); |
| | | checkDetailList.forEach(info->{collectDepIdSet.add(info.getTestPersonDepartmentId());}); |
| | | repairDetailList.forEach(info->{collectDepIdSet.add(info.getRepairPersonDepartmentId());}); |
| | | |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = equipmentInfoService.getDepName(collectDepIdSet); |
| | | |
| | | //set |
| | | infoDto.setDepartmentName(depNameMap.get(infoDto.getDepartmentId())); |
| | | takecareDetailList.forEach(info->{info.setLeadingPersonDepartmentName(depNameMap.get(info.getLeadingPersonDepartmentId()));}); |
| | | checkDetailList.forEach(info->{info.setTestPersonDepartmentName(depNameMap.get(info.getTestPersonDepartmentId()));}); |
| | | repairDetailList.forEach(info->{info.setRepairPersonDepartmentName(depNameMap.get(info.getRepairPersonDepartmentId()));}); |
| | | |
| | | return infoDto; |
| | | } |
| | | |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineMngDto; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineMngService; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import java.sql.Timestamp; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * 绩效考核管理-安全考核管理(ExamineMng)表控制层 |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<ExamineMngQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.examineMngService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody ExamineMng examineMng) { |
| | | public ResultVO update(Authentication authentication, @RequestBody ExamineMng examineMng) { |
| | | // 获取当前用户 |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | examineMng.setExamineDepartmentId(currentUser.getDepId()); |
| | | examineMng.setExaminePersonId(currentUser.getUid()); |
| | | if (examineMng.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,examineMngService.save(examineMng)); |
| | | } else { |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.examineMngService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | examineTemplateSaveOrUpdate.setExamineDate(new Timestamp(new java.util.Date().getTime())); |
| | | examineTemplateSaveOrUpdate.setExamineTotalNumber("3"); |
| | | examineTemplateSaveOrUpdate.setMemo("4"); |
| | | examineTemplateSaveOrUpdate.setExaminePersonId("5"); |
| | | examineTemplateSaveOrUpdate.setExaminePersonId(5L); |
| | | examineTemplateSaveOrUpdate.setBeExaminedPersonId("6"); |
| | | examineTemplateSaveOrUpdate.setExamineDepartmentId(7L); |
| | | examineTemplateSaveOrUpdate.setBeExaminedDepartmentId(8L); |
| | |
| | | package com.gkhy.safePlatform.targetDuty.controller; |
| | | import java.util.Date; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.google.common.collect.Lists; |
| | | import java.sql.Timestamp; |
| | | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateSaveOrUpdate; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.ExamineTemplateDto; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.utils.PageUtils; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.ExamineTemplateSaveOrUpdate; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; |
| | | import com.google.common.collect.Lists; |
| | | import org.springframework.security.core.Authentication; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<ExamineTemplateQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.examineTemplateService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @return 修改结果 |
| | | */ |
| | | @PostMapping(value = "/addOrUpdate") |
| | | public ResultVO update(@RequestBody ExamineTemplateSaveOrUpdate examineTemplateSaveOrUpdate) { |
| | | public ResultVO update(Authentication authentication, @RequestBody ExamineTemplateSaveOrUpdate examineTemplateSaveOrUpdate) { |
| | | if(!StringUtils.hasText(examineTemplateSaveOrUpdate.getTitle())){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少title"); |
| | | } |
| | | // 获取当前用户 |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | |
| | | //设置设定人ID和设定人部门ID |
| | | examineTemplateSaveOrUpdate.setSetPersonDepartmentId(currentUser.getDepId()); |
| | | examineTemplateSaveOrUpdate.setSetPersonId(currentUser.getUid()); |
| | | examineTemplateService.addOrUpdate(examineTemplateSaveOrUpdate); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.examineTemplateService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<RewardPunishmentDetailQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.rewardPunishmentDetailService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少rewardPunishmentStandardId"); |
| | | } |
| | | |
| | | List<Long> pIdList = Arrays.stream(rewardPunishmentDetail.getPersonId().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | .collect(Collectors.toList()); |
| | | |
| | | List<RewardPunishmentDetail> list = new ArrayList<>(); |
| | | pIdList.forEach(f->{ |
| | | RewardPunishmentDetail new1 = BeanCopyUtils.copyBean(rewardPunishmentDetail, RewardPunishmentDetail.class); |
| | | new1.setPersonId(f+""); |
| | | list.add(new1); |
| | | }); |
| | | // List<Long> pIdList = Arrays.stream(rewardPunishmentDetail.getPersonId().split(",")).map(s-> Long.parseLong(s.trim())) |
| | | // .collect(Collectors.toList()); |
| | | // |
| | | // List<RewardPunishmentDetail> list = new ArrayList<>(); |
| | | // pIdList.forEach(f->{ |
| | | // RewardPunishmentDetail new1 = BeanCopyUtils.copyBean(rewardPunishmentDetail, RewardPunishmentDetail.class); |
| | | // new1.setPersonId(f+""); |
| | | // list.add(new1); |
| | | // }); |
| | | if (rewardPunishmentDetail.getId() == null) { |
| | | return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.saveBatch(list)); |
| | | return new ResultVO<>(ResultCodes.OK,rewardPunishmentDetailService.save(rewardPunishmentDetail)); |
| | | } else { |
| | | rewardPunishmentDetailService.updateBatchById(list); |
| | | rewardPunishmentDetailService.updateById(rewardPunishmentDetail); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | | } |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.rewardPunishmentDetailService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<RewardPunishmentStandardQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.rewardPunishmentStandardService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.rewardPunishmentStandardService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<TargetDutySummaryQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.targetDutySummaryService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.targetDutySummaryService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<TargetDutyfileInfoQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.targetDutyfileInfoService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.targetDutyfileInfoService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | this.targetExamineService.removeByIds(idList); |
| | | return new ResultVO<>(ResultCodes.OK); |
| | | } |
| | |
| | | if(pageQuery.getSearchParams().getTargetType() == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL,"缺少targetType"); |
| | | } |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.targetMngService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | * @param ids 主键结合 |
| | | * @return 删除结果 |
| | | */ |
| | | @GetMapping(value = "/delete") |
| | | public ResultVO delete(String ids) { |
| | | List<String> idList = Arrays.stream(ids.split(",")) |
| | | .collect(Collectors.toList()); |
| | | @RequestMapping(value = "/delete",method = RequestMethod.POST) |
| | | public ResultVO delete(@RequestBody Long[] ids) { |
| | | if(ids == null){ |
| | | return new ResultVO<>(ResultCodes.CLIENT_PARAM_ILLEGAL); |
| | | } |
| | | List<Long> idList = Arrays.asList(ids); |
| | | //删除关联表数据 |
| | | this.targetDivideDetailService.remove(new QueryWrapper<TargetDivideDetail>().in("target_id",idList)); |
| | | |
| | |
| | | */ |
| | | @PostMapping(value = "/page/list") |
| | | public ResultVO selectAll(@RequestBody PageQuery<WorkApproveQueryCriteria> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return this.workApproveService.queryAll(pageQuery); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | /** |
| | | * 安全考核管理(ExamineMng)表实体类 |
| | | * 绩效考核管理-安全考核管理(ExamineMng)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 13:43:08 |
| | | * @since 2022-08-03 10:05:37 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("examine_mng") |
| | |
| | | this.memo = memo; |
| | | } |
| | | //考核人ID/外键 |
| | | private String examinePersonId; |
| | | private Long examinePersonId; |
| | | |
| | | public String getExaminePersonId() { |
| | | public Long getExaminePersonId() { |
| | | return examinePersonId; |
| | | } |
| | | |
| | | public void setExaminePersonId(String examinePersonId) { |
| | | public void setExaminePersonId(Long examinePersonId) { |
| | | this.examinePersonId = examinePersonId; |
| | | } |
| | | //考核人名称 |
| | | private String examinePersonName; |
| | | |
| | | public String getExaminePersonName() { |
| | | return examinePersonName; |
| | | } |
| | | |
| | | public void setExaminePersonName(String examinePersonName) { |
| | | this.examinePersonName = examinePersonName; |
| | | } |
| | | //被考核人ID/外键(可能有多个,用逗号隔开) |
| | | private String beExaminedPersonId; |
| | |
| | | public void setBeExaminedPersonId(String beExaminedPersonId) { |
| | | this.beExaminedPersonId = beExaminedPersonId; |
| | | } |
| | | //考核部门ID/外键 |
| | | //被考核人名称 |
| | | private String beExaminedPersonName; |
| | | |
| | | public String getBeExaminedPersonName() { |
| | | return beExaminedPersonName; |
| | | } |
| | | |
| | | public void setBeExaminedPersonName(String beExaminedPersonName) { |
| | | this.beExaminedPersonName = beExaminedPersonName; |
| | | } |
| | | //考核部门ID/外键(可能有多个,用逗号隔开) |
| | | private Long examineDepartmentId; |
| | | |
| | | public Long getExamineDepartmentId() { |
| | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | |
| | | /** |
| | | * 绩效考核标准(ExamineTemplate)表实体类 |
| | | * 绩效考核管理-绩效考核标准(ExamineTemplate)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-21 10:58:10 |
| | | * @since 2022-08-03 09:50:44 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("examine_template") |
| | |
| | | public void setMemo(String memo) { |
| | | this.memo = memo; |
| | | } |
| | | |
| | | //设定人/外键 |
| | | private Long setPersonId; |
| | | |
| | | public Long getSetPersonId() { |
| | |
| | | public void setSetPersonId(Long setPersonId) { |
| | | this.setPersonId = setPersonId; |
| | | } |
| | | |
| | | //设定人名称 |
| | | private String setPersonName; |
| | | |
| | | public String getSetPersonName() { |
| | | return setPersonName; |
| | | } |
| | | |
| | | public void setSetPersonName(String setPersonName) { |
| | | this.setPersonName = setPersonName; |
| | | } |
| | | //设定人部门ID/外键 |
| | | private Long setPersonDepartmentId; |
| | | |
| | | public Long getSetPersonDepartmentId() { |
| | |
| | | * 奖惩记录(RewardPunishmentDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-27 15:37:45 |
| | | * @since 2022-08-03 10:37:54 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("reward_punishment_detail") |
| | |
| | | public void setRewardPunishmentStandardId(Long rewardPunishmentStandardId) { |
| | | this.rewardPunishmentStandardId = rewardPunishmentStandardId; |
| | | } |
| | | //员工(多个用逗号隔开) |
| | | //员工ID(多个用逗号隔开) |
| | | private String personId; |
| | | |
| | | public String getPersonId() { |
| | |
| | | public void setPersonId(String personId) { |
| | | this.personId = personId; |
| | | } |
| | | //员工名(多个用逗号隔开) |
| | | private String personName; |
| | | |
| | | public String getPersonName() { |
| | | return personName; |
| | | } |
| | | |
| | | public void setPersonName(String personName) { |
| | | this.personName = personName; |
| | | } |
| | | //备注信息 |
| | | private String memo; |
| | | |
| | |
| | | * 目标指标分解详情(TargetDivideDetail)表实体类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 13:32:39 |
| | | * @since 2022-08-03 09:25:40 |
| | | */ |
| | | @SuppressWarnings("serial") |
| | | @TableName("target_divide_detail") |
| | |
| | | public void setCommitPersonId(Long commitPersonId) { |
| | | this.commitPersonId = commitPersonId; |
| | | } |
| | | //上报人名称 |
| | | private String commitPersonName; |
| | | |
| | | public String getCommitPersonName() { |
| | | return commitPersonName; |
| | | } |
| | | |
| | | public void setCommitPersonName(String commitPersonName) { |
| | | this.commitPersonName = commitPersonName; |
| | | } |
| | | |
| | | } |
| | |
| | | //被考核部门名称/外键 |
| | | private String beExaminedDepartmentName; |
| | | |
| | | //考核人名称 |
| | | private String examinePersonName; |
| | | |
| | | public String getExaminePersonName() { |
| | | return examinePersonName; |
| | | } |
| | | |
| | | public void setExaminePersonName(String examinePersonName) { |
| | | this.examinePersonName = examinePersonName; |
| | | } |
| | | |
| | | //被考核人名称 |
| | | private String beExaminedPersonName; |
| | | |
| | | public String getBeExaminedPersonName() { |
| | | return beExaminedPersonName; |
| | | } |
| | | |
| | | public void setBeExaminedPersonName(String beExaminedPersonName) { |
| | | this.beExaminedPersonName = beExaminedPersonName; |
| | | } |
| | | |
| | | //合格分数 |
| | | private String acceptanceNumber; |
| | | |
| | | public String getAcceptanceNumber() { |
| | | return acceptanceNumber; |
| | | } |
| | | |
| | | public void setAcceptanceNumber(String acceptanceNumber) { |
| | | this.acceptanceNumber = acceptanceNumber; |
| | | } |
| | | |
| | | public String getBeExaminedDepartmentName() { |
| | | return beExaminedDepartmentName; |
| | | } |
| | |
| | | private String memo; |
| | | //设定人/外键 |
| | | private Long setPersonId; |
| | | //设定人名称 |
| | | private Long setPersonName; |
| | | //设定部门ID/外键 |
| | | private Long setPersonDepartmentId; |
| | | //设定部门名称/外键 |
| | | //设定部门名称 |
| | | private String setPersonDepartmentName; |
| | | |
| | | private Timestamp setTimem; |
| | |
| | | public void setUpdateTime(Timestamp updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public Long getSetPersonName() { |
| | | return setPersonName; |
| | | } |
| | | |
| | | public void setSetPersonName(Long setPersonName) { |
| | | this.setPersonName = setPersonName; |
| | | } |
| | | } |
| | |
| | | |
| | | private Timestamp updateTime; |
| | | |
| | | //上报人名称 |
| | | private String commitPersonName; |
| | | |
| | | //责任部门名称 |
| | | private String dutyDepartmentName; |
| | | //制定人部门名称 |
| | | private String makerDepartmentName; |
| | | |
| | | public String getDutyDepartmentName() { |
| | | return dutyDepartmentName; |
| | | } |
| | | |
| | | public void setDutyDepartmentName(String dutyDepartmentName) { |
| | | this.dutyDepartmentName = dutyDepartmentName; |
| | | } |
| | | |
| | | public String getMakerDepartmentName() { |
| | | return makerDepartmentName; |
| | | } |
| | | |
| | | public void setMakerDepartmentName(String makerDepartmentName) { |
| | | this.makerDepartmentName = makerDepartmentName; |
| | | } |
| | | |
| | | public String getCommitPersonName() { |
| | | return commitPersonName; |
| | | } |
| | | |
| | | public void setCommitPersonName(String commitPersonName) { |
| | | this.commitPersonName = commitPersonName; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | private Timestamp updateTime; |
| | | |
| | | //目标指标分解列表 |
| | | private List<TargetDivideDetail> targetDivideDetailList = new ArrayList<>(); |
| | | private List<TargetDivideDetailDto> targetDivideDetailList = new ArrayList<>(); |
| | | |
| | | public List<TargetDivideDetail> getTargetDivideDetailList() { |
| | | public List<TargetDivideDetailDto> getTargetDivideDetailList() { |
| | | return targetDivideDetailList; |
| | | } |
| | | |
| | | public void setTargetDivideDetailList(List<TargetDivideDetail> targetDivideDetailList) { |
| | | public void setTargetDivideDetailList(List<TargetDivideDetailDto> targetDivideDetailList) { |
| | | this.targetDivideDetailList = targetDivideDetailList; |
| | | } |
| | | |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service; |
| | | |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | |
| | | /** |
| | | * 公共服务接口 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 11:49:22 |
| | | */ |
| | | public interface CommonService { |
| | | String getDepName(Long depId); |
| | | |
| | | DepInfoRPCRespDTO getDepInfo(Long depId); |
| | | |
| | | Map<Long,String> getDepName(Set<Long> collectDepIdSet); |
| | | } |
| | |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetMngQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetMngDto; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | |
| | | * @since 2022-07-20 11:49:22 |
| | | */ |
| | | public interface TargetMngService extends IService<TargetMng> { |
| | | ResultVO queryAll(PageQuery<TargetMngQueryCriteria> pageQuery); |
| | | ResultVO<List<TargetMngDto>> queryAll(PageQuery<TargetMngQueryCriteria> pageQuery); |
| | | |
| | | List<TargetMng> queryAll(TargetMngQueryCriteria criteria); |
| | | |
对比新文件 |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.impl; |
| | | |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * 公共服务实现类 |
| | | * |
| | | * @author xurui |
| | | * @since 2022-07-20 11:49:22 |
| | | */ |
| | | @Service("commonServiceImpl") |
| | | public class CommonServiceImpl implements CommonService { |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | | @Override |
| | | public String getDepName(Long depId) { |
| | | return this.getDepInfo(depId).getDepName(); |
| | | } |
| | | |
| | | @Override |
| | | public DepInfoRPCRespDTO getDepInfo(Long depId) { |
| | | // 设置部门名称 |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(depId); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | return dep; |
| | | } |
| | | } |
| | | return new DepInfoRPCRespDTO(); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public Map<Long,String> getDepName(Set<Long> collectDepIdSet) { |
| | | Map<Long, String> depPool = new HashMap<>(); |
| | | collectDepIdSet.forEach(depId ->{ |
| | | // 设置部门名称 |
| | | if (!depPool.containsKey(depId)) { |
| | | try { |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(depId); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | depPool.put(dep.getDepId(), dep.getDepName()); |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | System.out.println("exception::"+e); |
| | | } |
| | | } |
| | | }); |
| | | return depPool; |
| | | } |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | package com.gkhy.safePlatform.targetDuty.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | 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.gkhy.safePlatform.targetDuty.entity.ExamineItem; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.CurrentExamineDto; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineItemRepository; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineMngRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineMng; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineTemplateRepository; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineMngService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | private ExamineMngRepository examineMngRepository; |
| | | @Autowired |
| | | private ExamineItemRepository examineItemRepository; |
| | | @Resource |
| | | private ExamineTemplateRepository examineTemplateRepository; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | |
| | | @Override |
| | |
| | | page = baseMapper.selectPage(page, |
| | | QueryHelpPlus.getPredicate(ExamineMng.class, pageQuery.getSearchParams())); |
| | | List<ExamineMngDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), ExamineMngDto.class); |
| | | // TODO:获取考核部门名称 |
| | | |
| | | // TODO:获取被考核部门名称 |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList.forEach(f->{ |
| | | collectDepIdSet.add(f.getExamineDepartmentId()); |
| | | collectDepIdSet.add(f.getBeExaminedDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList.forEach(f->{ |
| | | f.setExamineDepartmentName(depNameMap.get(f.getExamineDepartmentId())); |
| | | f.setBeExaminedDepartmentName(depNameMap.get(f.getBeExaminedDepartmentId())); |
| | | }); |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | }); |
| | | } |
| | | dto.setCurrentExamineDtoList(list); |
| | | |
| | | //获取合格分数 |
| | | ExamineTemplate examineTemplate = examineTemplateRepository.selectOne(new QueryWrapper<ExamineTemplate>().eq("id",examineMng.getExamineTemplateId())); |
| | | if(examineTemplate != null){ |
| | | dto.setAcceptanceNumber(examineTemplate.getAcceptanceNumber()); |
| | | } |
| | | return dto; |
| | | } |
| | | } |
| | |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineItemRepository; |
| | | import com.gkhy.safePlatform.targetDuty.repository.ExamineTemplateRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.ExamineTemplate; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineItemService; |
| | | import com.gkhy.safePlatform.targetDuty.service.ExamineTemplateService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.sql.Timestamp; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private ExamineItemService examineItemService; |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | |
| | | @Override |
| | |
| | | QueryHelpPlus.getPredicate(ExamineTemplate.class, pageQuery.getSearchParams())); |
| | | List<ExamineTemplateDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), ExamineTemplateDto.class); |
| | | |
| | | // TODO:获取设定人部门名称 |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList.forEach(f->{ |
| | | collectDepIdSet.add(f.getSetPersonDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList.forEach(f->{ |
| | | f.setSetPersonDepartmentName(depNameMap.get(f.getSetPersonDepartmentId())); |
| | | }); |
| | | |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | } |
| | | |
| | | List<ExamineItem> list = infoDto.getExamineItemList(); |
| | | list.forEach(f->{f.setExamineTemplateId(examineTemplate.getId());}); |
| | | list.forEach(f->{f.setExamineTemplateId(infoDto.getId());}); |
| | | examineItemService.saveOrUpdateBatch(list); |
| | | |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | page.getRecords(), |
| | | ResultCodes.OK |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | |
| | | //保存主数据 |
| | | //如果目标指标已经被分解,那么就不能再次增加 |
| | | if(targetMng.getDivideStatus() == 1){ |
| | | if(targetMng.getDivideStatus() == 1 && infoDto.getTargetId() == null){ |
| | | throw new TargetDutyException(TargetDutyResultCodes.E2); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetDutySummaryRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetDutySummary; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDutySummaryService; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import com.gkhy.safePlatform.targetDuty.utils.QueryHelpPlus; |
| | | import com.gkhy.safePlatform.commons.utils.BeanCopyUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Set; |
| | | |
| | | /** |
| | | * (TargetDutySummary)表服务实现类 |
| | |
| | | |
| | | @Autowired |
| | | private TargetDutySummaryRepository targetDutySummaryRepository; |
| | | |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | |
| | | @Override |
| | |
| | | QueryHelpPlus.getPredicate(TargetDutySummary.class, pageQuery.getSearchParams())); |
| | | List<TargetDutySummaryDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetDutySummaryDto.class); |
| | | |
| | | // TODO:获取责任部门名称 |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList.forEach(f->{ |
| | | collectDepIdSet.add(f.getDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList.forEach(f->{ |
| | | f.setDepartmentName(depNameMap.get(f.getDepartmentId())); |
| | | }); |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | QueryHelpPlus.getPredicate(TargetDutyfileInfo.class, pageQuery.getSearchParams())); |
| | | List<TargetDutyfileInfoDto> respList = BeanCopyUtils.copyBeanList(page.getRecords(), TargetDutyfileInfoDto.class); |
| | | |
| | | // TODO 岗位名 |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | 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.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.req.TargetDivideDetailQueryCriteria; |
| | | import com.gkhy.safePlatform.targetDuty.model.dto.resp.TargetDivideDetailDto; |
| | | import com.gkhy.safePlatform.targetDuty.repository.TargetMngRepository; |
| | | import com.gkhy.safePlatform.targetDuty.entity.TargetMng; |
| | | import com.gkhy.safePlatform.targetDuty.service.CommonService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetDivideDetailService; |
| | | import com.gkhy.safePlatform.targetDuty.service.TargetMngService; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import com.gkhy.safePlatform.commons.enums.ResultCodes; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * 目标指标(TargetMng)表服务实现类 |
| | |
| | | |
| | | @Resource |
| | | private TargetDivideDetailService targetDivideDetailService; |
| | | |
| | | |
| | | |
| | | @Resource |
| | | private CommonService commonService; |
| | | |
| | | @Override |
| | | public ResultVO queryAll(PageQuery<TargetMngQueryCriteria> pageQuery) { |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | //查询关联分解信息 |
| | | TargetDivideDetailQueryCriteria criteria = new TargetDivideDetailQueryCriteria(); |
| | | criteria.setTargetId(targetMng.getId()); |
| | | targetMngDto.setTargetDivideDetailList(targetDivideDetailService.queryAll(criteria)); |
| | | List<TargetDivideDetailDto> respList = BeanCopyUtils.copyBeanList(targetDivideDetailService.queryAll(criteria), TargetDivideDetailDto.class); |
| | | |
| | | // --------------------------- 获取部门信息----------------------- |
| | | //收集所用到的部门ID |
| | | Set<Long> collectDepIdSet = new HashSet(); |
| | | respList.forEach(f->{ |
| | | collectDepIdSet.add(f.getDutyDepartmentId()); |
| | | collectDepIdSet.add(f.getMakerDepartmentId()); |
| | | }); |
| | | //获取部门名集合 |
| | | Map<Long,String> depNameMap = commonService.getDepName(collectDepIdSet); |
| | | |
| | | respList.forEach(f->{ |
| | | f.setDutyDepartmentName(depNameMap.get(f.getDutyDepartmentId())); |
| | | f.setMakerDepartmentName(depNameMap.get(f.getMakerDepartmentId())); |
| | | }); |
| | | |
| | | |
| | | targetMngDto.setTargetDivideDetailList(respList); |
| | | return targetMngDto; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<AccidentExpressPageRespDTO>> list (@RequestBody PageQuery<AccidentExpressQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return accidentExpressService.selectAccidentExpressList(pageQuery); |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO addAccidentExpress(Authentication authentication, @RequestBody AccidentExpressReqDTO AccidentExpressReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return accidentExpressService.addAccidentExpress(currentUser.getUid(), AccidentExpressReqDTO); |
| | | return accidentExpressService.addAccidentExpress(currentUser, AccidentExpressReqDTO); |
| | | } |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 事故快报删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteAccidentExpress(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteAccidentExpress(@RequestBody Long[] ids){ |
| | | return accidentExpressService.batchDeleteAccidentExpress(ids); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<AccidentReportPageRespDTO>> list (@RequestBody PageQuery<AccidentReportQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return accidentReportService.selectAccidentReportList(pageQuery); |
| | | } |
| | | |
| | |
| | | /** |
| | | * 事故报告删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteAccidentReport(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteAccidentReport(@RequestBody Long[] ids){ |
| | | return accidentReportService.batchDeleteAccidentReport(ids); |
| | | } |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<AccidentWorkApprovePageRespDTO>> list (@RequestBody PageQuery<AccidentWorkApproveQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return workApproveService.selectWorkApproveList(pageQuery); |
| | | } |
| | | |
| | |
| | | private WorkInjuryDeclarationService workInjuryDeclarationService; |
| | | |
| | | /** |
| | | * 工商报告列表 |
| | | * 工伤报告列表 |
| | | */ |
| | | @RequestMapping(value = "/page/list" ,method = RequestMethod.POST) |
| | | private ResultVO<List<WorkInjuryDeclarationPageRespDTO>> list (@RequestBody PageQuery<WorkInjuryDeclarationQuery> pageQuery){ |
| | | PageUtils.checkCheck(pageQuery.getPageIndex(), pageQuery.getPageSize()); |
| | | PageUtils.checkCheck(pageQuery); |
| | | return workInjuryDeclarationService.selectWorkInjuryDeclarationList(pageQuery); |
| | | } |
| | | |
| | | /** |
| | | * 工商报告新增 |
| | | * 工伤报告新增 |
| | | */ |
| | | @RequestMapping(value = "/add",method = RequestMethod.POST) |
| | | public ResultVO addworkInjuryDeclaration(Authentication authentication, @RequestBody WorkInjuryDeclarationReqDTO workInjuryDeclarationReqDTO) { |
| | | public ResultVO addWorkInjuryDeclaration(Authentication authentication, @RequestBody WorkInjuryDeclarationReqDTO workInjuryDeclarationReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return workInjuryDeclarationService.addWorkInjuryDeclaration(currentUser.getUid(), workInjuryDeclarationReqDTO); |
| | | } |
| | | |
| | | /** |
| | | * 工商报告详情 |
| | | * 工伤报告详情 |
| | | */ |
| | | @RequestMapping(value = "/info/{id}",method = RequestMethod.GET) |
| | | public ResultVO<WorkInjuryDeclarationDetailRespDTO> getworkInjuryDeclarationById(@PathVariable("id")Long id){ |
| | |
| | | } |
| | | |
| | | /** |
| | | * 工商报告修改 |
| | | * 工伤报告修改 |
| | | */ |
| | | @RequestMapping(value = "/update",method = RequestMethod.POST) |
| | | public ResultVO updateworkInjuryDeclaration(Authentication authentication, @RequestBody WorkInjuryDeclarationReqDTO workInjuryDeclarationReqDTO) { |
| | | public ResultVO updateWorkInjuryDeclaration(Authentication authentication, @RequestBody WorkInjuryDeclarationReqDTO workInjuryDeclarationReqDTO) { |
| | | ContextCacheUser currentUser = (ContextCacheUser) authentication.getPrincipal(); |
| | | return workInjuryDeclarationService.updateWorkInjuryDeclaration(currentUser.getUid(), workInjuryDeclarationReqDTO); |
| | | } |
| | | |
| | | /** |
| | | * 工商报告删除/批量删除 |
| | | * 工伤报告删除/批量删除 |
| | | */ |
| | | @RequestMapping(value = "/batchDelete/{ids}",method = RequestMethod.GET) |
| | | public ResultVO batchDeleteworkInjuryDeclaration(@PathVariable("ids")String ids){ |
| | | @RequestMapping(value = "/batchDelete",method = RequestMethod.POST) |
| | | public ResultVO batchDeleteWorkInjuryDeclaration(@RequestBody Long[] ids){ |
| | | return workInjuryDeclarationService.batchDeleteWorkInjuryDeclaration(ids); |
| | | } |
| | | |
| | |
| | | |
| | | private Long createUid; |
| | | |
| | | private String createName; |
| | | |
| | | public String getCreateName() { |
| | | return createName; |
| | | } |
| | | |
| | | public void setCreateName(String createName) { |
| | | this.createName = createName; |
| | | } |
| | | |
| | | private Long updateUid; |
| | | |
| | | private String emergencyPrecautions; |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | private String createName; |
| | | |
| | | public String getCreateName() { |
| | | return createName; |
| | | } |
| | | |
| | | public void setCreateName(String createName) { |
| | | this.createName = createName; |
| | | } |
| | | |
| | | private Date gmtModitify; |
| | | |
| | | private Long createUid; |
| | |
| | | @TableName("accident_report") |
| | | public class AccidentReportInfo { |
| | | |
| | | private Integer status; |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | private String fillInUserName; |
| | | |
| | | public String getFillInUserName() { |
| | | return fillInUserName; |
| | | } |
| | | |
| | | public void setFillInUserName(String fillInUserName) { |
| | | this.fillInUserName = fillInUserName; |
| | | } |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | |
| | | private Long createUid; |
| | | |
| | | private Long updateUid; |
| | | |
| | | private Boolean status ; |
| | | |
| | | private Long accidentExpressId; |
| | | |
| | |
| | | private String relevantPersonnelRecords; |
| | | |
| | | private String otherMaterials; |
| | | |
| | | public Boolean getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Boolean status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | @TableName("accident_report") |
| | | public class AccidentReportInfoDetailDO { |
| | | |
| | | private Integer status; |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | private String fillInUserName; |
| | | |
| | | public String getFillInUserName() { |
| | | return fillInUserName; |
| | | } |
| | | |
| | | public void setFillInUserName(String fillInUserName) { |
| | | this.fillInUserName = fillInUserName; |
| | | } |
| | | |
| | | private String accidentName; |
| | | |
| | | private Long accidentDepartmentId; |
| | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | private Boolean status ; |
| | | |
| | | private Long accidentExpressId; |
| | | |
| | |
| | | private String relevantPersonnelRecords; |
| | | |
| | | private String otherMaterials; |
| | | |
| | | public Boolean getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Boolean status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | @TableName("accident_report") |
| | | public class AccidentReportInfoPageDO { |
| | | |
| | | private Integer status; |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | private String accidentName; |
| | | |
| | | private Long accidentDepartmentId; |
| | |
| | | |
| | | private Long accidentExpressId; |
| | | |
| | | private Boolean status ; |
| | | |
| | | private String accidentType; |
| | | |
| | | private String accidentGrade; |
| | |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Boolean getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Boolean status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Long getAccidentExpressId() { |
| | |
| | | @TableName("work_injury_declaration") |
| | | public class WorkInjuryDeclarationInfoPageDO { |
| | | |
| | | private String deptName; |
| | | |
| | | public String getDeptName() { |
| | | return deptName; |
| | | } |
| | | |
| | | public void setDeptName(String deptName) { |
| | | this.deptName = deptName; |
| | | } |
| | | |
| | | private String accidentName; |
| | | |
| | | public String getAccidentName() { |
| | |
| | | WORK_INJURY_DECLARATION_NULL("W1001", "工伤申报不可为空"), |
| | | WORK_INJURY_DECLARATION_NOT_EXIST("W1002", "工伤申报不存在"), |
| | | |
| | | WORK_INJURY_DECLARATION_USERNAME_NULL("W1003", "申报人名称不可为空"), |
| | | WORK_INJURY_DECLARATION_GENDER_NULL("W1003", "申报人名称不可为空"), |
| | | WORK_INJURY_DECLARATION_USERNAME_NOT_EXIST("W1005", "申报人部门不可为空"), |
| | | WORK_INJURY_DECLARATION_TYPE_NULL("W1006", "工伤类型不可为空"), |
| | | WORK_INJURY_DECLARATION_Date_NULL("W1006", "申报日期不可为空"), |
| | | |
| | | |
| | | ERROR("A3000", "未知错误"); |
| | | |
| | | private String code; |
| | |
| | | |
| | | private Long id; |
| | | |
| | | private String createName; |
| | | |
| | | public String getCreateName() { |
| | | return createName; |
| | | } |
| | | |
| | | public void setCreateName(String createName) { |
| | | this.createName = createName; |
| | | } |
| | | |
| | | private String emergencyPrecautions; |
| | | |
| | | private String accidentCausesPreliminaryAnalysis; |
| | |
| | | |
| | | public class AccidentReportReqDTO { |
| | | |
| | | private Integer status; |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | private String fillInUserName; |
| | | |
| | | public String getFillInUserName() { |
| | | return fillInUserName; |
| | | } |
| | | |
| | | public void setFillInUserName(String fillInUserName) { |
| | | this.fillInUserName = fillInUserName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | | private Long accidentExpressId; |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | public class AccidentExpressPageRespDTO{ |
| | | public class AccidentExpressPageRespDTO implements Serializable { |
| | | |
| | | private static final long serialVersionUID = -3992394113427902200L; |
| | | |
| | | private String createName; |
| | | |
| | | public String getCreateName() { |
| | | return createName; |
| | | } |
| | | |
| | | public void setCreateName(String createName) { |
| | | this.createName = createName; |
| | | } |
| | | |
| | | private String deptName; |
| | | |
| | | public String getDeptName() { |
| | | return deptName; |
| | | } |
| | | |
| | | public void setDeptName(String deptName) { |
| | | this.deptName = deptName; |
| | | } |
| | | |
| | | private Long id; |
| | | |
| | |
| | | |
| | | public class AccidentReportDetailRespDTO { |
| | | |
| | | private Integer status; |
| | | |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | private String fillInUserName; |
| | | |
| | | public String getFillInUserName() { |
| | | return fillInUserName; |
| | | } |
| | | |
| | | public void setFillInUserName(String fillInUserName) { |
| | | this.fillInUserName = fillInUserName; |
| | | } |
| | | |
| | | private String accidentName; |
| | | |
| | | private Long accidentDepartmentId; |
| | |
| | | |
| | | private Long id; |
| | | |
| | | private Boolean status ; |
| | | |
| | | private Long accidentExpressId; |
| | | |
| | | private String accidentType; |
| | |
| | | private String otherMaterials; |
| | | |
| | | private List<AccidentReportFileRespDTO> fileList; |
| | | |
| | | public Boolean getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Boolean status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | |
| | | |
| | | public class AccidentReportPageRespDTO { |
| | | |
| | | private String deptName; |
| | | |
| | | public String getDeptName() { |
| | | return deptName; |
| | | } |
| | | |
| | | public void setDeptName(String deptName) { |
| | | this.deptName = deptName; |
| | | } |
| | | |
| | | private String accidentName; |
| | | |
| | | private Long accidentDepartmentId; |
| | |
| | | |
| | | private String accidentName; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date occurrenceTime; |
| | | |
| | | public String getAccidentName() { |
| | |
| | | |
| | | public class WorkInjuryDeclarationPageRespDTO { |
| | | |
| | | private String deptName; |
| | | |
| | | public String getDeptName() { |
| | | return deptName; |
| | | } |
| | | |
| | | public void setDeptName(String deptName) { |
| | | this.deptName = deptName; |
| | | } |
| | | |
| | | private String accidentName; |
| | | |
| | | public String getAccidentName() { |
| | |
| | | |
| | | public class AccidentReportQuery { |
| | | |
| | | private Boolean status; |
| | | private Integer status; |
| | | |
| | | public Boolean getStatus() { |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Boolean status) { |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | } |
| | |
| | | |
| | | public class AccidentReportDBQuery { |
| | | |
| | | private Boolean status; |
| | | private Integer status; |
| | | |
| | | public Boolean getStatus() { |
| | | public Integer getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(Boolean status) { |
| | | public void setStatus(Integer status) { |
| | | this.status = status; |
| | | } |
| | | } |
| | |
| | | package com.gkhy.safePlatform.incidentManage.service; |
| | | |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | import com.gkhy.safePlatform.commons.query.PageQuery; |
| | | import com.gkhy.safePlatform.commons.vo.ResultVO; |
| | | import com.gkhy.safePlatform.commons.vo.SearchResultVO; |
| | |
| | | |
| | | SearchResultVO<List<AccidentExpressPageRespDTO>> selectAccidentExpressList(PageQuery<AccidentExpressQuery> query); |
| | | |
| | | ResultVO addAccidentExpress(Long valueOf, AccidentExpressReqDTO AccidentExpressReqDTO); |
| | | ResultVO addAccidentExpress(ContextCacheUser contextCacheUser, AccidentExpressReqDTO AccidentExpressReqDTO); |
| | | |
| | | ResultVO<AccidentExpressDetailRespDTO> getAccidentExpressById(Long id); |
| | | |
| | | ResultVO updateAccidentExpress(Long uid, AccidentExpressReqDTO AccidentExpressReqDTO); |
| | | |
| | | ResultVO batchDeleteAccidentExpress(String ids); |
| | | ResultVO batchDeleteAccidentExpress(Long[] ids); |
| | | |
| | | ResultVO selectAccidentExpressCasualtyList(Long accidentExpressId); |
| | | |
| | |
| | | |
| | | ResultVO updateAccidentReport(Long uid, AccidentReportReqDTO AccidentReportReqDTO); |
| | | |
| | | ResultVO batchDeleteAccidentReport(String ids); |
| | | ResultVO batchDeleteAccidentReport(Long[] ids); |
| | | } |
| | |
| | | |
| | | ResultVO updateWorkInjuryDeclaration(Long uid, WorkInjuryDeclarationReqDTO WorkInjuryDeclarationReqDTO); |
| | | |
| | | ResultVO batchDeleteWorkInjuryDeclaration(String ids); |
| | | ResultVO batchDeleteWorkInjuryDeclaration(Long[] ids); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.incidentManage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountAuthService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | import com.gkhy.safePlatform.commons.co.ContextCacheUser; |
| | | 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.incidentManage.service.baseService.AccidentExpressCasualtyInfoService; |
| | | import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressFileInfoService; |
| | | import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressInfoService; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service("accidentExpressService") |
| | |
| | | |
| | | @Autowired |
| | | private AccidentExpressCasualtyInfoService accidentExpressCasualtyInfoService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | | |
| | | @Override |
| | |
| | | List<AccidentExpressInfoPageDO> accidentExpressInfoPageDOList = accidentExpressInfoService.selectAccidentExpressList(page, accidentExpressDBQuery); |
| | | List<AccidentExpressPageRespDTO> respList = BeanCopyUtils.copyBeanList(accidentExpressInfoPageDOList, AccidentExpressPageRespDTO.class); |
| | | |
| | | Map<Long, String> depPool = new HashMap<>(); |
| | | |
| | | respList.forEach(AccidentExpressPageRespDTO ->{ |
| | | // 设置人员名称 |
| | | // 设置部门名称 |
| | | if (!depPool.containsKey(AccidentExpressPageRespDTO.getAccidentDepartmentId())) { |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(AccidentExpressPageRespDTO.getAccidentDepartmentId()); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | |
| | | depPool.put(dep.getDepId(), dep.getDepName()); |
| | | } |
| | | }} |
| | | |
| | | String depName = depPool.get(AccidentExpressPageRespDTO.getAccidentDepartmentId()); |
| | | AccidentExpressPageRespDTO.setDeptName(depName); |
| | | }); |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | } |
| | | |
| | | @Override |
| | | public ResultVO addAccidentExpress(Long uid, AccidentExpressReqDTO accidentExpressReqDTO) { |
| | | public ResultVO addAccidentExpress(ContextCacheUser contextCacheUser, AccidentExpressReqDTO accidentExpressReqDTO) { |
| | | Long uid = contextCacheUser.getUid(); |
| | | String uName = contextCacheUser.getRealName(); |
| | | //必填项验证 |
| | | checkRequired(accidentExpressReqDTO); |
| | | |
| | |
| | | BeanUtils.copyProperties(accidentExpressReqDTO, accidentExpressInfo); |
| | | accidentExpressInfo.setDelFlag(false); |
| | | accidentExpressInfo.setCreateUid(uid); |
| | | accidentExpressInfo.setCreateName(uName); |
| | | accidentExpressInfo.setGmtCreate(nowDate); |
| | | accidentExpressInfoService.addAccidentExpress(accidentExpressInfo); |
| | | //2.新增应急队伍附件 |
| | |
| | | |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteAccidentExpress(String ids) { |
| | | if (StringUtils.isBlank(ids)){ |
| | | public ResultVO batchDeleteAccidentExpress(Long[] ids) { |
| | | if (ids == null || ids.length==0){ |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NULL); |
| | | }else{ |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteAccidentExpress(Long.valueOf(id)); |
| | | for (Long id : ids){ |
| | | deleteAccidentExpress(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | package com.gkhy.safePlatform.incidentManage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | 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.incidentManage.query.AccidentReportQuery; |
| | | import com.gkhy.safePlatform.incidentManage.query.db.AccidentReportDBQuery; |
| | | import com.gkhy.safePlatform.incidentManage.service.AccidentReportService; |
| | | import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressInfoService; |
| | | import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentReportFileInfoService; |
| | | import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentReportInfoService; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service("accidentReportService") |
| | |
| | | |
| | | @Autowired |
| | | private AccidentReportFileInfoService accidentReportFileInfoService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | | @Autowired |
| | | private AccidentExpressInfoService accidentExpressInfoService; |
| | | |
| | | |
| | | @Override |
| | |
| | | List<AccidentReportInfoPageDO> accidentReportInfoPageDOList = accidentReportInfoService.selectAccidentReportList(page, accidentReportDBQuery); |
| | | List<AccidentReportPageRespDTO> respList = BeanCopyUtils.copyBeanList(accidentReportInfoPageDOList, AccidentReportPageRespDTO.class); |
| | | |
| | | Map<Long, String> depPool = new HashMap<>(); |
| | | |
| | | respList.forEach(AccidentReportPageRespDTO -> { |
| | | // 设置部门名称 |
| | | if (!depPool.containsKey(AccidentReportPageRespDTO.getAccidentDepartmentId())) { |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(AccidentReportPageRespDTO.getAccidentDepartmentId()); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | |
| | | depPool.put(dep.getDepId(), dep.getDepName()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | String depName = depPool.get(AccidentReportPageRespDTO.getAccidentDepartmentId()); |
| | | AccidentReportPageRespDTO.setDeptName(depName); |
| | | }); |
| | | |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize, page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | accidentReportInfo.setDelFlag(false); |
| | | accidentReportInfo.setCreateUid(uid); |
| | | accidentReportInfo.setGmtCreate(nowDate); |
| | | accidentReportInfo.setStatus(false); |
| | | accidentReportInfoService.addAccidentReport(accidentReportInfo); |
| | | //2.新增事故报告附件 |
| | | if (!CollectionUtils.isEmpty(accidentReportReqDTO.getFileList())){ |
| | | addAccidentReportFile(accidentReportInfo.getId(),uid,nowDate,accidentReportReqDTO.getFileList()); |
| | | if (!CollectionUtils.isEmpty(accidentReportReqDTO.getFileList())) { |
| | | addAccidentReportFile(accidentReportInfo.getId(), uid, nowDate, accidentReportReqDTO.getFileList()); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | |
| | | private void addAccidentReportFile(Long accidentReportId ,Long uid , Date nowDate , List<AccidentReportFileReqDTO> AccidentReportFileReqDTOList){ |
| | | private void addAccidentReportFile(Long accidentReportId, Long uid, Date nowDate, List<AccidentReportFileReqDTO> AccidentReportFileReqDTOList) { |
| | | List<AccidentReportFileInfo> fileInfoList = BeanCopyUtils.copyBeanList(AccidentReportFileReqDTOList, AccidentReportFileInfo.class); |
| | | fileInfoList.forEach(AccidentReportFileInfo -> { |
| | | AccidentReportFileInfo.setAccidentReportId(accidentReportId); |
| | |
| | | AccidentReportFileInfo.setCreateUid(uid); |
| | | AccidentReportFileInfo.setGmtCreate(nowDate); |
| | | }); |
| | | for (AccidentReportFileInfo AccidentReportFileInfo :fileInfoList){ |
| | | for (AccidentReportFileInfo AccidentReportFileInfo : fileInfoList) { |
| | | accidentReportFileInfoService.addAccidentReportFile(AccidentReportFileInfo); |
| | | } |
| | | } |
| | |
| | | AccidentReportDetailRespDTO AccidentReportDetailRespDTO = new AccidentReportDetailRespDTO(); |
| | | //查询是否存在 |
| | | AccidentReportInfoDetailDO AccidentReportInfoDetailDO = accidentReportInfoService.selectAccidentReportById(id); |
| | | if (AccidentReportInfoDetailDO==null){ |
| | | if (AccidentReportInfoDetailDO == null) { |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST); |
| | | }else{ |
| | | BeanUtils.copyProperties(AccidentReportInfoDetailDO,AccidentReportDetailRespDTO); |
| | | } else { |
| | | BeanUtils.copyProperties(AccidentReportInfoDetailDO, AccidentReportDetailRespDTO); |
| | | //查找对应的附件 |
| | | List<AccidentReportFileInfoDO> AccidentReportFileInfoDOList = accidentReportFileInfoService.selectByAccidentReportId(id); |
| | | if (!CollectionUtils.isEmpty(AccidentReportFileInfoDOList)){ |
| | | List<AccidentReportFileRespDTO> accidentReportFileRespDTOList = BeanCopyUtils.copyBeanList(AccidentReportFileInfoDOList , AccidentReportFileRespDTO.class); |
| | | if (!CollectionUtils.isEmpty(AccidentReportFileInfoDOList)) { |
| | | List<AccidentReportFileRespDTO> accidentReportFileRespDTOList = BeanCopyUtils.copyBeanList(AccidentReportFileInfoDOList, AccidentReportFileRespDTO.class); |
| | | AccidentReportDetailRespDTO.setFileList(accidentReportFileRespDTOList); |
| | | } |
| | | return new ResultVO<>(ResultCodes.OK ,AccidentReportDetailRespDTO); |
| | | return new ResultVO<>(ResultCodes.OK, AccidentReportDetailRespDTO); |
| | | } |
| | | } |
| | | |
| | |
| | | Date nowDate = new Date(); |
| | | //查询是否存在 |
| | | AccidentReportInfoDetailDO AccidentReportInfoDetailDO = accidentReportInfoService.selectAccidentReportById(accidentReportReqDTO.getId()); |
| | | if (AccidentReportInfoDetailDO==null){ |
| | | if (AccidentReportInfoDetailDO == null) { |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST); |
| | | }else{ |
| | | } else { |
| | | AccidentReportInfo accidentReportInfo = new AccidentReportInfo(); |
| | | BeanUtils.copyProperties(accidentReportReqDTO,accidentReportInfo); |
| | | BeanUtils.copyProperties(accidentReportReqDTO, accidentReportInfo); |
| | | accidentReportInfo.setUpdateUid(uid); |
| | | accidentReportInfo.setGmtModitify(nowDate); |
| | | accidentReportInfoService.updateAccidentReport(accidentReportInfo); |
| | | //修改事故报告附件 |
| | | updateAccidentReportFile(uid,accidentReportReqDTO.getId(),nowDate,accidentReportReqDTO.getFileList()); |
| | | updateAccidentReportFile(uid, accidentReportReqDTO.getId(), nowDate, accidentReportReqDTO.getFileList()); |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | | } |
| | | |
| | | private void updateAccidentReportFile(Long uid ,Long accidentReportId ,Date nowDate,List<AccidentReportFileReqDTO> AccidentReportFileReqDTOList){ |
| | | private void updateAccidentReportFile(Long uid, Long accidentReportId, Date nowDate, List<AccidentReportFileReqDTO> AccidentReportFileReqDTOList) { |
| | | |
| | | List<AccidentReportFileInfoDO> accidentReportFileInfoDOList = accidentReportFileInfoService.selectByAccidentReportId(accidentReportId); |
| | | List<Long> oldIdsList = accidentReportFileInfoDOList.stream().map(AccidentReportFileInfoDO::getId).collect(Collectors.toList()); |
| | |
| | | List<AccidentReportFileInfo> addList = new ArrayList<>(); |
| | | //删除的附件集合(id) |
| | | List<Long> deleteList = new ArrayList<>(); |
| | | for (AccidentReportFileReqDTO AccidentReportFileReqDTO : AccidentReportFileReqDTOList){ |
| | | for (AccidentReportFileReqDTO AccidentReportFileReqDTO : AccidentReportFileReqDTOList) { |
| | | //如果不存在id则表示页面新增的附件 |
| | | if (AccidentReportFileReqDTO.getId() == null){ |
| | | if (AccidentReportFileReqDTO.getId() == null) { |
| | | AccidentReportFileInfo AccidentReportFileInfo = new AccidentReportFileInfo(); |
| | | BeanUtils.copyProperties(AccidentReportFileReqDTO,AccidentReportFileInfo); |
| | | BeanUtils.copyProperties(AccidentReportFileReqDTO, AccidentReportFileInfo); |
| | | AccidentReportFileInfo.setDelFlag(false); |
| | | AccidentReportFileInfo.setGmtCreate(nowDate); |
| | | AccidentReportFileInfo.setCreateUid(uid); |
| | |
| | | addList.add(AccidentReportFileInfo); |
| | | } |
| | | //如果存在id则判断页面是否删除 |
| | | else{ |
| | | else { |
| | | newIdsList.add(AccidentReportFileReqDTO.getId()); |
| | | } |
| | | } |
| | | for (Long oldId : oldIdsList){ |
| | | if (!newIdsList.contains(oldId)){ |
| | | for (Long oldId : oldIdsList) { |
| | | if (!newIdsList.contains(oldId)) { |
| | | deleteList.add(oldId); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(addList)){ |
| | | for (AccidentReportFileInfo AccidentReportFileInfo : addList){ |
| | | if (!CollectionUtils.isEmpty(addList)) { |
| | | for (AccidentReportFileInfo AccidentReportFileInfo : addList) { |
| | | accidentReportFileInfoService.addAccidentReportFile(AccidentReportFileInfo); |
| | | } |
| | | } |
| | | if (!CollectionUtils.isEmpty(deleteList)){ |
| | | if (!CollectionUtils.isEmpty(deleteList)) { |
| | | accidentReportFileInfoService.deleteAccidentReportFileByIds(deleteList); |
| | | } |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteAccidentReport(String ids) { |
| | | if (StringUtils.isBlank(ids)){ |
| | | public ResultVO batchDeleteAccidentReport(Long[] ids) { |
| | | if (ids == null || ids.length==0){ |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NULL); |
| | | }else{ |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteAccidentReport(Long.valueOf(id)); |
| | | } else { |
| | | |
| | | for (Long id : ids){ |
| | | deleteAccidentReport(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | private void deleteAccidentReport(Long id) { |
| | | //查询是否存在 |
| | | AccidentReportInfoDetailDO AccidentReportInfoDetailDO = accidentReportInfoService.selectAccidentReportById(id); |
| | | if (AccidentReportInfoDetailDO==null){ |
| | | if (AccidentReportInfoDetailDO == null) { |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_REPORT_NOT_EXIST); |
| | | }else{ |
| | | } else { |
| | | accidentReportInfoService.deleteAccidentReportById(id); |
| | | //删除附件 |
| | | accidentReportFileInfoService.deleteAccidentReportFileByAccidentReportId(id); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 验证必填项 |
| | | * |
| | | * @return |
| | | */ |
| | | private void checkRequired(AccidentReportReqDTO AccidentReportReqDTO) { |
| | | //事故快报 |
| | | if (AccidentReportReqDTO.getAccidentExpressId() == null ) { |
| | | if (AccidentReportReqDTO.getAccidentExpressId() == null) { |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NULL); |
| | | } |
| | | AccidentExpressInfoDetailDO accidentExpressInfo = accidentExpressInfoService.selectAccidentExpressById(AccidentReportReqDTO.getAccidentExpressId()); |
| | | if (accidentExpressInfo == null) { |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NOT_EXIST); |
| | | } |
| | | |
| | | //事故类型 |
| | | if (StringUtils.isBlank(AccidentReportReqDTO.getAccidentType())) { |
| | | throw new AccidentException(AccidentResultCodes.REPORT_TYPE_NULL); |
| | |
| | | throw new AccidentException(AccidentResultCodes.REPORT_GRADE_NULL); |
| | | } |
| | | //经济损失 |
| | | if (AccidentReportReqDTO.getEconomicLoss() == null ) { |
| | | if (AccidentReportReqDTO.getEconomicLoss() == null) { |
| | | throw new AccidentException(AccidentResultCodes.REPORT_ECONOMIC_LOSS_NULL); |
| | | } |
| | | //要求报告完成期限 |
| | | if (AccidentReportReqDTO.getReportDeadline() == null ) { |
| | | if (AccidentReportReqDTO.getReportDeadline() == null) { |
| | | throw new AccidentException(AccidentResultCodes.REPORT_REPORT_DEADLINE_NULL); |
| | | } |
| | | //事故级别 |
| | |
| | | throw new AccidentException(AccidentResultCodes.REPORT_ACCIDENT_HANDLING_NULL); |
| | | } |
| | | //填写人 |
| | | if (AccidentReportReqDTO.getFillInUserUid() == null ) { |
| | | if (AccidentReportReqDTO.getFillInUserUid() == null) { |
| | | throw new AccidentException(AccidentResultCodes.REPORT_FILL_IN_USER_UID_NULL); |
| | | } |
| | | //填写日期 |
| | | if (AccidentReportReqDTO.getFillInTime() == null ) { |
| | | if (AccidentReportReqDTO.getFillInTime() == null) { |
| | | throw new AccidentException(AccidentResultCodes.REPORT_FILL_IN_TIME_NULL); |
| | | } |
| | | } |
| | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | package com.gkhy.safePlatform.incidentManage.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.AccountDepartmentService; |
| | | import com.gkhy.safePlatform.account.rpc.apimodel.model.resp.DepInfoRPCRespDTO; |
| | | 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.incidentManage.query.WorkInjuryDeclarationQuery; |
| | | import com.gkhy.safePlatform.incidentManage.query.db.WorkInjuryDeclarationDBQuery; |
| | | import com.gkhy.safePlatform.incidentManage.service.WorkInjuryDeclarationService; |
| | | import com.gkhy.safePlatform.incidentManage.service.baseService.AccidentExpressInfoService; |
| | | import com.gkhy.safePlatform.incidentManage.service.baseService.WorkInjuryDeclarationFileInfoService; |
| | | import com.gkhy.safePlatform.incidentManage.service.baseService.WorkInjuryDeclarationInfoService; |
| | | import org.apache.dubbo.config.annotation.DubboReference; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service("workInjuryDeclarationService") |
| | |
| | | |
| | | @Autowired |
| | | private WorkInjuryDeclarationFileInfoService workInjuryDeclarationFileInfoService; |
| | | |
| | | @DubboReference(check = false) |
| | | private AccountDepartmentService accountDepartmentService; |
| | | |
| | | @Autowired |
| | | private AccidentExpressInfoService accidentExpressInfoService; |
| | | |
| | | |
| | | @Override |
| | |
| | | List<WorkInjuryDeclarationInfoPageDO> WorkInjuryDeclarationInfoPageDOList = workInjuryDeclarationInfoService.selectWorkInjuryDeclarationList(page, WorkInjuryDeclarationDBQuery); |
| | | List<WorkInjuryDeclarationPageRespDTO> respList = BeanCopyUtils.copyBeanList(WorkInjuryDeclarationInfoPageDOList, WorkInjuryDeclarationPageRespDTO.class); |
| | | |
| | | |
| | | Map<Long, String> depPool = new HashMap<>(); |
| | | |
| | | respList.forEach(WorkInjuryDeclarationPageRespDTO -> { |
| | | // 设置部门名称 |
| | | if (!depPool.containsKey(WorkInjuryDeclarationPageRespDTO.getDeclareDepartmentId())) { |
| | | ResultVO<DepInfoRPCRespDTO> rpcResult = accountDepartmentService.getDepInfoByDepId(WorkInjuryDeclarationPageRespDTO.getDeclareDepartmentId()); |
| | | if (rpcResult != null && rpcResult.getCode().equals(ResultCodes.OK.getCode())) { |
| | | if (rpcResult.getData() != null) { |
| | | DepInfoRPCRespDTO dep = (DepInfoRPCRespDTO) rpcResult.getData(); |
| | | |
| | | depPool.put(dep.getDepId(), dep.getDepName()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | String depName = depPool.get(WorkInjuryDeclarationPageRespDTO.getDeclareDepartmentId()); |
| | | WorkInjuryDeclarationPageRespDTO.setDeptName(depName); |
| | | }); |
| | | |
| | | return new SearchResultVO<>( |
| | | true, |
| | | pageIndex, |
| | | pageSize, |
| | | pageSize,page.getPages(), |
| | | page.getTotal(), |
| | | respList, |
| | | ResultCodes.OK |
| | |
| | | |
| | | |
| | | @Override |
| | | public ResultVO batchDeleteWorkInjuryDeclaration(String ids) { |
| | | if (StringUtils.isBlank(ids)){ |
| | | public ResultVO batchDeleteWorkInjuryDeclaration(Long[] ids) { |
| | | |
| | | if (ids == null || ids.length==0){ |
| | | throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_NULL); |
| | | }else{ |
| | | String[] idArr = ids.split(","); |
| | | for (String id : idArr) { |
| | | deleteWorkInjuryDeclaration(Long.valueOf(id)); |
| | | for (Long id : ids){ |
| | | deleteWorkInjuryDeclaration(id); |
| | | } |
| | | return new ResultVO(ResultCodes.OK); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | private void checkRequired(WorkInjuryDeclarationReqDTO WorkInjuryDeclarationReqDTO) { |
| | | /* //名称 |
| | | if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getAccidentName())) { |
| | | throw new AccidentException(AccidentResultCodes.Report_NAME_NULL); |
| | | //申报人姓名 |
| | | if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getDeclareUserName())) { |
| | | throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_USERNAME_NULL); |
| | | } |
| | | //部门 |
| | | if (WorkInjuryDeclarationReqDTO.getAccidentDepartmentId()==null) { |
| | | throw new AccidentException(AccidentResultCodes.Report_DEPARTMENT_NULL); |
| | | //事故性别 |
| | | if (WorkInjuryDeclarationReqDTO.getDeclareUserGender() == null ) { |
| | | throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_GENDER_NULL); |
| | | } |
| | | //发生时间 |
| | | if (WorkInjuryDeclarationReqDTO.getOccurrenceTime() == null ) { |
| | | throw new AccidentException(AccidentResultCodes.Report_TIME_NULL); |
| | | //申报人部门 |
| | | if (WorkInjuryDeclarationReqDTO.getDeclareDepartmentId()==null) { |
| | | throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_USERNAME_NOT_EXIST); |
| | | } |
| | | //发生地点 |
| | | if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getOccurrencePlace())) { |
| | | throw new AccidentException(AccidentResultCodes.Report_PLACE_NULL); |
| | | //事故名称 |
| | | if (WorkInjuryDeclarationReqDTO.getAccidentExpressId() == null ) { |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NULL); |
| | | } |
| | | //事故原因 |
| | | if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getAccidentCause())) { |
| | | throw new AccidentException(AccidentResultCodes.Report_CAUSE_NULL); |
| | | AccidentExpressInfoDetailDO accidentExpressInfo = accidentExpressInfoService.selectAccidentExpressById(WorkInjuryDeclarationReqDTO.getAccidentExpressId()); |
| | | if (accidentExpressInfo == null) { |
| | | throw new AccidentException(AccidentResultCodes.ACCIDENT_EXPRESS_NOT_EXIST); |
| | | } |
| | | //是否有伤亡 |
| | | if (WorkInjuryDeclarationReqDTO.getCasualties()==null) { |
| | | throw new AccidentException(AccidentResultCodes.Report_CASUALTIES_NULL); |
| | | //工伤类型 |
| | | if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getWorkInjuryType())) { |
| | | throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_TYPE_NULL); |
| | | } |
| | | //简要经过 |
| | | if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getAccidentBriefProcess())) { |
| | | throw new AccidentException(AccidentResultCodes.Report_BRIEF_PROCESS_NULL); |
| | | //申报日期 |
| | | if (WorkInjuryDeclarationReqDTO.getDeclareDate()==null) { |
| | | throw new AccidentException(AccidentResultCodes.WORK_INJURY_DECLARATION_Date_NULL); |
| | | } |
| | | //初步分析 |
| | | if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getAccidentCausesPreliminaryAnalysis())) { |
| | | throw new AccidentException(AccidentResultCodes.Report_CASE_PRELIMINARY_ANALYSIS_NULL); |
| | | } |
| | | //应急防范措施 |
| | | if (StringUtils.isBlank(WorkInjuryDeclarationReqDTO.getEmergencyPrecautions())) { |
| | | throw new AccidentException(AccidentResultCodes.Report_EMERGENCY_PRECAUTIONS_NULL); |
| | | }*/ |
| | | } |
| | | |
| | | } |
| | |
| | | <id column="id" property="id" jdbcType="BIGINT"/> |
| | | <result column="gmt_moditify" property="gmtModitify"/> |
| | | <result column="create_uid" property="createUid"/> |
| | | <result column="create_name" property="createName"/> |
| | | <result column="accident_cause" property="accidentCause"/> |
| | | <result column="occurrence_time" property="occurrenceTime"/> |
| | | <result column="occurrence_place" property="occurrencePlace"/> |
| | |
| | | </resultMap> |
| | | |
| | | <select id="selectAccidentExpressList" resultMap="AccidentExpressInfoPageDOResult"> |
| | | select id,`gmt_moditify`,`create_uid`,`accident_cause`,`occurrence_time`,occurrence_place ,accident_department_id ,accident_name |
| | | select id,`gmt_moditify`,`create_uid`,`accident_cause`,`occurrence_time`,occurrence_place ,accident_department_id ,accident_name ,create_name |
| | | from accident_express where del_flag = 0 |
| | | <if test="query.accidentName != null and query.accidentName != ''">and `accident_name` like concat('%', #{query.accidentName}, '%')</if> |
| | | </select> |
| | | |
| | | <insert id="addAccidentExpress" parameterType="com.gkhy.safePlatform.incidentManage.entity.AccidentExpressInfo" |
| | |
| | | <if test="gmtModitify != null ">gmt_moditify,</if> |
| | | <if test="createUid != null ">create_uid,</if> |
| | | <if test="updateUid != null ">update_uid,</if> |
| | | <if test="createName != null and createName != ''">create_name,</if> |
| | | <if test="emergencyPrecautions != null and emergencyPrecautions != ''">emergency_precautions,</if> |
| | | <if test="accidentCausesPreliminaryAnalysis != null and accidentCausesPreliminaryAnalysis != ''">accident_causes_preliminary_analysis,</if> |
| | | <if test="accidentBriefProcess != null and accidentBriefProcess != ''">accident_brief_process,</if> |
| | |
| | | <if test="gmtModitify != null ">#{gmtModitify},</if> |
| | | <if test="createUid != null ">#{createUid},</if> |
| | | <if test="updateUid != null ">#{updateUid},</if> |
| | | <if test="createName != null and createName != ''">#{createName},</if> |
| | | <if test="emergencyPrecautions != null and emergencyPrecautions != ''">#{emergencyPrecautions},</if> |
| | | <if test="accidentCausesPreliminaryAnalysis != null and accidentCausesPreliminaryAnalysis != ''">#{accidentCausesPreliminaryAnalysis},</if> |
| | | <if test="accidentBriefProcess != null and accidentBriefProcess != ''">#{accidentBriefProcess},</if> |
| | |
| | | <if test="accidentHandling != null and accidentHandling != ''">accident_handling,</if> |
| | | <if test="fillInUserUid != null ">fill_in_user_uid,</if> |
| | | <if test="fillInTime != null ">fill_in_time,</if> |
| | | <if test="fillInUserName != null and fillInUserName != ''">fill_in_user_name,</if> |
| | | <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">relevant_personnel_records,</if> |
| | | <if test="otherMaterials != null and otherMaterials != ''">other_materials,</if> |
| | | </trim> |
| | |
| | | <if test="accidentHandling != null and accidentHandling != ''">#{accidentHandling},</if> |
| | | <if test="fillInUserUid != null ">#{fillInUserUid},</if> |
| | | <if test="fillInTime != null ">#{fillInTime},</if> |
| | | <if test="fillInUserName != null and fillInUserName != ''">#{fillInUserName},</if> |
| | | <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">#{relevantPersonnelRecords},</if> |
| | | <if test="otherMaterials != null and otherMaterials != ''">#{otherMaterials},</if> |
| | | </trim> |
| | |
| | | <result column="rectification_measures" property="rectificationMeasures"/> |
| | | <result column="accident_handling" property="accidentHandling"/> |
| | | <result column="fill_in_user_uid" property="fillInUserUid"/> |
| | | <result column="fill_in_user_name" property="fillInUserName"/> |
| | | <result column="fill_in_time" property="fillInTime"/> |
| | | <result column="relevant_personnel_records" property="relevantPersonnelRecords"/> |
| | | <result column="other_materials" property="otherMaterials"/> |
| | |
| | | a.`accident_handling`, |
| | | a.`fill_in_user_uid`, |
| | | a.fill_in_time, |
| | | a.fill_in_user_name, |
| | | a.`relevant_personnel_records`, |
| | | a.`other_materials`, |
| | | b.accident_name AS accidentName, |
| | |
| | | <if test="accidentHandling != null and accidentHandling != ''">accident_handling = #{accidentHandling},</if> |
| | | <if test="fillInUserUid != null ">fill_in_user_uid = #{fillInUserUid},</if> |
| | | <if test="fillInTime != null ">fill_in_time = #{fillInTime},</if> |
| | | <if test="fillInUserName != null and fillInUserName != ''">fill_in_user_name = #{fillInUserName},</if> |
| | | <if test="relevantPersonnelRecords != null and relevantPersonnelRecords != ''">relevant_personnel_records = #{relevantPersonnelRecords},</if> |
| | | <if test="otherMaterials != null and otherMaterials != ''">other_materials = #{otherMaterials},</if> |
| | | </trim> |