|
|
@@ -120,6 +120,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
}
|
|
|
|
|
|
String userId = (String) processInstance.get("originatorUserId");
|
|
|
+ String businessId = (String) processInstance.get("businessId");
|
|
|
log.info("审批人ID: {}", userId);
|
|
|
|
|
|
List<Map> formComponentValues = (List<Map>) processInstance.get("formComponentValues");
|
|
|
@@ -264,6 +265,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
// 保存基础报销记录(无发票)
|
|
|
InvoiceLibrary baseInvoice = new InvoiceLibrary();
|
|
|
baseInvoice.setOaId(processInstanceId);
|
|
|
+ baseInvoice.setBusinessId(businessId);
|
|
|
baseInvoice.setOaStatus("0");
|
|
|
baseInvoice.setInvoiceStatus("0");
|
|
|
baseInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -279,6 +281,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
baseInvoice.setTaxAmount(null);
|
|
|
baseInvoice.setTotalAmount(null);
|
|
|
baseInvoice.setBuyerName("");
|
|
|
+ baseInvoice.setUserId(userId);
|
|
|
baseInvoice.setBuyerTaxId("");
|
|
|
baseInvoice.setSellerName("");
|
|
|
baseInvoice.setSellerTaxId("");
|
|
|
@@ -326,7 +329,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -394,6 +398,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -431,7 +436,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -485,6 +491,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -550,6 +557,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary invoiceLibrary = new InvoiceLibrary();
|
|
|
invoiceLibrary.setOaId(processInstanceId);
|
|
|
+ invoiceLibrary.setBusinessId(businessId);
|
|
|
invoiceLibrary.setInvoiceCode(invoice.getString("code") != null ? invoice.getString("code") : "");
|
|
|
invoiceLibrary.setInvoiceNumber(invoice.getString("serial") != null ? invoice.getString("serial") : "");
|
|
|
invoiceLibrary.setInvoiceType(invoice.getString("kindName") != null ? invoice.getString("kindName") : "");
|
|
|
@@ -573,6 +581,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceLibrary.setOaStatus("0");
|
|
|
invoiceLibrary.setNote(bz != null ? bz : "");
|
|
|
invoiceLibrary.setFormName("员工费用报销");
|
|
|
+ invoiceLibrary.setUserId(userId);
|
|
|
invoiceLibrary.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
invoiceLibrary.setPayAccount(fkzh != null ? fkzh : "");
|
|
|
invoiceLibrary.setBankName(yhqc != null ? yhqc : "");
|
|
|
@@ -639,6 +648,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary sharedInvoice = new InvoiceLibrary();
|
|
|
sharedInvoice.setOaId(processInstanceId);
|
|
|
+ sharedInvoice.setBusinessId(businessId);
|
|
|
sharedInvoice.setOaStatus("0");
|
|
|
sharedInvoice.setInvoiceStatus("0");
|
|
|
sharedInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -648,6 +658,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
sharedInvoice.setAmount(null);
|
|
|
sharedInvoice.setTaxAmount(null);
|
|
|
sharedInvoice.setTotalAmount(null);
|
|
|
+ sharedInvoice.setUserId(userId);
|
|
|
sharedInvoice.setFormName("员工费用报销");
|
|
|
sharedInvoice.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
sharedInvoice.setPayAccount(fkzh != null ? fkzh : "");
|
|
|
@@ -1094,6 +1105,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
}
|
|
|
|
|
|
String userId = (String) processInstance.get("originatorUserId");
|
|
|
+ String businessId = (String) processInstance.get("businessId");
|
|
|
log.info("审批人ID: {}", userId);
|
|
|
|
|
|
List<Map> formComponentValues = (List<Map>) processInstance.get("formComponentValues");
|
|
|
@@ -1238,6 +1250,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
// 保存基础报销记录(无发票)
|
|
|
InvoiceLibrary baseInvoice = new InvoiceLibrary();
|
|
|
baseInvoice.setOaId(processInstanceId);
|
|
|
+ baseInvoice.setBusinessId(businessId);
|
|
|
baseInvoice.setOaStatus("0");
|
|
|
baseInvoice.setInvoiceStatus("0");
|
|
|
baseInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -1256,6 +1269,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
baseInvoice.setBuyerTaxId("");
|
|
|
baseInvoice.setSellerName("");
|
|
|
baseInvoice.setSellerTaxId("");
|
|
|
+ baseInvoice.setUserId(userId);
|
|
|
baseInvoice.setFormName("付款申请");
|
|
|
baseInvoice.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
baseInvoice.setPayAccount(fkzh != null ? fkzh : "");
|
|
|
@@ -1300,7 +1314,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -1368,6 +1383,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -1405,7 +1421,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -1459,6 +1476,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -1524,6 +1542,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary invoiceLibrary = new InvoiceLibrary();
|
|
|
invoiceLibrary.setOaId(processInstanceId);
|
|
|
+ invoiceLibrary.setBusinessId(businessId);
|
|
|
invoiceLibrary.setInvoiceCode(invoice.getString("code") != null ? invoice.getString("code") : "");
|
|
|
invoiceLibrary.setInvoiceNumber(invoice.getString("serial") != null ? invoice.getString("serial") : "");
|
|
|
invoiceLibrary.setInvoiceType(invoice.getString("kindName") != null ? invoice.getString("kindName") : "");
|
|
|
@@ -1545,6 +1564,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceLibrary.setSellerName(invoice.getString("sellerName") != null ? invoice.getString("sellerName") : "");
|
|
|
invoiceLibrary.setSellerTaxId(invoice.getString("sellerTaxId") != null ? invoice.getString("sellerTaxId") : "");
|
|
|
invoiceLibrary.setOaStatus("0");
|
|
|
+ invoiceLibrary.setUserId(userId);
|
|
|
invoiceLibrary.setNote(bz != null ? bz : "");
|
|
|
invoiceLibrary.setFormName("付款申请");
|
|
|
invoiceLibrary.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
@@ -1613,6 +1633,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary sharedInvoice = new InvoiceLibrary();
|
|
|
sharedInvoice.setOaId(processInstanceId);
|
|
|
+ sharedInvoice.setBusinessId(businessId);
|
|
|
sharedInvoice.setOaStatus("0");
|
|
|
sharedInvoice.setInvoiceStatus("0");
|
|
|
sharedInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -1622,6 +1643,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
sharedInvoice.setAmount(null);
|
|
|
sharedInvoice.setTaxAmount(null);
|
|
|
sharedInvoice.setTotalAmount(null);
|
|
|
+ sharedInvoice.setUserId(userId);
|
|
|
sharedInvoice.setFormName("付款申请");
|
|
|
sharedInvoice.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
sharedInvoice.setPayAccount(fkzh != null ? fkzh : "");
|
|
|
@@ -1712,6 +1734,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
}
|
|
|
|
|
|
String userId = (String) processInstance.get("originatorUserId");
|
|
|
+ String businessId = (String) processInstance.get("businessId");
|
|
|
log.info("审批人ID: {}", userId);
|
|
|
|
|
|
List<Map> formComponentValues = (List<Map>) processInstance.get("formComponentValues");
|
|
|
@@ -1855,6 +1878,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
// 保存基础报销记录(无发票)
|
|
|
InvoiceLibrary baseInvoice = new InvoiceLibrary();
|
|
|
baseInvoice.setOaId(processInstanceId);
|
|
|
+ baseInvoice.setBusinessId(businessId);
|
|
|
baseInvoice.setOaStatus("0");
|
|
|
baseInvoice.setInvoiceStatus("0");
|
|
|
baseInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -1870,6 +1894,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
baseInvoice.setTaxAmount(null);
|
|
|
baseInvoice.setTotalAmount(null);
|
|
|
baseInvoice.setBuyerName("");
|
|
|
+ baseInvoice.setUserId(userId);
|
|
|
baseInvoice.setBuyerTaxId("");
|
|
|
baseInvoice.setSellerName("");
|
|
|
baseInvoice.setSellerTaxId("");
|
|
|
@@ -1917,7 +1942,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -1985,6 +2011,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -2022,7 +2049,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -2076,6 +2104,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -2141,6 +2170,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary invoiceLibrary = new InvoiceLibrary();
|
|
|
invoiceLibrary.setOaId(processInstanceId);
|
|
|
+ invoiceLibrary.setBusinessId(businessId);
|
|
|
invoiceLibrary.setInvoiceCode(invoice.getString("code") != null ? invoice.getString("code") : "");
|
|
|
invoiceLibrary.setInvoiceNumber(invoice.getString("serial") != null ? invoice.getString("serial") : "");
|
|
|
invoiceLibrary.setInvoiceType(invoice.getString("kindName") != null ? invoice.getString("kindName") : "");
|
|
|
@@ -2162,6 +2192,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceLibrary.setSellerName(invoice.getString("sellerName") != null ? invoice.getString("sellerName") : "");
|
|
|
invoiceLibrary.setSellerTaxId(invoice.getString("sellerTaxId") != null ? invoice.getString("sellerTaxId") : "");
|
|
|
invoiceLibrary.setOaStatus("0");
|
|
|
+ invoiceLibrary.setUserId(userId);
|
|
|
invoiceLibrary.setNote(bz != null ? bz : "");
|
|
|
invoiceLibrary.setFormName("合作商付款申请");
|
|
|
invoiceLibrary.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
@@ -2230,6 +2261,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary sharedInvoice = new InvoiceLibrary();
|
|
|
sharedInvoice.setOaId(processInstanceId);
|
|
|
+ sharedInvoice.setBusinessId(businessId);
|
|
|
sharedInvoice.setOaStatus("0");
|
|
|
sharedInvoice.setInvoiceStatus("0");
|
|
|
sharedInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -2239,6 +2271,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
sharedInvoice.setAmount(null);
|
|
|
sharedInvoice.setTaxAmount(null);
|
|
|
sharedInvoice.setTotalAmount(null);
|
|
|
+ sharedInvoice.setUserId(userId);
|
|
|
sharedInvoice.setFormName("合作商付款申请");
|
|
|
sharedInvoice.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
sharedInvoice.setPayAccount(fkzh != null ? fkzh : "");
|
|
|
@@ -2329,6 +2362,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
}
|
|
|
|
|
|
String userId = (String) processInstance.get("originatorUserId");
|
|
|
+ String businessId = (String) processInstance.get("businessId");
|
|
|
log.info("审批人ID: {}", userId);
|
|
|
|
|
|
List<Map> formComponentValues = (List<Map>) processInstance.get("formComponentValues");
|
|
|
@@ -2472,6 +2506,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
// 保存基础报销记录(无发票)
|
|
|
InvoiceLibrary baseInvoice = new InvoiceLibrary();
|
|
|
baseInvoice.setOaId(processInstanceId);
|
|
|
+ baseInvoice.setBusinessId(businessId);
|
|
|
baseInvoice.setOaStatus("0");
|
|
|
baseInvoice.setInvoiceStatus("0");
|
|
|
baseInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -2484,6 +2519,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
baseInvoice.setInvoiceNumber("");
|
|
|
baseInvoice.setInvoiceType("");
|
|
|
baseInvoice.setAmount(null);
|
|
|
+ baseInvoice.setUserId(userId);
|
|
|
baseInvoice.setTaxAmount(null);
|
|
|
baseInvoice.setTotalAmount(null);
|
|
|
baseInvoice.setBuyerName("");
|
|
|
@@ -2534,7 +2570,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -2602,6 +2639,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -2639,7 +2677,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -2693,6 +2732,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -2758,6 +2798,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary invoiceLibrary = new InvoiceLibrary();
|
|
|
invoiceLibrary.setOaId(processInstanceId);
|
|
|
+ invoiceLibrary.setBusinessId(businessId);
|
|
|
invoiceLibrary.setInvoiceCode(invoice.getString("code") != null ? invoice.getString("code") : "");
|
|
|
invoiceLibrary.setInvoiceNumber(invoice.getString("serial") != null ? invoice.getString("serial") : "");
|
|
|
invoiceLibrary.setInvoiceType(invoice.getString("kindName") != null ? invoice.getString("kindName") : "");
|
|
|
@@ -2780,6 +2821,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceLibrary.setSellerTaxId(invoice.getString("sellerTaxId") != null ? invoice.getString("sellerTaxId") : "");
|
|
|
invoiceLibrary.setOaStatus("0");
|
|
|
invoiceLibrary.setNote(bz != null ? bz : "");
|
|
|
+ invoiceLibrary.setUserId(userId);
|
|
|
invoiceLibrary.setFormName("合作商报销申请");
|
|
|
invoiceLibrary.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
invoiceLibrary.setPayAccount(fkzh != null ? fkzh : "");
|
|
|
@@ -2847,6 +2889,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary sharedInvoice = new InvoiceLibrary();
|
|
|
sharedInvoice.setOaId(processInstanceId);
|
|
|
+ sharedInvoice.setBusinessId(businessId);
|
|
|
sharedInvoice.setOaStatus("0");
|
|
|
sharedInvoice.setInvoiceStatus("0");
|
|
|
sharedInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -2856,6 +2899,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
sharedInvoice.setAmount(null);
|
|
|
sharedInvoice.setTaxAmount(null);
|
|
|
sharedInvoice.setTotalAmount(null);
|
|
|
+ sharedInvoice.setUserId(userId);
|
|
|
sharedInvoice.setFormName("合作商报销申请");
|
|
|
sharedInvoice.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
sharedInvoice.setPayAccount(fkzh != null ? fkzh : "");
|
|
|
@@ -2947,6 +2991,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
}
|
|
|
|
|
|
String userId = (String) processInstance.get("originatorUserId");
|
|
|
+ String businessId = (String) processInstance.get("businessId");
|
|
|
log.info("审批人ID: {}", userId);
|
|
|
|
|
|
List<Map> formComponentValues = (List<Map>) processInstance.get("formComponentValues");
|
|
|
@@ -3090,6 +3135,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
// 保存基础报销记录(无发票)
|
|
|
InvoiceLibrary baseInvoice = new InvoiceLibrary();
|
|
|
baseInvoice.setOaId(processInstanceId);
|
|
|
+ baseInvoice.setBusinessId(businessId);
|
|
|
baseInvoice.setOaStatus("0");
|
|
|
baseInvoice.setInvoiceStatus("0");
|
|
|
baseInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -3108,6 +3154,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
baseInvoice.setBuyerTaxId("");
|
|
|
baseInvoice.setSellerName("");
|
|
|
baseInvoice.setSellerTaxId("");
|
|
|
+ baseInvoice.setUserId(userId);
|
|
|
baseInvoice.setFormName("出差费用报销");
|
|
|
baseInvoice.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
baseInvoice.setPayAccount(fkzh != null ? fkzh : "");
|
|
|
@@ -3152,7 +3199,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -3220,6 +3268,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -3257,7 +3306,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
JSONArray resultArray = jsonObject.getJSONArray("result");
|
|
|
|
|
|
if (resultArray != null && !resultArray.isEmpty()) {
|
|
|
- JSONObject invoice = resultArray.getJSONObject(0);
|
|
|
+ for (int invoiceIndex = 0; invoiceIndex < resultArray.size(); invoiceIndex++) {
|
|
|
+ JSONObject invoice = resultArray.getJSONObject(invoiceIndex);
|
|
|
String invoiceNumber = invoice.getString("serial") != null ? invoice.getString("serial") : "";
|
|
|
String buyerTaxId = invoice.getString("buyerTaxId") != null ? invoice.getString("buyerTaxId") : "";
|
|
|
String buyerName = invoice.getString("buyerName") != null ? invoice.getString("buyerName") : "";
|
|
|
@@ -3311,6 +3361,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
invoiceNumberList.add(invoiceNumber);
|
|
|
invoiceNumberToFileName.put(invoiceNumber, fileName);
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
@@ -3376,6 +3427,8 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary invoiceLibrary = new InvoiceLibrary();
|
|
|
invoiceLibrary.setOaId(processInstanceId);
|
|
|
+ invoiceLibrary.setBusinessId(businessId);
|
|
|
+ invoiceLibrary.setUserId(userId);
|
|
|
invoiceLibrary.setInvoiceCode(invoice.getString("code") != null ? invoice.getString("code") : "");
|
|
|
invoiceLibrary.setInvoiceNumber(invoice.getString("serial") != null ? invoice.getString("serial") : "");
|
|
|
invoiceLibrary.setInvoiceType(invoice.getString("kindName") != null ? invoice.getString("kindName") : "");
|
|
|
@@ -3465,6 +3518,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
|
|
|
InvoiceLibrary sharedInvoice = new InvoiceLibrary();
|
|
|
sharedInvoice.setOaId(processInstanceId);
|
|
|
+ sharedInvoice.setBusinessId(businessId);
|
|
|
sharedInvoice.setOaStatus("0");
|
|
|
sharedInvoice.setInvoiceStatus("0");
|
|
|
sharedInvoice.setDep(cdbm != null && StringUtils.isNotBlank(cdbm) ? cdbm : (bm != null ? bm : ""));
|
|
|
@@ -3474,6 +3528,7 @@ public class InvoiceLibraryServiceImpl extends ServiceImpl<InvoiceLibraryMapper,
|
|
|
sharedInvoice.setAmount(null);
|
|
|
sharedInvoice.setTaxAmount(null);
|
|
|
sharedInvoice.setTotalAmount(null);
|
|
|
+ sharedInvoice.setUserId(userId);
|
|
|
sharedInvoice.setFormName("出差费用报销");
|
|
|
sharedInvoice.setPaySubject(fkzhxx != null ? fkzhxx : "");
|
|
|
sharedInvoice.setPayAccount(fkzh != null ? fkzh : "");
|