Browse Source

修改bug

songwb 5 months ago
parent
commit
0e45eb9ec7

+ 13 - 13
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/OrganizationEvaluationRuleServiceImpl.java

@@ -439,20 +439,20 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
 				//遍历Excel表每一行的数据
 				for (String[] str : strings) {
 					OrganizationEvaluationRule organizationEvaluationRule = new OrganizationEvaluationRule();
-					String evaluateRuleNameStr = str[2].replaceAll(",", ",");
+					String evaluateRuleNameStr = str[3].replaceAll(",", ",");
 					String[] evaluateRuleNames = evaluateRuleNameStr.split(",");
 					StringBuilder evaluateRuleIds = new StringBuilder();
 					StringBuilder binSections = new StringBuilder();
 					StringBuilder binStages = new StringBuilder();
 					for (String evaluateRuleName : evaluateRuleNames) {
-						EvaluateRule evaluateRule = evaluateRuleService.getEvaluateRuleByRuleName(evaluateRuleName, str[4]);
+						EvaluateRule evaluateRule = evaluateRuleService.getEvaluateRuleByRuleName(evaluateRuleName, str[5]);
 						if (null != evaluateRule) {
 							evaluateRuleIds.append(evaluateRule.getId());
 							binSections.append(evaluateRule.getBinSection());
 							binStages.append(evaluateRule.getBinStage());
 						}
 					}
-					OrganizationEvaluationRule obj = this.checkForExistence(str[0], toFullSpell(str[1]), binStages.toString(), binSections.toString(), str[4]);
+					OrganizationEvaluationRule obj = this.checkForExistence(str[0], toFullSpell(str[2]), binStages.toString(), binSections.toString(), str[5]);
 					if (null != obj) {
 						organizationEvaluationRule.setId(obj.getId());
 						organizationEvaluationRule.setScjyWeight(Double.parseDouble(str[6]));
@@ -469,20 +469,20 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
 							organizationEvaluationRule.setBusinessType(organizationStructure.getBusinessType());
 						}
 						organizationEvaluationRule.setOrganizationType("DWKP");
-						organizationEvaluationRule.setEvaluationCycle(toFullSpell(str[1]));
+						organizationEvaluationRule.setEvaluationCycle(toFullSpell(str[2]));
 						organizationEvaluationRule.setEvaluateRuleId(evaluateRuleIds.toString());
 						organizationEvaluationRule.setBinSection(binSections.toString());
 						organizationEvaluationRule.setBinStage(binStages.toString());
 						organizationEvaluationRule.setDelFlag(false);
-						if ("是".equals(str[3])) {
+						if ("是".equals(str[4])) {
 							organizationEvaluationRule.setIsCheck(true);
-						} else if ("否".equals(str[3])) {
+						} else if ("否".equals(str[4])) {
 							organizationEvaluationRule.setIsCheck(false);
 						}
-						organizationEvaluationRule.setScjyWeight(Double.parseDouble(str[5]));
-						organizationEvaluationRule.setQqWeight(Double.parseDouble(str[6]));
-						organizationEvaluationRule.setJjWeight(Double.parseDouble(str[7]));
-						organizationEvaluationRule.setYear(str[4]);
+						organizationEvaluationRule.setScjyWeight(Double.parseDouble(str[6]));
+						organizationEvaluationRule.setQqWeight(Double.parseDouble(str[7]));
+						organizationEvaluationRule.setJjWeight(Double.parseDouble(str[8]));
+						organizationEvaluationRule.setYear(str[5]);
 						organizationEvaluationRuleListSa.add(organizationEvaluationRule);
 					}
 				}
@@ -501,10 +501,10 @@ public class OrganizationEvaluationRuleServiceImpl extends ServiceImpl<Organizat
 	}
 
 	@Override
-	public OrganizationEvaluationRule checkForExistence(String organizationName, String evaluationCycle, String binStage, String binSection, String year) {
+	public OrganizationEvaluationRule checkForExistence(String organizationId, String evaluationCycle, String binStage, String binSection, String year) {
 		QueryWrapper<OrganizationEvaluationRule> qw = new QueryWrapper<>();
-		if (StringUtils.isNotEmpty(organizationName)) {
-			qw.lambda().eq(OrganizationEvaluationRule::getOrganizationName, organizationName);
+		if (StringUtils.isNotEmpty(organizationId)) {
+			qw.lambda().eq(OrganizationEvaluationRule::getOrganizationId, organizationId);
 		}
 		if (StringUtils.isNotEmpty(evaluationCycle)) {
 			qw.lambda().eq(OrganizationEvaluationRule::getEvaluationCycle, evaluationCycle);