待阅相关代码修改
This commit is contained in:
parent
23c442187d
commit
8a6a99432b
@ -217,12 +217,12 @@ public class CreateDataKnow implements IJob {
|
||||
if (StringUtils.isNotEmpty(cardId)){
|
||||
String sql_ext4 = "select * from APP_ACT_COE_PAL_REPOSITORY where EXT4 = '"+cardId+"'";
|
||||
RowMap map = DBSql.getMap(sql_ext4);
|
||||
BO bos = SDK.getBOAPI().query("BO_ACT_COE_PUBLISH_N",true).addQuery("PUBLISHFILEID = ",map.getString("ID")).detail();
|
||||
if (bos!=null){
|
||||
RowMap rowMap = DBSql.getMap("select * from (select * from BO_ACT_COE_PUBLISH_N where PUBLISHFILEID = '"+map.getString("ID")+"' order by CREATEDATE desc) where rownum = 1");
|
||||
if (rowMap!=null){
|
||||
|
||||
if (StringUtils.isNotEmpty(bos.getString("TASKID"))) {
|
||||
if (StringUtils.isNotEmpty(rowMap.getString("TASKID"))) {
|
||||
|
||||
OutputTaskModel model = new OutputTask().getTaskReportById(bos.getString("TASKID"));
|
||||
OutputTaskModel model = new OutputTask().getTaskReportById(rowMap.getString("TASKID"));
|
||||
if (model != null) {
|
||||
System.out.println(",pdel============" + model);
|
||||
System.out.println("123313123123123==========" + model.getProfileId());
|
||||
@ -234,7 +234,7 @@ public class CreateDataKnow implements IJob {
|
||||
DCPluginProfile dcProfile = SDK.getDCAPI().getDCProfile(appProfile.getAppContext().getId(), OutputConst.EXT_APP_DC_OUTPUT);
|
||||
if (dcProfile == null)
|
||||
throw new AWSException("Not Find DCProfile! repositoryName=" + OutputConst.EXT_APP_DC_OUTPUT);
|
||||
String sql_lever = "SELECT PLVER FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID = '" + bos.getString("PUBLISHFILEID") + "'";
|
||||
String sql_lever = "SELECT PLVER FROM APP_ACT_COE_PAL_REPOSITORY WHERE ID = '" + rowMap.getString("PUBLISHFILEID") + "'";
|
||||
String lever = DBSql.getString( sql_lever);
|
||||
//lever = lever.substring(0,3);
|
||||
if(lever.length()==5&&lever.substring(4).equals("0")){
|
||||
@ -242,7 +242,7 @@ public class CreateDataKnow implements IJob {
|
||||
}else if (lever.length()==1){
|
||||
lever=lever+".0";
|
||||
}
|
||||
DCContext dcContext = new DCContext(userContext, dcProfile, appProfile.getAppContext().getId(), model.getWsId(), bos.getString("TASKID"), bos.getString("PUBLISHFILENAME") + "_" + lever + ".doc");
|
||||
DCContext dcContext = new DCContext(userContext, dcProfile, appProfile.getAppContext().getId(), model.getWsId(), rowMap.getString("TASKID"), rowMap.getString("PUBLISHFILENAME") + "_" + lever + ".doc");
|
||||
//UtilFile file = new UtilFile(dcContext.getPath());
|
||||
|
||||
|
||||
|
||||
@ -98,10 +98,11 @@ public class ProcessEndAfterEvent extends ExecuteListener {
|
||||
jsonObject.put("action","read");
|
||||
jsonObject.put("title"," " +
|
||||
"["+boActCoePublish.getString("PROCESS_TITLE")+"]需要处理");
|
||||
jsonObject.put("dept",SDK.getORGAPI().getDepartmentByUser(processExecutionContext.getProcessInstance().getCreateUser()).getNo());//SDK.getORGAPI().getDepartmentByUser(processExecutionContext.getProcessInstance().getCreateUser()).getNo()
|
||||
String target = "";
|
||||
if (processExecutionContext.getProcessInstance().getCreateUser().length()==8&&"00".equals(processExecutionContext.getProcessInstance().getCreateUser().substring(0,2))){
|
||||
target = processExecutionContext.getProcessInstance().getCreateUser().substring(2);
|
||||
System.out.println("部门庄户》》》》》》》"+SDK.getORGAPI().getDepartmentByUser(processExecutionContext.getTaskInstance().getTarget()).getNo());
|
||||
jsonObject.put("dept",SDK.getORGAPI().getDepartmentByUser(processExecutionContext.getTaskInstance().getTarget()).getNo());//SDK.getORGAPI().getDepartmentByUser(processExecutionContext.getProcessInstance().getCreateUser()).getNo()
|
||||
String target = processExecutionContext.getTaskInstance().getTarget();
|
||||
if (processExecutionContext.getTaskInstance().getTarget().length()==8&&"00".equals(processExecutionContext.getTaskInstance().getTarget().substring(0,2))){
|
||||
target = processExecutionContext.getTaskInstance().getTarget().substring(2);
|
||||
}
|
||||
System.out.println("当前账户======》》》》"+target);
|
||||
BO bo_eu_oa_reson = SDK.getBOAPI().query("BO_EU_OA_RESON", true).addQuery("WORKCODE=" , target).detail();
|
||||
@ -132,7 +133,12 @@ public class ProcessEndAfterEvent extends ExecuteListener {
|
||||
}
|
||||
} else {
|
||||
List posts_list = new ArrayList();
|
||||
String strs[] = bo_act_coe_publish1.getString("SEND_SCOPE_ORG").split(",");
|
||||
List<String> org_list = new ArrayList();
|
||||
if (StringUtils.isNotEmpty(bo_act_coe_publish1.getString("SEND_SCOPE_ORG"))){
|
||||
String strs[] = bo_act_coe_publish1.getString("SEND_SCOPE_ORG").split(",");
|
||||
org_list= Arrays.asList(strs);
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(bo_act_coe_publish1.getString("SEND_SCOPE_POST"))) {
|
||||
String posts[] = bo_act_coe_publish1.getString("SEND_SCOPE_POST").split(",");
|
||||
posts_list = Arrays.asList(posts);
|
||||
@ -143,260 +149,322 @@ public class ProcessEndAfterEvent extends ExecuteListener {
|
||||
ranks_list = Arrays.asList(ranks);
|
||||
}
|
||||
|
||||
for (String depaartid : strs
|
||||
) {
|
||||
DepartmentModel departmentModel = SDK.getORGAPI().getDepartmentById(depaartid);
|
||||
boolean existSubModelOfCache = departmentModel.isExistSubModelOfCache();
|
||||
//判断选中的是否有下级部门
|
||||
if (existSubModelOfCache) {
|
||||
List<RowMap> maps = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + depaartid + "'");
|
||||
for (RowMap row : maps
|
||||
) {
|
||||
String id = row.getString("ID");
|
||||
DepartmentModel model = SDK.getORGAPI().getDepartmentById(id);
|
||||
System.out.println("部门id》》》》》》》》》》》》》"+org_list );
|
||||
System.out.println("posts_list》》》》》》》》》》》》》"+posts_list);
|
||||
System.out.println("ranks_list》》》》》》》》》》》》》"+ranks_list);
|
||||
if (org_list.size()!=0 && org_list!=null) {
|
||||
for (String depaartid : org_list
|
||||
) {
|
||||
System.out.println("departid>>>>>>>>>>>>>" + depaartid);
|
||||
DepartmentModel departmentModel = SDK.getORGAPI().getDepartmentById(depaartid);
|
||||
boolean existSubModelOfCache = departmentModel.isExistSubModelOfCache();
|
||||
System.out.println("是否含有下级?????????????" + existSubModelOfCache);
|
||||
//判断选中的是否有下级部门
|
||||
if (existSubModelOfCache) {
|
||||
List<RowMap> maps = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + depaartid + "'");
|
||||
for (RowMap row : maps
|
||||
) {
|
||||
String id = row.getString("ID");
|
||||
DepartmentModel model = SDK.getORGAPI().getDepartmentById(id);
|
||||
|
||||
if (model.isExistSubModelOfCache()) {
|
||||
//有下级部门的选中有下级部门
|
||||
List<RowMap> rowMapList = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + id + "'");
|
||||
for (RowMap wo :
|
||||
rowMapList) {
|
||||
String ids = wo.getString("ID");
|
||||
DepartmentModel model1 = SDK.getORGAPI().getDepartmentById(ids);
|
||||
if (model1.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMapLists = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + ids + "'");
|
||||
for (RowMap wsa :
|
||||
rowMapLists) {
|
||||
String wsaString = wsa.getString("ID");
|
||||
DepartmentModel model2 = SDK.getORGAPI().getDepartmentById(wsaString);
|
||||
if (model2.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMapList1 = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + wsaString + "'");
|
||||
for (RowMap rows :
|
||||
rowMapList1) {
|
||||
String rowsString = rows.getString("ID");
|
||||
DepartmentModel model3 = SDK.getORGAPI().getDepartmentById(rowsString);
|
||||
if (model3.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMapList2 = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + rowsString + "'");
|
||||
for (RowMap ormap :
|
||||
rowMapList2) {
|
||||
String rowsString1 = ormap.getString("ID");
|
||||
DepartmentModel model4 = SDK.getORGAPI().getDepartmentById(rowsString1);
|
||||
if (model4.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMaps = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + rowsString1 + "'");
|
||||
for (RowMap owmapr :
|
||||
rowMaps) {
|
||||
String row_id = owmapr.getString("ID");
|
||||
DepartmentModel model5 = SDK.getORGAPI().getDepartmentById(row_id);
|
||||
if (model5.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMapList3 = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + row_id + "'");
|
||||
for (RowMap owzmap :
|
||||
rowMapList3) {
|
||||
String idsa = owzmap.getString("ID");
|
||||
DepartmentModel model6 = SDK.getORGAPI().getDepartmentById(idsa);
|
||||
if (model6.isExistSubModelOfCache()) {
|
||||
if (model.isExistSubModelOfCache()) {
|
||||
//有下级部门的选中有下级部门
|
||||
List<RowMap> rowMapList = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + id + "'");
|
||||
for (RowMap wo :
|
||||
rowMapList) {
|
||||
String ids = wo.getString("ID");
|
||||
DepartmentModel model1 = SDK.getORGAPI().getDepartmentById(ids);
|
||||
if (model1.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMapLists = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + ids + "'");
|
||||
for (RowMap wsa :
|
||||
rowMapLists) {
|
||||
String wsaString = wsa.getString("ID");
|
||||
DepartmentModel model2 = SDK.getORGAPI().getDepartmentById(wsaString);
|
||||
if (model2.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMapList1 = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + wsaString + "'");
|
||||
for (RowMap rows :
|
||||
rowMapList1) {
|
||||
String rowsString = rows.getString("ID");
|
||||
DepartmentModel model3 = SDK.getORGAPI().getDepartmentById(rowsString);
|
||||
if (model3.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMapList2 = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + rowsString + "'");
|
||||
for (RowMap ormap :
|
||||
rowMapList2) {
|
||||
String rowsString1 = ormap.getString("ID");
|
||||
DepartmentModel model4 = SDK.getORGAPI().getDepartmentById(rowsString1);
|
||||
if (model4.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMaps = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + rowsString1 + "'");
|
||||
for (RowMap owmapr :
|
||||
rowMaps) {
|
||||
String row_id = owmapr.getString("ID");
|
||||
DepartmentModel model5 = SDK.getORGAPI().getDepartmentById(row_id);
|
||||
if (model5.isExistSubModelOfCache()) {
|
||||
List<RowMap> rowMapList3 = DBSql.getMaps("SELECT * FROM ORGDEPARTMENT WHERE PARENTDEPARTMENTID = '" + row_id + "'");
|
||||
for (RowMap owzmap :
|
||||
rowMapList3) {
|
||||
String idsa = owzmap.getString("ID");
|
||||
DepartmentModel model6 = SDK.getORGAPI().getDepartmentById(idsa);
|
||||
if (model6.isExistSubModelOfCache()) {
|
||||
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(idsa);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list != null && ranks_list != null) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(idsa);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list.size() != 0 && ranks_list.size() != 0) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() != 0 && ranks_list.size() == 0) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() == 0 && ranks_list.size() != 0) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list != null && ranks_list == null) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list == null && ranks_list != null) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(row_id);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list != null && ranks_list != null) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(row_id);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list.size() != 0 && ranks_list.size() != 0) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() != 0 && ranks_list.size() == 0) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() == 0 && ranks_list.size() != 0) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list != null && ranks_list == null) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list == null && ranks_list != null) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(rowsString1);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list != null && ranks_list != null) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(rowsString1);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list.size() != 0 && ranks_list.size() != 0) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() != 0 && ranks_list.size() == 0) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() == 0 && ranks_list.size() != 0) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list != null && ranks_list == null) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list == null && ranks_list != null) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(rowsString);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list != null && ranks_list != null) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(rowsString);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list.size() != 0 && ranks_list.size() != 0) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() != 0 && ranks_list.size() == 0) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() == 0 && ranks_list.size() != 0) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list != null && ranks_list == null) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list == null && ranks_list != null) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(wsaString);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list != null && ranks_list != null) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(wsaString);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list.size() != 0 && ranks_list.size() != 0) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() != 0 && ranks_list.size() == 0) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() == 0 && ranks_list.size() != 0) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list != null && ranks_list == null) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list == null && ranks_list != null) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(ids);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list != null && ranks_list != null) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(ids);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list.size() != 0 && ranks_list.size() != 0) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() != 0 && ranks_list.size() == 0) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() == 0 && ranks_list.size() != 0) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list != null && ranks_list == null) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list == null && ranks_list != null) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(id);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list != null && ranks_list != null) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
} else {
|
||||
List<UserModel> allUsersByDepartments = SDK.getORGAPI().getAllUsersByDepartment(id);
|
||||
for (UserModel user : allUsersByDepartments
|
||||
) {
|
||||
if (posts_list.size() != 0 && ranks_list.size() != 0) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() != 0 && ranks_list.size() == 0) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() == 0 && ranks_list.size() != 0) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list != null && ranks_list == null) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list == null && ranks_list != null) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//选中的没有下级部门
|
||||
List<UserModel> allUsersByDepartment = SDK.getORGAPI().getAllUsersByDepartment(depaartid);
|
||||
for (UserModel user : allUsersByDepartment
|
||||
) {
|
||||
if (posts_list != null && ranks_list != null) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
} else {
|
||||
//选中的没有下级部门
|
||||
List<UserModel> allUsersByDepartment = SDK.getORGAPI().getAllUsersByDepartment(depaartid);
|
||||
for (UserModel user : allUsersByDepartment
|
||||
) {
|
||||
System.out.println("user.getExt2())???????????" + user.getExt2());
|
||||
System.out.println("posts_list》》》》》》》》》das" + (posts_list.size() != 0));
|
||||
System.out.println("123123》》》》》》》》》》" + (ranks_list.size() != 0));
|
||||
if (posts_list.size() != 0 && ranks_list.size() != 0) {
|
||||
if (posts_list.contains(user.getPositionNo()) && ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() != 0 && ranks_list.size() == 0) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list.size() == 0 && ranks_list.size() != 0) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list != null && ranks_list == null) {
|
||||
if (posts_list.contains(user.getPositionNo())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else if (posts_list == null && ranks_list != null) {
|
||||
if (ranks_list.contains(user.getExt2())) {
|
||||
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
} else {
|
||||
uid += user.getUID() + ",";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (org_list.size()==0||org_list==null){
|
||||
String posts="";
|
||||
String levels = "";
|
||||
if (posts_list.size() !=0 &&ranks_list.size()!=0){
|
||||
String[] post = bo_act_coe_publish1.getString("SEND_SCOPE_POST").split(",");
|
||||
String[] level = bo_act_coe_publish1.getString("SEND_SCOPE_LEVEL").split(",");
|
||||
if (post.length==1){
|
||||
// DBSql.getMap("select USERID from ORGUSER WHERE POSITION_NO IN ");
|
||||
posts = "'"+post[0]+"'";
|
||||
}else {
|
||||
posts = "'"+ StringUtils.join(post, "','")+"'";
|
||||
}
|
||||
if (level.length==1){
|
||||
levels = "'"+level[0]+"'";
|
||||
}else {
|
||||
levels = "'"+ StringUtils.join(level, "','")+"'";
|
||||
}
|
||||
List<RowMap> maps = DBSql.getMaps("select USERID from ORGUSER where POSITION_NO in(" + posts + ") and EXT2 in (" + levels + ")");
|
||||
for (RowMap map:maps
|
||||
) {
|
||||
uid+=map.getString("USERID")+",";
|
||||
}
|
||||
} else if (posts_list.size() !=0 &&ranks_list.size()==0) {
|
||||
String[] post = bo_act_coe_publish1.getString("SEND_SCOPE_POST").split(",");
|
||||
if (post.length==1){
|
||||
// DBSql.getMap("select USERID from ORGUSER WHERE POSITION_NO IN ");
|
||||
posts = "'"+post[0]+"'";
|
||||
}else {
|
||||
posts = "'"+ StringUtils.join(post, "','")+"'";
|
||||
}
|
||||
List<RowMap> maps = DBSql.getMaps("select USERID from ORGUSER where POSITION_NO in(" + posts + ")");
|
||||
for (RowMap map:maps
|
||||
) {
|
||||
uid+=map.getString("USERID")+",";
|
||||
}
|
||||
}else if (posts_list.size() ==0 &&ranks_list.size()!=0){
|
||||
String[] level = bo_act_coe_publish1.getString("SEND_SCOPE_LEVEL").split(",");
|
||||
|
||||
if (level.length==1){
|
||||
levels = "'"+level[0]+"'";
|
||||
}else {
|
||||
levels = "'"+ StringUtils.join(level, "','")+"'";
|
||||
}
|
||||
List<RowMap> maps = DBSql.getMaps("select USERID from ORGUSER where EXT2 in (" + levels + ")");
|
||||
for (RowMap map:maps
|
||||
) {
|
||||
uid+=map.getString("USERID")+",";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
System.out.println("userid》》》》》》》》》》》》》》》》》》》"+uid);
|
||||
if (StringUtils.isNotEmpty(uid
|
||||
)) {
|
||||
uid = uid.substring(0, uid.length() - 1);
|
||||
@ -409,14 +477,12 @@ public class ProcessEndAfterEvent extends ExecuteListener {
|
||||
list.addAll(h);
|
||||
for (String userid:list
|
||||
) {
|
||||
if (userid.length()==8&&"00".equals(userid.substring(0,2))){
|
||||
userid = userid.substring(2);
|
||||
}
|
||||
|
||||
System.out.println("当前账户======》》》》"+userid);
|
||||
System.out.println("bo>>>>>>>>>>>>>>"+bo_eu_oa_reson);
|
||||
if (bo_eu_oa_reson!=null){
|
||||
new_uid+=bo_eu_oa_reson.getString("LOGINID")+",";
|
||||
}
|
||||
// BO boEuOaReson = SDK.getBOAPI().query("BO_EU_OA_RESON", true).addQuery("WORKCODE=", userid).detail();
|
||||
// if (boEuOaReson!=null){
|
||||
new_uid+=userid+",";
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
@ -427,7 +493,7 @@ public class ProcessEndAfterEvent extends ExecuteListener {
|
||||
new_uid = new_uid.substring(0, new_uid.length() - 1);
|
||||
}
|
||||
System.out.println("new_userid ==========>>>>>>>>>"+new_uid);
|
||||
jsonObject.put("userList",new_uid);
|
||||
jsonObject.put("userList",new_uid);
|
||||
|
||||
|
||||
String xmlStr = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"webservices.yili.weaver.com.cn\">\n" +
|
||||
@ -440,7 +506,7 @@ public class ProcessEndAfterEvent extends ExecuteListener {
|
||||
" </web:service>" +
|
||||
" </soapenv:Body>" +
|
||||
"</soapenv:Envelope>";
|
||||
|
||||
System.out.println("xmlStr>>>>>>>>"+xmlStr);
|
||||
String postSoap = UtilUrl.doPostSoap("http://10.105.1.59:80/services/service_lcglpt", xmlStr, "");
|
||||
Document document = DocumentHelper.parseText(postSoap);
|
||||
Element rootElement = document.getRootElement();
|
||||
@ -449,6 +515,8 @@ public class ProcessEndAfterEvent extends ExecuteListener {
|
||||
String resultString = result.getData().toString();
|
||||
JSONObject jsonObject1 = JSON.parseObject(resultString);
|
||||
String datas = jsonObject1.getString("data");
|
||||
String status = jsonObject1.getString("status");
|
||||
System.out.println("状态是什么》》》》》》》》》》》"+status);
|
||||
JSONArray resultArray = JSONObject.parseArray(datas);
|
||||
for (int i=0;i<resultArray.size();i++) {
|
||||
JSONObject jsonObject2 = resultArray.getJSONObject(i);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user