7e31164f 张雷

公式功能迁移

1 个父辈 a747d5d8
package com.skua.modules.algorithm.controller;
package com.skua.modules.dataAnalysis.controller;
import com.skua.common.constant.ReportConstant;
import com.skua.common.report.ReportViewUtil;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.core.context.BaseContextHandler;
import com.skua.core.context.SpringContextUtils;
import com.skua.core.util.ConvertUtils;
import com.skua.modules.algorithm.service.ICommandCentreService;
import com.skua.modules.dataAnalysis.service.ICommandCentreService;
import com.skua.modules.algorithm.service.impl.ReportItemvService;
import com.skua.modules.algorithm.vo.*;
import com.skua.modules.algorithm.vo.DepartLoadRateResultVO;
import com.skua.modules.algorithm.vo.ReportItemVO;
import com.skua.modules.algorithm.vo.StackedAreaChartDataVO;
import com.skua.modules.algorithm.vo.WaterTreatmentVO;
import com.skua.modules.common.vo.DateVO;
import com.skua.modules.guest.util.DateUtil;
import com.skua.modules.report.entity.FReportItemv;
import com.skua.modules.report.vo.*;
import com.skua.modules.system.service.ISysConfigService;
import com.skua.modules.report.vo.DepartDrugResult;
import com.skua.modules.report.vo.FRportlCommandCenterVO;
import com.skua.modules.report.vo.ReportDateTrendVO;
import com.skua.modules.report.vo.ReportItemvParam;
import com.skua.modules.system.service.ISysFactoryInfoService;
import com.skua.tool.util.DateUtils;
import com.skua.tool.util.DigitalUtils;
import com.skua.tool.util.JSUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.time.LocalDate;
import java.time.YearMonth;
import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.ArrayList;
import java.util.List;
/**
* 统计功能配置表
......@@ -42,6 +44,7 @@ import java.util.*;
@RestController
@RequestMapping("/v1/algorithm/commandCentre")
public class SysCommandCentreController {
@Autowired
private ISysFactoryInfoService factoryInfoService;
@Autowired
......@@ -56,7 +59,7 @@ public class SysCommandCentreController {
@AutoLog(value = "指挥中心-水量查询")
@ApiOperation(value="指挥中心-水量查询", notes="指挥中心-水量查询")
@GetMapping(value = "/statisticsByWaterData")
public Result<List<FRportlCommandCenterVO>> statisticsByWaterData(ReportItemvParam reportItemvParam)throws Exception{
public Result<List<FRportlCommandCenterVO>> statisticsByWaterData(ReportItemvParam reportItemvParam) throws Exception{
Result<List<FRportlCommandCenterVO> > result = new Result<>();
List<FRportlCommandCenterVO> fReportItemvList = new ArrayList<>();//返回集合对象
DateVO dateVO = new DateVO(reportItemvParam.getStartDate());
......@@ -70,7 +73,7 @@ public class SysCommandCentreController {
long nowDifferDay = DateUtils.differenceDay(dateVO.getNowMonthStartDate(),dateVO.getNowMonthEndDate());
long lastMonthDifferDay = DateUtils.differenceDay(dateVO.getLastMonthStartTime(),dateVO.getLastMonthEndTime());
long lastYearDifferDay = DateUtils.differenceDay(dateVO.getLastYearMonthStartTime(),dateVO.getLastYearMonthEndTime());
//月对象数据String value, String valueTb, String valueHb
//月对象数据 value, valueTb, valueHb
FRportlCommandCenterVO monthDataVO = new FRportlCommandCenterVO("月汇总数据",JSUtils.divide(monthCSL,10000),JSUtils.divide(lastMonthCSL,10000),JSUtils.divide(lastYearCSL,10000));
//日处理对象
FRportlCommandCenterVO avgDayDataVO = new FRportlCommandCenterVO("日均处理水量",JSUtils.divide(monthCSL,nowDifferDay*10000),JSUtils.divide(lastMonthCSL,lastMonthDifferDay*10000),JSUtils.divide(lastYearCSL,lastYearDifferDay*10000));
......@@ -80,7 +83,6 @@ public class SysCommandCentreController {
//年数据统计:
String total = factoryInfoService.querySumProScale();
total = String.format("%.2f", Double.parseDouble(total));
// total = DigitalUtils.multiply(total,"10000");
fReportItemvList.add( new FRportlCommandCenterVO( total,"0","0"));
result.setSuccess(true);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!