横表已发布的状态修改
This commit is contained in:
parent
e42c9970c4
commit
ebf4a754de
@ -253,83 +253,22 @@ public class Report1Gener {
|
||||
|
||||
for (RowMap rowMap:
|
||||
nodeRowMaps) {
|
||||
JSONObject _tr = new JSONObject();
|
||||
_tr.put(OutputWordUtil.SERIAL_NUMBER, index); // 序号
|
||||
_tr.put(OutputWordUtil.REPOSITORY_NAME,rowMap.getString("PLNAME")); // 流程名称
|
||||
_tr.put(OutputWordUtil.SHAPE_NAME, rowMap.getString("NODENAME")); // 活动名称
|
||||
_tr.put(OutputWordUtil.SHAPE_DESC, rowMap.getString("ACTIVITYDESC")); // 活动描述
|
||||
_tr.put(OutputWordUtil.SHAPE_ITSYSTEM, rowMap.getString("ITSYSVAL")); // 系统名称
|
||||
if (UtilString.isNotEmpty(rowMap.getString("ROLENAME"))){
|
||||
|
||||
_tr.put("shape_role", rowMap.getString("ROLENAME")); // 角色名称
|
||||
}else {
|
||||
_tr.put("shape_role", ""); // 角色名称
|
||||
}
|
||||
|
||||
Map<String, JSONObject> queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(rowMap.getString("PLID"));
|
||||
String kpi = "";
|
||||
String institution = "";
|
||||
if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) {
|
||||
// 获取流程绩效
|
||||
JSONObject Issuing_department = queryRepositoryAttributeById.get("Process_performance_metrics");
|
||||
if (null != Issuing_department && !Issuing_department.equals("")) {
|
||||
JSONArray PUBDEPTJA = Issuing_department.getJSONArray("value");
|
||||
if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) {
|
||||
for (Object PUBDEPTO : PUBDEPTJA) {
|
||||
JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO));
|
||||
System.out.println("在这个是什么呢>>>>>>>"+PUBDEPTJO);
|
||||
String dempId = PUBDEPTJO.getString("name");
|
||||
System.out.println("第一这个是什么呢>>>>>"+dempId);
|
||||
if(UtilString.isNotEmpty(dempId)){
|
||||
kpi+=dempId+",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取相关文件
|
||||
JSONObject relevant_flies = queryRepositoryAttributeById.get("R_relevant_flies");
|
||||
if (null != relevant_flies && !relevant_flies.equals("")) {
|
||||
JSONArray PUBDEPTJA = relevant_flies.getJSONArray("value");
|
||||
if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) {
|
||||
for (Object PUBDEPTO : PUBDEPTJA) {
|
||||
JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO));
|
||||
String dempId = PUBDEPTJO.getString("name");
|
||||
if (StringUtils.isEmpty(dempId)){
|
||||
|
||||
}else {
|
||||
institution+=dempId+",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_tr.put(OutputWordUtil.SHAPE_KPI,kpi);
|
||||
_tr.put(OutputWordUtil.SHAPE_INSTITUTION,institution);
|
||||
//获取相关知识
|
||||
_table.add(_tr);
|
||||
index++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*JSONObject jsonObject = personalView_right(UserContext.fromUID(userId));
|
||||
JSONArray typeB = jsonObject.getJSONArray("typeB");
|
||||
if (typeB.size()>0){
|
||||
for (int i=0;i<typeB.size();i++){
|
||||
JSONObject jsonObject1 = typeB.getJSONObject(i);
|
||||
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(rowMap.getString("PLID"));
|
||||
if (palRepositoryModel.isPublish()) {
|
||||
JSONObject _tr = new JSONObject();
|
||||
_tr.put(OutputWordUtil.SERIAL_NUMBER, index); // 序号
|
||||
_tr.put(OutputWordUtil.REPOSITORY_NAME,jsonObject1.getString("PLNAME")); // 流程名称
|
||||
_tr.put(OutputWordUtil.SHAPE_NAME, jsonObject1.getString("NODENAME")); // 活动名称
|
||||
_tr.put(OutputWordUtil.SHAPE_DESC, jsonObject1.getString("ACTIVITYDESC")); // 活动描述
|
||||
_tr.put(OutputWordUtil.SHAPE_ITSYSTEM, jsonObject1.getString("ITSYSVAL")); // 系统名称
|
||||
System.out.println("角色名称>>>>>>>>>>"+jsonObject1.getString("ROLENAME"));
|
||||
_tr.put("shape_role", jsonObject1.getString("ROLENAME")); // 角色名称
|
||||
_tr.put(OutputWordUtil.REPOSITORY_NAME, rowMap.getString("PLNAME")); // 流程名称
|
||||
_tr.put(OutputWordUtil.SHAPE_NAME, rowMap.getString("NODENAME")); // 活动名称
|
||||
_tr.put(OutputWordUtil.SHAPE_DESC, rowMap.getString("ACTIVITYDESC")); // 活动描述
|
||||
_tr.put(OutputWordUtil.SHAPE_ITSYSTEM, rowMap.getString("ITSYSVAL")); // 系统名称
|
||||
if (UtilString.isNotEmpty(rowMap.getString("ROLENAME"))) {
|
||||
|
||||
_tr.put("shape_role", rowMap.getString("ROLENAME")); // 角色名称
|
||||
} else {
|
||||
_tr.put("shape_role", ""); // 角色名称
|
||||
}
|
||||
|
||||
Map<String, JSONObject> queryRepositoryAttributeById = new RepositoryAttribute().queryRepositoryAttributeById(jsonObject1.getString("PLID"));
|
||||
String kpi = "";
|
||||
String institution = "";
|
||||
if (null != queryRepositoryAttributeById && !queryRepositoryAttributeById.isEmpty()) {
|
||||
@ -340,9 +279,12 @@ public class Report1Gener {
|
||||
if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) {
|
||||
for (Object PUBDEPTO : PUBDEPTJA) {
|
||||
JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO));
|
||||
String dempId = PUBDEPTJO.getString("id");
|
||||
System.out.println("第一这个是什么呢>>>>>"+dempId);
|
||||
kpi+=dempId+",";
|
||||
System.out.println("在这个是什么呢>>>>>>>" + PUBDEPTJO);
|
||||
String dempId = PUBDEPTJO.getString("name");
|
||||
System.out.println("第一这个是什么呢>>>>>" + dempId);
|
||||
if (UtilString.isNotEmpty(dempId)) {
|
||||
kpi += dempId + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -354,24 +296,39 @@ public class Report1Gener {
|
||||
if (null != PUBDEPTJA && !PUBDEPTJA.isEmpty()) {
|
||||
for (Object PUBDEPTO : PUBDEPTJA) {
|
||||
JSONObject PUBDEPTJO = JSONObject.parseObject(String.valueOf(PUBDEPTO));
|
||||
String dempId = PUBDEPTJO.getString("id");
|
||||
System.out.println("第二这个是什么呢>>>>>"+dempId);
|
||||
institution+=dempId+",";
|
||||
String dempId = PUBDEPTJO.getString("name");
|
||||
if (StringUtils.isEmpty(dempId)) {
|
||||
|
||||
} else {
|
||||
institution += dempId + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_tr.put(OutputWordUtil.SHAPE_KPI,kpi);
|
||||
_tr.put(OutputWordUtil.SHAPE_INSTITUTION,institution);
|
||||
_tr.put(OutputWordUtil.SHAPE_KPI, kpi);
|
||||
_tr.put(OutputWordUtil.SHAPE_INSTITUTION, institution);
|
||||
//获取相关知识
|
||||
_table.add(_tr);
|
||||
index++;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (_table.size() == 0) {
|
||||
_table = getEmptyTable("process.bpmn2");
|
||||
JSONObject _tr = new JSONObject();
|
||||
//_table = getEmptyTable("process.bpmn2");
|
||||
_tr.put(OutputWordUtil.SHAPE_NAME, "");
|
||||
_tr.put(OutputWordUtil.SHAPE_NUMBER, "");
|
||||
_tr.put(OutputWordUtil.REPOSITORY_NAME, ""); // 流程名称
|
||||
_tr.put(OutputWordUtil.SERIAL_NUMBER, "");
|
||||
_tr.put(OutputWordUtil.SHAPE_DESC, ""); // 工作详细描述
|
||||
_tr.put("shape_role", ""); // 工作详细描述
|
||||
_tr.put(OutputWordUtil.SHAPE_KPI, "");
|
||||
_tr.put(OutputWordUtil.SHAPE_INSTITUTION, "");
|
||||
|
||||
_table.add(_tr);
|
||||
}
|
||||
|
||||
dataMap.put(OutputWordUtil.TABLE_REPOSITORY, _table);
|
||||
|
||||
@ -8,6 +8,8 @@ import com.actionsoft.bpms.server.UserContext;
|
||||
import com.actionsoft.bpms.util.DBSql;
|
||||
import com.actionsoft.sdk.local.SDK;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class DataWindowBeforeLoadEvent implements DataWindowBeforeLoadEventInterface {
|
||||
@ -36,14 +38,73 @@ public class DataWindowBeforeLoadEvent implements DataWindowBeforeLoadEventInter
|
||||
BO bo = bo_act_publish_perm_scope.get(0);
|
||||
String orgperm = bo.getString("ORGPERM");
|
||||
String permtype = bo.getString("PERMTYPE");
|
||||
String[] users = orgperm.split(",");
|
||||
if (permtype.equals("0")){
|
||||
int update = DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6 = '" + orgperm + "' where ID = '" + fileid + "'");
|
||||
if (update==1){
|
||||
if (orgperm.length()>=4000){
|
||||
|
||||
|
||||
int ys = users.length%2000;
|
||||
/**
|
||||
* 这个是以300人作为一个发送单位去放到list中并发送待阅数据
|
||||
*/
|
||||
if (ys==0) {
|
||||
int size = users.length/2000;
|
||||
int flag = 0;
|
||||
|
||||
List<String[]> list = new LinkedList();
|
||||
|
||||
for (int i=0;i<size;i++){
|
||||
String[] results;
|
||||
results = Arrays.copyOfRange(users, flag, flag+2000);
|
||||
list.add(results);
|
||||
flag = flag+2000;
|
||||
String lists = Arrays.toString(results);
|
||||
SDK.getLogAPI().consoleInfo("部门合集是什么>>>>>>>>>>>>>"+lists);
|
||||
DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6= '' where ID = '"+fileid+"'");
|
||||
int update = DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6 = EXT6||'" + lists + "' where ID = '" + fileid + "'");
|
||||
}
|
||||
/**
|
||||
* 创建线程发送待阅数据
|
||||
*/
|
||||
//System.out.println("发送人员数据>>>>>>>>>>>>>>"+list);
|
||||
}else {
|
||||
int size = users.length/2000;
|
||||
int flag = 0;
|
||||
List<String[]> list = new LinkedList();
|
||||
for (int i=0;i<size;i++){
|
||||
String[] results;
|
||||
results = Arrays.copyOfRange(users, flag, flag+2000);
|
||||
list.add(results);
|
||||
flag = flag+2000;
|
||||
String lists = Arrays.toString(results);
|
||||
SDK.getLogAPI().consoleInfo("部门合集是什么>>>>>>>>>>>>>"+lists);
|
||||
DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6= '' where ID = '"+fileid+"'");
|
||||
int update = DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6 = EXT6||'" + lists + "' where ID = '" + fileid + "'");
|
||||
}
|
||||
String[] redata;
|
||||
redata = Arrays.copyOfRange(users, flag, flag+ys);
|
||||
String lists = Arrays.toString(redata);
|
||||
SDK.getLogAPI().consoleInfo("部门合集是什么>>>>>>>>>>>>>"+lists);
|
||||
list.add(redata);
|
||||
DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6= '' where ID = '"+fileid+"'");
|
||||
int update = DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6 = EXT6||'" + lists+ "' where ID = '" + fileid + "'");
|
||||
// 创建线程来实现为每300人为一个的线程跑待阅
|
||||
/**
|
||||
* 创建线程发送待阅数据
|
||||
*/
|
||||
//System.out.println("发送人员数据>>>>>>>>>>>>>>"+list);
|
||||
}
|
||||
|
||||
SDK.getLogAPI().consoleInfo("更新成功>>>>>>>>>>>模型名称为"+plname+"版本ID是>>>>>>>>>"+plversionid);
|
||||
}else {
|
||||
SDK.getLogAPI().consoleInfo("更新失败");
|
||||
int update = DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6 = '" + orgperm + "' where ID = '" + fileid + "'");
|
||||
if (update==1){
|
||||
|
||||
SDK.getLogAPI().consoleInfo("更新成功>>>>>>>>>>>模型名称为"+plname+"版本ID是>>>>>>>>>"+plversionid);
|
||||
}else {
|
||||
SDK.getLogAPI().consoleInfo("更新失败");
|
||||
}
|
||||
}
|
||||
|
||||
}else {
|
||||
int update = DBSql.update("update APP_ACT_COE_PAL_REPOSITORY set EXT6 = 'all' where ID = '" + fileid + "'");
|
||||
if (update==1){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user