Commit c13865bd by wancheng

计算单重更新

parent cce8f813
......@@ -99,7 +99,7 @@ public class HPKC001 extends DaoEPBase {
private Long inventRecordId; /* 存货档案ID*/
private BigDecimal amount = new BigDecimal(0.00); /* 数量*/
private BigDecimal unitWeight = new BigDecimal(0.00); /* 单重*/
private BigDecimal weight = new BigDecimal(0.00); /* 重量*/
private BigDecimal weight = new BigDecimal(0.000); /* 重量*/
private String remark = " "; /* 备注*/
private String oldPurchaseNo = " "; /* 原采购单号*/
private Integer deleteFlag; /* 是否删除0.否1.是*/
......@@ -197,7 +197,7 @@ public class HPKC001 extends DaoEPBase {
eiColumn = new EiColumn(FIELD_WEIGHT);
eiColumn.setType("N");
eiColumn.setScaleLength(2);
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(15);
eiColumn.setDescName("重量");
eiMetadata.addMeta(eiColumn);
......
......@@ -374,15 +374,15 @@ public class HPPZTools {
}
BigDecimal unitWeight = BigDecimal.ONE;
// 长
if (dbPz006.getLength() != null) {
if (dbPz006.getLength() != null&&dbPz006.getLength().compareTo(BigDecimal.ZERO)!=0) {
unitWeight = unitWeight.multiply(dbPz006.getLength());
}
// 宽
if (dbPz006.getWidth() != null) {
if (dbPz006.getWidth() != null&&dbPz006.getWidth().compareTo(BigDecimal.ZERO)!=0) {
unitWeight = unitWeight.multiply(dbPz006.getWidth());
}
// 厚
if (dbPz006.getThick() != null) {
if (dbPz006.getThick() != null&&dbPz006.getThick().compareTo(BigDecimal.ZERO)!=0) {
unitWeight = unitWeight.multiply(dbPz006.getThick());
}
// 乘以系数,除以1000000=重量(千克KG)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment