|
@@ -10,6 +10,7 @@ import com.ims.eval.entity.*;
|
|
|
import com.ims.eval.dao.OrganizationEvaluationInfoMapper;
|
|
|
import com.ims.eval.entity.dto.request.AddEvaluationInfoDTO;
|
|
|
import com.ims.eval.entity.dto.response.IndicatorResDTO;
|
|
|
+import com.ims.eval.entity.dto.response.MyuserResDTO;
|
|
|
import com.ims.eval.entity.dto.response.OrganizationEvaluationInfoResDTO;
|
|
|
import com.ims.eval.service.*;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -390,15 +391,27 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
|
|
|
Map data = new HashMap();
|
|
|
|
|
|
+ //编辑标记
|
|
|
OrganizationEvaluation evaluation = organizationEvaluationService.getById(organizationEvaluationId);
|
|
|
boolean editFlag = false;
|
|
|
if(StringUtils.isNotEmpty(evaluation.getInstId())){
|
|
|
editFlag = workflowService.todoTaskList2(evaluation.getInstId(),request);
|
|
|
- }
|
|
|
|
|
|
- //编辑标记
|
|
|
+ }
|
|
|
data.put("editFlag",editFlag);
|
|
|
|
|
|
+
|
|
|
+ //获取用户信息
|
|
|
+ boolean deptFlag = false;
|
|
|
+ MyuserResDTO user = userService.getSysUser(request);
|
|
|
+ if(null != user){
|
|
|
+ String deptId = "23031009";
|
|
|
+ if(deptId.equals(user.getDeptId())){
|
|
|
+ deptFlag = false;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
boolean titlemark = true;//标记生成标题
|
|
|
List<OrganizationEvaluationInfoResDTO> infoResDTOList = baseMapper.selectEvaluationInfoList(organizationEvaluationId, indicatorId,binSection,binStage,"");
|
|
|
List<IndicatorDictionary> dictionaryList = indicatorDictionaryService.list("", indicatorId, "", "");
|
|
@@ -431,6 +444,16 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
titleArray.add(titlemap);
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+// if(deptFlag){
|
|
|
+ Map deptFlagMap = new LinkedHashMap();
|
|
|
+ deptFlagMap.put("key", "填报状态");//名称
|
|
|
+ deptFlagMap.put("code","state");//名称
|
|
|
+ deptFlagMap.put("flag", false);//是否编辑
|
|
|
+ titleArray.add(deptFlagMap);
|
|
|
+// }
|
|
|
+
|
|
|
+
|
|
|
title.put(childCodeEntry.getKey().split(",")[1], titleArray);
|
|
|
|
|
|
}
|
|
@@ -461,6 +484,9 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
if (mark) {
|
|
|
indicatormap.put("organizationShortName", resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getOrganizationShortName());//公司名
|
|
|
indicatormap.put("organizationId", resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getOrganizationId());//公司id
|
|
|
+ indicatormap.put("state",resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getState());
|
|
|
+ indicatormap.put("IS_LH_state","3");
|
|
|
+
|
|
|
mark = false;
|
|
|
}
|
|
|
|
|
@@ -469,8 +495,12 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
//指标id
|
|
|
indicatormap.put("ID_" + d.getChildCode() + "_" + d.getOptionCode(), resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getId());
|
|
|
//是否量化
|
|
|
- indicatormap.put("IS_LH_" +d.getChildCode() + "_" + d.getOptionCode(),resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getIsQuantified2());
|
|
|
+ indicatormap.put("IS_LH_" +d.getChildCode() + "_" + d.getOptionCode(),resultMap.get(d.getChildCode()+"_"+d.getOptionCode()).getIsQuantified2()?"1":"2");
|
|
|
+
|
|
|
+ //设置状态
|
|
|
+
|
|
|
}
|
|
|
+
|
|
|
mapList.add(indicatormap);
|
|
|
}
|
|
|
|
|
@@ -542,13 +572,12 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
mark = false;
|
|
|
}
|
|
|
|
|
|
- System.out.println(resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getId());
|
|
|
//指标属性
|
|
|
indicatormap.put(d.getChildCode() + "_" + d.getOptionCode(), null == resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getNonQuantifiedValue() ? "" : resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getNonQuantifiedValue());
|
|
|
//指标id
|
|
|
indicatormap.put("ID_" + d.getChildCode() + "_" + d.getOptionCode(), resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getId());
|
|
|
//是否量化
|
|
|
- indicatormap.put("IS_LH_" + d.getChildCode() + "_" + d.getOptionCode(), resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getIsQuantified2().toString());
|
|
|
+ indicatormap.put("IS_LH_" + d.getChildCode() + "_" + d.getOptionCode(), resultMap.get(d.getChildCode() + "_" + d.getOptionCode()).getIsQuantified2()?"1":"2");
|
|
|
}
|
|
|
}
|
|
|
mapList.add(indicatormap);
|
|
@@ -739,12 +768,13 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
for (Map.Entry<String,Object > entry : idMap.entrySet()) {
|
|
|
OrganizationEvaluationInfo info = new OrganizationEvaluationInfo();
|
|
|
info.setId(entry.getValue().toString());
|
|
|
- boolean quantified = Boolean.valueOf(valueMap.get(entry.getKey().replace("ID_","IS_LH_")).toString());
|
|
|
- if(quantified){
|
|
|
|
|
|
- if(MathCalculatorUtil.isNumber(String.valueOf(valueMap.get(entry.getKey().replace("ID_","")).toString()))){
|
|
|
- info.setQuantifiedValue(Double.valueOf(valueMap.get(entry.getKey().replace("ID_","")).toString()));
|
|
|
- }else {
|
|
|
+ String quantified = valueMap.get(entry.getKey().replace("ID_", "IS_LH_")).toString();
|
|
|
+ if ("1".equals(quantified)) {
|
|
|
+
|
|
|
+ if (MathCalculatorUtil.isNumber(String.valueOf(valueMap.get(entry.getKey().replace("ID_", "")).toString()))) {
|
|
|
+ info.setQuantifiedValue(Double.valueOf(valueMap.get(entry.getKey().replace("ID_", "")).toString()));
|
|
|
+ } else {
|
|
|
info.setQuantifiedValue(0);
|
|
|
}
|
|
|
|
|
@@ -785,11 +815,18 @@ public class OrganizationEvaluationInfoServiceImpl extends ServiceImpl<Organizat
|
|
|
for (Map.Entry<String,Object > entry : idMap.entrySet()) {
|
|
|
OrganizationEvaluationInfo info = new OrganizationEvaluationInfo();
|
|
|
info.setId(entry.getValue().toString());
|
|
|
- boolean quantified = Boolean.valueOf(valueMap.get(entry.getKey().replace("ID_","IS_LH_")).toString());
|
|
|
- if(quantified){
|
|
|
- info.setQuantifiedValue(Double.valueOf(valueMap.get(entry.getKey().replace("ID_","")).toString()));
|
|
|
+ String quantified = valueMap.get(entry.getKey().replace("ID_","IS_LH_")).toString();
|
|
|
+ if ("1".equals(quantified)) {
|
|
|
+
|
|
|
+ if (MathCalculatorUtil.isNumber(String.valueOf(valueMap.get(entry.getKey().replace("ID_", "")).toString()))) {
|
|
|
+ info.setQuantifiedValue(Double.valueOf(valueMap.get(entry.getKey().replace("ID_", "")).toString()));
|
|
|
+ } else {
|
|
|
+ info.setQuantifiedValue(0);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
info.setNonQuantifiedValue(valueMap.get(entry.getKey().replace("ID_","")).toString());
|
|
|
+ info.setState(valueMap.get("state").toString());//
|
|
|
evaluationInfos.add(info);
|
|
|
}
|
|
|
this.saveOrUpdateBatch(evaluationInfos);
|