|
|
|
@ -14,6 +14,7 @@ import com.weaver.workflow.common.entity.list.api.RequestListConditionApiEntity;
|
|
|
|
|
import com.weaver.workflow.common.entity.list.api.publicapi.RequestCountInfoPAEntity;
|
|
|
|
|
import com.weaver.workflow.list.api.rest.publicapi.WflRequestListRest;
|
|
|
|
|
import com.weaver.workrelate.performance.api.rest.RemotePerformanceService;
|
|
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
@ -67,9 +68,11 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
endday = String.valueOf(paramMap.get("endday"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String userid = "";
|
|
|
|
|
Long formdata = simpleEmployee.getFormdata();
|
|
|
|
|
String employeeId = simpleEmployee.getEmployeeId()+"";
|
|
|
|
|
if(paramMap.containsKey("userid")){
|
|
|
|
|
String userid = String.valueOf(paramMap.get("userid"));
|
|
|
|
|
userid = String.valueOf(paramMap.get("userid"));
|
|
|
|
|
if(StringUtils.isNotBlank(userid)){
|
|
|
|
|
employeeId = userid;
|
|
|
|
|
}
|
|
|
|
@ -97,7 +100,7 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
//销售 0,项目 1,技术 2,其它 3
|
|
|
|
|
String znlx = getUserType(simpleEmployee,tenantKey);
|
|
|
|
|
String znlx = getUserType(formdata+"",userid,tenantKey);
|
|
|
|
|
log.error("znlx:"+znlx);
|
|
|
|
|
|
|
|
|
|
//销售 0,项目 1,技术 2,其它 3
|
|
|
|
@ -235,7 +238,6 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
oneMap.put("url",oneurl);
|
|
|
|
|
oneMap.put("unit",oneunit);
|
|
|
|
|
list.add(oneMap);
|
|
|
|
|
log.error("1111");
|
|
|
|
|
|
|
|
|
|
Map<String,String> twoMap = new HashMap<String,String>(100);
|
|
|
|
|
twoMap.put("name",twoword);
|
|
|
|
@ -243,7 +245,6 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
twoMap.put("url",twourl);
|
|
|
|
|
twoMap.put("unit",twounit);
|
|
|
|
|
list.add(twoMap);
|
|
|
|
|
log.error("2222");
|
|
|
|
|
|
|
|
|
|
Map<String,String> threeMap = new HashMap<String,String>(100);
|
|
|
|
|
threeMap.put("name",threeword);
|
|
|
|
@ -251,7 +252,6 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
threeMap.put("url",threeurl);
|
|
|
|
|
threeMap.put("unit",threeunit);
|
|
|
|
|
list.add(threeMap);
|
|
|
|
|
log.error("3333");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String,String> fourMap = new HashMap<String,String>(100);
|
|
|
|
@ -296,6 +296,10 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
endday = sdf.format(new Date());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(employeeId)) {
|
|
|
|
|
employeeId = String.valueOf(UserContext.getCurrentEmployeeId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(employeeId)) {
|
|
|
|
|
String dataSql =" select ifnull(sum(d.integer2),0) as devcou \n" +
|
|
|
|
|
" from wfc_form_data l\n" +
|
|
|
|
@ -312,7 +316,7 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
" and p.delete_type=0\n" +
|
|
|
|
|
" order by d.id desc ";
|
|
|
|
|
|
|
|
|
|
log.info("DevQuestCountCmd dataSql:" + dataSql);
|
|
|
|
|
log.info("getQuestInfo-dataSql:" + dataSql);
|
|
|
|
|
|
|
|
|
|
List<String> strlist = new ArrayList<>(100);
|
|
|
|
|
strlist.add(employeeId);
|
|
|
|
@ -330,10 +334,11 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
if(recordList.size()>0){
|
|
|
|
|
quecou = String.valueOf(recordList.get(0).get("devcou"));
|
|
|
|
|
}
|
|
|
|
|
log.error("quecou:"+quecou);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("DevQuestCountCmd-Exception:" + e);
|
|
|
|
|
log.error("getQuestInfo-e:" + e);
|
|
|
|
|
}
|
|
|
|
|
return quecou;
|
|
|
|
|
}
|
|
|
|
@ -341,33 +346,64 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取人员类型
|
|
|
|
|
* @param employee
|
|
|
|
|
* @param formdata
|
|
|
|
|
* @param userid
|
|
|
|
|
* @param tenantKey
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public String getUserType(SimpleEmployee employee,String tenantkey) {
|
|
|
|
|
public String getUserType(String formdata,String userid,String tenantKey) {
|
|
|
|
|
String sourceType = "LOGIC";
|
|
|
|
|
String userType = "3";
|
|
|
|
|
try{
|
|
|
|
|
long formdata = employee.getFormdata();
|
|
|
|
|
String pkey = "field69.groupId";
|
|
|
|
|
String groupId = jucailinCockpitUtils.getUfPropData(pkey,tenantkey);
|
|
|
|
|
log.error("groupId:"+groupId);
|
|
|
|
|
if(StringUtils.isNotBlank(userid)){
|
|
|
|
|
|
|
|
|
|
String groupId ="weaver-ebuilder-form-service";
|
|
|
|
|
|
|
|
|
|
String dataSql =" select formdata " +
|
|
|
|
|
" from eteams.employee a " +
|
|
|
|
|
" where a.id = ? " +
|
|
|
|
|
" and a.tenant_key = ? " ;
|
|
|
|
|
|
|
|
|
|
log.error("getUserType--dataSql:" + dataSql);
|
|
|
|
|
|
|
|
|
|
List<SqlParamEntity> sqlparam = new ArrayList<SqlParamEntity>();
|
|
|
|
|
SqlParamEntity sqlParamEntity = new SqlParamEntity();
|
|
|
|
|
sqlParamEntity.setParamType(SqlParamType.LONG);
|
|
|
|
|
sqlParamEntity.setValue(userid);
|
|
|
|
|
sqlparam.add(sqlParamEntity);
|
|
|
|
|
|
|
|
|
|
sqlParamEntity = new SqlParamEntity();
|
|
|
|
|
sqlParamEntity.setParamType(SqlParamType.VARCHAR);
|
|
|
|
|
sqlParamEntity.setValue(tenantKey);
|
|
|
|
|
sqlparam.add(sqlParamEntity);
|
|
|
|
|
|
|
|
|
|
Map<String, Object> result = databaseUtils.executeForQuery(sourceType, groupId, dataSql, sqlparam);
|
|
|
|
|
List<Map<String, Object>> recordList = databaseUtils.getDataSourceList(result);
|
|
|
|
|
if (recordList.size()>0) {
|
|
|
|
|
formdata = String.valueOf(recordList.get(0).get("formdata"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String field69 = "";
|
|
|
|
|
String sql =" select field69 from eteams.Hrmemployeedefined where form_data_id = ?" ;
|
|
|
|
|
log.error("getSelfServiceData--sql:"+sql);
|
|
|
|
|
|
|
|
|
|
List<SqlParamEntity> sqlparam = new ArrayList<SqlParamEntity>();
|
|
|
|
|
SqlParamEntity sqlParamEntity = new SqlParamEntity();
|
|
|
|
|
sqlParamEntity.setParamType(SqlParamType.LONG);
|
|
|
|
|
sqlParamEntity.setValue(formdata+"");
|
|
|
|
|
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){
|
|
|
|
|
// 销售 0,项目 1,技术 2,其它 3
|
|
|
|
|
field69 = String.valueOf(recordList.get(0).get("field69"));
|
|
|
|
|
if(StringUtils.isNotBlank(formdata)){
|
|
|
|
|
String pkey = "field69.groupId";
|
|
|
|
|
String groupId = jucailinCockpitUtils.getUfPropData(pkey,tenantKey);
|
|
|
|
|
log.error("groupId:"+groupId);
|
|
|
|
|
String sql =" select field69 from eteams.Hrmemployeedefined where form_data_id = ?" ;
|
|
|
|
|
log.error("getUserType--sql:"+sql);
|
|
|
|
|
List<SqlParamEntity> sqlparam = new ArrayList<SqlParamEntity>();
|
|
|
|
|
SqlParamEntity sqlParamEntity = new SqlParamEntity();
|
|
|
|
|
sqlParamEntity.setParamType(SqlParamType.LONG);
|
|
|
|
|
sqlParamEntity.setValue(formdata+"");
|
|
|
|
|
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){
|
|
|
|
|
// 销售 0,项目 1,技术 2,其它 3
|
|
|
|
|
field69 = String.valueOf(recordList.get(0).get("field69"));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("field69:"+field69);
|
|
|
|
|
if(StringUtils.isNotBlank(field69)){
|
|
|
|
|
switch (field69){
|
|
|
|
@ -416,6 +452,9 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
if (StringUtils.isBlank(endday)) {
|
|
|
|
|
endday = sdf.format(new Date());
|
|
|
|
|
}
|
|
|
|
|
if (StringUtils.isBlank(employeeId)) {
|
|
|
|
|
employeeId = String.valueOf(UserContext.getCurrentEmployeeId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(employeeId)) {
|
|
|
|
|
String dataSql =" select count(1) as devcou \n" +
|
|
|
|
@ -450,10 +489,11 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
if(recordList.size()>0){
|
|
|
|
|
devcou = String.valueOf(recordList.get(0).get("devcou"));
|
|
|
|
|
}
|
|
|
|
|
log.error("getDaysInfo-devcou:"+devcou);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("getDaysInfo-Exception:" + e);
|
|
|
|
|
log.error("getDaysInfo-e:" + e);
|
|
|
|
|
}
|
|
|
|
|
return devcou;
|
|
|
|
|
}
|
|
|
|
@ -508,6 +548,7 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
if (recordList.size() > 0) {
|
|
|
|
|
count = String.valueOf(recordList.get(0).get("count"));
|
|
|
|
|
}
|
|
|
|
|
log.error("getCoWorkInfo-count:"+count);
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("getCoWorkInfo-e:"+e.getMessage());
|
|
|
|
@ -568,6 +609,10 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
endday = sdf.format(new Date());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(employeeId)) {
|
|
|
|
|
employeeId = String.valueOf(UserContext.getCurrentEmployeeId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("employeeId2:"+employeeId);
|
|
|
|
|
log.error("startday2:"+startday);
|
|
|
|
|
log.error("endday2:"+endday);
|
|
|
|
@ -671,6 +716,11 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
if(StringUtils.isBlank(endday)){
|
|
|
|
|
endday = sdf.format(new Date());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(employeeId)) {
|
|
|
|
|
employeeId = String.valueOf(UserContext.getCurrentEmployeeId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
log.error("employeeId:"+employeeId);
|
|
|
|
|
log.error("startday:"+startday);
|
|
|
|
|
log.error("endday:"+endday);
|
|
|
|
@ -759,6 +809,10 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
endday = sdf.format(new Date());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(employeeId)) {
|
|
|
|
|
employeeId = String.valueOf(UserContext.getCurrentEmployeeId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(employeeId)){
|
|
|
|
|
String sql = " select count(1) as count " +
|
|
|
|
|
" from document " +
|
|
|
|
@ -780,6 +834,7 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
if(recordList.size()>0){
|
|
|
|
|
count = String.valueOf(recordList.get(0).get("count"));
|
|
|
|
|
}
|
|
|
|
|
log.error("getDocInfo-count:"+count);
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
@ -813,6 +868,10 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
endday = sdf.format(new Date());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(employeeId)) {
|
|
|
|
|
employeeId = String.valueOf(UserContext.getCurrentEmployeeId());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(employeeId)){
|
|
|
|
|
String sql =" select count(1) as count\n" +
|
|
|
|
|
" from blog " +
|
|
|
|
@ -839,6 +898,7 @@ public class CockpitWorkAchievementsCmd {
|
|
|
|
|
if(recordList.size()>0){
|
|
|
|
|
count = String.valueOf(recordList.get(0).get("count"));
|
|
|
|
|
}
|
|
|
|
|
log.error("getDailyInfo-count:"+count);
|
|
|
|
|
}
|
|
|
|
|
}catch (Exception e){
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|