|
|
|
|
@ -3,10 +3,13 @@ package com.hisense.hiatmp.server_api.controller; |
|
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
|
import com.hisense.hiatmp.model.common.*; |
|
|
|
|
import com.hisense.hiatmp.model.common.DTO.HiddenDangerVO; |
|
|
|
|
import com.hisense.hiatmp.model.common.DTO.SectionDTO; |
|
|
|
|
import com.hisense.hiatmp.model.common.VO.BasicInfoVO; |
|
|
|
|
import com.hisense.hiatmp.model.common.VO.SectionVO; |
|
|
|
|
import com.hisense.hiatmp.server_api.mapper.ConfigureMapper; |
|
|
|
|
import com.hisense.hiatmp.server_api.mapper.HighDangerMapper; |
|
|
|
|
import com.hisense.hiatmp.server_api.mapper.OperatorMapper; |
|
|
|
|
import com.hisense.hiatmp.model.common.DangerProblem; |
|
|
|
|
import com.hisense.hiatmp.server_api.model.StreetCommunity; |
|
|
|
|
import com.hisense.hiatmp.server_api.service.HighDangerService; |
|
|
|
|
import com.hisense.hiatmp.model.dmr.Point; |
|
|
|
|
@ -14,7 +17,6 @@ import com.hisense.hiatmp.server_api.service.ThtApproveService; |
|
|
|
|
import com.hisense.hiatmp.server_api.service.ThtAttachsService; |
|
|
|
|
import com.hisense.hiatmp.server_api.utils.CoordinateConverter; |
|
|
|
|
import com.hisense.hiatmp.server_api.utils.CoordinateUtils; |
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
|
@ -22,15 +24,10 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.math.BigDecimal; |
|
|
|
|
import java.time.Duration; |
|
|
|
|
import java.util.*; |
|
|
|
|
import java.util.regex.Matcher; |
|
|
|
|
import java.util.regex.Pattern; |
|
|
|
|
|
|
|
|
|
@Slf4j |
|
|
|
|
@RestController |
|
|
|
|
@ -72,8 +69,8 @@ public class HighDangerController { |
|
|
|
|
新增隐患排查(测试用) |
|
|
|
|
*/ |
|
|
|
|
@Transactional |
|
|
|
|
@GetMapping("/insertDangerTest") |
|
|
|
|
public ServerResponse<?> insertDanger(@RequestParam String name) { |
|
|
|
|
@PostMapping("/insertHiddenDanger") |
|
|
|
|
public ServerResponse<?> insertDanger(@RequestBody HiddenDangerVO hiddenDangerVO) { |
|
|
|
|
|
|
|
|
|
HighDangerBase highDangerBase = new HighDangerBase(); |
|
|
|
|
HighDangerRoad highDangerRoad = new HighDangerRoad(); |
|
|
|
|
@ -87,7 +84,7 @@ public class HighDangerController { |
|
|
|
|
// 隐患id
|
|
|
|
|
highDangerBase.setBusinessId(businessId); |
|
|
|
|
// 隐患名称
|
|
|
|
|
highDangerBase.setName(name); |
|
|
|
|
highDangerBase.setName(hiddenDangerVO.getName()); |
|
|
|
|
// 操作用户
|
|
|
|
|
highDangerBase.setOperator("admin1"); |
|
|
|
|
|
|
|
|
|
@ -457,7 +454,6 @@ public class HighDangerController { |
|
|
|
|
@RequestParam(defaultValue = "10") Long pageSize, |
|
|
|
|
HttpServletRequest request |
|
|
|
|
) { |
|
|
|
|
|
|
|
|
|
log.info("/getNearRoadInfo(获取最近道路)接口被调用,调用ip: {}, 入参:{},{},{}", request.getRemoteAddr(), point, pageNum, pageSize); |
|
|
|
|
//获取三公里内的坐标
|
|
|
|
|
double[] rectangle = CoordinateUtils.getRectangleCoordinates(point.getY(), point.getX(), 3); |
|
|
|
|
@ -465,17 +461,17 @@ public class HighDangerController { |
|
|
|
|
// DecimalFormat df = new DecimalFormat("#.##");
|
|
|
|
|
// 获取全部路段数据
|
|
|
|
|
BigDecimal d = new BigDecimal(point.getX()).setScale(1, BigDecimal.ROUND_DOWN); |
|
|
|
|
SectionVO sectionVO = new SectionVO(); |
|
|
|
|
sectionVO.setPosition(String.valueOf(d)); |
|
|
|
|
sectionVO.setSearch(point.getSearch()); |
|
|
|
|
List<SectionVO> allRoadInfo = highDangerMapper.getAllSection(sectionVO); |
|
|
|
|
SectionDTO sectionDTO = new SectionDTO(); |
|
|
|
|
sectionDTO.setPosition(String.valueOf(d)); |
|
|
|
|
sectionDTO.setSearch(point.getSearch()); |
|
|
|
|
List<SectionDTO> allRoadInfo = highDangerMapper.getAllSection(sectionDTO); |
|
|
|
|
// List<SectionVO> allRoadInfo = highDangerMapper.getAllSection(sectionVO);
|
|
|
|
|
List<HashMap<String, Object>> combinedMap = new LinkedList<>(); |
|
|
|
|
HashMap<String, Object> hashMap = new HashMap<>(); |
|
|
|
|
|
|
|
|
|
Point Dpoint = new Point(); |
|
|
|
|
// 遍历所有路段
|
|
|
|
|
for (SectionVO dto : allRoadInfo) { |
|
|
|
|
for (SectionDTO dto : allRoadInfo) { |
|
|
|
|
HashMap<String, Object> pointMapSection = new HashMap<>(); |
|
|
|
|
// Map<String,Object> map = new HashMap<>();
|
|
|
|
|
|
|
|
|
|
@ -624,6 +620,17 @@ public class HighDangerController { |
|
|
|
|
return ServerResponse.ok(combinedMap); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/* |
|
|
|
|
根据路口查询上下游路段信息 |
|
|
|
|
*/ |
|
|
|
|
@GetMapping("/getSectionByCrossing") |
|
|
|
|
public ServerResponse<?> getSectionByCrossing(@RequestParam String crossingCode){ |
|
|
|
|
|
|
|
|
|
List<SectionVO> sectionByCrossing = highDangerService.getSectionByCrossing(crossingCode); |
|
|
|
|
|
|
|
|
|
return ServerResponse.ok(sectionByCrossing); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 查询当前排查所在路段
|
|
|
|
|
@GetMapping("/getDangerRoad") |
|
|
|
|
public ServerResponse<?> getDangerRoad(@RequestParam String businessId, HttpServletRequest request) { |
|
|
|
|
@ -633,7 +640,7 @@ public class HighDangerController { |
|
|
|
|
HighDangerRoad roadInfo = highDangerMapper.getRoadInfo(businessId); |
|
|
|
|
roadInfo.setDeptId(operatorMapper.getOperatorById(roadInfo.getOperator()).getCdepartmentid()); |
|
|
|
|
|
|
|
|
|
SectionVO sectionByCode = highDangerMapper.getSectionByCode(roadInfo.getSectionCode()); |
|
|
|
|
SectionDTO sectionByCode = highDangerMapper.getSectionByCode(roadInfo.getSectionCode()); |
|
|
|
|
|
|
|
|
|
if (sectionByCode.getPosition() == null) { |
|
|
|
|
return ServerResponse.ok("路段点位为空", null); |
|
|
|
|
@ -663,32 +670,32 @@ public class HighDangerController { |
|
|
|
|
roadInfo.setAddress(sectionByCode.getSectionName()); |
|
|
|
|
roadInfo.setCoordinateList(coordinateMapTemporary); |
|
|
|
|
|
|
|
|
|
Date nowDate = new Date(); |
|
|
|
|
Date pcEndTime = roadInfo.getPcEndTime(); |
|
|
|
|
if (pcEndTime != null) { |
|
|
|
|
long diff = nowDate.getTime() - pcEndTime.getTime(); |
|
|
|
|
// 时间差
|
|
|
|
|
long diffDays = diff / (24 * 60 * 60 * 1000); |
|
|
|
|
diffDays = Math.abs(diffDays); |
|
|
|
|
|
|
|
|
|
int comparison = nowDate.compareTo(pcEndTime); |
|
|
|
|
if (comparison < 0) { // 超期
|
|
|
|
|
roadInfo.setDeadline(diffDays); |
|
|
|
|
roadInfo.setDeadlineStatus("超期" + diffDays + "天"); |
|
|
|
|
roadInfo.setDeadlineType("1"); |
|
|
|
|
} else if (comparison > 0 && diffDays <= 3) { // 临期
|
|
|
|
|
roadInfo.setDeadline(diffDays); |
|
|
|
|
roadInfo.setDeadlineStatus("临期" + diffDays + "天"); |
|
|
|
|
roadInfo.setDeadlineType("2"); |
|
|
|
|
} else { // 正常
|
|
|
|
|
roadInfo.setDeadline(diffDays); |
|
|
|
|
roadInfo.setDeadlineStatus("正常"); |
|
|
|
|
roadInfo.setDeadlineType("3"); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
roadInfo.setDeadlineStatus("无排查结束时间"); |
|
|
|
|
roadInfo.setDeadlineType("3"); |
|
|
|
|
} |
|
|
|
|
// Date nowDate = new Date();
|
|
|
|
|
// Date pcEndTime = roadInfo.getPcEndTime();
|
|
|
|
|
// if (pcEndTime != null) {
|
|
|
|
|
// long diff = nowDate.getTime() - pcEndTime.getTime();
|
|
|
|
|
// // 时间差
|
|
|
|
|
// long diffDays = diff / (24 * 60 * 60 * 1000);
|
|
|
|
|
// diffDays = Math.abs(diffDays);
|
|
|
|
|
//
|
|
|
|
|
// int comparison = nowDate.compareTo(pcEndTime);
|
|
|
|
|
// if (comparison < 0) { // 超期
|
|
|
|
|
// roadInfo.setDeadline(diffDays);
|
|
|
|
|
// roadInfo.setDeadlineStatus("超期" + diffDays + "天");
|
|
|
|
|
// roadInfo.setDeadlineType("1");
|
|
|
|
|
// } else if (comparison > 0 && diffDays <= 3) { // 临期
|
|
|
|
|
// roadInfo.setDeadline(diffDays);
|
|
|
|
|
// roadInfo.setDeadlineStatus("临期" + diffDays + "天");
|
|
|
|
|
// roadInfo.setDeadlineType("2");
|
|
|
|
|
// } else { // 正常
|
|
|
|
|
// roadInfo.setDeadline(diffDays);
|
|
|
|
|
// roadInfo.setDeadlineStatus("正常");
|
|
|
|
|
// roadInfo.setDeadlineType("3");
|
|
|
|
|
// }
|
|
|
|
|
// } else {
|
|
|
|
|
// roadInfo.setDeadlineStatus("无排查结束时间");
|
|
|
|
|
// roadInfo.setDeadlineType("3");
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
log.info("/getDangerRoad(查询当前排查所在路段)接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), roadInfo); |
|
|
|
|
|
|
|
|
|
@ -823,36 +830,33 @@ public class HighDangerController { |
|
|
|
|
public ServerResponse<?> getSectionInfo(@RequestParam String businessId, HttpServletRequest request) { |
|
|
|
|
log.info("/getSectionInfo(获取基础数据(第一页))接口被调用,调用ip: {}, 入参:{}", request.getRemoteAddr(), businessId); |
|
|
|
|
|
|
|
|
|
ThtSectionInfoDTO thtSectionInfoDTO; |
|
|
|
|
|
|
|
|
|
// 用户数据查询,如果没有该用户数据则新增
|
|
|
|
|
List<ThtSectionInfoDTO> sectionInfo = highDangerMapper.getSectionInfo(businessId); |
|
|
|
|
// 用户数据查询是否为空
|
|
|
|
|
if (sectionInfo.isEmpty()) { |
|
|
|
|
ManualInvestigation manualInvestigation = new ManualInvestigation(); |
|
|
|
|
manualInvestigation.setBusinessId(businessId); |
|
|
|
|
highDangerMapper.insertSectionInfo(manualInvestigation); |
|
|
|
|
List<ThtSectionInfoDTO> section = highDangerMapper.getSectionInfo(businessId); |
|
|
|
|
thtSectionInfoDTO = section.get(0); |
|
|
|
|
} else { |
|
|
|
|
thtSectionInfoDTO = sectionInfo.get(0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 是否该排查有绑定的辖区街道信息,有则展示
|
|
|
|
|
List<StreetCommunity> communityByRoad = highDangerMapper.getCommunityByRoad(businessId); |
|
|
|
|
if (communityByRoad == null || communityByRoad.isEmpty()) { |
|
|
|
|
log.info("/getSectionInfo(获取基础数据(第一页))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), sectionInfo); |
|
|
|
|
return ServerResponse.ok(thtSectionInfoDTO); |
|
|
|
|
// if (sectionInfo.isEmpty()) {
|
|
|
|
|
// ManualInvestigation manualInvestigation = new ManualInvestigation();
|
|
|
|
|
// manualInvestigation.setBusinessId(businessId);
|
|
|
|
|
// highDangerMapper.insertSectionInfo(manualInvestigation);
|
|
|
|
|
// List<ThtSectionInfoDTO> section = highDangerMapper.getSectionInfo(businessId);
|
|
|
|
|
// thtSectionInfoDTO = section.get(0);
|
|
|
|
|
// } else {
|
|
|
|
|
for(ThtSectionInfoDTO sectionInfoDTO : sectionInfo){ |
|
|
|
|
// thtSectionInfoDTO = sectionInfo.get(0);
|
|
|
|
|
// 是否该排查有绑定的辖区街道信息,有则展示
|
|
|
|
|
List<StreetCommunity> communityByRoad = highDangerMapper.getCommunityByRoad(businessId); |
|
|
|
|
if (communityByRoad != null && !communityByRoad.isEmpty()) { |
|
|
|
|
StreetCommunity streetCommunity = communityByRoad.get(0); |
|
|
|
|
sectionInfoDTO.setXqcode(streetCommunity.getXqcode()); |
|
|
|
|
sectionInfoDTO.setXqname(streetCommunity.getXqname()); |
|
|
|
|
sectionInfoDTO.setJdcode(streetCommunity.getJdcode()); |
|
|
|
|
sectionInfoDTO.setJdname(streetCommunity.getJdname()); |
|
|
|
|
// log.info("/getSectionInfo(获取基础数据(第一页))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), sectionInfo);
|
|
|
|
|
// return ServerResponse.ok(sectionInfoDTO);
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
StreetCommunity streetCommunity = communityByRoad.get(0); |
|
|
|
|
thtSectionInfoDTO.setXqcode(streetCommunity.getXqcode()); |
|
|
|
|
thtSectionInfoDTO.setXqname(streetCommunity.getXqname()); |
|
|
|
|
thtSectionInfoDTO.setJdcode(streetCommunity.getJdcode()); |
|
|
|
|
thtSectionInfoDTO.setJdname(streetCommunity.getJdname()); |
|
|
|
|
|
|
|
|
|
log.info("/getSectionInfo(获取基础数据(第一页))接口返回, 客户端ip: {}, 返回数据:{}", request.getRemoteAddr(), sectionInfo); |
|
|
|
|
if (sectionInfo != null) { |
|
|
|
|
return ServerResponse.ok(thtSectionInfoDTO); |
|
|
|
|
return ServerResponse.ok(sectionInfo); |
|
|
|
|
} else { |
|
|
|
|
return ServerResponse.ok("无基本信息内容", null); |
|
|
|
|
} |
|
|
|
|
@ -980,22 +984,61 @@ public class HighDangerController { |
|
|
|
|
Date lastModDate = new Date(); |
|
|
|
|
manualInvestigation.setLastModeDate(lastModDate); |
|
|
|
|
|
|
|
|
|
String hidden_businessId = manualInvestigation.getBusinessId(); |
|
|
|
|
|
|
|
|
|
// 新增排查
|
|
|
|
|
if(manualInvestigation.getTemporary() == 2){ |
|
|
|
|
HighDangerBase highDangerBase = new HighDangerBase(); |
|
|
|
|
HighDangerRoad highDangerRoad = new HighDangerRoad(); |
|
|
|
|
|
|
|
|
|
UUID uuid = UUID.fromString(UUID.randomUUID().toString()); |
|
|
|
|
String nid = uuid.toString().replaceAll("-", ""); |
|
|
|
|
hidden_businessId = "ZZ" + highDangerService.random12(); |
|
|
|
|
|
|
|
|
|
// base主键
|
|
|
|
|
highDangerBase.setNid(nid); |
|
|
|
|
// 隐患id
|
|
|
|
|
highDangerBase.setBusinessId(hidden_businessId); |
|
|
|
|
// 隐患名称
|
|
|
|
|
highDangerBase.setName(manualInvestigation.getName()); |
|
|
|
|
// 操作用户
|
|
|
|
|
highDangerBase.setOperator(manualInvestigation.getOperator()); |
|
|
|
|
|
|
|
|
|
// 道路NID
|
|
|
|
|
highDangerRoad.setNid(nid); |
|
|
|
|
// 隐患主键
|
|
|
|
|
highDangerRoad.setBusinessId(hidden_businessId); |
|
|
|
|
// 绑定路段
|
|
|
|
|
highDangerRoad.setSectionCode(manualInvestigation.getSectionCode()); |
|
|
|
|
|
|
|
|
|
// 分别插入两张表
|
|
|
|
|
highDangerService.insertDanger(highDangerBase); |
|
|
|
|
highDangerService.insertDangerRoad(highDangerRoad); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
manualInvestigation.setBusinessId(hidden_businessId); |
|
|
|
|
|
|
|
|
|
// 保存辖区和街道
|
|
|
|
|
highDangerMapper.updateSectionCommunity(manualInvestigation.getBusinessId(), manualInvestigation.getXqcode(), manualInvestigation.getJdcode()); |
|
|
|
|
highDangerMapper.updateSectionCommunity(hidden_businessId, manualInvestigation.getXqcode(), manualInvestigation.getJdcode()); |
|
|
|
|
|
|
|
|
|
// 第一页:基础数据
|
|
|
|
|
List<ThtSectionInfoDTO> sectionInfos = highDangerMapper.getSectionInfo(manualInvestigation.getBusinessId()); |
|
|
|
|
ThtSectionInfoDTO sectionInfo = sectionInfos.get(0); |
|
|
|
|
if (sectionInfo != null) { |
|
|
|
|
List<ThtSectionInfoDTO> sectionInfos = highDangerMapper.getSectionInfo(hidden_businessId); |
|
|
|
|
if (!sectionInfos.isEmpty()) { |
|
|
|
|
// 更新基础数据(步骤1)
|
|
|
|
|
highDangerMapper.updateSectionInfo(manualInvestigation); |
|
|
|
|
for(BasicInfoVO basicInfoVO : manualInvestigation.getBasicInfo()){ |
|
|
|
|
basicInfoVO.setBusinessId(hidden_businessId); |
|
|
|
|
highDangerMapper.updateSectionInfo(basicInfoVO); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
// 保存基础数据(步骤1)
|
|
|
|
|
highDangerMapper.insertSectionInfo(manualInvestigation); |
|
|
|
|
for(BasicInfoVO basicInfoVO : manualInvestigation.getBasicInfo()){ |
|
|
|
|
basicInfoVO.setBusinessId(hidden_businessId); |
|
|
|
|
highDangerMapper.insertSectionInfo(basicInfoVO); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 判断数据库是否存在统计数据
|
|
|
|
|
ThtSectionTrafficDTO sectionTraffic = highDangerMapper.getSectionTraffic(manualInvestigation.getBusinessId()); |
|
|
|
|
ThtSectionTrafficDTO sectionTraffic = highDangerMapper.getSectionTraffic(hidden_businessId); |
|
|
|
|
|
|
|
|
|
if (sectionTraffic != null) { |
|
|
|
|
// 更新统计数据(步骤2)
|
|
|
|
|
@ -1005,27 +1048,28 @@ public class HighDangerController { |
|
|
|
|
highDangerMapper.insertSectionTraffic(manualInvestigation); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
HighDangerBase higDangerDetail = highDangerMapper.getHigDangerDetail(manualInvestigation.getBusinessId()); |
|
|
|
|
// 查询base表的pcCount值
|
|
|
|
|
HighDangerBase higDangerDetail = highDangerMapper.getHigDangerDetail(hidden_businessId); |
|
|
|
|
String pcCount = higDangerDetail.getPcCount(); |
|
|
|
|
manualInvestigation.setPcCount(pcCount); |
|
|
|
|
|
|
|
|
|
// 先删除二级页面数据
|
|
|
|
|
highDangerMapper.deleteThtHiddenDataCollectConfigExtra(manualInvestigation.getBusinessId()); |
|
|
|
|
highDangerMapper.deleteThtHiddenDataCollectConfigExtra(hidden_businessId); |
|
|
|
|
|
|
|
|
|
for (ThtHiddenDataCollectConfigExtra extra : manualInvestigation.getExtraConfigs()) { |
|
|
|
|
extra.setPcCount(pcCount); |
|
|
|
|
extra.setBusinessId(manualInvestigation.getBusinessId()); |
|
|
|
|
extra.setBusinessId(hidden_businessId); |
|
|
|
|
highDangerMapper.saveThtHiddenDataCollectConfigExtra(extra); |
|
|
|
|
} |
|
|
|
|
Date date = new Date(); |
|
|
|
|
// 隐患排查表--如果存在该记录则更新
|
|
|
|
|
highDangerMapper.deleteRoadInfo(manualInvestigation.getBusinessId()); |
|
|
|
|
highDangerMapper.deleteRoadInfo(hidden_businessId); |
|
|
|
|
for (HiddenDangerDTO details : manualInvestigation.getDescribe()) { |
|
|
|
|
// 随机生成UUID
|
|
|
|
|
UUID uuid = UUID.randomUUID(); |
|
|
|
|
String uuidString = uuid.toString().replace("-", ""); |
|
|
|
|
details.setNid(uuidString); |
|
|
|
|
details.setBusinessId(manualInvestigation.getBusinessId()); |
|
|
|
|
details.setBusinessId(hidden_businessId); |
|
|
|
|
details.setPcCount(manualInvestigation.getPcCount()); |
|
|
|
|
|
|
|
|
|
ThtDangerItems dangerItemsById = highDangerMapper.getDangerItemsById(details.getHdTerm()); |
|
|
|
|
@ -1038,7 +1082,7 @@ public class HighDangerController { |
|
|
|
|
highDangerMapper.saveDangerExtra(details); |
|
|
|
|
|
|
|
|
|
//提交的时候保存附件
|
|
|
|
|
if (manualInvestigation.getTemporary() == Boolean.TRUE |
|
|
|
|
if (manualInvestigation.getTemporary() == 1 |
|
|
|
|
&& StringUtils.isNotEmpty(details.getHdPic())) { |
|
|
|
|
String hdPicArr[] = details.getHdPic().split(","); |
|
|
|
|
for (String s : hdPicArr) { |
|
|
|
|
@ -1052,7 +1096,7 @@ public class HighDangerController { |
|
|
|
|
thtAttachs.setUploadTime(date); |
|
|
|
|
thtAttachs.setInfoId(details.getNid()); |
|
|
|
|
thtAttachs.setAttachName(accachName); |
|
|
|
|
thtAttachs.setBusinessId(manualInvestigation.getBusinessId()); |
|
|
|
|
thtAttachs.setBusinessId(hidden_businessId); |
|
|
|
|
thtAttachs.setPcCount(pcCount); |
|
|
|
|
thtAttachs.setLastModDate(date); |
|
|
|
|
thtAttachsService.saveAttachs(thtAttachs); |
|
|
|
|
@ -1105,24 +1149,24 @@ public class HighDangerController { |
|
|
|
|
// manualInvestigation.setKeySet(keys.toString());
|
|
|
|
|
|
|
|
|
|
// 暂存数据
|
|
|
|
|
if (manualInvestigation.getTemporary() == Boolean.FALSE) { |
|
|
|
|
if (manualInvestigation.getTemporary() == 0) { |
|
|
|
|
// highDangerMapper.updateTemporary(manualInvestigation.getBusinessId(), "99");
|
|
|
|
|
log.info("/saveManualInvestigation(保存 & 暂存人工排查)接口返回, 客户端ip: {}, 返回数据:{},{}", request.getRemoteAddr(), "数据已暂存", manualInvestigation); |
|
|
|
|
return ServerResponse.ok("数据已暂存", manualInvestigation); |
|
|
|
|
} else { |
|
|
|
|
} else if(manualInvestigation.getTemporary() == 1){ |
|
|
|
|
log.info("/saveManualInvestigation(保存 & 暂存人工排查)接口返回, 客户端ip: {}, 返回数据:{},{}", request.getRemoteAddr(), "数据已保存", manualInvestigation); |
|
|
|
|
highDangerMapper.updateTemporary(manualInvestigation.getBusinessId()); |
|
|
|
|
highDangerMapper.updateTemporary(hidden_businessId); |
|
|
|
|
//隐患项不为空时,修改tht_hidden_danger_road
|
|
|
|
|
String hdFlag = "0"; |
|
|
|
|
if (CollectionUtils.isNotEmpty(manualInvestigation.getDescribe())) { |
|
|
|
|
hdFlag = "1"; |
|
|
|
|
} |
|
|
|
|
highDangerMapper.updateDangerRoad(hdFlag, manualInvestigation.getBusinessId(), pcCount, manualInvestigation.getOperator()); |
|
|
|
|
highDangerMapper.updateDangerRoad(hdFlag, hidden_businessId, pcCount, manualInvestigation.getOperator()); |
|
|
|
|
ThtApprove thtAApprove = new ThtApprove(); |
|
|
|
|
UUID uuid = UUID.randomUUID(); |
|
|
|
|
String uuidString = uuid.toString().replace("-", ""); |
|
|
|
|
thtAApprove.setNid(uuidString); |
|
|
|
|
thtAApprove.setBusinessId(manualInvestigation.getBusinessId()); |
|
|
|
|
thtAApprove.setBusinessId(hidden_businessId); |
|
|
|
|
thtAApprove.setOperator(manualInvestigation.getLastModeUser()); |
|
|
|
|
thtAApprove.setStatus("10"); |
|
|
|
|
thtAApprove.setOperateTime(date); |
|
|
|
|
@ -1131,8 +1175,13 @@ public class HighDangerController { |
|
|
|
|
thtApproveService.save(thtAApprove); |
|
|
|
|
return ServerResponse.ok("数据已保存", manualInvestigation); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// return ServerResponse.ok(manualInvestigation);
|
|
|
|
|
// 新增
|
|
|
|
|
else if(manualInvestigation.getTemporary() == 2){ |
|
|
|
|
return ServerResponse.ok("数据已新增", manualInvestigation); |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
return ServerResponse.error("无保存标识"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 智能排查 & 人工排查保存状态
|
|
|
|
|
|