消防点检app端迁移完成

pull/14/head
dearlin 2023-12-21 17:44:17 +08:00
parent e4a311fdb2
commit 47a4d549df
7 changed files with 33 additions and 20 deletions

View File

@ -675,6 +675,7 @@ public class AppHiddenController extends BaseController {
FHLOG.save(pd.getString("loginUserName"), "删除隐患ID:" + pd.getString("HIDDEN_ID"), ip); //记录日志 用户ID 隐患id 时间 FHLOG.save(pd.getString("loginUserName"), "删除隐患ID:" + pd.getString("HIDDEN_ID"), ip); //记录日志 用户ID 隐患id 时间
applicationContext.publishEvent(new DeviceHiddenEvent(new Object(), pd.getString("HIDDEN_ID"), "1")); applicationContext.publishEvent(new DeviceHiddenEvent(new Object(), pd.getString("HIDDEN_ID"), "1"));
map.put("result", errInfo); // 返回结果 map.put("result", errInfo); // 返回结果
map.put("dockData",JSON.toJSONString(pd));
return map; return map;
} }
@ -822,7 +823,7 @@ public class AppHiddenController extends BaseController {
dockData.putAll(pd); dockData.putAll(pd);
dockData.put("hiddenUserList",hiddenUserList); dockData.put("hiddenUserList",hiddenUserList);
map.put("pd", pd); map.put("pd", pd);
map.put("dockData", dockData); map.put("dockData", JSON.toJSONString(dockData));
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;
} }

View File

@ -51,7 +51,6 @@ public class AppImgFilesController extends BaseController {
@RequestMapping(value = "/add", headers = "content-type=multipart/form-data") @RequestMapping(value = "/add", headers = "content-type=multipart/form-data")
@ResponseBody @ResponseBody
@Transactional @Transactional
@DockAnnotation(hasAnnex = true)
public Object finish( public Object finish(
@RequestParam(value = "FFILE", required = false) MultipartFile[] files, @RequestParam(value = "FFILE", required = false) MultipartFile[] files,
@RequestParam(value = "TYPE", required = false) String TYPE, @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("FILEPATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd.put("TYPE", TYPE); pd.put("TYPE", TYPE);
pd.put("FOREIGN_KEY", FOREIGN_KEY); 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); imgfilesService.save(pd);
} }
} }
@ -244,6 +243,10 @@ public class AppImgFilesController extends BaseController {
File file = new File(PathUtil.getProjectpath() + pd.getString("FILEPATH")); File file = new File(PathUtil.getProjectpath() + pd.getString("FILEPATH"));
file.delete(); file.delete();
imgfilesService.delete(pd); imgfilesService.delete(pd);
TenCorpDto tenCorpDto = new TenCorpDto();
pd.put("delete","1");
tenCorpDto.setData(pd);
dockSendMessageService.sendMessagePictureDelete(tenCorpDto);
map.put("result", errInfo); //返回结果 map.put("result", errInfo); //返回结果
return map; return map;
} }

View File

