|
@@ -154,7 +154,8 @@ public class QhseVisitorManagementServiceImpl extends ServiceImpl<QhseVisitorMan
|
|
|
private static final String[] CODES ={
|
|
|
"role103", //部门安全主任
|
|
|
"role068", //部门经理
|
|
|
- "role084" //安监部(应急办)
|
|
|
+ "role084", //安监部(应急办)
|
|
|
+ "role112" //培训管理员
|
|
|
};
|
|
|
|
|
|
|
|
@@ -172,8 +173,13 @@ public class QhseVisitorManagementServiceImpl extends ServiceImpl<QhseVisitorMan
|
|
|
// //1.获取一级部门ID
|
|
|
String firstDeptId = getFitstDeptId(qhseVisitorManagementDo.getVisiteddepartmentid());
|
|
|
|
|
|
+ //技服访客 +需要查询培训管理员
|
|
|
+ String code ="-null";
|
|
|
+ if(qhseVisitorManagementDo.getVisitorcategory().equals("2")){
|
|
|
+ code=CODES[3];
|
|
|
+ }
|
|
|
//2. 获取对应的部门安全主管,部门经理,安监部
|
|
|
- List<Map<String, String>> userByCodes = qhseVisitorManagementDao.getUserByCodes(firstDeptId, CODES[0], CODES[1], CODES[2]);
|
|
|
+ List<Map<String, String>> userByCodes = qhseVisitorManagementDao.getUserByCodes(firstDeptId, CODES[0], CODES[1], CODES[2],code);
|
|
|
userByCodes.forEach(map -> {
|
|
|
if ( map.get("code").equals(CODES[0])){
|
|
|
qhseVisitorManagementDo.setDepartmentsafesupervisorid( map.get("ids"));
|