Merge remote-tracking branch 'origin/czks1.0' into czks1.0

# Conflicts:
#	src/main/java/com/zcloud/controller/app/AppImgFilesController.java
pull/14/head
songwenxuan 2023-12-22 10:53:12 +08:00
commit 6e813e70ef
10 changed files with 52 additions and 29 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 时间
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;
}

View File

@ -114,7 +114,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 +244,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;
}

View File

@ -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<String, Object> map = new HashMap<String, Object>();
String errInfo = "success";
@ -352,7 +352,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;
}
@ -371,7 +371,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;
}
@ -383,7 +383,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<String, Object> map = new HashMap<String, Object>();
PageData pageData = getPageData();
@ -416,12 +417,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<String, Object> map = new HashMap<String, Object>();
PageData pageData = getPageData();
fireRecordService.addOtherHidden(pageData);
PageData dockData = fireRecordService.addOtherHidden(pageData);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(dockData));
return map;
}
@ -433,12 +437,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<String, Object> map = new HashMap<String, Object>();
PageData pageData = getPageData();
fireRecordService.delOtherHidden(pageData);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(pageData));
return map;
}
@ -451,10 +457,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<String, Object> map = new HashMap<String, Object>();
PageData pageData = this.getPageData();
map.put("dockData",JSON.toJSONString(pageData));
fireRecordService.finishByApp(pageData);
map.put("result", errInfo);
return map;

View File

@ -2,6 +2,7 @@ package com.zcloud.controller.gf;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.zcloud.aspect.DockAnnotation;
import com.zcloud.controller.base.BaseController;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
@ -78,6 +79,7 @@ public class AppGFBreakGroundController extends BaseController {
@RequestMapping(value="/add")
@ResponseBody
@Transactional
@DockAnnotation(hasAnnex = true)
public Object add(
@RequestParam(value="FFILE",required=false) MultipartFile[] files
) throws Exception{
@ -86,6 +88,7 @@ public class AppGFBreakGroundController extends BaseController {
PageData pd = new PageData();
pd = this.getPageData();
PageData pd2 = new PageData();
ArrayList<String> sendPicturesList = new ArrayList<>();
Calendar calendar = Calendar.getInstance();
DecimalFormat dft=new DecimalFormat("00");
int year = calendar.get(Calendar.YEAR);
@ -104,16 +107,20 @@ public class AppGFBreakGroundController extends BaseController {
pd.put("HAZARD_IDENTIFICATION", (StringUtils.isNotBlank(pd.getString("HAZARD_IDENTIFICATION")) ? pd.getString("HAZARD_IDENTIFICATION") : "") + ";_;");
if (files != null && files.length > 0) {
MultipartFile file = files[0];
String ffile = DateUtil.getDays();
String fileName = this.get32UUID()+file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf("."));
smb.sshSftp(file, fileName, Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile);
sendPicturesList.add(Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName
+"@@"+fileName
);
pd.put("APPLY_USER_SIGNER_PATH", Const.FILEPATHFILE + pd.getString("CORPINFO_ID") + "/" + ffile + "/" + fileName);
pd.put("APPLY_USER_SIGNER_TIME", pd.get("SIGNER_TIME"));
}
GFbreakGroundService.save(pd);
PageData breakGroundPageData = new PageData();
PageData breakGroundLogPageData = new PageData();
breakGroundPageData.putAll(pd);
if(pd.get("APPLY_STATUS").equals("1")) {
PageData log = new PageData();
log.put("BREAKGROUNDLOG_ID", this.get32UUID());
@ -122,8 +129,8 @@ public class AppGFBreakGroundController extends BaseController {
log.put("CREATOR",pd.get("ACTION_USER"));
log.put("CREATTIME", DateUtil.date2Str(new Date()));
GFbreakGroundLogService.save(log);
breakGroundLogPageData.putAll(log);
List<PageData> paramsList = new ArrayList<PageData>();
// 发短信
PageData mes = new PageData();
mes.put("RECEIVER_ID", pd.get("CONSTRUCTION_USER_ID"));// 收信人userid
@ -131,7 +138,6 @@ public class AppGFBreakGroundController extends BaseController {
mes.put("SMSCode", "SMS_227245922");// 短信模板编码
mes.put("CORPINFO_ID", pd.get("CORPINFO_ID"));// 企业id
// 参数集合
List<PageData> paramsList = new ArrayList<PageData>();
// 第1个参数
PageData params1 = new PageData();
params1.put("name", "number");// 存入短信模板中的参数名称
@ -155,8 +161,11 @@ public class AppGFBreakGroundController extends BaseController {
paramsList.add(params4);
sendMessageUtil.sendMessages(mes, paramsList);
}
PageData dockData = new PageData();
dockData.put("breakGroundPageData",breakGroundPageData);
dockData.put("breakGroundLogPageData",breakGroundLogPageData);
map.put("result", errInfo);
map.put("dockData", JSON.toJSONString(dockData));
return map;
}
/**

View File

@ -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{

View File

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

View File

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

View File

@ -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

View File

@ -83,8 +83,8 @@ public class GFBlindBoardServiceImpl implements GFBlindBoardService {
public PageData findById(PageData pd)throws Exception{
PageData pageData = GFblindboardMapper.findById(pd);
//调用接口 获取用户信息
String workUser = corpFgsService.getXgfUserName(pageData.getString("WORK_USER"));
pageData.put("WORK_USER",workUser);
//String workUser = corpFgsService.getXgfUserName(pageData.getString("WORK_USER"));
//pageData.put("WORK_USER",workUser);
return pageData;
}

View File

@ -82,8 +82,8 @@ public class GFHighWorkServiceImpl implements GFHighWorkService {
public PageData findById(PageData pd)throws Exception{
PageData pageData = GFhighworkMapper.findById(pd);
//调用接口 获取用户信息
String workUser = corpFgsService.getXgfUserName(pageData.getString("PROJECT_MANAGER"));
pageData.put("PROJECT_MANAGER",workUser);
//String workUser = corpFgsService.getXgfUserName(pageData.getString("PROJECT_MANAGER"));
//pageData.put("PROJECT_MANAGER",workUser);
return pageData;
}