|
@@ -15,24 +15,35 @@ package vip.xiaonuo.biz.modular.bizappointmentrecord.service.impl;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import cn.hutool.core.collection.CollStreamUtil;
|
|
import cn.hutool.core.collection.CollStreamUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
+import cn.hutool.core.util.PhoneUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
|
+import com.fhs.trans.service.impl.TransService;
|
|
|
|
+import jakarta.annotation.Resource;
|
|
|
|
+import jakarta.servlet.http.HttpServletResponse;
|
|
|
|
+import org.apache.commons.compress.utils.Lists;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
+import vip.xiaonuo.biz.modular.bizappointmentrecord.param.*;
|
|
|
|
+import vip.xiaonuo.biz.modular.bizappointmenttime.entity.BizAppointmentTime;
|
|
|
|
+import vip.xiaonuo.biz.modular.bizappointmenttime.service.BizAppointmentTimeService;
|
|
|
|
+import vip.xiaonuo.biz.modular.bizconfig.entity.BizConfig;
|
|
|
|
+import vip.xiaonuo.biz.modular.bizconfig.service.BizConfigService;
|
|
|
|
+import vip.xiaonuo.biz.modular.bizorder.param.BizOrderExportResult;
|
|
|
|
+import vip.xiaonuo.biz.modular.utils.CommonExportUtil;
|
|
import vip.xiaonuo.common.enums.CommonSortOrderEnum;
|
|
import vip.xiaonuo.common.enums.CommonSortOrderEnum;
|
|
import vip.xiaonuo.common.exception.CommonException;
|
|
import vip.xiaonuo.common.exception.CommonException;
|
|
import vip.xiaonuo.common.page.CommonPageRequest;
|
|
import vip.xiaonuo.common.page.CommonPageRequest;
|
|
import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
|
|
import vip.xiaonuo.biz.modular.bizappointmentrecord.entity.BizAppointmentRecord;
|
|
import vip.xiaonuo.biz.modular.bizappointmentrecord.mapper.BizAppointmentRecordMapper;
|
|
import vip.xiaonuo.biz.modular.bizappointmentrecord.mapper.BizAppointmentRecordMapper;
|
|
-import vip.xiaonuo.biz.modular.bizappointmentrecord.param.BizAppointmentRecordAddParam;
|
|
|
|
-import vip.xiaonuo.biz.modular.bizappointmentrecord.param.BizAppointmentRecordEditParam;
|
|
|
|
-import vip.xiaonuo.biz.modular.bizappointmentrecord.param.BizAppointmentRecordIdParam;
|
|
|
|
-import vip.xiaonuo.biz.modular.bizappointmentrecord.param.BizAppointmentRecordPageParam;
|
|
|
|
import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
|
|
import vip.xiaonuo.biz.modular.bizappointmentrecord.service.BizAppointmentRecordService;
|
|
|
|
|
|
|
|
+import java.io.IOException;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.regex.Pattern;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 预约记录Service接口实现类
|
|
* 预约记录Service接口实现类
|
|
@@ -43,37 +54,173 @@ import java.util.List;
|
|
@Service
|
|
@Service
|
|
public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentRecordMapper, BizAppointmentRecord> implements BizAppointmentRecordService {
|
|
public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentRecordMapper, BizAppointmentRecord> implements BizAppointmentRecordService {
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ private BizConfigService bizConfigService;
|
|
|
|
+ @Resource
|
|
|
|
+ private BizAppointmentTimeService bizAppointmentTimeService;
|
|
|
|
+ @Resource
|
|
|
|
+ private TransService transService;
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public Page<BizAppointmentRecord> page(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
|
|
public Page<BizAppointmentRecord> page(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
|
|
|
|
+ QueryWrapper<BizAppointmentRecord> queryWrapper = getQueryWrapper(bizAppointmentRecordPageParam);
|
|
|
|
+ return this.getBaseMapper().getPage(CommonPageRequest.defaultPage(), queryWrapper);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public QueryWrapper<BizAppointmentRecord> getQueryWrapper(BizAppointmentRecordPageParam bizAppointmentRecordPageParam){
|
|
QueryWrapper<BizAppointmentRecord> queryWrapper = new QueryWrapper<BizAppointmentRecord>().checkSqlInjection();
|
|
QueryWrapper<BizAppointmentRecord> queryWrapper = new QueryWrapper<BizAppointmentRecord>().checkSqlInjection();
|
|
- if(ObjectUtil.isAllNotEmpty(bizAppointmentRecordPageParam.getSortField(), bizAppointmentRecordPageParam.getSortOrder())) {
|
|
|
|
- CommonSortOrderEnum.validate(bizAppointmentRecordPageParam.getSortOrder());
|
|
|
|
- queryWrapper.orderBy(true, bizAppointmentRecordPageParam.getSortOrder().equals(CommonSortOrderEnum.ASC.getValue()),
|
|
|
|
- StrUtil.toUnderlineCase(bizAppointmentRecordPageParam.getSortField()));
|
|
|
|
- } else {
|
|
|
|
- queryWrapper.lambda().orderByAsc(BizAppointmentRecord::getId);
|
|
|
|
- }
|
|
|
|
- return this.page(CommonPageRequest.defaultPage(), queryWrapper);
|
|
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getOrderName())){
|
|
|
|
+ queryWrapper.like("bo.order_name",bizAppointmentRecordPageParam.getOrderName());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getOrderNumber())){
|
|
|
|
+ queryWrapper.like("bo.order_number",bizAppointmentRecordPageParam.getOrderNumber());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getCustomerName())){
|
|
|
|
+ queryWrapper.like("bc.customer_name",bizAppointmentRecordPageParam.getCustomerName());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getDriverName())){
|
|
|
|
+ queryWrapper.like("bar.driver_name",bizAppointmentRecordPageParam.getDriverName());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getDriverPhone())){
|
|
|
|
+ queryWrapper.like("bar.driver_phone",bizAppointmentRecordPageParam.getDriverPhone());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getGoodsName())){
|
|
|
|
+ queryWrapper.like("bg.NAME",bizAppointmentRecordPageParam.getGoodsName());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getLicenseNumber())){
|
|
|
|
+ queryWrapper.like("bar.license_number",bizAppointmentRecordPageParam.getLicenseNumber());
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordPageParam.getStatus())){
|
|
|
|
+ queryWrapper.eq("bar.status",bizAppointmentRecordPageParam.getStatus());
|
|
|
|
+ }
|
|
|
|
+ queryWrapper.eq("bar.delete_flag","NOT_DELETE");
|
|
|
|
+ queryWrapper.orderByDesc("bar.create_time");
|
|
|
|
+ return queryWrapper;
|
|
}
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public void add(BizAppointmentRecordAddParam bizAppointmentRecordAddParam) {
|
|
public void add(BizAppointmentRecordAddParam bizAppointmentRecordAddParam) {
|
|
|
|
+ checkParam(bizAppointmentRecordAddParam);
|
|
|
|
+ //获取流程配置判断预约是否需要审核
|
|
|
|
+ BizConfig bizConfig = bizConfigService.getOne(new QueryWrapper<BizConfig>().lambda().last("limit 1"));
|
|
BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
|
|
BizAppointmentRecord bizAppointmentRecord = BeanUtil.toBean(bizAppointmentRecordAddParam, BizAppointmentRecord.class);
|
|
|
|
+ if(ObjectUtil.isNotNull(bizConfig)){
|
|
|
|
+ if(StringUtils.equals(bizConfig.getAuditSwitch(),"1")){
|
|
|
|
+ //开启审核,设置待审核状态
|
|
|
|
+ bizAppointmentRecord.setStatus("1");
|
|
|
|
+ }else{
|
|
|
|
+ //未开启审核,设置排队中状态
|
|
|
|
+ bizAppointmentRecord.setStatus("3");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
this.save(bizAppointmentRecord);
|
|
this.save(bizAppointmentRecord);
|
|
|
|
+
|
|
|
|
+ //更新时间段内已预约数
|
|
|
|
+ BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
|
|
|
|
+ bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()+1);
|
|
|
|
+ bizAppointmentTimeService.updateById(bizAppointmentTime);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void checkParam(BizAppointmentRecordAddParam bizAppointmentRecordAddParam){
|
|
|
|
+ //校验车牌号
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getLicenseNumber())){
|
|
|
|
+ if(!isCarNumber(bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim())){
|
|
|
|
+ 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()).
|
|
|
|
+ notIn(BizAppointmentRecord::getStatus, "11", "13", "14"));
|
|
|
|
+ if(count>0){
|
|
|
|
+ throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordAddParam.getLicenseNumber().toUpperCase().trim());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //校验手机号
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getDriverPhone())){
|
|
|
|
+ if(!PhoneUtil.isMobile(bizAppointmentRecordAddParam.getDriverPhone())) {
|
|
|
|
+ throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordAddParam.getDriverPhone());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordAddParam.getTimeId())){
|
|
|
|
+ //校验预约时间段是否预约满
|
|
|
|
+ //查询预约时间段内的预约记录,10:已出场 11:已签收 12:自动审核 13:销售已审核 14:已取消这些状态都占用预约名额
|
|
|
|
+ long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
|
|
+ eq(BizAppointmentRecord::getTimeId, bizAppointmentRecordAddParam.getTimeId()).
|
|
|
|
+ notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14"));
|
|
|
|
+ //查询预约时间段内可预约次数
|
|
|
|
+ BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordAddParam.getTimeId());
|
|
|
|
+ if(count>=bizAppointmentTime.getApplyNumber()){
|
|
|
|
+ throw new CommonException("该时间段已经预约满!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void checkParam(BizAppointmentRecordEditParam bizAppointmentRecordEditParam,BizAppointmentRecord bizAppointmentRecord){
|
|
|
|
+ //校验车牌号
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getLicenseNumber())){
|
|
|
|
+ if(!StringUtils.equals(bizAppointmentRecord.getLicenseNumber(),bizAppointmentRecordEditParam.getLicenseNumber())){
|
|
|
|
+ //车牌号修改过
|
|
|
|
+ if(!isCarNumber(bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim())){
|
|
|
|
+ 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()).
|
|
|
|
+ notIn(BizAppointmentRecord::getStatus, "11", "13", "14"));
|
|
|
|
+ if(count>0){
|
|
|
|
+ throw new CommonException("车牌号:{}已经添加过预约!",bizAppointmentRecordEditParam.getLicenseNumber().toUpperCase().trim());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ //校验手机号
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getDriverPhone())){
|
|
|
|
+ if(!PhoneUtil.isMobile(bizAppointmentRecordEditParam.getDriverPhone())) {
|
|
|
|
+ throw new CommonException("手机号码:{}格式错误", bizAppointmentRecordEditParam.getDriverPhone());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getTimeId())){
|
|
|
|
+ if(!StringUtils.equals(bizAppointmentRecord.getTimeId(),bizAppointmentRecordEditParam.getTimeId())){
|
|
|
|
+ //校验预约时间段是否预约满
|
|
|
|
+ //查询预约时间段内的预约记录,10:已出场 11:已签收 12:自动审核 13:销售已审核 14:已取消这些状态都占用预约名额
|
|
|
|
+ long count = this.count(new QueryWrapper<BizAppointmentRecord>().lambda().
|
|
|
|
+ eq(BizAppointmentRecord::getTimeId, bizAppointmentRecordEditParam.getTimeId()).
|
|
|
|
+ notIn(BizAppointmentRecord::getStatus, "10", "11", "12", "13", "14"));
|
|
|
|
+ //查询预约时间段内可预约次数
|
|
|
|
+ BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecordEditParam.getTimeId());
|
|
|
|
+ if(count>=bizAppointmentTime.getApplyNumber()){
|
|
|
|
+ throw new CommonException("该时间段已经预约满!");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public void edit(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
|
|
public void edit(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
|
|
BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
|
|
BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
|
|
|
|
+ checkParam(bizAppointmentRecordEditParam,bizAppointmentRecord);
|
|
BeanUtil.copyProperties(bizAppointmentRecordEditParam, bizAppointmentRecord);
|
|
BeanUtil.copyProperties(bizAppointmentRecordEditParam, bizAppointmentRecord);
|
|
|
|
+ if(StringUtils.equals(bizAppointmentRecord.getStatus(),"2")){
|
|
|
|
+ //如果当前状态是审核不通过的状态,修改后重新提交审核
|
|
|
|
+ bizAppointmentRecord.setStatus("1");
|
|
|
|
+ }
|
|
this.updateById(bizAppointmentRecord);
|
|
this.updateById(bizAppointmentRecord);
|
|
}
|
|
}
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Override
|
|
@Override
|
|
public void delete(List<BizAppointmentRecordIdParam> bizAppointmentRecordIdParamList) {
|
|
public void delete(List<BizAppointmentRecordIdParam> bizAppointmentRecordIdParamList) {
|
|
|
|
+ //释放预约数
|
|
|
|
+ for(BizAppointmentRecordIdParam bizAppointmentRecordIdParam : bizAppointmentRecordIdParamList){
|
|
|
|
+ BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordIdParam.getId());
|
|
|
|
+ BizAppointmentTime bizAppointmentTime = bizAppointmentTimeService.getById(bizAppointmentRecord.getTimeId());
|
|
|
|
+ bizAppointmentTime.setApplyNumberAlready(bizAppointmentTime.getApplyNumberAlready()-1);
|
|
|
|
+ bizAppointmentTimeService.updateById(bizAppointmentTime);
|
|
|
|
+ }
|
|
// 执行删除
|
|
// 执行删除
|
|
this.removeByIds(CollStreamUtil.toList(bizAppointmentRecordIdParamList, BizAppointmentRecordIdParam::getId));
|
|
this.removeByIds(CollStreamUtil.toList(bizAppointmentRecordIdParamList, BizAppointmentRecordIdParam::getId));
|
|
}
|
|
}
|
|
@@ -91,4 +238,50 @@ public class BizAppointmentRecordServiceImpl extends ServiceImpl<BizAppointmentR
|
|
}
|
|
}
|
|
return bizAppointmentRecord;
|
|
return bizAppointmentRecord;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void auditRecord(BizAppointmentRecordEditParam bizAppointmentRecordEditParam) {
|
|
|
|
+ BizAppointmentRecord bizAppointmentRecord = this.queryEntity(bizAppointmentRecordEditParam.getId());
|
|
|
|
+ if(ObjectUtil.isNotEmpty(bizAppointmentRecordEditParam.getAuditFlag())){
|
|
|
|
+ if(StringUtils.equals(bizAppointmentRecordEditParam.getAuditFlag(),"true")){
|
|
|
|
+ bizAppointmentRecord.setStatus("2");
|
|
|
|
+ }else{
|
|
|
|
+ bizAppointmentRecord.setStatus("3");
|
|
|
|
+ }
|
|
|
|
+ bizAppointmentRecord.setAppointmentReason(bizAppointmentRecordEditParam.getAppointmentReason());
|
|
|
|
+ this.updateById(bizAppointmentRecord);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void exportRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam, HttpServletResponse response) throws IOException {
|
|
|
|
+ QueryWrapper<BizAppointmentRecord> queryWrapper = getQueryWrapper(bizAppointmentRecordPageParam);
|
|
|
|
+ List<BizAppointmentRecord> recordList = this.getBaseMapper().getPage(queryWrapper);
|
|
|
|
+ String fileName = "预约报表.xlsx";
|
|
|
|
+ List<BizAppointmentExportResult> list = Lists.newArrayList();
|
|
|
|
+ transService.transBatch(recordList);
|
|
|
|
+ for(BizAppointmentRecord bizAppointmentRecord : recordList){
|
|
|
|
+ BizAppointmentExportResult bizAppointmentExportResult = new BizAppointmentExportResult();
|
|
|
|
+ BeanUtil.copyProperties(bizAppointmentRecord, bizAppointmentExportResult);
|
|
|
|
+ bizAppointmentExportResult.setStatusName((String) bizAppointmentRecord.getTransMap().get("statusName"));
|
|
|
|
+ bizAppointmentExportResult.setTimeInfo(bizAppointmentRecord.getBeginTime()+"~"+bizAppointmentRecord.getEndTime());
|
|
|
|
+ list.add(bizAppointmentExportResult);
|
|
|
|
+ }
|
|
|
|
+ CommonExportUtil.export(fileName, BizAppointmentExportResult.class,list,response,"预约报表");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public BizAppointmentRecord checkAppointmentRecord(BizAppointmentRecordPageParam bizAppointmentRecordPageParam) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 车牌号校验
|
|
|
|
+ * @param carNumber
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ public boolean isCarNumber(String carNumber){
|
|
|
|
+ String carNumberPattern = "([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{1}(([A-HJ-Z]{1}[A-HJ-NP-Z0-9]{5})|([A-HJ-Z]{1}(([DF]{1}[A-HJ-NP-Z0-9]{1}[0-9]{4})|([0-9]{5}[DF]{1})))|([A-HJ-Z]{1}[A-D0-9]{1}[0-9]{3}警)))|([0-9]{6}使)|((([沪粤川云桂鄂陕蒙藏黑辽渝]{1}A)|鲁B|闽D|蒙E|蒙H)[0-9]{4}领)|(WJ[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼·•]{1}[0-9]{4}[TDSHBXJ0-9]{1})|([VKHBSLJNGCE]{1}[A-DJ-PR-TVY]{1}[0-9]{5})";
|
|
|
|
+ return Pattern.matches(carNumberPattern, carNumber);
|
|
|
|
+ }
|
|
}
|
|
}
|