96935328 康伟

kangwei: 运营季报修改支持月度数据的查询

1 个父辈 99e8b571
...@@ -88,11 +88,12 @@ public class OperationDailyController { ...@@ -88,11 +88,12 @@ public class OperationDailyController {
88 dataMap = commonSqlService.queryForMap(sql); 88 dataMap = commonSqlService.queryForMap(sql);
89 operationDailyVO.setIncreaseDsdh(JSUtils.subtract(operationDailyVO.getDsdh(), dataMap.get("dsdh"))); 89 operationDailyVO.setIncreaseDsdh(JSUtils.subtract(operationDailyVO.getDsdh(), dataMap.get("dsdh")));
90 90
91
91 // 5 污泥脱水公司 92 // 5 污泥脱水公司
92 dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24,"WNL", departIds, previousDay,previousDay); 93 dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24,"WNL", departIds, previousDay,previousDay);
93 sql = " select GROUP_CONCAT( d.depart_name SEPARATOR ',' ) AS depart_name from "+dataViewName3a24+ " aaa left join sys_depart d on d.id = aaa.depart_id where ifnull(aaa.WNL,0) = 0"; 94 sql = " select GROUP_CONCAT( d.depart_name SEPARATOR ',' ) AS depart_name from "+dataViewName3a24+ " aaa left join sys_depart d on d.id = aaa.depart_id where ifnull(aaa.WNL,0) = 0";
94 dataMap = commonSqlService.queryForMap(sql); 95 dataMap = commonSqlService.queryForMap(sql);
95 operationDailyVO.setWnDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无") ); 96 operationDailyVO.setWnDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无").replaceAll(",",",") );
96 97
97 // 6 污泥浓度公司 98 // 6 污泥浓度公司
98 String dataViewName9bff = ReportViewUtil.buildView(ReportConstant.view9bff,"AYHGMLSS,BYHGMLSS,CYHGMLSS,DYHGMLSS,EYHGMLSS,FYHGMLSS", departIds, dateTIme,dateTIme); 99 String dataViewName9bff = ReportViewUtil.buildView(ReportConstant.view9bff,"AYHGMLSS,BYHGMLSS,CYHGMLSS,DYHGMLSS,EYHGMLSS,FYHGMLSS", departIds, dateTIme,dateTIme);
...@@ -108,7 +109,7 @@ public class OperationDailyController { ...@@ -108,7 +109,7 @@ public class OperationDailyController {
108 sql += " left join sys_factory_info bbb on bbb.depart_id = aaa.depart_id ) ccc "; 109 sql += " left join sys_factory_info bbb on bbb.depart_id = aaa.depart_id ) ccc ";
109 sql += " left join sys_depart d on ccc.depart_id = d.id where ccc.result = 1"; 110 sql += " left join sys_depart d on ccc.depart_id = d.id where ccc.result = 1";
110 dataMap = commonSqlService.queryForMap(sql); 111 dataMap = commonSqlService.queryForMap(sql);
111 operationDailyVO.setMlssDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无") ); 112 operationDailyVO.setMlssDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无").replaceAll(",",",") );
112 113
113 // 7 进水超标公司 114 // 7 进水超标公司
114 // JSZL,JSCOD,JSAD,JSZD,JSPH 115 // JSZL,JSCOD,JSAD,JSZD,JSPH
...@@ -127,7 +128,7 @@ public class OperationDailyController { ...@@ -127,7 +128,7 @@ public class OperationDailyController {
127 sql += ") bbb on bbb.depart_id = aaa.depart_id "; 128 sql += ") bbb on bbb.depart_id = aaa.depart_id ";
128 sql += " ) ccc left join sys_depart d on ccc.depart_id = d.id where ccc.result = 1"; 129 sql += " ) ccc left join sys_depart d on ccc.depart_id = d.id where ccc.result = 1";
129 dataMap = commonSqlService.queryForMap(sql); 130 dataMap = commonSqlService.queryForMap(sql);
130 operationDailyVO.setJsDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无") ); 131 operationDailyVO.setJsDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无").replaceAll(",",",") );
131 // 8 出水超标部门 132 // 8 出水超标部门
132 dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,ReportConstant.field_2119_CS, departIds, dateTIme,dateTIme); 133 dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,ReportConstant.field_2119_CS, departIds, dateTIme,dateTIme);
133 sql = " select ifnull(GROUP_CONCAT(d.depart_name),'无') depart_name from ( select aaa.depart_id,"; 134 sql = " select ifnull(GROUP_CONCAT(d.depart_name),'无') depart_name from ( select aaa.depart_id,";
...@@ -144,15 +145,15 @@ public class OperationDailyController { ...@@ -144,15 +145,15 @@ public class OperationDailyController {
144 sql += " ) bbb on bbb.depart_id = aaa.depart_id "; 145 sql += " ) bbb on bbb.depart_id = aaa.depart_id ";
145 sql += " ) ccc left join sys_depart d on ccc.depart_id = d.id where ccc.result = 1"; 146 sql += " ) ccc left join sys_depart d on ccc.depart_id = d.id where ccc.result = 1";
146 dataMap = commonSqlService.queryForMap(sql); 147 dataMap = commonSqlService.queryForMap(sql);
147 operationDailyVO.setCsDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无") ); 148 operationDailyVO.setCsDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无").replaceAll(",",",") );
148 // 9 电耗超标公司 149 // 9 电耗超标公司
149 dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", departIds, dateTIme,dateTIme); 150 dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119,"CSL", departIds, dateTIme,dateTIme);
150 dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ", departIds, dateTIme,dateTIme); 151 dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24,"DLHJ", departIds, dateTIme,dateTIme);
151 sql ="select GROUP_CONCAT(d.depart_name,',') depart_name from "+dataViewName3a24+ " aaa left join "+dataViewName2119+ " bbb on aaa.depart_id = bbb.depart_id and aaa.time = bbb.time "; 152 sql ="select GROUP_CONCAT(d.depart_name) depart_name from "+dataViewName3a24+ " aaa left join "+dataViewName2119+ " bbb on aaa.depart_id = bbb.depart_id and aaa.time = bbb.time ";
152 sql += " left join report_target_config rtc on rtc.depart_id = aaa.depart_id and rtc.target_year = "+DateUtils.getDateYear(dateTIme); 153 sql += " left join report_target_config rtc on rtc.depart_id = aaa.depart_id and rtc.target_year = "+DateUtils.getDateYear(dateTIme);
153 sql += " left join sys_depart d on d.id = aaa.depart_id where (aaa.DLHJ/bbb.CSL ) > ifnull(rtc.target_power,999999999.99)"; 154 sql += " left join sys_depart d on d.id = aaa.depart_id where (aaa.DLHJ/bbb.CSL ) > ifnull(rtc.target_power,999999999.99)";
154 dataMap = commonSqlService.queryForMap(sql); 155 dataMap = commonSqlService.queryForMap(sql);
155 operationDailyVO.setDhDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无") ); 156 operationDailyVO.setDhDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无").replaceAll(",",",") );
156 //10 药剂单耗公司 157 //10 药剂单耗公司
157 dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24,ReportConstant.fieldYj, departIds, dateTIme,dateTIme); 158 dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24,ReportConstant.fieldYj, departIds, dateTIme,dateTIme);
158 159
...@@ -184,7 +185,7 @@ public class OperationDailyController { ...@@ -184,7 +185,7 @@ public class OperationDailyController {
184 sql += " left join report_target_config rtc on rtc.depart_id = aa.depart_id and rtc.target_year = '"+ DateUtils.getDateYear(dateTIme)+"'"; 185 sql += " left join report_target_config rtc on rtc.depart_id = aa.depart_id and rtc.target_year = '"+ DateUtils.getDateYear(dateTIme)+"'";
185 sql += " ) ccc left join sys_depart d on d.id = ccc.depart_id where ccc.result =1 "; 186 sql += " ) ccc left join sys_depart d on d.id = ccc.depart_id where ccc.result =1 ";
186 dataMap = commonSqlService.queryForMap(sql); 187 dataMap = commonSqlService.queryForMap(sql);
187 operationDailyVO.setYhDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无") ); 188 operationDailyVO.setYhDepartName( ConvertUtils.getString(dataMap.get("depart_name"),"无").replaceAll(",",",") );
188 189
189 if("1818215543140909056".equals(departId)){ 190 if("1818215543140909056".equals(departId)){
190 String dataViewName6643 = ReportViewUtil.buildView(ReportConstant.view6643,"GSL", departIds, dateTIme,dateTIme); 191 String dataViewName6643 = ReportViewUtil.buildView(ReportConstant.view6643,"GSL", departIds, dateTIme,dateTIme);
...@@ -200,4 +201,5 @@ public class OperationDailyController { ...@@ -200,4 +201,5 @@ public class OperationDailyController {
200 return operationDailyVO; 201 return operationDailyVO;
201 } 202 }
202 203
204
203 } 205 }
......
...@@ -37,10 +37,12 @@ public class OperationReportController { ...@@ -37,10 +37,12 @@ public class OperationReportController {
37 public Result<ProductDataVO> reportDataInfo( 37 public Result<ProductDataVO> reportDataInfo(
38 @RequestParam(name="year") Integer year, 38 @RequestParam(name="year") Integer year,
39 @RequestParam(name="season") Integer season, 39 @RequestParam(name="season") Integer season,
40 @RequestParam(name="startDate") String startDate,
41 @RequestParam(name="endDate") String endDate,
40 HttpServletRequest req) { 42 HttpServletRequest req) {
41 Result<ProductDataVO> result = new Result<ProductDataVO>(); 43 Result<ProductDataVO> result = new Result<ProductDataVO>();
42 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674 44 String departIds = BaseContextHandler.getDeparts();//1818214519948836864,1711662624459804674
43 ProductDataVO productDataVO = operationReportService.handeReportMonthData(departIds,year,season); 45 ProductDataVO productDataVO = operationReportService.handeReportMonthData(departIds,year,season,startDate,endDate);
44 result.setResult( productDataVO ); 46 result.setResult( productDataVO );
45 return result; 47 return result;
46 } 48 }
......
...@@ -13,5 +13,5 @@ public interface IOperationReportService { ...@@ -13,5 +13,5 @@ public interface IOperationReportService {
13 * @param season 13 * @param season
14 * @return 14 * @return
15 */ 15 */
16 ProductDataVO handeReportMonthData(String departIds,Integer year, Integer season); 16 ProductDataVO handeReportMonthData(String departIds,Integer year, Integer season,String startDate,String endDate);
17 } 17 }
......
...@@ -44,7 +44,7 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -44,7 +44,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
44 * @param season 44 * @param season
45 * @return 45 * @return
46 */ 46 */
47 public ProductDataVO handeReportMonthData(String departId,Integer year, Integer season){ 47 public ProductDataVO handeReportMonthData(String departId,Integer year, Integer season,String startDate,String endDate){
48 ProductDataVO productDataVO = new ProductDataVO();//返回结果 48 ProductDataVO productDataVO = new ProductDataVO();//返回结果
49 int lastYear = year - 1;//去年 49 int lastYear = year - 1;//去年
50 productDataVO.setLastYear(lastYear); 50 productDataVO.setLastYear(lastYear);
...@@ -54,16 +54,23 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -54,16 +54,23 @@ public class OperationReportServiceImpl implements IOperationReportService {
54 productDataVO.setSeansonEndDay(seasonTimeVO.getEndTime());//季度最后一天 54 productDataVO.setSeansonEndDay(seasonTimeVO.getEndTime());//季度最后一天
55 productDataVO.setStartTime(seasonTimeVO.getStartTime());//季度开始时间 55 productDataVO.setStartTime(seasonTimeVO.getStartTime());//季度开始时间
56 productDataVO.setEndTime( seasonTimeVO.getEndTime());//季度结束时间 56 productDataVO.setEndTime( seasonTimeVO.getEndTime());//季度结束时间
57 if(StringUtils.isNotEmpty(startDate)){
58 productDataVO.setStartTime(startDate);//开始时间
59 }
60 if(StringUtils.isNotEmpty(endDate)){
61 productDataVO.setEndTime( endDate);//结束时间
62 }
63
57 //水务公司总数 64 //水务公司总数
58 String sql = "select count(1) from sys_depart where depart_type = 1 and id in ("+JSUtils.quoteEach(departId,",")+")"; 65 String sql = "select count(1) from sys_depart where depart_type = 1 and id in ("+JSUtils.quoteEach(departId,",")+")";
59 String deptartCount = getJdbcTemplate().queryForObject(sql,String.class); 66 String deptartCount = getJdbcTemplate().queryForObject(sql,String.class);
60 productDataVO.setDeptartCount( deptartCount ); 67 productDataVO.setDeptartCount( deptartCount );
61 68
62 long dayNum = DateUtils.differenceDay(seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime());//天数 69 long dayNum = DateUtils.differenceDay(productDataVO.getStartTime(),productDataVO.getEndTime());//天数
63 // String departId = BaseContextHandler.getDeparts(); 70 // String departId = BaseContextHandler.getDeparts();
64 productDataVO.setSequentialProgress("基本满足时序进度"); 71 productDataVO.setSequentialProgress("基本满足时序进度");
65 // ysfsl:月收费水量 ; yyf:月药费 ; ysjsl:月实际水量 72 // ysfsl:月收费水量 ; yyf:月药费 ; ysjsl:月实际水量
66 String dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysfsl,ysjsl,yyf", departId, seasonTimeVO.getStartTime(),seasonTimeVO.getEndTime()); 73 String dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysfsl,ysjsl,yyf", departId, productDataVO.getStartTime(),productDataVO.getEndTime());
67 sql = "select round(sum(aaa.ysfsl),2) 'ysfsl' , round(sum(aaa.yyf),2) 'yyf' ,round(sum(aaa.ysjsl),2) 'ysjsl' from "+ dataViewName4411 + " aaa"; 74 sql = "select round(sum(aaa.ysfsl),2) 'ysfsl' , round(sum(aaa.yyf),2) 'yyf' ,round(sum(aaa.ysjsl),2) 'ysjsl' from "+ dataViewName4411 + " aaa";
68 String ysfsl = null;//月收费水量 ; 75 String ysfsl = null;//月收费水量 ;
69 String ysjsl = null;//月实际水量; 76 String ysjsl = null;//月实际水量;
...@@ -88,7 +95,7 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -88,7 +95,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
88 productDataVO.setSequentialProgress("超额完成时序进度"); 95 productDataVO.setSequentialProgress("超额完成时序进度");
89 } 96 }
90 /****************去年同期数据处理************************/ 97 /****************去年同期数据处理************************/
91 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysfsl,ysjsl,yyf", departId, DateUtils.getTbDate(seasonTimeVO.getStartTime()), DateUtils.getTbDate(seasonTimeVO.getEndTime())); 98 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysfsl,ysjsl,yyf", departId, DateUtils.getTbDate(productDataVO.getStartTime()), DateUtils.getTbDate(productDataVO.getEndTime()));
92 sql = "select sum(aaa.ysfsl) 'ysfsl' , sum(aaa.yyf) 'yyf' ,sum(aaa.ysjsl) 'ysjsl' from "+ dataViewName4411 + " aaa"; 99 sql = "select sum(aaa.ysfsl) 'ysfsl' , sum(aaa.yyf) 'yyf' ,sum(aaa.ysjsl) 'ysjsl' from "+ dataViewName4411 + " aaa";
93 String ysfslTB = null;//月收费水量 ; 100 String ysfslTB = null;//月收费水量 ;
94 String ysjslTB = null;//月实际水量; 101 String ysjslTB = null;//月实际水量;
...@@ -100,12 +107,12 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -100,12 +107,12 @@ public class OperationReportServiceImpl implements IOperationReportService {
100 String expression = " 100 * ( "+ysfsl+" - "+ysfslTB+")/ "+ysfslTB; 107 String expression = " 100 * ( "+ysfsl+" - "+ysfslTB+")/ "+ysfslTB;
101 productDataVO.setChargeWaterRatio(JSUtils.executeExpression(expression,"0")); 108 productDataVO.setChargeWaterRatio(JSUtils.executeExpression(expression,"0"));
102 109
103 productDataVO.setAvgYsjslWaterVolume(JSUtils.divide(ysjsl,DateUtils.differenceDay(DateUtils.getTbDate(seasonTimeVO.getStartTime()),DateUtils.getTbDate(seasonTimeVO.getEndTime()))));//实际处理水量-日均值 110 productDataVO.setAvgYsjslWaterVolume(JSUtils.divide(ysjsl,DateUtils.differenceDay(DateUtils.getTbDate(productDataVO.getStartTime()),DateUtils.getTbDate(productDataVO.getEndTime()))));//实际处理水量-日均值
104 expression = " 100 * ( "+ysjsl+" - "+ysjslTB+")/ "+ysjslTB; 111 expression = " 100 * ( "+ysjsl+" - "+ysjslTB+")/ "+ysjslTB;
105 productDataVO.setYsjslWaterRatio( JSUtils.executeExpression(expression,"0"));//实际处理水量--同比增长 112 productDataVO.setYsjslWaterRatio( JSUtils.executeExpression(expression,"0"));//实际处理水量--同比增长
106 113
107 /***************** 实际水量同比下降水务公司原因分析一览表************************/ 114 /***************** 实际水量同比下降水务公司原因分析一览表************************/
108 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysjsl,tqysjsl,ysjsldyqntqyy", departId, seasonTimeVO.getStartTime(), seasonTimeVO.getEndTime()); 115 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ysjsl,tqysjsl,ysjsldyqntqyy", departId, productDataVO.getStartTime(), productDataVO.getEndTime());
109 sql = " select aaa.depart_id , d.depart_name departName, round(100*(sum(ifnull(aaa.ysjsl,0)) - sum(ifnull(aaa.tqysjsl,0)) )/ sum(ifnull(aaa.tqysjsl,0)),2) 'ratio', "; 116 sql = " select aaa.depart_id , d.depart_name departName, round(100*(sum(ifnull(aaa.ysjsl,0)) - sum(ifnull(aaa.tqysjsl,0)) )/ sum(ifnull(aaa.tqysjsl,0)),2) 'ratio', ";
110 sql += " round( sum(ifnull(aaa.ysjsl,0)),2 ) 'ysjsl' ,round( sum(ifnull(aaa.tqysjsl,0)),2 ) 'tqysjsl' ,GROUP_CONCAT(aaa.ysjsldyqntqyy SEPARATOR '') 'causeAnalysis' from "+ dataViewName4411+" aaa"; 117 sql += " round( sum(ifnull(aaa.ysjsl,0)),2 ) 'ysjsl' ,round( sum(ifnull(aaa.tqysjsl,0)),2 ) 'tqysjsl' ,GROUP_CONCAT(aaa.ysjsldyqntqyy SEPARATOR '') 'causeAnalysis' from "+ dataViewName4411+" aaa";
111 sql += " left join sys_depart d on d.id = aaa.depart_id"; 118 sql += " left join sys_depart d on d.id = aaa.depart_id";
...@@ -114,7 +121,7 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -114,7 +121,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
114 productDataVO.setWaterDeptartList(waterMonthDataList); 121 productDataVO.setWaterDeptartList(waterMonthDataList);
115 122
116 //水电耗高于控制目标--水务公司列表 123 //水电耗高于控制目标--水务公司列表
117 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ydh,dhcmbzyy", departId, seasonTimeVO.getStartTime(), seasonTimeVO.getEndTime()); 124 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"ydh,dhcmbzyy", departId, productDataVO.getStartTime(), productDataVO.getEndTime());
118 sql = "select * from ( "; 125 sql = "select * from ( ";
119 sql += " select d.depart_name 'departName', aaa.depart_id , round(avg(aaa.ydh),2) realConsume , IFNULL(tc.target_power,2) 'targetConsume' ,GROUP_CONCAT(aaa.dhcmbzyy SEPARATOR '') 'causeAnalysis' from "+ dataViewName4411+" aaa";; 126 sql += " select d.depart_name 'departName', aaa.depart_id , round(avg(aaa.ydh),2) realConsume , IFNULL(tc.target_power,2) 'targetConsume' ,GROUP_CONCAT(aaa.dhcmbzyy SEPARATOR '') 'causeAnalysis' from "+ dataViewName4411+" aaa";;
120 sql += " left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year='2024')"; 127 sql += " left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year='2024')";
...@@ -125,7 +132,7 @@ public class OperationReportServiceImpl implements IOperationReportService { ...@@ -125,7 +132,7 @@ public class OperationReportServiceImpl implements IOperationReportService {
125 132
126 /** ysjsl:月实际水量 ; 月药耗 yyh; 去年同期药耗 qntqyh; 月药费 yyf;药耗高于去年同期原因 yhgyqntqyy;药耗超预期原因 yhcyqyy; 本年实际药耗 bnsjyh; 本年药耗目标 bnyhmb*/ 133 /** ysjsl:月实际水量 ; 月药耗 yyh; 去年同期药耗 qntqyh; 月药费 yyf;药耗高于去年同期原因 yhgyqntqyy;药耗超预期原因 yhcyqyy; 本年实际药耗 bnsjyh; 本年药耗目标 bnyhmb*/
127 //药剂成本高于控制目标--水务公司列表 134 //药剂成本高于控制目标--水务公司列表
128 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"yyh,yhcyqyy", departId, seasonTimeVO.getStartTime(), seasonTimeVO.getEndTime()); 135 dataViewName4411 = ReportViewUtil.buildView(ReportConstant.view4411,"yyh,yhcyqyy", departId, productDataVO.getStartTime(), productDataVO.getEndTime());
129 sql = "select * from ( "; 136 sql = "select * from ( ";
130 sql += " select d.depart_name 'departName', aaa.depart_id , round(avg(aaa.yyh),2) realConsume , IFNULL(tc.target_drug,2) 'targetConsume' ,GROUP_CONCAT(aaa.yhcyqyy SEPARATOR '') 'causeAnalysis' from "+ dataViewName4411+" aaa";; 137 sql += " select d.depart_name 'departName', aaa.depart_id , round(avg(aaa.yyh),2) realConsume , IFNULL(tc.target_drug,2) 'targetConsume' ,GROUP_CONCAT(aaa.yhcyqyy SEPARATOR '') 'causeAnalysis' from "+ dataViewName4411+" aaa";;
131 sql += " left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year='2024')"; 138 sql += " left join report_target_config tc on (tc.depart_id = aaa.depart_id and tc.target_year='2024')";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!