|
|
@ -8,6 +8,7 @@ import com.dxhy.common.constant.ConfigureConstant; |
|
|
|
import com.dxhy.common.controller.AbstractController; |
|
|
|
import com.dxhy.common.controller.AbstractController; |
|
|
|
import com.dxhy.common.enums.SNFplxEnum; |
|
|
|
import com.dxhy.common.enums.SNFplxEnum; |
|
|
|
import com.dxhy.common.util.InvoiceUtil; |
|
|
|
import com.dxhy.common.util.InvoiceUtil; |
|
|
|
|
|
|
|
import com.dxhy.common.util.UserInfoUtil; |
|
|
|
import com.dxhy.common.utils.R; |
|
|
|
import com.dxhy.common.utils.R; |
|
|
|
import com.dxhy.erp.dao.TdxSaleRecordInvoiceDao; |
|
|
|
import com.dxhy.erp.dao.TdxSaleRecordInvoiceDao; |
|
|
|
import com.dxhy.erp.entity.TDxInvoiceReimburse; |
|
|
|
import com.dxhy.erp.entity.TDxInvoiceReimburse; |
|
|
@ -73,14 +74,14 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
@SysLog("发票查验") |
|
|
|
@SysLog("发票查验") |
|
|
|
public ResponseEntity<String> singleInvoiceCheck(@RequestBody Map<String, String> pramsMap) throws ParseException { |
|
|
|
public ResponseEntity<String> singleInvoiceCheck(@RequestBody Map<String, String> pramsMap) throws ParseException { |
|
|
|
log.info("传入的参数为:{}", pramsMap); |
|
|
|
log.info("传入的参数为:{}", pramsMap); |
|
|
|
String userid = "101833"; |
|
|
|
// String userid = "101833";
|
|
|
|
String dbName = "business"; |
|
|
|
// String dbName = "business";
|
|
|
|
String company = "BIGB"; |
|
|
|
// String company = "BIGB";
|
|
|
|
|
|
|
|
|
|
|
|
// 入参统一在入口处理
|
|
|
|
// 入参统一在入口处理
|
|
|
|
// String userid = getLoginName();
|
|
|
|
String userid = getLoginName(); |
|
|
|
// String dbName = getUserInfo().getDbName();
|
|
|
|
String dbName = getUserInfo().getDbName(); |
|
|
|
// String company = getUserInfo().getCompany();
|
|
|
|
String company = getUserInfo().getCompany(); |
|
|
|
JSONObject checkInvoiceResult = null; |
|
|
|
JSONObject checkInvoiceResult = null; |
|
|
|
InvoiceUtil iu = new InvoiceUtil(pramsMap.get("invoiceCode")); |
|
|
|
InvoiceUtil iu = new InvoiceUtil(pramsMap.get("invoiceCode")); |
|
|
|
String fplxdm = iu.getFplxdm(); |
|
|
|
String fplxdm = iu.getFplxdm(); |
|
|
@ -229,10 +230,12 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
checkInvoice.put("invoiceNumber", checkInvoice.get("invoiceNo").toString()); |
|
|
|
checkInvoice.put("invoiceNumber", checkInvoice.get("invoiceNo").toString()); |
|
|
|
|
|
|
|
|
|
|
|
String kprq = checkInvoice.get("invoiceDate").toString(); |
|
|
|
String kprq = checkInvoice.get("invoiceDate").toString(); |
|
|
|
String str = new SimpleDateFormat("yyyy-MM-dd").format(kprq); |
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss zzz yyyy", Locale.US); |
|
|
|
log.info("开票日期为:{} ", str); |
|
|
|
Date date = sdf.parse(kprq); |
|
|
|
|
|
|
|
String formatStr = new SimpleDateFormat("yyyy-MM-dd").format(date); |
|
|
|
|
|
|
|
log.info("开票日期为:{} ", formatStr); |
|
|
|
|
|
|
|
|
|
|
|
checkInvoice.put("billingDate", str); |
|
|
|
checkInvoice.put("billingDate", formatStr); |
|
|
|
checkInvoice.put("purchaserName", checkInvoice.get("gfName")); |
|
|
|
checkInvoice.put("purchaserName", checkInvoice.get("gfName")); |
|
|
|
checkInvoice.put("purchaserTaxNo", checkInvoice.get("gfTaxNo")); |
|
|
|
checkInvoice.put("purchaserTaxNo", checkInvoice.get("gfTaxNo")); |
|
|
|
checkInvoice.put("purchaserBank", checkInvoice.get("gfBankAndNo")); |
|
|
|
checkInvoice.put("purchaserBank", checkInvoice.get("gfBankAndNo")); |
|
|
@ -347,20 +350,20 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
|
|
|
|
|
|
|
|
log.info("影像系统同步数据:{}", JSONObject.toJSONString(snRequestObject)); |
|
|
|
log.info("影像系统同步数据:{}", JSONObject.toJSONString(snRequestObject)); |
|
|
|
|
|
|
|
|
|
|
|
String userid = "101833"; |
|
|
|
// String userid = "101833";
|
|
|
|
String dbName = "business"; |
|
|
|
// String dbName = "business";
|
|
|
|
String company = "BIGB"; |
|
|
|
// String company = "BIGB";
|
|
|
|
String taxNo = "9111112222333344DD"; |
|
|
|
// String taxNo = "9111112222333344DD";
|
|
|
|
|
|
|
|
|
|
|
|
// // 入参统一在入口处理
|
|
|
|
// // 入参统一在入口处理
|
|
|
|
// String userid = getLoginName();
|
|
|
|
String userid = getLoginName(); |
|
|
|
// String dbName = getUserInfo().getDbName();
|
|
|
|
String dbName = getUserInfo().getDbName(); |
|
|
|
// String company = getUserInfo().getCompany();
|
|
|
|
String company = getUserInfo().getCompany(); |
|
|
|
// List<String> gfshAll = UserInfoUtil.getGfshAll(getUserInfo().getOrg());
|
|
|
|
List<String> gfshAll = UserInfoUtil.getGfshAll(getUserInfo().getOrg()); |
|
|
|
// String gfsh = "";
|
|
|
|
String gfsh = ""; |
|
|
|
// if (gfshAll.size() > 0) {
|
|
|
|
if (gfshAll.size() > 0) { |
|
|
|
// gfsh = gfshAll.get(0);
|
|
|
|
gfsh = gfshAll.get(0); |
|
|
|
// }
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String result = ""; |
|
|
|
String result = ""; |
|
|
|
|
|
|
|
|
|
|
@ -391,7 +394,7 @@ public class SDNYMainProcessController extends AbstractController { |
|
|
|
for (SNInvoice invoice : invoiceInfoList) { |
|
|
|
for (SNInvoice invoice : invoiceInfoList) { |
|
|
|
String fplxdm = ""; |
|
|
|
String fplxdm = ""; |
|
|
|
String snFplx = ""; |
|
|
|
String snFplx = ""; |
|
|
|
result = snPushCheckRecordService.updateInvoicePoll(company, taxNo, reimburse, invoice, fplxdm, imageId, compCode); |
|
|
|
result = snPushCheckRecordService.updateInvoicePoll(company, gfsh, reimburse, invoice, fplxdm, imageId, compCode); |
|
|
|
|
|
|
|
|
|
|
|
//价税分离判断
|
|
|
|
//价税分离判断
|
|
|
|
if (!"ok".equals(result) && !"0000".equals(result)) { |
|
|
|
if (!"ok".equals(result) && !"0000".equals(result)) { |
|
|
|