【同步】BOOT 和 CLOUD 的功能(mes)
parent
9d2392a81a
commit
1e14c5c38f
|
|
@ -95,7 +95,7 @@ public class MesCalTeamMemberServiceImpl implements MesCalTeamMemberService {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void validateUserExists(Long userId) {
|
private void validateUserExists(Long userId) {
|
||||||
if (adminUserApi.getUser(userId) == null) {
|
if (adminUserApi.getUser(userId).getCheckedData() == null) {
|
||||||
throw exception(CAL_TEAM_MEMBER_USER_NOT_EXISTS);
|
throw exception(CAL_TEAM_MEMBER_USER_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ public class MesMdWorkstationWorkerServiceImpl implements MesMdWorkstationWorker
|
||||||
|
|
||||||
private void validateWorkstationWorkerSaveData(Long id, MesMdWorkstationWorkerSaveReqVO reqVO) {
|
private void validateWorkstationWorkerSaveData(Long id, MesMdWorkstationWorkerSaveReqVO reqVO) {
|
||||||
// 校验岗位是否存在
|
// 校验岗位是否存在
|
||||||
postApi.validPostList(Collections.singleton(reqVO.getPostId()));
|
postApi.validPostList(Collections.singleton(reqVO.getPostId())).getCheckedData();
|
||||||
// 校验同一工作站下岗位不重复(排除自身)
|
// 校验同一工作站下岗位不重复(排除自身)
|
||||||
MesMdWorkstationWorkerDO existing = workstationWorkerMapper.selectByWorkstationIdAndPostId(
|
MesMdWorkstationWorkerDO existing = workstationWorkerMapper.selectByWorkstationIdAndPostId(
|
||||||
reqVO.getWorkstationId(), reqVO.getPostId());
|
reqVO.getWorkstationId(), reqVO.getPostId());
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ public class MesProAndonConfigServiceImpl implements MesProAndonConfigService {
|
||||||
adminUserApi.validateUser(reqVO.getHandlerUserId());
|
adminUserApi.validateUser(reqVO.getHandlerUserId());
|
||||||
}
|
}
|
||||||
if (reqVO.getHandlerRoleId() != null) {
|
if (reqVO.getHandlerRoleId() != null) {
|
||||||
roleApi.validRoleList(Collections.singleton(reqVO.getHandlerRoleId()));
|
roleApi.validRoleList(Collections.singleton(reqVO.getHandlerRoleId())).getCheckedData();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ public interface AdminUserApi extends AutoTransable<AdminUserRespDTO> {
|
||||||
* @param id 用户编号
|
* @param id 用户编号
|
||||||
*/
|
*/
|
||||||
default void validateUser(Long id) {
|
default void validateUser(Long id) {
|
||||||
validateUserList(Collections.singleton(id));
|
validateUserList(Collections.singleton(id)).getCheckedData();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(PREFIX + "/valid")
|
@GetMapping(PREFIX + "/valid")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue