diff --git a/lc123/cloud/app/plugin/operate/cas/PaymentbillPushPaystateOp.java b/lc123/cloud/app/plugin/operate/cas/PaymentbillPushPaystateOp.java new file mode 100644 index 0000000..53625c2 --- /dev/null +++ b/lc123/cloud/app/plugin/operate/cas/PaymentbillPushPaystateOp.java @@ -0,0 +1,12 @@ +package tqq9.lc123.cloud.app.plugin.operate.cas; + +import kd.bos.entity.plugin.AbstractOperationServicePlugIn; +import kd.bos.entity.plugin.args.AfterOperationArgs; + +public class PaymentbillPushPaystateOp extends AbstractOperationServicePlugIn { + + @Override + public void afterExecuteOperationTransaction(AfterOperationArgs e) { + super.afterExecuteOperationTransaction(e); + } +} diff --git a/lc123/cloud/app/plugin/operate/im/OtherOutPushExprnoOp.java b/lc123/cloud/app/plugin/operate/im/OtherOutPushExprnoOp.java new file mode 100644 index 0000000..7b9bbab --- /dev/null +++ b/lc123/cloud/app/plugin/operate/im/OtherOutPushExprnoOp.java @@ -0,0 +1,51 @@ +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; +import org.apache.commons.lang3.StringUtils; +import tqq9.lc123.cloud.app.plugin.utils.FWRestfulUtils; + +/** + * 其他出库单--按钮 tqq9_pushexprno + * 推送快递单号到泛微 + */ +public class OtherOutPushExprnoOp extends AbstractOperationServicePlugIn { + + @Override + public void beforeExecuteOperationTransaction(BeforeOperationArgs e) { + super.beforeExecuteOperationTransaction(e); + DynamicObject[] dataEntities = e.getDataEntities(); + for (DynamicObject dataEntity : dataEntities) { + dataEntity = BusinessDataServiceHelper.loadSingle(dataEntity.getPkValue(), dataEntity.getDynamicObjectType().getName(),"creator,tqq9_entrywl.tqq9_kddh,tqq9_fwrequestid,billno"); + DynamicObjectCollection wlEntries = dataEntity.getDynamicObjectCollection("tqq9_entrywl"); + String kddh = ""; + for (DynamicObject entity : wlEntries) { + String tqq9_kddh = entity.getString("tqq9_kddh"); + kddh = kddh + "," + tqq9_kddh; + } + if(StringUtils.isNotBlank(kddh)){ + kddh = kddh.substring(1); + }else{ + continue; + } + + String billno = dataEntity.getString("billno"); + String tqq9_fwrequestid = dataEntity.getString("tqq9_fwrequestid"); + JSONObject mainTable = new JSONObject(); + mainTable.put("lcid", tqq9_fwrequestid); + mainTable.put("kddh", kddh); + + DynamicObject creator = dataEntity.getDynamicObject("creator"); + creator = BusinessDataServiceHelper.loadSingle(creator.getPkValue(),"bos_user"); + String tqq9_fwuserid = creator.getString("tqq9_fwuserid"); + + FWRestfulUtils fwRestfulUtils = new FWRestfulUtils(); + String resultStr = fwRestfulUtils.pushData(mainTable, tqq9_fwuserid, billno, "im_otheroutbill"); + } + + } +}