2f319ed0 张雷

运营分析专题修改

1 个父辈 2a158411
......@@ -31,4 +31,8 @@ public interface FactoryOperateCenterMapper {
@Anonymous
Map<String, Object> getSdyData(@Param("view2119") String view2119, @Param("view3a24") String view3a24,
@Param("departId") String departId, @Param("dateTime") String dateTime);
List<Map<String, Object>> getDfList(@Param("departId") String departId, @Param("month") String month);
List<Map<String, Object>> getMbList(@Param("departId") String departId, @Param("year") String year);
}
......
......@@ -148,4 +148,22 @@
ON v.depart_id = v3.depart_id
where v.depart_id = #{departId} and v.time like CONCAT(#{dateTime},'%')
</select>
<select id="getDfList" resultType="java.util.HashMap">
select * from report_electric_cost
where depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
AND month = #{month}
</select>
<select id="getMbList" resultType="java.util.HashMap">
select * from report_target_config
where depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
AND target_year = #{year}
</select>
</mapper>
......
......@@ -326,6 +326,9 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer
hyMap.put("should",dayCount);
//电费报表
map.put("df",new HashMap<>());
List<Map<String,Object>> dfList = factoryOperateCenterMapper.getDfList(departId, month);
dfd = dfList.size();
df = DoubleOperaUtils.bigDecimalRound((100*dfd)/dfs,0);
Map<String, Object> dfMap = new HashMap<>();
dfMap.put("bfb",df);
dfMap.put("done",dfd);
......@@ -340,6 +343,10 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer
yyzbMap.put("should",yyzbs);
//年度目标报表
map.put("ndmb",new HashMap<>());
String year = month.split("-")[0];
List<Map<String,Object>> mbList = factoryOperateCenterMapper.getMbList(departId, year);
ndmbd = mbList.size();
ndmb = DoubleOperaUtils.bigDecimalRound((100*ndmbd)/ndmbs,0);
Map<String, Object> ndmbMap = new HashMap<>();
ndmbMap.put("bfb",ndmb);
ndmbMap.put("done",ndmbd);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!