|
|
|
@ -53,7 +53,7 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
|
|
|
|
|
Map<String, Object> recordMap = new HashMap<String, Object>();
|
|
|
|
|
try {
|
|
|
|
|
List<Map<String,String>> dataList = getWorkflowDate(employee,tenantKey);
|
|
|
|
|
List<Map<String,Object>> dataList = getWorkflowDate(employee,tenantKey);
|
|
|
|
|
recordMap.put("leftdata",dataList);
|
|
|
|
|
List<Map<String,Object>> rightList = getRightViewData(employee,tenantKey);
|
|
|
|
|
recordMap.put("rightdata",rightList);
|
|
|
|
@ -68,11 +68,11 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<Map<String,String>> getWorkflowDate(SimpleEmployee employee,String tenantKey) {
|
|
|
|
|
public List<Map<String,Object>> getWorkflowDate(SimpleEmployee employee,String tenantKey) {
|
|
|
|
|
|
|
|
|
|
List<Map<String,String>> wflist = new ArrayList<>(100);
|
|
|
|
|
List<Map<String,Object>> wflist = new ArrayList<Map<String,Object>>(100);
|
|
|
|
|
try {
|
|
|
|
|
Map<String,String> wfMap = new HashMap<String,String>();
|
|
|
|
|
Map<String,Object> wfMap = new HashMap<String,Object>();
|
|
|
|
|
String wf_count1 = getWorkflowDataAmount(employee,RequestListInitDimensionTabEnum.TODO_FLOWALL.getTabid());
|
|
|
|
|
String wf_name1 = "待处理流程数量";
|
|
|
|
|
String wf_pkey1 = "workflow.todo.amount";
|
|
|
|
@ -83,7 +83,7 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
wfMap.put("key","dcllcsl");
|
|
|
|
|
wflist.add(wfMap);
|
|
|
|
|
|
|
|
|
|
wfMap = new HashMap<String,String>();
|
|
|
|
|
wfMap = new HashMap<String,Object>();
|
|
|
|
|
String wf_count2 = getWorkflowDataAmount(employee,RequestListInitDimensionTabEnum.MINE_FLOWALL.getTabid());
|
|
|
|
|
String wf_name2 = "我创建的流程";
|
|
|
|
|
String wf_pkey2 = "workflow.mine.amount";
|
|
|
|
@ -94,7 +94,7 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
wfMap.put("key","wcjdlc");
|
|
|
|
|
wflist.add(wfMap);
|
|
|
|
|
|
|
|
|
|
wfMap = new HashMap<String,String>();
|
|
|
|
|
wfMap = new HashMap<String,Object>();
|
|
|
|
|
String wf_count3 = getWorkflowDataAmount(employee,RequestListInitDimensionTabEnum.DONE_FLOWALL.getTabid());
|
|
|
|
|
String wf_name3 = "我处理的流程";
|
|
|
|
|
String wf_pkey3 = "workflow.done.amount";
|
|
|
|
@ -106,7 +106,7 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
wflist.add(wfMap);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wfMap = new HashMap<String,String>();
|
|
|
|
|
wfMap = new HashMap<String,Object>();
|
|
|
|
|
String wf_count4 = getWorkflowDataAmount(employee,RequestListInitDimensionTabEnum.SUPERVISE_ALL.getTabid());
|
|
|
|
|
String wf_name4 = "我督办的流程";
|
|
|
|
|
String wf_pkey4 = "workflow.supervise.amount";
|
|
|
|
@ -118,7 +118,7 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
wflist.add(wfMap);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
wfMap = new HashMap<String,String>();
|
|
|
|
|
wfMap = new HashMap<String,Object>();
|
|
|
|
|
Long employeeid = employee.getEmployeeId();
|
|
|
|
|
String wf_count5 = getWatchWorkflowDataAmount(employeeid,tenantKey);
|
|
|
|
|
String wf_name5 = "我关注的流程";
|
|
|
|
@ -130,7 +130,7 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
wfMap.put("key","wgzdlc");
|
|
|
|
|
wflist.add(wfMap);
|
|
|
|
|
|
|
|
|
|
List<Map<String,String>> daylist = getWorkflowDayOperateCount(employee,tenantKey,wf_count3,wf_count2);
|
|
|
|
|
List<Map<String,Object>> daylist = getWorkflowDayOperateCount(employee,tenantKey,wf_count3,wf_count2);
|
|
|
|
|
wflist.addAll(daylist);
|
|
|
|
|
|
|
|
|
|
wfMap = getWorkflowOperateAverageTime(employee,tenantKey);
|
|
|
|
@ -211,8 +211,10 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
* @param tenantKey
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public Map<String,String> getWorkflowOperateAverageTime(SimpleEmployee employee,String tenantKey) {
|
|
|
|
|
String count = "";
|
|
|
|
|
public Map<String,Object> getWorkflowOperateAverageTime(SimpleEmployee employee,String tenantKey) {
|
|
|
|
|
String daycount = "";
|
|
|
|
|
String hourcount = "";
|
|
|
|
|
String minscount = "";
|
|
|
|
|
try{
|
|
|
|
|
RequestListConditionApiEntity conditionEntity = new RequestListConditionApiEntity();
|
|
|
|
|
conditionEntity.setOperatedate(DateTimeConditionEnum.CURRENT_YEAR);
|
|
|
|
@ -256,15 +258,15 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
long hours = duration.toHours() % 24;
|
|
|
|
|
long mins = duration.toMinutes() % 60;
|
|
|
|
|
if(days > 0){
|
|
|
|
|
count += days+"天";
|
|
|
|
|
daycount += days+"";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(hours > 0){
|
|
|
|
|
count += hours+"小时";
|
|
|
|
|
hourcount += hours+"";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(mins > 0){
|
|
|
|
|
count += mins+"分";
|
|
|
|
|
minscount = mins+"";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -273,14 +275,15 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
log.error("PortalWfDealCountCmd-Exception:" + e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Map<String,String> wfMap = new HashMap<String,String>();
|
|
|
|
|
Map<String,Object> wfMap = new HashMap<String,Object>();
|
|
|
|
|
String wf_name1 = "平均流程处理时间";
|
|
|
|
|
String wf_pkey1 = "workflow.processtime.amount";
|
|
|
|
|
String wf_url1 = jucailinCockpitUtils.getUfPropData(wf_pkey1,tenantKey);
|
|
|
|
|
if(StringUtils.isBlank(count)){
|
|
|
|
|
count = "0";
|
|
|
|
|
}
|
|
|
|
|
wfMap.put("count",count);
|
|
|
|
|
Map<String,String> timeMap = new HashMap<String,String>();
|
|
|
|
|
timeMap.put("daycount",daycount);
|
|
|
|
|
timeMap.put("hourcount",hourcount);
|
|
|
|
|
timeMap.put("minscount",minscount);
|
|
|
|
|
wfMap.put("count",timeMap);
|
|
|
|
|
wfMap.put("name",wf_name1);
|
|
|
|
|
wfMap.put("url",wf_url1);
|
|
|
|
|
wfMap.put("key","pjlcclsj");
|
|
|
|
@ -289,7 +292,7 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public List<Map<String,String>> getWorkflowDayOperateCount(SimpleEmployee employee,String tenantKey,String wf_count3,String wf_count2) {
|
|
|
|
|
public List<Map<String,Object>> getWorkflowDayOperateCount(SimpleEmployee employee,String tenantKey,String wf_count3,String wf_count2) {
|
|
|
|
|
String count2 = "0.0";
|
|
|
|
|
String count3 = "0.0";
|
|
|
|
|
String diffdays = "1";
|
|
|
|
@ -344,8 +347,8 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
log.error("PortalWfDealCountCmd-Exception:" + e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
List<Map<String,String>> dayList = new ArrayList<Map<String,String>>();
|
|
|
|
|
Map<String,String> wfMap = new HashMap<String,String>();
|
|
|
|
|
List<Map<String,Object>> dayList = new ArrayList<Map<String,Object>>();
|
|
|
|
|
Map<String,Object> wfMap = new HashMap<String,Object>();
|
|
|
|
|
String wf_name2 = "平均每日发起流程";
|
|
|
|
|
String wf_pkey2 = "workflow.daily.create.amount";
|
|
|
|
|
String wf_url2 = jucailinCockpitUtils.getUfPropData(wf_pkey2,tenantKey);
|
|
|
|
@ -355,7 +358,7 @@ public class CockpitWorkflowAnalysisCmd {
|
|
|
|
|
wfMap.put("key","pjmrfqlc");
|
|
|
|
|
dayList.add(wfMap);
|
|
|
|
|
|
|
|
|
|
wfMap = new HashMap<String,String>();
|
|
|
|
|
wfMap = new HashMap<String,Object>();
|
|
|
|
|
String wf_name3 = "平均每日处理流程";
|
|
|
|
|
String wf_pkey3 = "workflow.daily.process.amount";
|
|
|
|
|
String wf_url3 = jucailinCockpitUtils.getUfPropData(wf_pkey3,tenantKey);
|
|
|
|
|