2025-11-05 03:02:45 +00:00
|
|
|
package tqq9.lc123.cloud.app.plugin.operate.cas;
|
|
|
|
|
|
2025-11-05 09:49:21 +00:00
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
2025-11-05 03:02:45 +00:00
|
|
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
|
|
|
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
2025-11-05 09:49:21 +00:00
|
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
2025-11-07 06:44:25 +00:00
|
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
2025-11-05 09:49:21 +00:00
|
|
|
import org.apache.commons.lang3.StringUtils;
|
2025-11-07 06:44:25 +00:00
|
|
|
import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
|
2025-11-05 09:49:21 +00:00
|
|
|
import tqq9.lc123.cloud.app.plugin.utils.FWRestfulUtils;
|
2025-11-07 06:44:25 +00:00
|
|
|
import tqq9.lc123.cloud.app.plugin.utils.FWUtils;
|
2025-11-05 03:02:45 +00:00
|
|
|
|
2025-11-05 09:49:21 +00:00
|
|
|
import java.io.IOException;
|
|
|
|
|
import java.net.HttpURLConnection;
|
|
|
|
|
import java.net.MalformedURLException;
|
|
|
|
|
import java.net.URL;
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
|
|
/**
|
2025-11-07 06:44:25 +00:00
|
|
|
* 付款单付款状态回传泛微 kd.bos.form.plugin.bdctrl.AssignQueryPluginNew
|
2025-11-05 09:49:21 +00:00
|
|
|
*/
|
2025-11-05 03:02:45 +00:00
|
|
|
public class PaymentbillPushPaystateOp extends AbstractOperationServicePlugIn {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
|
|
|
|
super.afterExecuteOperationTransaction(e);
|
2025-11-05 09:49:21 +00:00
|
|
|
DynamicObject[] dataEntities = e.getDataEntities();
|
|
|
|
|
for (DynamicObject dataEntity : dataEntities) {
|
|
|
|
|
dataEntity = BusinessDataServiceHelper.loadSingle(dataEntity.getPkValue(), dataEntity.getDynamicObjectType().getName());
|
2025-11-07 06:44:25 +00:00
|
|
|
String resultStr = FWImpl.returnPayState(dataEntity);
|
|
|
|
|
if(StringUtils.isNotBlank(resultStr)){
|
|
|
|
|
JSONObject resultJson = JSONObject.parseObject(resultStr);
|
|
|
|
|
String status = resultJson.getString("status");
|
|
|
|
|
if ("1".equals(status)) {
|
|
|
|
|
dataEntity.set("tqq9_ispushfw", true);
|
|
|
|
|
SaveServiceHelper.save(new DynamicObject[]{dataEntity});
|
2025-11-05 09:49:21 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-05 03:02:45 +00:00
|
|
|
}
|
|
|
|
|
}
|