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