Kaynağa Gözat

结算单推送调整

fenghaifu 1 hafta önce
ebeveyn
işleme
1d1a594ec6

+ 11 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/mapper/SyPackingListTailoringMapper.java

@@ -1,5 +1,6 @@
 package org.jeecg.modules.splt.mapper;
 
+import com.baomidou.dynamic.datasource.annotation.DS;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
@@ -102,5 +103,14 @@ public interface SyPackingListTailoringMapper extends BaseMapper<SyPackingListTa
 
     Map<String, Object> getAccount2(@Param("params1")String params1,@Param("params2") String params2);
 
-    public String getCvenCode(@Param("account")String account,@Param("documentNo")String documentNo);
+//    public String getCvenCode(@Param("account")String account,@Param("documentNo")String documentNo);
+
+    @DS(value = "multi-one")
+    public String getCvenCode1(@Param("documentNo")String documentNo);
+
+    @DS(value = "multi-two")
+    public String getCvenCode2(@Param("documentNo")String documentNo);
+
+    @DS(value = "multi-three")
+    public String getCvenCode3(@Param("documentNo")String documentNo);
 }

+ 21 - 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/mapper/xml/syPackingListTailoringMapper.xml

@@ -280,11 +280,11 @@
         where  ${orderName}
     </select>
 
-    <select id="getCvenCode" parameterType="java.lang.String" resultType="java.lang.String">
-        select cVenCode
-        from UFDATA_${account}_2021.dbo.PurBillVouch
-        where cpbvcode=#{documentNo}
-    </select>
+<!--    <select id="getCvenCode" parameterType="java.lang.String" resultType="java.lang.String">-->
+<!--        select cVenCode-->
+<!--        from UFDATA_${account}_2021.dbo.PurBillVouch-->
+<!--        where cpbvcode=#{documentNo}-->
+<!--    </select>-->
 
     <select id="getOmOrPoItem" parameterType="java.lang.String" resultType="java.util.HashMap">
         select  iMoney,iNatUnitPrice, iTaxPrice ,iPerTaxRate ,iNatMoney,iorderdid as iSOsID,${id} as id,inum,iUnitPrice   from ${tableName} where  ${orderName}
@@ -469,4 +469,20 @@
         and shipping_order_number is not null ) and time_Stuta=4
     </update>
 
+    <select id="getCvenCode1" parameterType="java.lang.String" resultType="java.lang.String">
+        select cVenCode
+        from PurBillVouch
+        where cpbvcode=#{documentNo}
+    </select>
+    <select id="getCvenCode2" parameterType="java.lang.String" resultType="java.lang.String">
+        select cVenCode
+        from PurBillVouch
+        where cpbvcode=#{documentNo}
+    </select>
+    <select id="getCvenCode3" parameterType="java.lang.String" resultType="java.lang.String">
+        select cVenCode
+        from PurBillVouch
+        where cpbvcode=#{documentNo}
+    </select>
+
 </mapper>

+ 13 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/splt/service/impl/SyPackingListTailoringServiceImpl.java

@@ -2496,7 +2496,7 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 			if(code.indexOf(account+"采购")>-1){
 				String documentNo="";
 				documentNo=code.substring(code.indexOf(account+"采购发票单号")+9,code.indexOf(account+"采购发票单号")+20);
-				cvenCode =syPackingListTailoringMapper.getCvenCode(account,documentNo);
+				cvenCode =getCvenCode(account,documentNo);
 			}
 			if(code!=null&& ((code.indexOf("101采购发票")>-1&&account.equals("101")&&(cvenCode.equals("T010001")||cvenCode.equals("T030001")))
 					||(code.indexOf("102采购发票")>-1&&account.equals("102")&&cvenCode.equals("T020001"))
@@ -3198,4 +3198,16 @@ public class SyPackingListTailoringServiceImpl extends ServiceImpl<SyPackingList
 		}
 		return respUpdateVO;
 	}
+
+	private String getCvenCode(String account, String documentNo){
+		if ("101".equals(account)){
+			return syPackingListTailoringMapper.getCvenCode1(documentNo);
+		}else if ("102".equals(account)){
+			return syPackingListTailoringMapper.getCvenCode2(documentNo);
+		}else if ("103".equals(account)){
+			return syPackingListTailoringMapper.getCvenCode3(documentNo);
+		}
+		return "";
+	}
+
 }