This commit is contained in:
linfso 2025-01-03 07:46:06 +08:00
parent d2db6380a4
commit 008964963e

View File

@ -2,10 +2,7 @@ package com.xdadan.erp.emis.domain.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.xdadan.erp.emis.domain.EmisWaybill;
import com.xdadan.erp.emis.domain.EmisWaybillAttachment;
import com.xdadan.erp.emis.domain.EmisWaybillCargo;
import com.xdadan.erp.emis.domain.EmisWaybillFeeitem;
import com.xdadan.erp.emis.domain.*;
import lombok.Data;
import javax.validation.constraints.NotBlank;
@ -397,7 +394,9 @@ public class WaybillOrder implements Serializable {
public static WaybillOrder toVo(EmisWaybill dbWaybill,
List<EmisWaybillCargo> dbCargoList,
List<EmisWaybillFeeitem> dbFeeitemList,
List<EmisWaybillAttachment> dbAttachmentList
List<EmisWaybillAttachment> dbAttachmentList,
List<EmisWaybillDeclareGoods> dbDecareGoodsList,
List<EmisWaybillDeclareAttachment> dbDeclareAttachmentList
){
WaybillOrder voItem = new WaybillOrder();
@ -406,11 +405,18 @@ public class WaybillOrder implements Serializable {
FeeItem feeItemCvt = new FeeItem();
Attachment attachmentCvt = new Attachment();
DeclareGoods declareGoodsCvt = new DeclareGoods();
DeclareAttachment declareAttachmentCvt = new DeclareAttachment();
// 转换其他list
voItem.setCargoList(cargoCvt.cvtToVoList(dbCargoList));
voItem.setFeeItems(feeItemCvt.cvtToVoList(dbFeeitemList));
voItem.setAttachmentList(attachmentCvt.cvtToVoList(dbAttachmentList));
voItem.setDeclareGoodsList(declareGoodsCvt.cvtToVoList(dbDecareGoodsList));
voItem.setDeclareAttachmentList(declareAttachmentCvt.cvtToVoList(dbDeclareAttachmentList));
// 收件人
Reciever reciever = new Reciever();
@ -645,8 +651,6 @@ public class WaybillOrder implements Serializable {
voItem.setOrderRemark(dbWaybill.getOrderRemark());
return voItem;
}
@ -660,12 +664,20 @@ public class WaybillOrder implements Serializable {
Cargo cargoCvt = new Cargo();
FeeItem feeItemCvt = new FeeItem();
Attachment attachmentCvt = new Attachment();
DeclareGoods declareGoodsCvt = new DeclareGoods();
DeclareAttachment declareAttachmentCvt = new DeclareAttachment();
// 设置货物信息
dbWaybill.setCargoList(cargoCvt.cvtToDbList(this.getCargoList()));
dbWaybill.setFeeitemList(feeItemCvt.cvtToDbList(this.getFeeItems()));
dbWaybill.setAttachmentList(attachmentCvt.cvtToDbList(this.getAttachmentList()));
dbWaybill.setDeclareGoodsList(declareGoodsCvt.cvtToDbList(this.getDeclareGoodsList()));
dbWaybill.setDeclareAttachmentList(declareAttachmentCvt.cvtToDbList(this.getDeclareAttachmentList()));
dbWaybill.setOrderSn(this.getOrderSn());
dbWaybill.setCustOrderId(this.getCustOrderId());
dbWaybill.setBillCode(this.getBillCode());