|
@@ -32,6 +32,7 @@ import com.jkcredit.invoice.service.selfcar.SelfCarInvoiceService;
|
|
|
import com.jkcredit.invoice.service.selfcar.SelfCarTradeService;
|
|
|
import com.jkcredit.invoice.util.DateUtil;
|
|
|
import com.jkcredit.invoice.util.RespR;
|
|
|
+import com.jkcredit.invoice.util.StringUtil;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -205,7 +206,7 @@ public class SelfCarController {
|
|
|
@PostMapping("/updateTrades")
|
|
|
@ApiOperation(value = "更新交易id状态", notes = "更新交易id状态")
|
|
|
@LoginRequired(role = AuthenticationInterceptor.AUTH_SELFCAR)
|
|
|
- public void updateTrades(@NotNull(message = "更新交易id状态,不能为空") String selfCarTradesStr, @NotNull(message = "更新交易id状态,不能为空") String companyName, User user) {
|
|
|
+ public RespR updateTrades(@NotNull(message = "更新交易id状态,不能为空") String selfCarTradesStr, @NotNull(message = "更新交易id状态,不能为空") String companyName, User user) {
|
|
|
try {
|
|
|
checkHasAuthRole.checkCompanyRole(user, companyName);
|
|
|
List<SelfCarTrade> selfCarTrades = JSON.parseArray(selfCarTradesStr, SelfCarTrade.class);
|
|
@@ -214,8 +215,10 @@ public class SelfCarController {
|
|
|
|
|
|
}
|
|
|
selfCarTradeService.updateTrades(selfCarTrades);
|
|
|
+ return new RespR(true);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
|
+ return new RespR(false,e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -512,6 +515,7 @@ public class SelfCarController {
|
|
|
return new RespR(false, "客户未备案");
|
|
|
}
|
|
|
List<B2BInvoiceListModel> allSelfInvocies = new ArrayList<>();
|
|
|
+ StringBuilder resp = new StringBuilder("");
|
|
|
customerCarRecs.forEach(customerCarRec -> {
|
|
|
SelfCarDueQueryVo selfCarDueQueryVo = new SelfCarDueQueryVo();
|
|
|
selfCarDueQueryVo.setCustomername(selfcarInvoiceByTimeVo.getCustomerName());
|
|
@@ -523,9 +527,14 @@ public class SelfCarController {
|
|
|
if (respR.getCode() == 0) {
|
|
|
allSelfInvocies.addAll(respR.getData());
|
|
|
}else{
|
|
|
- throw new RuntimeException(respR.getMsg());
|
|
|
+ if(!"未查得".equals(respR.getMsg())){
|
|
|
+ resp.append(customerCarRec.getEtcNum()).append(":").append(respR.getMsg()).append("#");
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
+ if(!StringUtil.isEmpty(resp.toString())){
|
|
|
+ return new RespR(false,resp.toString());
|
|
|
+ }
|
|
|
return new RespR(allSelfInvocies);
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|