清单排查、隐患流程对接代码

pull/14/head
songwenxuan 2023-12-19 17:28:02 +08:00
parent 6de19888a1
commit 3b1afc8344
12 changed files with 103 additions and 50 deletions

View File

@ -10,6 +10,7 @@ import java.util.Map;
import java.util.Random; import java.util.Random;
import java.io.File; import java.io.File;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.bus.HiddenController; import com.zcloud.controller.bus.HiddenController;
import com.zcloud.service.bus.*; import com.zcloud.service.bus.*;
import com.zcloud.service.hiddenApi.HiddenApiService; import com.zcloud.service.hiddenApi.HiddenApiService;
@ -642,6 +643,7 @@ public class AppHiddenController extends BaseController {
*/ */
@RequestMapping(value = "/delete") @RequestMapping(value = "/delete")
@ResponseBody @ResponseBody
@DockAnnotation
public Object delete() throws Exception { public Object delete() throws Exception {
// 获取IP // 获取IP
HttpServletRequest request = this.getRequest(); HttpServletRequest request = this.getRequest();

View File

@ -142,9 +142,6 @@ public class CheckRecordController extends BaseController {
pd.put("PERIODSTART", list.get("START_DATE")); pd.put("PERIODSTART", list.get("START_DATE"));
pd.put("PERIODEND", list.get("END_DATE")); pd.put("PERIODEND", list.get("END_DATE"));
} }
checkrecordService.save(pd); checkrecordService.save(pd);
checkuserService.delete(pd); checkuserService.delete(pd);
PageData checkUser = new PageData(); PageData checkUser = new PageData();
@ -152,9 +149,12 @@ public class CheckRecordController extends BaseController {
checkUser.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID")); checkUser.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID"));
checkUser.put("DEPARTMENT_ID", pd.get("CHECKDEPT")); checkUser.put("DEPARTMENT_ID", pd.get("CHECKDEPT"));
checkUser.put("USER_ID", pd.get("CHECKOR")); checkUser.put("USER_ID", pd.get("CHECKOR"));
pd.put("checkUser", JSON.toJSONString(checkUser));
checkuserService.save(checkUser); checkuserService.save(checkUser);
if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) { if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) {
List<JSONObject> userList = (List<JSONObject>) JSON.parse(pd.get("OTHER").toString()); List<JSONObject> userList = (List<JSONObject>) JSON.parse(pd.get("OTHER").toString());
HashMap<String, String> otherMap = new HashMap<>();
int count = 1;
for (JSONObject json : userList) { for (JSONObject json : userList) {
if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null
&& json.get("USER_ID") != "") { && json.get("USER_ID") != "") {
@ -163,12 +163,17 @@ public class CheckRecordController extends BaseController {
other.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID")); other.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID"));
other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID")); other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID"));
other.put("USER_ID", json.get("USER_ID")); other.put("USER_ID", json.get("USER_ID"));
otherMap.put("other"+count,JSON.toJSONString(other));
count+=1;
checkuserService.save(other); checkuserService.save(other);
} }
} }
pd.put("otherMap",JSON.toJSONString(otherMap));
} }
if (pd.get("ITEMS") != null && !pd.get("ITEMS").equals("")) { if (pd.get("ITEMS") != null && !pd.get("ITEMS").equals("")) {
List<JSONObject> itemsList = (List<JSONObject>) JSON.parse(pd.get("ITEMS").toString()); List<JSONObject> itemsList = (List<JSONObject>) JSON.parse(pd.get("ITEMS").toString());
Map<String, String> itemMap = new HashMap<>();
int count = 1;
for (JSONObject json : itemsList) { for (JSONObject json : itemsList) {
PageData item = new PageData(); PageData item = new PageData();
item.put("RECORDITEM_ID", json.get("RECORDITEM_ID")); // 主键 item.put("RECORDITEM_ID", json.get("RECORDITEM_ID")); // 主键
@ -190,9 +195,11 @@ public class CheckRecordController extends BaseController {
item.put("RISKPOINT_ID", chei.get("RISKPOINT_ID")); item.put("RISKPOINT_ID", chei.get("RISKPOINT_ID"));
item.put("LONGITUDE", pd.get("LONGITUDE")); item.put("LONGITUDE", pd.get("LONGITUDE"));
item.put("LATITUDE", pd.get("LATITUDE")); item.put("LATITUDE", pd.get("LATITUDE"));
itemMap.put("item"+count, JSON.toJSONString(item));
count+=1;
recordItemService.save(item); recordItemService.save(item);
} }
pd.put("itemMap",JSON.toJSONString(itemMap));
} }
if (pd.get("IDS") != null && !pd.get("IDS").equals("")) { if (pd.get("IDS") != null && !pd.get("IDS").equals("")) {
String ids = pd.get("IDS").toString(); String ids = pd.get("IDS").toString();
@ -220,9 +227,7 @@ public class CheckRecordController extends BaseController {
hiddenpd.getString("HIDDENDESCR"),"隐患确认","确认","",""); hiddenpd.getString("HIDDENDESCR"),"隐患确认","确认","","");
} }
} }
map.put("dockData", JSON.toJSONString(pd));
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }
@ -236,6 +241,7 @@ public class CheckRecordController extends BaseController {
@RequestMapping(value = "/delete") @RequestMapping(value = "/delete")
@RequiresPermissions("checkrecord:del") @RequiresPermissions("checkrecord:del")
@ResponseBody @ResponseBody
@DockAnnotation
public Object delete() throws Exception { public Object delete() throws Exception {
Map<String, String> map = new HashMap<String, String>(); Map<String, String> map = new HashMap<String, String>();
String errInfo = "success"; String errInfo = "success";

View File

@ -140,7 +140,8 @@ public class HiddenController extends BaseController {
PageData hiddenRegion = hiddenRegionService.saveHidden(pd.getString("HIDDENPART")); PageData hiddenRegion = hiddenRegionService.saveHidden(pd.getString("HIDDENPART"));
pd.put("HIDDENPART", hiddenRegion.getString("HIDDENREGION_ID")); pd.put("HIDDENPART", hiddenRegion.getString("HIDDENREGION_ID"));
} }
hiddenUserService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1"); Map<String, String> saveMap = hiddenUserService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1");
pd.put("saveMap",JSON.toJSONString(saveMap));
pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); // 企业id
if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) { if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) {
@ -162,6 +163,7 @@ public class HiddenController extends BaseController {
PageData loginDeptPd = new PageData(); PageData loginDeptPd = new PageData();
loginDeptPd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID()); loginDeptPd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
PageData longinfoUserDept = departmentService.findById(loginDeptPd);//获取登录人部门信息 PageData longinfoUserDept = departmentService.findById(loginDeptPd);//获取登录人部门信息
pd.put("longinfoUserDept",JSON.toJSONString(longinfoUserDept));
if (Tools.isEmpty(longinfoUserDept) || Tools.isEmpty(longinfoUserDept.getString("HEADMAN"))) {// 查看部门是否有负责人 if (Tools.isEmpty(longinfoUserDept) || Tools.isEmpty(longinfoUserDept.getString("HEADMAN"))) {// 查看部门是否有负责人
return ResultCodeConstant.resMap(000201); //所在部门未维护部门负责人 return ResultCodeConstant.resMap(000201); //所在部门未维护部门负责人
} else {//如何维护了,隐患确认人就要成为部门负责人 } else {//如何维护了,隐患确认人就要成为部门负责人
@ -274,6 +276,7 @@ public class HiddenController extends BaseController {
*/ */
@RequestMapping(value = "/listAdd") @RequestMapping(value = "/listAdd")
@ResponseBody @ResponseBody
@DockAnnotation(isAdd = true)
public Object listAdd() throws Exception { public Object listAdd() throws Exception {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success"; String errInfo = "success";
@ -306,11 +309,13 @@ public class HiddenController extends BaseController {
} }
} }
pd.put("ISCONFIRM", "0"); pd.put("ISCONFIRM", "0");
hiddenUserService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1"); Map<String, String> saveMap = hiddenUserService.saveRectificationo(pd.getString("findCreator"), pd.getString("HIDDEN_ID"), "1");
pd.put("saveMap", JSON.toJSONString(saveMap));
if (pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")) {//判断是否是重大隐患 if (pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")) {//判断是否是重大隐患
PageData userpd = new PageData(); PageData userpd = new PageData();
userpd.put("USER_ID", Jurisdiction.getUSER_ID()); userpd.put("USER_ID", Jurisdiction.getUSER_ID());
userpd.put("DEPARTMENT_ID", usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID userpd.put("DEPARTMENT_ID", usersService.findById(userpd).getString("DEPARTMENT_ID"));//获取登录人的部门ID
pd.put("userpd",JSON.toJSONString(userpd));
if (departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")) {//判断部门级别是不是班组 if (departmentService.findById(userpd).getString("LEVEL").equals("departmentLevel0003")) {//判断部门级别是不是班组
userpd.put("DEPARTMENT_ID", departmentService.findById(userpd).getString("DEPARTMENT_ID")); userpd.put("DEPARTMENT_ID", departmentService.findById(userpd).getString("DEPARTMENT_ID"));
if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人 if (Tools.isEmpty(departmentService.findById(userpd).getString("HEADMAN"))) {//判断部门是否有负责人
@ -343,10 +348,12 @@ public class HiddenController extends BaseController {
before.put("spare4", pd.getString("RECTIFICATIONDEPT")); before.put("spare4", pd.getString("RECTIFICATIONDEPT"));
before.put("CREATOR", pd.getString("loginUserId")); before.put("CREATOR", pd.getString("loginUserId"));
before.put("OPERATOR", pd.getString("loginUserId")); before.put("OPERATOR", pd.getString("loginUserId"));
pd.put("before", JSON.toJSONString(before));
hiddenExamineService.saveApp(before); hiddenExamineService.saveApp(before);
hiddenService.save(pd); hiddenService.save(pd);
map.put("result", errInfo); map.put("result", errInfo);
map.put("pd", pd); map.put("pd", pd);
map.put("dockData",JSON.toJSONString(pd));
return map; return map;
} }
@ -371,6 +378,7 @@ public class HiddenController extends BaseController {
*/ */
@RequestMapping(value = "/delete") @RequestMapping(value = "/delete")
@ResponseBody @ResponseBody
@DockAnnotation
public Object delete() throws Exception { public Object delete() throws Exception {
// 获取IP // 获取IP
HttpServletRequest request = this.getRequest(); HttpServletRequest request = this.getRequest();
@ -2030,6 +2038,7 @@ public class HiddenController extends BaseController {
@RequestMapping(value = "/confirmHidden") @RequestMapping(value = "/confirmHidden")
@RequiresPermissions("hidden:edit") @RequiresPermissions("hidden:edit")
@ResponseBody @ResponseBody
@DockAnnotation
public Object confirmHidden() throws Exception { public Object confirmHidden() throws Exception {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success"; String errInfo = "success";

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.hiddenApi; package com.zcloud.controller.hiddenApi;
import com.alibaba.fastjson.JSON;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController; import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page; import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
@ -369,13 +371,12 @@ public class HiddenApiController extends BaseController {
@RequestMapping(value = "/confirmHidden") @RequestMapping(value = "/confirmHidden")
@RequiresPermissions("hidden:edit") @RequiresPermissions("hidden:edit")
@ResponseBody @ResponseBody
@DockAnnotation(isAdd = true)
public Object confirmHidden() throws Exception { public Object confirmHidden() throws Exception {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
Integer code = 000000; Integer code = 000000;
PageData pd = new PageData(); PageData pd = new PageData();
pd = this.getPageData(); pd = this.getPageData();
String HIDDENLEVEL = pd.getString("HIDDENLEVEL"); // 隐患级别 String HIDDENLEVEL = pd.getString("HIDDENLEVEL"); // 隐患级别
String RECTIFICATIONOR = pd.getString("RECTIFICATIONOR");//整改负责人 String RECTIFICATIONOR = pd.getString("RECTIFICATIONOR");//整改负责人
String RECTIFICATIONDEADLINE = pd.getString("RECTIFICATIONDEADLINE"); //整改完成期限 String RECTIFICATIONDEADLINE = pd.getString("RECTIFICATIONDEADLINE"); //整改完成期限
@ -430,9 +431,10 @@ public class HiddenApiController extends BaseController {
hidden.put("RECTIFICATIONOR",RECTIFICATIONOR); hidden.put("RECTIFICATIONOR",RECTIFICATIONOR);
hidden.put("RECTIFICATIONDEADLINE",RECTIFICATIONDEADLINE); hidden.put("RECTIFICATIONDEADLINE",RECTIFICATIONDEADLINE);
hidden.put("RECTIFICATIONDEPT",RECTIFICATIONDEPT); hidden.put("RECTIFICATIONDEPT",RECTIFICATIONDEPT);
hiddenExamineApiService.saveConfirm(hidden, "4"); //添加隐患处理流程 PageData pageData = hiddenExamineApiService.saveConfirm(hidden, "4"); //添加隐患处理流程
hiddenApiService.confirmHidden(pd); //确认 pd.put("pageData", JSON.toJSONString(pageData));
PageData confirm = hiddenApiService.confirmHidden(pd); //确认
pd.put("confirm", JSON.toJSONString(confirm));
if (Tools.notEmpty(pd.getString("RECTIFICATIONOR")) && !hidden.getString("RECTIFICATIONTYPE").equals("1")) { if (Tools.notEmpty(pd.getString("RECTIFICATIONOR")) && !hidden.getString("RECTIFICATIONTYPE").equals("1")) {
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患需要整改", messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患需要整改",
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
@ -442,6 +444,7 @@ public class HiddenApiController extends BaseController {
hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"), hidden.getString("CORPINFO_ID"), pd.getString("USER_ID"), hidden.getString("HIDDEN_ID"),
hidden.getString("HIDDENDESCR"), "通过", "整改", "", ""); hidden.getString("HIDDENDESCR"), "通过", "整改", "", "");
} }
map.put("dockData",JSON.toJSONString(pd));
return ResultCodeConstant.resMap(code, map); return ResultCodeConstant.resMap(code, map);
} }
@ -500,6 +503,7 @@ public class HiddenApiController extends BaseController {
@RequestMapping(value = "/rectify") @RequestMapping(value = "/rectify")
@RequiresPermissions("hidden:list") @RequiresPermissions("hidden:list")
@ResponseBody @ResponseBody
@DockAnnotation(isAdd = true)
public Object rectify() throws Exception { public Object rectify() throws Exception {
/** /**
* *
@ -548,16 +552,19 @@ public class HiddenApiController extends BaseController {
map.put("hiddenSchemeState", hiddenSchemeState); map.put("hiddenSchemeState", hiddenSchemeState);
} }
/** 隐患验收信息 **/ /** 隐患验收信息 **/
int hiddenCheckState = hiddenCheckApiService.saveHiddenCheck(pd.getString("CHECKOR"), pd.getString("CHECKDEPT"), pd.getString("OTHER"), pd.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR")); PageData hiddenCheck = hiddenCheckApiService.saveHiddenCheck(pd.getString("CHECKOR"), pd.getString("CHECKDEPT"), pd.getString("OTHER"), pd.getString("HIDDEN_ID"), hidden.getString("HIDDENDESCR"));
pd.put("hiddenCheck",JSON.toJSONString(hiddenCheck));
/** 隐患延时申请的要通过 **/ /** 隐患延时申请的要通过 **/
hiddenExamineApiService.saveRectify(pd.getString("HIDDEN_ID")); //添加隐患整改记录 PageData exam = hiddenExamineApiService.saveRectify(pd.getString("HIDDEN_ID")); //添加隐患整改记录
pd.put("exam", JSON.toJSONString(exam));
List<PageData> hiddenUserList = hiddenUserApiService.getListByHiddenId(pd.getString("HIDDEN_ID")); List<PageData> hiddenUserList = hiddenUserApiService.getListByHiddenId(pd.getString("HIDDEN_ID"));
for (PageData pageData : hiddenUserList) { for (PageData pageData : hiddenUserList) {
if ("2".equals(pageData.getString("TYPE")) && "-1".equals(pageData.getString("STATE"))) { //延期审核 没有审批的 if ("2".equals(pageData.getString("TYPE")) && "-1".equals(pageData.getString("STATE"))) { //延期审核 没有审批的
hiddenExamineApiService.adoptExamine(pageData.getString("HIDDENEXAMINE_ID"), "整改完成"); hiddenExamineApiService.adoptExamine(pageData.getString("HIDDENEXAMINE_ID"), "整改完成");
} }
} }
map.put("hiddenCheckState", hiddenCheckState); map.put("hiddenCheckState", hiddenCheck.get("retint"));
map.put("dockData",JSON.toJSONString(pd));
return ResultCodeConstant.resMap(code, map); return ResultCodeConstant.resMap(code, map);
} }

View File

@ -1,6 +1,8 @@
package com.zcloud.service.bus; package com.zcloud.service.bus;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zcloud.entity.Page; import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
@ -56,9 +58,11 @@ public interface HiddenUserService{
/** /**
* *
*
* @return
* @throws Exception * @throws Exception
*/ */
public void saveRectificationo (String userIds ,String hiddenId ,String type)throws Exception; public Map<String, String> saveRectificationo (String userIds , String hiddenId , String type)throws Exception;
/** /**
* ids * ids

View File

@ -2,6 +2,7 @@ package com.zcloud.service.bus.impl;
import java.util.*; import java.util.*;
import com.alibaba.fastjson.JSON;
import com.zcloud.util.Jurisdiction; import com.zcloud.util.Jurisdiction;
import com.zcloud.util.Tools; import com.zcloud.util.Tools;
import com.zcloud.util.UuidUtil; import com.zcloud.util.UuidUtil;
@ -84,12 +85,15 @@ public class HiddenUserServiceImpl implements HiddenUserService{
/** /**
* -- * --
*
* @param userIds ids * @param userIds ids
* @param hiddenId id * @param hiddenId id
* @param type * @param type
* @return
* @throws Exception * @throws Exception
*/ */
public void saveRectificationo(String userIds ,String hiddenId,String type)throws Exception{ public Map<String, String> saveRectificationo(String userIds , String hiddenId, String type)throws Exception{
Map<String, String> saveMap = new HashMap<>();
if(!Tools.isEmpty(hiddenId)){ if(!Tools.isEmpty(hiddenId)){
PageData del = new PageData(); PageData del = new PageData();
del.put("TYPE",type); del.put("TYPE",type);
@ -97,7 +101,10 @@ public class HiddenUserServiceImpl implements HiddenUserService{
hiddenuserMapper.deleteByHidden(del); // 先删除后添加 hiddenuserMapper.deleteByHidden(del); // 先删除后添加
} }
if(!Tools.isEmpty(userIds)){ if(!Tools.isEmpty(userIds)){
saveMap.put("USER_ID",Jurisdiction.getUSER_ID());
String removeLoginUser = userIds.replaceAll(Jurisdiction.getUSER_ID(),""); //去除当前登录人的用户id String removeLoginUser = userIds.replaceAll(Jurisdiction.getUSER_ID(),""); //去除当前登录人的用户id
HashMap<String, String> hiddenUserMap = new HashMap<>();
int count = 1;
String userID [] = removeLoginUser.split(","); String userID [] = removeLoginUser.split(",");
for (int i =0;i<userID.length;i++){ for (int i =0;i<userID.length;i++){
if(!Tools.isEmpty(userID[i])){ if(!Tools.isEmpty(userID[i])){
@ -107,9 +114,12 @@ public class HiddenUserServiceImpl implements HiddenUserService{
pd.put("USER_ID",userID[i]); pd.put("USER_ID",userID[i]);
pd.put("TYPE",type); pd.put("TYPE",type);
pd.put("IS_MAIN","0"); pd.put("IS_MAIN","0");
hiddenUserMap.put("hiddenuser"+count, JSON.toJSONString(pd));
count+=1;
hiddenuserMapper.save(pd); hiddenuserMapper.save(pd);
} }
} }
saveMap.put("hiddenUserMap",JSON.toJSONString(hiddenUserMap));
} }
PageData pd = new PageData(); PageData pd = new PageData();
pd.put("HIDDENUSER_ID", UuidUtil.get32UUID()); pd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
@ -117,7 +127,9 @@ public class HiddenUserServiceImpl implements HiddenUserService{
pd.put("USER_ID",Jurisdiction.getUSER_ID()); pd.put("USER_ID",Jurisdiction.getUSER_ID());
pd.put("TYPE",type); pd.put("TYPE",type);
pd.put("IS_MAIN","1"); pd.put("IS_MAIN","1");
saveMap.put("saveUser",JSON.toJSONString(pd));
hiddenuserMapper.save(pd); hiddenuserMapper.save(pd);
return saveMap;
} }
/** /**
* ids * ids

View File

@ -4,7 +4,6 @@ import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* Api * Api
@ -29,10 +28,12 @@ public interface HiddenApiService {
/** /**
* *
*
* @param pd * @param pd
* @return
* @throws Exception * @throws Exception
*/ */
public void confirmHidden(PageData pd) throws Exception; public PageData confirmHidden(PageData pd) throws Exception;
/** /**
* *
* @param hiddenId ID * @param hiddenId ID

View File

@ -60,6 +60,7 @@ public interface HiddenCheckApiService {
/** /**
* *
*
* @param checkUserId * @param checkUserId
* @param checkUserDeptId * @param checkUserDeptId
* @param checkOhther * @param checkOhther
@ -68,7 +69,7 @@ public interface HiddenCheckApiService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public int saveHiddenCheck(String checkUserId,String checkUserDeptId ,String checkOhther,String hiddenId,String hiddenDescr )throws Exception; public PageData saveHiddenCheck(String checkUserId, String checkUserDeptId , String checkOhther, String hiddenId, String hiddenDescr )throws Exception;
/**id /**id
* @param hiddenId id * @param hiddenId id
* @throws Exception * @throws Exception

View File

@ -128,7 +128,7 @@ public interface HiddenExamineApiService {
/** /**
* , * ,
*/ */
public int saveRectify(String hiddneId) throws Exception; public PageData saveRectify(String hiddneId) throws Exception;
/** /**
* *

View File

@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* *
@ -61,7 +60,7 @@ public class HiddenApiServiceImpl implements HiddenApiService{
return hiddenApiMapper.findById(pd); return hiddenApiMapper.findById(pd);
} }
public void confirmHidden(PageData pd) throws Exception{ public PageData confirmHidden(PageData pd) throws Exception{
PageData conPd = new PageData(); PageData conPd = new PageData();
conPd.put("STATE",pd.getString("STATE")); conPd.put("STATE",pd.getString("STATE"));
conPd.put("CONFIRM_USER", Jurisdiction.getUSER_ID()); conPd.put("CONFIRM_USER", Jurisdiction.getUSER_ID());
@ -72,6 +71,7 @@ public class HiddenApiServiceImpl implements HiddenApiService{
conPd.put("HIDDENLEVEL",pd.getString("HIDDENLEVEL")); conPd.put("HIDDENLEVEL",pd.getString("HIDDENLEVEL"));
conPd.put("HIDDEN_ID",pd.getString("HIDDEN_ID")); conPd.put("HIDDEN_ID",pd.getString("HIDDEN_ID"));
hiddenApiMapper.confirmHidden(conPd); hiddenApiMapper.confirmHidden(conPd);
return conPd;
} }
/** /**
* *

View File

@ -6,7 +6,6 @@ import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.hiddenApi.HiddenCheckApiMapper; import com.zcloud.mapper.datasource.hiddenApi.HiddenCheckApiMapper;
import com.zcloud.mapper.datasource.hiddenApi.HiddenExamineApiMapper; import com.zcloud.mapper.datasource.hiddenApi.HiddenExamineApiMapper;
import com.zcloud.service.announcement.TemplateAnnounService;
import com.zcloud.service.hiddenApi.HiddenCheckApiService; import com.zcloud.service.hiddenApi.HiddenCheckApiService;
import com.zcloud.util.DateUtil; import com.zcloud.util.DateUtil;
import com.zcloud.util.Jurisdiction; import com.zcloud.util.Jurisdiction;
@ -104,6 +103,7 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
} }
/** /**
* *
*
* @param checkUserId * @param checkUserId
* @param checkUserDeptId * @param checkUserDeptId
* @param checkOhther * @param checkOhther
@ -112,7 +112,8 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
* @return * @return
* @throws Exception * @throws Exception
*/ */
public int saveHiddenCheck(String checkUserId,String checkUserDeptId ,String checkOhther,String hiddenId,String hiddenDescr )throws Exception{ public PageData saveHiddenCheck(String checkUserId, String checkUserDeptId , String checkOhther, String hiddenId, String hiddenDescr )throws Exception{
PageData pageData = new PageData();
int retint = 0; int retint = 0;
PageData checkUser = new PageData(); PageData checkUser = new PageData();
checkUser.put("HIDDENCHECK_ID", UuidUtil.get32UUID()); // 主键 checkUser.put("HIDDENCHECK_ID", UuidUtil.get32UUID()); // 主键
@ -120,6 +121,7 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
checkUser.put("DEPARTMENT_ID", checkUserDeptId); checkUser.put("DEPARTMENT_ID", checkUserDeptId);
checkUser.put("USER_ID", checkUserId); checkUser.put("USER_ID", checkUserId);
checkUser.put("STATUS", "0"); checkUser.put("STATUS", "0");
pageData.put("checkUser",JSON.toJSONString(checkUser));
retint += hiddenCheckApiMapper.save(checkUser); retint += hiddenCheckApiMapper.save(checkUser);
Map<String,Object> notRepr = new HashMap<>(); Map<String,Object> notRepr = new HashMap<>();
notRepr.put("hiddendescr",hiddenDescr);// notRepr.put("hiddendescr",hiddenDescr);//
@ -131,6 +133,8 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
if (checkOhther != null && !checkOhther.equals("") && !checkOhther.equals("[]")) { if (checkOhther != null && !checkOhther.equals("") && !checkOhther.equals("[]")) {
List<JSONObject> list = (List<JSONObject>) JSON.parse(checkOhther); List<JSONObject> list = (List<JSONObject>) JSON.parse(checkOhther);
Map<String, String> otherMap = new HashMap<>();
int count = 1;
for (JSONObject json : list) { for (JSONObject json : list) {
PageData other = new PageData(); PageData other = new PageData();
other.put("HIDDENCHECK_ID", UuidUtil.get32UUID()); // 主键 other.put("HIDDENCHECK_ID", UuidUtil.get32UUID()); // 主键
@ -138,13 +142,17 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID")); other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID"));
other.put("USER_ID", json.get("USER_ID")); other.put("USER_ID", json.get("USER_ID"));
other.put("STATUS", "0"); other.put("STATUS", "0");
pageData.put("other"+count,JSON.toJSONString(other));
count+=1;
retint += hiddenCheckApiMapper.save(other); retint += hiddenCheckApiMapper.save(other);
messageService.sendMessageByParameter("HIDDEN_MAIL_004","友情提示:有一条隐患需要验收", messageService.sendMessageByParameter("HIDDEN_MAIL_004","友情提示:有一条隐患需要验收",
Jurisdiction.getCORPINFO_ID(),json.get("USER_ID").toString(),hiddenId, Jurisdiction.getCORPINFO_ID(),json.get("USER_ID").toString(),hiddenId,
hiddenDescr,"隐患验收","验收","",""); hiddenDescr,"隐患验收","验收","","");
} }
pageData.put("otherMap",JSON.toJSONString(otherMap));
} }
return retint; pageData.put("retint",retint);
return pageData;
} }
/**id /**id

View File

@ -1,5 +1,6 @@
package com.zcloud.service.hiddenApi.impl; package com.zcloud.service.hiddenApi.impl;
import com.alibaba.fastjson.JSON;
import com.zcloud.entity.Page; import com.zcloud.entity.Page;
import com.zcloud.entity.PageData; import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.hiddenApi.HiddenExamineApiMapper; import com.zcloud.mapper.datasource.hiddenApi.HiddenExamineApiMapper;
@ -189,6 +190,7 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
pageData.put("HIDDEN_ID",pd.get("HIDDEN_ID")); pageData.put("HIDDEN_ID",pd.get("HIDDEN_ID"));
hiddenExamineApiMapper.deleteByHiddenIdAndType(pageData); hiddenExamineApiMapper.deleteByHiddenIdAndType(pageData);
hiddenExamineApiMapper.save(before); hiddenExamineApiMapper.save(before);
pd.put("before", JSON.toJSONString(before));
return pd; return pd;
} }
/** /**
@ -211,7 +213,7 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
return hiddenExamineApiMapper.save(exam); return hiddenExamineApiMapper.save(exam);
} }
public int saveRectify(String hiddenId )throws Exception{ public PageData saveRectify(String hiddenId )throws Exception{
PageData exam = new PageData();// 添加隐患初始信息 PageData exam = new PageData();// 添加隐患初始信息
exam.put("HIDDENEXAMINE_ID",UuidUtil.get32UUID()); exam.put("HIDDENEXAMINE_ID",UuidUtil.get32UUID());
exam.put("CREATOR",Jurisdiction.getUSER_ID()); exam.put("CREATOR",Jurisdiction.getUSER_ID());
@ -220,7 +222,8 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
exam.put("OPERATTIME",DateUtil.date2Str(new Date())); exam.put("OPERATTIME",DateUtil.date2Str(new Date()));
exam.put("TYPE",7);//隐患整改 exam.put("TYPE",7);//隐患整改
exam.put("STATE",-1);//验收打回变成初始状态-1 exam.put("STATE",-1);//验收打回变成初始状态-1
return hiddenExamineApiMapper.save(exam); hiddenExamineApiMapper.save(exam);
return exam;
} }
/** /**
* *