|
@@ -4,6 +4,7 @@ import fi.cas.opplugin.PayBillToolUtil;
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
|
|
import kd.bos.entity.plugin.args.BeforeOperationArgs;
|
|
|
+import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
|
|
|
|
|
|
|
@@ -20,6 +21,23 @@ public class AgentpaybillOpPlugin extends AbstractOperationServicePlugIn {
|
|
|
String operationKey = e.getOperationKey();
|
|
|
|
|
|
if ("sendtojhx".equals(operationKey)){
|
|
|
+ for (DynamicObject dataEntity : dynamicObjects) {
|
|
|
+ DynamicObject payBillEntity = BusinessDataServiceHelper.loadSingle(dataEntity.getPkValue(), "cas_agentpaybill");
|
|
|
+
|
|
|
+ String paystatus = payBillEntity.getString("nckd_paystatus");
|
|
|
+ int bbh = payBillEntity.getInt("nckd_bbh");
|
|
|
+ int fkcs = payBillEntity.getInt("nckd_fkcs");
|
|
|
+ String billstatusString = payBillEntity.getString("billstatus");
|
|
|
+ if ("C".equals(billstatusString)&&("4".equals(paystatus)||"5".equals(paystatus))&&bbh>=0 && bbh==fkcs-1) {
|
|
|
+
|
|
|
+ payBillEntity.set("nckd_paystatus", "1");
|
|
|
+ payBillEntity.set("nckd_bbh",bbh+1);
|
|
|
+ SaveServiceHelper.update(payBillEntity);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
String errMsg = "";
|
|
|
errMsg = PayBillToolUtil.agentpayBillForCBSSync(dynamicObjects);
|
|
|
if(!errMsg.isEmpty()) {
|