给单据明细增加重量字段的展示
This commit is contained in:
@@ -183,6 +183,7 @@ public class DepotItemController {
|
|||||||
BigDecimal totalAllPrice = BigDecimal.ZERO;
|
BigDecimal totalAllPrice = BigDecimal.ZERO;
|
||||||
BigDecimal totalTaxMoney = BigDecimal.ZERO;
|
BigDecimal totalTaxMoney = BigDecimal.ZERO;
|
||||||
BigDecimal totalTaxLastMoney = BigDecimal.ZERO;
|
BigDecimal totalTaxLastMoney = BigDecimal.ZERO;
|
||||||
|
BigDecimal totalWeight = BigDecimal.ZERO;
|
||||||
for (DepotItemVo4WithInfoEx diEx : dataList) {
|
for (DepotItemVo4WithInfoEx diEx : dataList) {
|
||||||
JSONObject item = new JSONObject();
|
JSONObject item = new JSONObject();
|
||||||
item.put("id", diEx.getId());
|
item.put("id", diEx.getId());
|
||||||
@@ -226,6 +227,8 @@ public class DepotItemController {
|
|||||||
item.put("taxMoney", diEx.getTaxMoney());
|
item.put("taxMoney", diEx.getTaxMoney());
|
||||||
item.put("taxLastMoney", diEx.getTaxLastMoney());
|
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("remark", diEx.getRemark());
|
||||||
item.put("linkId", diEx.getLinkId());
|
item.put("linkId", diEx.getLinkId());
|
||||||
item.put("depotId", diEx.getDepotId() == null ? "" : diEx.getDepotId());
|
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());
|
totalAllPrice = totalAllPrice.add(diEx.getAllPrice()==null?BigDecimal.ZERO:diEx.getAllPrice());
|
||||||
totalTaxMoney = totalTaxMoney.add(diEx.getTaxMoney()==null?BigDecimal.ZERO:diEx.getTaxMoney());
|
totalTaxMoney = totalTaxMoney.add(diEx.getTaxMoney()==null?BigDecimal.ZERO:diEx.getTaxMoney());
|
||||||
totalTaxLastMoney = totalTaxLastMoney.add(diEx.getTaxLastMoney()==null?BigDecimal.ZERO:diEx.getTaxLastMoney());
|
totalTaxLastMoney = totalTaxLastMoney.add(diEx.getTaxLastMoney()==null?BigDecimal.ZERO:diEx.getTaxLastMoney());
|
||||||
|
totalWeight = totalWeight.add(allWeight);
|
||||||
}
|
}
|
||||||
if(StringUtil.isNotEmpty(isReadOnly) && "1".equals(isReadOnly)) {
|
if(StringUtil.isNotEmpty(isReadOnly) && "1".equals(isReadOnly)) {
|
||||||
JSONObject footItem = new JSONObject();
|
JSONObject footItem = new JSONObject();
|
||||||
@@ -247,6 +251,7 @@ public class DepotItemController {
|
|||||||
footItem.put("allPrice", totalAllPrice);
|
footItem.put("allPrice", totalAllPrice);
|
||||||
footItem.put("taxMoney", totalTaxMoney);
|
footItem.put("taxMoney", totalTaxMoney);
|
||||||
footItem.put("taxLastMoney", totalTaxLastMoney);
|
footItem.put("taxLastMoney", totalTaxLastMoney);
|
||||||
|
footItem.put("weight", totalWeight);
|
||||||
dataArray.add(footItem);
|
dataArray.add(footItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,6 +48,8 @@ public class DepotItemVo4WithInfoEx extends DepotItem{
|
|||||||
|
|
||||||
private String barCode;
|
private String barCode;
|
||||||
|
|
||||||
|
private BigDecimal weight;
|
||||||
|
|
||||||
public Long getMId() {
|
public Long getMId() {
|
||||||
return MId;
|
return MId;
|
||||||
}
|
}
|
||||||
@@ -223,4 +225,12 @@ public class DepotItemVo4WithInfoEx extends DepotItem{
|
|||||||
public void setBarCode(String barCode) {
|
public void setBarCode(String barCode) {
|
||||||
this.barCode = barCode;
|
this.barCode = barCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getWeight() {
|
||||||
|
return weight;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setWeight(BigDecimal weight) {
|
||||||
|
this.weight = weight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
|
<result column="MColor" jdbcType="VARCHAR" property="MColor" />
|
||||||
<result column="MStandard" jdbcType="VARCHAR" property="MStandard" />
|
<result column="MStandard" jdbcType="VARCHAR" property="MStandard" />
|
||||||
<result column="MMfrs" jdbcType="VARCHAR" property="MMfrs" />
|
<result column="MMfrs" jdbcType="VARCHAR" property="MMfrs" />
|
||||||
|
<result column="weight" jdbcType="VARCHAR" property="weight" />
|
||||||
<result column="MOtherField1" jdbcType="VARCHAR" property="MOtherField1" />
|
<result column="MOtherField1" jdbcType="VARCHAR" property="MOtherField1" />
|
||||||
<result column="MOtherField2" jdbcType="VARCHAR" property="MOtherField2" />
|
<result column="MOtherField2" jdbcType="VARCHAR" property="MOtherField2" />
|
||||||
<result column="MOtherField3" jdbcType="VARCHAR" property="MOtherField3" />
|
<result column="MOtherField3" jdbcType="VARCHAR" property="MOtherField3" />
|
||||||
@@ -234,7 +235,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
|
<select id="getDetailList" parameterType="com.jsh.erp.datasource.entities.DepotItemExample" resultMap="ResultWithInfoExMap">
|
||||||
select di.*,m.name MName,m.model MModel,m.unit MaterialUnit,m.color MColor,m.standard MStandard,m.mfrs MMfrs,
|
select di.*,m.name MName,m.model MModel,m.unit MaterialUnit,m.color MColor,m.standard MStandard,m.mfrs MMfrs,m.weight,
|
||||||
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,m.enable_serial_number, m.enable_batch_number,
|
m.other_field1 MOtherField1,m.other_field2 MOtherField2,m.other_field3 MOtherField3,m.enable_serial_number, m.enable_batch_number,
|
||||||
dp1.name DepotName,dp2.name AnotherDepotName, me.bar_code barCode, me.purchase_decimal
|
dp1.name DepotName,dp2.name AnotherDepotName, me.bar_code barCode, me.purchase_decimal
|
||||||
from jsh_depot_item di
|
from jsh_depot_item di
|
||||||
|
|||||||
Reference in New Issue
Block a user