###
- [ ] SAP生成付款申请(二级部门,外部系统单号) - [ ] SAP动态表单新增过滤条件:多选:原因码,文本:单据号 - [ ] 优化排程合并提示 s
This commit is contained in:
		
							parent
							
								
									46ff16e41d
								
							
						
					
					
						commit
						097d9fa234
					
				|  | @ -61,6 +61,8 @@ public class SappzFormPlugin extends AbstractFormPlugin { | |||
|                 Date dateofpreparat_end = (Date) this.getModel().getValue("shjh_dateofpreparat_end");//SAP应付凭证制单日期(结束) | ||||
|                 String procurementteam = (String) this.getModel().getValue("shjh_procurementteam");//采购组 | ||||
|                 Boolean isselfprocurement = (Boolean) this.getModel().getValue("shjh_isselfprocurement");//是否自行采购 | ||||
|                 DynamicObjectCollection shjh_yymm = (DynamicObjectCollection) this.getModel().getValue("shjh_yymm");//原因码 | ||||
|                 String shjh_djh = (String) this.getModel().getValue("shjh_djh");//单据号 | ||||
| 
 | ||||
|                 // 日期格式 | ||||
|                 SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); | ||||
|  | @ -96,6 +98,15 @@ public class SappzFormPlugin extends AbstractFormPlugin { | |||
|                     String dateofpreparat_ends = formatDate(sdf, dateofpreparat_end); | ||||
|                     addFilterCondition(IT_LIST, "BLDAT", dateofpreparat_starts, dateofpreparat_ends); | ||||
|                 } | ||||
|                 // 添加原因码过滤条件--改成多选 | ||||
|                 for (DynamicObject shjh_yym : shjh_yymm) { | ||||
|                     addFilterDumpCondition(IT_LIST, "RSTGR", shjh_yym.getString("fbasedataid.number"), shjh_yym.getString("fbasedataid.number")); | ||||
|                 } | ||||
| 
 | ||||
|                 // 添加单据号过滤条件 | ||||
|                 if (StringUtils.isNotEmpty(shjh_djh)) { | ||||
|                     addFilterCondition(IT_LIST, "UUID", shjh_djh, shjh_djh); | ||||
|                 } | ||||
|                 DynamicObjectCollection shjhEntryentity = this.getModel().getEntryEntity("shjh_entryentity"); | ||||
|                 shjhEntryentity.clear(); | ||||
|                 //根据查询条件,调用SAP查询凭证接口,生成分录行 | ||||
|  | @ -255,7 +266,7 @@ public class SappzFormPlugin extends AbstractFormPlugin { | |||
|                                 DynamicObject paytype_s = BusinessDataServiceHelper.loadSingle(CAS_PAYMENTBILLTYPE, new QFilter[]{qq2}); | ||||
|                                 //付款类型 外部系统单据类型 | ||||
|                                 if (uuid.contains("JKY")) { | ||||
|                                     this.getModel().setValue("shjh_externalsystemdocume","A",i);//员工借款单 | ||||
|                                     this.getModel().setValue("shjh_externalsystemdocume","A",i);//员工借款单ton | ||||
|                                     this.getModel().setValue("shjh_epaymenttype", paytype_s,i);//对私 | ||||
|                                 }else if (uuid.contains("TYB")) { | ||||
|                                     this.getModel().setValue("shjh_externalsystemdocume","B",i);//通用报销单 | ||||
|  | @ -613,6 +624,13 @@ public class SappzFormPlugin extends AbstractFormPlugin { | |||
|                             } | ||||
|                         } | ||||
| 
 | ||||
|                         //部门 | ||||
|                         String department = (String) this.getModel().getValue("shjh_secondarydept", selectRow); | ||||
|                         QFilter q8 = new QFilter("number", QCP.equals, department); | ||||
|                         DynamicObject adminorg = BusinessDataServiceHelper.loadSingle("bos_adminorg", new QFilter[]{q8}); | ||||
|                         if (null != adminorg) { | ||||
|                             ap_payapply.set("shjh_secondarydept", adminorg); | ||||
|                         } | ||||
|                         /* | ||||
|                           ---------------------------------------------------默认字段---------------------------------------------------- | ||||
|                          */ | ||||
|  | @ -678,6 +696,7 @@ public class SappzFormPlugin extends AbstractFormPlugin { | |||
|                         //SAP凭证来源 | ||||
|                         //单据号 | ||||
|                         String uuid = (String) this.getModel().getValue("shjh_uuid", selectRow); | ||||
|                         ap_payapply.set("shjh_fkdjbh",uuid);//单据号 | ||||
|                         QFilter qq1 = new QFilter("number", QCP.equals, "JH001");//对公 | ||||
|                         QFilter qq2 = new QFilter("number", QCP.equals, "JH002");//对私 | ||||
|                         DynamicObject paytype_g = BusinessDataServiceHelper.loadSingle(CAS_PAYMENTBILLTYPE, new QFilter[]{qq1}); | ||||
|  |  | |||
|  | @ -1,8 +1,10 @@ | |||
| package shjh.jhzj7.fi.fi.plugin.operate; | ||||
| 
 | ||||
| import com.sap.db.jdbc.packet.ErrorLevel; | ||||
| import kd.bos.dataentity.entity.DynamicObject; | ||||
| import kd.bos.dataentity.entity.DynamicObjectCollection; | ||||
| import kd.bos.entity.ExtendedDataEntity; | ||||
| import kd.bos.entity.operate.result.OperateErrorInfo; | ||||
| import kd.bos.entity.plugin.AbstractOperationServicePlugIn; | ||||
| import kd.bos.entity.plugin.AddValidatorsEventArgs; | ||||
| import kd.bos.entity.plugin.args.AfterOperationArgs; | ||||
|  | @ -149,9 +151,15 @@ public class SchedulebillMergeOperation extends AbstractOperationServicePlugIn i | |||
|                 for (Long aLong : longs) { | ||||
|                     sb.append(aLong).append(","); | ||||
|                 } | ||||
|                 this.getOperationResult().setSuccess(true); | ||||
|                 this.getOperationResult().setMessage("合并数:" + size + " 合并的批次号:" + sb); | ||||
|                 this.getOperationResult().setShowMessage(true); | ||||
| //                this.getOperationResult().setSuccess(true); | ||||
| //                this.getOperationResult().setMessage("合并数:" + size + " 合并的批次号:" + sb); | ||||
| //                this.getOperationResult().setShowMessage(true); | ||||
| 
 | ||||
|                 OperateErrorInfo operateErrorInfo = new OperateErrorInfo(); | ||||
|                 operateErrorInfo.setMessage("合并数:" + size + " 合并的批次号:" + sb); | ||||
|                 operateErrorInfo.setErrorLevel(ErrorLevel.FatalError.name()); | ||||
| //                operateErrorInfo.setPkValue(bill.getPkValue()); | ||||
|                 this.operationResult.addErrorInfo(operateErrorInfo); | ||||
|                 return; | ||||
|             } | ||||
|         } | ||||
|  |  | |||
|  | @ -466,6 +466,14 @@ public class QuerySapCreatePayApplyTask extends AbstractTask { | |||
|                 ap_payapply_entry.set("e_settlementtype", settlementtypes); | ||||
|             } | ||||
|             String uuid = it_list.getString("XBLNR");//单据号 | ||||
|             ap_payapply.set("shjh_fkdjbh", uuid); | ||||
|             String department = it_list.getString("ZREQ_DEPT"); | ||||
|             QFilter q8 = new QFilter("number", QCP.equals, department); | ||||
|             DynamicObject adminorg = BusinessDataServiceHelper.loadSingle("bos_adminorg", new QFilter[]{q8}); | ||||
|             if (null != adminorg) { | ||||
|                 ap_payapply.set("shjh_secondarydept", adminorg); | ||||
|             } | ||||
| 
 | ||||
|             // 设置付款类型  //付款类型 外部系统单据类型 | ||||
|             setPaymentType(ap_payapply, uuid); | ||||
| 
 | ||||
|  |  | |||
|  | @ -550,6 +550,15 @@ public class ApplyAdjustBillControler { | |||
|             return s1; | ||||
|         } | ||||
|         String uuid = it_list.getString("XBLNR");//单据号 | ||||
|         ap_payapply.set("shjh_fkdjbh", uuid); | ||||
| 
 | ||||
|         //部门 | ||||
|         String department = it_list.getString("ZREQ_DEPT"); | ||||
|         QFilter q8 = new QFilter("number", QCP.equals, department); | ||||
|         DynamicObject adminorg = BusinessDataServiceHelper.loadSingle("bos_adminorg", new QFilter[]{q8}); | ||||
|         if (null != adminorg) { | ||||
|             ap_payapply.set("shjh_secondarydept", adminorg); | ||||
|         } | ||||
|         // 设置付款类型  //付款类型 外部系统单据类型 | ||||
|         setPaymentType(ap_payapply, uuid); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue