YJMonthDataVO.java
2.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package com.skua.modules.dataAnalysis.vo;
import com.skua.tool.util.JSUtils;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 药剂月消耗数据
*/
@Data
@ApiModel(value="药剂月消耗数据", description="药剂月消耗数据")
public class YJMonthDataVO {
@ApiModelProperty(value = "药剂名称")
private String yjName;
@ApiModelProperty(value = "药剂Code")
private String yjCode;
@ApiModelProperty(value = "年目标")
private String yearTarge;//年目标
@ApiModelProperty(value = "月目标")
private String monthTarge;//月目标
@ApiModelProperty(value = "本月值")
private String value;//本月值
@ApiModelProperty(value = "环比")
private String valueHB;//环比
@ApiModelProperty(value = "同比")
private String valueTB;//同比
@ApiModelProperty(value = "环比-比例")
private String valueHB_bl;//环比
@ApiModelProperty(value = "同比-比例")
private String valueTB_bl;//同比
@ApiModelProperty(value = "单位")
private String unit;
public String getMonthTarge() {
monthTarge = JSUtils.divide(yearTarge,12);
return monthTarge;
}
public YJMonthDataVO(){
}
public YJMonthDataVO(String yjName, String yjCode, String unit, String yearTarge, String value, String valueHB, String valueTB) {
this.yjName = yjName;
this.yjCode = yjCode;
this.unit = unit;
this.yearTarge = yearTarge;
this.value = value;
this.valueHB = valueHB;
this.valueTB = valueTB;
}
public String getValueHB_bl() {
String expression = "( "+this.value +"-" +this.valueHB+")*100/"+this.valueHB;
return JSUtils.executeExpression(expression ,"0.0");
}
public String getValueTB_bl() {
String expression = "( "+this.value +"-" +this.valueTB+")*100/"+this.valueTB;
return JSUtils.executeExpression(expression ,"0.0");
}
}