Commit 46712f86 authored by litengwei's avatar litengwei

省测卡片问题

parent 4c1725a3
......@@ -52,9 +52,9 @@ public class IFireResourceSupervisionServiceImpl implements IFireResourceSupervi
private FireResourceStatsDTO buildFireResourceStatsDTO(Map<String, Object> resultMap) {
FireResourceStatsDTO fireResourceStats = new FireResourceStatsDTO();
fireResourceStats.setTotalCounts((long) resultMap.get("totalCount"));
fireResourceStats.setYellowCounts((long) resultMap.get("yellowCodeCount"));
fireResourceStats.setRedCounts((long) resultMap.get("redCodeCount"));
fireResourceStats.setTotalCounts(Long.valueOf(resultMap.get("totalCount").toString()));
fireResourceStats.setYellowCounts(Long.valueOf(resultMap.get("yellowCodeCount").toString()) );
fireResourceStats.setRedCounts(Long.valueOf(resultMap.get("redCodeCount").toString()));
long expCount = fireResourceStats.getYellowCounts() + fireResourceStats.getRedCounts();
double abnormalRatio = 0;
......
......@@ -2065,7 +2065,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
for (Map<String, Object> map : statics
) {
if(map.get("code").equals("xfxchgzb")) {
map.put("value",String.valueOf((hgdw / xcdw)*100));
map.put("value",String.valueOf((((double)hgdw / (double)xcdw)) *100));
}
}
}
......@@ -2080,7 +2080,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
for (Map<String, Object> map : statics
) {
if(map.get("code").equals("xfxclcl")) {
map.put("value",String.valueOf((lcdw / zxcdw)*100) );
map.put("value",String.valueOf((((double)lcdw / (double)zxcdw))*100) );
}
}
}
......
......@@ -5967,8 +5967,8 @@
<select id="selectCarStats" resultType="java.util.Map">
SELECT
COUNT(*) AS totalCount,
SUM(CASE WHEN wc.status = 1 then 1 else 0 end ) AS yellowCodeCount,
SUM(CASE WHEN wc.status = 2 then 1 else 0 end ) AS redCodeCount
SUM(CASE WHEN wc.equip_status = 1 then 1 else 0 end ) AS yellowCodeCount,
SUM(CASE WHEN wc.equip_status = 2 then 1 else 0 end ) AS redCodeCount
FROM
wl_car wc
LEFT JOIN wl_equipment wle ON wle.id = wc.equipment_id
......
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