Commit 5c86ce9b authored by helinlin's avatar helinlin

Merge remote-tracking branch 'origin/developer' into developer

parents 610e5a84 c97706c5
......@@ -519,6 +519,7 @@ AND instance_id = (
jc_user_car
WHERE
car_id = #{carId}
and is_delete = 0
)
) and field_code='telephone'
) ss
......
......@@ -7,6 +7,7 @@ import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.runtime.directive.Break;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.foundation.utils.Bean;
......@@ -158,7 +159,16 @@ public class DutyFirstAidServiceImpl extends DutyCommonServiceImpl implements ID
}
resultList.add(detailMap);
});
result.add(resultList.get(0));
for (int i = 0; i < resultList.size(); i++) {
if (resultList.get(i).size() == 4){
result.add(resultList.get(i));
}
if (result.size()>0){
break;
}
}
return result;
}
......
......@@ -323,6 +323,7 @@ public class FailureDetailsServiceImpl extends BaseService<FailureDetailsDto, Fa
// 发起主表流程 并添加至报修日志
failureDetailsDto.setSubmissionTime(new Date());
failureDetailsDto.setCurrentStatus(FailureStatuEnum.WAITING_AUDIT.getCode());
FailureDetailsDto model = this.updateWithModel(failureDetailsDto);
if (ObjectUtils.isNotEmpty(failureDetailsDto.getAttachment())) {
......
......@@ -85,10 +85,15 @@ public class FailureVerifyServiceImpl extends BaseService<FailureVerifyDto, Fail
FailureDetailsDto failureDetailsDto = failureDetailsService.queryBySeq(model.getFaultId());
List<FailureVerify> byfaultId = findByfaultId(failureDetailsDto.getSequenceNbr());
if (byfaultId.size() != 0) {
if (byfaultId.size() != 0 && status.getCode().equals(FailureStatuEnum.FINISH.getCode())) {
failureDetailsDto.setCurrentStatus(status.getCode());
}
if (condition == AuditResultEnum.REFUSE.getCode()){
failureDetailsDto.setCurrentStatus(status.getCode());
}
failureDetailsDto.setSequenceNbr(model.getFaultId());
failureDetailsService.updateWithModel(failureDetailsDto);
......
......@@ -123,6 +123,7 @@ public class ConfirmAlarmServiceImpl extends ServiceImpl<ConfirmAlarmMapper, Equ
}
videoBySpeId.forEach(action -> {
action.setVedioFormat(vedioFormat);
action.setUrl(videoService.getVideoUrl(action.getName(), action.getPresetPosition(), action.getUrl(), action.getCode()));
});
res.put("data", specificAlarm);
......
......@@ -119,7 +119,7 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
equipmentDetail.setEquPropertyList(equPropertyList);
ManufacturerInfo manufacturerInfo = manufacturerInfoMapper.selectById(equipmentDetail.getManufacturerId());
if (manufacturerInfo != null) {
manufacturerInfo.setImg(fileServer + manufacturerInfo.getImg());
manufacturerInfo.setImg(manufacturerInfo.getImg());
}
equipmentDetail.setManufacturerInfo(manufacturerInfo);
equipmentDetail.setImg(getEquipFileList(id, FileTypeEnum.image.toString()));
......
......@@ -121,7 +121,11 @@ public class AircraftServiceImpl extends BaseService<AircraftDto, Aircraft, Airc
String aircraft = "";
List<AlertFormValue> list1 = list.stream().filter(formValue -> formValue.getFieldCode().equals("aircraft") || formValue.getFieldCode().equals("aircraftModel")).collect(Collectors.toList());
if(list1.size() > 0) {
aircraft = list1.get(0).getFieldValueCode();
if(ValidationUtil.isEmpty(list1.get(0).getFieldValue())) {
aircraft = list1.get(0).getFieldValue();
} else {
aircraft = list1.get(0).getFieldValueCode();
}
}
LambdaQueryWrapper<Aircraft> queryWrapper = new LambdaQueryWrapper<>();
......
......@@ -640,11 +640,19 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
/*
* if(null == valueCode) { valueCode = alertFormValue.getFieldValue(); }
*/
// if("flightNumber".equals(alertFormValue.getFieldCode()) || "aircraftModel".equals(alertFormValue.getFieldCode())) {
// listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), alertFormValue.getFieldValueCode()));
// } else {
listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), valueCode));
// }
if("flightNumber".equals(alertFormValue.getFieldCode())) {
listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), alertFormValue.getFieldValueCode()));
} else {
if( "aircraftModel".equals(alertFormValue.getFieldCode())) {
if(ValidationUtil.isEmpty(valueCode)) {
listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), alertFormValue.getFieldValueCode()));
} else {
listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), valueCode));
}
} else {
listdate.add(new KeyValueLabel(alertFormValue.getFieldName(), alertFormValue.getFieldCode(), valueCode));
}
}
});
map.put("data", listdate);
......
......@@ -1491,7 +1491,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
if (designatedDriver) {
// 发送单个车辆的信息数据到客户
smsParams.put("resourcesNum",
resourcesNum.toString().substring(resourcesNum.toString().length() - 2));
resourcesNum.toString());
List<AlertSubmittedObject> alertSubmittedObjectListSub = Lists.newArrayList();
Map<String, Object> map = dynamicFormInstanceMapper
.getCurentCarIsUserPhone(Long.parseLong(i.getResourcesId()));
......
......@@ -543,10 +543,10 @@ public class PowerTransferServiceImpl extends BaseService<PowerTransferDto, Powe
responseLevel = list1.get(0).getFieldValue();
}
definitions.put("rescueGrid", alertCalled.getAddress());
definitions.put("rescueGrid", ValidationUtil.isEmpty(alertCalled.getAddress() ) ? "" : alertCalled.getAddress());
definitions.put("type", alertCalled.getAlertType());
definitions.put("contactUser", alertCalled.getContactUser());
definitions.put("contactPhone", alertCalled.getContactPhone());
definitions.put("contactUser", ValidationUtil.isEmpty(alertCalled.getContactUser() ) ? "" : alertCalled.getContactUser());
definitions.put("contactPhone", ValidationUtil.isEmpty(alertCalled.getContactPhone() ) ? "" : alertCalled.getContactPhone());
definitions.put("replaceContent", replaceContent);
definitions.put("responseLevel", responseLevel);
definitions.put("callTime",
......
......@@ -632,23 +632,18 @@ ORDER BY
-- ----------------------------
DROP VIEW IF EXISTS `v_equip_alarm_today_statistics`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_equip_alarm_today_statistics` AS SELECT
count(
`confirm_type`
) AS `confirmed`,
(
count(1) - count(
`clean_time`
)
) AS `unCleaned`,
(
count(1) - count(
`confirm_type`
)
) AS `pending`
FROM
`wl_equipment_specific_alarm_log`
WHERE
(
cast(now() AS date) = cast(
`create_date` AS date
)
);
`wl_equipment_specific_alarm_log`;
-- ----------------------------
-- View structure for v_equip_fire_control_water
......@@ -674,10 +669,8 @@ SELECT
`sal`.`equipment_specific_index_key` AS `indexKey`,
`sal`.`equipment_specific_index_name` AS `indexName`,
`sal`.`equipment_specific_id` AS `specificId`,
concat(
sal.equipment_specific_name,
sal.equipment_specific_index_name
) AS alamReason,
IF
( `sal`.`clean_time` IS NOT NULL, '已消除', '未消除' ) `cleanStatus`,
`sal`.`iot_code` AS `iotCode`,
date_format(
`sal`.`create_date`,
......@@ -5794,27 +5787,153 @@ CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_equip
-- 火灾报警系统4小告警列表前60
DROP VIEW IF EXISTS `v_fire_equip_alarm_60list_alarm`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_alarm` AS select `sa`.`id` AS `id`,`ec`.`code` AS `mRid`,`sa`.`equipment_specific_name` AS `specificName`,`sa`.`equipment_specific_index_key` AS `indexKey`,`sa`.`equipment_specific_index_name` AS `indexName`,`sa`.`equipment_specific_id` AS `specificId`,concat(`sa`.`equipment_specific_name`,`sa`.`equipment_specific_index_name`) AS `alamReason`,`sa`.`iot_code` AS `iotCode`,`sa`.`create_date` AS `createDate` from (`wl_equipment_specific_alarm_log` `sa` left join `wl_equipment_specific` `ec` on((`sa`.`equipment_specific_id` = `ec`.`id`))) where find_in_set('029026401813010000000016',`sa`.`system_codes`) order by `sa`.`create_date` desc limit 60;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_alarm` AS SELECT
`sa`.`id` AS `id`,
`ec`.`code` AS `mRid`,
`sa`.`equipment_specific_name` AS `specificName`,
`sa`.`equipment_specific_index_key` AS `indexKey`,
`sa`.`equipment_specific_index_name` AS `indexName`,
`sa`.`equipment_specific_id` AS `specificId`,
IF
( `sa`.`clean_time` IS NOT NULL, '已消除', '未消除' ) `cleanStatus`,
`sa`.`iot_code` AS `iotCode`,
`sa`.`create_date` AS `createDate`
FROM
(
`wl_equipment_specific_alarm_log` `sa`
LEFT JOIN `wl_equipment_specific` `ec` ON ((
`sa`.`equipment_specific_id` = `ec`.`id`
)))
WHERE
find_in_set( '029026401813010000000016', `sa`.`system_codes` )
ORDER BY
`sa`.`create_date` DESC
LIMIT 60;
-- CAFS系统4小告警列表前60
DROP VIEW IF EXISTS `v_fire_equip_alarm_60list_cafs`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_cafs` AS select `sa`.`id` AS `id`,`ec`.`code` AS `mRid`,`sa`.`equipment_specific_name` AS `specificName`,`sa`.`equipment_specific_index_key` AS `indexKey`,`sa`.`equipment_specific_index_name` AS `indexName`,`sa`.`equipment_specific_id` AS `specificId`,concat(`sa`.`equipment_specific_name`,`sa`.`equipment_specific_index_name`) AS `alamReason`,`sa`.`iot_code` AS `iotCode`,`sa`.`create_date` AS `createDate` from (`wl_equipment_specific_alarm_log` `sa` left join `wl_equipment_specific` `ec` on((`sa`.`equipment_specific_id` = `ec`.`id`))) where find_in_set('029026401813010000000023',`sa`.`system_codes`) order by `sa`.`create_date` desc limit 60;
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_cafs` AS SELECT
`sa`.`id` AS `id`,
`ec`.`code` AS `mRid`,
`sa`.`equipment_specific_name` AS `specificName`,
`sa`.`equipment_specific_index_key` AS `indexKey`,
`sa`.`equipment_specific_index_name` AS `indexName`,
`sa`.`equipment_specific_id` AS `specificId`,
IF
( `sa`.`clean_time` IS NOT NULL, '已消除', '未消除' ) `cleanStatus`,
`sa`.`iot_code` AS `iotCode`,
`sa`.`create_date` AS `createDate`
FROM
(
`wl_equipment_specific_alarm_log` `sa`
LEFT JOIN `wl_equipment_specific` `ec` ON ((
`sa`.`equipment_specific_id` = `ec`.`id`
)))
WHERE
find_in_set( '029026401813010000000023', `sa`.`system_codes` )
ORDER BY
`sa`.`create_date` DESC
LIMIT 60;
-- 预混泡沫灭火系统4小告警列表前60
DROP VIEW IF EXISTS `v_fire_equip_alarm_60list_foam`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_foam` AS select `sa`.`id` AS `id`,`ec`.`code` AS `mRid`,`sa`.`equipment_specific_name` AS `specificName`,`sa`.`equipment_specific_index_key` AS `indexKey`,`sa`.`equipment_specific_index_name` AS `indexName`,`sa`.`equipment_specific_id` AS `specificId`,concat(`sa`.`equipment_specific_name`,`sa`.`equipment_specific_index_name`) AS `alamReason`,`sa`.`iot_code` AS `iotCode`,`sa`.`create_date` AS `createDate` from (`wl_equipment_specific_alarm_log` `sa` left join `wl_equipment_specific` `ec` on((`sa`.`equipment_specific_id` = `ec`.`id`))) where find_in_set('029026401813010000000054',`sa`.`system_codes`) order by `sa`.`create_date` desc limit 60;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_foam` AS SELECT
`sa`.`id` AS `id`,
`ec`.`code` AS `mRid`,
`sa`.`equipment_specific_name` AS `specificName`,
`sa`.`equipment_specific_index_key` AS `indexKey`,
`sa`.`equipment_specific_index_name` AS `indexName`,
`sa`.`equipment_specific_id` AS `specificId`,
IF
( `sa`.`clean_time` IS NOT NULL, '已消除', '未消除' ) `cleanStatus`,
`sa`.`iot_code` AS `iotCode`,
`sa`.`create_date` AS `createDate`
FROM
(
`wl_equipment_specific_alarm_log` `sa`
LEFT JOIN `wl_equipment_specific` `ec` ON ((
`sa`.`equipment_specific_id` = `ec`.`id`
)))
WHERE
find_in_set( '029026401813010000000054', `sa`.`system_codes` )
ORDER BY
`sa`.`create_date` DESC
LIMIT 60;
-- 细水雾涡扇炮系统4小告警列表前60
DROP VIEW IF EXISTS `v_fire_equip_alarm_60list_foam_mist`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_foam_mist` AS select `sa`.`id` AS `id`,`ec`.`code` AS `mRid`,`sa`.`equipment_specific_name` AS `specificName`,`sa`.`equipment_specific_index_key` AS `indexKey`,`sa`.`equipment_specific_index_name` AS `indexName`,`sa`.`equipment_specific_id` AS `specificId`,concat(`sa`.`equipment_specific_name`,`sa`.`equipment_specific_index_name`) AS `alamReason`,`sa`.`iot_code` AS `iotCode`,`sa`.`create_date` AS `createDate` from (`wl_equipment_specific_alarm_log` `sa` left join `wl_equipment_specific` `ec` on((`sa`.`equipment_specific_id` = `ec`.`id`))) where find_in_set('011023306003010000000082',`sa`.`system_codes`) order by `sa`.`create_date` desc limit 60;
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_foam_mist` AS SELECT
`sa`.`id` AS `id`,
`ec`.`code` AS `mRid`,
`sa`.`equipment_specific_name` AS `specificName`,
`sa`.`equipment_specific_index_key` AS `indexKey`,
`sa`.`equipment_specific_index_name` AS `indexName`,
`sa`.`equipment_specific_id` AS `specificId`,
IF
( `sa`.`clean_time` IS NOT NULL, '已消除', '未消除' ) `cleanStatus`,
`sa`.`iot_code` AS `iotCode`,
`sa`.`create_date` AS `createDate`
FROM
(
`wl_equipment_specific_alarm_log` `sa`
LEFT JOIN `wl_equipment_specific` `ec` ON ((
`sa`.`equipment_specific_id` = `ec`.`id`
)))
WHERE
find_in_set( '011023306003010000000082', `sa`.`system_codes` )
ORDER BY
`sa`.`create_date` DESC
LIMIT 60;
-- 排油系统4小告警列表前60
DROP VIEW IF EXISTS `v_fire_equip_alarm_60list_ONL`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_onl` AS select `sa`.`id` AS `id`,`ec`.`code` AS `mRid`,`sa`.`equipment_specific_name` AS `specificName`,`sa`.`equipment_specific_index_key` AS `indexKey`,`sa`.`equipment_specific_index_name` AS `indexName`,`sa`.`equipment_specific_id` AS `specificId`,concat(`sa`.`equipment_specific_name`,`sa`.`equipment_specific_index_name`) AS `alamReason`,`sa`.`iot_code` AS `iotCode`,`sa`.`create_date` AS `createDate` from (`wl_equipment_specific_alarm_log` `sa` left join `wl_equipment_specific` `ec` on((`sa`.`equipment_specific_id` = `ec`.`id`))) where find_in_set('029026401813010000000030',`sa`.`system_codes`) order by `sa`.`create_date` desc limit 60;
DROP VIEW IF EXISTS `v_fire_equip_alarm_60list_onl`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_onl` AS SELECT
`sa`.`id` AS `id`,
`ec`.`code` AS `mRid`,
`sa`.`equipment_specific_name` AS `specificName`,
`sa`.`equipment_specific_index_key` AS `indexKey`,
`sa`.`equipment_specific_index_name` AS `indexName`,
`sa`.`equipment_specific_id` AS `specificId`,
IF
( `sa`.`clean_time` IS NOT NULL, '已消除', '未消除' ) `cleanStatus`,
`sa`.`iot_code` AS `iotCode`,
`sa`.`create_date` AS `createDate`
FROM
(
`wl_equipment_specific_alarm_log` `sa`
LEFT JOIN `wl_equipment_specific` `ec` ON ((
`sa`.`equipment_specific_id` = `ec`.`id`
)))
WHERE
find_in_set( '029026401813010000000030', `sa`.`system_codes` )
ORDER BY
`sa`.`create_date` DESC
LIMIT 60;
-- 消防给水系统4小告警列表前60
DROP VIEW IF EXISTS `v_fire_equip_alarm_60list_water`;
CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_water` AS select `sa`.`id` AS `id`,`ec`.`code` AS `mRid`,`sa`.`equipment_specific_name` AS `specificName`,`sa`.`equipment_specific_index_key` AS `indexKey`,`sa`.`equipment_specific_index_name` AS `indexName`,`sa`.`equipment_specific_id` AS `specificId`,concat(`sa`.`equipment_specific_name`,`sa`.`equipment_specific_index_name`) AS `alamReason`,`sa`.`iot_code` AS `iotCode`,`sa`.`create_date` AS `createDate` from (`wl_equipment_specific_alarm_log` `sa` left join `wl_equipment_specific` `ec` on((`sa`.`equipment_specific_id` = `ec`.`id`))) where find_in_set('029026401813010000000047',`sa`.`system_codes`) order by `sa`.`create_date` desc limit 60;
CREATE ALGORITHM = UNDEFINED DEFINER = `root` @`%` SQL SECURITY DEFINER VIEW `v_fire_equip_alarm_60list_water` AS SELECT
`sa`.`id` AS `id`,
`ec`.`code` AS `mRid`,
`sa`.`equipment_specific_name` AS `specificName`,
`sa`.`equipment_specific_index_key` AS `indexKey`,
`sa`.`equipment_specific_index_name` AS `indexName`,
`sa`.`equipment_specific_id` AS `specificId`,
IF
( `sa`.`clean_time` IS NOT NULL, '已消除', '未消除' ) `cleanStatus`,
`sa`.`iot_code` AS `iotCode`,
`sa`.`create_date` AS `createDate`
FROM
(
`wl_equipment_specific_alarm_log` `sa`
LEFT JOIN `wl_equipment_specific` `ec` ON ((
`sa`.`equipment_specific_id` = `ec`.`id`
)))
WHERE
find_in_set( '029026401813010000000047', `sa`.`system_codes` )
ORDER BY
`sa`.`create_date` DESC
LIMIT 60;
-- 消防人员视图
DROP VIEW IF EXISTS `v_fire_fighter`;
......
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