|
@@ -890,14 +890,21 @@ public class NoCarServiceImpl implements NoCarService {
|
|
|
log.info("取月票失败啦:NoCarServiceImpl.hCInvoiceQuery{},msg{}", monthAccountQueryVo, "企业未备案成功,查询失败");
|
|
|
return new RespR(false, "企业未备案成功,查询失败");
|
|
|
}
|
|
|
- WaybillCountQueryRequest waybillCountQueryRequest = new WaybillCountQueryRequest();
|
|
|
+ String [] dates = DateUtil.getMouthDays(monthAccountQueryVo.getTradeMonth());
|
|
|
+ WaybillCountPageRequest waybillCountQueryRequest = new WaybillCountPageRequest();
|
|
|
String companyNum = paramService.getParamsByParamName("REQUEST_COMPANY_NUM").getParamValue();
|
|
|
waybillCountQueryRequest.setCompanyNum(companyNum);
|
|
|
waybillCountQueryRequest.setTaxCode(customerRec.getCompanyReferencenum());
|
|
|
- waybillCountQueryRequest.setTradeMonth(monthAccountQueryVo.getTradeMonth());
|
|
|
waybillCountQueryRequest.setWaybillSource(monthAccountQueryVo.getWaybillSource());
|
|
|
waybillCountQueryRequest.setPageNo(monthAccountQueryVo.getPageNo());
|
|
|
waybillCountQueryRequest.setPageSize(1000);
|
|
|
+ for(int i=0;i<dates.length;i++){
|
|
|
+ waybillCountQueryRequest.setTradeDate(dates[i]);
|
|
|
+ updateOneDayAcc(waybillCountQueryRequest,customerRec,monthAccountQueryVo);
|
|
|
+ }
|
|
|
+ return new RespR(true);
|
|
|
+ }
|
|
|
+ public void updateOneDayAcc(WaybillCountPageRequest waybillCountQueryRequest,CustomerRec customerRec,MonthAccountQueryVo monthAccountQueryVo){
|
|
|
RespR<WaybillCountQueryResponse> waybillCountQueryResponseRespR = noCarInterface.waybillCountQuery(waybillCountQueryRequest);
|
|
|
if (waybillCountQueryResponseRespR.getCode() != 1) {
|
|
|
dealMouthAcc(waybillCountQueryResponseRespR, customerRec);
|
|
@@ -913,9 +920,7 @@ public class NoCarServiceImpl implements NoCarService {
|
|
|
}
|
|
|
|
|
|
log.info("更新取月票啦:NoCarServiceImpl.monthAccQueryUpdate{},msg{}", waybillCountQueryResponseRespR, waybillCountQueryResponseRespR.getMsg());
|
|
|
- return new RespR(true);
|
|
|
}
|
|
|
-
|
|
|
public void dealMouthAcc(RespR<WaybillCountQueryResponse> waybillCountQueryResponseRespR, CustomerRec customerRec) {
|
|
|
String customerName = customerRec.getCustomerName();
|
|
|
String companyName = customerRec.getCompanyBelongName();
|