920eab55 张雷

首页接口BUG修改

1 个父辈 6946f063
......@@ -22,7 +22,9 @@ public interface ScreenMapper {
@Param("TbstartTime") String TbstartTime, @Param("TbendTime") String TbendTime,
@Param("timeType") String timeType);
List<Map<String, Object>> getYhdlqs(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("departIds") String departIds);
List<Map<String, Object>> getYhdlqs(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("departIds") String departIds,
@Param("dataViewName3a24") String dataViewName3a24, @Param("dataViewName2119") String dataViewName2119);
List<Map<String, Object>> getYhylqs(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("departIds") String departIds);
List<Map<String, Object>> getYhylqs(@Param("startDate") String startDate, @Param("endDate") String endDate, @Param("departIds") String departIds,
@Param("dataViewName3a24") String dataViewName3a24, @Param("dataViewName2119") String dataViewName2119);
}
......
......@@ -61,16 +61,16 @@
v2.clsl,
ROUND(SUM( v3.DLHJ )/v2.clsl,4) AS dsdh
FROM
view_3a24 v3
${dataViewName3a24} v3
LEFT JOIN
( SELECT
LEFT( time, 7) time,SUM(CSL) clsl FROM view_2119
WHERE time &gt;= #{startDate} AND time &lt;= #{endDate}
AND depart_id in
LEFT( v2119.time, 7) time,ROUND(SUM(v2119.CSL),4) AS clsl FROM ${dataViewName2119} v2119
WHERE v2119.time &gt;= #{startDate} AND v2119.time &lt;= #{endDate}
AND v2119.depart_id in
<foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
GROUP BY LEFT(time, 7) ) v2
GROUP BY LEFT(v2119.time, 7) ) v2
ON v2.time = LEFT( v3.time, 7 )
WHERE v3.time &gt;= #{startDate} AND v3.time &lt;= #{endDate}
AND v3.depart_id in
......@@ -90,16 +90,16 @@
+ SUM( v3.HXT ) + SUM( v3.FECL3 ) + SUM( v3.SH ) + SUM( v3.CH3COOH ) + SUM( v3.FESO4G ) + SUM( v3.FESO4Y )
+ SUM( v3.H2O2 ) ) / v2.clsl, 4 ) AS dsyh
FROM
view_3a24 v3
${dataViewName3a24} v3
LEFT JOIN
( SELECT
LEFT( time, 7) time,SUM(CSL) clsl FROM view_2119
WHERE time &gt;= #{startDate} AND time &lt;= #{endDate}
AND depart_id in
LEFT( v2119.time, 7) time,SUM(v2119.CSL) clsl FROM ${dataViewName2119} v2119
WHERE v2119.time &gt;= #{startDate} AND v2119.time &lt;= #{endDate}
AND v2119.depart_id in
<foreach item="item" index="index" collection="departIds.split(',')" open="(" separator="," close=")">
'${item}'
</foreach>
GROUP BY LEFT(time, 7) ) v2
GROUP BY LEFT(v2119.time, 7) ) v2
ON v2.time = LEFT( v3.time, 7 )
WHERE v3.time &gt;= #{startDate} AND v3.time &lt;= #{endDate}
AND v3.depart_id in
......
package com.skua.modules.threedimensional.service.impl;
import com.skua.common.report.ReportViewUtil;
import com.skua.core.service.IFactoryInfoService;
import com.skua.core.util.DateUtils;
import com.skua.modules.flow.utils.StringUtil;
......@@ -204,20 +205,23 @@ public class ScreenDataServiceImpl implements IScreenDataService {
@Override
public List<Map<String, Object>> factorySLQS(String departId,String startTime, String endTime, String TbstartTime, String TbendTime,
String timeType) {
return screenMapper.factorySLQS( departId,startTime, endTime, TbstartTime, TbendTime,
timeType);
}
@Override
public List<Map<String, Object>> getYhdlqs(StatisticsParams statisticsParams) {
String view2119 = "2119ecbf53a1d2d0708258ff67cfd9e1";
String view3a24 = "3a243d5715b9e1a3753c180872ca0df9";
List<Map<String, Object>> list = new ArrayList<>();
String startDate = statisticsParams.getStartDate();
String endDate = statisticsParams.getEndDate();
String departIds = statisticsParams.getDepartIds();
Map<String, Object> valueMap = new HashMap<>();
List<String> monthList = getMonthsBetween(startDate,endDate);
List<Map<String, Object>> dataList = screenMapper.getYhdlqs(startDate,endDate,departIds);
String dataViewName3a24 = ReportViewUtil.buildView(view3a24, "DLHJ", departIds, startDate, endDate);
String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", departIds, startDate, endDate);
List<Map<String, Object>> dataList = screenMapper.getYhdlqs(startDate,endDate,departIds,dataViewName3a24,dataViewName2119);
if(dataList.size()>0){
for (Map<String, Object> vMap : dataList) {
valueMap.put(vMap.get("time").toString(),vMap);
......@@ -252,13 +256,19 @@ public class ScreenDataServiceImpl implements IScreenDataService {
@Override
public List<Map<String, Object>> getYhylqs(StatisticsParams statisticsParams) {
String view2119 = "2119ecbf53a1d2d0708258ff67cfd9e1";
String view3a24 = "3a243d5715b9e1a3753c180872ca0df9";
List<Map<String, Object>> list = new ArrayList<>();
String startDate = statisticsParams.getStartDate();
String endDate = statisticsParams.getEndDate();
String departIds = statisticsParams.getDepartIds();
Map<String, Object> valueMap = new HashMap<>();
List<String> monthList = getMonthsBetween(startDate,endDate);
List<Map<String, Object>> dataList = screenMapper.getYhylqs(startDate,endDate,departIds);
String field3a24 = "PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ," +
"YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2";
String dataViewName3a24 = ReportViewUtil.buildView(view3a24, field3a24, departIds, startDate, endDate);
String dataViewName2119 = ReportViewUtil.buildView(view2119,"CSL", departIds, startDate, endDate);
List<Map<String, Object>> dataList = screenMapper.getYhylqs(startDate,endDate,departIds,dataViewName3a24,dataViewName2119);
if(dataList.size()>0){
for (Map<String, Object> vMap : dataList) {
valueMap.put(vMap.get("time").toString(),vMap);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!