parent
555dd5aa8e
commit
3d8b26f74e
|
|
@ -7,7 +7,9 @@ import kd.bos.dataentity.entity.DynamicObjectCollection;
|
|||
import kd.bos.entity.operate.result.OperationResult;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
|
||||
|
|
@ -31,12 +33,10 @@ public class SupplierAuditPushFwOp extends AbstractOperationServicePlugIn {
|
|||
List<Object> successPkIds = operationResult.getSuccessPkIds();
|
||||
for (Object successPkId : successPkIds) {
|
||||
DynamicObject dataEntity = BusinessDataServiceHelper.loadSingle(successPkId, "bd_supplier");
|
||||
DynamicObjectCollection groupArr = dataEntity.getDynamicObjectCollection("entry_groupstandard");
|
||||
for (DynamicObject group : groupArr) {
|
||||
DynamicObject groupid = group.getDynamicObject("groupid");
|
||||
if(groupid != null){
|
||||
String groupnumber = groupid.getString("number");
|
||||
if("002".equals(groupnumber)){
|
||||
QFilter f1 = new QFilter("supplier.id", "=", dataEntity.getPkValue());
|
||||
QFilter f2 = new QFilter("group.number", "=", "002");
|
||||
boolean isPurSupplier = QueryServiceHelper.exists("bd_suppliergroupdetail", new QFilter[]{f1, f2});
|
||||
if(isPurSupplier){
|
||||
String resultStr = FWImpl.syncSupplier(dataEntity);
|
||||
if(StringUtils.isNotBlank(resultStr)){
|
||||
JSONObject resultJson = JSONObject.parseObject(resultStr);
|
||||
|
|
@ -48,8 +48,6 @@ public class SupplierAuditPushFwOp extends AbstractOperationServicePlugIn {
|
|||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,15 @@
|
|||
package tqq9.lc123.cloud.app.plugin.operate.sys;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import kd.bd.master.helper.GroupStandardHelper;
|
||||
import kd.bos.dataentity.entity.DynamicObject;
|
||||
import kd.bos.dataentity.entity.DynamicObjectCollection;
|
||||
import kd.bos.entity.operate.result.OperationResult;
|
||||
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
|
||||
import kd.bos.entity.plugin.args.AfterOperationArgs;
|
||||
import kd.bos.orm.query.QFilter;
|
||||
import kd.bos.servicehelper.BusinessDataServiceHelper;
|
||||
import kd.bos.servicehelper.QueryServiceHelper;
|
||||
import kd.bos.servicehelper.operation.SaveServiceHelper;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import tqq9.lc123.cloud.app.plugin.trd.FWImpl;
|
||||
|
|
@ -26,18 +29,9 @@ public class SupplierSubmitToFwOp extends AbstractOperationServicePlugIn {
|
|||
List<Object> successPkIds = operationResult.getSuccessPkIds();
|
||||
for (Object successPkId : successPkIds) {
|
||||
DynamicObject bill = BusinessDataServiceHelper.loadSingle(successPkId, "bd_supplier");
|
||||
DynamicObjectCollection groupstandardColl = bill.getDynamicObjectCollection("entry_groupstandard");
|
||||
boolean isPurSupplier = false;//是否是采购供应商
|
||||
for (DynamicObject groupstandard : groupstandardColl) {
|
||||
DynamicObject groupid = groupstandard.getDynamicObject("groupid");
|
||||
if(groupid != null){
|
||||
String groupNumber = groupid.getString("number");
|
||||
if("002".equals(groupNumber)){//002-采购供应商
|
||||
isPurSupplier = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
QFilter f1 = new QFilter("supplier.id", "=", bill.getPkValue());
|
||||
QFilter f2 = new QFilter("group.number", "=", "002");
|
||||
boolean isPurSupplier = QueryServiceHelper.exists("bd_suppliergroupdetail", new QFilter[]{f1, f2});
|
||||
if(isPurSupplier){
|
||||
//是采购供应商 才需要推送泛微
|
||||
boolean tqq9_issuccess = bill.getBoolean("tqq9_issuccess");
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public class FWImpl {
|
|||
mainTable.put("bmbm", bmbm);
|
||||
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
return fwRestfulUtils.pushBaseData(mainTable, tqq9_fwuserid, number, "bd_warehouse", null);
|
||||
return fwRestfulUtils.pushBaseData(mainTable, tqq9_fwuserid, number, "bd_warehouse");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -520,7 +520,7 @@ public class FWImpl {
|
|||
mainTable.put("ywgz", ywgz);
|
||||
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
fwRestfulUtils.pushBaseData(mainTable, cjr, gysbh, "bd_supplier", recordsArr1, recordsArr2);
|
||||
return fwRestfulUtils.pushBaseData(mainTable, cjr, gysbh, "bd_supplier", recordsArr1, recordsArr2);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue