- [x] 处理付款申请推送付款单定时任务失效报错问题(status标识改为billstatus;pay(push)操作为前端操作,需该新增pushandsave)
- [ ] 认领单已提交审核,【关联预付款单】 按钮应该不能点击了 - [x] 付款申请,付款单,排程单新增字段:转账附言,转换规则中,进行携带 付款申请-->付款处理(转换规则__670682874575363072) 付款处理-->付款排程单(转换规则__915697385282231296) - [x] 优化付款单点击业务大类报错 - [x] 优化付款排程下推付款报错 - [x] 优化核算维度推送SAP取数逻辑(客户,供应商) - [x] 优化关联预付款单(认领单按钮),携带供应商,当前日期-1年 s
This commit is contained in:
parent
167cb4570a
commit
4ccfc07215
|
|
@ -78,6 +78,16 @@ public class FeeControlApiPlugin extends AbstractFormPlugin implements Plugin {
|
||||||
//【关联员工借款单】按钮进来,隐藏【供应商】
|
//【关联员工借款单】按钮进来,隐藏【供应商】
|
||||||
this.getView().setVisible(false, "shjh_supplier");
|
this.getView().setVisible(false, "shjh_supplier");
|
||||||
}
|
}
|
||||||
|
// 设置为三个月前
|
||||||
|
Date date = new Date();
|
||||||
|
date.setMonth(date.getMonth() - 12);
|
||||||
|
this.getView().getModel().setValue("shjh_startdate",date);
|
||||||
|
this.getView().updateView("shjh_startdate");
|
||||||
|
String paymenttype = ""+this.getView().getParentView().getModel().getValue("paymenttype");
|
||||||
|
if ("bd_supplier".equals(paymenttype)) {
|
||||||
|
this.getView().getModel().setValue("shjh_supplier",this.getView().getParentView().getModel().getValue("recbasepayer"));
|
||||||
|
}
|
||||||
|
this.getView().updateView("shjh_supplier");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ public class PayBillSaveOperation extends AbstractOperationServicePlugIn impleme
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SaveServiceHelper.save(new DynamicObject[]{bill});
|
|
||||||
}
|
}
|
||||||
|
SaveServiceHelper.update(dataEntities);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ import kd.bos.entity.validate.ErrorLevel;
|
||||||
import kd.bos.orm.query.QCP;
|
import kd.bos.orm.query.QCP;
|
||||||
import kd.bos.orm.query.QFilter;
|
import kd.bos.orm.query.QFilter;
|
||||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||||
|
import kd.bos.servicehelper.QueryServiceHelper;
|
||||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||||
import kd.sdk.plugin.Plugin;
|
import kd.sdk.plugin.Plugin;
|
||||||
import shjh.jhzj7.fi.fi.utils.ApiUtils;
|
import shjh.jhzj7.fi.fi.utils.ApiUtils;
|
||||||
|
|
@ -216,7 +217,7 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
||||||
QFilter q1 = new QFilter("sourcebill", QCP.equals, bill.getPkValue());
|
QFilter q1 = new QFilter("sourcebill", QCP.equals, bill.getPkValue());
|
||||||
QFilter q2 = new QFilter("billstatus",QCP.equals,"C");
|
QFilter q2 = new QFilter("billstatus",QCP.equals,"C");
|
||||||
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle("gl_voucher",
|
DynamicObject gl_voucher = BusinessDataServiceHelper.loadSingle("gl_voucher",
|
||||||
"id,description,sourcebill,entries,entries.account,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype",
|
"id,description,sourcebill,entries,entries.account,entries.debitlocal,entries.creditlocal,entries.entrydc,vouchertype,entries.assgrp",
|
||||||
new QFilter[]{q1, q2});
|
new QFilter[]{q1, q2});
|
||||||
if (null != gl_voucher) {
|
if (null != gl_voucher) {
|
||||||
//todo:对header 凭证类型重新赋值
|
//todo:对header 凭证类型重新赋值
|
||||||
|
|
@ -226,37 +227,14 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
||||||
}
|
}
|
||||||
DynamicObjectCollection entries = gl_voucher.getDynamicObjectCollection("entries");
|
DynamicObjectCollection entries = gl_voucher.getDynamicObjectCollection("entries");
|
||||||
if (!entries.isEmpty()) {
|
if (!entries.isEmpty()) {
|
||||||
|
DynamicObject assgrpinfo;
|
||||||
|
String asstype;
|
||||||
|
DynamicObject glassistbd;
|
||||||
|
DynamicObject hsxminfo;
|
||||||
for (DynamicObject entry : entries) {
|
for (DynamicObject entry : entries) {
|
||||||
JSONObject IT_ITEMS = new JSONObject();
|
JSONObject IT_ITEMS = new JSONObject();
|
||||||
DynamicObject account = entry.getDynamicObject("account");//科目
|
DynamicObject account = entry.getDynamicObject("account");//科目
|
||||||
if (null != account) {
|
if (null != account) {
|
||||||
//查找核算维度
|
|
||||||
DynamicObjectCollection checkItems = account.getDynamicObjectCollection("checkitementry");
|
|
||||||
if (checkItems!=null && checkItems.size()!=0){
|
|
||||||
//是否已经反写
|
|
||||||
boolean isMark=false;
|
|
||||||
for (DynamicObject checkItem : checkItems) {
|
|
||||||
//核算维度
|
|
||||||
String assTactItemName = checkItem.getString("asstactitem.name");
|
|
||||||
if (assTactItemName!=null){
|
|
||||||
switch (assTactItemName){
|
|
||||||
case "客户-获利段":
|
|
||||||
case "客户编码":
|
|
||||||
IT_ITEMS.put("KUNNR", customerOrsupnum);// 供应商编号_收款人id(付款单payee)
|
|
||||||
isMark=true;
|
|
||||||
break;
|
|
||||||
case "供应商":
|
|
||||||
IT_ITEMS.put("LIFNR", customerOrsupnum);// 客户编号_收款人id(付款单payee)
|
|
||||||
isMark=true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (isMark){
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//isbank
|
|
||||||
boolean isbank = account.getBoolean("isbank");
|
boolean isbank = account.getBoolean("isbank");
|
||||||
if ("A".equals(shjhSourcesystem) &&!isbank) {
|
if ("A".equals(shjhSourcesystem) &&!isbank) {
|
||||||
continue;//非银行科目
|
continue;//非银行科目
|
||||||
|
|
@ -269,6 +247,43 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
||||||
IT_ITEMS.put("SGTXT", SGTXT);//行项目文本_SAP会计科目行项目号(付款明细shjh_voucherentrynum)
|
IT_ITEMS.put("SGTXT", SGTXT);//行项目文本_SAP会计科目行项目号(付款明细shjh_voucherentrynum)
|
||||||
IT_ITEMS.put("KOSTL", KOSTL);//成本中心_成本中心(付款单shjh_costcenter)
|
IT_ITEMS.put("KOSTL", KOSTL);//成本中心_成本中心(付款单shjh_costcenter)
|
||||||
IT_ITEMS.put("PRCTR", PRCTR);//利润中心_利润中心(付款单shjh_pc)
|
IT_ITEMS.put("PRCTR", PRCTR);//利润中心_利润中心(付款单shjh_pc)
|
||||||
|
assgrpinfo = entry.getDynamicObject("assgrp");//核算维度(弹性域)
|
||||||
|
if(assgrpinfo != null){
|
||||||
|
DynamicObjectCollection gl_assist_bd = QueryServiceHelper.query("gl_assist_bd", "asstype,assval",
|
||||||
|
new QFilter[]{new QFilter("hg.id", QCP.equals, assgrpinfo.getPkValue())});
|
||||||
|
|
||||||
|
for (int j = 0; j < gl_assist_bd.size(); j++) {
|
||||||
|
glassistbd = gl_assist_bd.get(j);
|
||||||
|
asstype = glassistbd.getString("asstype");//核算项目类型-对应核算维度的字段名
|
||||||
|
if("f000057".equals(asstype) || "f0001".equals(asstype)){
|
||||||
|
//t_bas_flex_property 表中获取对应编号 客户-获利段 f0001 客户编码 f000057
|
||||||
|
hsxminfo = QueryServiceHelper.queryOne("bd_customer", "id,name,number",
|
||||||
|
new QFilter[]{new QFilter("id", QCP.equals, glassistbd.getLong("assval"))});//维度值
|
||||||
|
IT_ITEMS.put("KUNNR",hsxminfo.getString("number"));//客户
|
||||||
|
}else if("f000005".equals(asstype)){
|
||||||
|
//供应商 f000005
|
||||||
|
hsxminfo = QueryServiceHelper.queryOne("bd_supplier", "id,name,number",
|
||||||
|
new QFilter[]{new QFilter("id", QCP.equals, glassistbd.getLong("assval"))});//维度值
|
||||||
|
IT_ITEMS.put("LIFNR",hsxminfo.getString("number"));//供应商
|
||||||
|
}
|
||||||
|
else if("f000012".equals(asstype)){
|
||||||
|
//利润中心 f000012
|
||||||
|
hsxminfo = QueryServiceHelper.queryOne("shjh_pc", "id,name,number",
|
||||||
|
new QFilter[]{new QFilter("id", QCP.equals, glassistbd.getLong("assval"))});//维度值
|
||||||
|
IT_ITEMS.put("PRCTR",hsxminfo.getString("number"));//利润中心_利润中心
|
||||||
|
}else if("f000011".equals(asstype)){
|
||||||
|
//成本中心 f000011
|
||||||
|
hsxminfo = QueryServiceHelper.queryOne("bos_costcenter", "id,name,number",
|
||||||
|
new QFilter[]{new QFilter("id", QCP.equals, glassistbd.getLong("assval"))});//维度值
|
||||||
|
IT_ITEMS.put("KOSTL",hsxminfo.getString("number"));//成本中心_成本中心
|
||||||
|
}else if("f000054".equals(asstype)){
|
||||||
|
//原因码 f000054
|
||||||
|
IT_ITEMS.put("RSTGR",glassistbd.getString("assval"));//成本中心_成本中心
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 获取借方金额
|
// 获取借方金额
|
||||||
BigDecimal debitlocal = (BigDecimal) entry.get("debitlocal");//借方
|
BigDecimal debitlocal = (BigDecimal) entry.get("debitlocal");//借方
|
||||||
// 获取贷方金额
|
// 获取贷方金额
|
||||||
|
|
@ -315,10 +330,10 @@ public class PaybillPushSapOperation extends AbstractOperationServicePlugIn impl
|
||||||
jsonObject.put("BUZEI", entry.getString("shjh_voucherentrynum"));//行编号
|
jsonObject.put("BUZEI", entry.getString("shjh_voucherentrynum"));//行编号
|
||||||
switch (payeetype) {
|
switch (payeetype) {
|
||||||
case "bd_customer":
|
case "bd_customer":
|
||||||
jsonObject.put("KUNNR", customerOrsupnum); // 供应商编号_收款人id(付款单payee)
|
jsonObject.put("KUNNR", customerOrsupnum); // 客户编号_收款人id(付款单payee)
|
||||||
break;
|
break;
|
||||||
case "bd_supplier":
|
case "bd_supplier":
|
||||||
jsonObject.put("LIFNR", customerOrsupnum); // 客户编号_收款人id(付款单payee)
|
jsonObject.put("LIFNR", customerOrsupnum); // 供应商编号_收款人id(付款单payee)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
String HKONT = "";
|
String HKONT = "";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue