#E10-40# 优化流程、文档分析接口

main
shilei 11 months ago
parent df2b1b2e27
commit 2e4b9ed5c0

@ -1,20 +1,9 @@
package com.weaver.seconddev.cockpit.cmd;
import com.weaver.calendar.service.RemoteAgendaService;
import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.ebuilder.datasource.api.entity.SqlParamEntity;
import com.weaver.ebuilder.datasource.api.enums.SqlParamType;
import com.weaver.framework.rpc.annotation.RpcReference;
import com.weaver.seconddev.cockpit.util.DatabaseUtils;
import com.weaver.seconddev.cockpit.util.JucailinCockpitUtils;
import com.weaver.teams.client.doc.remote.DocClientService;
import com.weaver.teams.domain.user.SimpleEmployee;
import com.weaver.workflow.common.constant.list.listdimension.RequestListInitDimensionTabEnum;
import com.weaver.workflow.common.entity.list.api.RequestListConditionApiEntity;
import com.weaver.workflow.common.entity.list.api.publicapi.RequestCountInfoPAEntity;
import com.weaver.workflow.common.entity.list.api.publicapi.RequestListInfoPAEntity;
import com.weaver.workflow.list.api.rest.publicapi.WflRequestListRest;
import com.weaver.workrelate.performance.api.rest.RemotePerformanceService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -22,8 +11,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.*;
/**
@ -36,25 +23,11 @@ import java.util.*;
@Component
public class CockpitBlogDataCmd {
//日志
private final static Logger log = LoggerFactory.getLogger(CockpitWorkDate4TypeCmd.class);
@RpcReference
public RemotePerformanceService remotePerformanceService;
@Autowired
private JucailinCockpitUtils jucailinCockpitUtils;
private final static Logger log = LoggerFactory.getLogger(CockpitBlogDataCmd.class);
@Autowired
private DatabaseUtils databaseUtils;
@RpcReference(group = "workflow")
WflRequestListRest wflRequestListRest;
@RpcReference
DocClientService docClientService;
@RpcReference
RemoteAgendaService remoteAgendaService;
public Map<String, Object> getDataInfo(SimpleEmployee simpleEmployee, Map<String, Object> paramMap,String tenantKey) {

@ -1,7 +1,5 @@
package com.weaver.seconddev.cockpit.cmd;
import com.weaver.calendar.service.RemoteAgendaService;
import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.ebuilder.datasource.api.entity.SqlParamEntity;
import com.weaver.ebuilder.datasource.api.enums.SqlParamType;
import com.weaver.framework.rpc.annotation.RpcReference;
@ -9,18 +7,10 @@ import com.weaver.seconddev.cockpit.util.DatabaseUtils;
import com.weaver.seconddev.cockpit.util.JucailinCockpitUtils;
import com.weaver.teams.client.doc.remote.DocClientService;
import com.weaver.teams.domain.user.SimpleEmployee;
import com.weaver.workflow.common.constant.list.listdimension.RequestListInitDimensionTabEnum;
import com.weaver.workflow.common.entity.list.api.RequestListConditionApiEntity;
import com.weaver.workflow.common.entity.list.api.publicapi.RequestCountInfoPAEntity;
import com.weaver.workflow.common.entity.list.api.publicapi.RequestListInfoPAEntity;
import com.weaver.workflow.list.api.rest.publicapi.WflRequestListRest;
import com.weaver.workrelate.performance.api.rest.RemotePerformanceService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.*;
/**
@ -33,10 +23,7 @@ import java.util.*;
@Component
public class CockpitDocumentAnalysisCmd {
//日志
private final static Logger log = LoggerFactory.getLogger(CockpitWorkDate4TypeCmd.class);
@RpcReference
public RemotePerformanceService remotePerformanceService;
private final static Logger log = LoggerFactory.getLogger(CockpitDocumentAnalysisCmd.class);
@Autowired
private JucailinCockpitUtils jucailinCockpitUtils;
@ -44,14 +31,9 @@ public class CockpitDocumentAnalysisCmd {
@Autowired
private DatabaseUtils databaseUtils;
@RpcReference(group = "workflow")
WflRequestListRest wflRequestListRest;
@RpcReference
DocClientService docClientService;
@RpcReference
RemoteAgendaService remoteAgendaService;
public Map<String, Object> getDataInfo(SimpleEmployee employee, Map<String, Object> paramMap,String tenantKey) {
@ -87,18 +69,17 @@ public class CockpitDocumentAnalysisCmd {
Map<String,String> docMap = new HashMap<String,String>();
String doc_count4 = getDocumentDateAmount(employeeId,"1",tenantKey);
String doc_name4 = "待查看文档数量";
String doc_pkey4 = "document.create.amount";
String doc_url4 = jucailinCockpitUtils.getUfPropData(doc_pkey4,tenantKey);
docMap.put("count",doc_count4);
docMap.put("name",doc_name4);
docMap.put("url",doc_url4);
doclist.add(docMap);
// String doc_count4 = getDocumentDateAmount(employeeId,"4",tenantKey);
// String doc_name4 = "待查看文档数量";
// String doc_pkey4 = "document.create.amount";
// String doc_url4 = jucailinCockpitUtils.getUfPropData(doc_pkey4,tenantKey);
// docMap.put("count",doc_count4);
// docMap.put("name",doc_name4);
// docMap.put("url",doc_url4);
// doclist.add(docMap);
docMap = new HashMap<String,String>();
String doc_count5 = getDocumentDateAmount(employeeId,"1",tenantKey);
String doc_count5 = getDocumentDateAmount(employeeId,"5",tenantKey);
String doc_name5 = "我的积分";
String doc_pkey5 = "document.create.amount";
String doc_url5 = jucailinCockpitUtils.getUfPropData(doc_pkey5,tenantKey);
@ -108,9 +89,9 @@ public class CockpitDocumentAnalysisCmd {
doclist.add(docMap);
docMap = new HashMap<String,String>();
String doc_count6 = getDocumentDateAmount(employeeId,"1",tenantKey);
String doc_count6 = getDocumentDateAmount6(employeeId,tenantKey);
String doc_name6 = "我的分享";
String doc_pkey6 = "document.create.amount";
String doc_pkey6 = "document.share.amount";
String doc_url6 = jucailinCockpitUtils.getUfPropData(doc_pkey6,tenantKey);
docMap.put("count",doc_count6);
docMap.put("name",doc_name6);
@ -119,7 +100,7 @@ public class CockpitDocumentAnalysisCmd {
docMap = new HashMap<String,String>();
String doc_count7 = getDocumentDateAmount(employeeId,"1",tenantKey);
String doc_count7 = getDocumentDateAmount7(employeeId,tenantKey);
String doc_name7 = "下属知识";
String doc_pkey7 = "document.create.amount";
String doc_url7 = jucailinCockpitUtils.getUfPropData(doc_pkey7,tenantKey);
@ -130,7 +111,7 @@ public class CockpitDocumentAnalysisCmd {
docMap = new HashMap<String,String>();
String doc_count1 = getDocumentDateAmount(employeeId,"1",tenantKey);
String doc_count1 = getDocumentDateAmount1(employeeId,tenantKey);
String doc_name1 = "我创建的文档";
String doc_pkey1 = "document.create.amount";
String doc_url1 = jucailinCockpitUtils.getUfPropData(doc_pkey1,tenantKey);
@ -139,29 +120,29 @@ public class CockpitDocumentAnalysisCmd {
docMap.put("url",doc_url1);
doclist.add(docMap);
docMap = new HashMap<String,String>();
String doc_count2 = getDocumentDateAmount(employeeId,"2",tenantKey);
String doc_name2 = "共享给我的文档";
String doc_pkey2 = "document.read.amount";
String doc_url2 = jucailinCockpitUtils.getUfPropData(doc_pkey2,tenantKey);
docMap.put("count",doc_count2);
docMap.put("name",doc_name2);
docMap.put("url",doc_url2);
doclist.add(docMap);
docMap = new HashMap<String,String>();
String doc_count3 = getDocumentDateAmount(employeeId,"3",tenantKey);
String doc_name3 = "我订阅的文档";
String doc_pkey3 = "document.number.amount";
String doc_url3 = jucailinCockpitUtils.getUfPropData(doc_pkey3,tenantKey);
docMap.put("count",doc_count3);
docMap.put("name",doc_name3);
docMap.put("url",doc_url3);
doclist.add(docMap);
// docMap = new HashMap<String,String>();
// String doc_count2 = getDocumentDateAmount(employeeId,"2",tenantKey);
// String doc_name2 = "共享给我的文档";
// String doc_pkey2 = "document.read.amount";
// String doc_url2 = jucailinCockpitUtils.getUfPropData(doc_pkey2,tenantKey);
// docMap.put("count",doc_count2);
// docMap.put("name",doc_name2);
// docMap.put("url",doc_url2);
// doclist.add(docMap);
//
// docMap = new HashMap<String,String>();
// String doc_count3 = getDocumentDateAmount(employeeId,"3",tenantKey);
// String doc_name3 = "我订阅的文档";
// String doc_pkey3 = "document.number.amount";
// String doc_url3 = jucailinCockpitUtils.getUfPropData(doc_pkey3,tenantKey);
// docMap.put("count",doc_count3);
// docMap.put("name",doc_name3);
// docMap.put("url",doc_url3);
// doclist.add(docMap);
docMap = new HashMap<String,String>();
String doc_count8 = getDocumentDateAmount(employeeId,"3",tenantKey);
String doc_count8 = getDocumentDateAmount8(employeeId,tenantKey);
String doc_name8 = "我关注的文档";
String doc_pkey8 = "document.number.amount";
String doc_url8 = jucailinCockpitUtils.getUfPropData(doc_pkey8,tenantKey);
@ -259,6 +240,16 @@ public class CockpitDocumentAnalysisCmd {
if(recordList.size()>0){
count = String.valueOf(recordList.get(0).get("cou"));
}
}else if("4".equals(type)){
}else if("5".equals(type)){
}else if("6".equals(type)){
}else if("7".equals(type)){
}else if("8".equals(type)){
}
} catch (Exception e) {
e.printStackTrace();
@ -268,4 +259,116 @@ public class CockpitDocumentAnalysisCmd {
return count;
}
public String getDocumentDateAmount1(Long employeeId,String tenantKey) {
String count = "0";
try {
int doccreatecount = docClientService.countByCreator(employeeId);
count = doccreatecount + "";
} catch (Exception e) {
e.printStackTrace();
log.error("getDocCreateNum:" + e);
}
return count;
}
public String getDocumentDateAmount6(Long employeeId,String tenantKey) {
String count = "0";
try {
int sharecount = docClientService.countShareToOther(employeeId);
count = sharecount + "";
} catch (Exception e) {
e.printStackTrace();
log.error("getDocCreateNum:" + e);
}
return count;
}
public String getDocumentDateAmount7(Long employeeId,String tenantKey) {
String count = "0";
String groupId = "weaver-doc-service";
String sourceType = "LOGIC";
try {
String sql =" select count(1) as cou from document where creator in(" +
" select id from eteams.employee where (superior = ?) and status='normal' and delete_type=0 and tenant_key=? and password is not null "+
" ) and delete_type = 0 and tenant_key=? and doc_status = 2" ;
List<SqlParamEntity> sqlparam = new ArrayList<SqlParamEntity>();
SqlParamEntity sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.LONG);
sqlParamEntity.setValue(employeeId+"");
sqlparam.add(sqlParamEntity);
sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.VARCHAR);
sqlParamEntity.setValue(tenantKey);
sqlparam.add(sqlParamEntity);
sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.VARCHAR);
sqlParamEntity.setValue(tenantKey);
sqlparam.add(sqlParamEntity);
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam);
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
if(recordList.size()>0){
count = String.valueOf(recordList.get(0).get("cou"));
}
} catch (Exception e) {
e.printStackTrace();
log.error("getDocCreateNum:" + e);
}
return count;
}
public String getDocumentDateAmount8(Long employeeId,String tenantKey) {
String count = "0";
String groupId = "weaver-doc-service";
String sourceType = "LOGIC";
try {
String sql =" select count(1) as cou \n" +
" from my_watch \n" +
" where watcher = ? \n" +
" and module='document' \n" +
" and delete_type = 0 \n" +
" and tenant_key=? " ;
List<SqlParamEntity> sqlparam = new ArrayList<SqlParamEntity>();
SqlParamEntity sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.LONG);
sqlParamEntity.setValue(employeeId+"");
sqlparam.add(sqlParamEntity);
sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.VARCHAR);
sqlParamEntity.setValue(tenantKey);
sqlparam.add(sqlParamEntity);
sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.LONG);
sqlParamEntity.setValue(employeeId+"");
sqlparam.add(sqlParamEntity);
sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.VARCHAR);
sqlParamEntity.setValue(tenantKey);
sqlparam.add(sqlParamEntity);
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam);
List<Map<String,Object>> recordList = databaseUtils.getDataSourceList(result);
if(recordList.size()>0){
count = String.valueOf(recordList.get(0).get("cou"));
}
} catch (Exception e) {
e.printStackTrace();
log.error("getDocCreateNum:" + e);
}
return count;
}
}

@ -1,29 +1,15 @@
package com.weaver.seconddev.cockpit.cmd;
import com.weaver.calendar.service.RemoteAgendaService;
import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.ebuilder.datasource.api.entity.SqlParamEntity;
import com.weaver.ebuilder.datasource.api.enums.SqlParamType;
import com.weaver.framework.rpc.annotation.RpcReference;
import com.weaver.seconddev.cockpit.util.DatabaseUtils;
import com.weaver.seconddev.cockpit.util.JucailinCockpitUtils;
import com.weaver.teams.client.doc.remote.DocClientService;
import com.weaver.teams.domain.user.SimpleEmployee;
import com.weaver.workflow.common.constant.list.listdimension.RequestListInitDimensionTabEnum;
import com.weaver.workflow.common.entity.list.api.RequestListConditionApiEntity;
import com.weaver.workflow.common.entity.list.api.publicapi.RequestCountInfoPAEntity;
import com.weaver.workflow.common.entity.list.api.publicapi.RequestListInfoPAEntity;
import com.weaver.workflow.list.api.rest.publicapi.WflRequestListRest;
import com.weaver.workrelate.performance.api.rest.RemotePerformanceService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.*;
/**
@ -36,7 +22,7 @@ import java.util.*;
@Component
public class CockpitUserDataCmd {
//日志
private final static Logger log = LoggerFactory.getLogger(CockpitWorkDate4TypeCmd.class);
private final static Logger log = LoggerFactory.getLogger(CockpitUserDataCmd.class);
@Autowired
private JucailinCockpitUtils jucailinCockpitUtils;

@ -28,10 +28,8 @@ import java.util.*;
@Component
public class CockpitWorkDate3TypeCmd {
//日志
private final static Logger log = LoggerFactory.getLogger(CockpitWorkDate4TypeCmd.class);
private final static Logger log = LoggerFactory.getLogger(CockpitWorkDate3TypeCmd.class);
@RpcReference
public RemotePerformanceService remotePerformanceService;
@RpcReference
RemoteCustomerService remoteCustomerService;
@ -39,9 +37,6 @@ public class CockpitWorkDate3TypeCmd {
@RpcReference
RemoteMainlineService remoteMainlineService ;
@Autowired
private JucailinCockpitUtils jucailinCockpitUtils;
@Autowired
private DatabaseUtils databaseUtils;
@ -141,9 +136,10 @@ public class CockpitWorkDate3TypeCmd {
" where m.group_id = ? \n" +
" and m.manager in( select id\n" +
" from eteams.employee \n" +
" where (SUPERIOR = ? or id = ?)\n" +
" where (superior = ? or id = ?)\n" +
" and status='normal'\n" +
" and delete_type=0\n" +
" and delete_type=0" +
" and tenant_key = ?\n" +
" and password is not null\n" +
" )\n" +
" and m.delete_type = 0 \n" +
@ -178,6 +174,11 @@ public class CockpitWorkDate3TypeCmd {
sqlParamEntity.setValue(employeeid+"");
sqlparam.add(sqlParamEntity);
sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.VARCHAR);
sqlParamEntity.setValue(tenantKey+"");
sqlparam.add(sqlParamEntity);
sqlParamEntity = new SqlParamEntity();
sqlParamEntity.setParamType(SqlParamType.VARCHAR);

@ -1,18 +1,25 @@
package com.weaver.seconddev.cockpit.cmd;
import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.ebuilder.datasource.api.entity.SqlParamEntity;
import com.weaver.framework.rpc.annotation.RpcReference;
import com.weaver.seconddev.cockpit.util.DatabaseUtils;
import com.weaver.seconddev.cockpit.util.JucailinCockpitUtils;
import com.weaver.seconddev.jcldoor.util.CommonUtils;
import com.weaver.teams.domain.user.SimpleEmployee;
import com.weaver.workflow.common.constant.list.listdimension.RequestListInitDimensionTabEnum;
import com.weaver.workflow.common.entity.list.api.RequestListConditionApiEntity;
import com.weaver.workflow.common.entity.list.api.publicapi.RequestCountInfoPAEntity;
import com.weaver.workflow.common.entity.list.api.publicapi.RequestListInfoPAEntity;
import com.weaver.workflow.list.api.rest.publicapi.WflRequestListRest;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.temporal.ChronoUnit;
import java.util.*;
@ -27,7 +34,7 @@ import java.util.*;
@Component
public class CockpitWorkflowAnalysisCmd {
//日志
private final static Logger log = LoggerFactory.getLogger(CockpitWorkDate4TypeCmd.class);
private final static Logger log = LoggerFactory.getLogger(CockpitWorkflowAnalysisCmd.class);
@Autowired
private JucailinCockpitUtils jucailinCockpitUtils;
@ -35,6 +42,9 @@ public class CockpitWorkflowAnalysisCmd {
@RpcReference(group = "workflow")
WflRequestListRest wflRequestListRest;
@Autowired
private DatabaseUtils databaseUtils;
public Map<String, Object> getDataInfo(SimpleEmployee employee, Map<String, Object> paramMap,String tenantKey) {
Map<String, Object> recordMap = new HashMap<String, Object>();
@ -115,16 +125,11 @@ public class CockpitWorkflowAnalysisCmd {
wfMap.put("url",wf_url5);
wflist.add(wfMap);
wfMap = new HashMap<String,String>();
String wf_count6 = "2.6";
String wf_name6 = "平均每天处理";
String wf_pkey6 = "workflow.average.amount";
String wf_url6 = jucailinCockpitUtils.getUfPropData(wf_pkey6,tenantKey);
wfMap.put("count",wf_count6);
wfMap.put("name",wf_name6);
wfMap.put("url",wf_url6);
wfMap = getWorkflowDayOperateCount(employee,tenantKey,wf_count3);
wflist.add(wfMap);
wfMap = getWorkflowOperateAverageTime(employee,tenantKey);
wflist.add(wfMap);
} catch (Exception e) {
e.printStackTrace();
@ -201,4 +206,56 @@ public class CockpitWorkflowAnalysisCmd {
return wfMap;
}
public Map<String,String> getWorkflowDayOperateCount(SimpleEmployee employee,String tenantKey,String wf_count3) {
String count = "0.0";
String diffdays = "0";
String groupId = "weaver-ebuilder-form-service";
String sourceType = "LOGIC";
log.error("wf_count3:"+wf_count3);
try{
long employeeId = employee.getEmployeeId();
String dataSql =" select a.hiredate,datediff(curdate(),a.hiredate) as diffdays " +
" from eteams.employee a " +
" where a.id = ? " +
" and a.tenant_key = ? " +
" and a.status = 'normal' " +
" and a.type = 'inside'";
log.error("getuserIfo--dataSql:" + dataSql);
List<String> strlist = new ArrayList<>(100);
strlist.add(employeeId + "");
strlist.add(tenantKey);
List<SqlParamEntity> sqlparam = databaseUtils.getSqlParamEntity(strlist);
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, dataSql, sqlparam);
List<Map<String, Object>> recordList = databaseUtils.getDataSourceList(result);
if (CollectionUtils.isNotEmpty(recordList)) {
Map<String, Object> recordMap = recordList.get(0);
diffdays = CommonUtils.null2String(recordMap.get("diffdays"));
}
log.error("diffdays:"+diffdays);
if(StringUtils.isNotBlank(wf_count3) && StringUtils.isNotBlank(diffdays)){
Long dealcount = Long.parseLong(wf_count3);
Long days = Long.parseLong(diffdays);
BigDecimal bg = new BigDecimal((double) dealcount/(days*1.00));
count = String.valueOf(bg.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue());
}
} catch (Exception e) {
log.error("PortalWfDealCountCmd-Exception:" + e);
}
Map<String,String> wfMap = new HashMap<String,String>();
String wf_name1 = "平均每天处理";
String wf_pkey1 = "workflow.average.amount";
String wf_url1 = jucailinCockpitUtils.getUfPropData(wf_pkey1,tenantKey);
wfMap.put("count",count);
wfMap.put("name",wf_name1);
wfMap.put("url",wf_url1);
return wfMap;
}
}

@ -2,12 +2,10 @@ package com.weaver.seconddev.cockpit.controller;
import com.weaver.common.authority.annotation.WeaPermission;
import com.weaver.common.base.entity.result.WeaResult;
import com.weaver.framework.rpc.annotation.RpcReference;
import com.weaver.seconddev.cockpit.service.JucailinCockpitService;
import com.weaver.seconddev.cockpit.util.JucailinCockpitUtils;
import com.weaver.teams.domain.user.SimpleEmployee;
import com.weaver.teams.security.context.UserContext;
import com.weaver.workflow.list.api.rest.publicapi.WflRequestListRest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -29,9 +27,6 @@ public class JucailinCockpitController {
@Autowired
private JucailinCockpitService jucailinCockpitService;
@RpcReference(group = "workflow")
WflRequestListRest wflRequestListRest;
@Autowired
private JucailinCockpitUtils jucailinCockpitUtils;
@ -191,622 +186,4 @@ public class JucailinCockpitController {
}
//
//
//
//
//
// /**
// * 人员基本信息接口
// * @param request
// * @return
// */
// @GetMapping("/getPortalUser")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalUser(HttpServletRequest request){
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
//
// try{
// recordMap = jucailinPortalService.getPortalUserData(simpleEmployee);
// }catch (Exception e){
// log.error("getPortalUser-Exception:"+e);
// }
// return WeaResult.success(recordMap);
// }
//
// /**
// *
// * @param request
// * @return
// */
// @GetMapping("/getPortalAttendance")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalAttendance(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
//
// Long employeeId = UserContext.getCurrentEmployeeId();
//
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
//
// try{
// recordMap = jucailinPortalService.getPortalAttendanceData(simpleEmployee);
// }catch (Exception e){
// log.error("testSapi-Exception:"+e);
// }
//
// return WeaResult.success(recordMap);
// }
//
//
//
//
//
//
// /**
// * 人员生日祝福
// * @param request
// * @return
// */
// @GetMapping("/getPortalBirthdayWishes")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalBirthdayWishes(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
//
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
//
// try{
// recordMap = jucailinPortalService.getPortalBirthdayWishes(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPortalBirthdayWishes-Exception:"+e);
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /**
// * 风险信息
// * @param request
// * @return
// */
// @GetMapping("/getPortalRiskInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalRiskInfo(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
//
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
//
// try{
// recordMap = jucailinPortalService.getPortalRiskInfo(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPortalRiskInfo-Exception:"+e);
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /**
// * 绩效信息
// * @param request
// * @return
// */
// @GetMapping("/getPortalPerformanceInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalPerformanceInfo(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getPortalPerformanceInfo(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPortalPerformanceInfo-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
//
// /**
// * 流程信息(我发起的)
// * @param request
// * @return
// */
// @GetMapping("/getWorkFlowInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getWfInfoCreate(HttpServletRequest request){
//
// List<RequestListInfoPAEntity> requestListInfoPAEntityList = new ArrayList<RequestListInfoPAEntity>();
// try{
// RequestListConditionApiEntity conditionEntity = new RequestListConditionApiEntity();
// SimpleEmployee employee = UserContext.getCurrentUser();
// String keyword = CommonUtils.null2String(request.getParameter("keyword"));
// if(!"".equals(keyword)){
// conditionEntity.setRequestname(keyword);
// }
// String type = CommonUtils.null2String(request.getParameter("type"),"0");
// int pageSize = CommonUtils.getIntValue(request.getParameter("pageSize"),10);
// int pageNo = CommonUtils.getIntValue(request.getParameter("pageNo"),1);
// // 0 我发起的; 1 我的待办; 2 我的已办
// if("0".equals(type)){
// WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.MINE_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
// int code = requestResult.getCode();
// if(code == 200){
// requestListInfoPAEntityList = requestResult.getData();
// }
// }else if("1".equals(type)){
// WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.TODO_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
//
// int code = requestResult.getCode();
// if(code == 200){
// requestListInfoPAEntityList = requestResult.getData();
// }
//
// }else if("2".equals(type)){
// WeaResult<List<RequestListInfoPAEntity>> requestResult = wflRequestListRest.getRequestListByTabId(employee, RequestListInitDimensionTabEnum.DONE_FLOWALL.getTabid(), pageNo, pageSize, conditionEntity);
//
// int code = requestResult.getCode();
// if(code == 200){
// requestListInfoPAEntityList = requestResult.getData();
// }
// }
// }catch (Exception e){
// log.error("getWorkFlowInfo-Exception:"+e.getMessage());
// return WeaResult.fail(500,"程序执行异常");
// }
// return WeaResult.success(requestListInfoPAEntityList);
// }
//
// /**
// * 流程信息(我发起的)数量
// * @param request
// * @return
// */
// @GetMapping("/getWorkFlowInfoCount")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getWorkFlowInfoCount(HttpServletRequest request){
// int code = 0;
// long count = 0;
// Map<String,Object> dataMap = new HashMap<String,Object>();
// String type = CommonUtils.null2String(request.getParameter("type"),"0");
// try {
// RequestListConditionApiEntity conditionEntity = new RequestListConditionApiEntity();
// String keyword = CommonUtils.null2String(request.getParameter("keyword"));
//
// if(!"".equals(keyword)){
// conditionEntity.setRequestname(keyword);
// }
// SimpleEmployee employee = UserContext.getCurrentUser();
//
// if("0".equals(type)){
// WeaResult<RequestCountInfoPAEntity> requestResult = wflRequestListRest.getRequestCountByTabId(employee, RequestListInitDimensionTabEnum.MINE_FLOWALL.getTabid(), conditionEntity);
//
// code = requestResult.getCode();
// if(code == 200){
// RequestCountInfoPAEntity requestCountInfoPAEntity = requestResult.getData();
// count = requestCountInfoPAEntity.getCount();
// }
// }else if("1".equals(type)){
// WeaResult<RequestCountInfoPAEntity> requestResult = wflRequestListRest.getRequestCountByTabId(employee, RequestListInitDimensionTabEnum.TODO_FLOWALL.getTabid(), conditionEntity);
//
// code = requestResult.getCode();
// if(code == 200){
// RequestCountInfoPAEntity requestCountInfoPAEntity = requestResult.getData();
// count = requestCountInfoPAEntity.getCount();
// }
//
// }else if("2".equals(type)){
// WeaResult<RequestCountInfoPAEntity> requestResult = wflRequestListRest.getRequestCountByTabId(employee, RequestListInitDimensionTabEnum.DONE_FLOWALL.getTabid(), conditionEntity);
//
// code = requestResult.getCode();
// if(code == 200){
// RequestCountInfoPAEntity requestCountInfoPAEntity = requestResult.getData();
// count = requestCountInfoPAEntity.getCount();
// }
// }else{
// WeaResult<RequestCountInfoPAEntity> requestResult = wflRequestListRest.getRequestCountByTabId(employee, RequestListInitDimensionTabEnum.MINE_FLOWALL.getTabid(), conditionEntity);
//
// code = requestResult.getCode();
// if(code == 200){
// RequestCountInfoPAEntity requestCountInfoPAEntity = requestResult.getData();
// count = requestCountInfoPAEntity.getCount();
// }
// }
// dataMap.put("code",code);
// dataMap.put("count",count);
// } catch (Exception e) {
// e.printStackTrace();
// log.error("testSapi10:"+e);
// dataMap.put("count","-1");
// dataMap.put("code","500");
// }
// return WeaResult.success(dataMap);
// }
//
// /***
// * 本年沟通协作数
// * @param request
// * @return
// */
// @GetMapping("/getPortalInteractCount")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalInteractCount(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getPortalInteractCount(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPortalInteractCount-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
// /***
// * 本年文档贡献数
// * @param request
// * @return
// */
// @GetMapping("/getPortalDocCreateCount")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalDocCreateCount(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getPortalDocCreateCount(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPortalDocCreateCount-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /***
// * 本年流程处理数量
// * @param request
// * @return
// */
// @GetMapping("/getPortalWfDealCount")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalWfDealCount(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getPortalWfDealCount(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPortalWfDealCount-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
// /***
// * 本年日报数量
// * @param request
// * @return
// */
// @GetMapping("/getPortalDailyCount")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalDailyCount(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getPortalDailyCount(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPortalDailyCount-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /***
// * 本年人员综合信息(沟通协作数+文档贡献度+处理流程数+微博数量)
// * @param request
// * @return
// */
// @GetMapping("/getPortalCollaborationInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPortalCollaborationInfo(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getPortalCollaborationInfo(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPortalCollaborationInfo-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
//
// /***
// * 项目人员验收信息
// * @param request
// * @return
// */
// @GetMapping("/getPorojectAcceptanceInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPorojectAcceptanceInfo(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getProjectAcceptanceInfo(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPorojectAcceptanceInfo-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /***
// * 项目人员收款信息
// * @param request
// * @return
// */
// @GetMapping("/getPorojectReceiptsInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPorojectReceiptsInfo(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getProjectReceiptsInfo(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPorojectReceiptsInfo-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /***
// * 项目人员综合信息(收款信息+验收信息)
// * @param request
// * @return
// */
// @GetMapping("/getPorojectCollaborationInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getPorojectCollaborationInfo(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getProjectCollaborationInfo(request,simpleEmployee);
// }catch (Exception e){
// log.error("getPorojectCollaborationInfo-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /***
// * 开发人员问题支持数量
// * @param request
// * @return
// */
// @GetMapping("/getDevQuestCount")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getDevQuestCount(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getDevQuestCount(request,simpleEmployee);
// }catch (Exception e){
// log.error("getDevQuestCount-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /***
// * 开发人员人员支持数量
// * @param request
// * @return
// */
// @GetMapping("/getDevDaysCount")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getDevDaysCount(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getDevDaysCount(request,simpleEmployee);
// }catch (Exception e){
// log.error("getDevDaysCount-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /***
// * 开发人员综合信息
// * @param request
// * @return
// */
// @GetMapping("/getDevCollaborationInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getDevCollaborationInfo(HttpServletRequest request){
//
// Map<String, Object> recordMap = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// recordMap = jucailinPortalService.getDevCollaborationInfo(request,simpleEmployee);
// }catch (Exception e){
// log.error("getDevCollaborationInfo-Exception:"+e.getMessage());
// }
//
// return WeaResult.success(recordMap);
// }
//
//
// /**
// * 自助服务信息入口
// * @param request
// * @return
// */
// @GetMapping("/selfServiceInfo")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> selfServiceInfo(HttpServletRequest request){
// log.error("selfServiceInfo");
// Map<String, Object> dataList = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// dataList = jucailinPortalService.getSelfServiceInfo(request,simpleEmployee);
// }catch (Exception e){
// log.error("selfServiceInfo-Exception:"+e.getMessage());
// }
// return WeaResult.success(dataList);
// }
//
//
// /**
// * 自助服务(新增点击次数接口)
// * @param request
// * @return
// */
// @GetMapping("/addSelfServiceCount")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> addSelfServiceCount(HttpServletRequest request){
// log.error("addSelfServiceCount");
// Map<String, Object> dataList = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// dataList = jucailinPortalService.addSelfServiceCount(request,simpleEmployee);
// }catch (Exception e){
// log.error("addSelfServiceCount-Exception:"+e.getMessage());
// }
// return WeaResult.success(dataList);
// }
//
//
//
//
// /**
// * 工作数据接口(根据职能分类返回不同数据)
// * @param request
// * @return
// */
// @GetMapping("/getWorkDataByType")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getWorkDataByType(HttpServletRequest request){
// log.error("getWorkDataByType");
// Map<String, Object> dataList = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// dataList = jucailinPortalService.getWorkDataByType(request,simpleEmployee);
// }catch (Exception e){
// log.error("getWorkDataByType-Exception:"+e.getMessage());
// }
// return WeaResult.success(dataList);
// }
//
//
// /**
// * 用户类型
// * @param request
// * @return
// */
// @GetMapping("/getUserType")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> getUserType(HttpServletRequest request){
// log.error("getUserType");
// Map<String, Object> dataList = new HashMap<String, Object>();
// SimpleEmployee simpleEmployee = UserContext.getCurrentUser();
// try{
// dataList = jucailinPortalService.getUserType(request,simpleEmployee);
// }catch (Exception e){
// log.error("getUserType-Exception:"+e.getMessage());
// }
// return WeaResult.success(dataList);
// }
//
//
// /**
// * 自助服务(新增点击次数接口)
// * @param request
// * @return
// */
// @GetMapping("/initSelfServiceData")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> initSelfServiceData(HttpServletRequest request){
// log.error("initSelfServiceData");
// Map<String, Object> dataMap = new HashMap<String, Object>();
//
// try{
// SimpleEmployee employee = UserContext.getCurrentUser();
//
// String employeeId = request.getParameter("employeeId");
// if(StringUtils.isBlank(employeeId)){
// employeeId = String.valueOf(employee.getEmployeeId());
// }
// log.error("employeeId:"+employeeId);
//
// Map<String, Object> paramMap = jucailinPortalUtils.request2Map(request);
// paramMap.put("employeeId",employeeId);
//
// dataMap = jucailinPortalService.initSelfServiceData(paramMap);
// }catch (Exception e){
// log.error("addSelfServiceCount-Exception:"+e.getMessage());
// }
// return WeaResult.success(dataMap);
// }
//
//
// /**
// * 自助服务(新增点击次数接口)
// * @param request
// * @return
// */
// @GetMapping("/updateSelfServiceData")
// @WeaPermission(publicPermission = true)
// public WeaResult<Object> updateSelfServiceData(HttpServletRequest request){
// log.error("updateSelfServiceData");
// Map<String, Object> dataMap = new HashMap<String, Object>();
// try{
// String employeeId = request.getParameter("employeeId");
// if(StringUtils.isBlank(employeeId)){
// employeeId = String.valueOf(UserContext.getCurrentEmployeeId());
// }
// log.error("employeeId:"+employeeId);
// dataMap = jucailinPortalService.updateSelfServiceData(employeeId);
// }catch (Exception e){
// log.error("addSelfServiceCount-Exception:"+e.getMessage());
// }
// return WeaResult.success(dataMap);
// }
}

Loading…
Cancel
Save