Browse Source

无车优化,自有车接口返回

Administrator 1 year ago
parent
commit
aa4cccea22

+ 9 - 0
src/main/java/com/jkcredit/invoice/service/lowerservice/impl/NoCarServiceImpl.java

@@ -300,6 +300,9 @@ public class NoCarServiceImpl implements NoCarService {
             return respR;
         }
         WaybillStartRequest waybillStartRequest = buildWaybillStartRequest(noCarWayBill);
+        if(StringUtils.isEmpty(waybillStartRequest.getBase64Str())){
+            return new RespR(false,"未上传运单文件");
+        }
         RespR<WaybillStartResponse> responseRespR = noCarInterface.waybillStart(waybillStartRequest);
         if (responseRespR.getCode() == 1) {
             log.info("运单上传失败:NoCarServiceImpl.noCarWaybillStart{},msg{}", noCarWayBill, responseRespR.getMsg());
@@ -538,6 +541,9 @@ public class NoCarServiceImpl implements NoCarService {
                     noCarWayBillClone.setPredictEndTime(startAndEndTimeStr[1]);
                     noCarWayBillClone.setBillNum(noCarWayBill.getBillNum()+"-jk0"+i);
                     WaybillHistoryStartRequest waybillHistoryStartRequest = buildNoCarHisWaybill(orgBillNum,noCarWayBillClone);
+                    if(StringUtils.isEmpty(waybillHistoryStartRequest.getBase64Str())){
+                        return new RespR(false,"运单文件未上传");
+                    }
                     RespR<WaybillHistoryStartResponse> responseRespR = noCarInterface.waybillHistoryStart(waybillHistoryStartRequest);
                     if (responseRespR.getCode() == 1) {
                         log.info("历史运单开始上传失败:NoCarServiceImpl.noCarHisWaybillStart{},msg{}", noCarWayBillClone, responseRespR.getMsg());
@@ -562,6 +568,9 @@ public class NoCarServiceImpl implements NoCarService {
             return new RespR(true);
         }else{
             WaybillHistoryStartRequest waybillHistoryStartRequest = buildNoCarHisWaybill(orgBillNum,noCarWayBill);
+            if(StringUtils.isEmpty(waybillHistoryStartRequest.getBase64Str())){
+                return new RespR(false,"运单文件未上传");
+            }
             RespR<WaybillHistoryStartResponse> responseRespR = noCarInterface.waybillHistoryStart(waybillHistoryStartRequest);
 
             if (responseRespR.getCode() == 1) {