From 7d8727867d46d56a42896d90c77382dd12645839 Mon Sep 17 00:00:00 2001 From: limingyu Date: Wed, 27 Mar 2024 17:53:29 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E9=9A=90=E6=82=A3=E5=BF=AB=E6=8A=A5?= =?UTF-8?q?=E9=9A=90=E6=82=A3=E5=8F=91=E7=8E=B0=E4=BA=BA=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=B8=BA=E5=8D=95=E9=80=89=EF=BC=8C=E5=B9=B6=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E4=BF=AE=E6=94=B9;2=E4=BF=AE=E5=A4=8D=E9=9A=90=E6=82=A3?= =?UTF-8?q?=E6=8E=92=E6=9F=A5=20=E5=A4=9A=E6=AC=A1=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=B8=85=E5=8D=95=E4=B9=8B=E5=90=8E=20?= =?UTF-8?q?=E6=9C=89=E6=8A=A5=E9=94=99;3=E3=80=81=E9=87=8D=E7=82=B9?= =?UTF-8?q?=E5=B7=A5=E7=A8=8B=E5=AE=89=E5=85=A8=E7=8E=AF=E4=BF=9D=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E5=8A=A0=20=E5=BD=92=E6=A1=A3=E7=8A=B6=E6=80=81=20?= =?UTF-8?q?=E5=BD=92=E6=A1=A3=E7=8A=B6=E6=80=81=E5=B0=B1=E6=98=AF=E6=A3=80?= =?UTF-8?q?=E6=9F=A5=E7=A1=AE=E8=AE=A4=E5=B9=B6=E4=B8=94=E9=9A=90=E6=82=A3?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E9=AA=8C=E6=94=B6;4=E3=80=81=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E9=87=8D=E5=A4=A7=E9=9A=90=E6=82=A3=E8=A2=AB=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E4=B8=BA=E5=BF=BD=E7=95=A5=E9=9A=90=E6=82=A3=E5=90=8E?= =?UTF-8?q?=20=E9=9A=90=E6=82=A3=E7=BA=A7=E5=88=AB=E6=98=BE=20=E7=A4=BA?= =?UTF-8?q?=E9=94=99=E8=AF=AF;5=E3=80=81=E9=9A=90=E6=82=A3=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E4=BA=BA=E3=80=81=E6=95=B4=E6=94=B9=E4=BA=BA=E3=80=81?= =?UTF-8?q?=E9=AA=8C=E6=94=B6=E4=BA=BA=E8=83=BD=E7=9C=8B=E5=88=B0=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E7=8E=AF=E4=BF=9D=E6=A3=80=E6=9F=A5=E9=AA=8C=E6=94=B6?= =?UTF-8?q?=E6=89=93=E5=9B=9E=E7=9A=84=E4=BF=A1=E6=81=AF;6=E3=80=81?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E7=8E=AF=E4=BF=9D=E6=A3=80=E6=9F=A5=E8=A2=AB?= =?UTF-8?q?=E6=89=93=E5=9B=9E=E6=88=96=E7=94=B3=E8=BE=A9=E5=90=8E=E5=8F=AA?= =?UTF-8?q?=E6=9C=89=E5=8F=91=E8=B5=B7=E4=BA=BA=E8=83=BD=E5=A4=84=E7=90=86?= =?UTF-8?q?;7=E3=80=81=E5=BE=85=E6=A3=80=E6=9F=A5=E4=BA=BA=E6=A0=B8?= =?UTF-8?q?=E5=AE=9E=E3=80=81=E5=BE=85=E8=A2=AB=E6=A3=80=E6=9F=A5=E4=BA=BA?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E8=BF=99=E4=B8=A4=E4=B8=AA=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E5=8D=95=E7=8B=AC=E5=88=A0=E9=99=A4=E5=AE=89?= =?UTF-8?q?=E5=85=A8=E7=8E=AF=E4=BF=9D=E6=A3=80=E6=9F=A5=E5=86=85=E7=9A=84?= =?UTF-8?q?=E9=9A=90=E6=82=A3;8=E3=80=81=E9=A9=BE=E9=A9=B6=E8=88=B1?= =?UTF-8?q?=E7=9A=84=E8=AE=A1=E7=AE=97=E6=96=B9=E5=BC=8F=E5=90=8E=E5=8A=A0?= =?UTF-8?q?=E6=B0=94=E6=B3=A1=EF=BC=8C=E9=BC=A0=E6=A0=87=E6=94=BE=E4=B8=8A?= =?UTF-8?q?=E5=8E=BB=E5=90=8E=E6=98=BE=E7=A4=BA=E7=9B=B8=E5=BA=94=E7=9A=84?= =?UTF-8?q?=E6=96=87=E5=AD=97=E6=8F=8F=E8=BF=B0=E8=A7=84=E5=88=99;9?= =?UTF-8?q?=E3=80=81=E7=9B=91=E7=AE=A1=E7=AB=AF=E5=88=9B=E5=BB=BA=E7=9A=84?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E6=89=BF=E8=AF=BA=E4=B9=A6=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=B8=8D=E8=83=BD=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/AppHiddenController.java | 18 ++++- .../controller/bus/HiddenController.java | 30 ++++++-- .../controller/bus/PromiseController.java | 1 + .../hiddenApi/HiddenApiController.java | 31 ++++++++- .../KeyprojectCheckController.java | 68 +++++++++++++++++++ .../app/AppKeyprojectCheckController.java | 37 ++++++++++ .../keyProjects/KeyprojectHiddenMapper.java | 4 ++ .../zcloud/service/bus/HiddenUserService.java | 6 ++ .../bus/impl/HiddenUserServiceImpl.java | 32 +++++++++ .../keyProjects/KeyprojectHiddenService.java | 9 +++ .../impl/KeyprojectHiddenServiceImpl.java | 10 +++ .../datasource/bus/HiddenExamineMapper.xml | 2 + .../mybatis/datasource/bus/PromiseMapper.xml | 9 ++- .../hiddenApi/HiddenExamineMapper.xml | 2 + .../highriskwork/HotWorkApplicationMapper.xml | 2 +- .../inspection/SafetyEnvironmentalMapper.xml | 2 +- .../keyProjects/KeyprojectHiddenMapper.xml | 21 ++++++ .../dsno2/keyProjects/OutSourcedMapper.xml | 2 +- 18 files changed, 272 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index 2e4fe821..920660ad 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -486,11 +486,23 @@ public class AppHiddenController extends BaseController { return map; }else { userpd.put("USER_ID",departmentService.findById(userpd).getString("HEADMAN")); - if(Tools.notEmpty(usersService.findById(userpd).getString("USER_ID"))){ - pd.put("CONFIRM_USER",usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID - }else { + PageData byId = usersService.findById(userpd); + if (byId == null || Tools.isEmpty(byId.getString("USER_ID"))) { map.put("msg", "未查询到部门负责人"); + return map; + } else { + pd.put("CONFIRM_USER",usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID } + /** + * 下面代码如果findById(userpd)为空,那么getString("USER_ID")会报空指针异常 + * @date 2024年2月6日 + * @author limingyu + */ +// if(Tools.notEmpty(usersService.findById(userpd).getString("USER_ID"))){ +// pd.put("CONFIRM_USER",usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID +// }else { +// map.put("msg", "未查询到部门负责人"); +// } } }else{ if(Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人 diff --git a/src/main/java/com/zcloud/controller/bus/HiddenController.java b/src/main/java/com/zcloud/controller/bus/HiddenController.java index 925cd04c..fad1c03a 100644 --- a/src/main/java/com/zcloud/controller/bus/HiddenController.java +++ b/src/main/java/com/zcloud/controller/bus/HiddenController.java @@ -303,20 +303,42 @@ public class HiddenController extends BaseController { } } pd.put("ISCONFIRM", "0"); - hiddenUserService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1"); +// hiddenUserService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1"); + hiddenUserService.saveRectificationoSingleFinder(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1", pd.getString("hiddenFindCreator")); if (pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")) {//判断是否是重大隐患 PageData userpd = new PageData(); userpd.put("USER_ID", Jurisdiction.getUSER_ID()); userpd.put("DEPARTMENT_ID", usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID if (departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")) {//判断部门级别是不是班组 userpd.put("DEPARTMENT_ID", departmentService.findById(userpd).getString("DEPARTMENT_ID")); - if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人 + String HEADMAN = departmentService.findById(userpd).getString("HEADMAN"); + if (Tools.isEmpty(HEADMAN)){ map.put("msg", "所在部门未维护部门负责人"); return map; } else { - userpd.put("USER_ID", departmentService.findById(userpd).getString("HEADMAN")); - pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID + userpd.put("USER_ID", HEADMAN); + PageData data = usersService.findById(userpd); + if (Tools.isEmpty(data)) { + userpd.put("NAME", HEADMAN); + PageData byName = usersService.findByName(userpd); + if (Tools.isEmpty(byName)) { + map.put("msg", "所在部门未维护部门负责人"); + return map; + } + pd.put("CONFIRM_USER", byName.getString("USER_ID"));//通过名字查询用户获取出ID + } + pd.put("CONFIRM_USER", data.getString("USER_ID"));//通过名字查询用户获取出ID } + /** + * 下面语句usersService.findById(userpd)为空时,getString方法会报空指针异常 + */ +// if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人 +// map.put("msg", "所在部门未维护部门负责人"); +// return map; +// } else { +// userpd.put("USER_ID", departmentService.findById(userpd).getString("HEADMAN")); +// pd.put("CONFIRM_USER", usersService.findById(userpd).getString("USER_ID"));//通过名字查询用户获取出ID +// } } else { if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人 map.put("msg", "所在部门未维护部门负责人"); diff --git a/src/main/java/com/zcloud/controller/bus/PromiseController.java b/src/main/java/com/zcloud/controller/bus/PromiseController.java index aa84702d..20f48509 100644 --- a/src/main/java/com/zcloud/controller/bus/PromiseController.java +++ b/src/main/java/com/zcloud/controller/bus/PromiseController.java @@ -56,6 +56,7 @@ public class PromiseController extends BaseController { pd.put("OPERATOR", "admin"); //创建人 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //创建时间 pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); + pd.put("IS_REGULATORY", 1); // 是否是监管端创建 0监管端 1企业端 promiseService.save(pd); List list = (List) JSON.parse(pd.getString("DETAIL")); if(list.size()>0){ diff --git a/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java b/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java index 5bd872b4..b93b92ef 100644 --- a/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java +++ b/src/main/java/com/zcloud/controller/hiddenApi/HiddenApiController.java @@ -166,7 +166,8 @@ public class HiddenApiController extends BaseController { pd.put("HIDDENPART", hiddenRegion.getString("HIDDENREGION_ID")); } /** 隐患的主要负责人 一条隐患 多个隐患发现人 ,把多个信息填入这个张表中 */ - hiddenUserApiService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1", Jurisdiction.getUSER_ID()); +// hiddenUserApiService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1", Jurisdiction.getUSER_ID()); + hiddenUserApiService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1", pd.getString("hiddenFindCreator")); /** 初始化隐患确认信息 记录隐患发现人的隐患等级等信息 */ hiddenExamineApiService.saveConfirm(pd, "0"); @@ -1275,4 +1276,32 @@ public class HiddenApiController extends BaseController { mv = new ModelAndView(erv2, dataMap); return mv; } + + /** + * 删除安全环保检查内的隐患 + * + * @throws Exception + */ + @RequestMapping(value = "/deleteHiddenForSafetyenvironmental") + @ResponseBody + public Object deleteHiddenForSafetyenvironmental() throws Exception { + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + + PageData hidden = hiddenApiService.findById(pd); + Integer deleteHidden = hiddenApiService.deleteApi(pd.getString("HIDDEN_ID")); //修改隐患的状态 + map.put("deleteHidden", deleteHidden); + /** 隐患相关人员 */ + Integer deleteHiddenUserType = hiddenUserApiService.deleteByHidden(pd.getString("HIDDEN_ID")); + map.put("deleteHiddenUserType", deleteHiddenUserType); + /** 删除隐患流程信息 */ + Integer deleteHiddenExaType = hiddenExamineApiService.deleteByHiddenId(pd); + map.put("deleteHiddenExaType", deleteHiddenExaType); + + map.put("result", errInfo); + map.put("pd", pd); + return map; + } } diff --git a/src/main/java/com/zcloud/controller/keyProjects/KeyprojectCheckController.java b/src/main/java/com/zcloud/controller/keyProjects/KeyprojectCheckController.java index 309d9af1..1bed218e 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/KeyprojectCheckController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/KeyprojectCheckController.java @@ -12,6 +12,7 @@ import com.zcloud.service.keyProjects.KeyprojectHiddenService; import com.zcloud.util.DateUtil; import com.zcloud.util.Tools; import com.zcloud.util.UuidUtil; +import org.apache.commons.lang.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -162,6 +163,40 @@ public class KeyprojectCheckController extends BaseController { if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); page.setPd(pd); List varList = keyprojectcheckService.list(page); //列出KeyprojectCheck列表 + if (varList.size() > 0) { + List foreignIdList = new ArrayList<>(); + for (PageData data : varList) { + foreignIdList.add(data.getString("KEYPROJECTCHECK_ID")); + } + // 查询列表中安全环保检查下所有的隐患 + List allKeyprojectHiddenList = keyprojectHiddenService.listByForeignIds(foreignIdList); + for (PageData data : varList) { + if (StringUtils.equals(data.getString("INSPECTION_STATUS"), "1")) { + boolean isCheck = true; // 安全环保检查是否验收 + List keyProjectHiddenList = new ArrayList<>(); + for (PageData pageData : allKeyprojectHiddenList) { + if (StringUtils.equals(pageData.getString("FOREIGN_ID"), data.getString("KEYPROJECTCHECK_ID"))) { + keyProjectHiddenList.add(pageData); + } + } + if (keyProjectHiddenList.size() > 0) { + for (PageData pageData : keyProjectHiddenList) { + if (!StringUtils.equals(pageData.getString("STATE"), "4")) { + isCheck = false; + } + } + } else { + if (!data.getString("INSPECTION_STATUS").equals("1")) { + isCheck = false; + } + } + if (isCheck) { + // 安全环保检查验收 + data.put("INSPECTION_STATUS", "2"); + } + } + } + } map.put("varList", varList); map.put("page", page); map.put("result", errInfo); @@ -266,4 +301,37 @@ public class KeyprojectCheckController extends BaseController { return map; } + /**删除安全环保检查及其对应隐患 + * @param + * @throws Exception + */ + @RequestMapping(value="/goDelete") + @ResponseBody + public Object goDelete() throws Exception{ + Map map = new HashMap(); + String errInfo = "success"; + PageData pd = new PageData(); + pd = this.getPageData(); + + // 删除安全环保检查下对应的隐患 + if (Tools.notEmpty(pd.getString("KEYPROJECTCHECK_ID"))) { + PageData hiddenPd = new PageData(); + hiddenPd.put("FOREIGN_ID", pd.getString("KEYPROJECTCHECK_ID")); + List hiddenList = keyprojectHiddenService.listAllInspection(hiddenPd); + if (hiddenList.size() > 0) { + List hiddenIds = new ArrayList<>(); + for (PageData hiddenData : hiddenList) { + hiddenIds.add(hiddenData.getString("HIDDEN_ID")); + } + // 将hiddenIds转为数组 + String[] hiddenIdArray = new String[hiddenIds.size()]; + hiddenIdArray = hiddenIds.toArray(hiddenIdArray); + keyprojectHiddenService.deleteByIds(hiddenIdArray); + } + } + keyprojectcheckService.delete(pd); + map.put("result", errInfo); + return map; + } + } diff --git a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java index 9b5ce3a1..4c50ff62 100644 --- a/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java +++ b/src/main/java/com/zcloud/controller/keyProjects/app/AppKeyprojectCheckController.java @@ -226,6 +226,43 @@ public class AppKeyprojectCheckController extends BaseController { if(Tools.notEmpty(KEYWORDS))pd.put("KEYWORDS", KEYWORDS.trim()); page.setPd(pd); List varList = keyprojectcheckService.list(page); //列出KeyprojectCheck列表 + if (varList.size() > 0) { + List foreignIdList = new ArrayList<>(); + for (PageData data : varList) { + foreignIdList.add(data.getString("KEYPROJECTCHECK_ID")); + } + // 查询列表中安全环保检查下所有的隐患 + List allKeyprojectHiddenList = keyprojectHiddenService.listByForeignIds(foreignIdList); + for (PageData data : varList) { + if (StringUtils.equals(data.getString("INSPECTION_STATUS"), "1")) { + boolean isCheck = true; // 安全环保检查是否验收 + List keyProjectHiddenList = new ArrayList<>(); // 单个安全环保检查下的隐患集合 + for (PageData pageData : allKeyprojectHiddenList) { + if (StringUtils.equals(pageData.getString("FOREIGN_ID"), data.getString("KEYPROJECTCHECK_ID"))) { + // 遍历所有的隐患,把对应安全环保检查下的隐患放到一个集合中 + keyProjectHiddenList.add(pageData); + } + } + if (keyProjectHiddenList.size() > 0) { + // 判断安全环保检查下是否有隐患 + for (PageData pageData : keyProjectHiddenList) { + if (!StringUtils.equals(pageData.getString("STATE"), "4")) { + // 如果隐患列表中存在未验收的隐患,则安全环保检查未验收 + isCheck = false; + } + } + } else { + if (!data.getString("INSPECTION_STATUS").equals("1")) { + isCheck = false; + } + } + if (isCheck) { + // 安全环保检查验收 + data.put("INSPECTION_STATUS", "2"); + } + } + } + } map.put("varList", varList); map.put("page", page); map.put("result", errInfo); diff --git a/src/main/java/com/zcloud/mapper/datasource/keyProjects/KeyprojectHiddenMapper.java b/src/main/java/com/zcloud/mapper/datasource/keyProjects/KeyprojectHiddenMapper.java index 0fbcecc3..963490e1 100644 --- a/src/main/java/com/zcloud/mapper/datasource/keyProjects/KeyprojectHiddenMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/keyProjects/KeyprojectHiddenMapper.java @@ -167,5 +167,9 @@ public interface KeyprojectHiddenMapper { List getPhone(PageData pd); + + List listByForeignIds(List foreignIdList); + + void deleteByIds(String[] hiddenIdArray); } diff --git a/src/main/java/com/zcloud/service/bus/HiddenUserService.java b/src/main/java/com/zcloud/service/bus/HiddenUserService.java index 959576d6..fc7b5aac 100644 --- a/src/main/java/com/zcloud/service/bus/HiddenUserService.java +++ b/src/main/java/com/zcloud/service/bus/HiddenUserService.java @@ -90,5 +90,11 @@ public interface HiddenUserService{ * @throws Exception */ void deleteByHidden (PageData pd) throws Exception; + + /** + * 添加隐患整改人(隐患发现人改为单人) + * @throws Exception + */ + void saveRectificationoSingleFinder(String userIds, String hiddenId, String type, String hiddenFindCreator)throws Exception; } diff --git a/src/main/java/com/zcloud/service/bus/impl/HiddenUserServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/HiddenUserServiceImpl.java index aefd2ea3..55fb2461 100644 --- a/src/main/java/com/zcloud/service/bus/impl/HiddenUserServiceImpl.java +++ b/src/main/java/com/zcloud/service/bus/impl/HiddenUserServiceImpl.java @@ -190,5 +190,37 @@ public class HiddenUserServiceImpl implements HiddenUserService{ public void deleteByHidden(PageData pd) throws Exception { hiddenuserMapper.deleteByHidden(pd); } + + @Override + public void saveRectificationoSingleFinder(String userIds, String hiddenId, String type, String hiddenFindCreator) throws Exception { + if(!Tools.isEmpty(hiddenId)){ + PageData del = new PageData(); + del.put("TYPE",type); + del.put("HIDDEN_ID",hiddenId); + hiddenuserMapper.deleteByHidden(del); // 先删除后添加 + } + if(!Tools.isEmpty(userIds)){ + String removeLoginUser = userIds.replaceAll(Jurisdiction.getUSER_ID(),""); //去除当前登录人的用户id + String userID [] = removeLoginUser.split(","); + for (int i =0;i getPhone(PageData pd); + + List listByForeignIds(List foreignIdList); + + /** + * 通过id列表批量删除隐患 + * @param hiddenIdArray + * @throws Exception + */ + void deleteByIds(String[] hiddenIdArray); } diff --git a/src/main/java/com/zcloud/service/keyProjects/impl/KeyprojectHiddenServiceImpl.java b/src/main/java/com/zcloud/service/keyProjects/impl/KeyprojectHiddenServiceImpl.java index 99fc74dc..beb7b93e 100644 --- a/src/main/java/com/zcloud/service/keyProjects/impl/KeyprojectHiddenServiceImpl.java +++ b/src/main/java/com/zcloud/service/keyProjects/impl/KeyprojectHiddenServiceImpl.java @@ -263,5 +263,15 @@ public class KeyprojectHiddenServiceImpl implements KeyprojectHiddenService { public List getPhone(PageData pd) { return hiddenMapper.getPhone(pd); } + + @Override + public List listByForeignIds(List foreignIdList) { + return hiddenMapper.listByForeignIds(foreignIdList); + } + + @Override + public void deleteByIds(String[] hiddenIdArray) { + hiddenMapper.deleteByIds(hiddenIdArray); + } } diff --git a/src/main/resources/mybatis/datasource/bus/HiddenExamineMapper.xml b/src/main/resources/mybatis/datasource/bus/HiddenExamineMapper.xml index d9265867..13c29d5b 100644 --- a/src/main/resources/mybatis/datasource/bus/HiddenExamineMapper.xml +++ b/src/main/resources/mybatis/datasource/bus/HiddenExamineMapper.xml @@ -197,6 +197,7 @@ , users.NAME as NEWRECTIFICATIONOR ,exa.RECTIFICATIONDEADLINE as spare3 ,re.name as editUserName + ,usera.name as CREATORNAME from f LEFT JOIN sys_user user on user.USER_ID = f.spare2 @@ -205,6 +206,7 @@ LEFT JOIN sys_dictionaries LEVEL on LEVEL.BIANMA = f.spare1 LEFT JOIN BUS_HIDDEN exa ON f.HIDDEN_ID = exa.HIDDEN_ID LEFT JOIN sys_user re ON re.USER_ID = exa.RECTIFICATIONOR + LEFT JOIN sys_user usera ON usera.USER_ID = f.CREATOR where 1=1 and f.HIDDEN_ID = #{HIDDEN_ID} diff --git a/src/main/resources/mybatis/datasource/bus/PromiseMapper.xml b/src/main/resources/mybatis/datasource/bus/PromiseMapper.xml index f70f1413..4e460ac2 100644 --- a/src/main/resources/mybatis/datasource/bus/PromiseMapper.xml +++ b/src/main/resources/mybatis/datasource/bus/PromiseMapper.xml @@ -24,7 +24,8 @@ f.OPERATOR, f.OPERATTIME, f.CORPINFO_ID, - f.TYPE + f.TYPE, + f.IS_REGULATORY @@ -39,7 +40,8 @@ OPERATOR, OPERATTIME, CORPINFO_ID, - TYPE + TYPE, + IS_REGULATORY @@ -54,7 +56,8 @@ #{OPERATOR}, #{OPERATTIME}, #{CORPINFO_ID}, - #{TYPE} + #{TYPE}, + #{IS_REGULATORY} diff --git a/src/main/resources/mybatis/datasource/hiddenApi/HiddenExamineMapper.xml b/src/main/resources/mybatis/datasource/hiddenApi/HiddenExamineMapper.xml index 8c114cb7..59b1c5a6 100644 --- a/src/main/resources/mybatis/datasource/hiddenApi/HiddenExamineMapper.xml +++ b/src/main/resources/mybatis/datasource/hiddenApi/HiddenExamineMapper.xml @@ -185,12 +185,14 @@ , dept.name as editDeptName , LEVEL.name as editLevelName , users.NAME as NEWRECTIFICATIONOR + , auser.NAME as CREATORNAME from f LEFT JOIN sys_user user on user.USER_ID = f.spare2 LEFT JOIN sys_user users on users.USER_ID = f.NEW_RECTIFICATIONOR LEFT JOIN oa_department dept on dept.DEPARTMENT_ID = f.spare4 LEFT JOIN sys_dictionaries LEVEL on LEVEL.BIANMA = f.spare1 + LEFT JOIN sys_user auser on auser.USER_ID = f.CREATOR where 1=1 and f.HIDDEN_ID = #{HIDDEN_ID} diff --git a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml index 038b8435..2df76a17 100644 --- a/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml +++ b/src/main/resources/mybatis/datasource/highriskwork/HotWorkApplicationMapper.xml @@ -354,7 +354,7 @@ left join vi_user_all ua on ua.USER_ID = f.OPERATOR LEFT JOIN bus_hotworkapplicationuser bhu ON bhu.FOREIGN_KEY = f.HOTWORKAPPLICATION_ID LEFT JOIN vi_user_all bhuuser ON bhuuser.USER_ID = bhu.USER_ID - left join bus_hotworkapplicationuser hot on f.HOTWORKAPPLICATION_ID = hot.FOREIGN_KEY and hot.ISDELETE ='0' and hot.state='4' + left join bus_hotworkapplicationuser hot on f.HOTWORKAPPLICATION_ID = hot.FOREIGN_KEY and hot.ISDELETE ='0' and hot.state='3' left join sys_user hu on hot.USER_ID = hu.USER_ID left join oa_department hd on hd.DEPARTMENT_ID = hu.DEPARTMENT_ID where f.ISDELETE = '0' diff --git a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalMapper.xml b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalMapper.xml index 6368da5b..78617f49 100644 --- a/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalMapper.xml +++ b/src/main/resources/mybatis/datasource/inspection/SafetyEnvironmentalMapper.xml @@ -758,7 +758,7 @@ COUNT(DISTINCT h.HIDDEN_ID) HIDDEN_COUNT from f - LEFT JOIN bus_hidden h on h.FOREIGN_ID = f.INSPECTION_ID + LEFT JOIN bus_hidden h on h.FOREIGN_ID = f.INSPECTION_ID and h.ISDELETE = '0' LEFT JOIN vi_user_all iou ON iou.USER_ID = f.INSPECTION_ORIGINATOR_ID LEFT JOIN OA_DEPARTMENT ild ON ild.DEPARTMENT_ID = f.INSPECTION_LEADDEPARTMENT_ID LEFT JOIN vi_department_all iod ON iod.DEPARTMENT_ID = iou.DEPARTMENT_ID diff --git a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml index 7121f2de..0437a004 100644 --- a/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/keyProjects/KeyprojectHiddenMapper.xml @@ -1511,6 +1511,18 @@ HIDDEN_ID = #{HIDDEN_ID} + + update + + set + ISDELETE = '1' + where + HIDDEN_ID in + + #{item} + + + update @@ -1641,4 +1653,13 @@ FROM + + diff --git a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml index b282d600..27164995 100644 --- a/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml +++ b/src/main/resources/mybatis/dsno2/keyProjects/OutSourcedMapper.xml @@ -316,7 +316,7 @@ LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT FROM - ( SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.* FROM `qa-gwj-prevention`.bus_keyproject_hidden h LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID ) t GROUP BY t.OUTSOURCED_ID ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID + ( SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.* FROM `qa-gwj-prevention`.bus_keyproject_hidden h LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID and h.ISDELETE = '0') t GROUP BY t.OUTSOURCED_ID ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID where f.ISDELETE = '0' and