员工字段不可重复
This commit is contained in:
parent
3363120c44
commit
ff88b1f9ca
|
|
@ -0,0 +1,10 @@
|
|||
--过滤入职日期大于薪资周期的
|
||||
|
||||
|
||||
select e.companystartdate
|
||||
from hrmresource e
|
||||
left join hrmdepartment d on e.departmentid = d.id
|
||||
left join hrmjobtitles c on e.jobtitle = c.id
|
||||
WHERE e.status in (0,1,2,3) and (e.accounttype is null or e.accounttype = 0)
|
||||
and e.subcompanyid1 IN (1)
|
||||
ORDER BY e.companystartdate desc
|
||||
|
|
@ -158,14 +158,25 @@ public class SalarySobItemServiceImpl extends Service implements SalarySobItemSe
|
|||
|
||||
ValidUtil.doValidator(saveParam);
|
||||
|
||||
//1、账套存在
|
||||
//账套存在
|
||||
Long salarySobId = saveParam.getSalarySobId();
|
||||
SalarySobPO salarySobPO = salarySobBiz.getById(salarySobId);
|
||||
if (Objects.isNull(salarySobPO)) {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98379, "参数错误,薪资账套不存在或者已被删除"));
|
||||
}
|
||||
|
||||
// todo 2、分类名称唯一
|
||||
//员工信息字段不可重复
|
||||
List<SalarySobItemSaveParam.SalarySobEmpFieldParam> empFields = saveParam.getEmpFields();
|
||||
if(CollectionUtils.isNotEmpty(empFields)){
|
||||
int count = (int)SalaryEntityUtil.properties(empFields, SalarySobItemSaveParam.SalarySobEmpFieldParam::getFieldId).stream().distinct().count();
|
||||
if(count < empFields.size()){
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98379, "分类名称重复!"));
|
||||
}
|
||||
}else {
|
||||
throw new SalaryRunTimeException(SalaryI18nUtil.getI18nLabel(98379, "员工信息不能为空!"));
|
||||
}
|
||||
|
||||
//分类名称唯一
|
||||
List<SalarySobItemSaveParam.SalarySobItemGroupParam> itemGroups = saveParam.getItemGroups();
|
||||
if(CollectionUtils.isNotEmpty(itemGroups)){
|
||||
int count = (int)SalaryEntityUtil.properties(itemGroups, SalarySobItemSaveParam.SalarySobItemGroupParam::getName).stream().distinct().count();
|
||||
|
|
|
|||
Loading…
Reference in New Issue