2025-10-19 08:26:58 +00:00
|
|
|
package tqq9.lc123.cloud.app.plugin.operate.im;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
|
|
|
import kd.bos.entity.operate.result.OperationResult;
|
|
|
|
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
|
|
|
|
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
|
|
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
|
|
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
public class OtherInSubmitToFwOp extends AbstractOperationServicePlugIn {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void afterExecuteOperationTransaction(AfterOperationArgs e) {
|
|
|
|
|
super.afterExecuteOperationTransaction(e);
|
|
|
|
|
OperationResult operationResult = this.getOperationResult();
|
|
|
|
|
List<Object> successPkIds = operationResult.getSuccessPkIds();
|
|
|
|
|
for (Object successPkId : successPkIds) {
|
2025-11-07 10:10:09 +00:00
|
|
|
DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "tqq9_otherinapply");
|
2025-11-11 09:40:09 +00:00
|
|
|
DynamicObject tqq9_biztype = bill.getDynamicObject("biztype");
|
|
|
|
|
if (tqq9_biztype != null) {
|
|
|
|
|
//调拨入库不推送泛微
|
|
|
|
|
String biztypenumber = tqq9_biztype.getString("number");
|
|
|
|
|
if ("605".equals(biztypenumber)) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-10-19 08:26:58 +00:00
|
|
|
String resultStr = FWImpl.pushFwOtherIn(bill);
|
2025-11-10 09:45:02 +00:00
|
|
|
if (StringUtils.isNotBlank(resultStr)) {
|
2025-10-19 08:26:58 +00:00
|
|
|
JSONObject resultObj = JSONObject.parseObject(resultStr);
|
|
|
|
|
String code = resultObj.getString("code");
|
2025-11-10 09:45:02 +00:00
|
|
|
if ("SUCCESS".equals(code)) {
|
2025-10-19 08:26:58 +00:00
|
|
|
JSONObject data = resultObj.getJSONObject("data");
|
2025-11-10 09:45:02 +00:00
|
|
|
if (data != null) {
|
2025-10-19 08:26:58 +00:00
|
|
|
String requestid = data.getString("requestid");
|
|
|
|
|
bill.set("tqq9_fwrequestid", requestid);
|
2025-10-28 09:23:58 +00:00
|
|
|
bill.set("tqq9_fwstate", "B");
|
2025-10-19 08:26:58 +00:00
|
|
|
SaveServiceHelper.save(new DynamicObject[]{bill});
|
|
|
|
|
}
|
2025-11-10 09:45:02 +00:00
|
|
|
String tqq9_fwrequestid = bill.getString("tqq9_fwrequestid");
|
|
|
|
|
if (StringUtils.isNotBlank(tqq9_fwrequestid)) {//驳回后提交修改泛微审批状态
|
|
|
|
|
bill.set("tqq9_fwstate", "B");
|
|
|
|
|
SaveServiceHelper.save(new DynamicObject[]{bill});
|
|
|
|
|
}
|
2025-10-19 08:26:58 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|