|
@@ -48,27 +48,28 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
for (SyPreAssembledPackingListItem item : items){
|
|
for (SyPreAssembledPackingListItem item : items){
|
|
List<SizeTable> sizes=item.getSizeTables();//获取尺码表信息
|
|
List<SizeTable> sizes=item.getSizeTables();//获取尺码表信息
|
|
item.setSyPreAssembledPackingListId(pid);//获取主表id
|
|
item.setSyPreAssembledPackingListId(pid);//获取主表id
|
|
- BigDecimal boxNumber1=item.getBoxNumber().divide(item.getPiecesBox(),2,BigDecimal.ROUND_HALF_UP);//获取箱数
|
|
|
|
- item.setDelFlag("0");
|
|
|
|
|
|
+ BigDecimal boxNumber1=item.getBoxNumber();//获取箱数
|
|
|
|
+ item.setDelFlag("0");//默认为未删除
|
|
for (SizeTable size : sizes){
|
|
for (SizeTable size : sizes){
|
|
SyPreAssembledPackingListItem item1=item;
|
|
SyPreAssembledPackingListItem item1=item;
|
|
- BigDecimal boxNumber=boxNumber1.multiply(new BigDecimal(size.getProportion()));//获取该尺码箱数
|
|
|
|
- item1.setTotal(boxNumber.multiply(item1.getPiecesBox()));//该尺码件数
|
|
|
|
- item1.setBoxNumber(boxNumber);//获取箱数
|
|
|
|
- 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.setTotalVolume(volume);//获取总体积 长*宽*高*箱数
|
|
|
|
- boxNumber=boxNumber.multiply(item1.getPiecesBox());//获取该尺码件数
|
|
|
|
- item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
|
|
|
+ BigDecimal boxNumber=boxNumber1.multiply(new BigDecimal(size.getProportion()));//获取该尺码件数
|
|
|
|
+ item1.setTotal(boxNumber);//该尺码件数
|
|
item1.setSize(size.getSize());//获取尺码
|
|
item1.setSize(size.getSize());//获取尺码
|
|
|
|
+ item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
|
+// item1.setBoxNumber(boxNumber);//获取箱数
|
|
|
|
+
|
|
|
|
+// 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.setTotalVolume(volume);//获取总体积 长*宽*高*箱数
|
|
|
|
+
|
|
item1.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
item1.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
item1.setSort(size.getNum());//获取序号
|
|
item1.setSort(size.getNum());//获取序号
|
|
item1.setId(oConvertUtils.id());//获取到随机id
|
|
item1.setId(oConvertUtils.id());//获取到随机id
|
|
- int row =syPreAssembledPackingListItemMapper.insert(item1);//添加子表数据
|
|
|
|
|
|
+ syPreAssembledPackingListItemMapper.insert(item1);//添加子表数据
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return items;
|
|
return items;
|
|
@@ -77,23 +78,24 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
List<SyPreAssembledPackingListItem> update(List<SyPreAssembledPackingListItem> items,String pid){
|
|
List<SyPreAssembledPackingListItem> update(List<SyPreAssembledPackingListItem> items,String pid){
|
|
for (SyPreAssembledPackingListItem item : items){
|
|
for (SyPreAssembledPackingListItem item : items){
|
|
List<SizeTable> sizes=item.getSizeTables();//获取尺码表信息
|
|
List<SizeTable> sizes=item.getSizeTables();//获取尺码表信息
|
|
- BigDecimal boxNumber1=item.getBoxNumber().divide(item.getPiecesBox(),2,BigDecimal.ROUND_HALF_UP);//获取箱数比例
|
|
|
|
|
|
+ BigDecimal boxNumber1=item.getBoxNumber();//获取箱数
|
|
item.setDelFlag("0");
|
|
item.setDelFlag("0");
|
|
for (SizeTable size : sizes){
|
|
for (SizeTable size : sizes){
|
|
SyPreAssembledPackingListItem item1=item;
|
|
SyPreAssembledPackingListItem item1=item;
|
|
- BigDecimal boxNumber=boxNumber1.multiply(new BigDecimal(size.getProportion()));//获取该尺码箱数
|
|
|
|
|
|
+ BigDecimal boxNumber=boxNumber1.multiply(new BigDecimal(size.getProportion()));//获取该尺码件数
|
|
item1.setSize(size.getSize());//获取尺码信息
|
|
item1.setSize(size.getSize());//获取尺码信息
|
|
- item1.setTotal(boxNumber.multiply(item1.getPiecesBox()));//该尺码件数
|
|
|
|
- item1.setBoxNumber(boxNumber);//获取箱数
|
|
|
|
- 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.setTotalVolume(volume);//获取总体积 长*宽*高*箱数
|
|
|
|
- boxNumber=boxNumber.multiply(item1.getPiecesBox());//获取该尺码件数
|
|
|
|
|
|
+ item1.setTotal(boxNumber);//该尺码件数
|
|
item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
|
|
+ //item1.setBoxNumber(boxNumber);//获取箱数
|
|
|
|
+
|
|
|
|
+// 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.setTotalVolume(volume);//获取总体积 长*宽*高*箱数
|
|
|
|
+
|
|
//item.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
//item.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
item1.setId(size.getItemId());//从尺码表中获取到id
|
|
item1.setId(size.getItemId());//从尺码表中获取到id
|
|
// 获取到发运明细子表id
|
|
// 获取到发运明细子表id
|