付款申请单关闭推送sap和费控接口指向修复
This commit is contained in:
		
							parent
							
								
									c9398aa992
								
							
						
					
					
						commit
						27a5aacbba
					
				|  | @ -18,12 +18,9 @@ import kd.bos.orm.query.QFilter; | |||
| import kd.bos.servicehelper.BusinessDataServiceHelper; | ||||
| import kd.bos.servicehelper.operation.OperationServiceHelper; | ||||
| import kd.bos.servicehelper.operation.SaveServiceHelper; | ||||
| import kd.bos.util.StringUtils; | ||||
| 
 | ||||
| import java.text.SimpleDateFormat; | ||||
| import java.util.ArrayList; | ||||
| import java.util.Date; | ||||
| import java.util.Map; | ||||
| 
 | ||||
| import static shjh.jhzj7.fi.fi.utils.SapUtils.backpayment_status; | ||||
| import static shjh.jhzj7.fi.fi.utils.SapUtils.unlocked_status; | ||||
|  | @ -65,6 +62,7 @@ public class ScheduleListPlugin extends AbstractListPlugin { | |||
|             } | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|     private void processRows(String status) { | ||||
|         ListSelectedRowCollection rows = this.getSelectedRows(); | ||||
|         for (ListSelectedRow row : rows) { | ||||
|  | @ -77,11 +75,11 @@ public class ScheduleListPlugin extends AbstractListPlugin { | |||
|                 DynamicObject payapply = BusinessDataServiceHelper.loadSingle("ap_payapply", | ||||
|                         "id,billno,shjh_sourceadjustment", qFilter.toArray()); | ||||
|                 if (null != payapply) { | ||||
|                     //如果付款申请单不是来源调整单 | ||||
|                     //如果付款申请单不是来源调整单,则触发状态回写至费控和sap | ||||
|                     if (!payapply.getBoolean("shjh_sourceadjustment")) { | ||||
|                         //来源SAP | ||||
|                         String shjhSapuniquevalue = bill.getString("shjh_sapuniquevalue"); | ||||
|                         if (StringUtils.isNotEmpty(shjhSapuniquevalue)) { | ||||
|                         String sourcesystem = bill.getString("shjh_sourcesystem"); | ||||
|                         if ("A".equals(sourcesystem)) { | ||||
|                             JSONArray IT_INPUT = createInputJSONArray(bill, status); | ||||
|                             JSONObject jsonObjects = unlocked_status(IT_INPUT, bill.getString("billno")); | ||||
|                             String code = jsonObjects.getString("code"); | ||||
|  | @ -93,10 +91,8 @@ public class ScheduleListPlugin extends AbstractListPlugin { | |||
|                                 closeOrUnauditApply(payapply,"unaudit"); | ||||
|                             } | ||||
|                             return; | ||||
|                         } | ||||
|                         }else if ("B".equals(sourcesystem)) { | ||||
|                             //若来源为费控,调用费控状态修改接口 | ||||
|                         String fkbillid = bill.getString("shjh_fkbillid");//获取费控单据表头ID | ||||
|                         if (StringUtils.isNotEmpty(fkbillid)) { | ||||
|                             //先付后记(其他付款、劳务报销单、SAP会员退卡单)回写付款状态 | ||||
|                             JSONObject jsonObjects = backpayment_status(createInputJSONArrays(bill),bill.getString("billno")); | ||||
|                             String code = (String)jsonObjects.get("code"); | ||||
|  |  | |||
|  | @ -59,9 +59,8 @@ public class PayrequestBillOperation extends AbstractOperationServicePlugIn impl | |||
|             for (DynamicObject bill : dataEntities) { | ||||
|                 bill = BusinessDataServiceHelper.loadSingle(bill.getPkValue(), bill.getDataEntityType().getName()); | ||||
|                 //若来源为SAP,调用SAP状态修改接口 | ||||
|                 String shjhSapuniquevalue = bill.getString("shjh_sapuniquevalue");//获取SAP唯一值 | ||||
|                 if (shjhSapuniquevalue!= null && !shjhSapuniquevalue.isEmpty()) { | ||||
| 
 | ||||
|                 String sourcesystem = bill.getString("shjh_sourcesystem"); | ||||
|                 if ("A".equals(sourcesystem)) { | ||||
|                     //调关闭接口 | ||||
|                     JSONArray IT_INPUT = new JSONArray(); | ||||
|                     JSONObject jsonObject = new JSONObject(); | ||||
|  | @ -91,10 +90,8 @@ public class PayrequestBillOperation extends AbstractOperationServicePlugIn impl | |||
|                     }else { | ||||
|                         log.info("付款申请单:"+bill.getString("billno")+"状态关闭(SAP)成功"); | ||||
|                     } | ||||
|                 } | ||||
|                 }else if ("B".equals(sourcesystem)) { | ||||
|                     //若来源为费控,调用费控状态修改接口 | ||||
|                 String fkbillid = bill.getString("shjh_fkbillid");//获取费控单据表头ID | ||||
|                 if (fkbillid != null && !fkbillid.isEmpty()) { | ||||
|                     JSONObject data = new JSONObject(); | ||||
|                     JSONArray datas = new JSONArray(); | ||||
|                     JSONObject jsonObject = new JSONObject(); | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue