Merge remote-tracking branch 'origin/pet' into dev
commit
49edb5fddc
|
@ -1,8 +1,12 @@
|
||||||
package com.zcloud.controller.keyProjects;
|
package com.zcloud.controller.keyProjects;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import com.alibaba.druid.util.StringUtils;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.service.keyProjects.OutSourcedService;
|
||||||
|
import com.zcloud.service.keyProjects.VideoManagerService;
|
||||||
import com.zcloud.service.keyProjects.VideoResourcesService;
|
import com.zcloud.service.keyProjects.VideoResourcesService;
|
||||||
import com.zcloud.util.DateUtil;
|
import com.zcloud.util.DateUtil;
|
||||||
import com.zcloud.util.Jurisdiction;
|
import com.zcloud.util.Jurisdiction;
|
||||||
|
@ -13,10 +17,8 @@ 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 java.util.Date;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
import java.util.stream.Collectors;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:视频管理
|
* 说明:视频管理
|
||||||
|
@ -31,6 +33,12 @@ public class VideoResourcesController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private VideoResourcesService videoResourcesService;
|
private VideoResourcesService videoResourcesService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VideoManagerService videoManagerService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OutSourcedService outSourcedService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
*
|
*
|
||||||
|
@ -190,4 +198,39 @@ public class VideoResourcesController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过摄像头查询绑定的重点工程数据
|
||||||
|
*/
|
||||||
|
@RequestMapping("/getRelevanceOutsourced")
|
||||||
|
@ResponseBody
|
||||||
|
public Object getRelevanceOutsourced() throws Exception {
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
String errInfo = "success";
|
||||||
|
List<PageData> outsourcedList = Collections.emptyList();
|
||||||
|
// 获取该摄像头绑定的重点工程ID列表
|
||||||
|
List<PageData> outsourcedIds = videoManagerService.findRepeatOutSourcedIdByVideoId(this.getPageData());
|
||||||
|
// 非空判断
|
||||||
|
if (CollUtil.isNotEmpty(outsourcedIds)){
|
||||||
|
// 通过Ids查询重点工程数据
|
||||||
|
outsourcedList = outSourcedService.listOutSourcedByIds(outsourcedIds.stream().map(e -> e.getString("OUTSOURCED_ID")).collect(Collectors.toList()))
|
||||||
|
.stream().map(e -> {
|
||||||
|
// 遍历带有"VIDEOMANAGER_ID"的列表
|
||||||
|
outsourcedIds.forEach(
|
||||||
|
m -> {
|
||||||
|
if (StringUtils.equals(m.getString("OUTSOURCED_ID"), e.getString("OUTSOURCED_ID"))){
|
||||||
|
// 补全信息
|
||||||
|
e.put("VIDEOMANAGER_ID", m.getString("VIDEOMANAGER_ID"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
return e;
|
||||||
|
})
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
map.put("varList", outsourcedList);
|
||||||
|
map.put("result", errInfo);
|
||||||
|
return map;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
package com.zcloud.controller.keyProjects.app;
|
package com.zcloud.controller.keyProjects.app;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.zcloud.controller.base.BaseController;
|
import com.zcloud.controller.base.BaseController;
|
||||||
import com.zcloud.entity.Page;
|
import com.zcloud.entity.Page;
|
||||||
import com.zcloud.entity.PageData;
|
import com.zcloud.entity.PageData;
|
||||||
import com.zcloud.service.bus.ImgFilesService;
|
import com.zcloud.service.bus.ImgFilesService;
|
||||||
|
import com.zcloud.service.keyProjects.AIWarningHiddensService;
|
||||||
import com.zcloud.service.keyProjects.AIWarningService;
|
import com.zcloud.service.keyProjects.AIWarningService;
|
||||||
import com.zcloud.service.keyProjects.KeyprojectHiddenService;
|
import com.zcloud.service.keyProjects.KeyprojectHiddenService;
|
||||||
import com.zcloud.util.*;
|
import com.zcloud.util.*;
|
||||||
|
@ -20,6 +23,7 @@ import java.io.InputStream;
|
||||||
import java.net.HttpURLConnection;
|
import java.net.HttpURLConnection;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 说明:AI报警
|
* 说明:AI报警
|
||||||
|
@ -37,6 +41,8 @@ public class AppAIWarningController extends BaseController {
|
||||||
private KeyprojectHiddenService keyprojectHiddenService;
|
private KeyprojectHiddenService keyprojectHiddenService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ImgFilesService imgFilesService;
|
private ImgFilesService imgFilesService;
|
||||||
|
@Autowired
|
||||||
|
private AIWarningHiddensService aiwarningHiddensService;
|
||||||
/**新增
|
/**新增
|
||||||
* @param
|
* @param
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
|
@ -171,7 +177,17 @@ public class AppAIWarningController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!hiddenIdList.isEmpty()) {
|
if (!hiddenIdList.isEmpty()) {
|
||||||
pd.put("HIDDEN_IDS", hiddenIdList.toString().replace("[","").replace("]","").replace(" ",""));
|
PageData finalPd = pd;
|
||||||
|
hiddenIdList.forEach(e -> {
|
||||||
|
PageData pageData = new PageData();
|
||||||
|
pageData.put("AIWARNING_HIDDEN_ID", this.get32UUID());
|
||||||
|
|
||||||
|
pageData.put("AIWARNING_ID", finalPd.getString("AIWARNING_ID"));
|
||||||
|
pageData.put("HIDDEN_ID", e);
|
||||||
|
|
||||||
|
aiwarningHiddensService.save(pageData);
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
aiwarningService.edit(pd);
|
aiwarningService.edit(pd);
|
||||||
map.put("result", errInfo);
|
map.put("result", errInfo);
|
||||||
|
@ -216,10 +232,12 @@ public class AppAIWarningController extends BaseController {
|
||||||
pd.put("NAME",user.getString("name"));
|
pd.put("NAME",user.getString("name"));
|
||||||
}
|
}
|
||||||
pd.put("FOREIGN_ID", pd.getString("OUTSOURCED_ID"));
|
pd.put("FOREIGN_ID", pd.getString("OUTSOURCED_ID"));
|
||||||
if (Tools.notEmpty(pd.getString("HIDDEN_IDS"))){
|
List<PageData> hiddens = aiwarningHiddensService.findByAiId(pd);
|
||||||
|
if (CollUtil.isNotEmpty(hiddens)){
|
||||||
PageData pageData = new PageData();
|
PageData pageData = new PageData();
|
||||||
pageData.put("AI_WARNING","Y");
|
pageData.put("AI_WARNING","Y");
|
||||||
pageData.put("array",pd.getString("HIDDEN_IDS").split(","));
|
pageData.put("AIWARNING_ID", Assert.notBlank(pd.getString("AIWARNING_ID")));
|
||||||
|
pageData.put("array",hiddens.stream().map(e -> e.getString("HIDDEN_ID")).collect(Collectors.toList()));
|
||||||
pd.put("hiddenList", keyprojectHiddenService.listAllInspection(pageData));
|
pd.put("hiddenList", keyprojectHiddenService.listAllInspection(pageData));
|
||||||
}
|
}
|
||||||
map.put("pd", pd);
|
map.put("pd", pd);
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class GuFenCharge extends NodeSwitchComponent {
|
||||||
flows.put("OPINION", info.getOPINION());
|
flows.put("OPINION", info.getOPINION());
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows, info);
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
xgfFlowsMapper.edit(flows);
|
xgfFlowsMapper.edit(flows);
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class GuFenSupervise extends NodeComponent {
|
||||||
flows.put("OPINION",info.getOPINION());
|
flows.put("OPINION",info.getOPINION());
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
|
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||||
|
|
|
@ -93,7 +93,7 @@ public class GuFenWeiTuoCharge extends NodeComponent {
|
||||||
|
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
} else {
|
} else {
|
||||||
xgfFlowsMapper.edit(flows);
|
xgfFlowsMapper.edit(flows);
|
||||||
condition.clear();
|
condition.clear();
|
||||||
|
|
|
@ -73,7 +73,7 @@ public class GuFenWeiTuoSupervise extends NodeComponent {
|
||||||
flows.put("OPINION", info.getOPINION());
|
flows.put("OPINION", info.getOPINION());
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class JiTuanCharge extends NodeSwitchComponent {
|
||||||
flows.put("OPINION",info.getOPINION());
|
flows.put("OPINION",info.getOPINION());
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
return "";
|
return "";
|
||||||
} else {
|
} else {
|
||||||
xgfFlowsMapper.edit(flows);
|
xgfFlowsMapper.edit(flows);
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class JiTuanSupervise extends NodeComponent {
|
||||||
flows.put("OPINION", info.getOPINION());
|
flows.put("OPINION", info.getOPINION());
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
|
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||||
|
|
|
@ -75,7 +75,7 @@ public class JiTuanWeiTuoCharge extends NodeComponent {
|
||||||
|
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
} else {
|
} else {
|
||||||
xgfFlowsMapper.edit(flows);
|
xgfFlowsMapper.edit(flows);
|
||||||
condition.clear();
|
condition.clear();
|
||||||
|
|
|
@ -72,7 +72,7 @@ public class JiTuanWeiTuoSupervise extends NodeComponent {
|
||||||
flows.put("OPINION", info.getOPINION());
|
flows.put("OPINION", info.getOPINION());
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class YiBanCharge extends NodeComponent {
|
||||||
flows.put("OPINION",info.getOPINION());
|
flows.put("OPINION",info.getOPINION());
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
} else {
|
} else {
|
||||||
xgfFlowsMapper.edit(flows);
|
xgfFlowsMapper.edit(flows);
|
||||||
condition.clear();
|
condition.clear();
|
||||||
|
|
|
@ -105,7 +105,7 @@ public class YiBanSupervise extends NodeComponent {
|
||||||
flows.put("OPINION",info.getOPINION());
|
flows.put("OPINION",info.getOPINION());
|
||||||
if ("0".equals(info.getSTATUS())) {
|
if ("0".equals(info.getSTATUS())) {
|
||||||
// 打回至相关方端
|
// 打回至相关方端
|
||||||
xgfUserService.repulse(flows);
|
xgfUserService.repulse(flows,info);
|
||||||
// 保存操作记录
|
// 保存操作记录
|
||||||
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
xgfUserService.saveLog(info, info.getSTATUS(), "0");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -46,4 +46,7 @@ public class XgfFlowDto {
|
||||||
|
|
||||||
// 获取节点需要填写的信息
|
// 获取节点需要填写的信息
|
||||||
private Map<String,String> map;
|
private Map<String,String> map;
|
||||||
|
|
||||||
|
// 打回节点游标
|
||||||
|
private String BACK_STEP;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ public interface FireRecordMapper {
|
||||||
|
|
||||||
List<PageData> datalistPage(Page page);
|
List<PageData> datalistPage(Page page);
|
||||||
|
|
||||||
PageData getCheckingByCid(String fireCheckId);
|
List<PageData> getCheckingByCid(String fireCheckId);
|
||||||
PageData getCheckingNoFinByCid(String fireCheckId);
|
PageData getCheckingNoFinByCid(String fireCheckId);
|
||||||
|
|
||||||
void removeRecordPointByCidRidPids(PageData pd);
|
void removeRecordPointByCidRidPids(PageData pd);
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
package com.zcloud.mapper.dsno2.keyProjects;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明:AI报警表的Hidden_ids中间表
|
||||||
|
* 官网:www.zcloudchina.com
|
||||||
|
* @Autor:water_xu
|
||||||
|
* @Date:2024-05-29
|
||||||
|
*/
|
||||||
|
public interface AIWarningHiddensMapper {
|
||||||
|
|
||||||
|
/**新增
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
void save(PageData pd);
|
||||||
|
|
||||||
|
/**修改
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
void edit(PageData pd);
|
||||||
|
|
||||||
|
/**通过id获取数据
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
PageData findById(PageData pd);
|
||||||
|
|
||||||
|
|
||||||
|
/**通过AiId获取数据
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
List<PageData> findByAiId(PageData pd);
|
||||||
|
|
||||||
|
/**通过HiddenId获取数据
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
PageData findByHiddenId(PageData pd);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -91,5 +91,7 @@ public interface OutSourcedMapper{
|
||||||
|
|
||||||
|
|
||||||
List<PageData> listForCount(PageData pd);
|
List<PageData> listForCount(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> listOutSourcedByIds(List ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,5 +77,7 @@ public interface VideoManagerMapper {
|
||||||
void updateAiByOUTSOURCED_ID(PageData pd);
|
void updateAiByOUTSOURCED_ID(PageData pd);
|
||||||
|
|
||||||
List<PageData> dataApplistPage(Page page);
|
List<PageData> dataApplistPage(Page page);
|
||||||
|
|
||||||
|
List<PageData> findRepeatOutSourcedIdByVideoId(PageData video);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ public interface FireRecordService {
|
||||||
* @Param: [java.lang.String] [fireCheckId]
|
* @Param: [java.lang.String] [fireCheckId]
|
||||||
* @Return: com.zcloud.entity.PageData
|
* @Return: com.zcloud.entity.PageData
|
||||||
*/
|
*/
|
||||||
PageData getCheckingByCid(String fireCheckId);
|
List<PageData> getCheckingByCid(String fireCheckId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 根据checkid,pointid,recordid 删除点位
|
* @Description: 根据checkid,pointid,recordid 删除点位
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.zcloud.service.firemanager.impl;
|
package com.zcloud.service.firemanager.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
@ -574,58 +575,60 @@ public class FireCheckListServiceImpl implements FireCheckListService {
|
||||||
* 2. 点位下删除了器材,把检查的器材删除
|
* 2. 点位下删除了器材,把检查的器材删除
|
||||||
* 3.
|
* 3.
|
||||||
* */
|
* */
|
||||||
PageData checkingData = fireRecordService.getCheckingByCid(FIRE_CHECK_ID);
|
List<PageData> checkingByCid = fireRecordService.getCheckingByCid(FIRE_CHECK_ID);
|
||||||
// 无检查记录 什么也不干
|
// 无检查记录 什么也不干
|
||||||
if (checkingData != null) {
|
if (CollUtil.isNotEmpty(checkingByCid)) {
|
||||||
String FIRE_RECORD_ID = checkingData.getString("FIRE_RECORD_ID");
|
checkingByCid.stream().forEach(checkingData -> {
|
||||||
|
String FIRE_RECORD_ID = checkingData.getString("FIRE_RECORD_ID");
|
||||||
|
|
||||||
// 有删除的点位那么 删除记录中的点位
|
// 有删除的点位那么 删除记录中的点位
|
||||||
if (deletedPoints.size() > 0) {
|
if (deletedPoints.size() > 0) {
|
||||||
PageData delRecordData = new PageData();
|
PageData delRecordData = new PageData();
|
||||||
initPageDataUtil.initEdit(delRecordData);
|
initPageDataUtil.initEdit(delRecordData);
|
||||||
delRecordData.put("FIRE_CHECK_ID", FIRE_CHECK_ID);
|
delRecordData.put("FIRE_CHECK_ID", FIRE_CHECK_ID);
|
||||||
delRecordData.put("FIRE_RECORD_ID", FIRE_RECORD_ID);
|
delRecordData.put("FIRE_RECORD_ID", FIRE_RECORD_ID);
|
||||||
delRecordData.put("list", deletedPoints);
|
delRecordData.put("list", deletedPoints);
|
||||||
fireRecordService.removeRecordPointByCidRidPids(delRecordData);
|
fireRecordService.removeRecordPointByCidRidPids(delRecordData);
|
||||||
}
|
|
||||||
// 有新增的点位 把点位初始化
|
|
||||||
if (addPoints.size() > 0) {
|
|
||||||
for (PageData addedRecordPointData : addPoints) {
|
|
||||||
initPageDataUtil.initSave(addedRecordPointData, "EQUIPMENT_POINT_ID");
|
|
||||||
addedRecordPointData.put("FIRE_CHECK_ID", FIRE_CHECK_ID);
|
|
||||||
addedRecordPointData.put("FIRE_RECORD_ID", FIRE_RECORD_ID);
|
|
||||||
addedRecordPointData.put("CORPINFO_ID", CORPINFO_ID);
|
|
||||||
addedRecordPointData.put("P_ISCHECKED", 1);
|
|
||||||
}
|
}
|
||||||
fireRecordService.addedRecordPoint(addPoints);
|
// 有新增的点位 把点位初始化
|
||||||
}
|
if (addPoints.size() > 0) {
|
||||||
// 有删除的器材那么 删除记录中的器材
|
for (PageData addedRecordPointData : addPoints) {
|
||||||
if (deviceIds.length > 0) {
|
initPageDataUtil.initSave(addedRecordPointData, "EQUIPMENT_POINT_ID");
|
||||||
PageData removeRecordDevice = new PageData();
|
addedRecordPointData.put("FIRE_CHECK_ID", FIRE_CHECK_ID);
|
||||||
initPageDataUtil.initSave(removeRecordDevice);
|
addedRecordPointData.put("FIRE_RECORD_ID", FIRE_RECORD_ID);
|
||||||
removeRecordDevice.put("FIRE_CHECK_ID", FIRE_CHECK_ID);
|
addedRecordPointData.put("CORPINFO_ID", CORPINFO_ID);
|
||||||
removeRecordDevice.put("FIRE_RECORD_ID", FIRE_RECORD_ID);
|
addedRecordPointData.put("P_ISCHECKED", 1);
|
||||||
removeRecordDevice.put("list", deviceIds);
|
}
|
||||||
fireRecordService.removeDeviceByCIdRid(removeRecordDevice);
|
fireRecordService.addedRecordPoint(addPoints);
|
||||||
}
|
|
||||||
// 有新增的器材那么 新增记录中的器材, 点位信息变更为也未检查完的状态。
|
|
||||||
if (DEVICE_PREPARED_DATA.size() > 0) {
|
|
||||||
// 准备变更状态的 点位id
|
|
||||||
HashSet<String> preChangesPid = new HashSet<>();
|
|
||||||
for (PageData device_prepared_info : DEVICE_PREPARED_DATA) {
|
|
||||||
initPageDataUtil.initSave(device_prepared_info, "EQUIPMENT_RECORD_ID");
|
|
||||||
device_prepared_info.put("ISCHECKED", 0);
|
|
||||||
device_prepared_info.put("FIRE_RECORD_ID", FIRE_RECORD_ID);
|
|
||||||
device_prepared_info.put("ISNORMAL", 2);
|
|
||||||
preChangesPid.add(device_prepared_info.getString("FIRE_POINT_ID"));
|
|
||||||
}
|
}
|
||||||
fireRecordService.addedRecordDeviceList(DEVICE_PREPARED_DATA);
|
// 有删除的器材那么 删除记录中的器材
|
||||||
PageData checkedPageData = new PageData();
|
if (deviceIds.length > 0) {
|
||||||
initPageDataUtil.initEdit(checkedPageData);
|
PageData removeRecordDevice = new PageData();
|
||||||
checkedPageData.put("FIRE_RECORD_ID",FIRE_RECORD_ID);
|
initPageDataUtil.initSave(removeRecordDevice);
|
||||||
checkedPageData.put("list",preChangesPid);
|
removeRecordDevice.put("FIRE_CHECK_ID", FIRE_CHECK_ID);
|
||||||
fireRecordService.updCheckedByRidPid(checkedPageData);
|
removeRecordDevice.put("FIRE_RECORD_ID", FIRE_RECORD_ID);
|
||||||
}
|
removeRecordDevice.put("list", deviceIds);
|
||||||
|
fireRecordService.removeDeviceByCIdRid(removeRecordDevice);
|
||||||
|
}
|
||||||
|
// 有新增的器材那么 新增记录中的器材, 点位信息变更为也未检查完的状态。
|
||||||
|
if (DEVICE_PREPARED_DATA.size() > 0) {
|
||||||
|
// 准备变更状态的 点位id
|
||||||
|
HashSet<String> preChangesPid = new HashSet<>();
|
||||||
|
for (PageData device_prepared_info : DEVICE_PREPARED_DATA) {
|
||||||
|
initPageDataUtil.initSave(device_prepared_info, "EQUIPMENT_RECORD_ID");
|
||||||
|
device_prepared_info.put("ISCHECKED", 0);
|
||||||
|
device_prepared_info.put("FIRE_RECORD_ID", FIRE_RECORD_ID);
|
||||||
|
device_prepared_info.put("ISNORMAL", 2);
|
||||||
|
preChangesPid.add(device_prepared_info.getString("FIRE_POINT_ID"));
|
||||||
|
}
|
||||||
|
fireRecordService.addedRecordDeviceList(DEVICE_PREPARED_DATA);
|
||||||
|
PageData checkedPageData = new PageData();
|
||||||
|
initPageDataUtil.initEdit(checkedPageData);
|
||||||
|
checkedPageData.put("FIRE_RECORD_ID",FIRE_RECORD_ID);
|
||||||
|
checkedPageData.put("list",preChangesPid);
|
||||||
|
fireRecordService.updCheckedByRidPid(checkedPageData);
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.zcloud.service.firemanager.impl;
|
package com.zcloud.service.firemanager.impl;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@ -730,7 +729,7 @@ public class FireRecordServiceImpl implements FireRecordService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageData getCheckingByCid(String fireCheckId) {
|
public List<PageData> getCheckingByCid(String fireCheckId) {
|
||||||
return fireRecordMapper.getCheckingByCid(fireCheckId);
|
return fireRecordMapper.getCheckingByCid(fireCheckId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.zcloud.service.keyProjects;
|
||||||
|
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明:AI报警表的Hidden_ids中间表
|
||||||
|
* 官网:www.zcloudchina.com
|
||||||
|
* @Autor water_xu
|
||||||
|
* @Date 2024.05.29
|
||||||
|
*/
|
||||||
|
public interface AIWarningHiddensService {
|
||||||
|
|
||||||
|
/**新增
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void save(PageData pd);
|
||||||
|
|
||||||
|
/**修改
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void edit(PageData pd);
|
||||||
|
|
||||||
|
/**通过id获取数据
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public PageData findById(PageData pd);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过id获取数据
|
||||||
|
*
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public List<PageData> findByAiId(PageData pd);
|
||||||
|
|
||||||
|
/**通过id获取数据
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public PageData findByHiddenId(PageData pd);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -93,5 +93,7 @@ public interface OutSourcedService{
|
||||||
|
|
||||||
|
|
||||||
List<PageData> listForCount(PageData pd);
|
List<PageData> listForCount(PageData pd);
|
||||||
|
|
||||||
|
List<PageData> listOutSourcedByIds(List ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,5 +75,7 @@ public interface VideoManagerService {
|
||||||
void updateAiByOUTSOURCED_ID(PageData pd);
|
void updateAiByOUTSOURCED_ID(PageData pd);
|
||||||
|
|
||||||
List<PageData> listApp(Page page);
|
List<PageData> listApp(Page page);
|
||||||
|
|
||||||
|
List<PageData> findRepeatOutSourcedIdByVideoId(PageData video)throws Exception;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,59 @@
|
||||||
|
|
||||||
|
package com.zcloud.service.keyProjects.impl;
|
||||||
|
|
||||||
|
import com.zcloud.entity.PageData;
|
||||||
|
import com.zcloud.mapper.dsno2.keyProjects.AIWarningHiddensMapper;
|
||||||
|
import com.zcloud.service.keyProjects.AIWarningHiddensService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 说明:AI报警表的Hidden_ids中间表
|
||||||
|
* 官网:www.zcloudchina.com
|
||||||
|
* @Autor water_xu
|
||||||
|
* @Date 2024.05.29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AIWarningHiddensServiceImpl implements AIWarningHiddensService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AIWarningHiddensMapper aiWarningHiddensMapper;
|
||||||
|
|
||||||
|
/**新增
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void save(PageData pd){
|
||||||
|
aiWarningHiddensMapper.save(pd);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**修改
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void edit(PageData pd){
|
||||||
|
aiWarningHiddensMapper.edit(pd);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**通过id获取数据
|
||||||
|
* @param pd
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public PageData findById(PageData pd){
|
||||||
|
return aiWarningHiddensMapper.findById(pd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> findByAiId(PageData pd){
|
||||||
|
return aiWarningHiddensMapper.findByAiId(pd);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PageData findByHiddenId(PageData pd){
|
||||||
|
return aiWarningHiddensMapper.findByHiddenId(pd);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -184,6 +184,14 @@ public class KeyprojectHiddenServiceImpl implements KeyprojectHiddenService {
|
||||||
@Override
|
@Override
|
||||||
public List<PageData> listAllInspection(PageData pd) throws Exception {
|
public List<PageData> listAllInspection(PageData pd) throws Exception {
|
||||||
List<PageData> hiddenList = hiddenMapper.listAllInspection(pd);
|
List<PageData> hiddenList = hiddenMapper.listAllInspection(pd);
|
||||||
|
/**
|
||||||
|
* 这里如果不传对应的参数会出现全表查询的现象,为了避免这种情况,默认如果记录数超过100条,抛出异常
|
||||||
|
* @Autor water_xu
|
||||||
|
* @Date 2024/05/29
|
||||||
|
*/
|
||||||
|
if (hiddenList.size() >= 100){
|
||||||
|
throw new RuntimeException("参数异常-listAllInspection查询结果记录数为:" + hiddenList.size());
|
||||||
|
}
|
||||||
for (PageData hd : hiddenList) {
|
for (PageData hd : hiddenList) {
|
||||||
PageData pd2 = new PageData();
|
PageData pd2 = new PageData();
|
||||||
pd2.put("FOREIGN_KEY",hd.getString("HIDDEN_ID"));
|
pd2.put("FOREIGN_KEY",hd.getString("HIDDEN_ID"));
|
||||||
|
|
|
@ -121,5 +121,9 @@ public class OutSourcedServiceImpl implements OutSourcedService {
|
||||||
public List<PageData> listForCount(PageData pd) {
|
public List<PageData> listForCount(PageData pd) {
|
||||||
return outsourcedMapper.listForCount(pd);
|
return outsourcedMapper.listForCount(pd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<PageData> listOutSourcedByIds(List ids){
|
||||||
|
return outsourcedMapper.listOutSourcedByIds(ids);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -126,5 +126,10 @@ public class VideoManagerServiceImpl implements VideoManagerService {
|
||||||
public List<PageData> listApp(Page page) {
|
public List<PageData> listApp(Page page) {
|
||||||
return videomanagerMapper.dataApplistPage(page);
|
return videomanagerMapper.dataApplistPage(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PageData> findRepeatOutSourcedIdByVideoId(PageData video)throws Exception{
|
||||||
|
return videomanagerMapper.findRepeatOutSourcedIdByVideoId(video);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ public interface XgfUserService {
|
||||||
void saveLog(PageData info, String status, String endFlag) throws Exception;
|
void saveLog(PageData info, String status, String endFlag) throws Exception;
|
||||||
void saveLog(XgfFlowDto info, String status, String endFlag) throws Exception;
|
void saveLog(XgfFlowDto info, String status, String endFlag) throws Exception;
|
||||||
|
|
||||||
void repulse(PageData flows) throws Exception;
|
void repulse(PageData flows, XgfFlowDto info) throws Exception;
|
||||||
|
|
||||||
void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception;
|
void approveMax(PageData request, MultipartFile[] chengNuoShu) throws Exception;
|
||||||
|
|
||||||
|
|
|
@ -991,25 +991,38 @@ public class XgfUserServiceImpl implements XgfUserService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void repulse(PageData flows) throws Exception {
|
public void repulse(PageData flows, XgfFlowDto info) throws Exception {
|
||||||
PageData condition = new PageData();
|
// add by liu jun 相关方可指定打回至指定节点 -1 为默认打回至相关方端
|
||||||
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
if ("-1".equals(info.getBACK_STEP())){
|
||||||
PageData entity = xgfUserMapper.findById(condition);
|
PageData condition = new PageData();
|
||||||
entity.put("STATUS", "0");
|
condition.put("XGF_USER_ID", flows.getString("FLOWS_ID"));
|
||||||
entity.put("VALID_FLAG", "0");
|
PageData entity = xgfUserMapper.findById(condition);
|
||||||
entity.put("CHECK_STATUS", "-2");
|
entity.put("STATUS", "0");
|
||||||
PageData key = new PageData();
|
entity.put("VALID_FLAG", "0");
|
||||||
key.putAll(entity);
|
entity.put("CHECK_STATUS", "-2");
|
||||||
key.put("USER_ID", condition.get("XGF_USER_ID"));
|
PageData key = new PageData();
|
||||||
key.put("STATUS", "1");
|
key.putAll(entity);
|
||||||
key.put("OPINION", flows.get("OPINION"));
|
key.put("USER_ID", condition.get("XGF_USER_ID"));
|
||||||
Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key);
|
key.put("STATUS", "1");
|
||||||
if (result == null || !"succeed".equals(result.get("result"))) {
|
key.put("OPINION", flows.get("OPINION"));
|
||||||
throw new RuntimeException("请求失败");
|
Map result = HttpClientService.doPost(prevention_xgf_url + "openApi/user/approve", key);
|
||||||
|
if (result == null || !"succeed".equals(result.get("result"))) {
|
||||||
|
throw new RuntimeException("请求失败");
|
||||||
|
}
|
||||||
|
xgfUserMapper.edit(entity);
|
||||||
|
this.clearInfo(flows);
|
||||||
|
xgfFlowsMapper.edit(flows);
|
||||||
|
} else {
|
||||||
|
// 1、判断不能自己打回到自己
|
||||||
|
PageData condition = new PageData();
|
||||||
|
condition.put("FLOWS_ID",flows.getString("FLOWS_ID"));
|
||||||
|
PageData flowEntity = xgfFlowsMapper.findById(condition);
|
||||||
|
if (flowEntity != null && flowEntity.size() > 0 && flowEntity.getString("FLOWS_STEP").equals(info.getBACK_STEP())){
|
||||||
|
throw new RuntimeException("不能自己打回到自己");
|
||||||
|
}
|
||||||
|
flowEntity.put("FLOWS_STEP", info.getBACK_STEP());
|
||||||
|
xgfFlowsMapper.edit(flowEntity);
|
||||||
}
|
}
|
||||||
xgfUserMapper.edit(entity);
|
|
||||||
this.clearInfo(flows);
|
|
||||||
xgfFlowsMapper.edit(flows);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1136,6 +1136,10 @@
|
||||||
from
|
from
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
left join `qa-gwj-prevention`.bus_hiddenregion hr on hr.HIDDENREGION_ID = f.HIDDENPART
|
left join `qa-gwj-prevention`.bus_hiddenregion hr on hr.HIDDENREGION_ID = f.HIDDENPART
|
||||||
|
<if test="AIWARNING_ID != null and AIWARNING_ID !=''" >
|
||||||
|
left join `qa-gwj-regulatory`.bus_aiwarning_hiddens aih on aih.HIDDEN_ID = f.HIDDEN_ID
|
||||||
|
left join `qa-gwj-regulatory`.bus_aiwarning ai on ai.AIWARNING_ID = aih.AIWARNING_ID
|
||||||
|
</if>
|
||||||
left join <include refid="dicTableName"></include> lv on f.HIDDENLEVEL = lv.BIANMA
|
left join <include refid="dicTableName"></include> lv on f.HIDDENLEVEL = lv.BIANMA
|
||||||
left join <include refid="dicTableName"></include> ht on f.HIDDENTYPE = ht.BIANMA
|
left join <include refid="dicTableName"></include> ht on f.HIDDENTYPE = ht.BIANMA
|
||||||
left join <include refid="dicTableName"></include> ht2 on f.HIDDENTYPE2 = ht2.BIANMA and ht2.PARENT_ID = '18c0a9aea6e54feab9f4ab3f46e0bc86'
|
left join <include refid="dicTableName"></include> ht2 on f.HIDDENTYPE2 = ht2.BIANMA and ht2.PARENT_ID = '18c0a9aea6e54feab9f4ab3f46e0bc86'
|
||||||
|
@ -1148,13 +1152,11 @@
|
||||||
<if test="FOREIGN_ID != null and FOREIGN_ID !=''" >
|
<if test="FOREIGN_ID != null and FOREIGN_ID !=''" >
|
||||||
and f.FOREIGN_ID = #{FOREIGN_ID}
|
and f.FOREIGN_ID = #{FOREIGN_ID}
|
||||||
</if>
|
</if>
|
||||||
<!-- Ai报警信息专查 -->
|
|
||||||
<if test="AI_WARNING != null and AI_WARNING !=''" >
|
<if test="AIWARNING_ID != null and AIWARNING_ID !=''" >
|
||||||
and f.HIDDEN_ID in
|
and ai.AIWARNING_ID = #{AIWARNING_ID}
|
||||||
<foreach collection="array" item="item" separator="," open="(" close = ")">
|
|
||||||
#{item}
|
|
||||||
</foreach>
|
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
<if test="KEYWORDS != null and KEYWORDS != ''"><!-- 关键词检索 -->
|
||||||
and
|
and
|
||||||
(
|
(
|
||||||
|
@ -1631,10 +1633,10 @@ FROM
|
||||||
WHERE
|
WHERE
|
||||||
h.ISDELETE = '0'
|
h.ISDELETE = '0'
|
||||||
<if test="pd.HANDLED==1">
|
<if test="pd.HANDLED==1">
|
||||||
and (P.HANDLED = '0' OR P.HANDLED IS NULL OR h.ISPUNISH != '2')
|
and (h.ISPUNISH is null OR P.HANDLED = '0' )
|
||||||
</if>
|
</if>
|
||||||
<if test="pd.HANDLED==2">
|
<if test="pd.HANDLED==2">
|
||||||
and P.HANDLED = '1'
|
and (h.ISPUNISH = '2' OR P.HANDLED = '1')
|
||||||
</if>
|
</if>
|
||||||
AND ( c.OUTSOURCED_ID = #{pd.OUTSOURCED_ID} OR h.FOREIGN_ID = #{pd.OUTSOURCED_ID} )
|
AND ( c.OUTSOURCED_ID = #{pd.OUTSOURCED_ID} OR h.FOREIGN_ID = #{pd.OUTSOURCED_ID} )
|
||||||
<if test="pd.CREATOR != null and pd.CREATOR != ''">
|
<if test="pd.CREATOR != null and pd.CREATOR != ''">
|
||||||
|
|
|
@ -257,9 +257,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="tableName"></include> f
|
<include refid="tableName"></include> f
|
||||||
LEFT JOIN OA_DEPARTMENT dept on f.DEPARTMENT_ID = dept.DEPARTMENT_ID
|
LEFT JOIN OA_DEPARTMENT dept on f.DEPARTMENT_ID = dept.DEPARTMENT_ID
|
||||||
where
|
where
|
||||||
USERNAME = #{USERNAME} and ISDELETE='0'
|
f.USERNAME = #{USERNAME} and f.ISDELETE='0'
|
||||||
<if test="VERIFYUSER_ID != null and VERIFYUSER_ID != ''">
|
<if test="VERIFYUSER_ID != null and VERIFYUSER_ID != ''">
|
||||||
and USER_ID != #{VERIFYUSER_ID}
|
and f.USER_ID != #{VERIFYUSER_ID}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="findByName" parameterType="pd" resultType="pd" >
|
<select id="findByName" parameterType="pd" resultType="pd" >
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.zcloud.mapper.dsno2.keyProjects.AIWarningHiddensMapper">
|
||||||
|
|
||||||
|
<!--表名 -->
|
||||||
|
<sql id="tableName">
|
||||||
|
BUS_AIWARNING_HIDDENS
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<!-- 新增-->
|
||||||
|
<insert id="save" parameterType="pd">
|
||||||
|
insert into
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
(
|
||||||
|
AIWARNING_HIDDEN_ID,AIWARNING_ID,HIDDEN_ID
|
||||||
|
) values (
|
||||||
|
#{AIWARNING_HIDDEN_ID},#{AIWARNING_ID},#{HIDDEN_ID}
|
||||||
|
)
|
||||||
|
</insert>
|
||||||
|
<!-- 删除用bus_aiwarning的ISDELETE字段就可以 -->
|
||||||
|
|
||||||
|
<!-- 修改 -->
|
||||||
|
<update id="edit" parameterType="pd">
|
||||||
|
update
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
set
|
||||||
|
AIWARNING_ID = #{AIWARNING_ID},HIDDEN_ID = #{HIDDEN_ID}
|
||||||
|
where
|
||||||
|
AIWARNING_HIDDEN_ID = #{AIWARNING_HIDDEN_ID}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!-- 通过AiID获取数据 -->
|
||||||
|
<select id="findByAiId" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
AIWARNING_HIDDEN_ID,AIWARNING_ID,HIDDEN_ID
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
where
|
||||||
|
AIWARNING_ID = #{AIWARNING_ID}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!-- 通过HiddenID获取数据 -->
|
||||||
|
<select id="findByHiddenId" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
AIWARNING_HIDDEN_ID,AIWARNING_ID,HIDDEN_ID
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
where
|
||||||
|
HIDDEN_ID = #{HIDDEN_ID}
|
||||||
|
</select>
|
||||||
|
<!-- 通过ID获取数据 -->
|
||||||
|
<select id="findById" parameterType="pd" resultType="pd">
|
||||||
|
select
|
||||||
|
AIWARNING_HIDDEN_ID,AIWARNING_ID,HIDDEN_ID
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
where
|
||||||
|
AIWARNING_HIDDEN_ID = #{AIWARNING_HIDDEN_ID}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
|
@ -28,7 +28,6 @@
|
||||||
f.ISTRUE,
|
f.ISTRUE,
|
||||||
f.HASHIDDEN,
|
f.HASHIDDEN,
|
||||||
f.AIWARNING_ID,
|
f.AIWARNING_ID,
|
||||||
f.HIDDEN_IDS,
|
|
||||||
f.REMARKS
|
f.REMARKS
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
|
@ -126,9 +125,6 @@
|
||||||
<if test="OPERATTIME != null and OPERATTIME != ''">
|
<if test="OPERATTIME != null and OPERATTIME != ''">
|
||||||
,OPERATTIME = #{OPERATTIME}
|
,OPERATTIME = #{OPERATTIME}
|
||||||
</if>
|
</if>
|
||||||
<if test="HIDDEN_IDS != null and HIDDEN_IDS != ''">
|
|
||||||
,HIDDEN_IDS = #{HIDDEN_IDS}
|
|
||||||
</if>
|
|
||||||
where
|
where
|
||||||
AIWARNING_ID = #{AIWARNING_ID}
|
AIWARNING_ID = #{AIWARNING_ID}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
@ -282,7 +282,9 @@
|
||||||
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.oa_department t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.INVOLVING_CORPS_DEPART_ID ) ) AS INVOLVING_CORPS_DEPART_NAME,
|
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.oa_department t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.INVOLVING_CORPS_DEPART_ID ) ) AS INVOLVING_CORPS_DEPART_NAME,
|
||||||
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.GROUP_UNIT)) as GROUP_UNIT_NAME,
|
(select GROUP_CONCAT(t.CORP_NAME) from `qa-gwj-prevention`.BUS_CORP_INFO t where FIND_IN_SET(t.CORPINFO_ID, f.GROUP_UNIT)) as GROUP_UNIT_NAME,
|
||||||
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_NAME,
|
( SELECT GROUP_CONCAT( t.NAME ) FROM `qa-gwj-prevention`.vi_department_all t WHERE FIND_IN_SET( t.DEPARTMENT_ID, f.DEPARTMENT_ID ) ) AS DEPARTMENT_NAME,
|
||||||
|
<if test="pd.UserId != null and pd.UserId != ''">
|
||||||
|
uncheck.UNCHECK_COUNT,
|
||||||
|
</if>
|
||||||
(select GROUP_CONCAT(t.NAME) from (
|
(select GROUP_CONCAT(t.NAME) from (
|
||||||
SELECT
|
SELECT
|
||||||
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
|
CONCAT( CONCAT( c.CORP_NAME, '-' ), t.NAME ) NAME ,t.DEPARTMENT_ID
|
||||||
|
@ -314,6 +316,25 @@
|
||||||
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
|
LEFT JOIN `qa-gwj-regulatory`.vi_all_corp vac on vua.CORPINFO_ID = vac.CORPINFO_ID
|
||||||
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
left join `qa-gwj-regulatory`.bus_personnelmanagement p on p.PERSONNELMANAGEMENT_ID = f.UNITS_PIC
|
||||||
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID
|
LEFT JOIN ( select count(c.KEYPROJECTCHECK_ID) co, c.OUTSOURCED_ID from `qa-gwj-prevention`.BUS_KEYPROJECTCHECK c where c.ISDELETE = '0' group by c.OUTSOURCED_ID ) cc on cc.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||||
|
<if test="pd.UserId != null and pd.UserId != ''">
|
||||||
|
left join (
|
||||||
|
SELECT COUNT(t.HIDDEN_ID) UNCHECK_COUNT,t.OUTSOURCED_ID,t.CREATOR CREATOR FROM (
|
||||||
|
SELECT
|
||||||
|
f.HIDDEN_ID,IFNULL(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) OUTSOURCED_ID,f.CREATOR CREATOR
|
||||||
|
FROM
|
||||||
|
`qa-gwj-prevention`.BUS_KEYPROJECT_HIDDEN f
|
||||||
|
LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck keycheck ON keycheck.KEYPROJECTCHECK_ID = f.FOREIGN_ID
|
||||||
|
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED bo ON keycheck.OUTSOURCED_ID = bo.OUTSOURCED_ID
|
||||||
|
LEFT JOIN `qa-gwj-regulatory`.BUS_OUTSOURCED boai ON f.FOREIGN_ID = boai.OUTSOURCED_ID
|
||||||
|
WHERE
|
||||||
|
f.ISDELETE = '0'
|
||||||
|
AND f.SOURCE IN ( '4', '5', '1' )
|
||||||
|
AND f.STATE = '2'
|
||||||
|
AND ifnull(bo.OUTSOURCED_ID,boai.OUTSOURCED_ID) IS NOT NULL
|
||||||
|
AND (bo.ISDELETE = '0' or boai.ISDELETE = '0')
|
||||||
|
) t group by t.OUTSOURCED_ID,t.CREATOR
|
||||||
|
) uncheck on uncheck.OUTSOURCED_ID = f.OUTSOURCED_ID and uncheck.CREATOR = #{pd.UserId}
|
||||||
|
</if>
|
||||||
left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT, t.SOURCE SOURCE, t.CREATOR CREATOR
|
left join ( SELECT t.OUTSOURCED_ID, COUNT( t.HIDDEN_ID ) HIDDEN_COUNT, t.SOURCE SOURCE, t.CREATOR CREATOR
|
||||||
FROM
|
FROM
|
||||||
( SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.* FROM `qa-gwj-prevention`.bus_keyproject_hidden h LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID and h.ISDELETE = '0') t GROUP BY t.OUTSOURCED_ID,t.CREATOR ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID
|
( SELECT IFNULL( k.OUTSOURCED_ID, h.FOREIGN_ID ) OUTSOURCED_ID, h.* FROM `qa-gwj-prevention`.bus_keyproject_hidden h LEFT JOIN `qa-gwj-prevention`.bus_keyprojectcheck k ON h.FOREIGN_ID = k.KEYPROJECTCHECK_ID and h.ISDELETE = '0') t GROUP BY t.OUTSOURCED_ID,t.CREATOR ) h on h.OUTSOURCED_ID = f.OUTSOURCED_ID
|
||||||
|
@ -381,8 +402,11 @@
|
||||||
</if>
|
</if>
|
||||||
GROUP BY f.OUTSOURCED_ID
|
GROUP BY f.OUTSOURCED_ID
|
||||||
ORDER BY
|
ORDER BY
|
||||||
cc.co DESC,
|
<if test="pd.UserId != null and pd.UserId != ''">
|
||||||
f.OPERATTIME DESC
|
uncheck.UNCHECK_COUNT DESC,
|
||||||
|
</if>
|
||||||
|
cc.co DESC
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDeptId" resultType="string">
|
<select id="getDeptId" resultType="string">
|
||||||
|
@ -931,4 +955,17 @@
|
||||||
and vac.CORPINFO_ID = #{CORPINFO_ID}
|
and vac.CORPINFO_ID = #{CORPINFO_ID}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 通过List批量获取重点工程数据 -->
|
||||||
|
<select id="listOutSourcedByIds" parameterType="List" resultType="pd">
|
||||||
|
select <include refid="Field"></include>
|
||||||
|
from <include refid="tableName"></include> f
|
||||||
|
where f.ISDELETE = '0'
|
||||||
|
|
||||||
|
and f.OUTSOURCED_ID in
|
||||||
|
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
@ -312,4 +312,25 @@
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 获取到重复的摄像头绑定 -->
|
||||||
|
<select id="findRepeatOutSourcedIdByVideoId" resultType="com.zcloud.entity.PageData">
|
||||||
|
select
|
||||||
|
f.OUTSOURCED_ID,
|
||||||
|
f.VIDEOMANAGER_ID,
|
||||||
|
f.VIDEONAME,
|
||||||
|
f.CAMERAID,
|
||||||
|
IFNULL(f.VIDEO_RESOURCES_ID,f.PLATFORMVIDEOMANAGEMENT_ID) as VIDEO_ID,
|
||||||
|
(case when f.VIDEO_RESOURCES_ID is not null then '0' when f.PLATFORMVIDEOMANAGEMENT_ID is not null then '1' else '-1' end) as VIDEO_TYPE
|
||||||
|
from
|
||||||
|
<include refid="tableName"></include>
|
||||||
|
f
|
||||||
|
where
|
||||||
|
#{VIDEO_ID} = (
|
||||||
|
case when f.VIDEO_RESOURCES_ID is not null and f.VIDEO_RESOURCES_ID != '' then f.VIDEO_RESOURCES_ID
|
||||||
|
when f.PLATFORMVIDEOMANAGEMENT_ID is not null and f.PLATFORMVIDEOMANAGEMENT_ID != '' then f.PLATFORMVIDEOMANAGEMENT_ID
|
||||||
|
else '-1' end
|
||||||
|
)
|
||||||
|
and f.ISDELETE='0'
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue