|
|
|
@ -630,9 +630,30 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
QueryWrapper<RecordInvoiceSaleDetailModel> saleDetailWrapper = new QueryWrapper<>(); |
|
|
|
|
saleDetailWrapper.eq("invoice_no", invoiceNo); |
|
|
|
|
List<RecordInvoiceSaleDetailModel> recordInvoiceSaleDetailModel = snPushCheckRecordService.selectSaleListByWrapper(saleDetailWrapper); |
|
|
|
|
List<BaseTDxRecordInvoiceDetail> baseTDxRecordInvoiceDetail = null; |
|
|
|
|
if(recordInvoiceSaleDetailModel == null || recordInvoiceSaleDetailModel.size() == 0){ |
|
|
|
|
log.info("明细行为空,查验补充信息"); |
|
|
|
|
checkInvoiceResult = snPushCheckRecordService.singleCheckInvoice(pramsMap, null); |
|
|
|
|
|
|
|
|
|
if (!checkInvoiceResult.containsKey("code")) { |
|
|
|
|
if (!checkInvoiceResult.containsKey("cyjg")) { |
|
|
|
|
snPushCheckRecordService.updateInvoice(dbName, checkInvoiceResult, recordWrapper); |
|
|
|
|
QueryWrapper<BaseTDxRecordInvoiceDetail> detailWrapper = new QueryWrapper<>(); |
|
|
|
|
detailWrapper.eq("uuid", uuid); |
|
|
|
|
baseTDxRecordInvoiceDetail = snPushCheckRecordService.selectRecordDetailListByWrapper(detailWrapper); |
|
|
|
|
} else if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) { |
|
|
|
|
data = errorInfo(checkInvoiceResult, data); |
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
checkInvoiceByUuid = snPushCheckRecordService.selectRecordByWrapper(recordWrapper); |
|
|
|
|
} |
|
|
|
|
JSONObject checkInvoice = (JSONObject) JSONObject.toJSON(tdxSaleRecordInvoice); |
|
|
|
|
JSONArray saleDetail = (JSONArray) JSONObject.toJSON(recordInvoiceSaleDetailModel); |
|
|
|
|
if(baseTDxRecordInvoiceDetail!= null && baseTDxRecordInvoiceDetail.size() > 0){ |
|
|
|
|
saleDetail = (JSONArray) JSONObject.toJSON(baseTDxRecordInvoiceDetail); |
|
|
|
|
} |
|
|
|
|
convertToResult(checkInvoice, saleDetail); |
|
|
|
|
|
|
|
|
|
data.put("data", checkInvoice); |
|
|
|
@ -1400,7 +1421,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
* @param params |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
//@PostMapping("/imageSubmitSalesInvoice")
|
|
|
|
|
@PostMapping("/imageSubmitSalesInvoice") |
|
|
|
|
@ResponseBody |
|
|
|
|
@SysLog("影像系统提交销项发票") |
|
|
|
|
public ResponseEntity<String> imageSubmitSalesInvoice(@RequestBody SNRequestObject params) { |
|
|
|
|