2a158411 张雷

运营分析专题修改

1 个父辈 70cbeeb7
......@@ -20,6 +20,9 @@ public interface ReportConstant {
//供水日报
public static final String view6643 = "6643ef559d863f57de5fd33220c773c4";
//周报
public static final String view30a8 = "30a80f54ff288ede9d2df2ddd073b6c3";
//药剂字段
public static final String fieldYj = "PAMZ,PAMF,PAMRJ,SCLPAMZ,SCLPAMF,NACLO,PACGT,PACYT,PFS,FHTY,RYXNJ," +
"YWL,GXCLJ,CH3COONA,HXT,FECL3,SH,CH3COOH,FESO4G,FESO4Y,H2O2";
......
......@@ -25,7 +25,7 @@ public interface FactoryOperateCenterMapper {
List<Map<String, Object>> getFlowData(@Param("departId") String departId, @Param("month") String month);
List<Map<String, String>> getReportCount(@Param("departId") String departId, @Param("month") String month,
List<Map<String, Object>> getReportCount(@Param("departId") String departId, @Param("month") String month,
@Param("reportName") String reportName);
@Anonymous
......
......@@ -121,12 +121,15 @@
<select id="getReportCount" resultType="java.util.HashMap">
SELECT
time
v.time
FROM
${reportName}
${reportName} v
WHERE
depart_id = #{departId}
AND time LIKE CONCAT(#{month},'%')
v.depart_id in
<foreach item="item" index="index" collection="departId.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
AND v.time LIKE CONCAT(#{month},'%')
</select>
<select id="getSdyData" resultType="java.util.HashMap">
......
......@@ -300,10 +300,14 @@ public class FactoryOperateCenterServiceImpl implements IFactoryOperateCenterSer
double ndmb = 100;int ndmbd = 1;int ndmbs = 1;
double scyb = 100;int scybd = 1;int scybs = 1;
double zhf = 100;
List<Map<String,String>> nhList = factoryOperateCenterMapper.getReportCount(departId,month,"view_3a24");//能耗日报表
List<Map<String,String>> yyzbList = factoryOperateCenterMapper.getReportCount(departId,month,"view_30a8");//运营周报表
List<Map<String,String>> scybList = factoryOperateCenterMapper.getReportCount(departId,month,"view_4411");//月度生产数据报表
List<Map<String,String>> hyList = factoryOperateCenterMapper.getReportCount(departId,month,"view_9bff");//化验数据日报表
String dataViewName3a24 = ReportViewUtil.buildViewLike(ReportConstant.view3a24,"", departId, month);
List<Map<String,Object>> nhList = factoryOperateCenterMapper.getReportCount(departId,month,dataViewName3a24);//能耗日报表
String dataViewName30a8 = ReportViewUtil.buildViewLike(ReportConstant.view30a8,"", departId, month);
List<Map<String,Object>> yyzbList = factoryOperateCenterMapper.getReportCount(departId,month,dataViewName30a8);//运营周报表
String dataViewName4411 = ReportViewUtil.buildViewLike(ReportConstant.view4411,"", departId, month);
List<Map<String,Object>> scybList = factoryOperateCenterMapper.getReportCount(departId,month,dataViewName4411);//月度生产数据报表
String dataViewName9bff = ReportViewUtil.buildViewLike(ReportConstant.view9bff,"", departId, month);
List<Map<String,Object>> hyList = factoryOperateCenterMapper.getReportCount(departId,month,dataViewName9bff);//化验数据日报表
//能耗报表
nhd = nhList.size();
nh = DoubleOperaUtils.bigDecimalRound((100*nhd)/dayCount,0);
......
......@@ -26,6 +26,11 @@ public class NFDataSyncJob implements Job {
@Autowired
private IReportDataService reportDataService;
//污水水质
private static String wsFields = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS";
//供水指标
private static String gsFields = "GSL,YSSD,CCSWD,YSWD,CCSPH,YSPH,CCSAD,YSAD,CCSHYL,YSHYL,CCSSD," +
"YSNRDCGJQ,CCSRYHT,YSRYHT,CCSNRDCGJQ,CCSZDCGJQ,CCSJLZS,YSZDCGJQ,YSJLZS,CCSRYKJD,YSRYKJD,CCSCHW,YSCHW,CCSHZD,YSHZD";
/**
* 若参数变量名修改 QuartzJobController中也需对应修改
......@@ -61,14 +66,17 @@ public class NFDataSyncJob implements Job {
data.put("reportId", ReportConstant.view2119);
reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view2119);
}else if("hyrb".equals(itemType)){
String indexs = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS";
if(indexs.indexOf(itemCode) > 0){
if(wsFields.indexOf(itemCode) > 0){
data.put(itemCode+"HY", itemValue);
data.put("reportId", ReportConstant.view9bff);
reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view9bff);
}else if(gsFields.indexOf(itemCode) > 0){
data.put(itemCode, itemValue);
data.put("reportId", ReportConstant.view6643);
reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view6643);
}else{
data.put(itemCode, itemValue);
}
data.put("reportId", ReportConstant.view9bff);
reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view9bff);
}else {
log.info("恩菲【"+itemType+"】类型数据未进行数据同步");
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!