Commit c5a4ef0a authored by tangwei's avatar tangwei

Merge branch 'developer' into develop_ccs

parents 765db087 08813664
...@@ -691,10 +691,7 @@ LEFT JOIN ( ...@@ -691,10 +691,7 @@ LEFT JOIN (
<select id="countDeptByCompanyId" resultType="java.util.Map"> <select id="countDeptByCompanyId" resultType="java.util.Map">
SELECT (SELECT count(1) SELECT (SELECT count(1)
FROM cb_org_usr FROM cb_org_usr
WHERE biz_org_code LIKE WHERE biz_org_code LIKE concat(t1.biz_org_code, '%')
concat((SELECT biz_org_code FROM `cb_org_usr` WHERE sequence_nbr = t1.sequence_nbr),
'%'
)
AND biz_org_type = 'DEPARTMENT' AND biz_org_type = 'DEPARTMENT'
AND parent_id = t1.sequence_nbr) count, AND parent_id = t1.sequence_nbr) count,
sequence_nbr sequence_nbr
......
...@@ -52,6 +52,9 @@ public class CheckReportDto implements Serializable { ...@@ -52,6 +52,9 @@ public class CheckReportDto implements Serializable {
@ApiModelProperty(value = "是否有重大隐患(1有,0无)") @ApiModelProperty(value = "是否有重大隐患(1有,0无)")
Boolean hasMajorDanger; Boolean hasMajorDanger;
@ApiModelProperty(value = "是否有重大隐患(1有,0无)")
String hasMajorDangerStr;
@ApiModelProperty(value = "存在安全隐患数量") @ApiModelProperty(value = "存在安全隐患数量")
Integer dangerCount; Integer dangerCount;
......
...@@ -175,4 +175,9 @@ public class DangerDto implements Serializable { ...@@ -175,4 +175,9 @@ public class DangerDto implements Serializable {
* 创建时间 * 创建时间
*/ */
private Date createDate; private Date createDate;
/**
* 流程id
*/
private String instanceId;
} }
...@@ -1607,21 +1607,22 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM ...@@ -1607,21 +1607,22 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if (equipmentSpecificId != null) { if (equipmentSpecificId != null) {
EquipmentSpecific equipmentSpecific = this.baseMapper.selectById(equipmentSpecificId); EquipmentSpecific equipmentSpecific = this.baseMapper.selectById(equipmentSpecificId);
if (!ObjectUtils.isEmpty(equipmentSpecific)) { if (!ObjectUtils.isEmpty(equipmentSpecific)) {
List<VideoEquipmentSpecific> videoSpecificList = new ArrayList<>(); QueryWrapper<VideoEquipmentSpecific> queryWrapper = new QueryWrapper<>();
videoIdList.parallelStream().forEach(x -> { queryWrapper.eq("equipment_specific_id", equipmentSpecificId);
VideoEquipmentSpecific videoEquipmentSpecific = new VideoEquipmentSpecific(); boolean remove = videoEquipmentSpecificService.remove(queryWrapper);
videoEquipmentSpecific.setVideoId(x); if (remove) {
videoEquipmentSpecific.setEquipmentSpecificId(equipmentSpecificId); List<VideoEquipmentSpecific> videoSpecificList = new ArrayList<>();
QueryWrapper<VideoEquipmentSpecific> queryWrapper = new QueryWrapper<>(); videoIdList.parallelStream().forEach(x -> {
queryWrapper.eq("equipment_specific_id", equipmentSpecificId); VideoEquipmentSpecific videoEquipmentSpecific = new VideoEquipmentSpecific();
queryWrapper.eq("video_id", x); videoEquipmentSpecific.setVideoId(x);
List<VideoEquipmentSpecific> list = videoEquipmentSpecificService.getBaseMapper().selectList(queryWrapper); videoEquipmentSpecific.setEquipmentSpecificId(equipmentSpecificId);
if (0 == list.size()) {
videoSpecificList.add(videoEquipmentSpecific); videoSpecificList.add(videoEquipmentSpecific);
} });
}); videoEquipmentSpecificService.saveBatch(videoSpecificList);
videoEquipmentSpecificService.saveBatch(videoSpecificList); return Boolean.TRUE;
return Boolean.TRUE; } else {
throw new RuntimeException("设备摄像头绑定关系中此设备不存在!");
}
} else { } else {
throw new RuntimeException("未获取到此设备!"); throw new RuntimeException("未获取到此设备!");
} }
......
...@@ -2152,10 +2152,12 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD ...@@ -2152,10 +2152,12 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
} }
lambdaQueryWrapper.le(LatentDanger::getCreateDate, searchParam.getEndTime()); lambdaQueryWrapper.le(LatentDanger::getCreateDate, searchParam.getEndTime());
} }
lambdaQueryWrapper.and(o -> if (ValidationUtil.isEmpty(searchParam.getDangerIds())) {
o.likeRight(LatentDanger::getOrgCode, searchParam.getOrgCode() + "*") lambdaQueryWrapper.and(o ->
.or().likeRight(LatentDanger::getOrgCode, searchParam.getOrgCode() + "-") o.likeRight(LatentDanger::getOrgCode, searchParam.getOrgCode() + "*")
.or().eq(LatentDanger::getOrgCode, searchParam.getOrgCode())); .or().likeRight(LatentDanger::getOrgCode, searchParam.getOrgCode() + "-")
.or().eq(LatentDanger::getOrgCode, searchParam.getOrgCode()));
}
List<LatentDanger> latentDangerList = this.baseMapper.selectList(lambdaQueryWrapper); List<LatentDanger> latentDangerList = this.baseMapper.selectList(lambdaQueryWrapper);
if (!ValidationUtil.isEmpty(latentDangerList)) { if (!ValidationUtil.isEmpty(latentDangerList)) {
// 防火监督报告用该字段(复核执行人名称) // 防火监督报告用该字段(复核执行人名称)
......
...@@ -162,6 +162,26 @@ public class PlanServiceImpl implements IPlanService { ...@@ -162,6 +162,26 @@ public class PlanServiceImpl implements IPlanService {
plan.setOrgCode(orgCode); plan.setOrgCode(orgCode);
plan.setNextGenDate(DateUtil.getIntervalDate(new Date(), 0)); plan.setNextGenDate(DateUtil.getIntervalDate(new Date(), 0));
plan.setCreateBy(userId); plan.setCreateBy(userId);
/* 设置检查单位的去重 by 陈浩 on 2022-01-24 start bug:4320*/
String checkUnitId= plan.getCheckUnitId();
if(org.apache.commons.lang3.StringUtils.isNotBlank(checkUnitId) && checkUnitId.contains(",")) {
String [] checkUnitIdStr= checkUnitId.split(",");
String checkUnitName= plan.getCheckUnitName();
String [] checkUnitNameStr= checkUnitName.split(",");
StringBuffer checkUnitNameStringBuffer = new StringBuffer();
checkUnitNameStringBuffer.append(checkUnitNameStr[0]);
String validCheckUnitId = checkUnitIdStr[0];
for (int i = 1; i < checkUnitIdStr.length; i++) {
if(!validCheckUnitId.contains(checkUnitIdStr[i])) {
validCheckUnitId = validCheckUnitId+","+checkUnitIdStr[i];
checkUnitNameStringBuffer.append(","+checkUnitNameStr[i]);
}
}
plan.setCheckUnitId(validCheckUnitId);
plan.setCheckUnitName(checkUnitNameStringBuffer.toString());
}
/* 设置检查单位的去重 by 陈浩 on 2022-01-24 start */
addPlanRequest.setPlan(plan); addPlanRequest.setPlan(plan);
Route route = save(addPlanRequest); Route route = save(addPlanRequest);
if (!ObjectUtils.isEmpty(route)) { if (!ObjectUtils.isEmpty(route)) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
eureka.client.serviceUrl.defaultZone=http://172.16.10.72:10001/eureka/ eureka.client.serviceUrl.defaultZone=http://172.16.11.30:10001/eureka/
eureka.client.registry-fetch-interval-seconds=5 eureka.client.registry-fetch-interval-seconds=5
eureka.instance.prefer-ip-address=true eureka.instance.prefer-ip-address=true
management.endpoint.health.show-details=always management.endpoint.health.show-details=always
...@@ -36,7 +36,7 @@ security.appKey=studio_normalapp_3168830 ...@@ -36,7 +36,7 @@ security.appKey=studio_normalapp_3168830
#redis 配置 #redis 配置
spring.redis.database=0 spring.redis.database=0
spring.redis.host=172.16.10.85 spring.redis.host=172.16.11.30
spring.redis.port=6379 spring.redis.port=6379
spring.redis.password=amos2019Redis spring.redis.password=amos2019Redis
spring.redis.jedis.pool.max-active=200 spring.redis.jedis.pool.max-active=200
...@@ -82,7 +82,7 @@ linux.img.path = / ...@@ -82,7 +82,7 @@ linux.img.path = /
## emqx ## emqx
emqx.clean-session=true emqx.clean-session=true
emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1 emqx.client-id=${spring.application.name}-${random.int[1024,65536]}-1
emqx.broker=tcp://172.16.10.85:1883 emqx.broker=tcp://39.98.45.134:1883
emqx.user-name=super emqx.user-name=super
emqx.password=a123456 emqx.password=a123456
emqx.max-inflight=1000 emqx.max-inflight=1000
......
...@@ -55,5 +55,5 @@ rule.definition.load=false ...@@ -55,5 +55,5 @@ rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.patrol.business.entity.mybatis rule.definition.model-package=com.yeejoin.amos.patrol.business.entity.mybatis
rule.definition.default-agency=STATE_GRID rule.definition.default-agency=STATE_GRID
jcs.fegin.name=JCS-tb jcs.fegin.name=JCS
emergency.command.section.id=1418223840361709569 emergency.command.section.id=1418223840361709569
\ No newline at end of file
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
</select> </select>
<select id="selectPageList" resultType="com.yeejoin.amos.supervision.core.common.dto.CheckReportDto"> <select id="selectPageList" resultType="com.yeejoin.amos.supervision.core.common.dto.CheckReportDto">
select cr.*, select cr.*,
case when cr.has_major_danger = 1 then '有' else '无' end as hasMajorDangerStr,
p.name planName, p.name planName,
p.check_type_name planCheckType, p.check_type_name planCheckType,
p.check_level planCheckLevel p.check_level planCheckLevel
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment