调用插件方法是拼接jsonStr参数
This commit is contained in:
parent
b777063325
commit
e74c8668ff
|
@ -6,6 +6,7 @@ import com.hzya.frame.base.PluginBaseEntity;
|
|||
import com.hzya.frame.seeyon.service.ISeeYonInterFace;
|
||||
import com.hzya.frame.seeyon.ydc.entity.Formmain0226Entity;
|
||||
import com.hzya.frame.seeyon.ydc.service.IFormmain0226Service;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -104,6 +105,7 @@ public class CustomerPluginInitializer extends PluginBaseEntity {
|
|||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
logger.info("开始执行OA客户同步U8定时任务");
|
||||
//1、查询OA审批完成且未推送U8的客户申请
|
||||
Formmain0226Entity formmain0226Entity = new Formmain0226Entity();
|
||||
formmain0226Entity.setFinishedflag("1");
|
||||
|
@ -119,8 +121,9 @@ public class CustomerPluginInitializer extends PluginBaseEntity {
|
|||
param.put("formMainIds", Convert.toStrArray(f.getId()));
|
||||
param.put("dataSourceCode", "ydc_oa_sqlserver");
|
||||
param.put("eventType", "onProcessFinished");
|
||||
System.out.println(JSONObject.toJSONString(param));
|
||||
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(param);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("jsonStr",param.toString());
|
||||
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(json);
|
||||
} catch (Exception e) {
|
||||
logger.error("OA客户档案同步U8出错:{}", e);
|
||||
} finally {
|
||||
|
@ -130,6 +133,6 @@ public class CustomerPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return BaseResult.getSuccessMessageEntity("成功");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.hzya.frame.base.PluginBaseEntity;
|
|||
import com.hzya.frame.seeyon.service.ISeeYonInterFace;
|
||||
import com.hzya.frame.seeyon.ydc.entity.Formmain0227Entity;
|
||||
import com.hzya.frame.seeyon.ydc.service.IFormmain0227Service;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -105,11 +106,12 @@ public class InventoryPluginInitializer extends PluginBaseEntity {
|
|||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
logger.info("开始执行OA存货同步U8定时任务");
|
||||
//1、查询OA审批完成且未推送U8的存货申请
|
||||
Formmain0227Entity formmain0227 = new Formmain0227Entity();
|
||||
formmain0227.setFinishedflag("1");
|
||||
formmain0227.setField0022Flag("1");
|
||||
formmain0227.setId("-8891720615522383237");
|
||||
//formmain0227.setId("-8891720615522383237");
|
||||
formmain0227.setDataSourceCode(YdcConstant.dataSourceCode);
|
||||
List<Formmain0227Entity> list = formmain0227Service.query(formmain0227);
|
||||
if (CollectionUtils.isNotEmpty(list)){
|
||||
|
@ -121,8 +123,9 @@ public class InventoryPluginInitializer extends PluginBaseEntity {
|
|||
param.put("formMainIds", Convert.toStrArray(f.getId()));
|
||||
param.put("dataSourceCode","ydc_oa_sqlserver");
|
||||
param.put("eventType","onProcessFinished");
|
||||
System.out.println(JSONObject.toJSONString(param));
|
||||
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(param);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("jsonStr",param.toString());
|
||||
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(json);
|
||||
}catch (Exception e){
|
||||
logger.error("OA存货档案同步U8出错:{}",e);
|
||||
}finally {
|
||||
|
@ -132,6 +135,6 @@ public class InventoryPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return BaseResult.getSuccessMessageEntity("成功");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import com.hzya.frame.base.PluginBaseEntity;
|
|||
import com.hzya.frame.seeyon.service.ISeeYonInterFace;
|
||||
import com.hzya.frame.seeyon.ydc.entity.Formmain0225Entity;
|
||||
import com.hzya.frame.seeyon.ydc.service.IFormmain0225Service;
|
||||
import com.hzya.frame.web.entity.BaseResult;
|
||||
import com.hzya.frame.web.entity.JsonResultEntity;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -105,6 +106,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
|||
**/
|
||||
@Override
|
||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||
logger.info("开始执行OA供应商同步U8定时任务");
|
||||
//1、查询OA审批完成且为推送U8的供应商申请
|
||||
Formmain0225Entity formmain0225Entity = new Formmain0225Entity();
|
||||
formmain0225Entity.setFinishedflag("1");
|
||||
|
@ -121,8 +123,9 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
|||
param.put("formMainIds", Convert.toStrArray(f.getId()));
|
||||
param.put("dataSourceCode", "ydc_oa_sqlserver");
|
||||
param.put("eventType", "onProcessFinished");
|
||||
System.out.println(JSONObject.toJSONString(param));
|
||||
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(param);
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("jsonStr",param.toString());
|
||||
seeYonInterFace.thirdInterfaceSeeYonDefinitionRePush(json);
|
||||
} catch (Exception e) {
|
||||
logger.error("OA供应商档案同步U8出错:{}", e);
|
||||
} finally {
|
||||
|
@ -132,6 +135,6 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
|||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
return BaseResult.getSuccessMessageEntity("成功");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue