|
@@ -53,8 +53,8 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
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.setTotal(boxNumber.multiply(item1.getPiecesBox()));//获取该尺码件数
|
|
|
|
- item1.setBoxNumber(boxNumber);
|
|
|
|
|
|
+ item1.setTotal(boxNumber.multiply(item1.getPiecesBox()));//该尺码件数
|
|
|
|
+ item1.setBoxNumber(boxNumber);//获取箱数
|
|
item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
//item1.setTotalNetWeight(boxNumber.multiply(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
//item1.setTotalNetWeight(boxNumber.multiply(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
@@ -62,7 +62,8 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
volume=volume.multiply(item1.getOuterBoxLength());
|
|
volume=volume.multiply(item1.getOuterBoxLength());
|
|
volume=volume.multiply(item1.getOuterBoxWidth());
|
|
volume=volume.multiply(item1.getOuterBoxWidth());
|
|
item1.setTotalVolume(volume);//获取总体积 长*宽*高*箱数
|
|
item1.setTotalVolume(volume);//获取总体积 长*宽*高*箱数
|
|
- item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价
|
|
|
|
|
|
+ boxNumber=boxNumber.multiply(item1.getPiecesBox());//获取该尺码件数
|
|
|
|
+ item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
item1.setSize(size.getSize());//获取尺码
|
|
item1.setSize(size.getSize());//获取尺码
|
|
item1.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
item1.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
item1.setSort(size.getNum());//获取序号
|
|
item1.setSort(size.getNum());//获取序号
|
|
@@ -76,13 +77,14 @@ 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().divide(item.getPiecesBox(),2,BigDecimal.ROUND_HALF_UP);//获取箱数比例
|
|
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(new BigDecimal(size.getProportion())));//该尺码件数
|
|
|
|
|
|
+ item1.setTotal(boxNumber.multiply(item1.getPiecesBox()));//该尺码件数
|
|
|
|
+ item1.setBoxNumber(boxNumber);//获取箱数
|
|
item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
item1.setTotalNetWeight(boxNumber.multiply(item1.getNetWeight()));//获取总净重 净重*箱数
|
|
item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
item1.setTotalGrossWeight(boxNumber.multiply(item1.getGrossWeight()));//获取总毛重 箱数*毛重/箱
|
|
//item1.setTotalNetWeight(boxNumber.multiply(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
//item1.setTotalNetWeight(boxNumber.multiply(new BigDecimal(size.getProportion())));//获取净净重 不知
|
|
@@ -90,7 +92,8 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
volume=volume.multiply(item1.getOuterBoxLength());
|
|
volume=volume.multiply(item1.getOuterBoxLength());
|
|
volume=volume.multiply(item1.getOuterBoxWidth());
|
|
volume=volume.multiply(item1.getOuterBoxWidth());
|
|
item1.setTotalVolume(volume);//获取总体积 长*宽*高*箱数
|
|
item1.setTotalVolume(volume);//获取总体积 长*宽*高*箱数
|
|
- item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价
|
|
|
|
|
|
+ boxNumber=boxNumber.multiply(item1.getPiecesBox());//获取该尺码件数
|
|
|
|
+ item1.setTotalPrice(boxNumber.multiply(item1.getUnitPrice()));//获取总价 箱数*单价-->件数*单价
|
|
//item.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
//item.setSyDeclarationElementsItemId(size.getItemId());//获取到发运明细子表id
|
|
item1.setId(size.getItemId());//从尺码表中获取到id
|
|
item1.setId(size.getItemId());//从尺码表中获取到id
|
|
// 获取到发运明细子表id
|
|
// 获取到发运明细子表id
|
|
@@ -117,9 +120,12 @@ public class SyPreAssembledPackingListServiceImpl extends ServiceImpl<SyPreAssem
|
|
public SyPreAssembledPackingList saveMain2(SyPreAssembledPackingList syPreAssembledPackingList) {
|
|
public SyPreAssembledPackingList saveMain2(SyPreAssembledPackingList syPreAssembledPackingList) {
|
|
List<SyPreAssembledPackingListItem> items=syPreAssembledPackingList.getSyPreAssembledPackingListItemList();
|
|
List<SyPreAssembledPackingListItem> items=syPreAssembledPackingList.getSyPreAssembledPackingListItemList();
|
|
syPreAssembledPackingList.setDocumentNo(oConvertUtils.id());//随机单据号
|
|
syPreAssembledPackingList.setDocumentNo(oConvertUtils.id());//随机单据号
|
|
|
|
+ if(oConvertUtils.isEmpty(syPreAssembledPackingList.getOrderNumber())){
|
|
|
|
+ syPreAssembledPackingList.setOrderNumber(oConvertUtils.id());//随机订单号
|
|
|
|
+ }
|
|
syPreAssembledPackingList.setDelFlag("0");//删除状态默认为0
|
|
syPreAssembledPackingList.setDelFlag("0");//删除状态默认为0
|
|
syPreAssembledPackingList.setPushStatus("0");//推送状态默认为0
|
|
syPreAssembledPackingList.setPushStatus("0");//推送状态默认为0
|
|
- syPreAssembledPackingList.setStatus("0");//单据装填默认为0
|
|
|
|
|
|
+ syPreAssembledPackingList.setStatus("0");//单据状态默认为0
|
|
syPreAssembledPackingListMapper.insert(syPreAssembledPackingList);//往主表添加数据
|
|
syPreAssembledPackingListMapper.insert(syPreAssembledPackingList);//往主表添加数据
|
|
if(syPreAssembledPackingList.getSyPreAssembledPackingListItemList()!=null){
|
|
if(syPreAssembledPackingList.getSyPreAssembledPackingListItemList()!=null){
|
|
add(syPreAssembledPackingList.getSyPreAssembledPackingListItemList(),syPreAssembledPackingList.getId());
|
|
add(syPreAssembledPackingList.getSyPreAssembledPackingListItemList(),syPreAssembledPackingList.getId());
|