Commit 8cf85c8e by 宋祥

1.fixBug:修复采购合同数量金额不对的问题

parent 21b0ee32
...@@ -168,7 +168,7 @@ public class ServiceHGCG003A extends ServiceBase { ...@@ -168,7 +168,7 @@ public class ServiceHGCG003A extends ServiceBase {
BigDecimal receiveWeight = fCg002Bs.stream().map(HGCG002B::getReceiveWeight) BigDecimal receiveWeight = fCg002Bs.stream().map(HGCG002B::getReceiveWeight)
.reduce(BigDecimal.ZERO, BigDecimal::add); .reduce(BigDecimal.ZERO, BigDecimal::add);
newCg003.setReceiveWeight(receiveWeight); newCg003.setReceiveWeight(receiveWeight);
newCg003.setReceiveUnitWeight(receiveWeight.divide(bcReceiveQtySum).setScale(3, RoundingMode.HALF_UP)); newCg003.setReceiveUnitWeight(receiveWeight.divide(bcReceiveQtySum, 3, RoundingMode.HALF_UP));
// 计算收货总金额 // 计算收货总金额
BigDecimal receiveAmount = fCg002Bs.stream().map(HGCG002B::getAmount) BigDecimal receiveAmount = fCg002Bs.stream().map(HGCG002B::getAmount)
.reduce(BigDecimal.ZERO, BigDecimal::add); .reduce(BigDecimal.ZERO, BigDecimal::add);
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<EF:EFColumn ename="contractDate" cname="合同日期" width="100" align="center" editType="date" <EF:EFColumn ename="contractDate" cname="合同日期" width="100" align="center" editType="date"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFColumn ename="contractNo" cname="合同号" enable="false" width="120" align="center"/> <EF:EFColumn ename="contractNo" cname="合同号" enable="false" width="120" align="center"/>
<%-- <EF:EFColumn ename="planNo" cname="计划单号" enable="false" width="120" align="center"/>--%> <%-- <EF:EFColumn ename="planNo" cname="计划单号" enable="false" width="120" align="center"/>--%>
<EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center" defaultValue="0"> <EF:EFComboColumn ename="status" cname="状态" enable="false" width="80" align="center" defaultValue="0">
<EF:EFCodeOption codeName="hggp.hgcg.contractStatus" condition="ITEM_CODE IN ('0','2','4','5')"/> <EF:EFCodeOption codeName="hggp.hgcg.contractStatus" condition="ITEM_CODE IN ('0','2','4','5')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
...@@ -69,12 +69,18 @@ ...@@ -69,12 +69,18 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="120" align="center" required="true"/> <EF:EFColumn ename="purUserName" cname="采购员" width="120" align="center" required="true"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N3}" enable="false" defaultValue="0"/> <EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N3}" enable="false"
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" enable="false" defaultValue="0"/> defaultValue="0" sumType="page"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="120" align="right" format="{0:N3}" defaultValue="0"/> <EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" enable="false"
<EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="100" align="right" format="{0:N3}" defaultValue="0"/> defaultValue="0" sumType="page"/>
<EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="100" align="right" format="{0:N3}" defaultValue="0"/> <EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="80" align="right" format="{0:N3}" defaultValue="0"/> defaultValue="0" sumType="page"/>
<EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="120" align="right" format="{0:C3}"
defaultValue="0" sumType="page"/>
<EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="120" align="right" format="{0:C3}"
defaultValue="0" sumType="page"/>
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="120" align="right" format="{0:C3}"
defaultValue="0" sumType="page"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
...@@ -33,8 +33,10 @@ ...@@ -33,8 +33,10 @@
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/> <EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/> <EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/> <EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N3}" enable="false"/> <EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N3}" enable="false"
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" enable="false"/> sumType="page"/>
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" enable="false"
sumType="page"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/> <EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/> <EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="length" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
...@@ -45,9 +47,12 @@ ...@@ -45,9 +47,12 @@
copy="true"> copy="true">
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/> <EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="120" align="right" format="{0:C3}"
<EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="100" align="right" format="{0:N3}"/> sumType="page"/>
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="120" align="right" format="{0:C3}"
sumType="page"/>
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="120" align="right"
format="{0:C3}" sumType="page"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
...@@ -26,20 +26,24 @@ ...@@ -26,20 +26,24 @@
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventCode" required="true" cname="存货编号" /> <EF:EFColumn ename="inventCode" required="true" cname="存货编号"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="false" <EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="false"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField" blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains" enable="false" > filter="contains" enable="false">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/> <EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" required="true"/> <EF:EFColumn ename="spec" cname="规格" width="120" align="center" required="true"/>
<EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N3}" required="true" defaultValue="0"/> <EF:EFColumn ename="purQty" cname="采购数量" width="120" align="right" format="{0:N3}" required="true"
<EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" required="true" defaultValue="0"/> defaultValue="0" sumType="page"/>
<EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="120" align="right" format="{0:N3}" defaultValue="0"/> <EF:EFColumn ename="purWeight" cname="采购重量" width="120" align="right" format="{0:N3}" required="true"
<EF:EFComboColumn ename="calculationMethod" cname="计算方式" enable="true" width="100" align="center" required="true"> defaultValue="0" sumType="page"/>
<EF:EFCodeOption codeName="hggp.cg.calculationMethod" /> <EF:EFColumn ename="receiveQty" cname="已收货数量" enable="false" width="120" align="right" format="{0:N3}"
defaultValue="0" sumType="page"/>
<EF:EFComboColumn ename="calculationMethod" cname="计算方式" enable="true" width="100" align="center"
required="true">
<EF:EFCodeOption codeName="hggp.cg.calculationMethod"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="material" cname="材质" width="80" align="center" required="true"/> <EF:EFColumn ename="material" cname="材质" width="80" align="center" required="true"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/> <EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
...@@ -47,13 +51,16 @@ ...@@ -47,13 +51,16 @@
<EF:EFColumn ename="width" cname="宽(MM)" width="80" align="right" format="{0:N3}" required="true"/> <EF:EFColumn ename="width" cname="宽(MM)" width="80" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="thick" cname="厚(MM)" width="80" align="right" format="{0:N3}" required="true"/> <EF:EFColumn ename="thick" cname="厚(MM)" width="80" align="right" format="{0:N3}" required="true"/>
<EF:EFColumn ename="price" cname="单价" width="80" align="right" format="{0:N3}" required="true"/> <EF:EFColumn ename="price" cname="单价" width="80" align="right" format="{0:N3}" required="true"/>
<EF:EFComboColumn ename="taxRate" cname="税率(%)" enable="true" width="80" align="center" required="true" <EF:EFComboColumn ename="taxRate" cname="税率(%)" enable="true" width="100" align="center" required="true"
copy="true"> copy="true">
<EF:EFCodeOption codeName="hggp.cw.taxPoints"/> <EF:EFCodeOption codeName="hggp.cw.taxPoints"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="120" align="right" format="{0:C3}"
<EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="80" align="right" format="{0:N3}"/> sumType="page"/>
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="120" align="right" format="{0:C3}"
sumType="page"/>
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="120" align="right" format="{0:C3}"
sumType="page"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
...@@ -69,11 +69,16 @@ ...@@ -69,11 +69,16 @@
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="120" align="center" hidden="true"/> <EF:EFColumn ename="supName" cname="供应商名称" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="purUserName" cname="采购员" width="120" align="center" required="true"/> <EF:EFColumn ename="purUserName" cname="采购员" width="120" align="center" required="true"/>
<EF:EFColumn ename="receiveQty" cname="收货数量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="receiveQty" cname="收货数量" enable="false" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="deliverQty" cname="退货数量" enable="false" width="120" align="right" format="{0:N3}"/> sumType="page"/>
<EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="deliverQty" cname="退货数量" enable="false" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="120" align="right" format="{0:N3}"/> sumType="page"/>
<EF:EFColumn ename="amount" cname="金额" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N3}"
sumType="page"/>
<EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="120" align="right" format="{0:N3}"
sumType="page"/>
<EF:EFColumn ename="amount" cname="金额" enable="false" width="120" align="right" format="{0:C3}"
sumType="page"/>
<EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/> <EF:EFColumn ename="createdName" cname="创建人" enable="false" width="100" align="center"/>
<EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center" <EF:EFColumn ename="createdTime" cname="创建时间" enable="false" width="140" align="center"
editType="datetime" parseFormats="['yyyyMMddHHmmss']"/> editType="datetime" parseFormats="['yyyyMMddHHmmss']"/>
......
...@@ -70,9 +70,12 @@ ...@@ -70,9 +70,12 @@
<EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/> <EF:EFColumn ename="purUserName" cname="采购员" enable="false" width="100" align="center"/>
<EF:EFColumn ename="price" cname="单价" width="80" align="right" format="{0:N3}" enable="false"/> <EF:EFColumn ename="price" cname="单价" width="80" align="right" format="{0:N3}" enable="false"/>
<EF:EFColumn ename="taxRate" cname="税率(%)" width="80" align="right" format="{0:N3}" enable="false"/> <EF:EFColumn ename="taxRate" cname="税率(%)" width="80" align="right" format="{0:N3}" enable="false"/>
<EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="amount" cname="不含税金额" enable="false" width="120" align="right" format="{0:C3}"
<EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="80" align="right" format="{0:N3}"/> sumType="page"/>
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="100" align="right" format="{0:N3}"/> <EF:EFColumn ename="taxAmount" cname="税额" enable="false" width="120" align="right" format="{0:C3}"
sumType="page"/>
<EF:EFColumn ename="taxIncludeAmount" cname="含税金额" enable="false" width="120" align="right"
format="{0:C3}" sumType="page"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/> <EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="length" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
<EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="width" cname="宽(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
......
...@@ -25,23 +25,30 @@ ...@@ -25,23 +25,30 @@
<EF:EFRegion id="result" title="明细信息"> <EF:EFRegion id="result" title="明细信息">
<EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" isFloat="true" checkMode="row">
<EF:EFColumn ename="id" cname="内码" hidden="true"/> <EF:EFColumn ename="id" cname="内码" hidden="true"/>
<EF:EFColumn ename="inventCode" required="true" cname="存货编号" /> <EF:EFColumn ename="inventCode" required="true" cname="存货编号"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" enable="false" readonly="true" required="true"/> <EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" enable="false" readonly="true"
required="true"/>
<EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="false" <EF:EFComboColumn ename="inventType" cname="存货类型" width="120" align="center" required="false"
blockName="invent_type_box_block_id" textField="textField" valueField="valueField" blockName="invent_type_box_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true" columnTemplate="#=textField#" itemTemplate="#=textField#" readonly="true"
filter="contains" enable="false" > filter="contains" enable="false">
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/> <EF:EFColumn ename="inventTypeDetail" cname="存货类型大类" hidden="true"/>
<EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/> <EF:EFColumn ename="specId" cname="规格ID" enable="false" width="100" align="center" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/> <EF:EFColumn ename="spec" cname="规格" enable="false" width="120" align="center"/>
<EF:EFColumn ename="receiveQty" cname="收货数量" width="120" align="right" format="{0:N3}" required="true"/> <EF:EFColumn ename="receiveQty" cname="收货数量" width="120" align="right" format="{0:N3}" required="true"
<EF:EFColumn ename="deliverQty" cname="退货数量" enable="false" width="120" align="right" format="{0:N3}"/> sumType="page"/>
<EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N3}"/> <EF:EFColumn ename="deliverQty" cname="退货数量" enable="false" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="120" align="right" format="{0:N3}"/> sumType="page"/>
<EF:EFColumn ename="receiveUnitWeight" cname="收货单重" enable="false" width="120" align="right" format="{0:N3}" hidden="true"/> <EF:EFColumn ename="depositQty" cname="入库数量" enable="false" width="120" align="right" format="{0:N3}"
<EF:EFColumn ename="price" cname="单价" width="80" align="right" format="{0:N3}" required="true"/> sumType="page"/>
<EF:EFColumn ename="amount" cname="金额" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="receiveWeight" cname="收货重量" enable="false" width="120" align="right" format="{0:N3}"
sumType="page"/>
<EF:EFColumn ename="receiveUnitWeight" cname="收货单重" enable="false" width="120" align="right" format="{0:N3}"
hidden="true"/>
<EF:EFColumn ename="price" cname="单价" width="120" align="right" format="{0:C3}" required="true"/>
<EF:EFColumn ename="amount" cname="金额" enable="false" width="120" align="right" format="{0:C3}"
sumType="page"/>
<EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/> <EF:EFColumn ename="material" cname="材质" enable="false" width="80" align="center"/>
<EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/> <EF:EFColumn ename="unit" cname="单位" enable="false" width="80" align="center"/>
<EF:EFColumn ename="length" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/> <EF:EFColumn ename="length" cname="长(MM)" enable="false" width="80" align="right" format="{0:N3}"/>
......
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