zjh
2024-12-19 e14e4217b3f53a5cad511b4331cd7c0a40a40db2
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjSamplingController.java
@@ -216,18 +216,20 @@
        LambdaQueryWrapper<TjSampling> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(TjSampling::getIsSignFor, isSignFor);
        if (null != tjNum && StrUtil.isNotBlank(tjNum))
            wrapper.eq(TjSampling::getTjNum, tjNum);
            wrapper.like(TjSampling::getTjNum, tjNum);
        if (null != name && StrUtil.isNotBlank(name))
            wrapper.eq(TjSampling::getCusName, name);
            wrapper.like(TjSampling::getCusName, name);
        if (null != beginTime && null != endTime && StrUtil.isNotBlank(beginTime) && StrUtil.isNotBlank(endTime))
            wrapper.between(TjSampling::getApplicationTime, beginTime, endTime);
        wrapper.groupBy(TjSampling::getCusId);
        wrapper.orderByDesc(TjSampling::getCreateTime);
//        wrapper.last("LIMIT " + (pageNum - 1) * pageSize + "," + pageSize);
        Page<TjSampling> page = tjSamplingService.page(samplingPage, wrapper);
        List<TjSampling> list = page.getRecords();
        ArrayList<TjCustomer> tjCustomers = new ArrayList<>();
        for (TjSampling tjSampling : list) {
            TjCustomer customer = customerService.getById(tjSampling.getCusId());
            if(null !=customer){
            customer.setCusName(customer.getCusName());
            customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
            customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
@@ -235,6 +237,7 @@
            customer.setApplicationTime(tjSampling.getApplicationTime());
            tjCustomers.add(customer);
        }
        }
        HashMap<String, Object> hashMap = new HashMap<>();
        hashMap.put("list", tjCustomers);
        hashMap.put("total", page.getTotal());