Commit c5a4ef0a authored by tangwei's avatar tangwei

Merge branch 'developer' into develop_ccs

parents 765db087 08813664
......@@ -691,10 +691,7 @@ LEFT JOIN (
<select id="countDeptByCompanyId" resultType="java.util.Map">
SELECT (SELECT count(1)
FROM cb_org_usr
WHERE biz_org_code LIKE
concat((SELECT biz_org_code FROM `cb_org_usr` WHERE sequence_nbr = t1.sequence_nbr),
'%'
)
WHERE biz_org_code LIKE concat(t1.biz_org_code, '%')
AND biz_org_type = 'DEPARTMENT'
AND parent_id = t1.sequence_nbr) count,
sequence_nbr
......
......@@ -52,6 +52,9 @@ public class CheckReportDto implements Serializable {
@ApiModelProperty(value = "是否有重大隐患(1有,0无)")
Boolean hasMajorDanger;
@ApiModelProperty(value = "是否有重大隐患(1有,0无)")
String hasMajorDangerStr;
@ApiModelProperty(value = "存在安全隐患数量")
Integer dangerCount;
......
......@@ -175,4 +175,9 @@ public class DangerDto implements Serializable {
* 创建时间
*/
private Date createDate;
/**
* 流程id
*/
private String instanceId;
}
......@@ -1607,21 +1607,22 @@ public class EquipmentSpecificSerivceImpl extends ServiceImpl<EquipmentSpecificM
if (equipmentSpecificId != null) {
EquipmentSpecific equipmentSpecific = this.baseMapper.selectById(equipmentSpecificId);
if (!ObjectUtils.isEmpty(equipmentSpecific)) {
List<VideoEquipmentSpecific> videoSpecificList = new ArrayList<>();
videoIdList.parallelStream().forEach(x -> {
VideoEquipmentSpecific videoEquipmentSpecific = new VideoEquipmentSpecific();
videoEquipmentSpecific.setVideoId(x);
videoEquipmentSpecific.setEquipmentSpecificId(equipmentSpecificId);
QueryWrapper<VideoEquipmentSpecific> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("equipment_specific_id", equipmentSpecificId);
queryWrapper.eq("video_id", x);
List<VideoEquipmentSpecific> list = videoEquipmentSpecificService.getBaseMapper().selectList(queryWrapper);
if (0 == list.size()) {
QueryWrapper<VideoEquipmentSpecific> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("equipment_specific_id", equipmentSpecificId);
boolean remove = videoEquipmentSpecificService.remove(queryWrapper);
if (remove) {
List<VideoEquipmentSpecific> videoSpecificList = new ArrayList<>();
videoIdList.parallelStream().forEach(x -> {
VideoEquipmentSpecific videoEquipmentSpecific = new VideoEquipmentSpecific();
videoEquipmentSpecific.setVideoId(x);
videoEquipmentSpecific.setEquipmentSpecificId(equipmentSpecificId);
videoSpecificList.add(videoEquipmentSpecific);
}
});
videoEquipmentSpecificService.saveBatch(videoSpecificList);
return Boolean.TRUE;
});
videoEquipmentSpecificService.saveBatch(videoSpecificList);
return Boolean.TRUE;
} else {
throw new RuntimeException("设备摄像头绑定关系中此设备不存在!");
}
} else {
throw new RuntimeException("未获取到此设备!");
}
......
......@@ -2152,10 +2152,12 @@ public class LatentDangerServiceImpl extends BaseService<LatentDangerBo, LatentD
}
lambdaQueryWrapper.le(LatentDanger::getCreateDate, searchParam.getEndTime());
}
lambdaQueryWrapper.and(o ->
o.likeRight(LatentDanger::getOrgCode, searchParam.getOrgCode() + "*")
.or().likeRight(LatentDanger::getOrgCode, searchParam.getOrgCode() + "-")
.or().eq(LatentDanger::getOrgCode, searchParam.getOrgCode()));
if (ValidationUtil.isEmpty(searchParam.getDangerIds())) {
lambdaQueryWrapper.and(o ->
o.likeRight(LatentDanger::getOrgCode, searchParam.getOrgCode() + "*")
.or().likeRight(LatentDanger::getOrgCode, searchParam.getOrgCode() + "-")
.or().eq(LatentDanger::getOrgCode, searchParam.getOrgCode()));
}
List<LatentDanger> latentDangerList = this.baseMapper.selectList(lambdaQueryWrapper);
if (!ValidationUtil.isEmpty(latentDangerList)) {
// 防火监督报告用该字段(复核执行人名称)
......
......@@ -162,6 +162,26 @@ public class PlanServiceImpl implements IPlanService {
plan.setOrgCode(orgCode);
plan.setNextGenDate(DateUtil.getIntervalDate(new Date(), 0));
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);
Route route = save(addPlanRequest);
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.instance.prefer-ip-address=true
management.endpoint.health.show-details=always
......@@ -36,7 +36,7 @@ security.appKey=studio_normalapp_3168830
#redis 配置
spring.redis.database=0
spring.redis.host=172.16.10.85
spring.redis.host=172.16.11.30
spring.redis.port=6379
spring.redis.password=amos2019Redis
spring.redis.jedis.pool.max-active=200
......@@ -82,7 +82,7 @@ linux.img.path = /
## emqx
emqx.clean-session=true
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.password=a123456
emqx.max-inflight=1000
......
......@@ -55,5 +55,5 @@ rule.definition.load=false
rule.definition.model-package=com.yeejoin.amos.patrol.business.entity.mybatis
rule.definition.default-agency=STATE_GRID
jcs.fegin.name=JCS-tb
jcs.fegin.name=JCS
emergency.command.section.id=1418223840361709569
\ No newline at end of file
......@@ -26,6 +26,7 @@
</select>
<select id="selectPageList" resultType="com.yeejoin.amos.supervision.core.common.dto.CheckReportDto">
select cr.*,
case when cr.has_major_danger = 1 then '有' else '无' end as hasMajorDangerStr,
p.name planName,
p.check_type_name planCheckType,
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