Преглед на файлове

原始运单 默认不开启,增加开关控制,如果不开启,那就模拟返回成功呗

mashengyi преди 7 месеца
родител
ревизия
3c8afcbad3
променени са 1 файла, в които са добавени 24 реда и са изтрити 3 реда
  1. 24 3
      src/main/java/com/jkcredit/invoice/service/lowerservice/impl/NoCarServiceImpl.java

+ 24 - 3
src/main/java/com/jkcredit/invoice/service/lowerservice/impl/NoCarServiceImpl.java

@@ -54,6 +54,7 @@ import com.jkcredit.invoice.service.upservice.NoCarInterface;
 import com.jkcredit.invoice.util.DateUtil;
 import com.jkcredit.invoice.util.MathUtil;
 import com.jkcredit.invoice.util.RespR;
+import com.jkcredit.invoice.util.StringUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -78,6 +79,7 @@ import static com.jkcredit.invoice.common.CommonConst.FOR_NUM;
 import static com.jkcredit.invoice.common.CommonConst.INTONE;
 import static com.jkcredit.invoice.common.CommonConst.INTTOW;
 import static com.jkcredit.invoice.common.CommonConst.NE_FIVE_NUM;
+import static com.jkcredit.invoice.common.CommonConst.ONE;
 import static com.jkcredit.invoice.common.CommonConst.ONE_NUM;
 import static com.jkcredit.invoice.common.CommonConst.THREE_NUM;
 import static com.jkcredit.invoice.common.CommonConst.TWO_NUM;
@@ -634,7 +636,7 @@ public class NoCarServiceImpl implements NoCarService {
                     noCarWayBill.setFailReason("ysyd:"+responseRespR1.getMsg());
                     insertOrUpdateBillStart(noCarWayBill);
                     return new RespR(false, responseRespR1.getMsg());
-                }else{
+                } else {
                     noCarWayBill.setBillwayStatus(1);
                     insertOrUpdateBillStart(noCarWayBill);
                 }
@@ -642,7 +644,26 @@ public class NoCarServiceImpl implements NoCarService {
             return new RespR(responseRespR.getData());
         }
     }
-    public RespR<WaybillOriginEndResponse> sendOrgWayBillInfo(NoCarWayBill noCarWayBill){
+
+    /**
+     * 运单开始指令 上传原始运单功能
+     *
+     * @param noCarWayBill
+     * @return com.jkcredit.invoice.util.RespR<cn.com.taiji.sdk.model.comm.protocol.tts.waybill.WaybillOriginEndResponse>
+     * @throws
+     * @createDate 2024/4/25 上午9:20
+     * @author mashengyi
+     */
+    public RespR<WaybillOriginEndResponse> sendOrgWayBillInfo(NoCarWayBill noCarWayBill) {
+        String param = paramService.getParamsByParamName("SEND_ORG_WAYBILLINFO_ON_OFF").getParamValue();
+        if (!StringUtil.equal(ONE, param)) {
+            //原始运单 默认不开启,增加开关控制,如果不开启,那就模拟返回成功呗
+            RespR<WaybillOriginEndResponse> responseRespR = new RespR<>();
+            responseRespR.setCode(0);
+            responseRespR.setMsg("success");
+            return responseRespR;
+        }
+
         WaybillOriginEndRequest waybillOriginEndRequest = new WaybillOriginEndRequest();
         waybillOriginEndRequest.setNum(noCarWayBill.getBillNum());
         //如果调用上游测试环境, 默认自营平台 10000148
@@ -651,7 +672,7 @@ public class NoCarServiceImpl implements NoCarService {
         waybillOriginEndRequest.setCompanyNum(companyNum);
         waybillOriginEndRequest.setBase64Str(noCarWayBill.getBase64Str());
         waybillOriginEndRequest.setWaybillFileName(noCarWayBill.getWaybillFileName());
-        if(noCarWayBill.getBase64Str() == null){
+        if (noCarWayBill.getBase64Str() == null) {
             NoCarWayBillFileInfo noCarWayBillFileInfo =  wayBillFileMapper.selectFileInfo(noCarWayBill.getFileBatchNum(),noCarWayBill.getBillNum());
             if(noCarWayBillFileInfo!=null){
                 waybillOriginEndRequest.setWaybillFileName(noCarWayBillFileInfo.getFileName());