| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | private ITjProAdvicerulesService tjProAdvicerulesService; |
| | | @Autowired |
| | | private TjOrderYcxmService ycxmService; |
| | | @Autowired |
| | | private TjReportController reportController; |
| | | @Autowired |
| | | private ISysDictDataService sysDictDataService; |
| | | |
| | |
| | | /** |
| | | * 根据体检订单号获取体检详情信息接口 |
| | | * |
| | | * @param tjNumber |
| | | * @param advice |
| | | * @param checkStatus |
| | | * @return |
| | | */ |
| | | @PostMapping("/getTjdetailList") |
| | |
| | | if (StrUtil.isNotBlank(dto.getZhiyeJg())) |
| | | tjOrder.setZhiyeJg(dto.getZhiyeJg()); |
| | | if (orderService.updateById(tjOrder)) { |
| | | return AjaxResult.success("操作成功"); |
| | | AjaxResult pdf = reportController.toPdf(dto.getTjNumber()); |
| | | if (!pdf.get("code").toString().equals("200") ) { |
| | | TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | return AjaxResult.error("操作失败!"); |
| | | } |
| | | return AjaxResult.success("审核并生成报告成功!"); |
| | | } |
| | | return AjaxResult.error("操作失败"); |
| | | } |
| | |
| | | public AjaxResult getzongjianyishengchakanyichangxiangmu(@RequestParam String tjNum) { |
| | | try { |
| | | if (StrUtil.isNotBlank(tjNum)) { |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | TjOrder one = orderService.getOrderByTjNum(tjNum); |
| | | |
| | | if (one == null) { |
| | | return AjaxResult.error("暂无数据!!"); |
| | | } |
| | | yichangxiangmu(tjNum); |
| | | LambdaQueryWrapper<TjOrderYcxm> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjOrderYcxm::getTjh, tjNum); |
| | | List<TjOrderYcxm> list = ycxmService.list(wq); |
| | | if (null != list && !list.isEmpty()) { |
| | | Collections.reverse(list); |
| | | return getOrderYcxmList(list); |
| | | } else { |
| | | List<TjOrderYcxm> tjOrderYcxmList= ycxmService.selectListByTjh(tjNum); |
| | | if(null!=tjOrderYcxmList&&!tjOrderYcxmList.isEmpty()){ |
| | | LambdaQueryWrapper<TjOrderYcxm> wq = new LambdaQueryWrapper<>(); |
| | | wq.eq(TjOrderYcxm::getTjh, tjNum); |
| | | List<TjOrderYcxm> list = ycxmService.list(wq); |
| | | if (null != list && !list.isEmpty()) { |
| | | Collections.reverse(list); |
| | | return getOrderYcxmList(list); |
| | | } else { |
| | | return AjaxResult.success(maps); |
| | | } |
| | | }else { |
| | | return zongjianyishengchakanyichangxiangmu(tjNum); |
| | | } |
| | | } |