Browse Source

1、修改手机号验证正则表达式;2、修改小程序工单处理问题翻页;

tags/v1.0.0^2
wanjing 1 year ago
parent
commit
7cede915c0
2 changed files with 8 additions and 7 deletions
  1. +1
    -1
      tuoheng-common/tuoheng-common-core/src/main/java/com/tuoheng/common/core/utils/CommonUtils.java
  2. +7
    -6
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java

+ 1
- 1
tuoheng-common/tuoheng-common-core/src/main/java/com/tuoheng/common/core/utils/CommonUtils.java View File

public static boolean isMobile(String mobile) { public static boolean isMobile(String mobile) {
boolean flag = false; boolean flag = false;
try { try {
Pattern p = Pattern.compile("^((13[0-9])|(15[^4,\\D])|(18[0,5-9]))\\d{8}$");
Pattern p = Pattern.compile("^((13[0-9])|(14[5|7])|(15[0-9])|(17[013678])|(18[0-9]))\\d{8}$");
Matcher m = p.matcher(mobile); Matcher m = p.matcher(mobile);
flag = m.matches(); flag = m.matches();
} catch (Exception e) { } catch (Exception e) {

+ 7
- 6
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/WorkOrderServiceImpl.java View File

if (null == query.getPage() && null == query.getLimit()) { if (null == query.getPage() && null == query.getLimit()) {
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
} }
//获取分页数据
IPage<InspectionFile> page = new Page<>(query.getPage(), query.getLimit());
IPage<WorkOrderHandleVo> pageData = new Page<>(query.getPage(), query.getLimit());
//根据工单id获取对应的问题集合 //根据工单id获取对应的问题集合
List<WorkOrderFile> workOrderFiles = workOrderFileMapper.selectList(Wrappers.<WorkOrderFile>lambdaQuery() List<WorkOrderFile> workOrderFiles = workOrderFileMapper.selectList(Wrappers.<WorkOrderFile>lambdaQuery()
.eq(WorkOrderFile::getWorkOrderId, query.getId())); .eq(WorkOrderFile::getWorkOrderId, query.getId()));
} }
//工单子表获取对应的问题集合id //工单子表获取对应的问题集合id
List<String> inspectionFiledIds = workOrderFiles.stream().map(o -> o.getInspectionFileId()).collect(Collectors.toList()); List<String> inspectionFiledIds = workOrderFiles.stream().map(o -> o.getInspectionFileId()).collect(Collectors.toList());
List<InspectionFile> inspectionFilesList = inspectionFileMapper.selectBatchIds(inspectionFiledIds);
//设置分页
IPage<InspectionFile> inspectionFilePageData = page.setRecords(inspectionFilesList);

//获取分页数据
IPage<InspectionFile> page = new Page<>(query.getPage(), query.getLimit());
IPage<WorkOrderHandleVo> pageData = new Page<>(query.getPage(), query.getLimit());
//获取当前分配人对应的工单分页数据
IPage<InspectionFile> inspectionFilePageData = inspectionFileMapper.selectPage(page, Wrappers.<InspectionFile>lambdaQuery()
.in(InspectionFile::getId, inspectionFiledIds));
List<WorkOrderHandleVo> list = inspectionFilePageData.getRecords().stream().map(t -> { List<WorkOrderHandleVo> list = inspectionFilePageData.getRecords().stream().map(t -> {
WorkOrderHandleVo vo = new WorkOrderHandleVo(); WorkOrderHandleVo vo = new WorkOrderHandleVo();
BeanUtils.copyProperties(t, vo); BeanUtils.copyProperties(t, vo);

Loading…
Cancel
Save