|
@@ -37,6 +37,7 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
|
|
import java.io.Serializable;
|
|
|
import java.lang.reflect.Array;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.math.RoundingMode;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
@@ -82,15 +83,15 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
|
item1.setSize(size.getSize());//获取尺码
|
|
|
item1.setActualPackingQty(size.getQuantity());//获取该尺码计划装箱数量
|
|
|
|
|
|
- item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
+ item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()).setScale(2, RoundingMode.HALF_UP));//获取总价 箱数*单价-->件数*单价
|
|
|
// item1.setBoxNumber(boxNumber);//获取箱数
|
|
|
//boxNumber=boxNumber.divide(item.getPiecesBox(),6,BigDecimal.ROUND_HALF_UP);
|
|
|
- //item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
|
- //item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
|
- //item1.setTotalNetWeight(boxNumber.multiply(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
|
- //BigDecimal volume=boxNumber.multiply(item1.getOuterBoxHeight());
|
|
|
- //volume=volume.multiply(item1.getOuterBoxLength());
|
|
|
- //volume=volume.multiply(item1.getOuterBoxWidth());
|
|
|
+ //item1.setTotalNetWeight(boxNumber.multip1ly(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
|
+ //item1.setTotalGrossWeight(boxNumber.multip1ly(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
|
+ //item1.setTotalNetWeight(boxNumber.multip1ly(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
|
+ //BigDecimal volume=boxNumber.multip1ly(item1.getOuterBoxHeight());
|
|
|
+ //volume=volume.multip1ly(item1.getOuterBoxLength());
|
|
|
+ //volume=volume.multip1ly(item1.getOuterBoxWidth());
|
|
|
//item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));//获取总体积 长*宽*高*箱数
|
|
|
|
|
|
|
|
@@ -169,7 +170,7 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
|
item1.setSize(size.getSize());//获取尺码信息
|
|
|
BigDecimal boxNumber=boxNumber1.multiply(new BigDecimal(size.getProportion()));//获取该尺码件数
|
|
|
item1.setTotal(boxNumber);//该尺码件数
|
|
|
- item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
+ item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()).setScale(2, RoundingMode.HALF_UP));//获取总价 箱数*单价-->件数*单价
|
|
|
item1.setId(size.getItemId());//从尺码表中获取到id
|
|
|
if(size.getProportion()==0){
|
|
|
item1.setTotal(null);//该尺码件数
|
|
@@ -233,9 +234,9 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
|
}
|
|
|
SyPreAssembledPackingListItem item1=item;
|
|
|
item1.setSize(size.getSize());//获取尺码信息
|
|
|
- BigDecimal boxNumber=boxNumber1.multiply(new BigDecimal(size.getProportion()));//获取该尺码件数
|
|
|
+ BigDecimal boxNumber=boxNumber1.multip1ly(new BigDecimal(size.getProportion()));//获取该尺码件数
|
|
|
item1.setTotal(boxNumber);//该尺码件数
|
|
|
- item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
+ item1.setTotalPrice(boxNumber.multip1ly(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
item1.setId(size.getItemId());//从尺码表中获取到id
|
|
|
if(size.getProportion()==0){
|
|
|
item1.setTotal(null);//该尺码件数
|
|
@@ -244,12 +245,12 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
|
//item1.setBoxNumber(boxNumber);//获取箱数
|
|
|
//boxNumber=boxNumber.divide(item.getPiecesBox(),6,BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
- //item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
|
- //item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
|
- //item1.setTotalNetWeight(boxNumber.multiply(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
|
- //BigDecimal volume=boxNumber.multiply(item1.getOuterBoxHeight());//获取体积
|
|
|
- // volume=volume.multiply(item1.getOuterBoxLength());
|
|
|
- //volume=volume.multiply(item1.getOuterBoxWidth());
|
|
|
+ //item1.setTotalNetWeight(boxNumber.multip1ly(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
|
+ //item1.setTotalGrossWeight(boxNumber.multip1ly(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
|
+ //item1.setTotalNetWeight(boxNumber.multip1ly(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
|
+ //BigDecimal volume=boxNumber.multip1ly(item1.getOuterBoxHeight());//获取体积
|
|
|
+ // volume=volume.multip1ly(item1.getOuterBoxLength());
|
|
|
+ //volume=volume.multip1ly(item1.getOuterBoxWidth());
|
|
|
//item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));//获取总体积 长*宽*高*箱数
|
|
|
|
|
|
//item.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
@@ -351,15 +352,15 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
|
//item1.setRemainingQuantity(boxNumber);//该尺码的剩余数量
|
|
|
item1.setSize(size.getSize());//获取尺码
|
|
|
item1.setActualPackingQty(size.getQuantity());//获取该尺码计划装箱数量 z
|
|
|
- item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
+ item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()).setScale(2, RoundingMode.HALF_UP));//获取总价 箱数*单价-->件数*单价
|
|
|
// item1.setBoxNumber(boxNumber);//获取箱数
|
|
|
//boxNumber=boxNumber.divide(item.getPiecesBox(),6,BigDecimal.ROUND_HALF_UP);
|
|
|
- //item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
|
- //item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
|
- //item1.setTotalNetWeight(boxNumber.multiply(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
|
- //BigDecimal volume=boxNumber.multiply(item1.getOuterBoxHeight());
|
|
|
- //volume=volume.multiply(item1.getOuterBoxLength());
|
|
|
- //volume=volume.multiply(item1.getOuterBoxWidth());
|
|
|
+ //item1.setTotalNetWeight(boxNumber.multip1ly(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
|
+ //item1.setTotalGrossWeight(boxNumber.multip1ly(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
|
+ //item1.setTotalNetWeight(boxNumber.multip1ly(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
|
+ //BigDecimal volume=boxNumber.multip1ly(item1.getOuterBoxHeight());
|
|
|
+ //volume=volume.multip1ly(item1.getOuterBoxLength());
|
|
|
+ //volume=volume.multip1ly(item1.getOuterBoxWidth());
|
|
|
//item1.setTotalVolume(volume.divide(new BigDecimal(1000000)));//获取总体积 长*宽*高*箱数
|
|
|
|
|
|
|
|
@@ -861,7 +862,7 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
|
item1.setInventoryName(syItem.getInventoryName());//存货名称
|
|
|
item1.setAcSetNo(syItem.getAccount());//获取账套号
|
|
|
item1.setHod(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(syItem.getPreDeliveryDate()));//预发货日期
|
|
|
- item1.setTotalPrice(item1.getTotal().multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
+ item1.setTotalPrice(item1.getTotal().multiply(item1.getUnitPrice()).setScale(2, RoundingMode.HALF_UP));//获取总价 箱数*单价-->件数*单价
|
|
|
item1.setOrderNumber(syItem.getOrderNumber());//获取订单号
|
|
|
//item1.setWithCode(syItem.getCodingRules());//配码规则 因为导出文件新加了配码字段所以注释
|
|
|
item1.setSpurOrSubOrder(syItem.getPurOrSubOrder());//获取采购委外订货号
|