EmptyLocationDto.java
1.04 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
package com.huaheng.api.mes.domain;
import com.huaheng.common.utils.StringUtils;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.RoundingMode;
/**
* MES查询空库位Dto类
*/
@Data
public class EmptyLocationDto implements Serializable {
private static final long serialVersionUID = 1148867716183617160L;
/**
* 库区编码
*/
private String zoneCode;
/**
* 库区名称
*/
private String zoneName;
public void setSomeLocationQty(int someLocationQty) {
this.someLocationQty = someLocationQty;
if (StringUtils.isNotNull(totalLocationQty)) {
this.someLocationRate = BigDecimal.valueOf((double) someLocationQty / (double) totalLocationQty * 100).setScale(2, RoundingMode.HALF_UP).doubleValue() + "%";
}
}
/**
* 有货位数量
*/
private int someLocationQty;
/**
* 有货位数量
*/
private String someLocationRate;
/**
* 总库位数
*/
private int totalLocationQty;
}