@ -1,5 +1,6 @@
package com.zcloud.controller.firemanager.app; package com.zcloud.controller.firemanager.app;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.zcloud.aspect.DockAnnotation; import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController; 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.bus.ImgFilesService;
import com.zcloud.service.firemanager.*; import com.zcloud.service.firemanager.*;
import com.zcloud.service.mq.DockSendMessageService; 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.InitPageDataUtil;
import com.zcloud.util.Jurisdiction;
import org.springframework.beans.factory.annotation.Autowired; 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.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.*; import java.util.*;
@ -28,7 +26,8 @@ import java.util.stream.Collectors;
* wangxuan * wangxuan
* www.zcloudchina.com * www.zcloudchina.com
*/ */
@RestController @Controller
@ResponseBody
@RequestMapping("/app/fireRecordManger") @RequestMapping("/app/fireRecordManger")
public class AppFireRecordController extends BaseController { public class AppFireRecordController extends BaseController {
@ -108,6 +107,7 @@ public class AppFireRecordController extends BaseController {
* @Return: java.lang.Object * @Return: java.lang.Object
*/ */
@RequestMapping("/checkList/v2") @RequestMapping("/checkList/v2")
@ResponseBody
public Object checkListV2(Page page) { public Object checkListV2(Page page) {
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
String errInfo = "success"; String errInfo = "success";
@ -347,7 +347,7 @@ public class AppFireRecordController extends BaseController {
}); });
map.put("result", errInfo); map.put("result", errInfo);
pd.put("dataArrayList",dataArrayList); pd.put("dataArrayList",dataArrayList);
map.put("dockData", pd); map.put("dockData", JSON.toJSONString(pd));
return map; return map;
} }
@ -366,7 +366,7 @@ public class AppFireRecordController extends BaseController {
PageData pd = this.getPageData(); PageData pd = this.getPageData();
fireRecordService.modifyPointRecord(pd); fireRecordService.modifyPointRecord(pd);
map.put("result", errInfo); map.put("result", errInfo);
map.put("dockData", pd); map.put("dockData", JSON.toJSONString(pd));
return map; return map;
} }
@ -378,7 +378,8 @@ public class AppFireRecordController extends BaseController {
* @Return: java.lang.Object * @Return: java.lang.Object
*/ */
@RequestMapping("/getOtherHidden") @RequestMapping("/getOtherHidden")
private Object getOtherHidden() throws Exception { @ResponseBody
public Object getOtherHidden() throws Exception {
String errInfo = "success"; String errInfo = "success";
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
PageData pageData = getPageData(); PageData pageData = getPageData();
@ -411,12 +412,15 @@ public class AppFireRecordController extends BaseController {
* @Return: java.lang.Object * @Return: java.lang.Object
*/ */
@RequestMapping("/addOtherHidden") @RequestMapping("/addOtherHidden")
private Object addOtherHidden() throws Exception { @ResponseBody
@DockAnnotation
public Object addOtherHidden() throws Exception {
String errInfo = "success"; String errInfo = "success";
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
PageData pageData = getPageData(); PageData pageData = getPageData();
fireRecordService.addOtherHidden(pageData); PageData dockData = fireRecordService.addOtherHidden(pageData);
map.put("result", errInfo); map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(dockData));
return map; return map;
} }
@ -428,12 +432,14 @@ public class AppFireRecordController extends BaseController {
* @Return: java.lang.Object * @Return: java.lang.Object
*/ */
@RequestMapping("/delOtherHidden") @RequestMapping("/delOtherHidden")
private Object delOtherHidden() throws Exception { @DockAnnotation
public Object delOtherHidden() throws Exception {
String errInfo = "success"; String errInfo = "success";
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
PageData pageData = getPageData(); PageData pageData = getPageData();
fireRecordService.delOtherHidden(pageData); fireRecordService.delOtherHidden(pageData);
map.put("result", errInfo); map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pageData));
return map; return map;
} }
@ -446,10 +452,12 @@ public class AppFireRecordController extends BaseController {
* @Return: java.lang.Object * @Return: java.lang.Object
*/ */
@RequestMapping("/finish") @RequestMapping("/finish")
private Object save() throws Exception { @DockAnnotation
public Object finish() throws Exception {
String errInfo = "success"; String errInfo = "success";
Map<String, Object> map = new HashMap<String, Object>(); Map<String, Object> map = new HashMap<String, Object>();
PageData pageData = this.getPageData(); PageData pageData = this.getPageData();
map.put("dockData",JSON.toJSONString(pageData));
fireRecordService.finishByApp(pageData); fireRecordService.finishByApp(pageData);
map.put("result", errInfo); map.put("result", errInfo);
return map; return map;

View File

@ -145,7 +145,7 @@ public class HiddenExamineServiceImpl implements HiddenExamineService {
pd.put("CREATTIME", DateUtil.date2Str(new Date())); pd.put("CREATTIME", DateUtil.date2Str(new Date()));
pd.put("OPERATTIME",DateUtil.date2Str(new Date())); pd.put("OPERATTIME",DateUtil.date2Str(new Date()));
hiddenexamineMapper.save(pd); hiddenexamineMapper.save(pd);
return pd; return pd;
} }
public PageData appSave(PageData pd)throws Exception{ public PageData appSave(PageData pd)throws Exception{

View File

@ -78,7 +78,8 @@ public class ImgFilesServiceImpl implements ImgFilesService{
* @param pd * @param pd
* @throws Exception * @throws Exception
*/ */
public List<PageData> listAll(PageData pd)throws Exception{ @Override
public List<PageData> listAll(PageData pd){
return imgfilesMapper.listAll(pd); return imgfilesMapper.listAll(pd);
} }

View File

@ -45,7 +45,7 @@ public interface FireRecordService {
List<PageData> getOtherHiddenListByApp(PageData pageData) throws Exception; List<PageData> getOtherHiddenListByApp(PageData pageData) throws Exception;
void addOtherHidden(PageData pageData); PageData addOtherHidden(PageData pageData);
void delOtherHidden(PageData pageData); void delOtherHidden(PageData pageData);

View File

@ -409,7 +409,7 @@ public class FireRecordServiceImpl implements FireRecordService {
@Override @Override
@Transactional @Transactional
public void addOtherHidden(PageData pageData) { public PageData addOtherHidden(PageData pageData) {
String hiddenId = (String) pageData.get("HIDDEN_ID"); String hiddenId = (String) pageData.get("HIDDEN_ID");
PageData dataList = fireRecordMapper.getOtherHiddenListByApp(pageData); PageData dataList = fireRecordMapper.getOtherHiddenListByApp(pageData);
String hiddenidlist = null; String hiddenidlist = null;
@ -425,7 +425,7 @@ public class FireRecordServiceImpl implements FireRecordService {
pageData.put("HIDDENIDLIST", hiddenId); pageData.put("HIDDENIDLIST", hiddenId);
} }
fireRecordMapper.addOtherHidden(pageData); fireRecordMapper.addOtherHidden(pageData);
return pageData;
} }
@Override @Override