Commit ae9c9c11 authored by huyuchen's avatar huyuchen

huyc 项目档案代码提交

parent 57e8b86f
...@@ -20,6 +20,7 @@ import com.alibaba.excel.annotation.ExcelProperty; ...@@ -20,6 +20,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past; import javax.validation.constraints.Past;
import java.io.Serializable; import java.io.Serializable;
...@@ -41,6 +42,7 @@ public class EmployeeProjectVO implements Serializable { ...@@ -41,6 +42,7 @@ public class EmployeeProjectVO implements Serializable {
* 员工类型(字典值,0外包1派遣2代理) * 员工类型(字典值,0外包1派遣2代理)
*/ */
@NotNull(message = "员工类型不能为空") @NotNull(message = "员工类型不能为空")
@Max(value = 1,message = "最大长度不能超过1位")
@ExcelProperty(value ="员工类型") @ExcelProperty(value ="员工类型")
private String empNatrue; private String empNatrue;
......
...@@ -416,7 +416,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -416,7 +416,7 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
list = baseMapper.selectList(Wrappers.<TEmployeeProject>query().lambda().in(TEmployeeProject::getId, idsList)); list = baseMapper.selectList(Wrappers.<TEmployeeProject>query().lambda().in(TEmployeeProject::getId, idsList));
} }
if(Common.isNotEmpty(list)) { if(Common.isNotEmpty(list)) {
int i = 1; int i = 0;
for (TEmployeeProject delProject : list) { for (TEmployeeProject delProject : list) {
++i; ++i;
Set<String> errorMsg = new HashSet<>(); Set<String> errorMsg = new HashSet<>();
...@@ -426,9 +426,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -426,9 +426,6 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
baseMapper.updateById(delProject); baseMapper.updateById(delProject);
}else { }else {
errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_FAMILY_NAME_EXISTING)); errorMsg.add(MsgUtils.getMessage(ErrorCodes.ARCHIVES_EMP_FAMILY_NAME_EXISTING));
continue;
}
if (!CollUtil.isEmpty(errorMsg)) {
errorList.add(new ErrorMessage((long) i, errorMsg)); errorList.add(new ErrorMessage((long) i, errorMsg));
} }
} catch (Exception e) { } catch (Exception e) {
...@@ -438,7 +435,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap ...@@ -438,7 +435,10 @@ public class TEmployeeProjectServiceImpl extends ServiceImpl<TEmployeeProjectMap
} }
} }
} }
return null; if (CollUtil.isNotEmpty(errorList)) {
return R.failed(errorList);
}
return R.ok();
} }
/** /**
......
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