给单据明细增加重量字段的展示
This commit is contained in:
@@ -183,6 +183,7 @@ public class DepotItemController {
|
||||
BigDecimal totalAllPrice = BigDecimal.ZERO;
|
||||
BigDecimal totalTaxMoney = BigDecimal.ZERO;
|
||||
BigDecimal totalTaxLastMoney = BigDecimal.ZERO;
|
||||
BigDecimal totalWeight = BigDecimal.ZERO;
|
||||
for (DepotItemVo4WithInfoEx diEx : dataList) {
|
||||
JSONObject item = new JSONObject();
|
||||
item.put("id", diEx.getId());
|
||||
@@ -226,6 +227,8 @@ public class DepotItemController {
|
||||
item.put("taxMoney", diEx.getTaxMoney());
|
||||
item.put("taxLastMoney", diEx.getTaxLastMoney());
|
||||
}
|
||||
BigDecimal allWeight = diEx.getBasicNumber()==null||diEx.getWeight()==null?BigDecimal.ZERO:diEx.getBasicNumber().multiply(diEx.getWeight());
|
||||
item.put("weight", allWeight);
|
||||
item.put("remark", diEx.getRemark());
|
||||
item.put("linkId", diEx.getLinkId());
|
||||
item.put("depotId", diEx.getDepotId() == null ? "" : diEx.getDepotId());
|
||||
@@ -240,6 +243,7 @@ public class DepotItemController {
|
||||
totalAllPrice = totalAllPrice.add(diEx.getAllPrice()==null?BigDecimal.ZERO:diEx.getAllPrice());
|
||||
totalTaxMoney = totalTaxMoney.add(diEx.getTaxMoney()==null?BigDecimal.ZERO:diEx.getTaxMoney());
|
||||
totalTaxLastMoney = totalTaxLastMoney.add(diEx.getTaxLastMoney()==null?BigDecimal.ZERO:diEx.getTaxLastMoney());
|
||||
totalWeight = totalWeight.add(allWeight);
|
||||
}
|
||||
if(StringUtil.isNotEmpty(isReadOnly) && "1".equals(isReadOnly)) {
|
||||
JSONObject footItem = new JSONObject();
|
||||
@@ -247,6 +251,7 @@ public class DepotItemController {
|
||||
footItem.put("allPrice", totalAllPrice);
|
||||
footItem.put("taxMoney", totalTaxMoney);
|
||||
footItem.put("taxLastMoney", totalTaxLastMoney);
|
||||
footItem.put("weight", totalWeight);
|
||||
dataArray.add(footItem);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,8 @@ public class DepotItemVo4WithInfoEx extends DepotItem{
|
||||
|
||||
private String barCode;
|
||||
|
||||
private BigDecimal weight;
|
||||
|
||||
public Long getMId() {
|
||||
return MId;
|
||||
}
|
||||
@@ -223,4 +225,12 @@ public class DepotItemVo4WithInfoEx extends DepotItem{
|
||||
public void setBarCode(String barCode) {
|
||||
this.barCode = barCode;
|
||||
}
|
||||
|
||||
public BigDecimal getWeight() {
|
||||
return weight;
|
||||
}
|
||||
|
||||
public void setWeight(BigDecimal weight) {
|
||||
this.weight = weight;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user