diff --git a/src/main/java/com/zcloud/controller/firemanager/FireCheckListController.java b/src/main/java/com/zcloud/controller/firemanager/FireCheckListController.java index eba1ef9c..2cb5cf85 100644 --- a/src/main/java/com/zcloud/controller/firemanager/FireCheckListController.java +++ b/src/main/java/com/zcloud/controller/firemanager/FireCheckListController.java @@ -178,6 +178,7 @@ public class FireCheckListController extends BaseController { @LogOperation(value = "新增点检表成功", exceptionInformation = "新增点检表失败") @RequestMapping(value = "/saveInfo") @ResponseBody + public Object saveInfo() throws Exception { Map map = new HashMap(); String errInfo = "success"; diff --git a/src/main/java/com/zcloud/controller/firemanager/FireCheckStandardController.java b/src/main/java/com/zcloud/controller/firemanager/FireCheckStandardController.java index 9519fdc0..2171ea6e 100644 --- a/src/main/java/com/zcloud/controller/firemanager/FireCheckStandardController.java +++ b/src/main/java/com/zcloud/controller/firemanager/FireCheckStandardController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.firemanager; +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; @@ -188,6 +190,7 @@ public class FireCheckStandardController extends BaseController { @LogOperation(value = "新增消防器材检查标准成功", exceptionInformation = "新增改消防器材检查标准失败") @RequestMapping(value = "/add") @ResponseBody + @DockAnnotation(isAdd = true) public Object saveInfo() { Map map = new HashMap(); String errInfo = "success"; @@ -200,6 +203,7 @@ public class FireCheckStandardController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); fireCheckStandardService.saveInfo(pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } /** @@ -212,6 +216,7 @@ public class FireCheckStandardController extends BaseController { @LogOperation(value = "删除消防器材检查标准成功", exceptionInformation = "删除改消防器材检查标准失败",isDelete = true) @RequestMapping("/delByIds") @ResponseBody + @DockAnnotation public Object delByIds() { Map map = new HashMap(); String errInfo = "success"; diff --git a/src/main/java/com/zcloud/controller/firemanager/FireDeviceController.java b/src/main/java/com/zcloud/controller/firemanager/FireDeviceController.java index 91059b1f..0b4086e4 100644 --- a/src/main/java/com/zcloud/controller/firemanager/FireDeviceController.java +++ b/src/main/java/com/zcloud/controller/firemanager/FireDeviceController.java @@ -3,6 +3,8 @@ package com.zcloud.controller.firemanager; import java.text.SimpleDateFormat; import java.util.*; +import com.alibaba.fastjson.JSON; +import com.zcloud.aspect.DockAnnotation; import com.zcloud.entity.system.Dictionaries; import com.zcloud.service.bus.ImgFilesService; import com.zcloud.service.system.DepartmentService; @@ -106,6 +108,7 @@ public class FireDeviceController extends BaseController { @LogOperation(value = "修改消防设备成功", exceptionInformation = "修改消防设备失败", isUpdate = true, updateId = "FIRE_DEVICE_ID") @RequestMapping("/updFireDeviceById") @ResponseBody + @DockAnnotation public Object updFirePointById() { Map map = new HashMap(); String errInfo = "success"; @@ -127,6 +130,7 @@ public class FireDeviceController extends BaseController { */ @RequestMapping("/removeFireDeviceByIds") @ResponseBody + @DockAnnotation public Object removeFireDeviceByIds() { Map map = new HashMap(); String errInfo = "success"; @@ -174,6 +178,7 @@ public class FireDeviceController extends BaseController { @LogOperation(value = "新增消防器材成功", exceptionInformation = "新增消防器材失败") @RequestMapping(value = "/saveDeviceInfo") @ResponseBody + @DockAnnotation(isAdd = true) public Object saveInfo() { Map map = new HashMap(); String errInfo = "success"; @@ -186,6 +191,7 @@ public class FireDeviceController extends BaseController { pd.put("OPERATTIME", DateUtil.date2Str(new Date())); fireDeviceService.saveDeviceInfo(pd); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } diff --git a/src/main/java/com/zcloud/controller/firemanager/FirePointController.java b/src/main/java/com/zcloud/controller/firemanager/FirePointController.java index 30b0bc03..6e93bb20 100644 --- a/src/main/java/com/zcloud/controller/firemanager/FirePointController.java +++ b/src/main/java/com/zcloud/controller/firemanager/FirePointController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.firemanager; +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; @@ -148,6 +150,7 @@ public class FirePointController extends BaseController { @LogOperation(value = "修改消防风险点位成功", exceptionInformation = "修改消防风险点位失败", isUpdate = true, updateId = "FIRE_POINT_ID") @RequestMapping("/updFireRegionById") @ResponseBody + @DockAnnotation public Object updFirePointById(@RequestParam(value = "files",required = false) MultipartFile[] files) { Map map = new HashMap(); String errInfo = "success"; @@ -185,6 +188,7 @@ public class FirePointController extends BaseController { @RequestMapping("/removeFirePointByIds") @ResponseBody + @DockAnnotation public Object removeFirePointByIds() { Map map = new HashMap(); String errInfo = "success"; @@ -207,17 +211,20 @@ public class FirePointController extends BaseController { @LogOperation(value = "新增消防风险点位成功", exceptionInformation = "新增消防风险点位失败") @RequestMapping(value = "/savePointInfo") @ResponseBody + @DockAnnotation(isAdd = true) public Object saveInfo(@RequestParam(value = "files",required = false) MultipartFile[] files) { Map map = new HashMap(); String errInfo = "success"; PageData pd = getPageData(); String uuid = this.get32UUID(); pd.put("FIRE_POINT_ID", uuid); - initPageDataUtil.initSave(pd); + PageData initData = initPageDataUtil.initSave(pd); + pd.put("initData", JSON.toJSONString(initData)); pd.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID()); firePointService.savePointInfo(pd); imgFilesService.uploadPicture(files,"118",pd.getString("FIRE_POINT_ID")); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pd)); return map; } diff --git a/src/main/java/com/zcloud/controller/firemanager/FireRegionController.java b/src/main/java/com/zcloud/controller/firemanager/FireRegionController.java index 722da85b..e6a21c16 100644 --- a/src/main/java/com/zcloud/controller/firemanager/FireRegionController.java +++ b/src/main/java/com/zcloud/controller/firemanager/FireRegionController.java @@ -1,5 +1,7 @@ package com.zcloud.controller.firemanager; +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; @@ -16,6 +18,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import javax.annotation.Resource; +import javax.xml.bind.util.JAXBSource; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -91,6 +94,7 @@ public class FireRegionController extends BaseController { @LogOperation(value = "修改消防风险区域成功", exceptionInformation = "修改消防风险区域失败", isUpdate = true, updateId = "FIRE_REGION_ID") @RequestMapping("/updFireRegionById") @ResponseBody + @DockAnnotation public Object updFireRegionById() throws Exception { Map map = new HashMap(); String errInfo = "success"; @@ -126,12 +130,14 @@ public class FireRegionController extends BaseController { @LogOperation(value = "删除消防风险区域成功", exceptionInformation = "删除消防风险区域失败", isDelete = true) @RequestMapping("/delFireRegionByIds") @ResponseBody + @DockAnnotation(isAdd = true) public Object delFireRegionByIds() { Map map = new HashMap(); PageData pd = getPageData(); pd.put("OPERATOR", Jurisdiction.getUsername()); pd.put("OPERATTIME", DateUtil.date2Str(new Date())); fireRegionService.delByIds(map, pd); + map.put("dockData",JSON.toJSONString(pd)); return map; } @@ -145,6 +151,7 @@ public class FireRegionController extends BaseController { @RequestMapping(value = "/saveInfo") @ResponseBody @LogOperation(value = "保存新的消防风险区域成功", exceptionInformation = "保存新的消防风险区域失败") + @DockAnnotation(isAdd = true) public Object saveInfo() { Map map = new HashMap(); String errInfo = "success"; @@ -156,6 +163,7 @@ public class FireRegionController extends BaseController { pd.put("CREATTIME", DateUtil.date2Str(new Date())); pd.put("OPERATTIME", DateUtil.date2Str(new Date())); fireRegionService.saveInfo(pd); + map.put("dockData", JSON.toJSONString(pd)); map.put("result", errInfo); return map; } @@ -170,6 +178,7 @@ public class FireRegionController extends BaseController { @LogOperation(value = "修改消防风险区域禁用启用状态成功", exceptionInformation = "修改消防风险区域禁用启用状态失败", isUpdate = true, updateId = "FIRE_REGION_ID") @RequestMapping(value = "/udpStateById") @ResponseBody + @DockAnnotation public Object udpStateById() { Map map = new HashMap(); String errInfo = "success"; diff --git a/src/main/java/com/zcloud/util/InitPageDataUtil.java b/src/main/java/com/zcloud/util/InitPageDataUtil.java index 9d48e886..269ff40c 100644 --- a/src/main/java/com/zcloud/util/InitPageDataUtil.java +++ b/src/main/java/com/zcloud/util/InitPageDataUtil.java @@ -20,12 +20,13 @@ public class InitPageDataUtil { * @param pd * @return */ - public void initSave(PageData pd) { + public PageData initSave(PageData pd) { pd.put("CREATOR", Jurisdiction.getUSER_ID()); //添加人 pd.put("CREATTIME", DateUtil.date2Str(new Date())); //添加时间 pd.put("OPERATOR", Jurisdiction.getUSER_ID()); //修改人 pd.put("OPERATTIME", DateUtil.date2Str(new Date())); //修改时间 pd.put("ISDELETE", "0"); //是否删除(0:有效 1:删除) + return pd; } public void initSave(PageData pd, String PRIMARY_KEY) {