Browse Source

Merge remote-tracking branch 'origin/master'

mashengyi 1 year ago
parent
commit
46a5428fa8

+ 20 - 6
src/main/java/com/jkcredit/invoice/credit/interserver/NoCarInterServiceImpl.java

@@ -293,6 +293,13 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             Integer titleType = jsonObject.getInteger("titleType");
             //税号 必选
             String taxplayerCode = jsonObject.getString("taxplayerCode");
+             //base流文件 必选
+            String base64Str = jsonObject.getString("base64Str");
+            //运单协议名称 必选
+            String waybillFileName = jsonObject.getString("waybillFileName");
+            //运单类型 必选
+            Integer contractType = jsonObject.getInteger("contractType");
+
             if (StringUtils.isEmpty(data) || null == jsonObject
                     || StringUtils.isEmpty(num)
                     || StringUtils.isEmpty(plateNumber)
@@ -304,6 +311,9 @@ public class NoCarInterServiceImpl implements NoCarInterService {
                     || null == fee
                     || null == titleType
                     || StringUtils.isEmpty(taxplayerCode)
+                    || StringUtils.isEmpty(base64Str)
+                    || StringUtils.isEmpty(waybillFileName)
+                    || null == contractType
 
             ) {
                 result.setMsg("必传参数有空值");
@@ -326,9 +336,6 @@ public class NoCarInterServiceImpl implements NoCarInterService {
                 return result;
             }
             NoCarWayBill noCarWayBill = getNoCarWayBill(appKey, num, plateNumber, plateColor, startTime, sourceAddr, destAddr, predictEndTime, fee, titleType, taxplayerCode, customerRec);
-            String base64Str = jsonObject.getString("base64Str");
-            String waybillFileName = jsonObject.getString("waybillFileName");
-            String contractType = jsonObject.getString("contractType");
             noCarWayBill.setWaybillFileName(waybillFileName);
             noCarWayBill.setBase64Str(base64Str);
             noCarWayBill.setContractType(contractType);
@@ -494,6 +501,12 @@ public class NoCarInterServiceImpl implements NoCarInterService {
             Integer titleType = jsonObject.getInteger("titleType");
             //税号 必选
             String taxplayerCode = jsonObject.getString("taxplayerCode");
+
+            String base64Str = jsonObject.getString("base64Str");
+            String waybillFileName = jsonObject.getString("waybillFileName");
+            Integer contractType = jsonObject.getInteger("contractType");
+
+
             if (StringUtils.isEmpty(data) || null == jsonObject
                     || StringUtils.isEmpty(num)
                     || StringUtils.isEmpty(plateNumber)
@@ -505,6 +518,9 @@ public class NoCarInterServiceImpl implements NoCarInterService {
                     || null == fee
                     || null == titleType
                     || StringUtils.isEmpty(taxplayerCode)
+                    || StringUtils.isEmpty(base64Str)
+                    || StringUtils.isEmpty(waybillFileName)
+                    || null == contractType
             ) {
                 result.setMsg("有空的必填运单要素,请检查");
                 return result;
@@ -526,9 +542,7 @@ public class NoCarInterServiceImpl implements NoCarInterService {
                 return result;
             }
             NoCarWayBill noCarWayBill = getNoCarWayBills(appKey, num, plateNumber, plateColor, startTime, sourceAddr, destAddr, predictEndTime, fee, titleType, taxplayerCode, customerRec);
-            String base64Str = jsonObject.getString("base64Str");
-            String waybillFileName = jsonObject.getString("waybillFileName");
-            String contractType = jsonObject.getString("contractType");
+
             noCarWayBill.setWaybillFileName(waybillFileName);
             noCarWayBill.setBase64Str(base64Str);
             noCarWayBill.setContractType(contractType);

+ 3 - 3
src/main/java/com/jkcredit/invoice/model/entity/waybill/NoCarWayBill.java

@@ -165,7 +165,7 @@ public class NoCarWayBill implements Cloneable {
     /**
      * 协议类型
      */
-    private String contractType;
+    private Integer contractType;
 
     /**
      * 平台操作批次号
@@ -559,11 +559,11 @@ public class NoCarWayBill implements Cloneable {
         this.base64Str = base64Str;
     }
 
-    public String getContractType() {
+    public Integer getContractType() {
         return contractType;
     }
 
-    public void setContractType(String contractType) {
+    public void setContractType(Integer contractType) {
         this.contractType = contractType;
     }
 

+ 3 - 0
src/main/resources/mapper/waybill/WayBillFileMapper.xml

@@ -25,6 +25,9 @@
         <include refid="baseSql" />
         from t_waybill_File
         <where>
+            <if test="noCarWayBillFileInfo.customerId != null and noCarWayBillFileInfo.customerId != ''">
+                and  customerId = BINARY #{noCarWayBillFileInfo.customerId}
+            </if>
             <if test="noCarWayBillFileInfo.batchNum != null and noCarWayBillFileInfo.batchNum != ''">
                 and  batchNum =  BINARY #{noCarWayBillFileInfo.batchNum}
             </if>