11f519d6 张雷

药剂分析组件接口开发

1 个父辈 44d441e0
......@@ -363,4 +363,21 @@ public class ReportItemvService {
sql += " ) bbb ";
return sql ;
}
public List<FRportlCommandCenterVO> statisticsByYh(String departIds, String startDate, String endDate) {
String startDateTb = DateUtils.getTbDate(startDate);
String endDateTb = DateUtils.getTbDate(endDate);
String startDateHb = DateUtils.getHbDate(startDate);
String endDateHb = DateUtils.getHbDate(endDate);
//药剂SQL
String dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDate, endDate);
String dataViewName3a24Tb = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDateTb, endDateTb);
String dataViewName3a24Hb = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDateHb, endDateHb);
//处理水量
String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDate, endDate);
String dataViewName2119Tb = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDateTb, endDateTb);
String dataViewName2119Hb = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDateHb, endDateHb);
return null;
}
}
......
......@@ -89,13 +89,13 @@ spring:
connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
datasource:
master:
url: jdbc:mysql://47.104.179.187:6003/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
url: jdbc:mysql://113.249.91.27:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username: root
password: jkauto@123
driver-class-name: com.mysql.jdbc.Driver
# 恩菲数据同步
nf-db:
url: jdbc:mysql://47.104.179.187:6003/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
url: jdbc:mysql://113.249.91.27:3306/zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
username: root
password: jkauto@123
driver-class-name: com.mysql.jdbc.Driver
......
......@@ -151,4 +151,6 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData
List<Map<String, Object>> queryHjtjReport(String dataViewName9bff,String dataViewName3a24,String dataViewName2119,
String startTime, String endTime, String departId);
List<ResultNumberVO> statisticsByXjl(String departIds, String startDate, String endDate);
}
......
......@@ -500,6 +500,25 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
return list;
}
@Override
public List<ResultNumberVO> statisticsByXjl(String departIds, String startDate, String endDate) {
List<ResultNumberVO> reduceStatisticsList = new ArrayList<>(4);
String startDateTb = DateUtils.getTbDate(startDate);
String endDateTb = DateUtils.getTbDate(endDate);
String startDateHb = DateUtils.getHbDate(startDate);
String endDateHb = DateUtils.getHbDate(endDate);
//头部统计数据
JnhbReportData nowMonthData = getJnhbReportSumDataByResultNumber(departIds, startDate, endDate);
JnhbReportData lastMonthData = getJnhbReportSumDataByResultNumber(departIds, startDateHb, endDateHb);
JnhbReportData lastYearMonthData = getJnhbReportSumDataByResultNumber(departIds, startDateTb, endDateTb);
//ResultNumberVO(tring name, String unit, String value, String valueTb, String valueHb)
reduceStatisticsList.add( new ResultNumberVO( "COD", "吨",nowMonthData.getCodxjl(),lastMonthData.getCodxjl(),lastYearMonthData.getCodxjl() ) );//COD消减量(吨) codxjl
reduceStatisticsList.add( new ResultNumberVO( "NH₃-N","吨",nowMonthData.getAdxjl(),lastMonthData.getAdxjl(),lastYearMonthData.getAdxjl() ));//NH3-N消减量(吨)adxjl
reduceStatisticsList.add( new ResultNumberVO( "TP","吨",nowMonthData.getTpxjl(),lastMonthData.getTpxjl(),lastYearMonthData.getTpxjl() ));//TP消减量(吨)tpxjl
reduceStatisticsList.add( new ResultNumberVO( "TN","吨",nowMonthData.getTnxjl(),lastMonthData.getTnxjl(),lastYearMonthData.getTnxjl() ));//TN消减量(吨)tnxjl
return reduceStatisticsList;
}
/**转换为Map<部门编号,JnhbReportData> */
private Map<String,JnhbReportData> convertJnhbReportDataMap(List<JnhbReportData> dataList){// Map<部门编号,JnhbReportData>
Map<String,JnhbReportData> dataMap = new HashMap<>();
......
......@@ -12,6 +12,7 @@ import com.skua.modules.custom.service.IFCustomReportDatasetService;
import com.skua.modules.report.service.IReportDataService;
import com.skua.modules.report.vo.JnhbLargeScreenVO;
import com.skua.modules.report.vo.JnhbReportData;
import com.skua.modules.report.vo.ReportItemvParam;
import com.skua.modules.report.vo.largeScreen.ResultNumberVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -237,4 +238,18 @@ public class ReportDataController {
result.setResult(dataLIst);
return result;
}
@AutoLog(value = "节能环保-大屏展示")
@ApiOperation(value = "节能环保-消减量", notes = "节能环保-消减量")
@GetMapping(value = "/statisticsByXjl")
public Result<List<ResultNumberVO>> statisticsByXjl(ReportItemvParam reportItemvParam) { //time
Result<List<ResultNumberVO>> result = new Result<>();
String departIds = BaseContextHandler.getDeparts();
if(reportItemvParam.getDepartIds()!=null){
departIds = reportItemvParam.getDepartIds();
}
List<ResultNumberVO> dataLIst = fCustomReportDatasetService.statisticsByXjl(departIds,reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
result.setResult(dataLIst);
return result;
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!