d8f9987d 康伟

kangwei :药耗分析接口,对外集团展示大屏接口

1 个父辈 c2c1cbd9
正在显示 18 个修改的文件 包含 508 行增加39 行删除
......@@ -85,6 +85,8 @@ public class ReportViewUtil {
return sb.toString();
}
/**
* <pre>
* 构造填报报表视图,时间模糊搜索
......@@ -230,7 +232,6 @@ public class ReportViewUtil {
* @return
*/
public static String buildViewLike(String reportId,String fields,String departIds,String startTime,String endTime,String operatorSign) {
//运算符号operatorSign
if(StringUtils.isEmpty(operatorSign)) operatorSign = "sum";
String inSqlPart = "";
......
package com.skua.modules.common.vo;
import com.skua.core.util.DateUtils;
import com.skua.tool.util.DateUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
@Data
public class DateVO {
......@@ -22,13 +16,21 @@ public class DateVO {
private String lastYearStartDate;
@ApiModelProperty(value = "去年(yyyy-MM-dd)")
private String lastYearEndDate;
@ApiModelProperty(value = "去年月开始时间(yyyy-MM-dd)")
private String lastYearMonthStartTime;
@ApiModelProperty(value = "上月结束时间(yyyy-MM-dd)")
private String lastYearMonthEndTime;
@ApiModelProperty(value = "上月(yyyy-MM)")
private String lastMonth;
@ApiModelProperty(value = "上月(yyyy-MM-dd)")
private String lastMonthDay;
@ApiModelProperty(value = "上月开始时间(yyyy-MM-dd)")
private String lastMonthStartTime;
@ApiModelProperty(value = "上月结束时间(yyyy-MM-dd)")
private String lastMonthEndTime;
@ApiModelProperty(value = "昨天")
......@@ -56,17 +58,26 @@ public class DateVO {
this.nowMonth = DateUtils.dateformat(currentDate,"yyyy-MM");
this.nowMonthStartDate = nowMonth+"-01";
this.nowMonthEndDate = nowMonth+"-31";
//this.lastYear = getYear(nowMonth,"yyyy-MM")-1;
//this.lastMonth = DateUtils.getLastMonthOfMonth(nowMonth);
nowYear = Integer.parseInt( DateUtils.dateformat(currentDate,"yyyy") ) ;
nowYearStartDate = nowYear + "-01-01";
nowYearEndDate = nowYear + "-12-31";
/* this.lastMonthStartTime = lastMonth+"-01";
this.nowYearStartDate = nowYear + "-01-01";
this.nowYearEndDate = nowYear + "-12-31";
this.nowYear = Integer.parseInt(DateUtils.dateformat(currentDate,"yyyy"));
//同比时间
this.lastYear = nowYear -1 ;//去年
this.lastYearMonth = DateUtils.getHbMonth(currentDate);
System.out.println(" lastYearMonth "+lastYearMonth);
this.lastYearMonthStartTime = lastYearMonth+"-01";
this.lastYearMonthStartTime = lastYearMonth+"-31";
this.lastYearStartDate = this.lastYear+"-01-01";
this.lastYearEndDate = this.lastYear+"-12-31";
//环比时间
this.lastMonth = DateUtils.getHbMonth(currentDate);//
this.lastMonthStartTime = lastMonth+"-01";
this.lastMonthEndTime = lastMonth+"-31";
this.lastYearStartTime = lastYear+"-01";
this.lastYearEndTime = lastYear +"-31";*/
//this.lastYearStartTime = lastYear+"-01";
// this.lastYearEndTime = lastYear +"-31";
}
}
......
......@@ -21,6 +21,37 @@ import java.util.*;
*/
public class DateUtils {
public static String dateformat(String date,String format){
SimpleDateFormat sdf = new SimpleDateFormat(format);
return sdf.format(str2Date(date,format));
}
public static Date str2Date(String str, String pattern) {
Date d = null;
SimpleDateFormat sdf = new SimpleDateFormat(pattern);
try {
d = sdf.parse(str);
} catch (Exception e) {
e.printStackTrace();
}
return d;
}
/**
* 两个时间相差的天数
* @param day1
* @param day2
* @return
*/
public static long differenceDay(String day1 ,String day2){
String format = "yyyy-MM-dd";
Date startDay = str2Date(day1,format);
Date endDay = str2Date(day2,format);
long msNum = endDay.getTime() - startDay.getTime();
long dayNUm = msNum /(24*60*60*1000);
return dayNUm;
}
/**
* 根据(开始时间, 结束时间)获取每一个时间间隔的数据, 主要用于eCharts图标xData
*
......
......@@ -129,7 +129,6 @@ public class BaseUtil {
return sb.toString();
}
return str;
}
/**
......
......@@ -2,9 +2,8 @@ package com.skua.modules.threedimensional.controller;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.report.vo.JnhbReportData;
import com.skua.modules.threedimensional.service.IJTDisplayScreenService;
import com.skua.modules.threedimensional.vo.SysFactoryInfoVO;
import com.skua.modules.threedimensional.vo.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
......@@ -32,4 +31,43 @@ public class JTDisplayScreenController {
result.setResult(list);
return result;
}
//
@AutoLog(value = "项目运营情况")
@ApiOperation(value = "项目运营情况", notes = "项目运营情况")
@GetMapping("/projectOperationInfo")
private Result<ProjectOperationInfoVO> getProjectOperationInfo(String departId, String startTime, String endTime){
Result<ProjectOperationInfoVO> result = new Result<>();
ProjectOperationInfoVO projectOperationInfoVO = displayScreenService.getProjectOperationInfo(departId ,startTime ,endTime);
result.setResult(projectOperationInfoVO);
return result;
}
@AutoLog(value = "水量趋势")
@ApiOperation(value = "水量趋势", notes = "水量趋势")
@GetMapping("/waterTrend")
private Result<List<WaterTrendVO>> waterTrend(String departId, String startTime, String endTime){
Result<List<WaterTrendVO>> result = new Result<>();
List<WaterTrendVO> list = displayScreenService.queryWaterTrend(departId ,startTime ,endTime);
result.setResult(list);
return result;
}
@AutoLog(value = "水质水量:左侧统计数据")
@ApiOperation(value = "水质水量:左侧统计数据", notes = "水质水量:左侧统计数据")
@GetMapping("/waterQuality")
private Result<WaterQualityVO> waterQuality(String departId, String startTime, String endTime){
Result<WaterQualityVO> result = new Result<>();
WaterQualityVO waterQualityVO = displayScreenService.queryWaterQuality(departId ,startTime ,endTime);
result.setResult(waterQualityVO);
return result;
}
@AutoLog(value = "水质水量:右侧图表")
@ApiOperation(value = "水质水量:右侧图表", notes = "水质水量:右侧图表")
@GetMapping("/waterQualityCchart")
private Result<List<WaterQualityChartVO>> waterQualityCchart(String departId, String startTime, String endTime){
Result<List<WaterQualityChartVO>> result = new Result<>();
List<WaterQualityChartVO> waterTrendVOList = displayScreenService.queryWaterQualityChart(departId ,startTime ,endTime);
result.setResult(waterTrendVOList);
return result;
}
}
......
package com.skua.modules.threedimensional.service;
import com.skua.modules.threedimensional.vo.ProjectOperationInfoVO;
import com.skua.modules.threedimensional.vo.SysFactoryInfoVO;
import com.skua.modules.threedimensional.vo.*;
import java.util.List;
/**
......@@ -14,10 +15,38 @@ public interface IJTDisplayScreenService {
* @return
*/
List<SysFactoryInfoVO> getFactoryList( );
/**
*对外展示集团大屏 : 项目运营情况
* 项目运营情况
* @param departId
* @param startTime
* @param endTime
* @return
*/
ProjectOperationInfoVO getProjectOperationInfo(String departId, String startTime, String endTime);
/***
* 水量趋势
* @param departId
* @param startTime
* @param endTime
* @return
*/
List<WaterTrendVO> queryWaterTrend(String departId, String startTime, String endTime);
/***
* 水质水量数据
* @param departId
* @param startTime
* @param endTime
* @return
*/
WaterQualityVO queryWaterQuality(String departId, String startTime, String endTime);
/***
* 水质水量图标数据
* @param departId
* @param startTime
* @param endTime
* @return
*/
ProjectOperationInfoVO getProjectOperationInfo();
List<WaterQualityChartVO> queryWaterQualityChart(String departId, String startTime, String endTime);
}
......
package com.skua.modules.threedimensional.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 对外展示集团大屏
*/
@Data
@ApiModel(value="对外展示集团大屏:水量趋势", description="对外展示集团大屏:水量趋势")
public class WaterQualityChartVO {
@ApiModelProperty(value = "时间")
private String time;
@ApiModelProperty(value = "处理水量")
private String jsl;
//'CSCOD', 'CSTN', 'CSTP', 'CSNH3N'
@ApiModelProperty(value = "出水COD")
private String cod;
@ApiModelProperty(value = "TN消减量(吨)")
private String tn;
@ApiModelProperty(value = "TP消减量(吨)")
private String tp;
@ApiModelProperty(value = "NH3-N消减量(吨)")
private String ad;
}
package com.skua.modules.threedimensional.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
* 对外展示集团大屏
*/
@Data
@ApiModel(value="对外展示集团大屏:水量趋势", description="对外展示集团大屏:水量趋势")
public class WaterQualityVO {
@ApiModelProperty(value = "出水量")
private BigDecimal csl;
@ApiModelProperty(value = "运行负荷率")
private Double yxfhl;
@ApiModelProperty(value = "cod消减量")
private Double codxjl;
@ApiModelProperty(value = "NH3N消减两")
private Double adxjl;
@ApiModelProperty(value = "脱泥量")
private Double tnl;
@ApiModelProperty(value = "吨水电耗")
private Double dsdh;
@ApiModelProperty(value = "吨水药消")
private Double dsyh;
}
package com.skua.modules.threedimensional.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 对外展示集团大屏
*/
@Data
@ApiModel(value="对外展示集团大屏:水量趋势", description="对外展示集团大屏:水量趋势")
public class WaterTrendVO {
@ApiModelProperty(value = "时间")
private String time;
@ApiModelProperty(value = "进水量")
private String jsl;
@ApiModelProperty(value = "出水量")
private String csl;
}
......@@ -35,6 +35,8 @@ public class OperationReportServiceImpl implements IOperationReportService {
SeasonTimeVO seasonTimeVO = new SeasonTimeVO(year ,season );
SeasonTimeVO lastSeasonTimeVO = new SeasonTimeVO(lastYear ,season );
productDataVO.setStartTime(seasonTimeVO.getStartTime());
productDataVO.setEndTime( seasonTimeVO.getEndTime());
//水务公司总数
String sql = "select count(1) from sys_depart where depart_type = 1";
String deptartCount = queryForString(sql);
......
......@@ -15,6 +15,12 @@ import java.util.List;
public class ProductDataVO {
@ApiModelProperty(value = "去年")
private String lastYear;
@ApiModelProperty(value = "季度开始时间")
private String startTime;
@ApiModelProperty(value = "季度结束时间")
private String endTime;
@ApiModelProperty(value = "水务厂站数量")
private String deptartCount;
@ApiModelProperty(value = "收费水量")
......
......@@ -2,16 +2,18 @@ package com.skua.modules.equipment.controller;
import com.skua.core.api.vo.Result;
import com.skua.core.aspect.annotation.AutoLog;
import com.skua.modules.equipment.dto.DrugDto;
import com.skua.modules.equipment.service.IDrugConsumptionAnalysisService;
import com.skua.modules.equipment.vo.CorrelationAnalysisVO;
import com.skua.modules.equipment.vo.DrugConsumptionDisplayVO;
import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO;
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.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
import java.util.List;
@Slf4j
@Api(tags = "药耗分析")
......@@ -24,6 +26,63 @@ public class DrugConsumptionAnalysisController {
@AutoLog(value = "数据展示")
@ApiOperation(value = "数据展示", notes = "数据展示")
@GetMapping("/data/display")
public Result<DrugConsumptionDisplayVO> dataDisplay(String time, String departId) {
Result<DrugConsumptionDisplayVO> result = new Result<>();
DrugConsumptionDisplayVO data = drugConsumptionAnalysisService.dataDisplay(time,departId);
result.setResult(data);
return result;
}
@AutoLog(value = "总药耗趋势")
@ApiOperation(value = "总药耗趋势", notes = "总药耗趋势")
@GetMapping("/data/drugConsumptionTrend")
public Result<List<DrugConsumptionTrendChartVO>> drugConsumptionTrend(String time, String departId) {
Result<List<DrugConsumptionTrendChartVO>> result = new Result<>();
List<DrugConsumptionTrendChartVO> data = drugConsumptionAnalysisService.drugConsumptionTrend(time,departId);
result.setResult(data);
return result;
}
@AutoLog(value = "吨水药耗趋势")
@ApiOperation(value = "吨水药耗趋势", notes = "吨水药耗趋势")
@GetMapping("/data/consumptionTonOfWaterTrend")
public Result<List<DrugConsumptionTrendChartVO>> consumptionTonOfWaterTrend(String time, String departId) {
Result<List<DrugConsumptionTrendChartVO>> result = new Result<>();
List<DrugConsumptionTrendChartVO> data = drugConsumptionAnalysisService.consumptionTonOfWaterTrend(time,departId);
result.setResult(data);
return result;
}
@AutoLog(value = "药剂占比统计")
@ApiOperation(value = "药剂占比统计 type 1.按明细 2.按类型", notes = "药剂占比统计 type 1.按明细 2.按类型")
@GetMapping("/data/proportionStatistics")
public Result<List<DrugConsumptionDisplayVO>> proportionStatistics(String time, String departId) {
Result<List<DrugConsumptionDisplayVO>> result = new Result<>();
List<DrugConsumptionDisplayVO> data = drugConsumptionAnalysisService.proportionStatistics(time ,departId);
result.setResult(data);
return result;
}
@AutoLog(value = "相关性分析")
@ApiOperation(value = "相关性分析 统计类型下拉框", notes = "相关性分析 统计类型下拉框")
@GetMapping("/correlation/analysisType")
public Result<List<DrugConsumptionDisplayVO>> analysisType() {
Result<List<DrugConsumptionDisplayVO>> result = new Result<>();
List<DrugConsumptionDisplayVO> data = drugConsumptionAnalysisService.analysisType();
result.setResult(data);
return result;
}
@AutoLog(value = "相关性分析")
@ApiOperation(value = "相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂", notes = "相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂")
@GetMapping("/correlation/analysis")
public Result<List<CorrelationAnalysisVO>> correlationAnalysis(String time, String drugCode, String departId) {
Result<List<CorrelationAnalysisVO>> result = new Result<>();
List<CorrelationAnalysisVO> data = drugConsumptionAnalysisService.correlationAnalysis(time,drugCode ,departId);
result.setResult(data);
return result;
}
/* @AutoLog(value = "数据展示")
@ApiOperation(value = "数据展示", notes = "数据展示")
@RequestMapping(value = "/data/display", method = RequestMethod.GET)
public Result<Map<String, Object>> dataDisplay(String time,String departId) {
Result<Map<String, Object>> result = new Result<>();
......@@ -34,6 +93,8 @@ public class DrugConsumptionAnalysisController {
}
@AutoLog(value = "总药耗趋势")
@ApiOperation(value = "总药耗趋势", notes = "总药耗趋势")
@RequestMapping(value = "/drug/consumption/trend", method = RequestMethod.GET)
......@@ -109,5 +170,5 @@ public class DrugConsumptionAnalysisController {
result.setResult(data);
result.setSuccess(true);
return result;
}
}*/
}
......
......@@ -2,24 +2,31 @@ package com.skua.modules.equipment.service;
import com.skua.modules.equipment.dto.DrugDto;
import com.skua.modules.equipment.vo.CorrelationAnalysisVO;
import com.skua.modules.equipment.vo.DrugConsumptionDisplayVO;
import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO;
import java.util.List;
import java.util.Map;
public interface IDrugConsumptionAnalysisService {
//数据展示
Map<String, Object> dataDisplay(String time,String departId);
DrugConsumptionDisplayVO dataDisplay(String time, String departId);
//总药耗趋势
Map<String, Object> drugConsumptionTrend(String time,String departId);
List<DrugConsumptionTrendChartVO> drugConsumptionTrend(String time, String departId);
//吨水药耗趋势
Map<String, Object> consumptionTonOfWaterTrend(String time,String departId);
List<DrugConsumptionTrendChartVO> consumptionTonOfWaterTrend(String time,String departId);
//药剂占比统计 type 1.按明细 2.按类型
Map<String, Object> proportionStatistics(String time, Integer type,String departId);
List<DrugConsumptionDisplayVO> proportionStatistics(String time,String departId);
//药剂占比统计列表 type 1.按明细 2.按类型
Map<String, Object> proportionStatisticsDetail(String time, Integer type,String departId);
//Map<String, Object> proportionStatisticsDetail(String time, Integer type,String departId);
//相关性分析 type 1.絮凝剂 2.碳源 3.除磷剂
Map<String, Object> correlationAnalysis(String time, Integer type ,String departId);
List<CorrelationAnalysisVO> correlationAnalysis(String time, String drugCode , String departId);
//相关性分析 统计类型
List<DrugConsumptionDisplayVO> analysisType();
//总药耗趋势详情
Map<String, Object> drugConsumptionTrendDetail(DrugDto drugDto);
// Map<String, Object> drugConsumptionTrendDetail(DrugDto drugDto);
//相关性分析药剂明细 type 1.絮凝剂 2.碳源 3.除磷剂
Map<String, Object> correlationAnalysisDetail(String time, Integer type ,String departId);
// Map<String, Object> correlationAnalysisDetail(String time, Integer type ,String departId);
}
......
package com.skua.modules.equipment.vo;
import com.skua.tool.util.JSUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang.StringUtils;
@Data
@ApiModel(value="药耗分析:相关性分析", description="药耗分析:相关性分析")
public class CorrelationAnalysisVO {
@ApiModelProperty(value = "药剂code")
private String drugCode;
@ApiModelProperty(value = "药剂名称")
private String drugName;
@ApiModelProperty(value = "时间")
private String time;
@ApiModelProperty(value = "药剂总药耗")
private String zyh;
@ApiModelProperty(value = "吨泥耗量")
private String dnhl;
@ApiModelProperty(value = "进水ss")
private String jsss;
@ApiModelProperty(value = "污泥量")
private String wnl;
@ApiModelProperty(value = "污泥含水量")
private String wnhsl;
////吨泥耗量=絮凝剂总量/干污泥总量
//干污泥量=产泥量*(1-污泥含水率)
public String getDnhl() {
String expression = null;
if(StringUtils.isNotEmpty(this.zyh)){
if(StringUtils.isNotEmpty(this.wnhsl)){
expression = "("+this.zyh +" * 100 )/ ("+this.wnl+"* (100-"+this.wnhsl+"))";
}else{
expression = this.zyh +"/ "+this.wnl+"";
}
dnhl = JSUtils.executeExpression(expression , "0.0");
}
return dnhl;
}
}
package com.skua.modules.equipment.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
@ApiModel(value="药耗分析:数据展示", description="药耗分析:数据展示(药耗分析)")
public class DrugConsumptionDisplayVO {
@ApiModelProperty(value = "药剂code")
private String drugCode;
@ApiModelProperty(value = "药剂名称")
private String drugName;
@ApiModelProperty(value = "出水量")
private Double CSL;
@ApiModelProperty(value = "同比去年出水量")
private Double tbqnCsl;
@ApiModelProperty(value = "环比上月出水量")
private Double hbsyCsl;
@ApiModelProperty(value = "总药耗")
private Double zyh;
@ApiModelProperty(value = "同比去年总药耗")
private Double tbqnzyh;
@ApiModelProperty(value = "同比去年总药耗")
private Double tbqnzyhsl;
@ApiModelProperty(value = "同比去年总药耗比例")
private Double tbqnzyhbl;
@ApiModelProperty(value = "环比上月总药耗")
private Double hbsyzyh;
@ApiModelProperty(value = "环比上月总药耗")
private Double hbsyzyhsl;
@ApiModelProperty(value = "环比上月总药耗比例")
private Double hbsyzyhbl;
@ApiModelProperty(value = "目标吨水药耗")
private Double mbdsyh = 0.65d;
@ApiModelProperty(value = "月吨水药耗")
private Double dsyh;
@ApiModelProperty(value = "同比去年吨水药耗")
private Double tbqndsyh;
@ApiModelProperty(value = "同比去年吨水药耗")
private Double tbqndsyhsl;
@ApiModelProperty(value = "同比去年吨水药耗比例")
private Double tbqndsyhbl;
@ApiModelProperty(value = "环比上月吨水药耗")
private Double hbsydsyh;
@ApiModelProperty(value = "环比上月吨水药耗")
private Double hbsydsyhsl;
@ApiModelProperty(value = "环比上月吨水药耗比例")
private Double hbsydsyhbl;
@ApiModelProperty(value = "历史最低吨水药耗")
private String lszddsyh;
@ApiModelProperty(value = "历史最低吨水药耗--月份")
private String lszddsyhyf;
public DrugConsumptionDisplayVO() {
}
public DrugConsumptionDisplayVO(Double CSL, Double tbqnCsl, Double hbsyCsl, Double zyh, Double hbsyzyh, Double tbqnzyh) {
this.CSL = CSL;
this.tbqnCsl = tbqnCsl;
this.hbsyCsl = hbsyCsl;
this.zyh = zyh;
this.hbsyzyh = hbsyzyh;
this.tbqnzyh = tbqnzyh;
if(this.zyh != null ){
//计算吨水药耗
//药耗量[kg] / 处理水量[吨]
if(this.CSL != null && Double.compare(this.CSL, 0.0) != 0) this.dsyh = this.getValue(this.zyh /this.CSL );
//同比总药耗
if(this.tbqnzyh != null){
this.tbqnzyhsl = this.getValue(this.zyh - this.tbqnzyh);
this.tbqnzyhbl = this.getValue(((this.zyh - this.tbqnzyh)/this.tbqnzyh)*100) ;
//计算吨水药耗 //同比吨水药耗
if(this.tbqnCsl != null && Double.compare(this.tbqnCsl, 0.0) != 0) this.tbqndsyh = this.getValue(this.tbqnzyh /this.tbqnCsl );
if(this.tbqndsyh != null ){
this.tbqndsyhsl = this.getValue(dsyh-tbqndsyh);
this.tbqndsyhbl = this.getValue((dsyh-tbqndsyh)/tbqndsyh*100);
}
}
//环比总药耗
if(this.hbsyzyh != null ){
this.hbsyzyhsl = this.getValue(this.zyh - this.hbsyzyh);
this.hbsyzyhbl = this.getValue(((this.zyh - this.hbsyzyh)/this.hbsyzyh)*100) ;
//环比-吨水药耗
if(this.hbsyCsl != null && Double.compare(this.hbsyCsl, 0.0) != 0) this.hbsydsyh = this.getValue(this.hbsyzyh /this.hbsyCsl );
if(this.hbsydsyh != null){
this.hbsydsyhsl = this.getValue(this.dsyh - this.hbsydsyh);
this.hbsydsyhbl = this.getValue((this.dsyh - this.hbsydsyh) / this.hbsydsyh*100);
}
}
}
}
private Double getValue(Double d) {
try{
BigDecimal two = new BigDecimal(d);
double three = two.setScale(2,BigDecimal.ROUND_HALF_UP).doubleValue();
return three;
}catch(Exception e){
//e.printStackTrace();
}
return null;
}
}
package com.skua.modules.equipment.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value="药耗分析:总药耗趋势Charts", description="药耗分析:总药耗趋势Charts")
public class DrugConsumptionTrendChartVO {
@ApiModelProperty(value = "时间")
private String time;
@ApiModelProperty(value = "总药耗")
private Double zyh;
@ApiModelProperty(value = "同比总药耗")
private Double tbzyh;
@ApiModelProperty(value = "吨水药耗")
private String dsyh;
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!