优化:申请金额折结算币不应等于0(动态拉取SAP,调整单,定时任务)
This commit is contained in:
		
							parent
							
								
									c7d8fd3558
								
							
						
					
					
						commit
						68dd80d891
					
				|  | @ -416,8 +416,8 @@ public class SappzFormPlugin extends AbstractFormPlugin { | |||
|                         if (null != ap_payapplys) { | ||||
|                             boolean shjhSapwhetherlocking = ap_payapplys.getBoolean("shjh_sapwhetherlocking");//SAP是否锁定 | ||||
|                             if (shjhSapwhetherlocking) { | ||||
|                                 handleError("同步失败,凭证号:" + fkBillNum + "的费控单据已锁定", fkBillNum, apimenthod, null); | ||||
|                                 this.getView().showMessage("同步失败,凭证号:" + fkBillNum + "的费控单据已锁定"); | ||||
|                                 handleError("同步失败,凭证号:" + fkBillNum + "已锁定", fkBillNum, apimenthod, null); | ||||
|                                 this.getView().showMessage("同步失败,凭证号:" + fkBillNum + "已锁定"); | ||||
|                                 return; | ||||
|                             } else { | ||||
|                                 //存在且单据中SAP锁定状态为未锁定,更新数据 | ||||
|  | @ -612,6 +612,8 @@ public class SappzFormPlugin extends AbstractFormPlugin { | |||
|                         ap_payapply_entry.set("e_duedate", duedate); | ||||
|                         //分录申请金额 | ||||
|                         ap_payapply_entry.set("e_applyamount", amount); | ||||
|                         //分录申请金额折结算币 | ||||
|                         ap_payapply_entry.set("e_appseleamount", applyforconversionof); | ||||
|                         //表头申请金额 | ||||
|                         ap_payapply.set("applyamount", amount); | ||||
| 
 | ||||
|  |  | |||
|  | @ -346,6 +346,8 @@ public class QuerySapCreatePayApplyTask extends AbstractTask { | |||
|             ap_payapply_entry.set("e_duedate", FAEDTs); | ||||
|             //分录申请金额 | ||||
|             ap_payapply_entry.set("e_applyamount", amount); | ||||
|             //分录申请金额折结算币 | ||||
|             ap_payapply_entry.set("e_appseleamount", dmbtr); | ||||
|             //表头申请金额 | ||||
|             ap_payapply.set("applyamount", amount); | ||||
| 
 | ||||
|  |  | |||
|  | @ -545,7 +545,7 @@ public class ApplyAdjustBillControler { | |||
|         } | ||||
| 
 | ||||
|         // 设置明细信息 | ||||
|         String s1 = setEntryInfo(ap_payapply, asstacttype, asstact, assacct, duedate, outstandingamount, fkBillNum,org,it_list); | ||||
|         String s1 = setEntryInfo(ap_payapply, asstacttype, asstact, assacct, duedate, outstandingamount, fkBillNum,org,it_list,applyforconversionof); | ||||
|         if (StringUtils.isNotEmpty(s1)) { | ||||
|             return s1; | ||||
|         } | ||||
|  | @ -627,9 +627,10 @@ public class ApplyAdjustBillControler { | |||
|      * @param outstandingamount 未清金额 | ||||
|      * @param fkBillNum         费控调整单号 | ||||
|      *                          付款方式 _结算 | ||||
|      * @param applyforconversionof | ||||
|      * @return 操作是否成功 | ||||
|      */ | ||||
|     private String setEntryInfo(DynamicObject ap_payapply, String asstacttype, String asstact, String assacct, Date duedate, BigDecimal outstandingamount, String fkBillNum,DynamicObject org,JSONObject it_list) { | ||||
|     private String setEntryInfo(DynamicObject ap_payapply, String asstacttype, String asstact, String assacct, Date duedate, BigDecimal outstandingamount, String fkBillNum,DynamicObject org,JSONObject it_list,BigDecimal applyforconversionof) { | ||||
|         DynamicObjectCollection entry = ap_payapply.getDynamicObjectCollection("entry"); | ||||
|         entry.clear(); | ||||
|         DynamicObject ap_payapply_entry = entry.addNew(); | ||||
|  | @ -773,6 +774,8 @@ public class ApplyAdjustBillControler { | |||
|         ap_payapply_entry.set("e_duedate", duedate); | ||||
|         //分录申请金额 | ||||
|         ap_payapply_entry.set("e_applyamount", outstandingamount); | ||||
|         //分录申请金额折结算币 | ||||
|         ap_payapply_entry.set("e_appseleamount", applyforconversionof); | ||||
|         //表头申请金额 | ||||
|         ap_payapply.set("applyamount", outstandingamount); | ||||
| 
 | ||||
|  |  | |||
|  | @ -12,6 +12,7 @@ import kd.bos.context.RequestContext; | |||
| import kd.bos.dataentity.OperateOption; | ||||
| import kd.bos.dataentity.entity.DynamicObject; | ||||
| import kd.bos.dataentity.entity.DynamicObjectCollection; | ||||
| import kd.bos.entity.operate.OperateOptionConst; | ||||
| import kd.bos.entity.operate.result.OperationResult; | ||||
| import kd.bos.id.ID; | ||||
| import kd.bos.logging.Log; | ||||
|  | @ -89,6 +90,7 @@ public class AspAccountControler { | |||
|         DynamicObject parentAcctInfo; | ||||
|         JSONObject json_body; | ||||
|         OperateOption oop = OperateOption.create(); | ||||
|         oop.setVariableValue(OperateOptionConst.IGNOREWARN, String.valueOf(false)); // 不执行警告级别校验器 | ||||
|         OperationResult operResult; | ||||
|         Map<String, Long> acctids = new HashMap<>();//科目编号和ID对应关系 | ||||
|         Map<String, DynamicObject> accountMaps = new HashMap<>();//将科目编号与对象关联 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue