清单排查、隐患流程对接代码
parent
6de19888a1
commit
3b1afc8344
|
@ -10,6 +10,7 @@ import java.util.Map;
|
|||
import java.util.Random;
|
||||
import java.io.File;
|
||||
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.controller.bus.HiddenController;
|
||||
import com.zcloud.service.bus.*;
|
||||
import com.zcloud.service.hiddenApi.HiddenApiService;
|
||||
|
@ -642,6 +643,7 @@ public class AppHiddenController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception {
|
||||
// 获取IP
|
||||
HttpServletRequest request = this.getRequest();
|
||||
|
|
|
@ -142,9 +142,6 @@ public class CheckRecordController extends BaseController {
|
|||
pd.put("PERIODSTART", list.get("START_DATE"));
|
||||
pd.put("PERIODEND", list.get("END_DATE"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
checkrecordService.save(pd);
|
||||
checkuserService.delete(pd);
|
||||
PageData checkUser = new PageData();
|
||||
|
@ -152,9 +149,12 @@ public class CheckRecordController extends BaseController {
|
|||
checkUser.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID"));
|
||||
checkUser.put("DEPARTMENT_ID", pd.get("CHECKDEPT"));
|
||||
checkUser.put("USER_ID", pd.get("CHECKOR"));
|
||||
pd.put("checkUser", JSON.toJSONString(checkUser));
|
||||
checkuserService.save(checkUser);
|
||||
if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) {
|
||||
List<JSONObject> userList = (List<JSONObject>) JSON.parse(pd.get("OTHER").toString());
|
||||
HashMap<String, String> otherMap = new HashMap<>();
|
||||
int count = 1;
|
||||
for (JSONObject json : userList) {
|
||||
if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null
|
||||
&& json.get("USER_ID") != "") {
|
||||
|
@ -163,12 +163,17 @@ public class CheckRecordController extends BaseController {
|
|||
other.put("CHECKRECORD_ID", pd.get("CHECKRECORD_ID"));
|
||||
other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID"));
|
||||
other.put("USER_ID", json.get("USER_ID"));
|
||||
otherMap.put("other"+count,JSON.toJSONString(other));
|
||||
count+=1;
|
||||
checkuserService.save(other);
|
||||
}
|
||||
}
|
||||
pd.put("otherMap",JSON.toJSONString(otherMap));
|
||||
}
|
||||
if (pd.get("ITEMS") != null && !pd.get("ITEMS").equals("")) {
|
||||
List<JSONObject> itemsList = (List<JSONObject>) JSON.parse(pd.get("ITEMS").toString());
|
||||
Map<String, String> itemMap = new HashMap<>();
|
||||
int count = 1;
|
||||
for (JSONObject json : itemsList) {
|
||||
PageData item = new PageData();
|
||||
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("LONGITUDE", pd.get("LONGITUDE"));
|
||||
item.put("LATITUDE", pd.get("LATITUDE"));
|
||||
itemMap.put("item"+count, JSON.toJSONString(item));
|
||||
count+=1;
|
||||
recordItemService.save(item);
|
||||
|
||||
}
|
||||
pd.put("itemMap",JSON.toJSONString(itemMap));
|
||||
}
|
||||
if (pd.get("IDS") != null && !pd.get("IDS").equals("")) {
|
||||
String ids = pd.get("IDS").toString();
|
||||
|
@ -220,9 +227,7 @@ public class CheckRecordController extends BaseController {
|
|||
hiddenpd.getString("HIDDENDESCR"),"隐患确认","确认","","");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
map.put("dockData", JSON.toJSONString(pd));
|
||||
map.put("result", errInfo);
|
||||
return map;
|
||||
}
|
||||
|
@ -236,6 +241,7 @@ public class CheckRecordController extends BaseController {
|
|||
@RequestMapping(value = "/delete")
|
||||
@RequiresPermissions("checkrecord:del")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception {
|
||||
Map<String, String> map = new HashMap<String, String>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -140,7 +140,8 @@ public class HiddenController extends BaseController {
|
|||
PageData hiddenRegion = hiddenRegionService.saveHidden(pd.getString("HIDDENPART"));
|
||||
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
|
||||
if (pd.get("RECTIFICATIONTYPE") != null && Tools.notEmpty(pd.get("RECTIFICATIONTYPE").toString())) {
|
||||
|
@ -162,6 +163,7 @@ public class HiddenController extends BaseController {
|
|||
PageData loginDeptPd = new PageData();
|
||||
loginDeptPd.put("DEPARTMENT_ID", Jurisdiction.getDEPARTMENT_ID());
|
||||
PageData longinfoUserDept = departmentService.findById(loginDeptPd);//获取登录人部门信息
|
||||
pd.put("longinfoUserDept",JSON.toJSONString(longinfoUserDept));
|
||||
if (Tools.isEmpty(longinfoUserDept) || Tools.isEmpty(longinfoUserDept.getString("HEADMAN"))) {// 查看部门是否有负责人
|
||||
return ResultCodeConstant.resMap(000201); //所在部门未维护部门负责人
|
||||
} else {//如何维护了,隐患确认人就要成为部门负责人
|
||||
|
@ -274,6 +276,7 @@ public class HiddenController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value = "/listAdd")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object listAdd() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
@ -306,11 +309,13 @@ public class HiddenController extends BaseController {
|
|||
}
|
||||
}
|
||||
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")) {//判断是否是重大隐患
|
||||
PageData userpd = new PageData();
|
||||
userpd.put("USER_ID", Jurisdiction.getUSER_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")) {//判断部门级别是不是班组
|
||||
userpd.put("DEPARTMENT_ID", departmentService.findById(userpd).getString("DEPARTMENT_ID"));
|
||||
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("CREATOR", pd.getString("loginUserId"));
|
||||
before.put("OPERATOR", pd.getString("loginUserId"));
|
||||
pd.put("before", JSON.toJSONString(before));
|
||||
hiddenExamineService.saveApp(before);
|
||||
hiddenService.save(pd);
|
||||
map.put("result", errInfo);
|
||||
map.put("pd", pd);
|
||||
map.put("dockData",JSON.toJSONString(pd));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
@ -371,6 +378,7 @@ public class HiddenController extends BaseController {
|
|||
*/
|
||||
@RequestMapping(value = "/delete")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object delete() throws Exception {
|
||||
// 获取IP
|
||||
HttpServletRequest request = this.getRequest();
|
||||
|
@ -2030,6 +2038,7 @@ public class HiddenController extends BaseController {
|
|||
@RequestMapping(value = "/confirmHidden")
|
||||
@RequiresPermissions("hidden:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation
|
||||
public Object confirmHidden() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
String errInfo = "success";
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package com.zcloud.controller.hiddenApi;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.aspect.DockAnnotation;
|
||||
import com.zcloud.controller.base.BaseController;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
@ -369,13 +371,12 @@ public class HiddenApiController extends BaseController {
|
|||
@RequestMapping(value = "/confirmHidden")
|
||||
@RequiresPermissions("hidden:edit")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object confirmHidden() throws Exception {
|
||||
Map<String, Object> map = new HashMap<String, Object>();
|
||||
Integer code = 000000;
|
||||
PageData pd = new PageData();
|
||||
pd = this.getPageData();
|
||||
|
||||
|
||||
String HIDDENLEVEL = pd.getString("HIDDENLEVEL"); // 隐患级别
|
||||
String RECTIFICATIONOR = pd.getString("RECTIFICATIONOR");//整改负责人
|
||||
String RECTIFICATIONDEADLINE = pd.getString("RECTIFICATIONDEADLINE"); //整改完成期限
|
||||
|
@ -430,9 +431,10 @@ public class HiddenApiController extends BaseController {
|
|||
hidden.put("RECTIFICATIONOR",RECTIFICATIONOR);
|
||||
hidden.put("RECTIFICATIONDEADLINE",RECTIFICATIONDEADLINE);
|
||||
hidden.put("RECTIFICATIONDEPT",RECTIFICATIONDEPT);
|
||||
hiddenExamineApiService.saveConfirm(hidden, "4"); //添加隐患处理流程
|
||||
hiddenApiService.confirmHidden(pd); //确认
|
||||
|
||||
PageData pageData = hiddenExamineApiService.saveConfirm(hidden, "4"); //添加隐患处理流程
|
||||
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")) {
|
||||
messageService.sendMessageByParameter("HIDDEN_MAIL_002", "友情提示:有一条隐患需要整改",
|
||||
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("HIDDENDESCR"), "通过", "整改", "", "");
|
||||
}
|
||||
map.put("dockData",JSON.toJSONString(pd));
|
||||
return ResultCodeConstant.resMap(code, map);
|
||||
}
|
||||
|
||||
|
@ -500,6 +503,7 @@ public class HiddenApiController extends BaseController {
|
|||
@RequestMapping(value = "/rectify")
|
||||
@RequiresPermissions("hidden:list")
|
||||
@ResponseBody
|
||||
@DockAnnotation(isAdd = true)
|
||||
public Object rectify() throws Exception {
|
||||
/**
|
||||
* 修改隐患信息
|
||||
|
@ -548,16 +552,19 @@ public class HiddenApiController extends BaseController {
|
|||
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"));
|
||||
for (PageData pageData : hiddenUserList) {
|
||||
if ("2".equals(pageData.getString("TYPE")) && "-1".equals(pageData.getString("STATE"))) { //延期审核 没有审批的
|
||||
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);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.zcloud.service.bus;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
|
||||
|
@ -56,9 +58,11 @@ public interface HiddenUserService{
|
|||
|
||||
/**
|
||||
* 添加隐患整改人
|
||||
*
|
||||
* @return
|
||||
* @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获取隐患相关人员
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.zcloud.service.bus.impl;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
import com.zcloud.util.Tools;
|
||||
import com.zcloud.util.UuidUtil;
|
||||
|
@ -84,12 +85,15 @@ public class HiddenUserServiceImpl implements HiddenUserService{
|
|||
|
||||
/**
|
||||
* 添加隐患相关人员信息 -- 有主要处理人
|
||||
* @param userIds 用户ids
|
||||
* @param hiddenId 隐患id
|
||||
* @param type 类别
|
||||
*
|
||||
* @param userIds 用户ids
|
||||
* @param hiddenId 隐患id
|
||||
* @param type 类别
|
||||
* @return
|
||||
* @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)){
|
||||
PageData del = new PageData();
|
||||
del.put("TYPE",type);
|
||||
|
@ -97,7 +101,10 @@ public class HiddenUserServiceImpl implements HiddenUserService{
|
|||
hiddenuserMapper.deleteByHidden(del); // 先删除后添加
|
||||
}
|
||||
if(!Tools.isEmpty(userIds)){
|
||||
saveMap.put("USER_ID",Jurisdiction.getUSER_ID());
|
||||
String removeLoginUser = userIds.replaceAll(Jurisdiction.getUSER_ID(),""); //去除当前登录人的用户id
|
||||
HashMap<String, String> hiddenUserMap = new HashMap<>();
|
||||
int count = 1;
|
||||
String userID [] = removeLoginUser.split(",");
|
||||
for (int i =0;i<userID.length;i++){
|
||||
if(!Tools.isEmpty(userID[i])){
|
||||
|
@ -107,9 +114,12 @@ public class HiddenUserServiceImpl implements HiddenUserService{
|
|||
pd.put("USER_ID",userID[i]);
|
||||
pd.put("TYPE",type);
|
||||
pd.put("IS_MAIN","0");
|
||||
hiddenUserMap.put("hiddenuser"+count, JSON.toJSONString(pd));
|
||||
count+=1;
|
||||
hiddenuserMapper.save(pd);
|
||||
}
|
||||
}
|
||||
saveMap.put("hiddenUserMap",JSON.toJSONString(hiddenUserMap));
|
||||
}
|
||||
PageData pd = new PageData();
|
||||
pd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
|
||||
|
@ -117,7 +127,9 @@ public class HiddenUserServiceImpl implements HiddenUserService{
|
|||
pd.put("USER_ID",Jurisdiction.getUSER_ID());
|
||||
pd.put("TYPE",type);
|
||||
pd.put("IS_MAIN","1");
|
||||
saveMap.put("saveUser",JSON.toJSONString(pd));
|
||||
hiddenuserMapper.save(pd);
|
||||
return saveMap;
|
||||
}
|
||||
/**
|
||||
* 根据隐患ids获取隐患相关人员
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.zcloud.entity.Page;
|
|||
import com.zcloud.entity.PageData;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:隐患Api
|
||||
|
@ -28,11 +27,13 @@ public interface HiddenApiService {
|
|||
public PageData findById(PageData pd)throws Exception;
|
||||
|
||||
/**
|
||||
* 确认隐患信息
|
||||
* @param pd
|
||||
* @throws Exception
|
||||
*/
|
||||
public void confirmHidden(PageData pd) throws Exception;
|
||||
* 确认隐患信息
|
||||
*
|
||||
* @param pd
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData confirmHidden(PageData pd) throws Exception;
|
||||
/**
|
||||
* 隐患整改
|
||||
* @param hiddenId 隐患ID
|
||||
|
|
|
@ -59,16 +59,17 @@ public interface HiddenCheckApiService {
|
|||
public void deleteAll(String[] ArrayDATA_IDS)throws Exception;
|
||||
|
||||
/**
|
||||
* 隐患验收
|
||||
* @param checkUserId 验收人
|
||||
* @param checkUserDeptId 验收部门
|
||||
* @param checkOhther 其他验收人
|
||||
* @param hiddenId
|
||||
* @param hiddenDescr 隐患描述
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public int saveHiddenCheck(String checkUserId,String checkUserDeptId ,String checkOhther,String hiddenId,String hiddenDescr )throws Exception;
|
||||
* 隐患验收
|
||||
*
|
||||
* @param checkUserId 验收人
|
||||
* @param checkUserDeptId 验收部门
|
||||
* @param checkOhther 其他验收人
|
||||
* @param hiddenId
|
||||
* @param hiddenDescr 隐患描述
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
public PageData saveHiddenCheck(String checkUserId, String checkUserDeptId , String checkOhther, String hiddenId, String hiddenDescr )throws Exception;
|
||||
/**通过id获取数据
|
||||
* @param hiddenId 隐患id
|
||||
* @throws Exception
|
||||
|
|
|
@ -126,9 +126,9 @@ public interface HiddenExamineApiService {
|
|||
public int saveRepulseCheck(String hiddenId ,String EXAMINE)throws Exception;
|
||||
|
||||
/**
|
||||
* 当隐患整改的时候,隐患流程进行修改
|
||||
* 当隐患整改的时候,隐患流程进行修改
|
||||
*/
|
||||
public int saveRectify(String hiddneId) throws Exception;
|
||||
public PageData saveRectify(String hiddneId) throws Exception;
|
||||
|
||||
/**
|
||||
* 通过 审批
|
||||
|
|
|
@ -18,7 +18,6 @@ import org.springframework.transaction.annotation.Transactional;
|
|||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 说明:隐患
|
||||
|
@ -61,7 +60,7 @@ public class HiddenApiServiceImpl implements HiddenApiService{
|
|||
|
||||
return hiddenApiMapper.findById(pd);
|
||||
}
|
||||
public void confirmHidden(PageData pd) throws Exception{
|
||||
public PageData confirmHidden(PageData pd) throws Exception{
|
||||
PageData conPd = new PageData();
|
||||
conPd.put("STATE",pd.getString("STATE"));
|
||||
conPd.put("CONFIRM_USER", Jurisdiction.getUSER_ID());
|
||||
|
@ -72,6 +71,7 @@ public class HiddenApiServiceImpl implements HiddenApiService{
|
|||
conPd.put("HIDDENLEVEL",pd.getString("HIDDENLEVEL"));
|
||||
conPd.put("HIDDEN_ID",pd.getString("HIDDEN_ID"));
|
||||
hiddenApiMapper.confirmHidden(conPd);
|
||||
return conPd;
|
||||
}
|
||||
/**
|
||||
* 隐患整改
|
||||
|
|
|
@ -6,7 +6,6 @@ import com.zcloud.entity.Page;
|
|||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.hiddenApi.HiddenCheckApiMapper;
|
||||
import com.zcloud.mapper.datasource.hiddenApi.HiddenExamineApiMapper;
|
||||
import com.zcloud.service.announcement.TemplateAnnounService;
|
||||
import com.zcloud.service.hiddenApi.HiddenCheckApiService;
|
||||
import com.zcloud.util.DateUtil;
|
||||
import com.zcloud.util.Jurisdiction;
|
||||
|
@ -104,15 +103,17 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
|
|||
}
|
||||
/**
|
||||
* 隐患验收
|
||||
* @param checkUserId 验收人
|
||||
*
|
||||
* @param checkUserId 验收人
|
||||
* @param checkUserDeptId 验收部门
|
||||
* @param checkOhther 其他验收人
|
||||
* @param checkOhther 其他验收人
|
||||
* @param hiddenId
|
||||
* @param hiddenDescr 隐患描述
|
||||
* @param hiddenDescr 隐患描述
|
||||
* @return
|
||||
* @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;
|
||||
PageData checkUser = new PageData();
|
||||
checkUser.put("HIDDENCHECK_ID", UuidUtil.get32UUID()); // 主键
|
||||
|
@ -120,6 +121,7 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
|
|||
checkUser.put("DEPARTMENT_ID", checkUserDeptId);
|
||||
checkUser.put("USER_ID", checkUserId);
|
||||
checkUser.put("STATUS", "0");
|
||||
pageData.put("checkUser",JSON.toJSONString(checkUser));
|
||||
retint += hiddenCheckApiMapper.save(checkUser);
|
||||
Map<String,Object> notRepr = new HashMap<>();
|
||||
notRepr.put("hiddendescr",hiddenDescr);//
|
||||
|
@ -131,6 +133,8 @@ public class HiddenCheckApiServiceImpl implements HiddenCheckApiService {
|
|||
|
||||
if (checkOhther != null && !checkOhther.equals("") && !checkOhther.equals("[]")) {
|
||||
List<JSONObject> list = (List<JSONObject>) JSON.parse(checkOhther);
|
||||
Map<String, String> otherMap = new HashMap<>();
|
||||
int count = 1;
|
||||
for (JSONObject json : list) {
|
||||
PageData other = new PageData();
|
||||
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("USER_ID", json.get("USER_ID"));
|
||||
other.put("STATUS", "0");
|
||||
pageData.put("other"+count,JSON.toJSONString(other));
|
||||
count+=1;
|
||||
retint += hiddenCheckApiMapper.save(other);
|
||||
messageService.sendMessageByParameter("HIDDEN_MAIL_004","友情提示:有一条隐患需要验收",
|
||||
Jurisdiction.getCORPINFO_ID(),json.get("USER_ID").toString(),hiddenId,
|
||||
hiddenDescr,"隐患验收","验收","","");
|
||||
}
|
||||
pageData.put("otherMap",JSON.toJSONString(otherMap));
|
||||
}
|
||||
return retint;
|
||||
pageData.put("retint",retint);
|
||||
return pageData;
|
||||
}
|
||||
|
||||
/**通过id获取数据 验收信息
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.zcloud.service.hiddenApi.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.zcloud.entity.Page;
|
||||
import com.zcloud.entity.PageData;
|
||||
import com.zcloud.mapper.datasource.hiddenApi.HiddenExamineApiMapper;
|
||||
|
@ -189,6 +190,7 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
|
|||
pageData.put("HIDDEN_ID",pd.get("HIDDEN_ID"));
|
||||
hiddenExamineApiMapper.deleteByHiddenIdAndType(pageData);
|
||||
hiddenExamineApiMapper.save(before);
|
||||
pd.put("before", JSON.toJSONString(before));
|
||||
return pd;
|
||||
}
|
||||
/**
|
||||
|
@ -211,7 +213,7 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
|
|||
return hiddenExamineApiMapper.save(exam);
|
||||
}
|
||||
|
||||
public int saveRectify(String hiddenId )throws Exception{
|
||||
public PageData saveRectify(String hiddenId )throws Exception{
|
||||
PageData exam = new PageData();// 添加隐患初始信息
|
||||
exam.put("HIDDENEXAMINE_ID",UuidUtil.get32UUID());
|
||||
exam.put("CREATOR",Jurisdiction.getUSER_ID());
|
||||
|
@ -220,7 +222,8 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
|
|||
exam.put("OPERATTIME",DateUtil.date2Str(new Date()));
|
||||
exam.put("TYPE",7);//隐患整改
|
||||
exam.put("STATE",-1);//验收打回变成初始状态-1
|
||||
return hiddenExamineApiMapper.save(exam);
|
||||
hiddenExamineApiMapper.save(exam);
|
||||
return exam;
|
||||
}
|
||||
/**
|
||||
* 通过 审批
|
||||
|
|
Loading…
Reference in New Issue