岗位手册-竖表生成数据
This commit is contained in:
parent
17ed14370e
commit
443b5b1041
@ -66,12 +66,23 @@ public class ReportORController {
|
||||
String userId = userContext.getUID();
|
||||
String wsId = "7d3ca852-a0bd-42e6-80b1-3dcea6f55083";
|
||||
String teamId ="";
|
||||
String profileId ="_fe696a872a52a5f9860bb65a2f9c3354";
|
||||
String profileId = "";
|
||||
String relationFileId="";
|
||||
if (taskName.equals("岗位手册-横表")){
|
||||
|
||||
profileId ="_fe696a872a52a5f9860bb65a2f9c3354";
|
||||
relationFileId =",e15d106a-74b8-47e5-8513-2bb13d054e50";
|
||||
}else {
|
||||
//_dfa1e6b810b408b8654f14f9c0312386
|
||||
//,2a45196f-f46a-48b3-9cdc-9f509da4dfde
|
||||
profileId ="_dfa1e6b810b408b8654f14f9c0312386";
|
||||
relationFileId =",2a45196f-f46a-48b3-9cdc-9f509da4dfde";
|
||||
}
|
||||
String isExecute = "N";
|
||||
String config = "{'isItReport':true,'orderNuberFirst':true,'orderNametwo':false,'reportNameIsItName':'%shapeName%'}";
|
||||
String targetFileId = ",5b372c57-cda8-41c1-a1f0-07d94af6fb3f";
|
||||
String targetShape = "obj_c9eac6bfaaf000018e3014a212701106,";
|
||||
String relationFileId =",e15d106a-74b8-47e5-8513-2bb13d054e50";
|
||||
|
||||
String isModify = "false";
|
||||
String taskId = "";
|
||||
String s = outPutReport.reportSave(lang, taskName, userId, teamId, profileId, wsId, isExecute, config, targetFileId, targetShape, relationFileId, isModify, taskId);
|
||||
@ -85,7 +96,10 @@ public class ReportORController {
|
||||
DCProfileManager.getDCProfile("com.actionsoft.apps.coe.pal.output.or", "output"), "com.actionsoft.apps.coe.pal.output.or",
|
||||
"7d3ca852-a0bd-42e6-80b1-3dcea6f55083", id, userContext.getUserModel().getPositionName()+".doc");
|
||||
//String reportDownloadURL = getReportDownloadURL(model.getWsId(), id, model.getProfileId(), userContext, model.getTaskName());
|
||||
ro.put("url",dcContext.getDownloadURL());
|
||||
String downloadURL = dcContext.getDownloadURL();
|
||||
String substring = downloadURL.substring(1, downloadURL.length());
|
||||
String url = SDK.getPortalAPI().getPortalUrl()+"/r"+substring;
|
||||
ro.put("url",url);
|
||||
return ro;
|
||||
}
|
||||
|
||||
|
||||
@ -337,7 +337,11 @@ public class Report1Gener {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 这个是获取岗位中的活动数
|
||||
* @param uc
|
||||
* @return
|
||||
*/
|
||||
public JSONObject personalView_right(UserContext uc) {
|
||||
System.out.println("uc>>>>>>>>"+uc.getUID());
|
||||
JSONObject ro = new JSONObject(new LinkedHashMap<>());
|
||||
|
||||
@ -182,29 +182,18 @@ public class Report2Gener {
|
||||
}
|
||||
System.out.println("size>>>>>>>>"+lists.size());*/
|
||||
|
||||
JSONArray jsonArray = getData(targetShapeId, shapesMap, linkerList, wizardJsonData,userId);
|
||||
for (int i=0;i<jsonArray.size();i++) {
|
||||
JSONObject dataMap = jsonArray.getJSONObject(i);
|
||||
OutputWordUtil.createDoc2(dataMap, tempPath, tempName, docName);
|
||||
}
|
||||
JSONObject dataMap = getData(targetShapeId, shapesMap, linkerList, wizardJsonData,userId);
|
||||
OutputWordUtil.createDoc(dataMap, tempPath, tempName, docName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
private JSONArray getData(String shapeId, Map<String, Map<String, Object>> shapesMap,
|
||||
private JSONObject getData(String shapeId, Map<String, Map<String, Object>> shapesMap,
|
||||
List<Map<String, Object>> linkerList, JSONObject wizardJsonData,String userId) {
|
||||
JSONArray jsonArray = new JSONArray(new LinkedList<>());
|
||||
|
||||
|
||||
//流程表格
|
||||
JSONArray positionTable = new JSONArray(); //相关流程
|
||||
JSONArray repositoryTable = new JSONArray(); //相关流程
|
||||
JSONArray repositoryShapeTable = new JSONArray(); //流程步骤
|
||||
JSONArray institutionTable = new JSONArray(); //相关制度
|
||||
JSONArray formTable = new JSONArray(); //相关表单
|
||||
JSONArray itsystemTable = new JSONArray(); //相关IT系统
|
||||
JSONArray KPITable = new JSONArray(); //相关绩效考核
|
||||
|
||||
|
||||
//循环关联文件
|
||||
List<String> repositoryNameList = new ArrayList<String>();
|
||||
@ -224,27 +213,41 @@ public class Report2Gener {
|
||||
lists.add(plid);
|
||||
}
|
||||
}
|
||||
JSONObject dataMap = new JSONObject();
|
||||
OrReportComment orReportComment = new OrReportComment();
|
||||
orReportComment.getCommentContent(dataMap, shapesMap, shapeId,userId); //获取一些公共的数据(手册首页的手册岗位名称、部门、公司、时间、岗位职责等)
|
||||
System.out.println("size>>>>>>>>"+lists.size());
|
||||
|
||||
JSONArray positionTable = new JSONArray(); //列表数据
|
||||
for (int q =0;q< lists.size();q++){
|
||||
JSONObject dataMap = new JSONObject();
|
||||
OrReportComment orReportComment = new OrReportComment();
|
||||
orReportComment.getCommentContent(dataMap, shapesMap, shapeId,userId); //获取一些公共的数据(手册首页的手册岗位名称、部门、公司、时间、岗位职责等)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//流程表格
|
||||
|
||||
JSONArray repositoryTable = new JSONArray(); //相关流程
|
||||
JSONArray repositoryShapeTable = new JSONArray(); //流程步骤
|
||||
JSONArray institutionTable = new JSONArray(); //相关制度
|
||||
JSONArray formTable = new JSONArray(); //相关表单
|
||||
JSONArray itsystemTable = new JSONArray(); //相关IT系统
|
||||
JSONArray KPITable = new JSONArray(); //相关绩效考核
|
||||
|
||||
|
||||
|
||||
System.out.println("循环了几次>>>>>>>" + q);
|
||||
//这个代码是为了解决 岗位参与执行的流程存储
|
||||
JSONObject _tr = new JSONObject(new LinkedHashMap<>());
|
||||
_tr.put("nums", q + 1);
|
||||
positionTable.add(_tr);
|
||||
//dataMap.put("position_table", positionTable);
|
||||
|
||||
//这块代码主要是为了存储流程名称
|
||||
PALRepositoryModel palRepositoryModel = PALRepositoryCache.getCache().get(lists.get(q));
|
||||
String name = palRepositoryModel.getName();
|
||||
JSONObject _tr_prcoess = new JSONObject(new LinkedHashMap<>());
|
||||
_tr.put("numbers", 1);
|
||||
_tr.put("shape_name", name);
|
||||
dataMap.put("position_table", positionTable);
|
||||
//_tr.put("process_table", _tr);
|
||||
|
||||
List<RowMap> nodeRowMaps_shape = DBSql.getMaps(
|
||||
"SELECT * FROM (SELECT NODEID,NODENAME,ITSYSVAL,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
@ -274,7 +277,7 @@ public class Report2Gener {
|
||||
m++;
|
||||
repositoryShapeTable.add(_tr_shape);
|
||||
}
|
||||
dataMap.put("repository_table", repositoryShapeTable);
|
||||
_tr.put("repository_table", repositoryShapeTable);
|
||||
|
||||
|
||||
//这里是对流程制度/表单/模版进行存储数据
|
||||
@ -320,9 +323,8 @@ public class Report2Gener {
|
||||
}
|
||||
}
|
||||
}
|
||||
dataMap.put("institution_tables", institutionTable);
|
||||
}
|
||||
|
||||
_tr.put("institution_tables", institutionTable);
|
||||
|
||||
//这个是存储相关IT系统数据
|
||||
List<String> list_it_system = new LinkedList<>();
|
||||
@ -343,7 +345,7 @@ public class Report2Gener {
|
||||
t++;
|
||||
}
|
||||
}
|
||||
dataMap.put("it_system_table", itsystemTable);
|
||||
_tr.put("it_system_table", itsystemTable);
|
||||
//这个是存储kpi数据
|
||||
|
||||
List<DesignerShapeRelationModel> relationList2 = DesignerShapeRelationCache.getListByAttrId(lists.get(q), "", "Process_performance_metrics");
|
||||
@ -365,16 +367,17 @@ public class Report2Gener {
|
||||
}
|
||||
|
||||
}
|
||||
dataMap.put("kpi_table", KPITable);
|
||||
_tr.put("kpi_table", KPITable);
|
||||
positionTable.add(_tr);
|
||||
//这里是存储数据表格
|
||||
//for (int i=0;i<2;i++){
|
||||
System.out.println("dataMap>>>>>>>>>>>>>>>"+dataMap.toString());
|
||||
updateOtherTableInfo(dataMap, repositoryShapeTable, institutionTable, formTable, itsystemTable, KPITable);
|
||||
//}
|
||||
jsonArray.add(dataMap);
|
||||
}
|
||||
dataMap.put("position_table", positionTable);
|
||||
|
||||
return jsonArray;
|
||||
return dataMap;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -61,13 +61,13 @@ public class OrReportComment {
|
||||
String positionName = userContext.getUserModel().getPositionName();
|
||||
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ positionName+ "%'");
|
||||
+ positionName+ "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%'");
|
||||
List<RowMap> nodeRowMap_process = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ positionName+ "%'");
|
||||
+ positionName+ "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%'");
|
||||
List<String> list = new ArrayList<>();
|
||||
for (RowMap rowMap:
|
||||
nodeRowMap_process) {
|
||||
nodeRowMap_process) {
|
||||
String plid = rowMap.getString("PLID");
|
||||
if (!list.contains(plid)){
|
||||
list.add(plid);
|
||||
@ -110,7 +110,7 @@ public class OrReportComment {
|
||||
return getDeptName(array, tempFromObj, elements);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void getAwsOrgCommentContent(JSONObject dataMap, RoleModel role,String userId) {
|
||||
dataMap.put(OutputWordUtil.POSITION, UserContext.fromUID(userId).getUserModel().getPositionName()); //岗位名称// 岗位名称
|
||||
//TODO 所属部门/公司
|
||||
@ -153,10 +153,10 @@ public class OrReportComment {
|
||||
String positionName = userContext.getUserModel().getPositionName();
|
||||
List<RowMap> nodeRowMaps = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ positionName+ "%'");
|
||||
+ positionName+ "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%' ");
|
||||
List<RowMap> nodeRowMap_process = DBSql.getMaps(
|
||||
"SELECT NODEID,NODENAME,NODETYPE,PLID,PLNAME,ACTIVITYNUMBER,ACTIVITYDESC,ROLE,ROLENAME,POST,POSTNAME FROM BO_EU_PAL_FILENODE6 WHERE POST LIKE '%"
|
||||
+ positionName+ "%'");
|
||||
+ positionName+ "%' OR POST LIKE '%内蒙古伊利实业集团股份有限公司%' ");
|
||||
List<String> list_new = new ArrayList<>();
|
||||
for (RowMap rowMap:
|
||||
nodeRowMap_process) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -387,7 +387,12 @@ public class ProcessEndAfterEvent_new extends ExecuteListener implements Execute
|
||||
* for (String user : sendList) { try { SendOARead(jsonObject, instanceById,
|
||||
* user, "批量推送"); } catch (Exception e) { // TODO: handle exception } }
|
||||
*/
|
||||
new_uid = new_uid.join(",", sendList);
|
||||
List<BO> bo_eu_oa_read_test = SDK.getBOAPI().query("BO_EU_OA_READ_TEST").list();
|
||||
ArrayList<String> sendLists = new ArrayList<String>();
|
||||
for (BO uid:bo_eu_oa_read_test) {
|
||||
sendLists.add(uid.getString("USER_ID"));
|
||||
}
|
||||
new_uid = new_uid.join(",", sendLists);
|
||||
long startTimes = System.currentTimeMillis();
|
||||
String[] users = new_uid.split(",");
|
||||
System.out.println("new_uid>>>>>>>>>>>>>>"+users.length);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user