2025-11-05 03:02:45 +00:00
|
|
|
package tqq9.lc123.cloud.app.plugin.operate.im;
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import kd.bos.dataentity.entity.DynamicObject;
|
|
|
|
|
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|
|
|
|
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
|
|
|
|
import kd.bos.entity.plugin.args.BeforeOperationArgs;
|
|
|
|
|
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
2025-11-07 06:44:25 +00:00
|
|
|
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
2025-11-05 03:02:45 +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 03:02:45 +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
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 其他出库单--按钮 tqq9_pushexprno
|
|
|
|
|
* 推送快递单号到泛微
|
|
|
|
|
*/
|
|
|
|
|
public class OtherOutPushExprnoOp extends AbstractOperationServicePlugIn {
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void beforeExecuteOperationTransaction(BeforeOperationArgs e) {
|
|
|
|
|
super.beforeExecuteOperationTransaction(e);
|
|
|
|
|
DynamicObject[] dataEntities = e.getDataEntities();
|
|
|
|
|
for (DynamicObject dataEntity : dataEntities) {
|
2025-11-11 01:42:30 +00:00
|
|
|
dataEntity = BusinessDataServiceHelper.loadSingle(dataEntity.getPkValue(),
|
|
|
|
|
dataEntity.getDynamicObjectType().getName(),
|
|
|
|
|
"creator,tqq9_entrywl.tqq9_kddh,tqq9_fwrequestid,billno,tqq9_dept,tqq9_ispushfw");
|
2025-11-07 06:44:25 +00:00
|
|
|
String resultStr = FWImpl.returnExprNo(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
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|