Commit 0c550a1b authored by hongguangwu's avatar hongguangwu

MVP1.6.10工资相关

parent 6b6d6b53
...@@ -947,11 +947,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand ...@@ -947,11 +947,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
if (Common.isEmpty(rule)) { if (Common.isEmpty(rule)) {
rule = "等于"; rule = "等于";
} }
switch (rule) { isError = this.judgeRule(titleStr, key, rule);
case "等于" : isError = !titleStr.equals(key); break;
case "包含" : isError = !titleStr.contains(key); break;
default: isError = !titleStr.equals(key); break;
}
if (isError && isOther) { if (isError && isOther) {
return R.failed("未找到对应配置的表头,请核实导入的原表信息后,重新尝试!!"); return R.failed("未找到对应配置的表头,请核实导入的原表信息后,重新尝试!!");
} }
...@@ -965,11 +961,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand ...@@ -965,11 +961,7 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
if (Common.isEmpty(rule)) { if (Common.isEmpty(rule)) {
rule = "等于"; rule = "等于";
} }
switch (rule) { isFixError = this.judgeRule(titleStr, key, rule);
case "等于" : isFixError = !titleStr.equals(key); break;
case "包含" : isFixError = !titleStr.contains(key); break;
default: isFixError = !titleStr.equals(key); break;
}
// 表示匹配到了 // 表示匹配到了
if (!isFixError) { if (!isFixError) {
curValue = curMap.get(key); curValue = curMap.get(key);
...@@ -1097,6 +1089,25 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand ...@@ -1097,6 +1089,25 @@ public class TSalaryStandardOriginalServiceImpl extends ServiceImpl<TSalaryStand
return R.failed("无法识别数据!请联系管理员!"); return R.failed("无法识别数据!请联系管理员!");
} }
/**
* @param titleStr Excel表头
* @param key 关键字
* @param rule 规则,汉字:等于、包含
* @Description: 判断关键字是否正确
* @Author: hgw
* @Date: 2024/9/13 17:35
* @return: boolean
**/
private boolean judgeRule(String titleStr, String key, String rule) {
boolean isFixError;
switch (rule) {
case "等于" : isFixError = !titleStr.equals(key); break;
case "包含" : isFixError = !titleStr.contains(key); break;
default: isFixError = !titleStr.equals(key); break;
}
return isFixError;
}
/** /**
* @Description: 薪资原表配置导出 * @Description: 薪资原表配置导出
* @Author: hgw * @Author: hgw
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment