Commit 0b84ba42 authored by chenzhao's avatar chenzhao

修改 机场人员动态表态数据缺失 防火监督计划检查时间校验 救援队伍统计 航空器救援状态

parent 3a76a713
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance Round(st_distance(point(a.longitude,a.latitude),point(#{par.longitude},#{par.latitude}))*111195,1) AS distance
FROM cb_fire_team a FROM cb_fire_team a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if test='par.typeCode==null'> <if test='par.typeCode==null or par.typeCode == "" '>
and a.type_code in (116,830) and a.type_code in (116,830)
</if> </if>
<if test='par.typeCode!=null and par.typeCode!=""'> <if test='par.typeCode!=null and par.typeCode!=""'>
...@@ -164,7 +164,7 @@ ...@@ -164,7 +164,7 @@
COUNT(a.sequence_nbr) num COUNT(a.sequence_nbr) num
FROM cb_fire_team a FROM cb_fire_team a
where a.is_delete=0 and a.longitude is not null and a.latitude is not null where a.is_delete=0 and a.longitude is not null and a.latitude is not null
<if test='par.typeCode==null'> <if test='par.typeCode==null or par.typeCode== ""'>
and a.type_code in (116,830) and a.type_code in (116,830)
</if> </if>
<if test='par.typeCode!=null and par.typeCode!=""'> <if test='par.typeCode!=null and par.typeCode!=""'>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
a.alert_status, a.alert_status,
CASE a.response_level_code CASE a.response_level_code
WHEN '1164' THEN '紧急出动' WHEN '1164' THEN '紧急出动'
WHEN '1165' THEN '紧急集结' WHEN '1165' THEN '集结待命'
WHEN '1166' THEN '原地待命' WHEN '1166' THEN '原地待命'
ELSE '' END responseLevelCode ELSE '' END responseLevelCode
FROM jc_alert_called a FROM jc_alert_called a
......
...@@ -3068,8 +3068,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -3068,8 +3068,13 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
}); });
FirefightersPost firefightersPost = peopleInfoDto.getPostEduDtoObj().getFirefightersPost(); FirefightersPost firefightersPost = peopleInfoDto.getPostEduDtoObj().getFirefightersPost();
PeopleBasicInfoDto firefighters = peopleInfoDto.getFirefighters();
String s2 = JSONObject.toJSONString(firefighters);
Map map2 = JSONObject.parseObject(s2, Map.class);
String s = JSONObject.toJSONString(firefightersPost); String s = JSONObject.toJSONString(firefightersPost);
Map map1 = JSONObject.parseObject(s, Map.class); Map map1 = JSONObject.parseObject(s, Map.class);
map1.putAll(map2);
dynamicFormValue.forEach(dynamicFormInstanceDto -> { dynamicFormValue.forEach(dynamicFormInstanceDto -> {
String key = dynamicFormInstanceDto.getFieldCode(); String key = dynamicFormInstanceDto.getFieldCode();
...@@ -3111,17 +3116,27 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp ...@@ -3111,17 +3116,27 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
dynamicFormInstance.setFieldValueLabel(dataDictionaryService.getById(dynamicFormInstance.getFieldValue()).getName()); dynamicFormInstance.setFieldValueLabel(dataDictionaryService.getById(dynamicFormInstance.getFieldValue()).getName());
} }
if ("positionType".equals(dynamicFormInstance.getFieldCode())){ if ("positionType".equals(dynamicFormInstance.getFieldCode())){
dynamicFormInstance.setFieldValueLabel(peopleInfoDto.getFirefighters().getJobTitle()); dynamicFormInstance.setFieldValueLabel(dataDictionaryService.getById(peopleInfoDto.getFirefighters().getJobTitleCode()).getName());
}
if ("administrativePositionCode".equals(dynamicFormInstance.getFieldCode())){
dynamicFormInstance.setFieldValueLabel(dataDictionaryService.getById(map1.get("administrativePositionCode").toString()).getName());
} }
String fieldCode = dynamicFormInstance.getFieldCode(); String fieldCode = dynamicFormInstance.getFieldCode();
if ("auditCycle".equals(dynamicFormInstance.getFieldCode())){
dynamicFormInstance.setFieldValue(map1.get(fieldCode).toString());
dynamicFormInstance.setFieldValueLabel(dataDictionaryService.getById(dynamicFormInstance.getFieldValue()).getName());
}
if ("certificateType".equals(dynamicFormInstance.getFieldCode())){
dynamicFormInstance.setFieldValue(map1.get(fieldCode).toString());
dynamicFormInstance.setFieldValueLabel(map1.get("certificateTypeCode").toString());
}
if (map1.containsKey(fieldCode) && fieldCode.contains("Code") ){ if (map1.containsKey(fieldCode) && fieldCode.contains("Code") ){
dynamicFormInstance.setFieldValue(map1.get(fieldCode).toString()); dynamicFormInstance.setFieldValue(map1.get(fieldCode).toString());
} }
if (map1.containsKey(fieldCode.substring(0,fieldCode.length()-4))){ if (map1.containsKey(fieldCode.substring(0,fieldCode.length()-4))){
dynamicFormInstance.setFieldValueLabel(map1.get(fieldCode.substring(0,fieldCode.length()-4)).toString()); dynamicFormInstance.setFieldValueLabel(map1.get(fieldCode.substring(0,fieldCode.length()-4)).toString());
} }
dynamicFormInstancelist.add(dynamicFormInstance); dynamicFormInstancelist.add(dynamicFormInstance);
}); });
......
...@@ -496,6 +496,7 @@ public class FirefightersController extends BaseController { ...@@ -496,6 +496,7 @@ public class FirefightersController extends BaseController {
} }
return ResponseHelper.buildResponse(iFirefightersService.updatePeopleById(firefighters, id)); return ResponseHelper.buildResponse(iFirefightersService.updatePeopleById(firefighters, id));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
throw new RuntimeException("系统异常"); throw new RuntimeException("系统异常");
} }
} }
......
...@@ -611,13 +611,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -611,13 +611,10 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
json=list!=null&&list.size()>0?JSONObject.toJSONString(map, SerializerFeature.PrettyFormat, json=list!=null&&list.size()>0?JSONObject.toJSONString(map, SerializerFeature.PrettyFormat,
SerializerFeature.WriteMapNullValue):""; SerializerFeature.WriteMapNullValue):"";
} }
//120系统暂时未对规则进行需求定义 且不需要作战指挥 暂时屏蔽对应mqtt及规则
if (!alertCalled.getAlertTypeCode().equals(AlertStageEnums.JJJQ.getCode())){
emqKeeper.getMqttClient().publish(topicData, json.getBytes(), RuleConfig.DEFAULT_QOS, false);
}
emqKeeper.getMqttClient().publish(topicData, json.getBytes(), RuleConfig.DEFAULT_QOS, false);
// 航空报警器报警通知 // 航空报警器报警通知
if (AlertStageEnums.HKJY.getCode().equals(alertCalled.getAlertTypeCode())) { if (AlertStageEnums.HKJY.getCode().equals(alertCalled.getAlertTypeCode())) {
List<String> flightNumber = powerTransferMapper.selectFlightNumber(AlertStageEnums.HKJY.getCode()); List<String> flightNumber = powerTransferMapper.selectFlightNumber(AlertStageEnums.HKJY.getCode());
...@@ -640,9 +637,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -640,9 +637,11 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
} }
// 警情报送 // 警情报送
// 调用规则 警情初报 // 调用规则 警情初报 //120系统暂时未对规则进行需求定义 且不需要作战指挥 暂时屏蔽对应mqtt及规则
ruleAlertCalledService.fireAlertCalledRule(alertCalledObjsDto, AlertBusinessTypeEnum.警情初报.getCode(), if (!alertCalled.getAlertTypeCode().equals(AlertStageEnums.JJJQ.getCode())){
null, null, null); ruleAlertCalledService.fireAlertCalledRule(alertCalledObjsDto, AlertBusinessTypeEnum.警情初报.getCode(),
null, null, null);
}
} }
// toSendCompletePoliceSituationMatch(alertCalled.getSequenceNbr()); // toSendCompletePoliceSituationMatch(alertCalled.getSequenceNbr());
return alertCalledObjsDto; return alertCalledObjsDto;
......
...@@ -9,6 +9,7 @@ import com.google.common.collect.Lists; ...@@ -9,6 +9,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo; import com.yeejoin.amos.boot.biz.common.bo.DepartmentBo;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams; import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.amos.boot.biz.common.utils.DateUtils;
import com.yeejoin.amos.component.feign.model.FeignClientResult; import com.yeejoin.amos.component.feign.model.FeignClientResult;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel; import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.CompanyModel; import com.yeejoin.amos.feign.privilege.model.CompanyModel;
...@@ -50,9 +51,12 @@ import org.springframework.data.domain.PageImpl; ...@@ -50,9 +51,12 @@ import org.springframework.data.domain.PageImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.utils.Bean; import org.typroject.tyboot.core.foundation.utils.Bean;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -1437,6 +1441,23 @@ public class CheckServiceImpl implements ICheckService { ...@@ -1437,6 +1441,23 @@ public class CheckServiceImpl implements ICheckService {
int score = 0; int score = 0;
int size = 0; int size = 0;
for (CheckInputParam item : list) { for (CheckInputParam item : list) {
//判断隐患整改期限不能小于整改日期 等于或大于不处理
item.getDangerList().forEach(e->{
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
String format = simpleDateFormat.format(new Date());
Date date = null;
try {
date = simpleDateFormat.parse(format);
} catch (ParseException parseException) {
parseException.printStackTrace();
}
int i = DateUtils.dateCompare(date, e.getReformLimitDate());
System.out.println(i);
if (DateUtils.dateCompare(date,e.getReformLimitDate()) > 0){
throw new BadRequest("整改期限不能在检查日期之前");
}
});
List<CheckShot> checkShots = new ArrayList<>(); List<CheckShot> checkShots = new ArrayList<>();
InputItem inputItem = inputItemDao.getOne(item.getInputItemId()); InputItem inputItem = inputItemDao.getOne(item.getInputItemId());
CheckInput checkInput = new CheckInput(); CheckInput checkInput = new CheckInput();
......
...@@ -619,7 +619,7 @@ ...@@ -619,7 +619,7 @@
) checkTime, ) checkTime,
p.error errorMsg p.error errorMsg
FROM p_point p FROM p_point p
where p.is_delete = 0 where p.is_delete = 0 and p.biz_org_code is not null
<if test="orgCode!=null"> and biz_org_code LIKE CONCAT( #{orgCode}, '%' )</if> <if test="orgCode!=null"> and biz_org_code LIKE CONCAT( #{orgCode}, '%' )</if>
<if test="level!=null"> and p.Level = #{level}</if> <if test="level!=null"> and p.Level = #{level}</if>
<if test="checkType!=null"> and p.catalog_id = #{checkType}</if> <if test="checkType!=null"> and p.catalog_id = #{checkType}</if>
......
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