diff --git a/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java b/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java index 86e112fe..8f865297 100644 --- a/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java +++ b/zc-business/src/main/java/com/zc/business/enums/UniversalEnum.java @@ -2503,14 +2503,17 @@ public enum UniversalEnum { // 手机号为空 THE_PHONE_NUMBER_IS_EMPTY(0, "手机号为空"), + // 姓名为空 + Name_Is_Empty_IS_EMPTY(0, "姓名为空"), + // 请检查数据是否重复,或存在空值 CHECK_WHETHER_THE_DATA_IS_DUPLICATED_OR_HAS_NULL_VALUES(0, "请检查数据是否重复,或存在空值"), // 排版信息为空 - THE_LAYOUT_INFORMATION_IS_EMPTY(0, "排版信息为空"), + THE_LAYOUT_INFORMATION_IS_EMPTY(0, "排班信息为空"), // 排版格式不正确 - THE_FORMATTING_IS_INCORRECT(0, "排版格式不正确,请重新输入"), + THE_FORMATTING_IS_INCORRECT(0, "排班格式不正确,请重新输入"), // 事件id为空 THE_EVENT_ID_IS_NULL(0, "事件id为空"), diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcShiftsServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcShiftsServiceImpl.java index 4e380bdb..5766dd39 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcShiftsServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcShiftsServiceImpl.java @@ -295,6 +295,10 @@ public class DcShiftsServiceImpl implements IDcShiftsService for (int i = UniversalEnum.ZERO.getNumber(); i < equipmentList.size(); i++) { DcShifts dcShifts = equipmentList.get(i);//获取第i条全部的数据,转换给实体类 String name = dcShifts.getName(); + if (name == null || name.equals(UniversalEnum.EMPTY_STRING.getValue())){ + msg = UniversalEnum.Name_Is_Empty_IS_EMPTY.getValue(); + throw new ServiceException(msg); + } String contactNumber = dcShifts.getContactNumber();//手机号 String organizationName = dcShifts.getOrganizationName();//驻点 String scheduling = dcShifts.getScheduling();//排班