|
|
@ -78,24 +78,65 @@ public class HuzhouUserprojectServiceImpl extends ServiceImpl<HuzhouUserprojectM |
|
|
|
this.save(huzhouUserproject); |
|
|
|
} |
|
|
|
} |
|
|
|
//添加上级指导室负责人
|
|
|
|
String superLeader = projectinfo.getSuperLeader(); |
|
|
|
SysDict dict = sysDictService.getDictByCode("superLeader", superLeader); |
|
|
|
String dictName = dict.getName(); |
|
|
|
//上级指导室中文名称查询角色有哪些人
|
|
|
|
List<HashMap<String, String>> userDictByRoles = sysUserService.getUserDictByRoles(dictName); |
|
|
|
ArrayList<String> strings = new ArrayList<>(); |
|
|
|
if(userDictByRoles==null||userDictByRoles.size()==0){ |
|
|
|
String error = "任务牵头处室"+dictName+"负责人未找到"; |
|
|
|
throw new EasyException(error); |
|
|
|
} |
|
|
|
userDictByRoles.forEach(item->{ |
|
|
|
String value = item.get("value"); |
|
|
|
for (HashMap<String, String> map:userDictByRoles |
|
|
|
) { |
|
|
|
String value = map.get("value"); |
|
|
|
HuzhouUserproject huzhouUserproject = new HuzhouUserproject(); |
|
|
|
huzhouUserproject.setProjectId(projectinfo.getId()); |
|
|
|
huzhouUserproject.setUserId(value); |
|
|
|
huzhouUserproject.setIssubproject(issubproject); |
|
|
|
this.save(huzhouUserproject); |
|
|
|
}); |
|
|
|
} |
|
|
|
//添加信息化保障团队负责人
|
|
|
|
String adminDivision = projectinfo.getAdminDivision(); |
|
|
|
if(null!=adminDivision){ |
|
|
|
if("市本级".equals(adminDivision)){ |
|
|
|
//是市本级,判读责任单位
|
|
|
|
String dutyWorkplace = projectinfo.getDutyWorkplace(); |
|
|
|
if(null!=dutyWorkplace){ |
|
|
|
if(dutyWorkplace.contains("湖州市中心医院")){ |
|
|
|
//是湖州市中心医院 则由吴兴区负责人审批
|
|
|
|
adminDivision="吴兴区"; |
|
|
|
}else if(dutyWorkplace.contains("湖州市第一人民医院")){ |
|
|
|
//是湖州市第一人民医院,则有南浔区负责人审批
|
|
|
|
adminDivision="南浔区"; |
|
|
|
}else if(dutyWorkplace.contains("湖州市第三人民医院")){ |
|
|
|
//是湖州市第三人民医院,则有德清县负责人审批
|
|
|
|
adminDivision="德清县"; |
|
|
|
}else if(dutyWorkplace.contains("湖州市妇幼保健院")){ |
|
|
|
adminDivision="安吉县"; |
|
|
|
}else if(dutyWorkplace.contains("湖州市中医院")){ |
|
|
|
adminDivision="长兴县"; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
//行政区县名称查询角色有哪些人
|
|
|
|
userDictByRoles = userService.getUserDictByRoles(adminDivision); |
|
|
|
if(userDictByRoles==null||userDictByRoles.size()==0){ |
|
|
|
String error = "信息化保障团队"+adminDivision+"负责人未找到"; |
|
|
|
throw new EasyException(error); |
|
|
|
} |
|
|
|
for (HashMap<String, String> map:userDictByRoles |
|
|
|
) { |
|
|
|
String value = map.get("value"); |
|
|
|
HuzhouUserproject huzhouUserproject = new HuzhouUserproject(); |
|
|
|
huzhouUserproject.setProjectId(projectinfo.getId()); |
|
|
|
huzhouUserproject.setUserId(value); |
|
|
|
huzhouUserproject.setIssubproject(issubproject); |
|
|
|
this.save(huzhouUserproject); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
@ -120,13 +161,16 @@ public class HuzhouUserprojectServiceImpl extends ServiceImpl<HuzhouUserprojectM |
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public Page<Map> getMyAddressBook(Integer pageNo, Integer pageSize) { |
|
|
|
public Page<Map> getMyAddressBook(Integer pageNo, Integer pageSize,HashMap<String,Object> map) { |
|
|
|
|
|
|
|
Page sysUserPage = new Page<SysUser>(pageNo,pageSize); |
|
|
|
HuzhouProjectinfo huzhouProjectinfo = new HuzhouProjectinfo(); |
|
|
|
ProjectInfoAuthSelect projectInfoAuthSelect = CommonUtils.setGetProjectInfoAuth(huzhouProjectinfo); |
|
|
|
SysUser currentUser = ShiroUtil.getCurrentUser(); |
|
|
|
String id = currentUser.getId(); |
|
|
|
map.put("currentUserId",id);//排除当前人员信息
|
|
|
|
Page<Map> myAddressBook = userprojectMapper.getMyAddressBook(sysUserPage, projectInfoAuthSelect,map); |
|
|
|
|
|
|
|
Page<Map> myAddressBook = userprojectMapper.getMyAddressBook(sysUserPage, projectInfoAuthSelect); |
|
|
|
|
|
|
|
return myAddressBook; |
|
|
|
} |
|
|
|