| | |
| | | import com.ltkj.hosp.sqlDomain.LtkjExamJcsqd; |
| | | import com.ltkj.hosp.sqlDomain.LtkjHybgd; |
| | | import com.ltkj.hosp.sqlDomain.LtkjHysqd; |
| | | import com.ltkj.hosp.vodomain.ShenGaoTiZhongVo; |
| | | import com.ltkj.mall.mallOrderUtils.TjConstants; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import com.ltkj.web.config.pdfutils.PDFBinaryUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private IDictCompService compService; |
| | | @Resource |
| | | private ITjReportTemplateService reportTemplateService; |
| | | @Value("${path.filePath}") |
| | | private String value; |
| | | // @Value("${path.filePath}") |
| | | // private String value; |
| | | @Resource |
| | | private LtkjHybgdService ltkjHybgdService; |
| | | @Resource |
| | |
| | | private LtkjExamJcbgdService jcbgdService; |
| | | @Resource |
| | | private LtkjExamJcsqdService jcsqdService; |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | |
| | | |
| | | /** |
| | |
| | | if (jyjgval.compareTo(min) < 0) { |
| | | // jyjg 小于范围最小值,添加下箭头 |
| | | jyjg = jyjg + " ↓"; |
| | | hybgd.setYcbz("1"); |
| | | } else if (jyjgval.compareTo(max) > 0) { |
| | | // jyjg 大于范围最大值,添加上箭头 |
| | | jyjg = jyjg + " ↑"; |
| | | hybgd.setYcbz("1"); |
| | | }else { |
| | | hybgd.setYcbz("0"); |
| | | } |
| | | hybgd.setJyjg(jyjg); |
| | | } catch (Exception ignored) {} |
| | |
| | | @GetMapping("/getShenGaoTiZhong") |
| | | @ApiOperation(value = "小程序-体检报告查询详情") |
| | | public AjaxResult getShenGaoTiZhong(@RequestParam @ApiParam(value = "体检号") String tjNumber) { |
| | | Map<String, Object> objectMap = new HashMap<>(); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | | // Map<String, Object> objectMap = new HashMap<>(); |
| | | LambdaQueryWrapper<TjOrder> wq1 = new LambdaQueryWrapper<>(); |
| | | wq1.eq(TjOrder::getTjNumber, tjNumber); |
| | | wq1.eq(TjOrder::getCheckStatus, 1); |
| | |
| | | return AjaxResult.success("体检暂未完成!!"); |
| | | } |
| | | |
| | | LambdaQueryWrapper<TjOrderDetail> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjOrderDetail::getOrderId, one.getOrderId()); |
| | | wq.in(TjOrderDetail::getProId, "1633660948860522524"); |
| | | final TjOrderDetail one1 = detailService.getOne(wq); |
| | | if (one1 == null) { |
| | | objectMap.put("shenggao", "无"); |
| | | } else { |
| | | objectMap.put("shenggao", one1.getProResult()); |
| | | } |
| | | |
| | | |
| | | LambdaQueryWrapper<TjOrderDetail> wq2 = new LambdaQueryWrapper<>(); |
| | | wq2.eq(TjOrderDetail::getOrderId, one.getOrderId()); |
| | | wq2.in(TjOrderDetail::getProId, "1633660948860522525"); |
| | | final TjOrderDetail one2 = detailService.getOne(wq2); |
| | | if (one2 == null) { |
| | | objectMap.put("tizhong", "无"); |
| | | } else { |
| | | objectMap.put("tizhong", one2.getProResult()); |
| | | } |
| | | |
| | | |
| | | LambdaQueryWrapper<TjOrderDetail> wq3 = new LambdaQueryWrapper<>(); |
| | | wq3.eq(TjOrderDetail::getOrderId, one.getOrderId()); |
| | | wq3.in(TjOrderDetail::getProId, "1633660948860522526"); |
| | | final TjOrderDetail one3 = detailService.getOne(wq3); |
| | | if (one3 == null) { |
| | | objectMap.put("tizhongzhishu", "无"); |
| | | } else { |
| | | objectMap.put("tizhongzhishu", one3.getProResult()); |
| | | } |
| | | |
| | | |
| | | LambdaQueryWrapper<TjOrderDetail> wq4 = new LambdaQueryWrapper<>(); |
| | | wq4.eq(TjOrderDetail::getOrderId, one.getOrderId()); |
| | | wq4.in(TjOrderDetail::getProId, "1633660948860522527"); |
| | | final TjOrderDetail one4 = detailService.getOne(wq4); |
| | | if (one4 == null) { |
| | | objectMap.put("shousuoya", "无"); |
| | | } else { |
| | | objectMap.put("shousuoya", one4.getProResult()); |
| | | } |
| | | |
| | | |
| | | LambdaQueryWrapper<TjOrderDetail> wq5 = new LambdaQueryWrapper<>(); |
| | | wq5.eq(TjOrderDetail::getOrderId, one.getOrderId()); |
| | | wq5.in(TjOrderDetail::getProId, "1633660948860522528"); |
| | | final TjOrderDetail one5 = detailService.getOne(wq5); |
| | | if (one5 == null) { |
| | | objectMap.put("shuzhangya", "无"); |
| | | } else { |
| | | objectMap.put("shuzhangya", one5.getProResult()); |
| | | } |
| | | |
| | | |
| | | return AjaxResult.success(objectMap); |
| | | List<ShenGaoTiZhongVo> maps = detailService.getShenGaoTiZhongList(one.getTjNumber()); |
| | | // if(null !=maps && maps.size()>0){ |
| | | // for (Map<String, Object> map : maps) { |
| | | // if (map.get("") == null) { |
| | | // objectMap.put("shenggao", "无"); |
| | | // } else { |
| | | // objectMap.put("shenggao", one1.getProResult()); |
| | | // } |
| | | // if (one2 == null) { |
| | | // objectMap.put("tizhong", "无"); |
| | | // } else { |
| | | // objectMap.put("tizhong", one2.getProResult()); |
| | | // } |
| | | // if (one3 == null) { |
| | | // objectMap.put("tizhongzhishu", "无"); |
| | | // } else { |
| | | // objectMap.put("tizhongzhishu", one3.getProResult()); |
| | | // } |
| | | // if (one4 == null) { |
| | | // objectMap.put("shousuoya", "无"); |
| | | // } else { |
| | | // objectMap.put("shousuoya", one4.getProResult()); |
| | | // } |
| | | // if (one5 == null) { |
| | | // objectMap.put("shuzhangya", "无"); |
| | | // } else { |
| | | // objectMap.put("shuzhangya", one5.getProResult()); |
| | | // } |
| | | // } |
| | | // } |
| | | log.info("ltkj {}的体检报告查询详情"+maps,tjNumber); |
| | | return AjaxResult.success(maps); |
| | | |
| | | } |
| | | |
| | |
| | | wq1.eq(TjOrder::getTjNumber, tjNumber); |
| | | TjOrder tjOrder = orderService.getOne(wq1); |
| | | |
| | | |
| | | String value = configService.selectConfigByKey("path_filePath"); |
| | | LambdaQueryWrapper<TjCustomer> wq2 = new LambdaQueryWrapper<>(); |
| | | wq2.eq(TjCustomer::getCusId, tjOrder.getUserId()); |
| | | TjCustomer tjCustomer = customerService.getOne(wq2); |
| | |
| | | final String substring = uuid.toString().substring(0, 5); |
| | | |
| | | // String userId = SecurityUtils.getLoginUser().getUsername(); |
| | | PDFBinaryUtil.base64StringToPDF(one.getReport(), FileUtil.mkdir(value).getPath() + "\\" + substring + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf"); |
| | | PDFBinaryUtil.base64StringToPDF(one.getReport(), FileUtil.mkdir(value).getPath() + File.separator + substring + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf"); |
| | | //String filePath = one.getPath(); |
| | | String filePath = value + "\\" + substring + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf"; |
| | | String filePath = value + File.separator + substring + tjNumber + tjCustomer.getCusName() + "_体检报告.pdf"; |
| | | File f = new File(filePath); |
| | | if (filePath.isEmpty()) { |
| | | System.out.println("文件不存在!"); |