|
@@ -32,6 +32,8 @@ import org.springframework.web.multipart.MultipartFile;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import java.io.IOException;
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.InputStream;
|
|
|
|
+import java.math.BigDecimal;
|
|
|
|
+import java.text.DecimalFormat;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -171,33 +173,63 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
|
|
String quantified = valueMap.get(entry.getKey().replace("ID_", "IS_LH_")).toString();
|
|
String quantified = valueMap.get(entry.getKey().replace("ID_", "IS_LH_")).toString();
|
|
double quantifiedValue = 0;
|
|
double quantifiedValue = 0;
|
|
if ("1".equals(quantified)) {
|
|
if ("1".equals(quantified)) {
|
|
- if (MathCalculatorUtil.isNumber(String.valueOf(valueMap.get(entry.getKey().replace("ID_", "")).toString()))) {
|
|
|
|
- quantifiedValue = Double.valueOf(valueMap.get(entry.getKey().replace("ID_", "")).toString());
|
|
|
|
|
|
+ if (MathCalculatorUtil.isNumber(String.valueOf(valueMap.get(entry.getKey().replace("ID_", ""))))) {
|
|
|
|
+ BigDecimal bigDecimal = new BigDecimal(valueMap.get(entry.getKey().replace("ID_", "")).toString());
|
|
|
|
+ quantifiedValue = Double.parseDouble(new DecimalFormat("#.00").format(bigDecimal));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- String nonQuantifiedValue = valueMap.get(entry.getKey().replace("ID_", "")).toString();
|
|
|
|
- if (quantifiedValue != responsibilityIndicatorInfo.getQuantifiedValue() || !nonQuantifiedValue.equals(responsibilityIndicatorInfo.getNonQuantifiedValue())) {
|
|
|
|
- ResponsibilityIndicatorInfo info = new ResponsibilityIndicatorInfo();
|
|
|
|
- info.setDeptResponsibilityId(responsibilityIndicatorInfo.getDeptResponsibilityId());
|
|
|
|
- info.setOrganizationEvaluationRuleId(responsibilityIndicatorInfo.getOrganizationEvaluationRuleId());
|
|
|
|
- info.setIndicatorId(responsibilityIndicatorInfo.getIndicatorId());
|
|
|
|
- info.setIndicatorDictionaryId(responsibilityIndicatorInfo.getIndicatorDictionaryId());
|
|
|
|
- info.setOptionCode(responsibilityIndicatorInfo.getOptionCode());
|
|
|
|
- info.setIsQuantified(responsibilityIndicatorInfo.getIsQuantified());
|
|
|
|
- info.setQuantifiedValue(quantifiedValue);
|
|
|
|
- info.setNonQuantifiedValue(nonQuantifiedValue);
|
|
|
|
- info.setCreateTime(new Date());
|
|
|
|
- info.setRemark(responsibilityIndicatorInfo.getRemark());
|
|
|
|
- info.setState(valueMap.get("state").toString());
|
|
|
|
- info.setDataState("有效");
|
|
|
|
- info.setDeptId(responsibilityIndicatorInfo.getDeptId());
|
|
|
|
- info.setChildCode(responsibilityIndicatorInfo.getChildCode());
|
|
|
|
- info.setEvaluateRuleInfoId(responsibilityIndicatorInfo.getEvaluateRuleInfoId());
|
|
|
|
- info.setOrganizationId(responsibilityIndicatorInfo.getOrganizationId());
|
|
|
|
- boolean b = this.save(info);
|
|
|
|
- if (b) {
|
|
|
|
- responsibilityIndicatorInfo.setDataState("失效");
|
|
|
|
- this.updateById(responsibilityIndicatorInfo);
|
|
|
|
|
|
+ String nonQuantifiedValue = String.valueOf(valueMap.get(entry.getKey().replace("ID_", "")));
|
|
|
|
+ if (responsibilityIndicatorInfo.getIsQuantified()) {//量化 true
|
|
|
|
+ if (quantifiedValue != responsibilityIndicatorInfo.getQuantifiedValue()) {
|
|
|
|
+ ResponsibilityIndicatorInfo info = new ResponsibilityIndicatorInfo();
|
|
|
|
+ info.setDeptResponsibilityId(responsibilityIndicatorInfo.getDeptResponsibilityId());
|
|
|
|
+ info.setOrganizationEvaluationRuleId(responsibilityIndicatorInfo.getOrganizationEvaluationRuleId());
|
|
|
|
+ info.setIndicatorId(responsibilityIndicatorInfo.getIndicatorId());
|
|
|
|
+ info.setIndicatorDictionaryId(responsibilityIndicatorInfo.getIndicatorDictionaryId());
|
|
|
|
+ info.setOptionCode(responsibilityIndicatorInfo.getOptionCode());
|
|
|
|
+ info.setIsQuantified(responsibilityIndicatorInfo.getIsQuantified());
|
|
|
|
+ info.setQuantifiedValue(quantifiedValue);
|
|
|
|
+ info.setNonQuantifiedValue(nonQuantifiedValue);
|
|
|
|
+ info.setCreateTime(new Date());
|
|
|
|
+ info.setRemark(responsibilityIndicatorInfo.getRemark());
|
|
|
|
+ info.setState("0");
|
|
|
|
+ info.setDataState("1-1");
|
|
|
|
+ info.setDeptId(responsibilityIndicatorInfo.getDeptId());
|
|
|
|
+ info.setChildCode(responsibilityIndicatorInfo.getChildCode());
|
|
|
|
+ info.setEvaluateRuleInfoId(responsibilityIndicatorInfo.getEvaluateRuleInfoId());
|
|
|
|
+ info.setOrganizationId(responsibilityIndicatorInfo.getOrganizationId());
|
|
|
|
+ info.setReviseId(responsibilityIndicatorInfo.getReviseId());
|
|
|
|
+ boolean b = this.save(info);
|
|
|
|
+ if (b) {
|
|
|
|
+ responsibilityIndicatorInfo.setDataState("0-0");
|
|
|
|
+ this.updateById(responsibilityIndicatorInfo);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {//非量化 false
|
|
|
|
+ if (!nonQuantifiedValue.equals(responsibilityIndicatorInfo.getNonQuantifiedValue())) {
|
|
|
|
+ ResponsibilityIndicatorInfo info = new ResponsibilityIndicatorInfo();
|
|
|
|
+ info.setDeptResponsibilityId(responsibilityIndicatorInfo.getDeptResponsibilityId());
|
|
|
|
+ info.setOrganizationEvaluationRuleId(responsibilityIndicatorInfo.getOrganizationEvaluationRuleId());
|
|
|
|
+ info.setIndicatorId(responsibilityIndicatorInfo.getIndicatorId());
|
|
|
|
+ info.setIndicatorDictionaryId(responsibilityIndicatorInfo.getIndicatorDictionaryId());
|
|
|
|
+ info.setOptionCode(responsibilityIndicatorInfo.getOptionCode());
|
|
|
|
+ info.setIsQuantified(responsibilityIndicatorInfo.getIsQuantified());
|
|
|
|
+ info.setQuantifiedValue(quantifiedValue);
|
|
|
|
+ info.setNonQuantifiedValue(nonQuantifiedValue);
|
|
|
|
+ info.setCreateTime(new Date());
|
|
|
|
+ info.setRemark(responsibilityIndicatorInfo.getRemark());
|
|
|
|
+ info.setState("0");
|
|
|
|
+ info.setDataState("1-1");
|
|
|
|
+ info.setDeptId(responsibilityIndicatorInfo.getDeptId());
|
|
|
|
+ info.setChildCode(responsibilityIndicatorInfo.getChildCode());
|
|
|
|
+ info.setEvaluateRuleInfoId(responsibilityIndicatorInfo.getEvaluateRuleInfoId());
|
|
|
|
+ info.setOrganizationId(responsibilityIndicatorInfo.getOrganizationId());
|
|
|
|
+ info.setReviseId(responsibilityIndicatorInfo.getReviseId());
|
|
|
|
+ boolean b = this.save(info);
|
|
|
|
+ if (b) {
|
|
|
|
+ responsibilityIndicatorInfo.setDataState("0-0");
|
|
|
|
+ this.updateById(responsibilityIndicatorInfo);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -219,10 +251,10 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
|
|
List<Map> indicatorMap = new ArrayList<>();
|
|
List<Map> indicatorMap = new ArrayList<>();
|
|
if ("ZDZX".equals(CacheContext.bseIdObject.get(binStage).getStageCode()) || "KJCX".equals(CacheContext.bseIdObject.get(binStage).getStageCode())) {
|
|
if ("ZDZX".equals(CacheContext.bseIdObject.get(binStage).getStageCode()) || "KJCX".equals(CacheContext.bseIdObject.get(binStage).getStageCode())) {
|
|
DeptResponsibility dby = deptResponsibilityService.getById(responsibilityId);
|
|
DeptResponsibility dby = deptResponsibilityService.getById(responsibilityId);
|
|
- if(null == dby){
|
|
|
|
|
|
+ if (null == dby) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
- List<Indicator> indicatorList = indicatorService.listAll("", "", "", binSection, binStage, "", "",dby.getCheckCycle());
|
|
|
|
|
|
+ List<Indicator> indicatorList = indicatorService.listAll("", "", "", binSection, binStage, "", "", dby.getCheckCycle());
|
|
if (null != indicatorList && indicatorList.size() > 0) {
|
|
if (null != indicatorList && indicatorList.size() > 0) {
|
|
for (Indicator i : indicatorList) {
|
|
for (Indicator i : indicatorList) {
|
|
Map map = new HashMap();
|
|
Map map = new HashMap();
|
|
@@ -291,13 +323,13 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
|
|
|
|
|
|
//获取数据
|
|
//获取数据
|
|
List<Map> datamapList = new ArrayList<>();
|
|
List<Map> datamapList = new ArrayList<>();
|
|
- if(null !=organizationShortName ){
|
|
|
|
|
|
+ if (null != organizationShortName) {
|
|
organizationShortName = organizationShortName.trim();
|
|
organizationShortName = organizationShortName.trim();
|
|
}
|
|
}
|
|
- if(null !=organizationShortName ){
|
|
|
|
|
|
+ if (null != organizationShortName) {
|
|
organizationShortName = organizationShortName.trim();
|
|
organizationShortName = organizationShortName.trim();
|
|
}
|
|
}
|
|
- List<ResponsibilityIndicatorInfoResDTO> dataList = baseMapper.getResponsibilityInfoList(responsibilityId, indicatorId, organizationShortName, binSection, binStage, "");
|
|
|
|
|
|
+ List<ResponsibilityIndicatorInfoResDTO> dataList = baseMapper.getResponsibilityInfoList(responsibilityId, indicatorId, organizationShortName, binSection, binStage, "0-0", "");
|
|
|
|
|
|
Map<String, List<ResponsibilityIndicatorInfoResDTO>> groupeddataMap = dataList.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getOrganizationId)); // 根据organizationId进行分组
|
|
Map<String, List<ResponsibilityIndicatorInfoResDTO>> groupeddataMap = dataList.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getOrganizationId)); // 根据organizationId进行分组
|
|
|
|
|
|
@@ -442,7 +474,7 @@ public class ResponsibilityIndicatorInfoServiceImpl extends ServiceImpl<Responsi
|
|
|
|
|
|
//获取数据
|
|
//获取数据
|
|
List<Map> datamapList = new ArrayList<>();
|
|
List<Map> datamapList = new ArrayList<>();
|
|
- List<ResponsibilityIndicatorInfoResDTO> dataList = baseMapper.getResponsibilityInfoList(responsibilityId, indicatorId, "", binSection, binStage, "");
|
|
|
|
|
|
+ List<ResponsibilityIndicatorInfoResDTO> dataList = baseMapper.getResponsibilityInfoList(responsibilityId, indicatorId, "", binSection, binStage, "0-0", "");
|
|
|
|
|
|
Map<String, List<ResponsibilityIndicatorInfoResDTO>> groupeddataMap = dataList.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getOrganizationId)); // 根据organizationId进行分组
|
|
Map<String, List<ResponsibilityIndicatorInfoResDTO>> groupeddataMap = dataList.stream().collect(Collectors.groupingBy(ResponsibilityIndicatorInfoResDTO::getOrganizationId)); // 根据organizationId进行分组
|
|
|
|
|