Browse Source

同步更改下游申报要素,发运明细提交

zengtx 2 years ago
parent
commit
9173b3a78d

+ 7 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/SyDeclarationElementsMapper.java

@@ -18,4 +18,11 @@ public interface SyDeclarationElementsMapper extends BaseMapper<SyDeclarationEle
 
     //查询发运明细
     public List<SyShippingDetailsVo> queryList(@Param("elmentId") String elmentId);
+
+    //修改装箱单成衣子表的报关要素ID
+    public void updateTailoring(@Param("newElmentId") String newElmentId, @Param("elmentId") String elmentId);
+    //修改装箱单面料子表的报关要素ID
+    public void updateFabric(@Param("newElmentId") String newElmentId, @Param("elmentId") String elmentId);
+    //修改预装箱单主表的报关要素ID
+    public void updateAssembledPacking(@Param("newElmentId") String newElmentId, @Param("elmentId") String elmentId);
 }

+ 18 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/mapper/xml/SyDeclarationElementsMapper.xml

@@ -10,4 +10,22 @@
         where a.del_flag = '0' and b.del_flag = '0' and b.elements_id = #{elmentId}
 
     </select>
+
+    <update id="updateAssembledPacking">
+        update sy_pre_assembled_packing_list
+        set elements_id = #{newElmentId}
+        where elements_id = #{elmentId} and del_flag = '0'
+    </update>
+
+    <update id="updateFabric">
+        update sy_packing_list_fabric_item
+        set elements_Id = #{newElmentId}
+        where elements_Id = #{elmentId} and del_flag = '0'
+    </update>
+
+    <update id="updateTailoring">
+        update sy_packing_list_tailoring_item
+        set elements_Id = #{newElmentId}
+        where elements_Id = #{elmentId} and del_flag = '0'
+    </update>
 </mapper>

+ 16 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/seclarationElements/service/impl/SyDeclarationElementsServiceImpl.java

@@ -12,6 +12,10 @@ import org.jeecg.modules.documents.shippingDetails.entity.VO.SyShippingDetailsVo
 import org.jeecg.modules.documents.shippingDetails.mapper.SyShippingDetailsMapper;
 import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsItemService;
 import org.jeecg.modules.documents.shippingDetails.service.ISyShippingDetailsService;
+import org.jeecg.modules.spapl.service.ISyPreAssembledPackingListItemService;
+import org.jeecg.modules.splfi.service.ISyPackingListFabricItemService;
+import org.jeecg.modules.splt.entity.SyPackingListTailoringItem;
+import org.jeecg.modules.splt.service.ISyPackingListTailoringItemService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
@@ -41,6 +45,12 @@ public class SyDeclarationElementsServiceImpl extends ServiceImpl<SyDeclarationE
     private SyShippingDetailsMapper syShippingDetailsMapper;
     @Resource
     private SyDeclarationElementsMapper syDeclarationElementsMapper;
