From f21301daa4f445852bf5bcd97bbe18a36485b1b6 Mon Sep 17 00:00:00 2001 From: liujun Date: Mon, 5 Feb 2024 16:49:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=8A=A8=E7=81=AB=E6=9C=AA?= =?UTF-8?q?=E9=80=9A=E7=9F=A5app=E7=AB=AFbug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../highriskwork/HotworkCfdController.java | 21 +++++++++++++ .../zcloud/service/bus/NoticeCorpUtil.java | 5 ++++ .../service/bus/impl/NoticeCorpUtils.java | 20 +++++++++++++ .../highriskwork/HotworkCfdService.java | 2 ++ .../impl/HotworkCfdServiceImpl.java | 30 +++++++++++++++++++ 5 files changed, 78 insertions(+) diff --git a/src/main/java/com/zcloud/controller/highriskwork/HotworkCfdController.java b/src/main/java/com/zcloud/controller/highriskwork/HotworkCfdController.java index 5d8a61c5..97f21f19 100644 --- a/src/main/java/com/zcloud/controller/highriskwork/HotworkCfdController.java +++ b/src/main/java/com/zcloud/controller/highriskwork/HotworkCfdController.java @@ -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; + } + } + } diff --git a/src/main/java/com/zcloud/service/bus/NoticeCorpUtil.java b/src/main/java/com/zcloud/service/bus/NoticeCorpUtil.java index 6d8a3ee9..a3f9e735 100644 --- a/src/main/java/com/zcloud/service/bus/NoticeCorpUtil.java +++ b/src/main/java/com/zcloud/service/bus/NoticeCorpUtil.java @@ -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; } diff --git a/src/main/java/com/zcloud/service/bus/impl/NoticeCorpUtils.java b/src/main/java/com/zcloud/service/bus/impl/NoticeCorpUtils.java index 8a064539..a495163e 100644 --- a/src/main/java/com/zcloud/service/bus/impl/NoticeCorpUtils.java +++ b/src/main/java/com/zcloud/service/bus/impl/NoticeCorpUtils.java @@ -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); + } + } } diff --git a/src/main/java/com/zcloud/service/highriskwork/HotworkCfdService.java b/src/main/java/com/zcloud/service/highriskwork/HotworkCfdService.java index a5509e72..74c93454 100644 --- a/src/main/java/com/zcloud/service/highriskwork/HotworkCfdService.java +++ b/src/main/java/com/zcloud/service/highriskwork/HotworkCfdService.java @@ -98,5 +98,7 @@ public interface HotworkCfdService { List safetyList(Page page) throws Exception; void confessApproval(PageData request, MultipartFile[] files) throws Exception; + + void deleteInFlow(PageData request) throws Exception; } diff --git a/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java b/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java index 6b6595dd..2bf023bf 100644 --- a/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java +++ b/src/main/java/com/zcloud/service/highriskwork/impl/HotworkCfdServiceImpl.java @@ -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 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"));