|
@@ -42,7 +42,6 @@ import com.minto.tap.task.api.TaskApi;
|
|
|
import com.minto.tip.common.authenticate.bo.User;
|
|
|
import com.minto.tip.common.exceptions.BusinessException;
|
|
|
import com.minto.tip.organization.enums.RelationValueName;
|
|
|
-import org.aspectj.weaver.ast.Var;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -380,15 +379,15 @@ public class TaskAnalysisManagerImpl implements ITaskAnalysisManager{
|
|
|
resourceTypes.add(ResourceEnum.ResourceTypeEnum.OrgDepartment.getKey());
|
|
|
param.put("resourceTypes", resourceTypes);
|
|
|
|
|
|
- Long gbDeptId = ParameterUtil.getLong(param,"gbDeptId");
|
|
|
- if(gbDeptId!=null){
|
|
|
+ Long gbDeptId = ParameterUtil.getLong(param, "gbDeptId");
|
|
|
+ if(gbDeptId != null){
|
|
|
List<Long> gbResIds = new ArrayList<>();
|
|
|
gbResIds.add(gbDeptId);
|
|
|
List<OrgPersonBean> personBeans = orgManager.findPersonsByDepartmentId(gbDeptId, false);
|
|
|
if(CollectionUtil.isNotEmpty(personBeans)){
|
|
|
- gbResIds.addAll(personBeans.stream().map(e->e.getId()).collect(Collectors.toList()));
|
|
|
+ gbResIds.addAll(personBeans.stream().map(e -> e.getId()).collect(Collectors.toList()));
|
|
|
}
|
|
|
- param.put("gbResIds",gbResIds);
|
|
|
+ param.put("gbResIds", gbResIds);
|
|
|
}
|
|
|
|
|
|
//所有承办单位承办总数
|
|
@@ -671,6 +670,22 @@ public class TaskAnalysisManagerImpl implements ITaskAnalysisManager{
|
|
|
result.put("tStopped", tStopped);
|
|
|
|
|
|
//根据责任单位统计
|
|
|
+ //排序
|
|
|
+ String order = ParameterUtil.getString(param, "gbOrder");
|
|
|
+ Integer desc = ParameterUtil.getInteger(param, "gbDesc", 1);
|
|
|
+ if(allTaskCounts.get(0).keySet().contains(order)){
|
|
|
+ allTaskCounts.sort((o1, o2) -> {
|
|
|
+ String str1 = o1.get(order) == null ? "0" : o1.get(order).toString();
|
|
|
+ String str2 = o2.get(order) == null ? "0" : o2.get(order).toString();
|
|
|
+ BigDecimal decimal1 = new BigDecimal(str1);
|
|
|
+ BigDecimal decimal2 = new BigDecimal(str2);
|
|
|
+ if(desc == 1){
|
|
|
+ return decimal1.compareTo(decimal2);
|
|
|
+ } else{
|
|
|
+ return decimal2.compareTo(decimal1);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
result.put("list", allTaskCounts);
|
|
|
result.put("year", ParameterUtil.getString(param, "year"));
|
|
|
return result;
|
|
@@ -1582,17 +1597,19 @@ public class TaskAnalysisManagerImpl implements ITaskAnalysisManager{
|
|
|
public List<Map<String, Object>> findTypeScopeTaskCountAnalysis(Map<String, Object> param) throws BusinessException{
|
|
|
List<Map<String, Object>> list = taskAnalysisDao.findTypeScopeCount(param);
|
|
|
|
|
|
- if (!list.isEmpty()){
|
|
|
- Map<String, Map<Long, BigDecimal>> reachAndCaseProportionMap = taskTypeSettingManager.findReachPerGroupByTypeId(param);
|
|
|
+ if(!list.isEmpty()){
|
|
|
+ Map<String, Map<Long, BigDecimal>> reachAndCaseProportionMap =
|
|
|
+ taskTypeSettingManager.findReachPerGroupByTypeId(
|
|
|
+ param);
|
|
|
Map<Long, BigDecimal> reachMap = reachAndCaseProportionMap.get("reachMap");
|
|
|
Map<Long, BigDecimal> caseProportionMap = reachAndCaseProportionMap.get("caseProportionMap");
|
|
|
list.stream().forEach(e -> {
|
|
|
long id = Long.parseLong(e.get("id").toString());
|
|
|
- if (null != reachMap && reachMap.containsKey(id)){
|
|
|
- e.put("reachPer",reachMap.get(id)+"%");
|
|
|
+ if(null != reachMap && reachMap.containsKey(id)){
|
|
|
+ e.put("reachPer", reachMap.get(id) + "%");
|
|
|
}
|
|
|
- if (null != caseProportionMap && caseProportionMap.containsKey(id)){
|
|
|
- e.put("caseProportion","1:"+caseProportionMap.get(id));
|
|
|
+ if(null != caseProportionMap && caseProportionMap.containsKey(id)){
|
|
|
+ e.put("caseProportion", "1:" + caseProportionMap.get(id));
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -1600,8 +1617,8 @@ public class TaskAnalysisManagerImpl implements ITaskAnalysisManager{
|
|
|
Map<String, Object> caseProportionMap = taskTypeSettingManager.calculateCaseProportion(param);
|
|
|
String allNum = caseProportionMap.get("allNum").toString();
|
|
|
caseProportionMap.put("c", allNum);
|
|
|
- if (!"0".equals(allNum)){
|
|
|
- caseProportionMap.put("caseProportion","1:"+caseProportionMap.get("caseProportion"));
|
|
|
+ if(!"0".equals(allNum)){
|
|
|
+ caseProportionMap.put("caseProportion", "1:" + caseProportionMap.get("caseProportion"));
|
|
|
}
|
|
|
list.add(caseProportionMap);
|
|
|
|
|
@@ -1642,7 +1659,7 @@ public class TaskAnalysisManagerImpl implements ITaskAnalysisManager{
|
|
|
//基础分数
|
|
|
result.put("baseScore", scoreBean.getBaseScore());
|
|
|
//评价分
|
|
|
- result.put("evalScore",scoreBean.getEvalScore());
|
|
|
+ result.put("evalScore", scoreBean.getEvalScore());
|
|
|
list.add(result);
|
|
|
});
|
|
|
return list;
|