+    @Autowired
+    private ISyPackingListFabricItemService iSyPackingListFabricItemService;
+    @Autowired
+    private ISyPackingListTailoringItemService iSyPackingListTailoringItemService;
+    @Autowired
+    private ISyPreAssembledPackingListItemService iSyPreAssembledPackingListItemService;
 
     /**
      * 新增(发运明细调用)
@@ -168,6 +178,12 @@ public class SyDeclarationElementsServiceImpl extends ServiceImpl<SyDeclarationE
 
                 //修改发运明细报关要素ID
                 syShippingDetailsService.writeBackElenmentId(uuid,itemIdsZeor);
+                //修改预装箱单报关要素ID
+                syDeclarationElementsMapper.updateAssembledPacking(uuid,elementid);
+                //修改装箱成衣单报关要素ID
+                syDeclarationElementsMapper.updateTailoring(uuid,elementid);
+                //修改装箱成衣单报关要素ID
+                syDeclarationElementsMapper.updateFabric(uuid,elementid);
 
             }
 

+ 14 - 11
jeecg-boot-module-system/src/main/java/org/jeecg/modules/documents/syShippingOrder/mapper/xml/SyShippingOrderMapper.xml

@@ -82,17 +82,20 @@ d.terms_of_deliveryvalue as termsOfDeliveryvalue
     </select>
 
     <select id="queryItem" resultType="org.jeecg.modules.documents.syShippingOrder.entity.SyShippingOrderItem">
-SELECT GROUP_CONCAT(id) as id, sy_shipping_order_item_id as syShippingOrderItemId, english_name as englishName, style_number as styleNumber, smail_po as smailPo,create_by as createBy,
-sum(number) as number,
-case when ready_fabric != '成衣' then sum(box_number) else box_number end as boxNumber,pk_org as pkOrg,
-case when ready_fabric != '成衣' then sum(gross_weight) else gross_weight end as grossWeight,
-case when ready_fabric != '成衣' then sum(net_weight) else net_weight end as netWeight,
-case when ready_fabric != '成衣' then volume else volume end as volume,round(sum(total_price),2) as totalPrice,
-distribution_point as distributionPoint, container_code as containerCode, container_number as containerNumber, unit_price as unitPrice, pre_shipment_date as preShipmentDate,
-salesman, operating_department as operatingDepartment, purchase_outsourcing_order_no as purOrSubOrder, outsourcing_factory_for_procurement as outsourcingFactoryForProcurement,
- memo, sort, ready_fabric as readyFabric, tailoring_fabric_id as tailoringFabricId, GROUP_CONCAT(tailoring_fabric_item_id) as tailoringFabricItemId,client_abbreviation as clientAbbreviation
- FROM sy_shipping_order_item where del_flag = 0 and sy_shipping_order_item_id = #{id}
-group by group_id order by style_number,smail_po desc
+SELECT GROUP_CONCAT(a.id) as id, a.sy_shipping_order_item_id as syShippingOrderItemId, a.english_name as englishName, a.style_number as styleNumber, a.smail_po as smailPo,a.create_by as createBy,
+sum(a.number) as number,
+case when a.ready_fabric != '成衣' then sum(a.box_number) else a.box_number end as boxNumber,a.pk_org as pkOrg,
+case when a.ready_fabric != '成衣' then sum(a.gross_weight) else a.gross_weight end as grossWeight,
+case when a.ready_fabric != '成衣' then sum(a.net_weight) else a.net_weight end as netWeight,
+case when a.ready_fabric != '成衣' then a.volume else a.volume end as volume,round(sum(a.total_price),2) as totalPrice,
+a.distribution_point as distributionPoint, a.container_code as containerCode, a.container_number as containerNumber, a.unit_price as unitPrice, a.pre_shipment_date as preShipmentDate,
+a.salesman, a.operating_department as operatingDepartment, a.purchase_outsourcing_order_no as purOrSubOrder, a.outsourcing_factory_for_procurement as outsourcingFactoryForProcurement,
+ a.memo, a.sort, a.ready_fabric as readyFabric, a.tailoring_fabric_id as tailoringFabricId, GROUP_CONCAT(a.tailoring_fabric_item_id) as tailoringFabricItemId,a.client_abbreviation as clientAbbreviation
+ FROM sy_shipping_order_item a
+  left join sy_packing_list_tailoring_item c
+on a.tailoring_fabric_item_id = c.id
+  where del_flag = 0 and sy_shipping_order_item_id = #{id}
+group by c.group_id order by style_number,smail_po desc
     </select>
 
 

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/openApi/service/impl/PurchaseWarehousingServiceImpl.java

@@ -858,6 +858,7 @@ public class PurchaseWarehousingServiceImpl extends ServiceImpl<PurchaseWarehous
 //                }
 //            }
         }else{
+            log.info(resturn.getJSONObject(0).get("Description")+"");
             //失败
             throw new RuntimeException(resturn.getJSONObject(0).get("Description")+"");
         }