- [x] SAP解锁锁定接口新增行编码字段

- [x] 根据当前登陆人组织,过来成本中心的核算组织

s
This commit is contained in:
weiyunlong 2025-05-14 18:18:35 +08:00
parent 69679de7a9
commit 6823c0cfd1
5 changed files with 53 additions and 17 deletions

View File

@ -0,0 +1,35 @@
package shjh.jhzj7.fi.fi.plugin.form;
import com.alibaba.nacos.shaded.com.google.common.collect.Lists;
import kd.bos.context.RequestContext;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.form.events.SetFilterEvent;
import kd.bos.list.plugin.AbstractListPlugin;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.user.UserServiceHelper;
import java.util.List;
/**
* 成本中心列表扩展插件
* shjh_bos_costcenter_ext
*/
public class BosCostcenterListExtendPlugin extends AbstractListPlugin {
@Override
public void setFilter(SetFilterEvent e) {
super.setFilter(e);
long id = RequestContext.get().getOrgId();
if (id == 100000) {
return;
}
List<QFilter> qFilters = e.getQFilters();
QFilter q1 = new QFilter("accountorg.id", QCP.equals, id);
List<QFilter> listQF = Lists.newArrayList();
listQF.add(q1);
qFilters.addAll(listQF);
}
}

View File

@ -89,18 +89,19 @@ public class ScheduleListPlugin extends AbstractListPlugin {
if (bill.getDynamicObject("company") != null) {
FM_CompanyCode = bill.getDynamicObject("company").getString("number");
}
jsonObject.put("bukrs", FM_CompanyCode);
jsonObject.put("belnr", bill.getString("shjh_credentialnum"));
jsonObject.put("gjahr", bill.getString("shjh_voucheryear"));
jsonObject.put("status", status);
jsonObject.put("BUKRS", FM_CompanyCode);
jsonObject.put("BELNR", bill.getString("shjh_credentialnum"));
jsonObject.put("GJAHR", bill.getString("shjh_voucheryear"));
jsonObject.put("STATUS", status);
jsonObject.put("BUZEI", bill.getString("shjh_voucherentrynum"));//行编号_SAP应付凭证行号
String cname = "";
if (null!= bill.getDynamicObject("creator")) {
cname = bill.getDynamicObject("creator").getString("number");//创建人工号_申请人
}
jsonObject.put("cname", cname);//创建人工号
jsonObject.put("CNAME", cname);//创建人工号
// jsonObject.put("cname", "GH001657");//创建人工号
jsonObject.put("zjddjid", "" + bill.getPkValue());
jsonObject.put("zjddjbh", bill.getString("billno"));
jsonObject.put("ZJDDJID", "" + bill.getPkValue());
jsonObject.put("ZJDDJBH", bill.getString("billno"));
IT_INPUT.add(jsonObject);
return IT_INPUT;
}

View File

@ -48,6 +48,7 @@ public class PayApplyDeleteOperation extends AbstractOperationServicePlugIn impl
jsonObject.put("BELNR", bill.getString("shjh_vouchernum"));//会计凭证编号_SAP应付凭证号
jsonObject.put("GJAHR", bill.getString("shjh_voucheryear"));//会计年度_SAP应付凭证会计年度
jsonObject.put("STATUS", "02");//状态 01锁定02解锁03关闭04退单05作废
jsonObject.put("BUZEI", bill.getString("shjh_voucherentrynum"));//行编号_SAP应付凭证行号
String cname = "";
if (null!= bill.getDynamicObject("creator")) {
cname = bill.getDynamicObject("creator").getString("number");//创建人工号_申请人

View File

@ -14,12 +14,9 @@ import kd.bos.logging.LogFactory;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;
import kd.bos.servicehelper.QueryServiceHelper;
import kd.bos.servicehelper.operation.SaveServiceHelper;
import kd.bos.util.StringUtils;
import kd.sdk.plugin.Plugin;
import shjh.jhzj7.fi.fi.utils.JhzjUtils;
import shjh.jhzj7.fi.fi.webapi.PayreceiptQueryControler;
import java.util.Date;
@ -57,6 +54,7 @@ public class PayApplySaveOperation extends AbstractOperationServicePlugIn implem
jsonObject.put("BELNR", bill.getString("shjh_vouchernum"));//会计凭证编号_SAP应付凭证号
jsonObject.put("GJAHR", bill.getString("shjh_voucheryear"));//会计年度_SAP应付凭证会计年度
jsonObject.put("STATUS", "01");//状态 01锁定02解锁03关闭04退单05作废
jsonObject.put("BUZEI", bill.getString("shjh_voucherentrynum"));//行编号_SAP应付凭证行号
String cname = "";
if (null!= bill.getDynamicObject("creator")) {
cname = bill.getDynamicObject("creator").getString("number");//创建人工号_申请人

View File

@ -69,18 +69,19 @@ public class PayrequestBillOperation extends AbstractOperationServicePlugIn impl
if (null!= bill.getDynamicObject("applyorg")) {
FM_CompanyCode = bill.getDynamicObject("applyorg").getString("number");//公司编码_申请付款组织
}
jsonObject.put("bukrs",FM_CompanyCode);//公司代码_申请付款组织
jsonObject.put("belnr", bill.getString("shjh_vouchernum"));//会计凭证编号_SAP应付凭证号
jsonObject.put("gjahr", bill.getString("shjh_voucheryear"));//会计年度_SAP应付凭证会计年度
jsonObject.put("status", "03");//状态 01锁定02解锁03关闭04退单05作废
jsonObject.put("BUKRS",FM_CompanyCode);//公司代码_申请付款组织
jsonObject.put("BELNR", bill.getString("shjh_vouchernum"));//会计凭证编号_SAP应付凭证号
jsonObject.put("GJAHR", bill.getString("shjh_voucheryear"));//会计年度_SAP应付凭证会计年度
jsonObject.put("STATUS", "03");//状态 01锁定02解锁03关闭04退单05作废
jsonObject.put("BUZEI", bill.getString("shjh_voucherentrynum"));//行编号_SAP应付凭证行号
String cname = "";
if (null!= bill.getDynamicObject("creator")) {
cname = bill.getDynamicObject("creator").getString("number");//创建人工号_申请人
}
jsonObject.put("cname", cname);//创建人工号
jsonObject.put("CNAME", cname);//创建人工号
// jsonObject.put("cname", "GH001657");//创建人工号
jsonObject.put("zjddjid", ""+bill.getPkValue());//金蝶单据ID
jsonObject.put("zjddjbh", bill.getString("billno"));//金蝶单据编号
jsonObject.put("ZJDDJID", ""+bill.getPkValue());//金蝶单据ID
jsonObject.put("ZJDDJBH", bill.getString("billno"));//金蝶单据编号
IT_INPUT.add(jsonObject);
JSONObject jsonObjects = unlocked_status(IT_INPUT,bill.getString("billno"));