diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index beec1ce..2ea53d8 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -147,15 +147,15 @@ public class AppHiddenController extends BaseController { } } -// List checkorHid = hiddenService.getCountByCheckorId(pd); // 根据人员id获取整改隐患信息 state 1 5 - List checkorHid = hiddenService.getRiskStandardCountByCheckorId(pd); // 根据用户ID获取待验收隐患(app首页) + List checkorHid = hiddenService.getCountByCheckorId(pd); // 根据人员id获取整改隐患信息 state 1 5 +// List checkorHid = hiddenService.getRiskStandardCountByCheckorId(pd); // 根据用户ID获取待验收隐患(app首页) for (int i = 0; i < checkorHid.size(); i++) { PageData che = checkorHid.get(i); if (null == che.get("STATE")) { continue; } -// if (che.get("STATE").equals("2")) { //原来是3,但是手机端待验收数据与列表数据不对。调整为2 - if (che.get("STATE").equals("3")) { + if (che.get("STATE").equals("2")) { //原来是3,但是手机端待验收数据与列表数据不对。调整为2 +// if (che.get("STATE").equals("3") && pd.getString("USER_ID").equals(che.get("CHECKOR"))) { dys++; } } @@ -187,11 +187,9 @@ public class AppHiddenController extends BaseController { } } - - - -// List creatorHid = hiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息 - List creatorHid = hiddenService.getRiskStandardCountByCreatorId(pd); // 根据用户ID获取发现隐患信息(app首页) + List creatorHid = hiddenService.getCountByCreatorId(pd); // 根据人员id获取发现隐患信息 +// List creatorHid = hiddenService.getRiskStandardCountByCreatorId(pd); // 根据用户ID获取发现隐患信息(app首页) + System.out.println(creatorHid); for (int i = 0; i < creatorHid.size(); i++) { PageData cre = creatorHid.get(i); if (null == cre.get("STATE")) { @@ -203,9 +201,9 @@ public class AppHiddenController extends BaseController { if (cre.get("STATE").equals("4")) { yys++; } -// if(cre.get("STATE").equals("3")) { -// dys++; -// } + if(cre.get("STATE").equals("3")) { + dys++; + } if (cre.get("STATE").equals("-1")) { ycq++; } @@ -1117,6 +1115,8 @@ public class AppHiddenController extends BaseController { corpinfo = corpinfoService.findById(pd); pd.put("STATE","2"); pd.put("INVESTMENT_FUNDS",pd.getString("INVEST_FUNDS")); + pd.put("CHECKOR",pd.getString("USER_ID")); + pd.put("CHECKDEPT",pd.getString("DEPARTMENT_ID")); hiddenService.rectify(pd); pd.put("HIDDENSCHEME_ID", this.get32UUID()); // 主键 @@ -1290,7 +1290,10 @@ public class AppHiddenController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); if (pd.get("ISQUALIFIED").equals("1")) { //验收合格 - List pd2 = (List) this.hiddenCheckService.findByHidden(pd); //获取这个隐患的验收人信息 + //List pd2 = (List) this.hiddenCheckService.findByHidden(pd); //获取这个隐患的验收人信息 + PageData page = this.hiddenCheckService.findByHidden(pd); + List pd2 = new ArrayList<>(); + pd2.add(page); if(pd2.size()>0){ for(PageData checklist: pd2){ pd.put("STATUS", 1); @@ -1374,7 +1377,7 @@ public class AppHiddenController extends BaseController { @RequestMapping(value = "/list") @ResponseBody public Object list() throws Exception { - Map map = new HashMap(); + Map map = new HashMap(); String errInfo = "success"; PageData pd = new PageData(); Page page = new Page(); @@ -1406,8 +1409,11 @@ public class AppHiddenController extends BaseController { String ENDTIME = pd.getString("ENDTIME"); // 关键词检索条件 if (Tools.notEmpty(ENDTIME)) pd.put("ENDTIME", ENDTIME.trim()); - if (pd.get("isIndex") != null && Tools.notEmpty(pd.get("isIndex").toString()) - && pd.get("isIndex").toString().equals("1")) { + if ("undefined".equals(pd.getString("isIndex"))) { + pd.put("isIndex", ""); + } + if (pd.get("isIndex") != null && Tools.notEmpty(pd.get("isIndex").toString()) + && "1".equals(pd.get("isIndex").toString())) { pd.put("SELF_USER_ID", pd.get("SELFUSERID")); } pd.put("ISMAIN", "0"); @@ -1503,7 +1509,10 @@ public class AppHiddenController extends BaseController { PageData pd = new PageData(); pd = this.getPageData(); pd = hiddenService.findById(pd); // 根据ID读取 - if(pd.get("CONFIRM_USER")!=null || pd.getString("CONFIRM_USER").equals("undefined")){ + if(pd.getString("CONFIRM_USER")==null){ + pd.put("CONFIRM_USER",""); + } + if(pd.getString("CONFIRM_USER")!=null || pd.getString("CONFIRM_USER").equals("undefined")){ pd.put("USER_ID",pd.getString("CONFIRM_USER")); PageData user = usersService.findById(pd); if(user!=null){ @@ -1517,6 +1526,8 @@ public class AppHiddenController extends BaseController { List hImgs = imgFilesService.listAll(pd2);// 隐患图片 pd2.put("TYPE", 4); List rImgs = imgFilesService.listAll(pd2);// 整改图片 + pd2.put("TYPE", 22); + List pImgs = imgFilesService.listAll(pd2);// 计划图片 /* * pd2.put("TYPE",5); List cImgs = imgFilesService.listAll(pd2);//验收图片 d770367816c34f53bf22177da3965f6c */ // 查询整改方案 @@ -1562,6 +1573,7 @@ public class AppHiddenController extends BaseController { map.put("hs", hs); map.put("hImgs", hImgs); map.put("rImgs", rImgs); + map.put("pImgs", pImgs); map.put("hiddenVideo", imgFilesService.getListByKeyAndType(pd.getString("HIDDEN_ID"),"102"));// 隐患视频 // map.put("cImgs", cImgs); map.put("sImgs", sImgs); @@ -1596,7 +1608,6 @@ public class AppHiddenController extends BaseController { pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); pd.put("HIDDENLEVEL", "hiddenLevel0001");// 一般隐患 List nhds = hiddenService.hiddenStatisticsByDay(pd); - System.out.println(nhds.toString()); pd.put("HIDDENLEVEL", "hiddenLevel0002");// 一般隐患 List zhds = hiddenService.hiddenStatisticsByDay(pd); @@ -1762,7 +1773,6 @@ public class AppHiddenController extends BaseController { map.put("msg", errInfo); return map; } - } PageData editHidden = new PageData(); if("hiddenLevel1001".equals(pd.getString("HIDDENLEVEL"))){ // 如果是忽略隐患 @@ -1781,8 +1791,9 @@ public class AppHiddenController extends BaseController { editHidden.put("RECTIFICATIONDEADLINE",pd.get("RECTIFICATIONDEADLINE")); // 整改期限 editHidden.put("HIDDENLEVEL",pd.get("HIDDENLEVEL")); // 隐患级别 editHidden.put("HIDDEN_ID",pd.get("HIDDEN_ID")); // 隐患id + editHidden.put("RECTIFICATIONTYPE",pd.get("RECTIFICATIONTYPE")); PageData hidden = hiddenService.findById(pd); - if("1".equals(hidden.get("RECTIFICATIONTYPE").toString())){ + if("1".equals(hidden.get("RECTIFICATIONTYPE")+"")){ editHidden.put("STATE","4"); } PageData exaPd = new PageData(); // 添加隐患确认信息 @@ -1796,7 +1807,7 @@ public class AppHiddenController extends BaseController { exaPd.put("CREATOR", pd.getString("loginUserId")); exaPd.put("OPERATOR",pd.getString("loginUserId")); hiddenExamineService.saveApp(exaPd); - if("1".equals(hidden.get("RECTIFICATIONTYPE").toString())){ //确认时判断是否是立即整改 + if("1".equals(hidden.get("RECTIFICATIONTYPE")+"")){ //确认时判断是否是立即整改 if(pd.getString("isTrue").equals("1")){ editHidden.put("STATE","4"); editHidden.put("CHECKOR",hidden.getString("CREATOR")); @@ -1804,7 +1815,22 @@ public class AppHiddenController extends BaseController { editHidden.put("STATE","1"); editHidden.put("RECTIFICATIONTYPE","2"); } - + } + pd.put("STATE", pd.getString("HIDDEN_STATUS")); + List list = hiddenService.listOtherNotAssign(pd); + PageData inspection = new PageData(); + inspection.put("INSPECTION_ID", pd.getString("INSPECTION_ID")); + inspection.put("OPERATOR", pd.getString("OPERATOR")); + inspection.put("OPERATTIME", DateUtil.date2Str(new Date())); + if ("-2".equals(pd.getString("HIDDEN_STATUS"))) { + pd.put("ISCONFIRM", "0"); // + pd.put("CONFIRM_TIME",DateUtil.date2Str(new Date())); + if (list.size() == 0) { + inspection.put("INSPECTION_STATUS", "5"); // 指派完成 + } else { + inspection.put("INSPECTION_STATUS", "4"); // 指派中 + } + safetyenvironmentalService.editStatus(inspection); } hiddenService.confirmHidden(editHidden); // 隐患确认 if(Tools.notEmpty(pd.getString("RECTIFICATIONOR")) && !hidden.getString("RECTIFICATIONTYPE").equals("1")){ diff --git a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java index ac83c80..b0c8389 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalController.java @@ -15,6 +15,7 @@ import com.zcloud.service.system.DepartmentService; import com.zcloud.util.*; import org.apache.commons.lang.StringUtils; import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.apache.shiro.crypto.hash.Md5Hash; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @@ -25,6 +26,9 @@ import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import java.util.*; +import java.util.stream.Collectors; + +import static com.sun.xml.internal.ws.spi.db.BindingContextFactory.LOGGER; /** * 说明:安全环保检查 @@ -148,7 +152,7 @@ public class AppSafetyEnvironmentalController extends BaseController { String errInfo = "success"; PageData pd = new PageData(); pd = this.getPageData(); - pd = safetyenvironmentalService.findFormById(pd); //根据ID读取 + pd = safetyenvironmentalService.findFormById(pd);//根据ID读取 safetyenvironmentalService.departmentUtil(pd); map.put("pd", pd); map.put("result", errInfo); @@ -502,10 +506,16 @@ public class AppSafetyEnvironmentalController extends BaseController { if ("4".equals(safety.getString("order"))) { // 2、2 隐患发现人状态 condition.put("FOREIGN_ID", condition.getString("INSPECTION_ID")); - List hiddens = hiddenService.findByKey(condition); + List hiddenList = hiddenService.findByKey(condition); + condition.put("HIDDEN_ID", hiddenList.get(0).getString("HIDDEN_ID")); + List hiddens = hiddenService.findByKeyHiddencheck(condition); + List newHiddens = hiddens.stream() + .filter(pd -> "1".equals(pd.getString("STATUS"))) + .collect(Collectors.toList()); + nodes.stream() .filter(n -> "4".equals(n.getOrder())) - .forEach(n -> n.safety_hiddenCreator_util(hiddens)); + .forEach(n -> n.safety_hiddenCreator_util(newHiddens)); } // 2、3 考评人 // List assess = assessService.findByMainId(condition); diff --git a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java index 47226d5..8cf6409 100644 --- a/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java +++ b/src/main/java/com/zcloud/controller/app/inspection/AppSafetyEnvironmentalInspectorController.java @@ -71,6 +71,7 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController { pd = this.getPageData(); PageData uBean = safetyenvironmentalinspectorService.findById(pd); uBean.put("INSPECTION_USER_OPINION", pd.getString("INSPECTION_USER_OPINION")); + uBean.put("INSPECTED_SITEUSER_SIGN_IMG", pd.getString("INSPECTED_SITEUSER_SIGN_IMG")); uBean.put("INSPECTION_USER_SIGN_TIME", pd.getString("INSPECTION_USER_SIGN_TIME")); uBean.put("INSPECTION_STATUS", pd.getString("INSPECTION_STATUS")); //检查进度状态 uBean.put("OPERATOR", pd.getString("OPERATOR")); //修改人 diff --git a/src/main/java/com/zcloud/entity/hotWorkApplication/Node.java b/src/main/java/com/zcloud/entity/hotWorkApplication/Node.java index 2e19280..24abed2 100644 --- a/src/main/java/com/zcloud/entity/hotWorkApplication/Node.java +++ b/src/main/java/com/zcloud/entity/hotWorkApplication/Node.java @@ -152,6 +152,7 @@ public class Node { buffer.append(this.getText()); for (PageData hidden : hiddens) { buffer.append("
"); + buffer.append("验收人:"); buffer.append(hidden.getString("HIDDEN_CREATOR_NAME")); if (StringUtils.isNotBlank(hidden.getString("FINAL_CHECKTIME"))){ buffer.append("
("); @@ -182,6 +183,9 @@ public class Node { buffer.append("
"); buffer.append("指派人:"); buffer.append(hiddeny.getString("YINNAME")); + buffer.append("
("); + buffer.append(hiddeny.getString("CREATTIME")); + buffer.append(")"); } this.text = buffer.toString(); @@ -190,12 +194,16 @@ public class Node { StringBuffer buffer = new StringBuffer(); buffer.append(this.getText()); for (PageData qr:qrs) { - buffer.append("
"); - buffer.append("确认人:"); - buffer.append(qr.getString("conUserName")); - buffer.append("
("); - buffer.append(qr.getString("CONFIRM_TIME")); - buffer.append(")"); + + if (StringUtils.isNotBlank(qr.getString("conUserName"))) { + buffer.append("
"); + buffer.append("确认人:"); + buffer.append(qr.getString("conUserName")); + buffer.append("
("); + buffer.append(qr.getString("CONFIRM_TIME")); + buffer.append(")"); + } + } this.text = buffer.toString(); } @@ -203,12 +211,15 @@ public class Node { StringBuffer buffer = new StringBuffer(); buffer.append(this.getText()); for (PageData ts:tss) { - buffer.append("
"); - buffer.append("审批人:"); - buffer.append(ts.getString("tsname")); + if (StringUtils.isNotBlank(ts.getString("tsname"))) { + buffer.append("
"); + buffer.append("审批人:"); + buffer.append(ts.getString("tsname")); // buffer.append("
("); // buffer.append(ts.getString("tstiem")); // buffer.append(")"); + } + } this.text = buffer.toString(); } @@ -216,12 +227,17 @@ public class Node { StringBuffer buffer = new StringBuffer(); buffer.append(this.getText()); for (PageData zg:zgs) { - buffer.append("
"); - buffer.append("整改人:"); - buffer.append(zg.getString("RECTIFICATIONORNAME")); - buffer.append("
("); - buffer.append(zg.getString("RECTIFICATIONTIME")); - buffer.append(")"); + if (StringUtils.isNotBlank(zg.getString("RECTIFICATIONORNAME"))) { + buffer.append("
"); + buffer.append("整改人:"); + buffer.append(zg.getString("RECTIFICATIONORNAME")); + if (StringUtils.isNotBlank(zg.getString("RECTIFICATIONTIME"))) { + buffer.append("
("); + buffer.append(zg.getString("RECTIFICATIONTIME")); + buffer.append(")"); + } + } + } this.text = buffer.toString(); } @@ -229,12 +245,17 @@ public class Node { StringBuffer buffer = new StringBuffer(); buffer.append(this.getText()); for (PageData ys:yss) { - buffer.append("
"); - buffer.append("验收人:"); - buffer.append(ys.getString("CHECKORNAME")); - buffer.append("
("); - buffer.append(ys.getString("CHECK_TIME")); - buffer.append(")"); + if (StringUtils.isNotBlank(ys.getString("CHECKORNAME"))) { + buffer.append("
"); + buffer.append("验收人:"); + buffer.append(ys.getString("CHECKORNAME")); + if(StringUtils.isNotBlank(ys.getString("CHECK_TIME"))){ + buffer.append("
("); + buffer.append(ys.getString("CHECK_TIME")); + buffer.append(")"); + } + } + } this.text = buffer.toString(); } diff --git a/src/main/java/com/zcloud/entity/hotWorkApplication/NodeApp.java b/src/main/java/com/zcloud/entity/hotWorkApplication/NodeApp.java index e77d58c..5f5b398 100644 --- a/src/main/java/com/zcloud/entity/hotWorkApplication/NodeApp.java +++ b/src/main/java/com/zcloud/entity/hotWorkApplication/NodeApp.java @@ -96,13 +96,14 @@ public class NodeApp { public void safety_flow_text_util(PageData information){ switch (this.order){ case "0": - this.title = this.title + ":" + information.getString("INSPECTION_ORIGINATOR_NAME") ; + + this.title = this.title + ":" + "\n" + information.getString("INSPECTION_ORIGINATOR_NAME") ; this.desc = information.getString("CREATTIME"); break; case "1": break; case "2": - this.title = this.title + ":" + information.getString("INSPECTED_SITEUSER_NAME") ; + this.title = this.title + ":" + "\n" + information.getString("INSPECTED_SITEUSER_NAME") ; this.desc = information.getString("INSPECTED_SITEUSER_SIGN_TIME"); break; case "3": @@ -115,19 +116,31 @@ public class NodeApp { public void safety_inspector_util(List inspectors) { StringBuffer buffer = new StringBuffer(); buffer.append(this.title); + buffer.append(":"); + for (PageData inspector : inspectors) { + buffer.append("\n"); + if (StringUtils.isNotBlank(inspector.getString("INSPECTION_USER_SIGN_TIME"))){ + buffer.append(inspector.getString("INSPECTION_USER_NAME")); +// buffer.append("("); +// buffer.append(")"); + }else { + buffer.append(inspector.getString("INSPECTION_USER_NAME")); + buffer.append("(未签)"); + } + } + + this.title = buffer.toString(); + + buffer.setLength(0); for (PageData inspector : inspectors) { if (StringUtils.isNotBlank(inspector.getString("INSPECTION_USER_SIGN_TIME"))){ - buffer.append(inspector.getString("INSPECTION_USER_NAME")); - buffer.append("(已签)"); - buffer.append("("); - buffer.append(inspector.getString("OPERATTIME")); - buffer.append(")"); - }else { - buffer.append(inspector.getString("INSPECTION_USER_NAME")); - buffer.append("(未签)"); + buffer.append(inspector.getString("INSPECTION_USER_SIGN_TIME")); } } - this.title = buffer.toString(); + + if (buffer.length() > 0) { + this.desc = buffer.toString(); + } } public void safety_hiddenCreator_util(List hiddens) { @@ -135,13 +148,12 @@ public class NodeApp { buffer.append(this.title); for (PageData hidden : hiddens) { buffer.append(":"); + buffer.append("\n"); buffer.append(hidden.getString("HIDDEN_CREATOR_NAME")); - if (StringUtils.isNotBlank(hidden.getString("FINAL_CHECKTIME"))){ - buffer.append("("); - buffer.append(hidden.getString("FINAL_CHECKTIME")); - buffer.append(")"); + buffer.append("\n"); + if (StringUtils.isNotBlank(hidden.getString("CHECK_TIME"))){ + buffer.append(hidden.getString("CHECK_TIME")); } - buffer.append(";"); } this.setTitle(buffer.toString()); } @@ -149,12 +161,30 @@ public class NodeApp { public void safety_hiddenz(List hiddenz){ StringBuffer buffer = new StringBuffer(); buffer.append(this.getTitle()); - for (PageData hiddeny:hiddenz) { - buffer.append("指派人:"); - buffer.append(hiddeny.getString("YINNAME")); + buffer.append("人"); + buffer.append(":"); + for (PageData hiddeny:hiddenz) { - } + buffer.append("\n"); + buffer.append(hiddeny.getString("YINNAME")); + buffer.append("\n"); + if (StringUtils.isNotBlank(hiddeny.getString("CREATTIME"))){ + buffer.append(hiddeny.getString("CREATTIME")); + } + + } this.title = buffer.toString(); + + buffer.setLength(0); + for (PageData hiddeny : hiddenz) { + if (StringUtils.isNotBlank(hiddeny.getString("INSPECTION_USER_SIGN_TIME"))){ + buffer.append(hiddeny.getString("INSPECTION_USER_SIGN_TIME")); + } + } + + if (buffer.length() > 0) { + this.desc = buffer.toString(); + } } public void safety_assessor_util(List assesses) { StringBuffer buffer = new StringBuffer(); diff --git a/src/main/java/com/zcloud/entity/hotWorkApplication/Overseer.java b/src/main/java/com/zcloud/entity/hotWorkApplication/Overseer.java index 9a120dd..df4bbb0 100644 --- a/src/main/java/com/zcloud/entity/hotWorkApplication/Overseer.java +++ b/src/main/java/com/zcloud/entity/hotWorkApplication/Overseer.java @@ -116,28 +116,28 @@ public class Overseer { node.setText("隐患发现人"); list.add(node); +// node = new Node(); +// node.setOrder("1"); +// node.setId("2"); +// node.setText("隐患确认人"); +// list.add(node); + node = new Node(); node.setOrder("1"); node.setId("2"); - node.setText("隐患确认人"); + node.setText("整改负责人"); list.add(node); +// node = new Node(); +// node.setOrder("2"); +// node.setId("3"); +// node.setText("特殊处置审核"); +// list.add(node); + + node = new Node(); node.setOrder("2"); node.setId("3"); - node.setText("整改负责人"); - list.add(node); - - node = new Node(); - node.setOrder("3"); - node.setId("4"); - node.setText("特殊处置审核"); - list.add(node); - - - node = new Node(); - node.setOrder("4"); - node.setId("5"); node.setText("验收人"); list.add(node); @@ -176,11 +176,11 @@ public class Overseer { node.setText("隐患发现人验收"); list.add(node); - node = new Node(); - node.setOrder("6"); - node.setId("6"); - node.setText("考评"); - list.add(node); +// node = new Node(); +// node.setOrder("6"); +// node.setId("6"); +// node.setText("考评"); +// list.add(node); return list; } diff --git a/src/main/java/com/zcloud/mapper/datasource/hidden/HiddenMapper.java b/src/main/java/com/zcloud/mapper/datasource/hidden/HiddenMapper.java index 5bb7659..71aeb39 100644 --- a/src/main/java/com/zcloud/mapper/datasource/hidden/HiddenMapper.java +++ b/src/main/java/com/zcloud/mapper/datasource/hidden/HiddenMapper.java @@ -183,6 +183,7 @@ public interface HiddenMapper{ List anaysis(PageData util); List findByKey(PageData condition); + List findByKeyHiddencheck(PageData condition); List findByQue(PageData condition); diff --git a/src/main/java/com/zcloud/service/bus/impl/HiddenMailServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/HiddenMailServiceImpl.java index ed22140..9ac22cc 100644 --- a/src/main/java/com/zcloud/service/bus/impl/HiddenMailServiceImpl.java +++ b/src/main/java/com/zcloud/service/bus/impl/HiddenMailServiceImpl.java @@ -36,7 +36,7 @@ public class HiddenMailServiceImpl implements HiddenMailService { PageData notice = noticeTemplateService.findByBianMa(pd); String content = ""; if(notice!=null){ - content = notice.getString("CONTENT"); + content = notice.getString("TEMPLATE_STR"); PageData contentPd = (PageData) pd.get("CONTENT"); for(Object key : contentPd.keySet()){ //替换占位符 content = content.replace("${" + key.toString() + "}", contentPd.get(key).toString()); @@ -99,7 +99,7 @@ public class HiddenMailServiceImpl implements HiddenMailService { public void apphiddneCheckAdopt(PageData pd) throws Exception { PageData mes = new PageData(); PageData hiddenPd = hiddenService.findById(pd); - mes.put("BIANMA","HIDDEN_MAIL_002"); + mes.put("TEMPLATE_CODE","SMS_225910627"); mes.put("SENDER_ID", pd.get("CHECKOR")); // 发送人员ID mes.put("SENDER_NAME", pd.get("USERNAME")); // 发送人员姓名 mes.put("CORPINFO_ID", hiddenPd.get("CORPINFO_ID"));// 企业id 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 10e555b..adac234 100644 --- a/src/main/java/com/zcloud/service/bus/impl/NoticeCorpUtils.java +++ b/src/main/java/com/zcloud/service/bus/impl/NoticeCorpUtils.java @@ -38,7 +38,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil { @Override public void SE_OneStepUtil(PageData information) throws Exception{ PageData mes = new PageData(); - mes.put("BIANMA","safetyenvironmental_001"); + mes.put("TEMPLATE_CODE","SMS_225910619"); mes.put("SENDER_ID", information.get("CREATOR")); // 发送人员ID PageData userInfo = new PageData(); userInfo.put("USER_ID",information.get("CREATOR")); @@ -61,7 +61,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil { condition.put("INSPECTION_ID",information.getString("INSPECTION_ID")); condition = safetyEnvironmentalMapper.findById(condition); PageData mes = new PageData(); - mes.put("BIANMA","safetyenvironmental_001"); + mes.put("TEMPLATE_CODE","SMS_225910620"); mes.put("SENDER_ID", information.get("OPERATOR")); // 发送人员ID mes.put("USER_ID", information.get("OPERATOR")); //查询发送人名字 PageData name = usersService.findById(mes); @@ -70,7 +70,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil { userInfo.put("USER_ID",information.get("CREATOR")); //接收人员ID userInfo = usersService.findById(userInfo); if (userInfo != null){ - mes.put("SYNOPSIS", "安全环保审批待处理"); // 站内信标题 + mes.put("SYNOPSIS", "安全环保确认待处理"); // 站内信标题 mes.put("CORPINFO_ID", information.get("CORPINFO_ID"));// 企业id mes.put("RECEIVER_ID", information.get("CREATOR")); // 接收人员ID PageData content = new PageData(); @@ -105,14 +105,14 @@ public class NoticeCorpUtils implements NoticeCorpUtil { condition.put("INSPECTION_ID",information.getString("INSPECTION_ID")); condition = safetyEnvironmentalMapper.findById(condition); PageData mes = new PageData(); - mes.put("BIANMA","safetyenvironmental_001"); + mes.put("TEMPLATE_CODE","SMS_225910620"); mes.put("SENDER_ID", information.get("inspector")); // 发送人员ID PageData userInfo = new PageData(); userInfo.put("USER_ID",information.get("inspector")); userInfo = usersService.findById(userInfo); if(userInfo != null){ mes.put("SENDER_NAME", userInfo.getString("NAME")); // 发送人员姓名 - mes.put("SYNOPSIS", "被检查人确认"); // 站内信标题 + mes.put("SYNOPSIS", "安全环保隐患待确认提醒"); // 站内信标题 mes.put("CORPINFO_ID", information.get("CORPINFO_ID"));// 企业id mes.put("RECEIVER_ID", condition.get("INSPECTED_SITEUSER_ID")); // 接收人员ID PageData content = new PageData(); @@ -128,7 +128,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil { condition.put("INSPECTION_ID",information.getString("INSPECTION_ID")); condition = safetyEnvironmentalMapper.findById(condition); PageData mes = new PageData(); - mes.put("BIANMA","safetyenvironmental_001"); + mes.put("TEMPLATE_CODE","SMS_215800731"); mes.put("SENDER_ID", information.get("OPERATOR")); // 发送人员ID PageData userInfo = new PageData(); userInfo.put("USER_ID",information.get("OPERATOR")); @@ -191,7 +191,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil { condition.put("INSPECTION_ID",information.getString("INSPECTION_ID")); condition = safetyEnvironmentalMapper.findById(condition); PageData mes = new PageData(); - mes.put("BIANMA","safetyenvironmental_001"); + mes.put("TEMPLATE_CODE","SMS_225910621"); mes.put("SENDER_ID", information.get("OPERATOR")); // 发送人员ID PageData userInfo = new PageData(); PageData hidden_condition = new PageData(); @@ -199,7 +199,7 @@ public class NoticeCorpUtils implements NoticeCorpUtil { PageData corpuser = usersService.findById(hidden_condition); //根据隐患发现人查询是企业端用户还是监管端用户 if (corpuser != null){ mes.put("SENDER_NAME", userInfo.getString("NAME")); // 发送人员姓名 - mes.put("SYNOPSIS", "安全环保检查提交申辩"); // 站内信标题 + mes.put("SYNOPSIS", "安全环保检查待指派整改"); // 站内信标题 mes.put("CORPINFO_ID", condition.getString("CORPINFO_ID"));// 企业id mes.put("RECEIVER_ID", corpuser.getString("USER_ID")); // 接收人员ID PageData content = new PageData(); diff --git a/src/main/java/com/zcloud/service/hidden/HiddenService.java b/src/main/java/com/zcloud/service/hidden/HiddenService.java index 6c3220e..f020245 100644 --- a/src/main/java/com/zcloud/service/hidden/HiddenService.java +++ b/src/main/java/com/zcloud/service/hidden/HiddenService.java @@ -203,6 +203,7 @@ public interface HiddenService{ void createExcel(HttpServletResponse response, PageData condition) throws Exception; List findByKey(PageData condition) throws Exception; + List findByKeyHiddencheck(PageData condition) throws Exception; List findByQue(PageData condition) throws Exception; diff --git a/src/main/java/com/zcloud/service/hidden/impl/HiddenServiceImpl.java b/src/main/java/com/zcloud/service/hidden/impl/HiddenServiceImpl.java index d5c5155..aa4078c 100644 --- a/src/main/java/com/zcloud/service/hidden/impl/HiddenServiceImpl.java +++ b/src/main/java/com/zcloud/service/hidden/impl/HiddenServiceImpl.java @@ -330,6 +330,10 @@ public class HiddenServiceImpl implements HiddenService { public List findByKey(PageData condition) throws Exception { return hiddenMapper.findByKey(condition); } + public List findByKeyHiddencheck(PageData condition) throws Exception{ + return hiddenMapper.findByKeyHiddencheck(condition); + + } @Override public List findByQue(PageData condition) throws Exception { diff --git a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java index 2dd8ac7..d6e116f 100644 --- a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java +++ b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java @@ -131,13 +131,26 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic String time = currentTime; for (JSONObject json : list) { PageData hidden = new PageData(); + String hiddentype = json.getString("HIDDENTYPE"); + List lists = JSON.parseArray(hiddentype, String.class);//隐患级别 + if (lists.size() == 1){ + hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1 + } + if (lists.size() == 2){ + hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1 + hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2 + } + if (lists.size() == 3){ + hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1 + hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2 + hidden.put("HIDDENTYPE3", lists.get(2)); //隐患类型3 + } hidden.put("HIDDEN_ID", UuidUtil.get32UUID()); //主键 hidden.put("FOREIGN_ID", pd.getString("INSPECTION_ID")); //外键ID hidden.put("HIDDENDESCR", json.getString("HIDDENDESCR")); //隐患描述 hidden.put("HIDDENPART", json.getString("HIDDENPART")); //隐患部位 hidden.put("HIDDENLEVEL", json.getString("HIDDENLEVEL")); //隐患级别 - hidden.put("HIDDENTYPE", json.getString("HIDDENTYPE")); //隐患类型1 - hidden.put("HIDDENTYPE2", json.getString("HIDDENTYPE2")); //隐患类型2 + hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPENAME"));//隐患类型名称 hidden.put("LONGITUDE", json.getString("LONGITUDE")); //隐患位置经度 hidden.put("LATITUDE", json.getString("LATITUDE")); //隐患位置纬度 hidden.put("DISCOVERYTIME", json.getString("DISCOVERYTIME")); //隐患发现时间 @@ -148,9 +161,10 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic hidden.put("STATE", "100"); //隐患状态 100-安全环保检查暂存的隐患(流程完转0) hidden.put("CREATTIME", time); //发现时间 hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); + hidden.put("RECTIFICATIONTYPE", pd.getString("RECTIFICATIONTYPE")); hidden.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) hidden.put("POSITIONDESC",json.getString("POSITIONDESC")); - + hiddenService.save(hidden); PageData before = new PageData();// 添加隐患初始信息 before.put("TYPE","0"); before.put("STATE","2"); @@ -159,7 +173,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic before.put("CREATOR", json.getString("CREATOR")); before.put("OPERATOR",json.getString("CREATOR")); hiddenExamineService.saveApp(before); - hiddenService.save(hidden); + PageData findUser = new PageData(); findUser.put("HIDDENUSER_ID", UuidUtil.get32UUID()); @@ -373,8 +387,21 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic hidden.put("HIDDENDESCR", json.getString("HIDDENDESCR")); //隐患描述 hidden.put("HIDDENPART", json.getString("HIDDENPART")); //隐患部位 hidden.put("HIDDENLEVEL", json.getString("HIDDENLEVEL")); //隐患级别 - hidden.put("HIDDENTYPE", json.getString("HIDDENTYPE")); //隐患类型1 - hidden.put("HIDDENTYPE2", json.getString("HIDDENTYPE2")); //隐患类型2 + String hiddentype = json.getString("HIDDENTYPE"); + List lists = JSON.parseArray(hiddentype, String.class);//隐患级别 + if (lists.size() == 1){ + hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1 + } + if (lists.size() == 2){ + hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1 + hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2 + } + if (lists.size() == 3){ + hidden.put("HIDDENTYPE1",lists.get(0) ); //隐患类型1 + hidden.put("HIDDENTYPE2", lists.get(1)); //隐患类型2 + hidden.put("HIDDENTYPE3", lists.get(2)); //隐患类型3 + } + hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPENAME"));//隐患类型名称 hidden.put("LONGITUDE", json.getString("LONGITUDE")); //隐患位置经度 hidden.put("LATITUDE", json.getString("LATITUDE")); //隐患位置纬度 hidden.put("DISCOVERYTIME", json.getString("DISCOVERYTIME")); //隐患发现时间 @@ -677,6 +704,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic } @Override + + public PageData departmentUtil(PageData data) throws Exception { PageData condition = new PageData(); condition.put("DEPARTMENT_ID",data.getString("INSPECTED_DEPARTMENT_ID")); diff --git a/src/main/java/com/zcloud/service/notice/impl/NoticeCorpServiceImpl.java b/src/main/java/com/zcloud/service/notice/impl/NoticeCorpServiceImpl.java index 4aba8b8..f5104b6 100644 --- a/src/main/java/com/zcloud/service/notice/impl/NoticeCorpServiceImpl.java +++ b/src/main/java/com/zcloud/service/notice/impl/NoticeCorpServiceImpl.java @@ -128,7 +128,7 @@ public class NoticeCorpServiceImpl implements NoticeCorpService { PageData notice = noticeTemplateService.findByBianMa(pd); String content = ""; if(notice!=null){ - content = notice.getString("CONTENT"); + content = notice.getString("TEMPLATE_STR"); PageData contentPd = (PageData) pd.get("CONTENT"); for(Object key : contentPd.keySet()){ //替换占位符 if ("number".equals(key.toString()) && Tools.notEmpty(pd.getString("WORKURL"))) { diff --git a/src/main/resources/mybatis/datasource/hidden/HiddenCheckMapper.xml b/src/main/resources/mybatis/datasource/hidden/HiddenCheckMapper.xml index 0d4034a..d49b551 100644 --- a/src/main/resources/mybatis/datasource/hidden/HiddenCheckMapper.xml +++ b/src/main/resources/mybatis/datasource/hidden/HiddenCheckMapper.xml @@ -91,7 +91,7 @@ - select from diff --git a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml index c7cbf6b..683c8c4 100644 --- a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml +++ b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml @@ -14,6 +14,7 @@ + f.FOREIGN_ID, f.SOURCE, f.RISK_UNIT, f.IDENTIFICATION, @@ -61,13 +62,13 @@ f.LISTMANAGER_ID, f.OPERATTIME, f.HIDDEN_CATEGORY - SOURCE, RISK_UNIT, + FOREIGN_ID, IDENTIFICATION, RISK_DESCR, RISK_POSITION, @@ -111,13 +112,15 @@ ISCONFIRM, LISTMANAGER_ID, OPERATTIME, - HIDDEN_CATEGORY + HIDDEN_CATEGORY, + POSITIONDESC #{SOURCE}, #{RISK_UNIT}, + #{FOREIGN_ID}, #{IDENTIFICATION}, #{RISK_DESCR}, #{RISK_POSITION}, @@ -161,11 +164,12 @@ #{ISCONFIRM}, #{LISTMANAGER_ID}, #{OPERATTIME}, - #{HIDDEN_CATEGORY} + #{HIDDEN_CATEGORY}, + #{POSITIONDESC} - + insert into ( @@ -351,6 +355,8 @@ HAVESCHEME = #{HAVESCHEME}, + CHECKOR = #{CHECKOR}, + CHECKDEPT = #{CHECKDEPT}, OPERATTIME = #{OPERATTIME}, HAVEPLAN = #{HAVEPLAN}, STATE = '3' @@ -427,6 +433,7 @@ - select , + f.POSITIONDESC, cr.NAME CREATORNAME, re.NAME RECTIFICATIONORNAME, ch.NAME CHECKORNAME, @@ -546,10 +573,9 @@ - and f.STATE in('1','-1') - + @@ -771,7 +797,7 @@ order by f.CREATTIME desc - select , cr.NAME CREATORNAME, @@ -1104,10 +1130,10 @@ SELECT - f.CREATOR,f.STATE,exa.TYPE + f.CREATOR,f.STATE,exa.TYPE,f.CHECKOR FROM BUS_HIDDENEXAMINE exa left join BUS_HIDDEN f on exa.HIDDEN_ID = f.HIDDEN_ID @@ -1845,7 +1878,7 @@ - and (bhu.USER_ID = #{SELFUSERID} or f.CONFIRM_USER = #{SELFUSERID} or f.RECTIFICATIONOR = #{SELFUSERID} or f.CHECKOR = #{SELFUSERID} ) + and (bhu.USER_ID = #{SELFUSERID} or f.CREATOR = #{SELFUSERID} or f.RECTIFICATIONOR = #{SELFUSERID} or f.CHECKOR = #{SELFUSERID} ) @@ -2154,7 +2187,7 @@ LEFT JOIN sys_user confirmUser on confirmUser.USER_ID = f.CONFIRM_USER left join bus_hidden_user bhu on bhu.HIDDEN_ID = f.HIDDEN_ID LEFT JOIN bus_hiddencheck hch on hch.HIDDEN_ID = f.HIDDEN_ID - where f.ISDELETE = '0' and f.SOURCE IN ('1','2') and f.STATE != '100' + where f.ISDELETE = '0' and f.SOURCE = 5 and f.STATE != '100' @@ -3733,11 +3766,10 @@ order by z.CREATTIME desc - SELECT - f.CREATOR,f.STATE + f.CREATOR,f.STATE,f.CREATOR FROM BUS_HIDDEN f WHERE f.ISDELETE = '0' and f.STATE != '0' @@ -3800,7 +3832,7 @@ union all SELECT - f.CREATOR,f.STATE + f.CREATOR,f.STATE,f.CREATOR FROM BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN f WHERE f.ISDELETE = '0' and f.STATE != '0' @@ -3815,7 +3847,7 @@ SELECT - f.CREATOR,f.STATE,exa.TYPE + f.CREATOR,f.STATE,exa.TYPE,f.CREATOR FROM BUS_HIDDENEXAMINE exa left join BUS_HIDDEN f on exa.HIDDEN_ID = f.HIDDEN_ID @@ -3884,7 +3916,7 @@ union all SELECT - f.CREATOR,f.STATE,exa.TYPE + f.CREATOR,f.STATE,exa.TYPE,f.CREATOR FROM BUS_HIDDENDANGERCHECKSTANDARD_HIDDENEXAMINE exa left join BUS_HIDDENDANGERCHECKSTANDARD_HIDDEN f on exa.HIDDEN_ID = f.HIDDEN_ID @@ -3923,7 +3955,7 @@ - select iou.NAME INSPECTION_ORIGINATOR_NAME, ild.NAME INSPECTION_LEADDEPARTMENT_NAME, @@ -686,11 +686,11 @@ and f.INSPECTION_SUBJECT = #{pd.INSPECTION_SUBJECT,jdbcType=VARCHAR} - - and f.INSPECTION_TIME_START >= CONCAT(#{pd.INSPECTION_TIME_START}, ' 00:00') + + and = #{pd.INSPECTION_TIME_START,jdbcType=DATE} ]]> - - and f.INSPECTION_TIME_END <= CONCAT(#{pd.INSPECTION_TIME_END}, ' 23:59') + + and diff --git a/src/main/resources/mybatis/datasource/notice/NoticeCorpMapper.xml b/src/main/resources/mybatis/datasource/notice/NoticeCorpMapper.xml index 9a96fa2..bbc9dd8 100644 --- a/src/main/resources/mybatis/datasource/notice/NoticeCorpMapper.xml +++ b/src/main/resources/mybatis/datasource/notice/NoticeCorpMapper.xml @@ -115,7 +115,7 @@