Browse Source

先收到008时进口申报单id回写

linbl 6 months ago
parent
commit
ceea6be43e

+ 3 - 3
sp-service/level-one-server/src/main/java/com/pj/ht_trade_settlement/HtTradeSettlementMapper.xml

@@ -28,16 +28,16 @@
 			<if test=' this.has("declareName") '> and declare_name = #{declareName} </if>
 			<if test=' this.has("idno") '> and idno = #{idno} </if>
 			<if test=' this.has("shopNo") '> and shop_no = #{shopNo} </if>
-			<if test=' this.has("shopName") '> and shop_name = #{shopName} </if>
+			<if test=' this.has("shopName") '> and shop_name like concat('%',#{shopName},'%') </if>
 			<if test=' this.has("orgPutrecNo") '> and org_putrec_no = #{orgPutrecNo} </if>
 			<if test=' this.has("orgName") '> and org_name = #{orgName} </if>
 			<if test=' this.has("orgScc") '> and org_scc = #{orgScc} </if>
-			<if test=' this.has("veNo") '> and ve_no = #{veNo} </if>
+			<if test=' this.has("veNo") '> and ve_no like concat('%',#{veNo},'%') </if>
 			<if test=' this.has("btrnbBizModecd") '> and btrnb_biz_modecd = #{btrnbBizModecd} </if>
 			<if test=' this.has("gFlow") '> and g_flow = #{gFlow} </if>
 			<if test=' this.has("iEFlag") '> and i_e_flag = #{iEFlag} </if>
 			<if test=' this.has("fieldCode") '> and field_code = #{fieldCode} </if>
-			<if test=' this.has("fieldName") '> and field_name = #{fieldName} </if>
+			<if test=' this.has("fieldName") '> and field_name like concat('%',#{fieldName},'%') </if>
 			<if test=' this.has("customsCode") '> and customs_code = #{customsCode} </if>
 			<if test=' this.has("carPool") '> and car_pool = #{carPool} </if>
 			<if test=' this.has("sumAmt") '> and sum_amt = #{sumAmt} </if>

+ 11 - 4
sp-service/level-one-server/src/main/java/com/pj/ht_trade_settlement/HtTradeSettlementService.java

@@ -5,14 +5,13 @@ import cn.hutool.json.JSONUtil;
 import cn.hutool.log.StaticLog;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.pj.api.dto.BorderBuyGoodsListDto;
-import com.pj.api.dto.BordersListDto;
-import com.pj.api.dto.SellGoodsListDto;
-import com.pj.api.dto.TradeSettlementDto;
+import com.pj.api.dto.*;
 import com.pj.current.config.SystemObject;
 import com.pj.enummj.*;
 import com.pj.tb_goods.TbGoods;
 import com.pj.tb_goods.TbGoodsService;
+import com.pj.tb_import_order.TbImportOrder;
+import com.pj.tb_import_order.TbImportOrderService;
 import com.pj.tb_order.TbOrder;
 import com.pj.tb_order.TbOrderMapper;
 import com.pj.tb_people.TbPeople;
@@ -58,6 +57,8 @@ public class HtTradeSettlementService extends ServiceImpl<HtTradeSettlementMappe
     private TbGoodsService tbGoodsService;
     @Resource
     private TbShopService tbShopService;
+    @Resource
+    private TbImportOrderService tbImportOrderService;
 
     /**
      * 增
@@ -140,6 +141,12 @@ public class HtTradeSettlementService extends ServiceImpl<HtTradeSettlementMappe
             //申报单类型,用以后续判断当前订单是否是委托单
             tbOrder.setDeclareType(tradeSettlementDto.getDeclareType());
 
+            //008进口申报单
+            List<TbImportOrder> importOrderList = tbImportOrderService.lambdaQuery().eq(TbImportOrder::getPlatSeqNo, item.getPreIeportNo()).list();
+            if(importOrderList.size() > 0) {
+                tbOrder.setImportOrderId(importOrderList.get(0).getId());
+            }
+
             //获取商品单价
             if(sellGoodsListDtoList.size() > 0) tbOrder.setDeclPrice(sellGoodsListDtoList.get(0).getDeclPrice());