zjh
2023-12-14 448a0c22ec89d5962cbf78d737517aaf176c0240
zjh 2023/12/14--2
6个文件已修改
507 ■■■■■ 已修改文件
ltkj-admin/src/main/java/com/ltkj/web/controller/sqlserver/TjSqlController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java 443 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-system/src/main/java/com/ltkj/system/mapper/SysDeptMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-system/src/main/java/com/ltkj/system/service/ISysDeptService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-system/src/main/java/com/ltkj/system/service/impl/SysDeptServiceImpl.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-system/src/main/resources/mapper/system/SysDeptMapper.xml 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ltkj-admin/src/main/java/com/ltkj/web/controller/sqlserver/TjSqlController.java
@@ -1,6 +1,8 @@
package com.ltkj.web.controller.sqlserver;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ltkj.common.core.controller.BaseController;
import com.ltkj.common.core.domain.AjaxResult;
import com.ltkj.common.core.redis.RedisCache;
@@ -77,7 +79,7 @@
                                    @RequestParam(defaultValue = "10") Integer pageSize,
                                    @RequestParam(required = false) String deptId,
                                    @RequestParam(required = false) String tjName,
                                    @RequestParam(required = false) String tjNum) throws SQLException {
                                    @RequestParam(required = false) String tjNum) throws SQLException, JsonProcessingException {
//        long start = System.currentTimeMillis();
//        //需要匹配的key
//        ScanOptions options = ScanOptions.scanOptions()
@@ -112,12 +114,14 @@
//        List<Map<String, Object>> map = deptService.getSysDeptYjWjCustomerList(deptId, tjName, tjNum, aa, page, pageSize);
//        List<ResultSet> map = deptService.getSysDeptYjWjCustomerList1(deptId, tjName, tjNum, aa, page, pageSize);
        ResultSet resultSet = deptService.getSysDeptYjWjCustomerList12(deptId, tjName, tjNum, aa, page, pageSize);
        while (resultSet.next()){
            String anInt = resultSet.getString(1);
            System.out.println(anInt);
        }
        return AjaxResult.success();
//        ResultSet resultSet = deptService.getSysDeptYjWjCustomerList12(deptId, tjName, tjNum, aa, page, pageSize);
//        while (resultSet.next()){
//            String anInt = resultSet.getString(1);
//            System.out.println(anInt);
//        }
        Map<String,Object> map = deptService.getSysDeptYjWjCustomerList13(deptId, tjName, tjNum, aa, page, pageSize);
        return AjaxResult.success(map);
    }
