-推送费控优化

s
This commit is contained in:
weiyunlong 2025-04-29 14:16:07 +08:00
parent fb4c8f5922
commit 2167fcc082
1 changed files with 13 additions and 5 deletions

View File

@ -129,13 +129,15 @@ public class PaybillOperation extends AbstractOperationServicePlugIn implements
QFilter q3 = new QFilter("shjh_bizsmalltype.id", QCP.equals, bill.getDynamicObject("shjh_bizsmall").getPkValue());//业务小类
q2 = q2.and(q3);
}
DynamicObject[] load = BusinessDataServiceHelper.load("shjh_fksqr", "id,shjh_sqr,entryentity,entryentity.dpt",
DynamicObject[] load = BusinessDataServiceHelper.load("shjh_fksqr", "id,shjh_sqr",
new QFilter[]{q1, q2});
if (load.length > 0) {
DynamicObject fksqr = load[0];
if (null != fksqr) {
DynamicObject dynamicObject = fksqr.getDynamicObject("shjh_sqr");
if (null != dynamicObject) {
dynamicObject = BusinessDataServiceHelper.loadSingle(dynamicObject.getPkValue(), "bos_user",
"number,entryentity,entryentity.dpt");
FM_UserCode = dynamicObject.getString("number");// 员工工号_费控单据申请人映射表_人员
FM_CreateUserCode = dynamicObject.getString("number");// 创建人工号_费控单据申请人映射表_人员
DynamicObjectCollection entryentity = dynamicObject.getDynamicObjectCollection("entryentity");
@ -151,8 +153,11 @@ public class PaybillOperation extends AbstractOperationServicePlugIn implements
header.put("FM_CreateUserCode", FM_CreateUserCode);// 创建人工号
String FM_ExpenseTypeCode = "";
if (null!= bill.getDynamicObject("shjh_bizbig")) {
FM_ExpenseTypeCode = bill.getDynamicObject("shjh_bizbig").getString("shjh_fknumber");// 业务大类编码(EQ49,EQ44,EQ1101)
DynamicObject shjhBizbig = bill.getDynamicObject("shjh_bizbig");
if (null!= shjhBizbig) {
shjhBizbig = BusinessDataServiceHelper.loadSingle(shjhBizbig.getPkValue(), "shjh_bizbigtype",
"number,shjh_fknumber");
FM_ExpenseTypeCode = shjhBizbig.getString("shjh_fknumber");// 业务大类编码(EQ49,EQ44,EQ1101)
}
header.put("FM_ExpenseTypeCode", FM_ExpenseTypeCode);// 业务大类编码(EQ49,EQ44,EQ1101)
header.put("FM_CurrencyCode", "RMB");// 币种编码默认:RMB
@ -219,8 +224,11 @@ public class PaybillOperation extends AbstractOperationServicePlugIn implements
jsonObject.put("FM_ProfitCenterCode", FM_ProfitCenterCode);// 利润中心编码
String FM_ExpenseItemCode = "";
if (null!= bill.getDynamicObject("shjh_bizsmall")) {
FM_ExpenseItemCode = bill.getDynamicObject("shjh_bizsmall").getString("shjh_fknumber");// 业务小类编码
DynamicObject shjhBizsmall = bill.getDynamicObject("shjh_bizsmall");
if (null!= shjhBizsmall) {
shjhBizsmall = BusinessDataServiceHelper.loadSingle(shjhBizsmall.getPkValue(), "shjh_bizsmalltype",
"number,shjh_fknumber");
FM_ExpenseItemCode = shjhBizsmall.getString("shjh_fknumber");// 业务小类编码
}
jsonObject.put("FM_ExpenseItemCode", FM_ExpenseItemCode);// 业务小类编码
jsonObject.put("FM_InvoiceTypeCode", "INVOICE003");// 发票类型编码(普票:INVOICE001,专票:INVOICE002其它票据:INVOICE003)