Browse Source

成衣外销发票号取托书号

fenghaifu 20 hours ago
parent
commit
5b8c68266b

+ 33 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/letterDeposit/entity/VO/ReqLetterDepositItemVO.java

@@ -0,0 +1,33 @@
+package org.jeecg.modules.documents.letterDeposit.entity.VO;
+
+import lombok.Data;
+import org.jeecg.common.util.DateUtils;
+import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDeposit;
+import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem;
+
+/**
+ * 推送预托书到SRM行实体
+ * @author fhf
+ * @date 2025/4/1
+ */
+@Data
+public class ReqLetterDepositItemVO {
+    // 预托书编号(表头)
+    private String vbillcode;
+    // 船期(表头)
+    private String shippingDate;
+    // 预托书子表ID(表体)
+    private String letterDepositItemId;
+    // 预装箱单ID(表体)
+    private String syPreAssembledPackingListItemId;
+    // 集装箱号(表体)
+    private String containerNumber;
+
+    public void fromLetterDeposit(SyLetterDepositItem syLetterDepositItem, SyLetterDeposit syLetterDeposit){
+        vbillcode = syLetterDeposit.getDepositaryReceiptNo();
+        shippingDate = DateUtils.date2Str(syLetterDeposit.getTheFinalShippingDate(),DateUtils.date_sdf.get());
+        letterDepositItemId = syLetterDepositItem.getId();
+        syPreAssembledPackingListItemId = syLetterDepositItem.getSyPreAssembledPackingListItemId();
+        containerNumber = syLetterDepositItem.getContainerNumber();
+    }
+}

+ 45 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/entity/VO/ReqShippingOrderItemVO.java

@@ -0,0 +1,45 @@
+package org.jeecg.modules.documents.syShippingOrder.entity.VO;
+
+import lombok.Data;
+import org.jeecg.common.util.DateUtils;
+import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDeposit;
+import org.jeecg.modules.documents.letterDeposit.entity.SyLetterDepositItem;
+import org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrder;
+import org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem;
+
+import java.math.BigDecimal;
+
+/**
+ * 推送托书子表实体
+ * @author fhf
+ * @date 2025/4/1
+ */
+@Data
+public class ReqShippingOrderItemVO {
+    // 托书编号(表头)
+    private String vbillcode;
+    // 外销发票号(表头)
+    private String exportInvoiceNo;
+    // 托书子表ID(表体)
+    private String shippingOrderItemId;
+    // 装箱单(成衣/面辅料)子表ID(表体)
+    private String tailoringFabricItemId;
+    // 实际报关数量(表体)
+    private BigDecimal number;
+    // 报关单价(表体)
+    private BigDecimal declarationUnitPrice;
+
+
+    public void fromShippingOrder(SyShippingOrderItem shippingOrderItem,
+                                  SyShippingOrder shippingOrder){
+        vbillcode = shippingOrder.getShippingOrderNumber();
+        shippingOrderItemId = shippingOrderItem.getId();
+        tailoringFabricItemId = shippingOrderItem.getTailoringFabricItemId();
+        number = shippingOrderItem.getNumber();
+        declarationUnitPrice = shippingOrderItem.getDeclarationUnitPrice();
+        exportInvoiceNo = shippingOrder.getExportInvoiceNo();
+        if("成衣".equals(shippingOrder.getReadyFabric())){
+            exportInvoiceNo = vbillcode;
+        }
+    }
+}