ltkj-admin/src/main/java/com/ltkj/web/controller/system/SysDeptController.java
@@ -26,6 +26,7 @@
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.ibatis.jdbc.Null;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.ConvertingCursor;
import org.springframework.data.redis.core.Cursor;
@@ -144,147 +145,149 @@
            return AjaxResult.error("请完善科室项目信息");
        }
        List<TjCustomer> customerLis = new ArrayList<>();
        if(null==name) name="";
        if(null==tjNumber) tjNumber="";
        //根据体检号查
        if (null != tjNumber) {
            List<TjOrder> orderList = orderService.getOrderListByLikeTjNum(tjNumber);
            if (null == orderList) {
                return AjaxResult.success("暂时没有数据");
            }
            for (TjOrder order : orderList) {
                List<TjOrderDetail> list = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
                if (list.size() == 0) {
                    continue;
                }
                LambdaQueryWrapper<TjOrderRemark> wqs = new LambdaQueryWrapper<>();
                wqs.eq(TjOrderRemark::getTjNumber, order.getTjNumber());
                wqs.in(TjOrderRemark::getType, 0,3);
                List<TjOrderRemark> lists = remarkService.list(wqs);
                TjCustomer customer = customerService.getById(order.getUserId());
                //遍历项目 判断是否有重大阳性  标记
                for (TjOrderDetail tjOrderDetail11 : list) {
                    customer.setIsPositive(tjOrderDetail11.getIsPositive());
                    if (tjOrderDetail11.getIsPositive()==1){
                        break;
                    }
                }
                customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
                customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
                customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                if (null != lists && lists.size() > 0) {
                    StringBuilder stringBuilder = new StringBuilder();
                    for (TjOrderRemark remark : lists) {
                        TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
                        TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
                        if (one.getFlowingWaterId() != null) {
                            stringBuilder.append(byId.getProName()).append(";");
                        }
                    }
                    customer.setNotCheckeds(String.valueOf(stringBuilder));
                    customer.setTjStatus(0L);
                } else {
                    customer.setTjStatus(1L);
                    customer.setNotCheckeds("无");
                }
                if (order.getTjType().equals("1")) {
                    customer.setTjType("团体");
                }
                if (order.getTjType().equals("2")) {
                    customer.setTjType("个人");
                }
                customer.setTjTime(order.getCreateTime());
                customer.setTjNumber(order.getTjNumber());
                customer.setOrderId(order.getOrderId());
                customer.setIsHz(order.getIsHz());
                customer.setTjCategory(order.getTjCategory());
                customerLis.add(customer);
            }
            if (customerLis.size() > 0) {
                List<TjCustomer> customerList = customerLis.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                Collections.reverse(customerList);
                Map<String, Object> map = new HashMap<>();
                map.put("date", customerList);
                map.put("total", customerLis.size());
                return AjaxResult.success(map);
            } else {
                return AjaxResult.success("暂无数据");
            }
        }
        //根据姓名查询
        if (null != name && !"".equals(name)) {
            LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();
            wq.like(TjCustomer::getCusName, name);
            List<TjCustomer> list = customerService.list(wq);
            List<TjCustomer> list11111 = new ArrayList<>();
            if (null != list && list.size() > 0) {
                for (TjCustomer customer : list) {
                    customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
                    customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
                    customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                    List<TjOrder> orderList = orderService.getOrderListByCusId(String.valueOf(customer.getCusId()));
                    if (null != orderList && orderList.size() > 0) {
                        for (TjOrder order : orderList) {
                            List<TjOrderDetail> list111 = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
                            if (list111.size() == 0) {
                                continue;
                            }
                            //遍历项目 判断是否有重大阳性  标记
                            for (TjOrderDetail tjOrderDetail11 : list111) {
                                customer.setIsPositive(tjOrderDetail11.getIsPositive());
                                if (tjOrderDetail11.getIsPositive()==1){
                                    break;
                                }
                            }
                            List<TjOrderRemark> lists = remarkService.getTjOrderRemarkListByYjNum(order.getTjNumber());
                            if (null != lists && lists.size() > 0) {
                                StringBuilder stringBuilder = new StringBuilder();
                                for (TjOrderRemark remark : lists) {
                                    TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
                                    TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
                                    if (one.getFlowingWaterId() != null) {
                                        stringBuilder.append(byId.getProName()).append(";");
                                    }
                                }
                                customer.setNotCheckeds(String.valueOf(stringBuilder));
                                if (null == customer.getNotCheckeds()) customer.setNotCheckeds("全部已检");
                                customer.setTjStatus(0L);
                            } else {
                                customer.setNotCheckeds("无");
                                customer.setTjStatus(1L);
                            }
                            if (order.getTjType().equals("1")) {
                                customer.setTjType("团体");
                            }
                            if (order.getTjType().equals("2")) {
                                customer.setTjType("个人");
                            }
                            customer.setTjTime(order.getCreateTime());
                            customer.setTjNumber(order.getTjNumber());
                            customer.setOrderId(order.getOrderId());
                            customer.setIsHz(order.getIsHz());
                            customer.setTjCategory(order.getTjCategory());
                            list11111.add(customer);
                        }
                    }
                }
                if (list11111.size() == 0) {
                    return AjaxResult.success("暂无数据");
                }
                Map<String, Object> map = new HashMap<>();
                List<TjCustomer> customers = list11111.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                Collections.reverse(customers);
                map.put("customers", customers);
                map.put("total", list11111.size());
                return AjaxResult.success(map);
            } else {
                return AjaxResult.success("暂无数据");
            }
        }
        List<TjCustomer> customerLists = new ArrayList<>();
//        //根据体检号查
//        if (null != tjNumber) {
//            List<TjOrder> orderList = orderService.getOrderListByLikeTjNum(tjNumber);
//            if (null == orderList) {
//                return AjaxResult.success("暂时没有数据");
//            }
//            for (TjOrder order : orderList) {
//                List<TjOrderDetail> list = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
//                if (list.size() == 0) {
//                    continue;
//                }
//                LambdaQueryWrapper<TjOrderRemark> wqs = new LambdaQueryWrapper<>();
//                wqs.eq(TjOrderRemark::getTjNumber, order.getTjNumber());
//                wqs.in(TjOrderRemark::getType, 0,3);
//                List<TjOrderRemark> lists = remarkService.list(wqs);
//                TjCustomer customer = customerService.getById(order.getUserId());
//
//                //遍历项目 判断是否有重大阳性  标记
//                for (TjOrderDetail tjOrderDetail11 : list) {
//                    customer.setIsPositive(tjOrderDetail11.getIsPositive());
//                    if (tjOrderDetail11.getIsPositive()==1){
//                        break;
//                    }
//                }
//
//                customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
//                customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
//                customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
//                if (null != lists && lists.size() > 0) {
//                    StringBuilder stringBuilder = new StringBuilder();
//                    for (TjOrderRemark remark : lists) {
//                        TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
//                        TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
//                        if (one.getFlowingWaterId() != null) {
//                            stringBuilder.append(byId.getProName()).append(";");
//                        }
//
//                    }
//                    customer.setNotCheckeds(String.valueOf(stringBuilder));
//                    customer.setTjStatus(0L);
//                } else {
//                    customer.setTjStatus(1L);
//                    customer.setNotCheckeds("无");
//                }
//                if (order.getTjType().equals("1")) {
//                    customer.setTjType("团体");
//                }
//                if (order.getTjType().equals("2")) {
//                    customer.setTjType("个人");
//                }
//                customer.setTjTime(order.getCreateTime());
//                customer.setTjNumber(order.getTjNumber());
//                customer.setOrderId(order.getOrderId());
//                customer.setIsHz(order.getIsHz());
//                customer.setTjCategory(order.getTjCategory());
//                customerLis.add(customer);
//            }
//            if (customerLis.size() > 0) {
//                List<TjCustomer> customerList = customerLis.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
//                Collections.reverse(customerList);
//                Map<String, Object> map = new HashMap<>();
//                map.put("date", customerList);
//                map.put("total", customerLis.size());
//                return AjaxResult.success(map);
//            } else {
//                return AjaxResult.success("暂无数据");
//            }
//        }
//
//        //根据姓名查询
//        if (null != name && !"".equals(name)) {
//            LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();
//            wq.like(TjCustomer::getCusName, name);
//            List<TjCustomer> list = customerService.list(wq);
//            List<TjCustomer> list11111 = new ArrayList<>();
//            if (null != list && list.size() > 0) {
//                for (TjCustomer customer : list) {
//                    customer.setCusName(MatchUtils.hideCusName(customer.getCusName()));
//                    customer.setCusPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
//                    customer.setCusIdcard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
//                    List<TjOrder> orderList = orderService.getOrderListByCusId(String.valueOf(customer.getCusId()));
//                    if (null != orderList && orderList.size() > 0) {
//                        for (TjOrder order : orderList) {
//                            List<TjOrderDetail> list111 = Optional.ofNullable(detailService.getTjOrderDetailListByOrderId(String.valueOf(order.getOrderId()))).get();
//                            if (list111.size() == 0) {
//                                continue;
//                            }
//                            //遍历项目 判断是否有重大阳性  标记
//                            for (TjOrderDetail tjOrderDetail11 : list111) {
//                                customer.setIsPositive(tjOrderDetail11.getIsPositive());
//                                if (tjOrderDetail11.getIsPositive()==1){
//                                    break;
//                                }
//                            }
//                            List<TjOrderRemark> lists = remarkService.getTjOrderRemarkListByYjNum(order.getTjNumber());
//                            if (null != lists && lists.size() > 0) {
//                                StringBuilder stringBuilder = new StringBuilder();
//                                for (TjOrderRemark remark : lists) {
//                                    TjProject byId = projectService.selectTjProjectByProId(remark.getProId());
//                                    TjOrderDetail one = detailService.getTjOrderDetailByOrderId(String.valueOf(order.getOrderId()), String.valueOf(byId.getProId()));
//                                    if (one.getFlowingWaterId() != null) {
//                                        stringBuilder.append(byId.getProName()).append(";");
//                                    }
//                                }
//                                customer.setNotCheckeds(String.valueOf(stringBuilder));
//                                if (null == customer.getNotCheckeds()) customer.setNotCheckeds("全部已检");
//                                customer.setTjStatus(0L);
//                            } else {
//                                customer.setNotCheckeds("无");
//                                customer.setTjStatus(1L);
//                            }
//                            if (order.getTjType().equals("1")) {
//                                customer.setTjType("团体");
//                            }
//                            if (order.getTjType().equals("2")) {
//                                customer.setTjType("个人");
//                            }
//                            customer.setTjTime(order.getCreateTime());
//                            customer.setTjNumber(order.getTjNumber());
//                            customer.setOrderId(order.getOrderId());
//                            customer.setIsHz(order.getIsHz());
//                            customer.setTjCategory(order.getTjCategory());
//                            list11111.add(customer);
//                        }
//                    }
//                }
//                if (list11111.size() == 0) {
//                    return AjaxResult.success("暂无数据");
//                }
//                Map<String, Object> map = new HashMap<>();
//                List<TjCustomer> customers = list11111.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
//                Collections.reverse(customers);
//                map.put("customers", customers);
//                map.put("total", list11111.size());
//                return AjaxResult.success(map);
//            } else {
//                return AjaxResult.success("暂无数据");
//            }
//        }
//        List<TjCustomer> customerLists = new ArrayList<>();
//        String key="*";
//        if(sysUser.isAdmin()){
@@ -298,6 +301,7 @@
//                .match(key).build();
//        RedisSerializer<String> redisSerializer = (RedisSerializer<String>) redisTemplate.getKeySerializer();
//        0未检,1已检
        Map<String,Object> map=null;
        if (type == 0) {
//            Cursor cursor = redisTemplate.executeWithStickyConnection(redisConnection -> new ConvertingCursor<>(redisConnection.scan(options), redisSerializer::deserialize));
//            List<TjCustomer> customers = new ArrayList<>();
@@ -310,7 +314,8 @@
//            }
////            //切记这里一定要关闭,否则会耗尽连接数。报Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a
//            cursor.close();
            customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj");
//            customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj");
            map = deptService.getSysDeptYjWjCustomerList13(String.valueOf(ksId), name, tjNumber, 0, page, pageSize);
//            customerLists = customers;
        }
        if (type == 1) {
@@ -325,25 +330,88 @@
//            }
////            //切记这里一定要关闭,否则会耗尽连接数。报Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a
//            cursor.close();
            customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj");
//            customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj");
            map = deptService.getSysDeptYjWjCustomerList13(String.valueOf(ksId), name, tjNumber, 1, page, pageSize);
//            customerLists = customers;
        }
        asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId));
        if (null !=customerLists && customerLists.size() > 0) {
            Collections.reverse(customerLists);
            List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
            Map<String, Object> map = new HashMap<>();
            map.put("date", customerList);
            map.put("total", customerLists.size());
            return AjaxResult.success(map);
        } else {
            AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis);
            if (map != null) return map;
            return AjaxResult.success("暂时没有数据");
        }
        return AjaxResult.success(map);
//        asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId));
//        if (null !=customerLists && customerLists.size() > 0) {
//            Collections.reverse(customerLists);
//            List<TjCustomer> customerList = customerLists.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
//            Map<String, Object> map = new HashMap<>();
//            map.put("date", customerList);
//            map.put("total", customerLists.size());
//            return AjaxResult.success(map);
//        } else {
//            AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis);
//            if (map != null) return map;
//            return AjaxResult.success("暂时没有数据");
//        }
    }
    private AjaxResult getAjaxResult(Integer type, Integer page, Integer pageSize, List<Long> ksproList, List<TjCustomer> customerLis) {
        LambdaQueryWrapper<TjOrderDetail> wq1 = new LambdaQueryWrapper<>();
        wq1.eq(TjOrderDetail::getTjStatus, type);
        wq1.in(TjOrderDetail::getProId, ksproList);
        wq1.isNotNull(TjOrderDetail::getFlowingWaterId);
        wq1.orderByDesc(TjOrderDetail::getCreateTime);
        List<TjOrderDetail> detailList = detailService.list(wq1);
        if (null != detailList && detailList.size() > 0) {
            //收集orderId并去重
            List<Long> orderIds = detailList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(
                    () -> new TreeSet<>(Comparator.comparing(TjOrderDetail::getOrderId))
            ), ArrayList::new)).stream().map(TjOrderDetail::getOrderId).collect(Collectors.toList());
            for (Long orderId : orderIds) {
                if (null != orderId) {
                    TjOrder order = orderService.getById(orderId);
                    if(null ==order){
                        continue;
                    }
                    if (type == 1) {
                        List<TjOrderDetail> list = detailService.getTjOrderDetailListByOrderIdAndStatus(String.valueOf(orderId));
                        if (null != list && list.size() > 0) {
                            continue;
                        }
                    }
                    TjCustomer customer = customerService.getById(order.getUserId());
                    if (null != customer) {
                        if (order.getTjType().equals("1")) {
                            customer.setTjType("团体");
                        }
                        if (order.getTjType().equals("2")) {
                            customer.setTjType("个人");
                        }
                        customer.setTjTime(order.getCreateTime());
                        customer.setTjNumber(order.getTjNumber());
                        customer.setOrderId(orderId);
                        customer.setIsHz(order.getIsHz());
                        customer.setTjStatus(Long.valueOf(type));
                        List<TjOrderRemark> list = remarkService.getTjOrderRemarkListByYjNum(order.getTjNumber());
                        if (null != list && list.size() > 0) {
                            StringBuilder stringBuilder = new StringBuilder();
                            for (TjOrderRemark remark : list) {
                                TjProject byId = projectService.getById(remark.getProId());
                                stringBuilder.append(byId.getProName()).append(";");
                            }
                            customer.setNotCheckeds(String.valueOf(stringBuilder));
                            if (null == customer.getNotCheckeds()) customer.setNotCheckeds("全部已检");
                        }
                        customerLis.add(customer);
                    }
                }
            }
            if (customerLis.size() > 0) {
                List<TjCustomer> customerList = customerLis.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                Collections.reverse(customerList);
                Map<String, Object> map = new HashMap<>();
                map.put("date", customerList);
                map.put("total", customerLis.size());
                return AjaxResult.success(map);
            }
        }
        return null;
    }
    /**
     * 化验检查页面列表
@@ -552,68 +620,7 @@
    private AjaxResult getAjaxResult(Integer type, Integer page, Integer pageSize, List<Long> ksproList, List<TjCustomer> customerLis) {
        LambdaQueryWrapper<TjOrderDetail> wq1 = new LambdaQueryWrapper<>();
        wq1.eq(TjOrderDetail::getTjStatus, type);
        wq1.in(TjOrderDetail::getProId, ksproList);
        wq1.isNotNull(TjOrderDetail::getFlowingWaterId);
        wq1.orderByDesc(TjOrderDetail::getCreateTime);
        List<TjOrderDetail> detailList = detailService.list(wq1);
        if (null != detailList && detailList.size() > 0) {
            //收集orderId并去重
            List<Long> orderIds = detailList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(
                    () -> new TreeSet<>(Comparator.comparing(TjOrderDetail::getOrderId))
            ), ArrayList::new)).stream().map(TjOrderDetail::getOrderId).collect(Collectors.toList());
            for (Long orderId : orderIds) {
                if (null != orderId) {
                    TjOrder order = orderService.getById(orderId);
                    if(null ==order){
                        continue;
                    }
                    if (type == 1) {
                        List<TjOrderDetail> list = detailService.getTjOrderDetailListByOrderIdAndStatus(String.valueOf(orderId));
                        if (null != list && list.size() > 0) {
                            continue;
                        }
                    }
                    TjCustomer customer = customerService.getById(order.getUserId());
                    if (null != customer) {
                        if (order.getTjType().equals("1")) {
                            customer.setTjType("团体");
                        }
                        if (order.getTjType().equals("2")) {
                            customer.setTjType("个人");
                        }
                        customer.setTjTime(order.getCreateTime());
                        customer.setTjNumber(order.getTjNumber());
                        customer.setOrderId(orderId);
                        customer.setIsHz(order.getIsHz());
                        customer.setTjStatus(Long.valueOf(type));
                        List<TjOrderRemark> list = remarkService.getTjOrderRemarkListByYjNum(order.getTjNumber());
                        if (null != list && list.size() > 0) {
                            StringBuilder stringBuilder = new StringBuilder();
                            for (TjOrderRemark remark : list) {
                                TjProject byId = projectService.getById(remark.getProId());
                                stringBuilder.append(byId.getProName()).append(";");
                            }
                            customer.setNotCheckeds(String.valueOf(stringBuilder));
                            if (null == customer.getNotCheckeds()) customer.setNotCheckeds("全部已检");
                        }
                        customerLis.add(customer);
                    }
                }
            }
            if (customerLis.size() > 0) {
                List<TjCustomer> customerList = customerLis.stream().skip((long) (page - 1) * pageSize).limit(pageSize).collect(Collectors.toList());
                Collections.reverse(customerList);
                Map<String, Object> map = new HashMap<>();
                map.put("date", customerList);
                map.put("total", customerLis.size());
                return AjaxResult.success(map);
            }
        }
        return null;
    }
    /**
     * 查询客户体检历史记录
ltkj-system/src/main/java/com/ltkj/system/mapper/SysDeptMapper.java
@@ -131,5 +131,8 @@
                                         @Param("type")int type, @Param("page") int page , @Param("pageSize") int pageSize);
    List<Map<String, Object>> getSysDeptYjWjCustomerList1(Map<String,Object> map);
    List<List<?>> getSysDeptYjWjCustomerList13(Map<String,Object> map);
    List<ResultSet> getSysDeptYjWjCustomerList2(Map<String,Object> map);
}
ltkj-system/src/main/java/com/ltkj/system/service/ISysDeptService.java
@@ -142,4 +142,6 @@
     List<ResultSet>  getSysDeptYjWjCustomerList1(String deptid, String tjname, String tjNumber, int type, int page , int pageSize);
    ResultSet getSysDeptYjWjCustomerList12(String deptid, String tjname, String tjNumber, int type, int page , int pageSize);
    Map<String,Object> getSysDeptYjWjCustomerList13(String deptid, String tjname, String tjNumber, int type, int page , int pageSize);
}
ltkj-system/src/main/java/com/ltkj/system/service/impl/SysDeptServiceImpl.java
@@ -5,6 +5,8 @@
import java.util.stream.Collectors;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.ltkj.common.constant.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -366,4 +368,30 @@
        return    deptMapper.getSysDeptYjWjCustomerList( deptid,  tjname,  tjNumber,  type,  page,  pageSize);
//        return deptMapper.getSysDeptYjWjCustomerList(deptid,tjname,tjNumber,type,page,pageSize);
    }
    @Override
    public  Map<String,Object> getSysDeptYjWjCustomerList13(String deptid, String tjname, String tjNumber, int type, int page, int pageSize) {
        Map<String, Object> map = new HashMap<>();
        map.put("deptid",deptid);
        map.put("tjname",tjname);
        map.put("tjNumber",tjNumber);
        map.put("type",type);
        map.put("page",page);
        map.put("pageSize",pageSize);
        List<List<?>> list = deptMapper.getSysDeptYjWjCustomerList13(map);
//        ObjectMapper objectMapper=new ObjectMapper();
//        try {
//            System.out.println("结果集一:"+objectMapper.writeValueAsString(list.get(0)));
//            System.out.println("结果集二:"+objectMapper.writeValueAsString(list.get(1)));
//        } catch (JsonProcessingException e) {
//            e.printStackTrace();
//        }
//        System.out.println("出参参数值:"+map.get("totalRows"));
        Map<String,Object> map1=new HashMap<>();
        map1.put("date",list);
        map1.put("total",map.get("totalRows"));
        return   map1 ;
//        return deptMapper.getSysDeptYjWjCustomerList(deptid,tjname,tjNumber,type,page,pageSize);
    }
}
ltkj-system/src/main/resources/mapper/system/SysDeptMapper.xml
@@ -344,4 +344,17 @@
    </select>
    <select id="getSysDeptYjWjCustomerList13" parameterType="java.util.Map"  statementType="CALLABLE" resultType="java.util.Map">
        {call pro_tjhzlb_list(
                #{deptid,mode=IN,jdbcType=VARCHAR},
                #{tjname,mode=IN,jdbcType=VARCHAR},
                #{tjNumber,mode=IN,jdbcType=VARCHAR},
                #{type,mode=IN,jdbcType=INTEGER},
                #{page,mode=IN,jdbcType=INTEGER},
                #{pageSize,mode=IN,jdbcType=INTEGER},
                #{totalRows,mode=OUT,jdbcType=INTEGER}
            )}
    </select>
</mapper>