xzy-fix-薪资账套人员状态传参问题
This commit is contained in:
parent
e3a2a52ab8
commit
8c4050fe73
|
|
@ -3,6 +3,7 @@ package com.engine.salary.entity.salarysob.bo;
|
|||
import com.engine.salary.constant.SalaryDefaultTenantConstant;
|
||||
import com.engine.salary.entity.salarysob.param.SalarySobRangeSaveParam;
|
||||
import com.engine.salary.entity.salarysob.po.SalarySobRangePO;
|
||||
import com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum;
|
||||
import com.engine.salary.util.SalaryEntityUtil;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
|
@ -48,7 +49,8 @@ public class SalarySobRangeSaveBO {
|
|||
String key = saveParam.getIncludeType() + "-" + targetParam.getTargetType().getValue() + "-" + targetParam.getTargetId();
|
||||
if (salarySobRangeMap.containsKey(key)) {
|
||||
SalarySobRangePO salarySobRangePO = salarySobRangeMap.get(key);
|
||||
salarySobRangePO.setEmployeeStatus(saveParam.getEmployeeStatus().getValue());
|
||||
salarySobRangePO.setEmployeeStatuses(parseEnumListToStr(saveParam.getEmployeeStatus()));
|
||||
// salarySobRangePO.setEmployeeStatus(saveParam.getEmployeeStatus().getValue());
|
||||
salarySobRangePO.setUpdateTime(now);
|
||||
handleResult.getNeedUpdateSalarySobRanges().add(salarySobRangePO);
|
||||
continue;
|
||||
|
|
@ -57,7 +59,8 @@ public class SalarySobRangeSaveBO {
|
|||
.salarySobId(saveParam.getSalarySobId())
|
||||
.targetType(targetParam.getTargetType().getValue())
|
||||
.targetId(targetParam.getTargetId())
|
||||
.employeeStatus(saveParam.getEmployeeStatus().getValue())
|
||||
.employeeStatuses(parseEnumListToStr(saveParam.getEmployeeStatus()))
|
||||
// .employeeStatus(saveParam.getEmployeeStatus().getValue())
|
||||
.includeType(saveParam.getIncludeType())
|
||||
.creator(employeeId)
|
||||
.createTime(now)
|
||||
|
|
@ -86,4 +89,16 @@ public class SalarySobRangeSaveBO {
|
|||
*/
|
||||
private Collection<SalarySobRangePO> needInsertSalarySobRanges;
|
||||
}
|
||||
|
||||
public static String parseEnumListToStr(SalaryEmployeeStatusEnum[] salaryEmployeeStatusEnums){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i=0;i<salaryEmployeeStatusEnums.length;i++){
|
||||
sb.append(salaryEmployeeStatusEnums[i].getValue().toString());
|
||||
if(i+1 != salaryEmployeeStatusEnums.length){
|
||||
sb.append(",");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class SalarySobRangeSaveParam {
|
|||
|
||||
//员工状态
|
||||
@DataCheck(require = true, message = "员工状态不允许为空")
|
||||
private SalaryEmployeeStatusEnum employeeStatus;
|
||||
private SalaryEmployeeStatusEnum[] employeeStatus;
|
||||
|
||||
@Data
|
||||
//薪资账套人员范围保存参数中的对象
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import java.util.Objects;
|
|||
**/
|
||||
public enum SalaryEmployeeStatusEnum implements BaseEnum<Integer> {
|
||||
|
||||
ALL(10, "全部", 85155),
|
||||
// ALL(10, "全部", 85155),
|
||||
// //在职,对应人力资源表中状态,试用0,正式1,临时2,试用延期3
|
||||
// NORMAL(1, "试用,正式,临时,临时延期", 100120),
|
||||
// //离职老,对应人力资源表中状态,解雇4,离职5,退休6
|
||||
|
|
|
|||
|
|
@ -325,7 +325,7 @@
|
|||
|
||||
<insert id="batchInsert">
|
||||
INSERT INTO hrsa_salary_sob_range(salary_sob_id, target_type, target_id, employee_status, include_type,
|
||||
creator, create_time, update_time, delete_type, tenant_key)
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_statuses)
|
||||
VALUES
|
||||
<foreach collection="collection" item="item" separator=",">
|
||||
(
|
||||
|
|
@ -338,13 +338,14 @@
|
|||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey}
|
||||
#{item.tenantKey},
|
||||
#{item.employeeStatuses}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="oracle">
|
||||
INSERT INTO hrsa_salary_sob_range(salary_sob_id, target_type, target_id, employee_status, include_type,
|
||||
creator, create_time, update_time, delete_type, tenant_key)
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_statuses)
|
||||
|
||||
<foreach collection="collection" item="item" separator="union all">
|
||||
select
|
||||
|
|
@ -357,14 +358,15 @@
|
|||
#{item.createTime,jdbcType=DATE},
|
||||
#{item.updateTime,jdbcType=DATE},
|
||||
#{item.deleteType,jdbcType=INTEGER},
|
||||
#{item.tenantKey,jdbcType=VARCHAR}
|
||||
#{item.tenantKey,jdbcType=VARCHAR},
|
||||
#{item.employeeStatuses,jdbcType=VARCHAR}
|
||||
from dual
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchInsert" databaseId="sqlserver">
|
||||
<foreach collection="collection" item="item" separator=";">
|
||||
INSERT INTO hrsa_salary_sob_range( salary_sob_id, target_type, target_id, employee_status, include_type,
|
||||
creator, create_time, update_time, delete_type, tenant_key)
|
||||
creator, create_time, update_time, delete_type, tenant_key,employee_statuses)
|
||||
VALUES
|
||||
(
|
||||
#{item.salarySobId},
|
||||
|
|
@ -376,7 +378,8 @@
|
|||
#{item.createTime},
|
||||
#{item.updateTime},
|
||||
#{item.deleteType},
|
||||
#{item.tenantKey}
|
||||
#{item.tenantKey},
|
||||
#{item.employeeStatuses}
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
|
|||
Loading…
Reference in New Issue