1、sap应收未清参考代码1取sap新增字段 2、获取费控的预付款和借款清单时,根据员工工号获得对应部门编号
This commit is contained in:
		
							parent
							
								
									60de4f6858
								
							
						
					
					
						commit
						7b2ed5b7c1
					
				|  | @ -242,7 +242,7 @@ public class ASParbillFormPlugin extends AbstractFormPlugin { | |||
|      * @param i 分录行号 | ||||
|      */ | ||||
|     private void setEntityRowValues(JSONObject detail, int i) { | ||||
|         //TODO 与sap沟通确认字段对应 | ||||
|         //与sap沟通确认字段对应 | ||||
|         try { | ||||
|             this.getModel().setValue("shjh_e_pzh",detail.getString("BELNR"), i);//凭证号 | ||||
|             this.getModel().setValue("shjh_e_pzlx",detail.getString("BLART"), i);//凭证类型 | ||||
|  | @ -252,7 +252,8 @@ public class ASParbillFormPlugin extends AbstractFormPlugin { | |||
|             this.getModel().setValue("shjh_e_account",detail.getString("HKONT"), i);// 总账科目 | ||||
| //            this.getModel().setValue("shjh_e_fenpei",detail.getString(""), i);// 分配 | ||||
|             this.getModel().setValue("shjh_e_canzhao",detail.getString("XBLNR"), i);// 参照 | ||||
|             this.getModel().setValue("shjh_e_ckdm1",detail.getString("XREF1"), i);//参考代码1 | ||||
|             //20250707 原参考代码1 XREF1 按照要求取sap新增的字段 凭证标题的内部参考码 XREF1_HD | ||||
|             this.getModel().setValue("shjh_e_ckdm1",detail.getString("XREF1_HD"), i);//参考代码1 | ||||
|             this.getModel().setValue("shjh_e_ckdm2",detail.getString("XREF2"), i);// 参考代码2 | ||||
| //            this.getModel().setValue("shjh_e_text",detail.getString(""), i);// 文本 | ||||
|             this.getModel().setValue("shjh_e_gzdate",detail.getDate("BUDAT"), i);// 过账日期 | ||||
|  |  | |||
|  | @ -16,6 +16,9 @@ import kd.bos.form.events.BeforeClosedEvent; | |||
| import kd.bos.form.plugin.AbstractFormPlugin; | ||||
| import kd.bos.logging.Log; | ||||
| 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.user.UserServiceHelper; | ||||
| import kd.sdk.plugin.Plugin; | ||||
| import shjh.jhzj7.fi.fi.utils.ApiUtils; | ||||
|  | @ -349,6 +352,19 @@ public class FeeControlApiPlugin extends AbstractFormPlugin implements Plugin { | |||
|             this.getModel().setValue("shjh_billheaderid", top.getString("ID"), i); | ||||
|             this.getModel().setValue("shjh_usercode", top.getString("RequestUserCode"), i);//员工工号 | ||||
|             this.getModel().setValue("shjh_deptcode", top.getString("RequestDeptCode"), i);//部门编码 | ||||
|             //20250707 如果员工的所属部门不为空,则取资金系统上人员的所属部门编号 | ||||
|             if(!EsbUtils.isEmpty(top.getString("RequestUserCode"))){ | ||||
|                 //根据员工工号加载对象,拿到其部门编号 | ||||
|                 QFilter qFilter = new QFilter("number", QCP.equals, top.getString("RequestUserCode")); | ||||
|                 DynamicObject userinfo = BusinessDataServiceHelper.loadSingle("bos_user", qFilter.toArray()); | ||||
|                 if(userinfo != null){ | ||||
|                     DynamicObjectCollection depts = userinfo.getDynamicObjectCollection("entryentity"); | ||||
|                     if(!depts.isEmpty() && !EsbUtils.isEmpty(depts.get(0).getString("dpt.number"))){ | ||||
|                         //员工的所属部门编码 | ||||
|                         this.getModel().setValue("shjh_deptcode", depts.get(0).getString("dpt.number"), i); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|             this.getModel().setValue("shjh_postingdate", top.getString("GLDate"), i);//过账日期 | ||||
|             //借款单带出 事项描述 字段 | ||||
|             this.getModel().setValue("shjh_description", top.getString("RequestRemark"), i); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue