|
@@ -44,6 +44,7 @@ import static com.rongwei.safecommon.utils.SaveConstans.FileName.PLANNING_TASK_F
|
|
|
import static com.rongwei.safecommon.utils.SaveConstans.NotifyContent.*;
|
|
|
import static com.rongwei.safecommon.utils.SaveConstans.NotifyTitle.*;
|
|
|
import static com.rongwei.safecommon.utils.SaveConstans.NotifyType.*;
|
|
|
+import static com.rongwei.safecommon.utils.SaveConstans.RoleCode.*;
|
|
|
|
|
|
/**
|
|
|
* @author shangmi
|
|
@@ -250,8 +251,8 @@ public class EquipmentSendNotifyServiceImpl implements EquipmentSendNotifyServic
|
|
|
|
|
|
// 发送人
|
|
|
List<String> userId;
|
|
|
- List<String> useDeptRoleUserIds = commonDao.getRoleUserIds("'车间主任','车间维修主管','车间保养主管'", "so.ID='" + aspCheckItems.getUsedeptid() + "'");
|
|
|
- List<String> factoryRoleUserIds = commonDao.getRoleUserIds("'设备部部门长'", "(so.FULLPID like '," + aspCheckItems.getTenantid() + "%' or so.ID='" + aspCheckItems.getTenantid() + "')");
|
|
|
+ List<String> useDeptRoleUserIds = commonDao.getRoleUserIds("'lczg','wms','role054'", "so.ID='" + aspCheckItems.getUsedeptid() + "'");
|
|
|
+ List<String> factoryRoleUserIds = commonDao.getRoleUserIds("'hoed'", "(so.FULLPID like '," + aspCheckItems.getTenantid() + "%' or so.ID='" + aspCheckItems.getTenantid() + "')");
|
|
|
if (useDeptRoleUserIds.size() > 0 && factoryRoleUserIds.size() > 0) {
|
|
|
userId = Stream.of(useDeptRoleUserIds, factoryRoleUserIds).flatMap(Collection::stream).distinct().collect(Collectors.toList());
|
|
|
} else if (useDeptRoleUserIds.size() == 0) {
|
|
@@ -290,8 +291,8 @@ public class EquipmentSendNotifyServiceImpl implements EquipmentSendNotifyServic
|
|
|
|
|
|
// 发送人
|
|
|
List<String> userId;
|
|
|
- List<String> useDeptRoleUserIds = commonDao.getRoleUserIds("'车间主任','车间维修主管'", "so.ID='" + equMaintenanceOrderDo.getWorkshopid() + "'");
|
|
|
- List<String> factoryRoleUserIds = commonDao.getRoleUserIds("'设备部部门长','设备部维修主管'", "(so.FULLPID like '," + equMaintenanceOrderDo.getTenantid() + "%' or so.ID='" + equMaintenanceOrderDo.getTenantid() + "')");
|
|
|
+ List<String> useDeptRoleUserIds = commonDao.getRoleUserIds("'lczg','wms'", "so.ID='" + equMaintenanceOrderDo.getWorkshopid() + "'");
|
|
|
+ List<String> factoryRoleUserIds = commonDao.getRoleUserIds("'hoed','edms'", "(so.FULLPID like '," + equMaintenanceOrderDo.getTenantid() + "%' or so.ID='" + equMaintenanceOrderDo.getTenantid() + "')");
|
|
|
if (useDeptRoleUserIds.size() > 0 && factoryRoleUserIds.size() > 0) {
|
|
|
userId = Stream.of(useDeptRoleUserIds, factoryRoleUserIds).flatMap(Collection::stream).distinct().collect(Collectors.toList());
|
|
|
} else if (useDeptRoleUserIds.size() == 0) {
|
|
@@ -333,7 +334,7 @@ public class EquipmentSendNotifyServiceImpl implements EquipmentSendNotifyServic
|
|
|
|
|
|
// 3.消息提醒
|
|
|
// 3.1发送人 取车间维修主管、设备部部长、设备部维修主管 角色中所有人员
|
|
|
- List<String> userId = equMaintenanceOrderService.selectRoleList();
|
|
|
+ List<String> userId = equMaintenanceOrderService.selectRoleList(Arrays.asList(WMS,EDMS, EDMS));
|
|
|
if (userId.isEmpty()) {
|
|
|
log.info("车间维修主管、设备部部长、设备部维修主管角色无提醒人");
|
|
|
return R.ok();
|
|
@@ -595,11 +596,11 @@ public class EquipmentSendNotifyServiceImpl implements EquipmentSendNotifyServic
|
|
|
}
|
|
|
// 需接收提醒用户ID
|
|
|
List<String> userIds = commonDao.getRoleUserIds(
|
|
|
- "'车间主任','车间保养主管'", "so.ID IN (" + stringBuilder + ")"
|
|
|
+ "'lczg','role054'", "so.ID IN (" + stringBuilder + ")"
|
|
|
);
|
|
|
userIds.addAll(
|
|
|
commonDao.getRoleUserIds(
|
|
|
- "'设备部部门长','设备部保养主管'", "(so.FULLPID like '," + plantId + "%' or so.ID='" + plantId + "')"
|
|
|
+ "'hoed','equ_byzg'", "(so.FULLPID like '," + plantId + "%' or so.ID='" + plantId + "')"
|
|
|
)
|
|
|
);
|
|
|
|