parent
03276621b6
commit
c612e0c417
|
@ -248,6 +248,8 @@ public class ApiService {
|
||||||
dynamic.set("shkd_pushstatus", "结算失败");
|
dynamic.set("shkd_pushstatus", "结算失败");
|
||||||
} else if ("TS".equals(objects[0].getString("bankpaystatus"))) {
|
} else if ("TS".equals(objects[0].getString("bankpaystatus"))) {
|
||||||
dynamic.set("shkd_pushstatus", "已结算");
|
dynamic.set("shkd_pushstatus", "已结算");
|
||||||
|
} else {
|
||||||
|
dynamic.set("shkd_pushstatus", "结算失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
dynamicObjects.add(dynamic);
|
dynamicObjects.add(dynamic);
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
package shkd.sys.sys.plugin.operation;
|
||||||
|
|
||||||
|
import kd.bos.dataentity.entity.DynamicObject;
|
||||||
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||||
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||||
|
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.operation.SaveServiceHelper;
|
||||||
|
import kd.sdk.plugin.Plugin;
|
||||||
|
import shkd.sys.sys.mservice.ApiService;
|
||||||
|
import shkd.sys.sys.plugin.form.ApiMappingBillPlugin;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据操作插件
|
||||||
|
*/
|
||||||
|
public class HitBackOperationServicePlugin extends AbstractOperationServicePlugIn implements Plugin {
|
||||||
|
private static final Log logger = LogFactory.getLog(ApiMappingBillPlugin.class);
|
||||||
|
@Override
|
||||||
|
public void afterExecuteOperationTransaction(AfterOperationArgs args) {
|
||||||
|
super.afterExecuteOperationTransaction(args);
|
||||||
|
List<DynamicObject> dynamicObjectList = new ArrayList<>();
|
||||||
|
DynamicObject[] entities = args.getDataEntities();
|
||||||
|
for (DynamicObject dynamicObject : entities) {
|
||||||
|
BusinessDataServiceHelper.load(dynamicObject.getDataEntityType().getName(), "id,billno,actpayamt,entry,entry.e_expenseitem,entry.e_remark,settletype,payeebanknum," +
|
||||||
|
"payeetype,payeenumber,payeracctbank,payeebank,payeebankname,paymenttype,org,bizdate,description," +
|
||||||
|
"shkd_pushstatus,shkd_businessnumber,shkd_businessid,shkd_businessname,billstatus,bankpaystatus"
|
||||||
|
, new QFilter("id", QCP.equals, dynamicObject.getPkValue())
|
||||||
|
.and("billstatus", QCP.equals, "C")//已审核
|
||||||
|
.and("shkd_pushstatus", QCP.equals, "未结算").toArray());
|
||||||
|
try {
|
||||||
|
ApiService.paymentSlipsJson(dynamicObject, "BIPNO", dynamicObjectList);
|
||||||
|
SaveServiceHelper.save(dynamicObjectList.toArray(new DynamicObject[0]));
|
||||||
|
logger.info("执行打回操作成功,单据编号:{}", dynamicObject.getString("billno"));
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.info("执行打回操作失败,错误信息 → \n{}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -100,7 +100,7 @@ public class PushTaskPlugin extends AbstractTask implements Plugin {
|
||||||
"id,billno,actpayamt,entry,entry.e_expenseitem,entry.e_remark,settletype,payeebanknum," +
|
"id,billno,actpayamt,entry,entry.e_expenseitem,entry.e_remark,settletype,payeebanknum," +
|
||||||
"payeetype,payeenumber,payeracctbank,payeebank,payeebankname,paymenttype,org,bizdate,description," +
|
"payeetype,payeenumber,payeracctbank,payeebank,payeebankname,paymenttype,org,bizdate,description," +
|
||||||
"shkd_pushstatus,shkd_businessnumber,shkd_businessid,shkd_businessname,billstatus,bankpaystatus"
|
"shkd_pushstatus,shkd_businessnumber,shkd_businessid,shkd_businessname,billstatus,bankpaystatus"
|
||||||
, new QFilter("bankpaystatus", QCP.equals, "TS")
|
, new QFilter("bankpaystatus", QCP.equals, "TS")//付款成功
|
||||||
.and("shkd_pushstatus", QCP.equals, "结算失败").toArray());
|
.and("shkd_pushstatus", QCP.equals, "结算失败").toArray());
|
||||||
dynamicObjects = Arrays.asList(objects4);
|
dynamicObjects = Arrays.asList(objects4);
|
||||||
dynamicObjects.addAll(Arrays.asList(objects5));
|
dynamicObjects.addAll(Arrays.asList(objects5));
|
||||||
|
|
Loading…
Reference in New Issue