mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
bug修改
This commit is contained in:
+1
@@ -180,6 +180,7 @@ public interface ErrorCodeConstants {
|
||||
//=========== 工序信息 1-002-028-000 ============
|
||||
ErrorCode PROCESS_NOT_EXISTS = new ErrorCode(1_002_028_000, "工序不存在");
|
||||
ErrorCode PROCESS_ID_IS_NULL = new ErrorCode(1_002_028_000, "工序ID填写错误不存在");
|
||||
ErrorCode PROCESS_STATUS_DISABLE = new ErrorCode(1_002_028_000, "工序状态以已禁用");
|
||||
|
||||
//=========== 工序组信息 1-002-029-000 ============
|
||||
ErrorCode PROCESS_GROUP_NOT_EXISTS = new ErrorCode(1_002_029_000, "工序组不存在");
|
||||
|
||||
+9
@@ -83,6 +83,8 @@ public class ProcessServiceImpl implements ProcessService {
|
||||
public void updateProcess(ProcessUserSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validateProcessExists(updateReqVO.getId());
|
||||
// 校验状态
|
||||
validateProcessStatus(updateReqVO.getId());
|
||||
ProcessDO updateProcess = BeanUtils.toBean(updateReqVO, ProcessDO.class);
|
||||
|
||||
processUserService.deleteProcessUserByProcess(updateReqVO.getId());
|
||||
@@ -123,6 +125,13 @@ public class ProcessServiceImpl implements ProcessService {
|
||||
}
|
||||
}
|
||||
|
||||
private void validateProcessStatus(Long id) {
|
||||
ProcessDO process = processMapper.selectById(id);
|
||||
if (process != null && process.getIsEnabled() == Boolean.FALSE) {
|
||||
throw exception(PROCESS_STATUS_DISABLE);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProcessUserRespVO getProcess(Long id) {
|
||||
// 校验存在
|
||||
|
||||
Reference in New Issue
Block a user