| | |
| | | ksproList = projectService.getKsTjProjectIdList(); |
| | | } |
| | | |
| | | if (ksproList == null || ksproList.size() == 0) { |
| | | if (ksproList == null || ksproList.isEmpty()) { |
| | | return AjaxResult.error("请完善科室项目信息"); |
| | | } |
| | | List<TjCustomer> customerLis = new ArrayList<>(); |
| | |
| | | @ApiParam(value = "姓名)") @RequestParam(required = false) String name, |
| | | @ApiParam(value = "页码数(默认1)") @RequestParam(defaultValue = "1") Integer page, |
| | | @ApiParam(value = "显示条数(默认10)") @RequestParam(defaultValue = "10") Integer pageSize) { |
| | | // String userId = SecurityUtils.getLoginUser().getUserId(); |
| | | // Integer ksId = null; |
| | | // SysUser sysUser = null; |
| | | // if (null != userId) { |
| | | // sysUser = userService.getById(Long.valueOf(userId)); |
| | | // if (null != sysUser) { |
| | | // ksId = Math.toIntExact(sysUser.getDeptId()); |
| | | // } |
| | | // } |
| | | // if (ksId == null) { |
| | | // return AjaxResult.error("请输入科室id"); |
| | | // } |
| | | |
| | | //A30化验 |
| | | //根据当前登陆的人的科室id,获取该科室下的所有项目 |
| | | // List<Long> postIds = sysUser.getPostIds(); |
| | | List<Long> ksproList = null; |
| | | // if (postIds != null) { |
| | | // for (Long postId : postIds) { |
| | | // LambdaQueryWrapper<SysUserPost> wq111 = new LambdaQueryWrapper<>(); |
| | | // wq111.eq(SysUserPost::getPostId, postId); |
| | | // SysUserPost one = userPostService.getOne(wq111); |
| | | // if (one != null) { |
| | | // SysPost byId = postService.getById(one.getPostId()); |
| | | // if (byId.getPostName().equals("录入员")) { |
| | | // ksproList = projectService.getKsTjProjectIdListBydeptId(String.valueOf(ksId)); |
| | | // } |
| | | // } |
| | | // } |
| | | // } else { |
| | | // ksproList = projectService.getKsTjProjectIdList(); |
| | | // } |
| | | |
| | | // if(sysUser.getUserName().equals("10001")){ |
| | | ksproList = projectService.getHuaYanProId(); |
| | | // } |
| | | // else { |
| | | // ksproList = projectService.getKsTjProjectIdListBydeptId(String.valueOf(ksId)); |
| | | // } |
| | | |
| | | if (ksproList == null || ksproList.size() == 0) { |
| | | return AjaxResult.error("请完善科室项目信息"); |
| | | } |
| | | //筛选化验的项目。 |
| | | // ksproList = ksproList.stream() |
| | | // .filter(element -> element ==1633660948860522629L) |
| | | // .collect(Collectors.toList()); |
| | | |
| | | List<TjCustomer> customerLis = 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()); |
| | | 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()); |
| | | 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 = null;*/ |
| | | // //根据体检号查 |
| | | // 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()){ |
| | | // key="ks"+":*"; |
| | | // }else { |
| | | // key="ks:"+ksId+":*"; |
| | | // } |
| | | // ScanOptions options = ScanOptions.scanOptions() |
| | | // //这里指定每次扫描key的数量(很多博客瞎说要指定Integer.MAX_VALUE,这样的话跟 keys有什么区别?) |
| | | // .count(10000) |
| | | // .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<>(); |
| | | // while(cursor.hasNext()){ |
| | | // String s = cursor.next().toString(); |
| | | // TjCustomer wj = redisCache.getCacheMapValue(s,"0"); |
| | | // if(null !=wj){ |
| | | // customers.add(wj); |
| | | // } |
| | | // } |
| | | //// //切记这里一定要关闭,否则会耗尽连接数。报Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a |
| | | // cursor.close(); |
| | | // customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); |
| | | map = deptService.getSysDeptHyAndYxYjWjCustomerList13("A30", name, tjNumber, 0, page, pageSize); |
| | | // customerLists = customers; |
| | | } |
| | | if (type == 1) { |
| | | // Cursor cursor = redisTemplate.executeWithStickyConnection(redisConnection -> new ConvertingCursor<>(redisConnection.scan(options), redisSerializer::deserialize)); |
| | | // List<TjCustomer> customers = new ArrayList<>(); |
| | | // while(cursor.hasNext()){ |
| | | // String s = cursor.next().toString(); |
| | | // TjCustomer wj = redisCache.getCacheMapValue(s,"1"); |
| | | // if(null !=wj){ |
| | | // customers.add(wj); |
| | | // } |
| | | // } |
| | | //// //切记这里一定要关闭,否则会耗尽连接数。报Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a |
| | | // cursor.close(); |
| | | // customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); |
| | | map = deptService.getSysDeptHyAndYxYjWjCustomerList13("A30", name, tjNumber, 1, page, pageSize); |
| | | // customerLists = customers; |
| | | } |
| | | // asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId)); |
| | | // AjaxResult map = getAjaxResult(type, page, pageSize, ksproList, customerLis); |
| | | // if (map != null) return map; |
| | | return AjaxResult.success(map); |
| | | } |
| | | |
| | |
| | | @ApiParam(value = "姓名)") @RequestParam(required = false) String name, |
| | | @ApiParam(value = "页码数(默认1)") @RequestParam(defaultValue = "1") Integer page, |
| | | @ApiParam(value = "显示条数(默认10)") @RequestParam(defaultValue = "10") Integer pageSize) { |
| | | /* String userId = SecurityUtils.getLoginUser().getUserId(); |
| | | Integer ksId = null; |
| | | SysUser sysUser = null; |
| | | if (null != userId) { |
| | | sysUser = userService.getById(Long.valueOf(userId)); |
| | | if (null != sysUser) { |
| | | ksId = Math.toIntExact(sysUser.getDeptId()); |
| | | } |
| | | } |
| | | if (ksId == null) { |
| | | return AjaxResult.error("请输入科室id"); |
| | | } |
| | | //根据当前登陆的人的科室id,获取该科室下的所有项目 |
| | | List<Long> postIds = sysUser.getPostIds(); |
| | | List<Long> ksproList = null; |
| | | if (postIds != null) { |
| | | for (Long postId : postIds) { |
| | | LambdaQueryWrapper<SysUserPost> wq111 = new LambdaQueryWrapper<>(); |
| | | wq111.eq(SysUserPost::getPostId, postId); |
| | | SysUserPost one = userPostService.getOne(wq111); |
| | | if (one != null) { |
| | | SysPost byId = postService.getById(one.getPostId()); |
| | | if (byId.getPostName().equals("录入员")) { |
| | | ksproList = projectService.getKsTjProjectIdListBydeptId(String.valueOf(ksId)); |
| | | |
| | | } |
| | | } |
| | | } |
| | | } else { |
| | | ksproList = projectService.getKsTjProjectIdList(); |
| | | } |
| | | //筛选影像的项目。 A32影像 |
| | | if (ksproList.size() == 0) { |
| | | return AjaxResult.error("请完善科室项目信息"); |
| | | } |
| | | ksproList = ksproList.stream() |
| | | .filter(element -> element ==1633660948860522589L |
| | | // || element ==1633660948860522504L |
| | | // || |
| | | // element ==1633660948860522507L|| element ==1633660948860522508L |
| | | // || |
| | | // element ==1633660948860522515L|| element ==1633660948860522516L |
| | | // || |
| | | // element ==1633660948860522517L|| element ==1633660948860522519L |
| | | // || |
| | | // element ==1633660948860522524L|| element ==1633660948860522530L |
| | | // || |
| | | // element ==1633660948860522531L|| element ==1633660948860522533L |
| | | ) |
| | | .collect(Collectors.toList());*/ |
| | | |
| | | |
| | | // List<Long> ksproList = projectService.getYingXiangProId(); |
| | | // List<TjCustomer> customerLis = 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()); |
| | | // 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()); |
| | | // 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 = null; |
| | | 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<>(); |
| | | // while(cursor.hasNext()){ |
| | | // String s = cursor.next().toString(); |
| | | // TjCustomer wj = redisCache.getCacheMapValue(s,"0"); |
| | | // if(null !=wj){ |
| | | // customers.add(wj); |
| | | // } |
| | | // } |
| | | //// //切记这里一定要关闭,否则会耗尽连接数。报Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a |
| | | // cursor.close(); |
| | | // customerLists = redisCache.getCacheMapValue(ksId + "ks", "wj"); |
| | | map = deptService.getSysDeptHyAndYxYjWjCustomerList13("A32", name, tjNumber, 0, page, pageSize); |
| | | // customerLists = customers; |
| | | } |
| | | if (type == 1) { |
| | | // Cursor cursor = redisTemplate.executeWithStickyConnection(redisConnection -> new ConvertingCursor<>(redisConnection.scan(options), redisSerializer::deserialize)); |
| | | // List<TjCustomer> customers = new ArrayList<>(); |
| | | // while(cursor.hasNext()){ |
| | | // String s = cursor.next().toString(); |
| | | // TjCustomer wj = redisCache.getCacheMapValue(s,"1"); |
| | | // if(null !=wj){ |
| | | // customers.add(wj); |
| | | // } |
| | | // } |
| | | //// //切记这里一定要关闭,否则会耗尽连接数。报Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisException: Could not get a |
| | | // cursor.close(); |
| | | // customerLists = redisCache.getCacheMapValue(ksId + "ks", "yj"); |
| | | map = deptService.getSysDeptHyAndYxYjWjCustomerList13("A32", name, tjNumber, 1, page, pageSize); |
| | | // customerLists = customers; |
| | | } |
| | | // asyncService.dockerSetCustomerLisByRedis(ksproList, String.valueOf(ksId)); |
| | | // if (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); |
| | | // } |
| | | } |
| | | |
| | | |
| | |
| | | @ApiParam(value = "年龄单位") @RequestParam String patagename, |
| | | @ApiParam(value = "生日)") @RequestParam Date patbirth) { |
| | | |
| | | String format = DateUtil.format(patbirth, "yyyy.MM.dd"); |
| | | |
| | | List<Map<String, Object>> tjYxjcList = testMapper.getTjYxjcList(patname, sex, null); |
| | | return AjaxResult.success(tjYxjcList); |
| | | } |
| | | |
| | | |
| | | // @GetMapping("/getSsTjYxjcList") |
| | | // @ApiOperation("查询个人影响检查项目结果集(搜素用)") |
| | | // public AjaxResult getSsTjYxjcList(@ApiParam(value = "姓名") @RequestParam String patname, |
| | | // @ApiParam(value = "性别") @RequestParam String sex, |
| | | // @ApiParam(value = "年龄") @RequestParam String patage) { |
| | | // |
| | | // |
| | | // List<Map<String, Object>> tjYxjcList = testMapper.getTjYxjcList(patname,sex,null,null); |
| | | // return AjaxResult.success(tjYxjcList); |
| | | // } |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @GetMapping("/getHistory") |
| | | @ApiOperation("查询客户体检历史记录") |
| | | //@PreAuthorize("@ss.hasPermi('system:dept:getHistory')") |
| | | public AjaxResult getHistory(@RequestParam @ApiParam(value = "体检客户id") Long cusId) { |
| | | Long userId = Long.valueOf(SecurityUtils.getLoginUser().getUserId()); |
| | | Integer ksId = null; |
| | |
| | | @ApiOperation("提交该科室下客户体检结果接口") |
| | | @Transactional |
| | | public AjaxResult addRemark(@ApiParam(value = "体检父项目备注集合") @RequestBody List<TjOrderRemark> remarklList) { |
| | | Long userId = Long.valueOf(SecurityUtils.getLoginUser().getUserId()); |
| | | SysUser sysUser = userService.getById(userId); |
| | | if (remarklList == null || remarklList.isEmpty()) { |
| | | return AjaxResult.success("操作失败"); |
| | | } |
| | | for (TjOrderRemark orderRemark : remarklList) { |
| | | List<String> summaryList = orderRemark.getSummaryList(); |
| | | if (null != summaryList && !summaryList.isEmpty() && !summaryList.contains(null)) { |
| | | orderRemark.setSummary(Joiner.on(";").join(orderRemark.getSummaryList())); |
| | | } else { |
| | | orderRemark.setSummary(null); |
| | | try { |
| | | Long userId = Long.valueOf(SecurityUtils.getLoginUser().getUserId()); |
| | | SysUser sysUser = userService.getById(userId); |
| | | if (remarklList == null || remarklList.isEmpty()) { |
| | | return AjaxResult.success("操作失败"); |
| | | } |
| | | if (StringUtils.isBlank(orderRemark.getRemark())) orderRemark.setRemark(null); |
| | | LambdaQueryWrapper<TjOrder> qw = new LambdaQueryWrapper<>(); |
| | | qw.eq(TjOrder::getTjNumber, orderRemark.getTjNumber()); |
| | | TjOrder order = orderService.getOne(qw); |
| | | orderRemark.setDeptId(sysUser.getDeptId()); |
| | | if (orderRemark.getDoctorName() == null) { |
| | | orderRemark.setDoctorName(String.valueOf(sysUser.getUserId())); |
| | | } |
| | | List<TjOrderDetail> tjOrderDetailList = orderRemark.getTjOrderDetailList(); |
| | | |
| | | // final TjCustomer byId1 = customerService.getById(order.getUserId()); |
| | | if (null != tjOrderDetailList && !tjOrderDetailList.isEmpty()) { |
| | | //----------------------------------start |
| | | // for (TjOrderDetail tjOrderDetail : tjOrderDetailList) { |
| | | // final TjProject byId = projectService.getById(tjOrderDetail.getProId()); |
| | | // //给病种记录表存 方便统计病种和客户信息之间的关系 |
| | | // if (tjOrderDetail.getRulesList()!=null){ |
| | | // for (TjRules tjRules : tjOrderDetail.getRulesList()) { |
| | | // TjOrderDetailRules orderDetailRules=new TjOrderDetailRules(); |
| | | // orderDetailRules.setAid(tjRules.getAid()); |
| | | // if (byId1!=null){ |
| | | // orderDetailRules.setCusName(byId1.getCusName()); |
| | | // orderDetailRules.setCusSex(String.valueOf(byId1.getCusSex())); |
| | | // orderDetailRules.setCusAge(String.valueOf(MatchUtils.getAgeByIdCard(byId1.getCusIdcard()))); |
| | | // orderDetailRules.setCusId(String.valueOf(byId1.getCusId())); |
| | | // } |
| | | // orderDetailRules.setBingzhong(tjRules.getBingzhong()); |
| | | // orderDetailRules.setDoctorName(sysUser.getNickName()); |
| | | // orderDetailRules.setTjNumber(order.getTjNumber()); |
| | | // if (byId!=null){ |
| | | // orderDetailRules.setProId(String.valueOf(byId.getProId())); |
| | | // orderDetailRules.setProName(byId.getProName()); |
| | | // } |
| | | // orderDetailRules.setDoctorId(String.valueOf(sysUser.getUserId())); |
| | | // tjOrderDetailRulesService.save(orderDetailRules); |
| | | // } |
| | | // } |
| | | // } |
| | | asyncService.updateOrdeltile(tjOrderDetailList, sysUser, order,orderRemark); |
| | | LambdaQueryWrapper<TjOrderDetail> qww = new LambdaQueryWrapper<>(); |
| | | qww.eq(TjOrderDetail::getOrderId, order.getOrderId()); |
| | | qww.eq(TjOrderDetail::getProId, orderRemark.getProId()); |
| | | TjOrderDetail detail = detailService.getOne(qww); |
| | | detail.setTjStatus(1L); |
| | | detailService.updateById(detail); |
| | | orderRemark.setType(1); |
| | | LambdaQueryWrapper<TjOrderRemark> wq1 = new LambdaQueryWrapper<>(); |
| | | wq1.eq(TjOrderRemark::getTjNumber, orderRemark.getTjNumber()); |
| | | wq1.eq(TjOrderRemark::getProId, orderRemark.getProId()); |
| | | TjOrderRemark one = remarkService.getOne(wq1); |
| | | if (one == null) { |
| | | TjOrderRemark remark = new TjOrderRemark(); |
| | | BeanUtils.copyBeanProp(orderRemark, remark); |
| | | remarkService.save(remark); |
| | | for (TjOrderRemark orderRemark : remarklList) { |
| | | List<String> summaryList = orderRemark.getSummaryList(); |
| | | if (null != summaryList && !summaryList.isEmpty() && !summaryList.contains(null)) { |
| | | orderRemark.setSummary(Joiner.on(";").join(orderRemark.getSummaryList())); |
| | | } else { |
| | | one.setRemark(orderRemark.getRemark()); |
| | | if (null != summaryList && !summaryList.isEmpty() && !summaryList.contains(null)) { |
| | | one.setSummary(Joiner.on(";").join(orderRemark.getSummaryList())); |
| | | } else { |
| | | one.setSummary(null); |
| | | } |
| | | one.setDoctorName(orderRemark.getDoctorName()); |
| | | one.setType(1); |
| | | remarkService.updateById(one); |
| | | orderRemark.setSummary(null); |
| | | } |
| | | asyncService.updateCheckType(orderRemark.getTjNumber()); |
| | | asyncService.getOrderDetailByProParentId(orderRemark.getTjNumber(), null, String.valueOf(orderRemark.getProId())); |
| | | return AjaxResult.success("操作成功"); |
| | | if (StringUtils.isBlank(orderRemark.getRemark())) orderRemark.setRemark(null); |
| | | TjOrder order = orderService.getOrderByTjNum(orderRemark.getTjNumber()); |
| | | if(null !=order && null !=order.getReportTime())return AjaxResult.error("该人员报告已出 不可修改"); |
| | | orderRemark.setDeptId(sysUser.getDeptId()); |
| | | if (orderRemark.getDoctorName() == null) { |
| | | orderRemark.setDoctorName(String.valueOf(sysUser.getUserId())); |
| | | } |
| | | List<TjOrderDetail> tjOrderDetailList = orderRemark.getTjOrderDetailList(); |
| | | |
| | | // final TjCustomer byId1 = customerService.getById(order.getUserId()); |
| | | if (null != tjOrderDetailList && !tjOrderDetailList.isEmpty()) { |
| | | //----------------------------------start |
| | | // for (TjOrderDetail tjOrderDetail : tjOrderDetailList) { |
| | | // final TjProject byId = projectService.getById(tjOrderDetail.getProId()); |
| | | // //给病种记录表存 方便统计病种和客户信息之间的关系 |
| | | // if (tjOrderDetail.getRulesList()!=null){ |
| | | // for (TjRules tjRules : tjOrderDetail.getRulesList()) { |
| | | // TjOrderDetailRules orderDetailRules=new TjOrderDetailRules(); |
| | | // orderDetailRules.setAid(tjRules.getAid()); |
| | | // if (byId1!=null){ |
| | | // orderDetailRules.setCusName(byId1.getCusName()); |
| | | // orderDetailRules.setCusSex(String.valueOf(byId1.getCusSex())); |
| | | // orderDetailRules.setCusAge(String.valueOf(MatchUtils.getAgeByIdCard(byId1.getCusIdcard()))); |
| | | // orderDetailRules.setCusId(String.valueOf(byId1.getCusId())); |
| | | // } |
| | | // orderDetailRules.setBingzhong(tjRules.getBingzhong()); |
| | | // orderDetailRules.setDoctorName(sysUser.getNickName()); |
| | | // orderDetailRules.setTjNumber(order.getTjNumber()); |
| | | // if (byId!=null){ |
| | | // orderDetailRules.setProId(String.valueOf(byId.getProId())); |
| | | // orderDetailRules.setProName(byId.getProName()); |
| | | // } |
| | | // orderDetailRules.setDoctorId(String.valueOf(sysUser.getUserId())); |
| | | // tjOrderDetailRulesService.save(orderDetailRules); |
| | | // } |
| | | // } |
| | | // } |
| | | asyncService.updateOrdeltile(tjOrderDetailList, sysUser, order,orderRemark); |
| | | LambdaQueryWrapper<TjOrderDetail> qww = new LambdaQueryWrapper<>(); |
| | | qww.eq(TjOrderDetail::getOrderId, order.getOrderId()); |
| | | qww.eq(TjOrderDetail::getProId, orderRemark.getProId()); |
| | | TjOrderDetail detail = detailService.getOne(qww); |
| | | detail.setTjStatus(1L); |
| | | detailService.updateById(detail); |
| | | orderRemark.setType(1); |
| | | LambdaQueryWrapper<TjOrderRemark> wq1 = new LambdaQueryWrapper<>(); |
| | | wq1.eq(TjOrderRemark::getTjNumber, orderRemark.getTjNumber()); |
| | | wq1.eq(TjOrderRemark::getProId, orderRemark.getProId()); |
| | | TjOrderRemark one = remarkService.getOne(wq1); |
| | | if (one == null) { |
| | | TjOrderRemark remark = new TjOrderRemark(); |
| | | BeanUtils.copyBeanProp(orderRemark, remark); |
| | | remarkService.save(remark); |
| | | } else { |
| | | one.setRemark(orderRemark.getRemark()); |
| | | if (null != summaryList && !summaryList.isEmpty() && !summaryList.contains(null)) { |
| | | one.setSummary(Joiner.on(";").join(orderRemark.getSummaryList())); |
| | | } else { |
| | | one.setSummary(null); |
| | | } |
| | | one.setDoctorName(orderRemark.getDoctorName()); |
| | | one.setType(1); |
| | | remarkService.updateById(one); |
| | | } |
| | | asyncService.updateCheckType(orderRemark.getTjNumber()); |
| | | asyncService.getOrderDetailByProParentId(orderRemark.getTjNumber(), null, String.valueOf(orderRemark.getProId())); |
| | | return AjaxResult.success("操作成功"); |
| | | } |
| | | } |
| | | // asyncService.updateCheckType(orderRemark.getTjNumber()); |
| | | // asyncService.getOrderDetailByProParentId(orderRemark.getTjNumber(),null, String.valueOf(orderRemark.getProId())); |
| | | remarkService.tjYishengjianchajianyi(null, null, null, null); |
| | | return AjaxResult.success("操作成功"); |
| | | } catch (NumberFormatException e) { |
| | | log.error(e.getMessage()); |
| | | throw new RuntimeException(e); |
| | | } |
| | | remarkService.tjYishengjianchajianyi(null, null, null, null); |
| | | return AjaxResult.success("操作成功"); |
| | | } |
| | | |
| | | /** |
| | |
| | | @GetMapping("/getParentList") |
| | | @ApiOperation(value = "医生点击体检信息详情(只显示父项目列表)") |
| | | // 修改按照科室查询 |
| | | public AjaxResult getParentList(@ApiParam(value = "客户体检号") @RequestParam String tjNumber) { |
| | | public AjaxResult getParentList(@ApiParam(value = "客户体检号") @RequestParam String tjNumber, |
| | | @ApiParam(value = "已检未检状态 0 未检 1已检") @RequestParam(required = false) Integer type) { |
| | | if(type == null)type= 0; |
| | | String userId = SecurityUtils.getLoginUser().getUserId(); |
| | | log.info("当前登录用户ID ->{}",userId); |
| | | Integer ksId = null; |
| | | SysUser sysUser = null; |
| | | if (null != userId) { |
| | |
| | | if (null == tjOrder) { |
| | | return AjaxResult.error("未找到体检记录"); |
| | | } |
| | | LambdaQueryWrapper<TjFlowingWater> tjFlowingWaterLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | tjFlowingWaterLambdaQueryWrapper.eq(TjFlowingWater::getOrderId, tjOrder.getOrderId()); |
| | | tjFlowingWaterLambdaQueryWrapper.eq(TjFlowingWater::getIsAddition, "N"); |
| | | TjFlowingWater tjFlowingWater = tjFlowingWaterService.getOne(tjFlowingWaterLambdaQueryWrapper); |
| | | if (null != tjFlowingWater) { |
| | | if (tjFlowingWater.getPayStasus() != 1 && tjFlowingWater.getPayStasus() != 3) { |
| | | if (configByKey.equals("Y")) { |
| | | HashMap<String, Object> hisRequestParams = new HashMap<>(); |
| | | // 不在需要身份证号 |
| | | hisRequestParams.put("patientId", tjOrder.getCardId()); |
| | | log.info("ltkj--- " + DateUtil.date() + "操作人id: " + userId + "操作科室: " + sysUser.getDeptId() + "操作的体检人: " + tjNumber); |
| | | AjaxResult queryPay = hisApiGetMethodService.getHISDataNew("QueryPay", hisRequestParams); |
| | | if (Integer.parseInt(queryPay.get("code").toString()) == 200) { |
| | | int sfsf = ltkjJianchajianyanTreeService.getSfsfByCardId(tjOrder.getCardId()); |
| | | if (sfsf > 0) { |
| | | log.error("路泰科技--- " + DateUtil.date() + " 存在未缴费项目的 就单数 " + sfsf); |
| | | log.error("路泰科技--- " + DateUtil.date() + " 存在未缴费项目的 就诊号 " + tjOrder.getCardId() + " 体检号 " + tjOrder.getTjNumber()); |
| | | return AjaxResult.error("存在未缴费项目"); |
| | | |
| | | SysDept dept = deptService.getById(ksId); |
| | | |
| | | if(type !=1){ |
| | | if(null !=dept && !dept.getDeptName().contains("体检中心")){ |
| | | LambdaQueryWrapper<TjFlowingWater> tjFlowingWaterLambdaQueryWrapper = new LambdaQueryWrapper<>(); |
| | | tjFlowingWaterLambdaQueryWrapper.eq(TjFlowingWater::getOrderId, tjOrder.getOrderId()); |
| | | tjFlowingWaterLambdaQueryWrapper.eq(TjFlowingWater::getIsAddition, "N"); |
| | | TjFlowingWater tjFlowingWater = tjFlowingWaterService.getOne(tjFlowingWaterLambdaQueryWrapper); |
| | | if (null != tjFlowingWater) { |
| | | if (tjFlowingWater.getPayStasus() != 1 && tjFlowingWater.getPayStasus() != 3) { |
| | | if (configByKey.equals("Y")) { |
| | | HashMap<String, Object> hisRequestParams = new HashMap<>(); |
| | | // 不在需要身份证号 |
| | | hisRequestParams.put("patientId", tjOrder.getCardId()); |
| | | log.info("ltkj--- " + DateUtil.date() + "操作人id: " + userId + "操作科室: " + sysUser.getDeptId() + "操作的体检人: " + tjNumber); |
| | | AjaxResult queryPay = hisApiGetMethodService.getHISDataNew("QueryPay", hisRequestParams); |
| | | if (Integer.parseInt(queryPay.get("code").toString()) == 200) { |
| | | int sfsf = ltkjJianchajianyanTreeService.getSfsfByCardId(tjOrder.getCardId()); |
| | | int sfsf1 = ltkjJianchajianyanTreeService.getCallSfsfByCardId(tjOrder.getCardId()); |
| | | if (sfsf > 0 || sfsf1 > 0) { |
| | | log.error("路泰科技--- " + DateUtil.date() + " 存在未缴费项目的 就单数 " + sfsf); |
| | | log.error("路泰科技--- " + DateUtil.date() + " 存在未缴费项目的 就诊号 " + tjOrder.getCardId() + " 体检号 " + tjOrder.getTjNumber()); |
| | | return AjaxResult.error("存在未缴费项目"); |
| | | } |
| | | extracted(tjOrder, tjFlowingWater); |
| | | } else { |
| | | log.error("路泰科技--- " + DateUtil.date() + " 未查询到缴费记录的 就诊号 " + tjOrder.getCardId() + " 体检号 " + tjOrder.getTjNumber()); |
| | | return AjaxResult.error("未查询到缴费记录"); |
| | | } |
| | | } |
| | | extracted(tjOrder, tjFlowingWater); |
| | | } else { |
| | | log.error("路泰科技--- " + DateUtil.date() + " 未查询到缴费记录的 就诊号 " + tjOrder.getCardId() + " 体检号 " + tjOrder.getTjNumber()); |
| | | return AjaxResult.error("未查询到缴费记录"); |
| | | } |
| | | } else { |
| | | log.error("路泰科技--- " + DateUtil.date() + " 未对接his接口 " + " 体检号 " + tjOrder.getTjNumber()); |
| | | return AjaxResult.error("未查询到缴费记录"); |
| | | } |
| | | // String s = configService.selectConfigByKey("is_request_common_his_api"); |
| | | // if (null != s && s.equals("Y")) { |
| | | // LambdaQueryWrapper<TjFlowingWater> wrapper1 = new LambdaQueryWrapper<>(); |
| | | // wrapper1.eq(TjFlowingWater::getOrderId, tjOrder.getOrderId()); |
| | | // wrapper1.eq(TjFlowingWater::getPayStasus, 0L); |
| | | // List<TjFlowingWater> list = tjFlowingWaterService.list(wrapper1); |
| | | // if (!list.isEmpty()) { |
| | | // return AjaxResult.error("存在未缴费项目"); |
| | | // } |
| | | // } |
| | | } |
| | | } else { |
| | | log.error("路泰科技--- " + DateUtil.date() + " 未对接his接口 " + " 体检号 " + tjOrder.getTjNumber()); |
| | | return AjaxResult.error("未查询到缴费记录"); |
| | | } |
| | | |
| | | String config = configService.selectConfigByKey("qt_open_xdt"); |
| | |
| | | } |
| | | } |
| | | } |
| | | log.info("type ->{},查询关联科室集合 ->{}",type,split); |
| | | List<TjOrderRemark> list; |
| | | if(null != sysUser && sysUser.getUserName().equals("10001")){ |
| | | list=remarkService.yiShengJianChaGetPrentProCJGLY(tjNumber); |
| | | if(type !=1){ |
| | | list=remarkService.yiShengJianChaGetPrentProCJGLY(tjNumber); |
| | | }else { |
| | | list=remarkService.yiShengJianChaYjGetPrentProCJGLY(tjNumber); |
| | | } |
| | | }else { |
| | | list= remarkService.yiShengJianChaGetPrentPro(tjNumber, split); |
| | | if(type !=1){ |
| | | list= remarkService.yiShengJianChaGetPrentPro(tjNumber, split); |
| | | }else { |
| | | list= remarkService.yiShengJianChaYjGetPrentPro(tjNumber, split); |
| | | } |
| | | } |
| | | if (null ==list || list.isEmpty()) { |
| | | log.info("触发该科室下无项目"); |
| | | return AjaxResult.error("该科室下无项目!"); |
| | | } |
| | | for (TjOrderRemark tjOrderRemark : list) { |