diff --git a/src/main/java/com/zcloud/controller/app/AppHiddenController.java b/src/main/java/com/zcloud/controller/app/AppHiddenController.java index 94f1d8ce..6a59f947 100644 --- a/src/main/java/com/zcloud/controller/app/AppHiddenController.java +++ b/src/main/java/com/zcloud/controller/app/AppHiddenController.java @@ -675,6 +675,7 @@ public class AppHiddenController extends BaseController { FHLOG.save(pd.getString("loginUserName"), "删除隐患ID:" + pd.getString("HIDDEN_ID"), ip); //记录日志 用户ID 隐患id 时间 applicationContext.publishEvent(new DeviceHiddenEvent(new Object(), pd.getString("HIDDEN_ID"), "1")); map.put("result", errInfo); // 返回结果 + map.put("dockData",JSON.toJSONString(pd)); return map; } @@ -822,7 +823,7 @@ public class AppHiddenController extends BaseController { dockData.putAll(pd); dockData.put("hiddenUserList",hiddenUserList); map.put("pd", pd); - map.put("dockData", dockData); + map.put("dockData", JSON.toJSONString(dockData)); map.put("result", errInfo); return map; } diff --git a/src/main/java/com/zcloud/controller/app/AppImgFilesController.java b/src/main/java/com/zcloud/controller/app/AppImgFilesController.java index cd490554..6f2cb1cb 100644 --- a/src/main/java/com/zcloud/controller/app/AppImgFilesController.java +++ b/src/main/java/com/zcloud/controller/app/AppImgFilesController.java @@ -51,7 +51,6 @@ public class AppImgFilesController extends BaseController { @RequestMapping(value = "/add", headers = "content-type=multipart/form-data") @ResponseBody @Transactional - @DockAnnotation(hasAnnex = true) public Object finish( @RequestParam(value = "FFILE", required = false) MultipartFile[] files, @RequestParam(value = "TYPE", required = false) String TYPE, @@ -114,7 +113,7 @@ public class AppImgFilesController extends BaseController { pd.put("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName); pd.put("TYPE", TYPE); pd.put("FOREIGN_KEY", FOREIGN_KEY); - Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile, IMGFILES_ID, FOREIGN_KEY, TYPE); + Smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile+ "/", IMGFILES_ID, FOREIGN_KEY, TYPE); imgfilesService.save(pd); } } @@ -244,6 +243,10 @@ public class AppImgFilesController extends BaseController { File file = new File(PathUtil.getProjectpath() + pd.getString("FILEPATH")); file.delete(); imgfilesService.delete(pd); + TenCorpDto tenCorpDto = new TenCorpDto(); + pd.put("delete","1"); + tenCorpDto.setData(pd); + dockSendMessageService.sendMessagePictureDelete(tenCorpDto); map.put("result", errInfo); //返回结果 return map; } diff --git a/src/main/java/com/zcloud/controller/firemanager/app/AppFireRecordController.java b/src/main/java/com/zcloud/controller/firemanager/app/AppFireRecordController.java index c4a5f934..518034ca 100644 --- a/src/main/java/com/zcloud/controller/firemanager/app/AppFireRecordController.java +++ b/src/main/java/com/zcloud/controller/firemanager/app/AppFireRecordController.java @@ -1,5 +1,6 @@ package com.zcloud.controller.firemanager.app; +import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.zcloud.aspect.DockAnnotation; import com.zcloud.controller.base.BaseController; @@ -10,14 +11,11 @@ import com.zcloud.mapper.datasource.firemanager.FireDeviceMapper; import com.zcloud.service.bus.ImgFilesService; import com.zcloud.service.firemanager.*; import com.zcloud.service.mq.DockSendMessageService; -import com.zcloud.service.mq.SendMessageService; -import com.zcloud.util.DateUtil; import com.zcloud.util.InitPageDataUtil; -import com.zcloud.util.Jurisdiction; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; import java.util.*; @@ -28,7 +26,8 @@ import java.util.stream.Collectors; * 作者:wangxuan * 官网:www.zcloudchina.com */ -@RestController +@Controller +@ResponseBody @RequestMapping("/app/fireRecordManger") public class AppFireRecordController extends BaseController { @@ -108,6 +107,7 @@ public class AppFireRecordController extends BaseController { * @Return: java.lang.Object */ @RequestMapping("/checkList/v2") + @ResponseBody public Object checkListV2(Page page) { Map map = new HashMap(); String errInfo = "success"; @@ -347,7 +347,7 @@ public class AppFireRecordController extends BaseController { }); map.put("result", errInfo); pd.put("dataArrayList",dataArrayList); - map.put("dockData", pd); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -366,7 +366,7 @@ public class AppFireRecordController extends BaseController { PageData pd = this.getPageData(); fireRecordService.modifyPointRecord(pd); map.put("result", errInfo); - map.put("dockData", pd); + map.put("dockData", JSON.toJSONString(pd)); return map; } @@ -378,7 +378,8 @@ public class AppFireRecordController extends BaseController { * @Return: java.lang.Object */ @RequestMapping("/getOtherHidden") - private Object getOtherHidden() throws Exception { + @ResponseBody + public Object getOtherHidden() throws Exception { String errInfo = "success"; Map map = new HashMap(); PageData pageData = getPageData(); @@ -411,12 +412,15 @@ public class AppFireRecordController extends BaseController { * @Return: java.lang.Object */ @RequestMapping("/addOtherHidden") - private Object addOtherHidden() throws Exception { + @ResponseBody + @DockAnnotation + public Object addOtherHidden() throws Exception { String errInfo = "success"; Map map = new HashMap(); PageData pageData = getPageData(); - fireRecordService.addOtherHidden(pageData); + PageData dockData = fireRecordService.addOtherHidden(pageData); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(dockData)); return map; } @@ -428,12 +432,14 @@ public class AppFireRecordController extends BaseController { * @Return: java.lang.Object */ @RequestMapping("/delOtherHidden") - private Object delOtherHidden() throws Exception { + @DockAnnotation + public Object delOtherHidden() throws Exception { String errInfo = "success"; Map map = new HashMap(); PageData pageData = getPageData(); fireRecordService.delOtherHidden(pageData); map.put("result", errInfo); + map.put("dockData", JSON.toJSONString(pageData)); return map; } @@ -446,10 +452,12 @@ public class AppFireRecordController extends BaseController { * @Return: java.lang.Object */ @RequestMapping("/finish") - private Object save() throws Exception { + @DockAnnotation + public Object finish() throws Exception { String errInfo = "success"; Map map = new HashMap(); PageData pageData = this.getPageData(); + map.put("dockData",JSON.toJSONString(pageData)); fireRecordService.finishByApp(pageData); map.put("result", errInfo); return map; diff --git a/src/main/java/com/zcloud/service/bus/impl/HiddenExamineServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/HiddenExamineServiceImpl.java index 3f932ed6..5ebd7a1d 100644 --- a/src/main/java/com/zcloud/service/bus/impl/HiddenExamineServiceImpl.java +++ b/src/main/java/com/zcloud/service/bus/impl/HiddenExamineServiceImpl.java @@ -145,7 +145,7 @@ public class HiddenExamineServiceImpl implements HiddenExamineService { pd.put("CREATTIME", DateUtil.date2Str(new Date())); pd.put("OPERATTIME",DateUtil.date2Str(new Date())); hiddenexamineMapper.save(pd); - return pd; + return pd; } public PageData appSave(PageData pd)throws Exception{ diff --git a/src/main/java/com/zcloud/service/bus/impl/ImgFilesServiceImpl.java b/src/main/java/com/zcloud/service/bus/impl/ImgFilesServiceImpl.java index 25909c6d..e57590f7 100644 --- a/src/main/java/com/zcloud/service/bus/impl/ImgFilesServiceImpl.java +++ b/src/main/java/com/zcloud/service/bus/impl/ImgFilesServiceImpl.java @@ -78,7 +78,8 @@ public class ImgFilesServiceImpl implements ImgFilesService{ * @param pd * @throws Exception */ - public List listAll(PageData pd)throws Exception{ + @Override + public List listAll(PageData pd){ return imgfilesMapper.listAll(pd); } diff --git a/src/main/java/com/zcloud/service/firemanager/FireRecordService.java b/src/main/java/com/zcloud/service/firemanager/FireRecordService.java index 381beb12..71927f73 100644 --- a/src/main/java/com/zcloud/service/firemanager/FireRecordService.java +++ b/src/main/java/com/zcloud/service/firemanager/FireRecordService.java @@ -45,7 +45,7 @@ public interface FireRecordService { List getOtherHiddenListByApp(PageData pageData) throws Exception; - void addOtherHidden(PageData pageData); + PageData addOtherHidden(PageData pageData); void delOtherHidden(PageData pageData); diff --git a/src/main/java/com/zcloud/service/firemanager/impl/FireRecordServiceImpl.java b/src/main/java/com/zcloud/service/firemanager/impl/FireRecordServiceImpl.java index 11b93b23..d619e2ce 100644 --- a/src/main/java/com/zcloud/service/firemanager/impl/FireRecordServiceImpl.java +++ b/src/main/java/com/zcloud/service/firemanager/impl/FireRecordServiceImpl.java @@ -409,7 +409,7 @@ public class FireRecordServiceImpl implements FireRecordService { @Override @Transactional - public void addOtherHidden(PageData pageData) { + public PageData addOtherHidden(PageData pageData) { String hiddenId = (String) pageData.get("HIDDEN_ID"); PageData dataList = fireRecordMapper.getOtherHiddenListByApp(pageData); String hiddenidlist = null; @@ -425,7 +425,7 @@ public class FireRecordServiceImpl implements FireRecordService { pageData.put("HIDDENIDLIST", hiddenId); } fireRecordMapper.addOtherHidden(pageData); - + return pageData; } @Override