数据源修改
This commit is contained in:
parent
ef8f21e525
commit
15c8dcc302
|
@ -107,6 +107,7 @@ public class SeeyonExtPluginInitializer extends PluginBaseEntity {
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
try {
|
try {
|
||||||
|
logger.info("重试插件:{}",JSONObject.toJSON(requestJson));
|
||||||
//重试方法
|
//重试方法
|
||||||
if (null != requestJson){
|
if (null != requestJson){
|
||||||
//JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
//JSONObject jsonStr = requestJson.getJSONObject("jsonStr");
|
||||||
|
|
|
@ -12,6 +12,7 @@ import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -23,6 +24,8 @@ import java.util.List;
|
||||||
public class CustomerPluginInitializer extends PluginBaseEntity {
|
public class CustomerPluginInitializer extends PluginBaseEntity {
|
||||||
Logger logger = LoggerFactory.getLogger(getClass());
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
@Value("${oa.datasource_code}")
|
||||||
|
public String dataSourceCode;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IFormmain0226Service formmain0226Service;
|
private IFormmain0226Service formmain0226Service;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -105,12 +108,12 @@ public class CustomerPluginInitializer extends PluginBaseEntity {
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
logger.info("开始执行OA客户同步U8定时任务");
|
logger.info("开始执行OA客户同步U8定时任务:{}",JSONObject.toJSONString(requestJson));
|
||||||
//1、查询OA审批完成且未推送U8的客户申请
|
//1、查询OA审批完成且未推送U8的客户申请
|
||||||
Formmain0226Entity formmain0226Entity = new Formmain0226Entity();
|
Formmain0226Entity formmain0226Entity = new Formmain0226Entity();
|
||||||
formmain0226Entity.setFinishedflag("1");
|
formmain0226Entity.setFinishedflag("1");
|
||||||
formmain0226Entity.setField0028Flag("1");
|
formmain0226Entity.setField0028Flag("1");
|
||||||
formmain0226Entity.setDataSourceCode(YdcConstant.dataSourceCode);
|
formmain0226Entity.setDataSourceCode(dataSourceCode);
|
||||||
List<Formmain0226Entity> list = formmain0226Service.query(formmain0226Entity);
|
List<Formmain0226Entity> list = formmain0226Service.query(formmain0226Entity);
|
||||||
if (CollectionUtils.isNotEmpty(list)){
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
for (Formmain0226Entity f : list) {
|
for (Formmain0226Entity f : list) {
|
||||||
|
@ -128,7 +131,7 @@ public class CustomerPluginInitializer extends PluginBaseEntity {
|
||||||
logger.error("OA客户档案同步U8出错:{}", e);
|
logger.error("OA客户档案同步U8出错:{}", e);
|
||||||
} finally {
|
} finally {
|
||||||
f.setField0028("1");
|
f.setField0028("1");
|
||||||
f.setDataSourceCode(YdcConstant.dataSourceCode);
|
f.setDataSourceCode(dataSourceCode);
|
||||||
formmain0226Service.updateFlag(f);
|
formmain0226Service.updateFlag(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -23,12 +24,13 @@ import java.util.List;
|
||||||
public class InventoryPluginInitializer extends PluginBaseEntity {
|
public class InventoryPluginInitializer extends PluginBaseEntity {
|
||||||
Logger logger = LoggerFactory.getLogger(getClass());
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
static String dataSourceCode = "ydc_oa_sqlserver_test";
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISeeYonInterFace seeYonInterFace;
|
private ISeeYonInterFace seeYonInterFace;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IFormmain0227Service formmain0227Service;
|
private IFormmain0227Service formmain0227Service;
|
||||||
|
|
||||||
|
@Value("${oa.datasource_code}")
|
||||||
|
public String dataSourceCode;
|
||||||
/***
|
/***
|
||||||
* 插件初始化方法
|
* 插件初始化方法
|
||||||
* @Author 👻👻👻👻👻👻👻👻 gjh
|
* @Author 👻👻👻👻👻👻👻👻 gjh
|
||||||
|
@ -106,13 +108,13 @@ public class InventoryPluginInitializer extends PluginBaseEntity {
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
logger.info("开始执行OA存货同步U8定时任务");
|
logger.info("开始执行OA存货同步U8定时任务{}",JSONObject.toJSONString(requestJson));
|
||||||
//1、查询OA审批完成且未推送U8的存货申请
|
//1、查询OA审批完成且未推送U8的存货申请
|
||||||
Formmain0227Entity formmain0227 = new Formmain0227Entity();
|
Formmain0227Entity formmain0227 = new Formmain0227Entity();
|
||||||
formmain0227.setFinishedflag("1");
|
formmain0227.setFinishedflag("1");
|
||||||
formmain0227.setField0022Flag("1");
|
formmain0227.setField0022Flag("1");
|
||||||
//formmain0227.setId("-8891720615522383237");
|
//formmain0227.setId("-8891720615522383237");
|
||||||
formmain0227.setDataSourceCode(YdcConstant.dataSourceCode);
|
formmain0227.setDataSourceCode(dataSourceCode);
|
||||||
List<Formmain0227Entity> list = formmain0227Service.query(formmain0227);
|
List<Formmain0227Entity> list = formmain0227Service.query(formmain0227);
|
||||||
if (CollectionUtils.isNotEmpty(list)){
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
for (Formmain0227Entity f : list) {
|
for (Formmain0227Entity f : list) {
|
||||||
|
@ -130,7 +132,7 @@ public class InventoryPluginInitializer extends PluginBaseEntity {
|
||||||
logger.error("OA存货档案同步U8出错:{}",e);
|
logger.error("OA存货档案同步U8出错:{}",e);
|
||||||
}finally {
|
}finally {
|
||||||
f.setField0022("1");
|
f.setField0022("1");
|
||||||
f.setDataSourceCode(YdcConstant.dataSourceCode);
|
f.setDataSourceCode(dataSourceCode);
|
||||||
formmain0227Service.updateFlag(f);
|
formmain0227Service.updateFlag(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -23,6 +24,8 @@ import java.util.List;
|
||||||
public class SupplierPluginInitializer extends PluginBaseEntity {
|
public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
|
|
||||||
Logger logger = LoggerFactory.getLogger(getClass());
|
Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
@Value("${oa.datasource_code}")
|
||||||
|
public String dataSourceCode;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IFormmain0225Service formmain0225Service;
|
private IFormmain0225Service formmain0225Service;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -106,12 +109,12 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
**/
|
**/
|
||||||
@Override
|
@Override
|
||||||
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
public JsonResultEntity executeBusiness(JSONObject requestJson) throws Exception {
|
||||||
logger.info("开始执行OA供应商同步U8定时任务");
|
logger.info("开始执行OA供应商同步U8定时任务:{}",JSONObject.toJSONString(requestJson));
|
||||||
//1、查询OA审批完成且为推送U8的供应商申请
|
//1、查询OA审批完成且为推送U8的供应商申请
|
||||||
Formmain0225Entity formmain0225Entity = new Formmain0225Entity();
|
Formmain0225Entity formmain0225Entity = new Formmain0225Entity();
|
||||||
formmain0225Entity.setFinishedflag("1");
|
formmain0225Entity.setFinishedflag("1");
|
||||||
formmain0225Entity.setField0025Flag("1");
|
formmain0225Entity.setField0025Flag("1");
|
||||||
formmain0225Entity.setDataSourceCode(YdcConstant.dataSourceCode);
|
formmain0225Entity.setDataSourceCode(dataSourceCode);
|
||||||
List<Formmain0225Entity> list = formmain0225Service.query(formmain0225Entity);
|
List<Formmain0225Entity> list = formmain0225Service.query(formmain0225Entity);
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
for (Formmain0225Entity f : list) {
|
for (Formmain0225Entity f : list) {
|
||||||
|
@ -130,7 +133,7 @@ public class SupplierPluginInitializer extends PluginBaseEntity {
|
||||||
logger.error("OA供应商档案同步U8出错:{}", e);
|
logger.error("OA供应商档案同步U8出错:{}", e);
|
||||||
} finally {
|
} finally {
|
||||||
f.setField0025("1");
|
f.setField0025("1");
|
||||||
f.setDataSourceCode(YdcConstant.dataSourceCode);
|
f.setDataSourceCode(dataSourceCode);
|
||||||
formmain0225Service.updateFlag(f);
|
formmain0225Service.updateFlag(f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,5 +7,5 @@ package com.hzya.frame.plugin.ydc.plugin;
|
||||||
**/
|
**/
|
||||||
public class YdcConstant {
|
public class YdcConstant {
|
||||||
|
|
||||||
public static String dataSourceCode = "ydc_oa_sqlserver";
|
//public static String dataSourceCode = "ydc_oa_sqlserver";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue