|
|
|
@ -42,13 +42,8 @@ public class CockpitDocumentAnalysisCmd {
|
|
|
|
|
try {
|
|
|
|
|
List<Map<String,String>> dataList = getDocumentDate(employee,tenantKey);
|
|
|
|
|
recordMap.put("leftdata",dataList);
|
|
|
|
|
Map<String,String> chartMap = new HashMap<String,String>();
|
|
|
|
|
chartMap.put("项目管理","16.6");
|
|
|
|
|
chartMap.put("客户服务","16.6");
|
|
|
|
|
chartMap.put("产品中心","40.8");
|
|
|
|
|
chartMap.put("市场管理","10.0");
|
|
|
|
|
chartMap.put("其他","8.6");
|
|
|
|
|
recordMap.put("rightdata",chartMap);
|
|
|
|
|
List<Map<String, Object>> rightList = getRightViewData(employee,tenantKey);
|
|
|
|
|
recordMap.put("rightdata",rightList);;
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("CockpitDocumentAnalysisCmd-e:" + e);
|
|
|
|
@ -80,7 +75,7 @@ public class CockpitDocumentAnalysisCmd {
|
|
|
|
|
// doclist.add(docMap);
|
|
|
|
|
|
|
|
|
|
docMap = new HashMap<String,String>();
|
|
|
|
|
String doc_count5 = getDocumentDateAmount6(employeeId,tenantKey);
|
|
|
|
|
String doc_count5 = getDocumentDateAmount5(employeeId,tenantKey);
|
|
|
|
|
String doc_name5 = "我的积分";
|
|
|
|
|
String doc_pkey5 = "document.create.amount";
|
|
|
|
|
String doc_url5 = jucailinCockpitUtils.getUfPropData(doc_pkey5,tenantKey);
|
|
|
|
@ -260,6 +255,12 @@ public class CockpitDocumentAnalysisCmd {
|
|
|
|
|
// return count;
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
|
*
|
|
|
|
|
* @param employeeId
|
|
|
|
|
* @param tenantKey
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String getDocumentDateAmount1(Long employeeId,String tenantKey) {
|
|
|
|
|
String count = "0";
|
|
|
|
|
try {
|
|
|
|
@ -273,6 +274,56 @@ public class CockpitDocumentAnalysisCmd {
|
|
|
|
|
return count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
|
*
|
|
|
|
|
* @param employeeId
|
|
|
|
|
* @param tenantKey
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String getDocumentDateAmount5(Long employeeId,String tenantKey) {
|
|
|
|
|
String count = "0";
|
|
|
|
|
|
|
|
|
|
String groupId = "weaver-ebuilder-form-service";
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
if(StringUtils.isNotBlank(employeeId+"")){
|
|
|
|
|
String sql =" select sum(case when jfzj = 0 then jfz else 0-jfz end ) as zjf \n" +
|
|
|
|
|
" from uf_docPointDetail_112 " +
|
|
|
|
|
" where xm = ?"+
|
|
|
|
|
" and delete_type = 0" +
|
|
|
|
|
" 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);
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
|
*
|
|
|
|
|
* @param employeeId
|
|
|
|
|
* @param tenantKey
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String getDocumentDateAmount6(Long employeeId,String tenantKey) {
|
|
|
|
|
int count = 0;
|
|
|
|
|
String count1 = "0";
|
|
|
|
@ -283,11 +334,11 @@ public class CockpitDocumentAnalysisCmd {
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(employeeId+"")){
|
|
|
|
|
String sql =" select count(1) as cou\n" +
|
|
|
|
|
" from doc_external_share \n" +
|
|
|
|
|
" where creator = ? " +
|
|
|
|
|
" and date_add(create_time, interval period_validity day) >= curdate()" +
|
|
|
|
|
" and delete_type = 0" +
|
|
|
|
|
" and tenant_key = ?" ;
|
|
|
|
|
" from doc_external_share \n" +
|
|
|
|
|
" where creator = ? " +
|
|
|
|
|
" and date_add(create_time, interval period_validity day) >= curdate()" +
|
|
|
|
|
" and delete_type = 0" +
|
|
|
|
|
" and tenant_key = ?" ;
|
|
|
|
|
|
|
|
|
|
List<SqlParamEntity> sqlparam = new ArrayList<SqlParamEntity>();
|
|
|
|
|
SqlParamEntity sqlParamEntity = new SqlParamEntity();
|
|
|
|
@ -458,4 +509,55 @@ public class CockpitDocumentAnalysisCmd {
|
|
|
|
|
return count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/***
|
|
|
|
|
*
|
|
|
|
|
* @param employee
|
|
|
|
|
* @param tenantKey
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public List<Map<String,Object>> getRightViewData(SimpleEmployee employee,String tenantKey){
|
|
|
|
|
List<Map<String,Object>> recordList = new ArrayList<Map<String,Object>>();
|
|
|
|
|
String groupId = "weaver-doc-service";
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
Long employeeId = employee.getEmployeeId();
|
|
|
|
|
try {
|
|
|
|
|
String sql =" select p.folder,p.name,p.cou from ( \n" +
|
|
|
|
|
" select w.folder,w.name,w.cou \n" +
|
|
|
|
|
" from ( \n" +
|
|
|
|
|
" select t.folder,l.name,count(1) as cou \n" +
|
|
|
|
|
" from document t \n" +
|
|
|
|
|
" inner join folder l on l.id = t.folder \n" +
|
|
|
|
|
" where t.creator = ? \n" +
|
|
|
|
|
" and delete_type = 0 \n" +
|
|
|
|
|
" and tenant_key= ? " +
|
|
|
|
|
" group by t.folder,l.name \n" +
|
|
|
|
|
" ) w order by w.cou desc \n" +
|
|
|
|
|
") p limit 5 " ;
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, sql,sqlparam);
|
|
|
|
|
recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("getDocCreateNum:" + e);
|
|
|
|
|
}
|
|
|
|
|
return recordList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|