|
@@ -44,7 +44,7 @@ public class synchronousOrgControllerBean extends AbstractsynchronousOrgControll
|
|
|
* @throws BOSException 执行过程中发生业务异常时抛出
|
|
* @throws BOSException 执行过程中发生业务异常时抛出
|
|
|
*/
|
|
*/
|
|
|
@Override
|
|
@Override
|
|
|
- protected void _createOrUpdateOrg(Context ctx, int day, String orgId, boolean isDelete) throws BOSException {
|
|
|
|
|
|
|
+ protected String _createOrUpdateOrg(Context ctx, int day, String orgId, boolean isDelete) throws BOSException {
|
|
|
// 创建 BeiSenUtils 实例,用于与外部系统进行交互
|
|
// 创建 BeiSenUtils 实例,用于与外部系统进行交互
|
|
|
BeiSenUtils beiSenUtils = new BeiSenUtils(ctx);
|
|
BeiSenUtils beiSenUtils = new BeiSenUtils(ctx);
|
|
|
// 获取当前日期
|
|
// 获取当前日期
|
|
@@ -53,12 +53,12 @@ public class synchronousOrgControllerBean extends AbstractsynchronousOrgControll
|
|
|
Date dayBefore = getDayBefore(now, day);
|
|
Date dayBefore = getDayBefore(now, day);
|
|
|
// 创建查询视图信息,用于筛选组织信息
|
|
// 创建查询视图信息,用于筛选组织信息
|
|
|
EntityViewInfo entityViewInfo = createEntityViewInfo(orgId, dayBefore, now);
|
|
EntityViewInfo entityViewInfo = createEntityViewInfo(orgId, dayBefore, now);
|
|
|
|
|
+ String ids = "";
|
|
|
try {
|
|
try {
|
|
|
// 获取组织信息本地实例
|
|
// 获取组织信息本地实例
|
|
|
IAdminOrgUnit localInstance = AdminOrgUnitFactory.getLocalInstance(ctx);
|
|
IAdminOrgUnit localInstance = AdminOrgUnitFactory.getLocalInstance(ctx);
|
|
|
// 根据查询条件获取组织信息集合
|
|
// 根据查询条件获取组织信息集合
|
|
|
AdminOrgUnitCollection adminOrgUnitCollection = localInstance.getAdminOrgUnitCollection(entityViewInfo);
|
|
AdminOrgUnitCollection adminOrgUnitCollection = localInstance.getAdminOrgUnitCollection(entityViewInfo);
|
|
|
-
|
|
|
|
|
// 遍历组织信息集合
|
|
// 遍历组织信息集合
|
|
|
for (int i = 0; i < adminOrgUnitCollection.size(); i++) {
|
|
for (int i = 0; i < adminOrgUnitCollection.size(); i++) {
|
|
|
// 获取当前组织信息
|
|
// 获取当前组织信息
|
|
@@ -82,6 +82,7 @@ public class synchronousOrgControllerBean extends AbstractsynchronousOrgControll
|
|
|
String sql = "update T_ORG_Admin set cforiginalId = '"+data+"' where FID = '"+id+"'";
|
|
String sql = "update T_ORG_Admin set cforiginalId = '"+data+"' where FID = '"+id+"'";
|
|
|
DBUtil.execute(ctx,sql);
|
|
DBUtil.execute(ctx,sql);
|
|
|
}
|
|
}
|
|
|
|
|
+ ids+=adminOrgUnitInfo.getId().toString();
|
|
|
} else {
|
|
} else {
|
|
|
// 响应状态码不为 200 时,记录错误信息
|
|
// 响应状态码不为 200 时,记录错误信息
|
|
|
logError(adminOrgUnitInfo.getName(), orUpdateByOrg.getString("message"));
|
|
logError(adminOrgUnitInfo.getName(), orUpdateByOrg.getString("message"));
|
|
@@ -101,9 +102,9 @@ public class synchronousOrgControllerBean extends AbstractsynchronousOrgControll
|
|
|
logger.error("获取组织信息集合时发生异常", e);
|
|
logger.error("获取组织信息集合时发生异常", e);
|
|
|
throw e;
|
|
throw e;
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ return ids;
|
|
|
// 调用父类的 _createOrUpdateOrg 方法
|
|
// 调用父类的 _createOrUpdateOrg 方法
|
|
|
- super._createOrUpdateOrg(ctx, day, orgId, isDelete);
|
|
|
|
|
|
|
+// super._createOrUpdateOrg(ctx, day, orgId, isDelete);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|