Commit 9ba288e7 authored by litengwei's avatar litengwei

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

parents 75d3fb73 9f1a2896
......@@ -231,8 +231,8 @@ public class ConfigureController extends AbstractBaseController {
Page<Map<String, Object>> pressurePumpInfo = fireFightingSystemMapper.getPressurePumpInfo(page, bizOrgCode, null);
pressurePumpInfo.getRecords().stream().map(item -> {
item.put("startAndStopNum", 0);
item.put("update_time", "未知");
item.put("equipment_index_name", "未知");
item.put("update_time", "--");
item.put("equipment_index_name", "--");
String prefix = null;
String suffix = null;
String iotCode = item.get("iot_code").toString();
......@@ -279,10 +279,10 @@ public class ConfigureController extends AbstractBaseController {
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "消防给水3小稳压泵信息")
@GetMapping("/getPressurePumpInfo3Small")
public ResponseModel getPressurePumpInfo3Small() {
public ResponseModel getPressurePumpInfo3Small(@RequestParam(required = false) String systemCode) {
ReginParams reginParams = getSelectedOrgInfo();
String bizOrgCode = !ValidationUtil.isEmpty(reginParams.getPersonIdentity()) && StringUtil.isNotEmpty(reginParams.getPersonIdentity().getBizOrgCode()) ? reginParams.getPersonIdentity().getBizOrgCode() : null;
List<Map<String, Object>> pressurePumpInfo = fireFightingSystemMapper.getPressurePumpInfo3Small(bizOrgCode, null);
List<Map<String, Object>> pressurePumpInfo = fireFightingSystemMapper.getPressurePumpInfo3Small(bizOrgCode, systemCode);
Map<String, Integer> resultMap = new HashMap<>();
resultMap.put("total", pressurePumpInfo.size());
resultMap.put("normalNum", 0);
......@@ -290,8 +290,8 @@ public class ConfigureController extends AbstractBaseController {
pressurePumpInfo.stream().map(item -> {
item.put("startAndStopNum", 0);
item.put("update_time", "未知");
item.put("equipment_index_name", "未知");
item.put("update_time", "--");
item.put("equipment_index_name", "--");
String prefix = null;
String suffix = null;
String iotCode = item.get("iot_code").toString();
......@@ -325,13 +325,6 @@ public class ConfigureController extends AbstractBaseController {
item.put("stateDesc", (Integer) item.get("startAndStopNum") <= 1 ? "正常" : "异常");
resultMap.put("normalNum", (Integer) item.get("startAndStopNum") <= 1 ? (resultMap.get("normalNum") + 1) : resultMap.get("normalNum"));
resultMap.put("unNormalNum", (Integer) item.get("startAndStopNum") > 1 ? (resultMap.get("unNormalNum") + 1) : resultMap.get("unNormalNum"));
item.put("normalNum", (Integer) item.get("startAndStopNum") <= 1 ? 1 : 0);
item.put("unNormalNum", (Integer) item.get("startAndStopNum") <= 1 ? 0 : 1);
Map<String, String> stateMap = fireFightingSystemMapper.queryPressureNowStateBySpecificId((Long) item.get("id"));
if (!ObjectUtils.isEmpty(stateMap) && stateMap.containsKey("update_date") && stateMap.containsKey("equipment_index_name")) {
item.put("update_time", stateMap.get("update_date"));
item.put("equipment_index_name", stateMap.get("equipment_index_name"));
}
return item;
}).collect(Collectors.toList());
return CommonResponseUtil.success(resultMap);
......
......@@ -1350,10 +1350,11 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
@Override
public Map<String, Object> todayAlarmEquipment(String bizOrgCode) {
Map<String, Object> map = fireFightingSystemMapper.todayAlarmEquipment(bizOrgCode);
BigDecimal dayAbs = new BigDecimal(map.get("dayAbs").toString()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
map.put("dayAbs", dayAbs.toString());
map.put("dayAbs", dayAbs.toString().replace(".00", "") + "%");
BigDecimal monthAbs = new BigDecimal(map.get("monthAbs").toString()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
map.put("monthAbs", monthAbs.toString());
map.put("monthAbs", monthAbs.toString().replace(".00", "") + "%");
return map;
}
......@@ -1361,9 +1362,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public Map<String, Object> todayAlarmMessage(String bizOrgCode) {
Map<String, Object> map = fireFightingSystemMapper.todayAlarmMessage(bizOrgCode);
BigDecimal dayAbs = new BigDecimal(map.get("dayAbs").toString()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
map.put("dayAbs", dayAbs.toString());
map.put("dayAbs", dayAbs.toString().replace(".00", "") + "%");
BigDecimal monthAbs = new BigDecimal(map.get("monthAbs").toString()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
map.put("monthAbs", monthAbs.toString());
map.put("monthAbs", monthAbs.toString().replace(".00", "") + "%");
return map;
}
......@@ -1371,9 +1372,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public Map<String, Object> todayAlarmUnEliminateEquipment(String bizOrgCode) {
Map<String, Object> map = fireFightingSystemMapper.todayAlarmUnEliminateEquipment(bizOrgCode);
BigDecimal dayAbs = new BigDecimal(map.get("dayAbs").toString()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
map.put("dayAbs", dayAbs.toString());
map.put("dayAbs", dayAbs.toString().replace(".00", "") + "%");
BigDecimal monthAbs = new BigDecimal(map.get("monthAbs").toString()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
map.put("monthAbs", monthAbs.toString());
map.put("monthAbs", monthAbs.toString().replace(".00", "") + "%");
return map;
}
......@@ -1381,9 +1382,9 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
public Map<String, Object> todayAlarmUnEliminateMessage(String bizOrgCode) {
Map<String, Object> map = fireFightingSystemMapper.todayAlarmUnEliminateMessage(bizOrgCode);
BigDecimal dayAbs = new BigDecimal(map.get("dayAbs").toString()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
map.put("dayAbs", dayAbs.toString());
map.put("dayAbs", dayAbs.toString().replace(".00", "") + "%");
BigDecimal monthAbs = new BigDecimal(map.get("monthAbs").toString()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
map.put("monthAbs", monthAbs.toString());
map.put("monthAbs", monthAbs.toString().replace(".00", "") + "%");
return map;
}
......
......@@ -1178,9 +1178,8 @@ public class ExcelServiceImpl {
List<FireTeam> excelEntityList = new ArrayList<>();
excelDtoList.forEach(item -> {
if (StringUtils.isEmpty(item.getCompanyCode()) || StringUtils.isEmpty(item.getName()) ||
StringUtils.isEmpty(item.getTypeCode()) || StringUtils.isEmpty(item.getAddress()) ||
StringUtils.isEmpty(item.getLatitude()) || StringUtils.isEmpty(item.getLongitude())) {
if (StringUtils.isEmpty(item.getCompanyName()) || StringUtils.isEmpty(item.getName()) ||
StringUtils.isEmpty(item.getTypeCode()) || StringUtils.isEmpty(item.getAddress())) {
throw new BadRequest("请检查必填项是否为空");
}
FireTeam fireTeam = new FireTeam();
......
......@@ -2193,7 +2193,7 @@
and fs.biz_org_code like concat(#{bizOrgCode}, '%')
</if>
</where>
ORDER BY fs.sort
ORDER BY stateDesc
</select>
<select id="getEquipAlarmInfoNum" resultType="java.util.Map">
......@@ -2314,7 +2314,7 @@
'熄火'
END
),
'未知'
'--'
) AS `carState`,
IFNULL(
max(
......@@ -2386,7 +2386,7 @@
LEFT JOIN wl_equipment_index ei ON ei.equipment_id = ed.equipment_id
LEFT JOIN wl_equipment e ON e.id = ei.equipment_id
LEFT JOIN wl_equipment_category ec ON ec.id = e.category_id
LEFT JOIN f_fire_fighting_system fs ON fs.biz_org_code = r.biz_org_code
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET(fs.id,es.system_id)
WHERE
r.resource_type IN ( 'pool', 'industryPool' )
AND r.is_delete = 1
......@@ -2548,7 +2548,7 @@
es.id
FROM
wl_equipment_detail ed
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id and es.iot_code is not null
LEFT JOIN wl_warehouse_structure ws ON ws.id = es.warehouse_structure_id
WHERE
ed.`code` LIKE '92010800%'
......@@ -2576,11 +2576,15 @@
es.id
FROM
wl_equipment_detail ed
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id
LEFT JOIN wl_equipment_specific es ON es.equipment_detail_id = ed.id and es.iot_code is not null
LEFT JOIN wl_warehouse_structure ws ON ws.id = es.warehouse_structure_id
LEFT JOIN f_fire_fighting_system fs ON FIND_IN_SET(fs.id,es.system_id)
WHERE
ed.`code` LIKE '92010800%'
AND biz_org_code like concat(#{bizOrgCode}, '%')
AND es.biz_org_code like concat(#{bizOrgCode}, '%')
<if test="systemCode!=null and systemCode!=''">
AND fs.code = #{systemCode,jdbcType=VARCHAR}
</if>
</select>
<select id="exportEquipmentList" resultType="com.yeejoin.equipmanage.common.entity.vo.EquipmentExportVO">
SELECT
......
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