|
|
|
@ -92,13 +92,13 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
@PostMapping("/singleInvoiceCheck2") |
|
|
|
|
@ResponseBody |
|
|
|
|
@SysLog("发票查验") |
|
|
|
|
public ResponseEntity<String> singleInvoiceCheck(@RequestBody Map<String, String> pramsMap) throws Exception { |
|
|
|
|
public ResponseEntity<String> singleInvoiceCheck2(@RequestBody Map<String, String> pramsMap) throws Exception { |
|
|
|
|
log.info("传入的参数为:{}", pramsMap); |
|
|
|
|
String userid = "101833"; |
|
|
|
|
String dbName = "business"; |
|
|
|
|
JSONObject checkInvoiceResult = null; |
|
|
|
|
RequestRecord singleInvoiceCheckRecord = requestRecordService.getBaseRequestRecord(JSONObject.toJSONString(pramsMap), |
|
|
|
|
"/singleInvoiceCheck", pramsMap.get("invoiceCode"), pramsMap.get("invoiceNumber"), "singleInvoiceCheck"); |
|
|
|
|
"/singleInvoiceCheck2", pramsMap.get("invoiceCode"), pramsMap.get("invoiceNumber"), "singleInvoiceCheck"); |
|
|
|
|
|
|
|
|
|
//挡板开关
|
|
|
|
|
if ("1".equals(isPresure)) { |
|
|
|
@ -487,7 +487,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
@PostMapping("/singleInvoiceCheck") |
|
|
|
|
@ResponseBody |
|
|
|
|
@SysLog("发票查验") |
|
|
|
|
public ResponseEntity<String> singleInvoiceCheck2(@RequestBody Map<String, String> pramsMap) throws Exception { |
|
|
|
|
public ResponseEntity<String> singleInvoiceCheck(@RequestBody Map<String, String> pramsMap) throws Exception { |
|
|
|
|
log.info("传入的参数为:{}", pramsMap); |
|
|
|
|
String dbName = "business"; |
|
|
|
|
JSONObject checkInvoiceResult = null; |
|
|
|
@ -564,12 +564,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
|
|
|
|
|
if (!checkInvoiceResult.containsKey("code")) { |
|
|
|
|
if (!checkInvoiceResult.containsKey("cyjg")) { |
|
|
|
|
//先删除原有主数据,再查验更新主数据和明细数据
|
|
|
|
|
int delete = snPushCheckRecordService.deleteRecordByWrapper(recordWrapper); |
|
|
|
|
if (delete > 0) { |
|
|
|
|
checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber")); |
|
|
|
|
signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, "", "1", dbName); |
|
|
|
|
} |
|
|
|
|
snPushCheckRecordService.updateInvoice(dbName, checkInvoiceResult, recordWrapper); |
|
|
|
|
} else if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) { |
|
|
|
|
data = errorInfo(checkInvoiceResult, data); |
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
@ -597,21 +592,16 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
if (!checkInvoiceResult.containsKey("code")) { |
|
|
|
|
if (!checkInvoiceResult.containsKey("cyjg")) { |
|
|
|
|
//先删除原有主数据,再查验更新主数据和明细数据
|
|
|
|
|
int delete = snPushCheckRecordService.deleteRecordByWrapper(recordWrapper); |
|
|
|
|
if (delete > 0) { |
|
|
|
|
checkInvoiceResult.put("invoiceNo", checkInvoiceResult.getString("invoiceNumber")); |
|
|
|
|
signSaveInvoiceInfoService.saveQueryInvoiceResult(checkInvoiceResult, "", "1", dbName); |
|
|
|
|
if ("10104".equals(pramsMap.get("invoiceType")) || "10105".equals(pramsMap.get("invoiceType"))) { |
|
|
|
|
vehicleList = snPushCheckRecordService.vihicleList(uuid); |
|
|
|
|
} else { |
|
|
|
|
baseTDxRecordInvoiceDetail = snPushCheckRecordService.selectRecordDetailListByWrapper(detailWrapper); |
|
|
|
|
} |
|
|
|
|
snPushCheckRecordService.updateInvoice(dbName, checkInvoiceResult, recordWrapper); |
|
|
|
|
|
|
|
|
|
if ("10104".equals(pramsMap.get("invoiceType")) || "10105".equals(pramsMap.get("invoiceType"))) { |
|
|
|
|
vehicleList = snPushCheckRecordService.vihicleList(uuid); |
|
|
|
|
} else { |
|
|
|
|
baseTDxRecordInvoiceDetail = snPushCheckRecordService.selectRecordDetailListByWrapper(detailWrapper); |
|
|
|
|
} |
|
|
|
|
} else if (checkInvoiceResult.containsKey("cyjg") && !"0001".equals(checkInvoiceResult.getString("cyjg"))) { |
|
|
|
|
data = errorInfo(checkInvoiceResult, data); |
|
|
|
|
return ResponseEntity.ok(JSONObject.toJSONString(data)); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -696,7 +686,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
} else { |
|
|
|
|
//其他类发票,直接入库
|
|
|
|
|
R data = new R(1000, "default success"); |
|
|
|
|
if (!checkInvoiceResult.isEmpty()) { |
|
|
|
|
if (checkInvoiceResult != null && !checkInvoiceResult.isEmpty()) { |
|
|
|
|
log.info("其他类发票,不做查验,直接入库"); |
|
|
|
|
data.put("message", "success"); |
|
|
|
|
|
|
|
|
|