|
@@ -92,8 +92,9 @@ public class ShiftConfigurationController extends JeecgController<ShiftConfigura
|
|
// 参数校验
|
|
// 参数校验
|
|
if (shiftConfiguration.getDate() == null ||
|
|
if (shiftConfiguration.getDate() == null ||
|
|
StrUtil.isBlank(shiftConfiguration.getShift()) ||
|
|
StrUtil.isBlank(shiftConfiguration.getShift()) ||
|
|
- StrUtil.isBlank(shiftConfiguration.getShiftGroup())) {
|
|
|
|
- return Result.error("班次日期、班别、班组不能为空!");
|
|
|
|
|
|
+ StrUtil.isBlank(shiftConfiguration.getShiftGroup()) ||
|
|
|
|
+ StrUtil.isBlank(shiftConfiguration.getCcmNo())) {
|
|
|
|
+ return Result.error("班次日期、班别、班组、铸机号不能为空!");
|
|
}
|
|
}
|
|
|
|
|
|
Date shiftDate = shiftConfiguration.getDate();
|
|
Date shiftDate = shiftConfiguration.getDate();
|
|
@@ -116,11 +117,12 @@ public class ShiftConfigurationController extends JeecgController<ShiftConfigura
|
|
LambdaQueryWrapper<ShiftConfiguration> queryWrapper = new LambdaQueryWrapper<>();
|
|
LambdaQueryWrapper<ShiftConfiguration> queryWrapper = new LambdaQueryWrapper<>();
|
|
queryWrapper.between(ShiftConfiguration::getDate, start, end)
|
|
queryWrapper.between(ShiftConfiguration::getDate, start, end)
|
|
.eq(ShiftConfiguration::getShift, shift)
|
|
.eq(ShiftConfiguration::getShift, shift)
|
|
- .eq(ShiftConfiguration::getShiftGroup, shiftGroup);
|
|
|
|
|
|
+ .eq(ShiftConfiguration::getShiftGroup, shiftGroup)
|
|
|
|
+ .eq(ShiftConfiguration::getCcmNo, shiftConfiguration.getCcmNo());
|
|
|
|
|
|
boolean exists = shiftConfigurationService.count(queryWrapper) > 0;
|
|
boolean exists = shiftConfigurationService.count(queryWrapper) > 0;
|
|
if (exists) {
|
|
if (exists) {
|
|
- return Result.error("该班别和班组在当天已存在,不能重复添加!");
|
|
|
|
|
|
+ return Result.error("该铸机号下的班别和班组在当天已存在,不能重复添加!");
|
|
}
|
|
}
|
|
|
|
|
|
shiftConfigurationService.save(shiftConfiguration);
|
|
shiftConfigurationService.save(shiftConfiguration);
|