2022.3.29 工作日志 科研指标导入负责人编码,负责人验证
作者:互联网
//项目负责人
String [] deptManagers =quota.getDeptManager().split(",");
//项目负责人编码
String [] managerCodes =quota.getDeptManagerId().split(",");
String deptManagerIds = "";
String sql = "select * from sys_user where ORG_ID in (select ORG_ID from sys_user_org where USER_ID='"+userInfo2.getUserId()+"')";
List<Map<String, Object>> listManager = quotaScientificDao.findListMapBySql(sql);
if(CommonUtil.isNotEmpty(listManager)){
for (String managerCode : managerCodes) {
boolean isExist=true;
for (Map<String, Object> map1 : listManager) {
if(managerCode.equals(map1.get("CODE"))){
isExist=false;
if(CommonUtil.isNotEmpty(map1)){
for (String manager : deptManagers) {
if (manager.equals(map1.get("NAME"))){
String deptManagerId=String.valueOf(map1.get("ID"));
if("".equals(deptManagerIds)){
deptManagerIds = deptManagerId;
}else{
deptManagerIds = deptManagerIds +","+ deptManagerId;
}
}
}
quota.setDeptManagerId(deptManagerIds);
}
break;
}
}
if(isExist){
flagsave = false;
msg_wrong = "录入项目负责人编码有误,没有在系统用户中查询到此编码,请检查:" + managerCode+" ";
vmsg += msg_wrong;
iserror = true;
}
}
}
标签:负责人,String,deptManagerIds,29,ID,managerCode,equals,map1,2022.3 来源: https://www.cnblogs.com/fmjawl/p/16075380.html