| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ltkj.common.core.redis.RedisCache; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.hosp.domain.TjCustomer; |
| | | import com.ltkj.hosp.domain.TjProject; |
| | | import com.ltkj.hosp.domain.TjSampling; |
| | | import com.ltkj.hosp.domain.TjXdPicture; |
| | | import com.ltkj.hosp.service.ITjCustomerService; |
| | | import com.ltkj.hosp.service.ITjProjectService; |
| | | import com.ltkj.hosp.service.ITjXdPictureService; |
| | | import com.ltkj.hosp.service.TjAsyncService; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.system.service.ISysConfigService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private ITjCustomerService customerService; |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | @Resource |
| | | private ITjOrderService orderService; |
| | | @Resource |
| | | private ITjOrderDetailService detailService; |
| | | @Resource |
| | | private ITjOrderRemarkService remarkService; |
| | | @Resource |
| | | private ITjProjectService projectService; |
| | | |
| | | /** |
| | | * 查询体检心电图管理列表 |
| | |
| | | wq.orderByDesc(TjXdPicture::getCreateTime); |
| | | List<TjXdPicture> list = tjXdPictureService.list(wq); |
| | | List<Map<String,Object>> arrayList=new ArrayList<>(); |
| | | if(null !=list && list.size()>0){ |
| | | if(null !=list && !list.isEmpty()){ |
| | | Map<String, List<TjXdPicture>> stringListMap = list.stream().collect(Collectors.groupingBy(TjXdPicture::getCusId)); |
| | | for (Map.Entry<String, List<TjXdPicture>> entry : stringListMap.entrySet()) { |
| | | Map<String,Object>map=new HashMap<>(); |
| | |
| | | } |
| | | List<Map<String, Object>> collect =null; |
| | | Map<String,Object>map=new HashMap<>(); |
| | | if(arrayList.size()>0){ |
| | | if(!arrayList.isEmpty()){ |
| | | collect = arrayList.stream().skip((long) (pageNum - 1) * pageSize).limit(pageSize).collect(Collectors.toList()); |
| | | } |
| | | map.put("list",collect); |
| | |
| | | @PutMapping |
| | | @ApiOperation(value = "修改体检心电图管理") |
| | | public AjaxResult edit(@RequestBody TjXdPicture tjXdPicture) { |
| | | return toAjax(tjXdPictureService.updateTjXdPicture(tjXdPicture)); |
| | | if (tjXdPictureService.updateById(tjXdPicture)) { |
| | | TjOrder order = orderService.getOrderByTjNum(tjXdPicture.getTjNum()); |
| | | LambdaQueryWrapper<TjOrderDetail>wq=new LambdaQueryWrapper<>(); |
| | | wq.eq(TjOrderDetail::getOrderId,order.getOrderId()); |
| | | wq.eq(TjOrderDetail::getProId,tjXdPicture.getProId()); |
| | | TjOrderDetail detail = detailService.getOne(wq); |
| | | detail.setProResult(tjXdPicture.getProResult()); |
| | | detail.setConclusion(tjXdPicture.getConclusion()); |
| | | detail.setTjStatus(1L); |
| | | detailService.updateById(detail); |
| | | |
| | | TjProject tjProject = projectService.getById(tjXdPicture.getProId()); |
| | | TjProject tjProjectp = projectService.getById(tjProject.getProParentId()); |
| | | |
| | | LambdaQueryWrapper<TjOrderDetail>wq1=new LambdaQueryWrapper<>(); |
| | | wq1.eq(TjOrderDetail::getOrderId,order.getOrderId()); |
| | | wq1.eq(TjOrderDetail::getProId,tjProjectp.getProId()); |
| | | TjOrderDetail detailp = detailService.getOne(wq); |
| | | detailp.setTjStatus(1L); |
| | | detailService.updateById(detailp); |
| | | |
| | | LambdaQueryWrapper<TjOrderRemark> wq2=new LambdaQueryWrapper<>(); |
| | | wq2.eq(TjOrderRemark::getTjNumber,tjXdPicture.getTjNum()); |
| | | wq2.eq(TjOrderRemark::getProId,tjProjectp.getProId()); |
| | | TjOrderRemark remark = remarkService.getOne(wq2); |
| | | remark.setType(1); |
| | | remark.setRemark(tjXdPicture.getConclusion()); |
| | | remarkService.updateById(remark); |
| | | return AjaxResult.success(); |
| | | } |
| | | return AjaxResult.error(); |
| | | } |
| | | |
| | | /** |