|
@@ -190,15 +190,16 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
|
public void checkParam(BizAppointmentRecordAddParam bizAppointmentRecordAddParam){
|
|
|
//校验车牌号
|
|
|
if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getLicenseNumber())){
|
|
|
- if(!isCarNumber(bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim())){
|
|
|
- throw new CommonException("车牌号:{}格式错误",bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
|
|
|
+ bizAppointmentRecordAddParam.setLicenseNumber(bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
|
|
|
+ if(!isCarNumber(bizAppointmentRecordAddParam.getLicenseNumber())){
|
|
|
+ //throw new CommonException("车牌号:{}格式错误",bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
|
|
|
}
|
|
|
//校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核 、 14:已取消
|
|
|
long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
|
- eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim()).
|
|
|
+ eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordAddParam.getLicenseNumber()).
|
|
|
notIn(BizAppointmentRecord::getStatus, "11", "13", "14","15"));
|
|
|
if(count>0){
|
|
|
- throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
|
|
|
+ throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber());
|
|
|
}
|
|
|
}
|
|
|
//校验手机号
|
|
@@ -245,17 +246,18 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
|
public void checkParam(BizAppointmentRecordEditParam bizAppointmentRecordEditParam,BizAppointmentRecord bizAppointmentRecord){
|
|
|
//校验车牌号
|
|
|
if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getLicenseNumber())){
|
|
|
- if(!StringUtils.equals(bizAppointmentRecord.getLicenseNumber(),bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim())){
|
|
|
+ bizAppointmentRecordEditParam.setLicenseNumber(bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
|
|
|
+ if(!StringUtils.equals(bizAppointmentRecord.getLicenseNumber(),bizAppointmentRecordEditParam.getLicenseNumber())){
|
|
|
//车牌号修改过
|
|
|
- if(!isCarNumber(bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim())){
|
|
|
- throw new CommonException("车牌号:{}格式错误",bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
|
|
|
+ if(!isCarNumber(bizAppointmentRecordEditParam.getLicenseNumber())){
|
|
|
+ //throw new CommonException("车牌号:{}格式错误",bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
|
|
|
}
|
|
|
//校验车牌号是否添加过预约,排除11:已签收、 13:销售已审核 、 14:已取消
|
|
|
long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
|
- eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim()).
|
|
|
+ eq(BizAppointmentRecord::getLicenseNumber,bizAppointmentRecordEditParam.getLicenseNumber()).
|
|
|
notIn(BizAppointmentRecord::getStatus, "11", "13", "14","15"));
|
|
|
if(count>0){
|
|
|
- throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
|
|
|
+ throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber());
|
|
|
}
|
|
|
}
|
|
|
}
|