删除动火未通知app端bug修复
							parent
							
								
									a9dbc94387
								
							
						
					
					
						commit
						f21301daa4
					
				|  | @ -315,4 +315,25 @@ public class HotworkCfdController extends BaseController { | |||
| 		return mv; | ||||
| 	} | ||||
| 
 | ||||
| 	/** | ||||
| 	 * 删除信息 | ||||
| 	 */ | ||||
| 	@RequestMapping(value="/deleteInFlow") | ||||
| 	@RequiresPermissions("hotwork:del") | ||||
| 	@ResponseBody | ||||
| 	public Object deleteInFlow() throws Exception { | ||||
| 		PageData response = new PageData(); | ||||
| 		try { | ||||
| 			PageData request = this.getPageData(); | ||||
| 			hotworkCfdService.deleteInFlow(request); | ||||
| 			response.put("result", "success"); | ||||
| 			return response; | ||||
| 		} catch (Exception e) { | ||||
| 			e.printStackTrace(); | ||||
| 			response.put("result", "success"); | ||||
| 			response.put("message", e.getMessage()); | ||||
| 			return response; | ||||
| 		} | ||||
| 	} | ||||
| 
 | ||||
| } | ||||
|  |  | |||
|  | @ -32,4 +32,9 @@ public interface NoticeCorpUtil { | |||
|      * description: 申辩不通过 | ||||
|      */ | ||||
|     void FailPleadind(PageData information) throws Exception; | ||||
|     /** | ||||
|      * description: 动火数据删除通知 | ||||
|      * create by liu jun time: 2022/05/23 15:38 | ||||
|      */ | ||||
|     void deleteNotice(PageData information) throws Exception; | ||||
| } | ||||
|  |  | |||
|  | @ -246,4 +246,24 @@ public class NoticeCorpUtils implements NoticeCorpUtil { | |||
|             noticeCorpService.sendNotice(mes); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public void deleteNotice(PageData information) throws Exception { | ||||
|         PageData mes = new PageData(); | ||||
|         mes.put("BIANMA", "HOT_DELETE"); | ||||
|         mes.put("SENDER_ID", information.get("CREATOR"));    // 发送人员ID
 | ||||
|         PageData userInfo = new PageData(); | ||||
|         userInfo.put("USER_ID", information.get("CREATOR")); | ||||
|         userInfo = usersService.findById(userInfo); | ||||
|         if (userInfo != null) { | ||||
|             mes.put("SENDER_NAME", userInfo.getString("NAME"));    // 发送人员姓名
 | ||||
|             mes.put("SYNOPSIS", "动火申请删除");    // 站内信标题
 | ||||
|             mes.put("CORPINFO_ID", information.get("CORPINFO_ID"));// 企业id
 | ||||
|             mes.put("RECEIVER_ID", information.get("USER_ID"));    // 接收人员ID
 | ||||
|             PageData content = new PageData(); | ||||
|             content.put("number", information.get("NUMBER"));    // 作业名称
 | ||||
|             mes.put("CONTENT", content);// 站内信内容
 | ||||
|             noticeCorpService.sendNotice(mes); | ||||
|         } | ||||
|     } | ||||
| } | ||||
|  |  | |||
|  | @ -98,5 +98,7 @@ public interface HotworkCfdService { | |||
|     List<PageData> safetyList(Page page) throws Exception; | ||||
| 
 | ||||
| 	void confessApproval(PageData request, MultipartFile[] files) throws Exception; | ||||
| 
 | ||||
|     void deleteInFlow(PageData request) throws Exception; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -7,8 +7,11 @@ import com.zcloud.mapper.datasource.highriskwork.HotworkAcceptUserCfdMapper; | |||
| import com.zcloud.mapper.datasource.highriskwork.HotworkCfdMapper; | ||||
| import com.zcloud.mapper.datasource.system.DepartmentMapper; | ||||
| import com.zcloud.service.bus.CorpInfoService; | ||||
| import com.zcloud.service.bus.NoticeCorpService; | ||||
| import com.zcloud.service.bus.NoticeCorpUtil; | ||||
| import com.zcloud.service.highriskwork.HotworkCfdService; | ||||
| import com.zcloud.util.DateUtil; | ||||
| import com.zcloud.util.Jurisdiction; | ||||
| import com.zcloud.util.Warden; | ||||
| import org.apache.commons.lang.StringUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
|  | @ -46,6 +49,9 @@ public class HotworkCfdServiceImpl implements HotworkCfdService { | |||
| 	@Resource | ||||
| 	private HotworkAcceptUserCfdMapper hotworkAcceptUserCfdMapper; | ||||
| 
 | ||||
| 	@Resource | ||||
| 	private NoticeCorpUtil noticeCorpUtil; | ||||
| 
 | ||||
| 	/**新增 | ||||
| 	 * @param pd | ||||
| 	 * @throws Exception | ||||
|  | @ -229,6 +235,30 @@ public class HotworkCfdServiceImpl implements HotworkCfdService { | |||
| 
 | ||||
| 	} | ||||
| 
 | ||||
| 	@Override | ||||
| 	public void deleteInFlow(PageData request) throws Exception { | ||||
| 		// 删除审批信息
 | ||||
| 		PageData condition = new PageData(); | ||||
| 		condition.put("HOTWORK_ID", request.get("HOTWORK_ID")); | ||||
| 		condition.put("IS_DELETE", "0"); | ||||
| 		condition.put("VALID_FLAG", "1"); | ||||
| 		List<PageData> oldEntity = busHotworkCfdExamineMapper.listAll(condition); | ||||
| 		for (PageData entity : oldEntity) { | ||||
| 			entity.put("IS_DELETE", "1"); | ||||
| 			busHotworkCfdExamineMapper.edit(entity); | ||||
| 		} | ||||
| 		condition.clear(); | ||||
| 		condition.put("HOTWORK_ID", request.get("HOTWORK_ID")); | ||||
| 		PageData entity = hotworkCfdMapper.findById(condition); | ||||
| 		hotworkCfdMapper.delete(entity); | ||||
| 		PageData info = new PageData(); | ||||
| 		info.put("CORPINFO_ID", request.get("CORPINFO_ID")); | ||||
| 		info.put("USER_ID",entity.get("CREATOR")); | ||||
| 		info.put("CREATOR", Jurisdiction.getUSER_ID()); | ||||
| 		info.put("NUMBER",entity.get("CHECK_NO")); | ||||
| 		noticeCorpUtil.deleteNotice(info); | ||||
| 	} | ||||
| 
 | ||||
| 	private void getCorpInfo(PageData entity) throws Exception { | ||||
| 		PageData condition = new PageData(); | ||||
| 		condition.put("DEPARTMENT_ID", entity.getString("DEPARTMENT_ID")); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue