[修改] 用户模板导入

This commit is contained in:
bupengxiang
2023-05-17 11:24:12 +08:00
parent 41f3aec37e
commit b5b48c16c2
4 changed files with 15 additions and 17 deletions
@@ -114,14 +114,15 @@ public class UserEOServiceImpl implements IUserEoService {
userRoleEO.setRoleId(c);
userRoleEODao.insert(userRoleEO);
});
String[] split = eo.getOrgId().split(",");
// 插入组织关联表 暂时用不上,页面不维护组织机构
for (String s : split) {
UserOrgEO userOrgEO = new UserOrgEO();
userOrgEO.setUserId(eo.getUsid());
userOrgEO.setOrgId(s);
userOrgEODao.insert(userOrgEO);
if (StringUtils.isNotEmpty(eo.getOrgId())){
String[] split = eo.getOrgId().split(",");
// 插入组织关联表 暂时用不上,页面不维护组织机构
for (String s : split) {
UserOrgEO userOrgEO = new UserOrgEO();
userOrgEO.setUserId(eo.getUsid());
userOrgEO.setOrgId(s);
userOrgEODao.insert(userOrgEO);
}
}
}
@@ -387,9 +388,9 @@ public class UserEOServiceImpl implements IUserEoService {
if (StringUtils.isEmpty(userImportVO.getOperation())) {
throw new AdcDaBaseException(""+(i+1)+""+"操作(add添加、full覆盖角色)不能为空");
}
if (StringUtils.isEmpty(userImportVO.getIsUse())) {
throw new AdcDaBaseException(""+(i+1)+""+"是否启用不能为空");
}
// if (StringUtils.isEmpty(userImportVO.getIsUse())) {
// throw new AdcDaBaseException("第"+(i+1)+"行"+"是否启用不能为空");
// }
if (!roleEOMap.keySet().contains(userImportVO.getRoleName())) {
throw new AdcDaBaseException(""+(i+1)+""+"角色:" + userImportVO.getRoleName() + "不存在,请检查");
}
@@ -3,9 +3,6 @@ package com.adc.da.sys.vo;
import com.adc.da.excel.annotation.Excel;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
public class UserImportVO {
@@ -51,9 +48,8 @@ public class UserImportVO {
private String updateTime;
@Excel(name = "是否启用(0禁用、1启用)", width = 20)
private String isUse;
// @Excel(name = "是否启用(0禁用、1启用)", width = 20)
// private String isUse;
@Excel(name = "姓名", width = 20)
private String usname;
@@ -266,6 +266,7 @@
#{item.id}
</foreach>
and (u.level_id=5 or u.level_id=9) and u.employee_type_id = 1
and u.del_flag = 0
</where>
</select>