|
|
@ -302,6 +302,7 @@ public class DcShiftsServiceImpl implements IDcShiftsService |
|
|
|
String contactNumber = dcShifts.getContactNumber();//手机号
|
|
|
|
String organizationName = dcShifts.getOrganizationName();//驻点
|
|
|
|
String scheduling = dcShifts.getScheduling();//排班
|
|
|
|
Date date = dcShifts.getDate();//值班日期
|
|
|
|
if (contactNumber == null || contactNumber.equals(UniversalEnum.EMPTY_STRING.getValue())) { |
|
|
|
msg = UniversalEnum.THE_PHONE_NUMBER_IS_EMPTY.getValue(); |
|
|
|
throw new ServiceException(msg); |
|
|
@ -338,6 +339,10 @@ public class DcShiftsServiceImpl implements IDcShiftsService |
|
|
|
Long id = (Long) map.get("id"); |
|
|
|
dcShifts.setEmployeesId(id); |
|
|
|
dcShifts.setCreateTime(DateUtils.getNowDate()); |
|
|
|
DcShifts dcShiftsDay = dcShiftsMapper.selectDcShiftsDay(dcShifts);//查看值班是否存在
|
|
|
|
if (dcShiftsDay!=null){ //值班存在不在继续查询,执行下一个
|
|
|
|
continue; |
|
|
|
} |
|
|
|
int shifts = dcShiftsMapper.insertDcShifts(dcShifts); |
|
|
|
if (shifts == UniversalEnum.ZERO.getNumber()) { |
|
|
|
msg = "添加值班信息‘" + dcShifts.getName() + "’失败,请检查后重新导入"; |
|
|
|