付款申请单关闭推送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;
|
||||
}
|
||||
//若来源为费控,调用费控状态修改接口
|
||||
String fkbillid = bill.getString("shjh_fkbillid");//获取费控单据表头ID
|
||||
if (StringUtils.isNotEmpty(fkbillid)) {
|
||||
}else if ("B".equals(sourcesystem)) {
|
||||
//若来源为费控,调用费控状态修改接口
|
||||
//先付后记(其他付款、劳务报销单、SAP会员退卡单)回写付款状态
|
||||
JSONObject jsonObjects = backpayment_status(createInputJSONArrays(bill),bill.getString("billno"));
|
||||
String code = (String)jsonObjects.get("code");
|
||||
|
|
|
|||
|
|
@ -59,14 +59,13 @@ 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();
|
||||
String FM_CompanyCode = "";
|
||||
if (null!= bill.getDynamicObject("applyorg")) {
|
||||
if (null != bill.getDynamicObject("applyorg")) {
|
||||
FM_CompanyCode = bill.getDynamicObject("applyorg").getString("number");//公司编码_申请付款组织
|
||||
}
|
||||
jsonObject.put("BUKRS",FM_CompanyCode);//公司代码_申请付款组织
|
||||
|
|
@ -75,7 +74,7 @@ public class PayrequestBillOperation extends AbstractOperationServicePlugIn impl
|
|||
jsonObject.put("STATUS", "03");//状态 01:锁定,02:解锁,03:关闭,04:退单:05:作废
|
||||
jsonObject.put("BUZEI", bill.getString("shjh_voucherentrynum"));//行编号_SAP应付凭证行号
|
||||
String cname = "";
|
||||
if (null!= bill.getDynamicObject("creator")) {
|
||||
if (null != bill.getDynamicObject("creator")) {
|
||||
cname = bill.getDynamicObject("creator").getString("number");//创建人,工号_申请人
|
||||
}
|
||||
jsonObject.put("CNAME", cname);//创建人,工号
|
||||
|
|
@ -91,10 +90,8 @@ public class PayrequestBillOperation extends AbstractOperationServicePlugIn impl
|
|||
}else {
|
||||
log.info("付款申请单:"+bill.getString("billno")+"状态关闭(SAP)成功");
|
||||
}
|
||||
}
|
||||
//若来源为费控,调用费控状态修改接口
|
||||
String fkbillid = bill.getString("shjh_fkbillid");//获取费控单据表头ID
|
||||
if (fkbillid != null && !fkbillid.isEmpty()) {
|
||||
}else if ("B".equals(sourcesystem)) {
|
||||
//若来源为费控,调用费控状态修改接口
|
||||
JSONObject data = new JSONObject();
|
||||
JSONArray datas = new JSONArray();
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
|
|
|
|||
Loading…
Reference in New Issue