消防资源管理对接代码

pull/14/head
songwenxuan 2023-12-23 10:49:42 +08:00
parent 6e813e70ef
commit 9a06cfa206
14 changed files with 104 additions and 20 deletions

View File

@ -1,11 +1,13 @@
package com.zcloud.controller.app;
import java.sql.Array;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.service.bus.*;
import com.zcloud.util.*;
import com.zcloud.util.message.MessageService;
@ -77,6 +79,7 @@ public class AppCheckRecordController extends BaseController {
@RequestMapping(value = "/add")
@ResponseBody
@Transactional
@DockAnnotation
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -134,6 +137,7 @@ public class AppCheckRecordController extends BaseController {
hiddenService.updateAll(hiddens);
}
map.put("result", errInfo);
map.put("dockData",JSON.toJSONString(pd));
return map;
}
@ -146,6 +150,7 @@ public class AppCheckRecordController extends BaseController {
@RequestMapping(value = "/finish")
@ResponseBody
@Transactional
@DockAnnotation
public Object finish() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -199,6 +204,7 @@ public class AppCheckRecordController extends BaseController {
checkuserService.delete(pd);
if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) {
List<JSONObject> list1 = (List<JSONObject>) JSON.parse(pd.get("OTHER").toString());
ArrayList<PageData> otherList = new ArrayList<>();
for (JSONObject json : list1) {
if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null
&& json.get("USER_ID") != "") {
@ -207,9 +213,11 @@ public class AppCheckRecordController 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"));
otherList.add(other);
checkuserService.save(other);
}
}
pd.put("otherList", otherList);
}
hiddenService.submit(pd);// 清单内隐患提交
hiddenService.submitList(pd);// 其他隐患提交
@ -226,6 +234,7 @@ public class AppCheckRecordController extends BaseController {
}
map.put("result", errInfo);
map.put("dockData",JSON.toJSONString(pd));
return map;
}

View File

@ -22,6 +22,7 @@ import com.zcloud.util.*;
import com.zcloud.util.event.DeviceHiddenEvent;
import com.zcloud.util.message.MessageService;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.crypto.hash.Hash;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;
@ -263,6 +264,7 @@ public class AppHiddenController extends BaseController {
*/
@RequestMapping(value = "/add")
@ResponseBody
@DockAnnotation
public Object add() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -292,7 +294,9 @@ public class AppHiddenController extends BaseController {
pd.put("RISK_POSITION", item.get("POSITIONNAME"));
pd.put("LEVEL", item.get("DNAME5"));
}
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现人
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("other").toString()); // 隐患发现
HashMap<String, String> hiddenconUserMap = new HashMap<>();
int count = 1;
for (JSONObject json : list) {
PageData hiddenconUserAdd = new PageData();
hiddenconUserAdd.put("HIDDENUSER_ID", UuidUtil.get32UUID());
@ -300,8 +304,11 @@ public class AppHiddenController extends BaseController {
hiddenconUserAdd.put("USER_ID", json.get("USER_ID"));
hiddenconUserAdd.put("TYPE", "1");
hiddenconUserAdd.put("IS_MAIN", "0");
hiddenconUserMap.put("hiddenconUser"+count,JSON.toJSONString(hiddenconUserAdd));
count++;
hiddenUserService.save(hiddenconUserAdd); // 添加隐患发现人
}
pd.put("hiddenconUserMap",JSON.toJSONString(hiddenconUserMap));
if (pd.getString("HIDDENLEVEL").equals("jdyh001") || pd.getString("HIDDENLEVEL").equals("hiddenLevel2002")) {//判断是否是重大隐患
PageData userpd = new PageData();
userpd.put("USER_ID", pd.getString("CREATOR"));
@ -344,7 +351,8 @@ public class AppHiddenController extends BaseController {
before.put("spare4", pd.getString("RECTIFICATIONDEPT"));
before.put("CREATOR", pd.getString("loginUserId"));
before.put("OPERATOR", pd.getString("loginUserId"));
hiddenExamineService.saveApp(before);
PageData pageData = hiddenExamineService.saveApp(before);
pd.put("examine", JSON.toJSONString(pageData));
hiddenService.save(pd);
if (!pd.getString("STATE").equals("0")) {
messageService.sendMessageByParameter("HIDDEN_MAIL_001", "友情提示:有一条隐患需要确认", pd.getString("CORPINFO_ID"), pd.getString("CONFIRM_USER"), pd.getString("HIDDEN_ID"),
@ -364,10 +372,10 @@ public class AppHiddenController extends BaseController {
imgFilesService.delete(i);
}
}
}
map.put("result", errInfo);
map.put("pd", pd);
map.put("dockData",JSON.toJSONString(pd));
return map;
}
@ -412,7 +420,8 @@ public class AppHiddenController extends BaseController {
before.put("spare4", pd.getString("RECTIFICATIONDEPT"));
before.put("CREATOR", pd.getString("loginUserId"));
before.put("OPERATOR", pd.getString("loginUserId"));
hiddenExamineService.saveApp(before);
PageData hiddenExamine = hiddenExamineService.saveApp(before);
pd.put("hiddenExamine", JSON.toJSONString(hiddenExamine));
PageData hiddenExaminePageData = new PageData();
hiddenExaminePageData.putAll(before);
@ -955,6 +964,7 @@ public class AppHiddenController extends BaseController {
@RequestMapping(value = "/rectify")
@ResponseBody
@Transactional
@DockAnnotation
public Object rectify() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -989,6 +999,7 @@ public class AppHiddenController extends BaseController {
if (pd.get("OTHER") != null && !pd.get("OTHER").equals("")) {
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.get("OTHER").toString());
List<PageData> otherList = new ArrayList<>();
for (JSONObject json : list) {
// if (json.get("DEPARTMENT_ID") != null && json.get("DEPARTMENT_ID") != "" && json.get("USER_ID") != null
// && json.get("USER_ID") != "") {
@ -999,6 +1010,7 @@ public class AppHiddenController extends BaseController {
other.put("DEPARTMENT_ID", json.get("DEPARTMENT_ID"));
other.put("USER_ID", json.get("USER_ID"));
other.put("STATUS", "0");
otherList.add(other);
hiddenCheckService.save(other);
PageData hiddenPd = hiddenService.findById(pd);
messageService.sendMessageByParameter("HIDDEN_MAIL_004", "友情提示:有一条隐患需要验收",
@ -1006,9 +1018,11 @@ public class AppHiddenController extends BaseController {
hiddenPd.getString("HIDDENDESCR"), "隐患验收", "验收", "", "");
}
}
pd.put("otherList",JSON.toJSONString(otherList));
}
map.put("result", errInfo);
map.put("HIDDENSCHEME_ID", pd.get("HIDDENSCHEME_ID"));
map.put("dockData",JSON.toJSONString(pd));
return map;
}
@ -1068,6 +1082,7 @@ public class AppHiddenController extends BaseController {
*/
@RequestMapping(value = "/check")
@ResponseBody
@DockAnnotation
public Object check() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -1141,11 +1156,13 @@ public class AppHiddenController extends BaseController {
/** 验收打回 **/
hiddenApiService.repulseCheck(pd.getString("HIDDEN_ID"));
/** 记录打回 **/
hiddenExamineApiService.saveRepulseCheckApp(pd.getString("HIDDEN_ID"), pd.getString("CONTENT"), pd.getString("CHECKOR"));
PageData pageData = hiddenExamineApiService.saveRepulseCheckApp(pd.getString("HIDDEN_ID"), pd.getString("CONTENT"), pd.getString("CHECKOR"));
pd.put("pageData", JSON.toJSONString(pageData));
}
hiddenMailService.apphiddneCheckAdopt(pd);
map.put("check", pd);
map.put("result", errInfo);
map.put("dockData",JSON.toJSONString(pd));
return map;
}
@ -1470,6 +1487,7 @@ public class AppHiddenController extends BaseController {
*/
@RequestMapping(value = "/confirm")
@ResponseBody
@DockAnnotation
public Object confirmUpdate() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -1626,6 +1644,7 @@ public class AppHiddenController extends BaseController {
*/
@RequestMapping(value = "/assign")
@ResponseBody
@DockAnnotation
public Object assign() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -1667,6 +1686,7 @@ public class AppHiddenController extends BaseController {
*/
@RequestMapping(value = "/finalcheck")
@ResponseBody
@DockAnnotation
public Object finalcheck() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -1738,6 +1758,7 @@ public class AppHiddenController extends BaseController {
@RequestMapping(value = "/repulseHidden")
//@RequiresPermissions("hidden:edit")
@ResponseBody
@DockAnnotation
public Object repulseHidden() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -1750,6 +1771,7 @@ public class AppHiddenController extends BaseController {
hiddenExamineService.saverepulse(pd);
hiddenMailService.reject(pd);
map.put("result", errInfo);
map.put("dockData",JSON.toJSONString(pd));
return map;
}

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.app;
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;
@ -216,6 +218,7 @@ public class AppHiddenExamineController extends BaseController {
*/
@RequestMapping(value = "/delayedExamine")
@ResponseBody
@DockAnnotation
public Object delayedExamine() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -263,6 +266,7 @@ public class AppHiddenExamineController extends BaseController {
@RequestMapping(value = "/delayed")
@ResponseBody
@Transactional
@DockAnnotation
public Object delayed(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -292,6 +296,7 @@ public class AppHiddenExamineController extends BaseController {
pd.put("CREATOR", pd.getString("loginUserId"));
pd.put("OPERATOR",pd.getString("loginUserId"));
examine = hiddenexamineService.saveApp(examine);
pd.put("examine", JSON.toJSONString(examine));
PageData hiddenpd = hiddenService.findById(pd);
messageService.sendMessageByParameter("HIDDEN_MAIL_007","友情提示:有一条隐患需要延期审核",
hiddenpd.getString("CORPINFO_ID"),hiddenpd.getString("CONFIRM_USER"),hiddenpd.getString("HIDDEN_ID"),
@ -300,6 +305,7 @@ public class AppHiddenExamineController extends BaseController {
map.put("result", errInfo);
map.put("msg", "隐患延期申成功。请通知隐患确认人进行延期确认操作!");
map.put("dockData",JSON.toJSONString(pd));
return map;
}
/**
@ -345,6 +351,7 @@ public class AppHiddenExamineController extends BaseController {
*/
@RequestMapping(value = "/specialExamine")
@ResponseBody
@DockAnnotation
public Object specialExamine(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";

View File

@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.zcloud.aspect.DockAnnotation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -86,6 +87,7 @@ public class AppRiskPointController extends BaseController{
*/
@RequestMapping(value="/editLonAndLat")
@ResponseBody
@DockAnnotation
public Object edit() throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.app.inspection;
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;
@ -85,7 +87,8 @@ public class AppSafetyEnvironmentalController extends BaseController {
*/
@RequestMapping(value="/add")
@ResponseBody
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
@DockAnnotation
public Object add(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception {
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
PageData pd = new PageData();
@ -118,6 +121,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("hiddenList", hiddenList);
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}
@ -163,6 +167,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
*/
@RequestMapping(value="/edit")
@ResponseBody
@DockAnnotation
public Object edit(@RequestParam(value="FFILE",required=false) MultipartFile file) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
@ -191,6 +196,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("hiddenList", hiddenList);
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}
@ -201,6 +207,7 @@ public class AppSafetyEnvironmentalController extends BaseController {
@RequestMapping(value="/explain")
//@RequiresPermissions("safetyenvironmental:edit")
@ResponseBody
@DockAnnotation
public Object explain(@RequestParam(value="FFILE",required=false) MultipartFile[] files) throws Exception{
Map<String,Object> map = new HashMap<String,Object>();
String errInfo = "success";
@ -222,11 +229,13 @@ public class AppSafetyEnvironmentalController extends BaseController {
pd.put("INSPECTION_ORIGINATOR_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
}
safetyenvironmentalService.explain(pd);
PageData log = safetyenvironmentalService.explain(pd);
pd.put("log",JSON.toJSONString(log));
pd.put("inspector",pd.getString("OPERATOR"));
noticeCorpUtil.FailPleadind(pd);
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData",JSON.toJSONString(pd));
return map;
}

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.app.inspection;
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;
@ -78,6 +80,7 @@ public class AppSafetyEnvironmentalExplainController extends BaseController {
*/
@RequestMapping(value = "/add")
@ResponseBody
@DockAnnotation
public Object add(@RequestParam(value = "FFILE", required = false) MultipartFile file) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -104,10 +107,12 @@ public class AppSafetyEnvironmentalExplainController extends BaseController {
Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
pd.put("INSPECTED_SITEUSER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
}
safetyenvironmentalexplainService.save(pd);
PageData log = safetyenvironmentalexplainService.save(pd);
pd.put("logData", log);
noticeCorpUtil.SE_PleadingStepUtil(pd);
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}

View File

@ -1,5 +1,7 @@
package com.zcloud.controller.app.inspection;
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;
@ -63,6 +65,7 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController {
*/
@RequestMapping(value = "/verify")
@ResponseBody
@DockAnnotation
public Object verify(@RequestParam(value = "FFILE", required = false) MultipartFile[] files) throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -91,9 +94,12 @@ public class AppSafetyEnvironmentalInspectorController extends BaseController {
uBean.put("INSPECTION_USER_SIGN_IMG", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
}
safetyenvironmentalinspectorService.verify(uBean);
pd.put("uBean", JSON.toJSONString(uBean));
PageData verify = safetyenvironmentalinspectorService.verify(uBean);
pd.put("verify",JSON.toJSONString(verify));
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}

View File

@ -2151,6 +2151,7 @@ public class HiddenController extends BaseController {
@RequestMapping(value = "/confirmUpdate")
@RequiresPermissions("hidden:edit")
@ResponseBody
@DockAnnotation
public Object confirmUpdate(@RequestParam(value = "FFILE", required = false) MultipartFile file,
@RequestParam(value = "FFILETwo", required = false) MultipartFile fileTwo
@ -2234,7 +2235,8 @@ public class HiddenController extends BaseController {
return map;
}
PageData examine = new PageData();
examine.put("IMGFILES_ID", this.get32UUID());
String IMGFILES_ID = this.get32UUID();
examine.put("IMGFILES_ID", IMGFILES_ID);
examine.put("FOREIGN_KEY", pd.getString("HIDDEN_ID"));
if (pd.getString("STATE").equals("12")) {
examine.put("TYPE", "107");//补充重大隐患信息与临时处置信息
@ -2243,7 +2245,7 @@ public class HiddenController extends BaseController {
}
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
Smb.sshSftp(file, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile,IMGFILES_ID,pd.getString("HIDDEN_ID"),examine.getString("TYPE"));
examine.put("FILEPATH", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
imgFilesService.save(examine);//保存上传的PDF
}
@ -2256,7 +2258,8 @@ public class HiddenController extends BaseController {
return map;
}
PageData examine = new PageData();
examine.put("IMGFILES_ID", this.get32UUID());
String IMGFILES_ID = this.get32UUID();
examine.put("IMGFILES_ID", IMGFILES_ID);
examine.put("FOREIGN_KEY", pd.getString("HIDDEN_ID"));
if (pd.getString("STATE").equals("11")) {
examine.put("TYPE", "112");//补充重大隐患信息与临时处置信息
@ -2265,7 +2268,7 @@ public class HiddenController extends BaseController {
}
String ffile = DateUtil.getDays();
String fileName = this.get32UUID() + fileTwo.getOriginalFilename().substring(fileTwo.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(fileTwo, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile);
Smb.sshSftp(fileTwo, fileName, Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile,IMGFILES_ID,pd.getString("HIDDEN_ID"),pd.getString("TYPE"));
examine.put("FILEPATH", Const.FILEPATHYHTP + Jurisdiction.getCORPINFO_ID() + "/" + ffile + "/" + fileName);
imgFilesService.save(examine);//保存上传的PDF
}
@ -2284,6 +2287,7 @@ public class HiddenController extends BaseController {
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData",JSON.toJSONString(pd));
return map;
}

View File

@ -359,6 +359,7 @@ public class SafetyEnvironmentalController extends BaseController {
@RequestMapping(value = "/edit")
@RequiresPermissions("safetyenvironmental:edit")
@ResponseBody
@DockAnnotation
public Object edit() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -387,6 +388,7 @@ public class SafetyEnvironmentalController extends BaseController {
pd.put("hiddenList", hiddenList);
map.put("pd", pd);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pd));
return map;
}

View File

@ -112,7 +112,7 @@ public class OutSourcedController extends BaseController {
String fileName = this.get32UUID() + file1.getOriginalFilename().substring(file1.getOriginalFilename().lastIndexOf("."));
Smb.sshSftp(file1, fileName, Const.FILEPATHFILE + ffile);
pd.put("MEASURES", Const.FILEPATHFILE + ffile + "/" + fileName);
strings.add(Const.FILEPATHFILE + ffile + "/" + fileName);
strings.add(Const.FILEPATHFILE + ffile + "/" + fileName+"@@"+fileName);
}
if (null != file2 && !file2.isEmpty()) {
@ -250,7 +250,7 @@ public class OutSourcedController extends BaseController {
//}
pd.put("INVOLVING_CORPS", Jurisdiction.getCORPINFO_ID());
outsourcedService.save(pd);
pd.put("pictList",strings);
map.put("sendPicturesList",strings);
map.put("dockData", JSON.toJSONString(pd));
map.put("result", errInfo);
return map;

View File

@ -141,7 +141,9 @@ public class HiddenExamineServiceImpl implements HiddenExamineService {
return hiddenexamineMapper.findByIdAndHidden(pd);
}
public PageData saveApp(PageData pd)throws Exception{
pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID());
if (pd.get("HIDDENEXAMINE_ID")==null) {
pd.put("HIDDENEXAMINE_ID", UuidUtil.get32UUID());
}
pd.put("CREATTIME", DateUtil.date2Str(new Date()));
pd.put("OPERATTIME",DateUtil.date2Str(new Date()));
hiddenexamineMapper.save(pd);

View File

@ -139,10 +139,11 @@ public interface HiddenExamineApiService {
public int adoptExamine(String hiddenexamineId ,String examine)throws Exception;
/**
*
*
* @param hiddenId
* @param EXAMINE
* @throws Exception
*/
public int saveRepulseCheckApp(String hiddenId ,String EXAMINE,String loginUserId)throws Exception;
public PageData saveRepulseCheckApp(String hiddenId , String EXAMINE, String loginUserId)throws Exception;
}

View File

@ -242,7 +242,7 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
exam.put("EXAMINE",examine);
return hiddenExamineApiMapper.adoptExamine(exam);
}
public int saveRepulseCheckApp(String hiddenId ,String EXAMINE,String loginUserId)throws Exception{
public PageData saveRepulseCheckApp(String hiddenId , String EXAMINE, String loginUserId)throws Exception{
PageData exam = new PageData();// 添加隐患初始信息
exam.put("HIDDENEXAMINE_ID",UuidUtil.get32UUID());
exam.put("CREATOR",loginUserId);
@ -253,7 +253,9 @@ public class HiddenExamineApiServiceImpl implements HiddenExamineApiService {
exam.put("STATE",-1);//验收打回变成初始状态-1
exam.put("EXAMINE",EXAMINE);//打回意见
exam.put("HIDDEN_ID",hiddenId);//隐患ID
return hiddenExamineApiMapper.save(exam);
int save = hiddenExamineApiMapper.save(exam);
exam.put("result",save);
return exam;
}
}

View File

@ -65,7 +65,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
* @param pd
* @throws Exception
*/
public List<PageData> save(PageData pd)throws Exception{
public List<PageData> save(PageData pd)throws Exception {
List<PageData> hiddenList = new ArrayList<PageData>();
String currentTime = DateUtil.date2Str(new Date());
if (Tools.notEmpty(pd.getString("SITUATIONJSON"))) {
@ -290,6 +290,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
}
}
}
pd.put("inspector",JSON.toJSONString(inspector));
safetyenvironmentalinspectorService.save(inspector);
if (note_flag) noticeCorpUtil.SE_OneStepUtil(inspector);
time = DateUtil.calculateDateSecond(time, 1);
@ -331,6 +332,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
if (Tools.notEmpty(pd.getString("SITUATIONJSON"))) {
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("SITUATIONJSON"));
String time = currentTime;
ArrayList<PageData> situationList = new ArrayList<>();
for (JSONObject json : list) {
PageData situationPd = new PageData();
if (Tools.isEmpty(json.getString("INSPECTION_SITUATION_ID"))) {
@ -343,6 +345,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
situationPd.put("OPERATOR", pd.getString("OPERATOR")); //修改人
situationPd.put("OPERATTIME", time); //修改时间
situationPd.put("CORPINFO_ID", pd.getString("CORPINFO_ID")); //企业ID
situationList.add(situationPd);
safetyenvironmentalsituationService.save(situationPd);
time = DateUtil.calculateDateSecond(time, 1);
} else {
@ -351,9 +354,11 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
situationPd.put("SITUATION", json.getString("SITUATION")); //检查情况
situationPd.put("OPERATOR", pd.getString("OPERATOR")); //修改人
situationPd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间
situationList.add(situationPd);
safetyenvironmentalsituationService.edit(situationPd);
}
}
pd.put("situationList",JSON.toJSONString(situationList));
}
String[] delHiddens = "".equals(pd.getString("delHiddens")) ? new String[0] : pd.getString("delHiddens").split(",");
if (delHiddens.length > 0) {
@ -367,6 +372,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
if (Tools.notEmpty(pd.getString("HIDDENJSON"))) {
List<JSONObject> list = (List<JSONObject>) JSON.parse(pd.getString("HIDDENJSON"));
String time = currentTime;
ArrayList<PageData> hiddenpdList = new ArrayList<>();
ArrayList<PageData> userList = new ArrayList<>();
for (JSONObject json : list) {
PageData hidden = new PageData();
if (Tools.isEmpty(json.getString("HIDDEN_ID"))) {
@ -389,6 +396,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));
hidden.put("ISRELEVANT",json.getString("ISRELEVANT"));
hiddenpdList.add(hidden);
hiddenService.save(hidden);
time = DateUtil.calculateDateSecond(time, 1);
} else {
@ -409,6 +417,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1删除)
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));
hidden.put("ISRELEVANT",json.getString("ISRELEVANT"));
hiddenpdList.add(hidden);
hiddenService.editInfo(hidden);
PageData del = new PageData();
@ -423,9 +432,12 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
findUser.put("USER_ID",json.getString("CREATOR"));
findUser.put("TYPE","1");
findUser.put("IS_MAIN","0");
userList.add(findUser);
hiddenUserService.save(findUser);
hiddenList.add(hidden);
}
pd.put("hiddenpdList",JSON.toJSONString(hiddenpdList));
pd.put("userList",JSON.toJSONString(userList));
}
String[] delHiddenFiles = "".equals(pd.getString("delHiddenFiles")) ? new String[0] : pd.getString("delHiddenFiles").split(",");
@ -442,6 +454,7 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
log.put("ACTION", "安全环保检查重新申请"); //操作内容
log.put("CREATTIME", pd.getString("CREATTIME")); //添加时间
log.put("CREATOR", pd.getString("ACTION_USER")); //添加人姓名
pd.put("log",JSON.toJSONString(log));
safetyenvironmentallogService.save(log);
// 编辑的时候自动清空附件
if (!"1".equals(pd.getString("unClear"))){