| | |
| | | import com.ltkj.common.utils.SecurityUtils; |
| | | import com.ltkj.framework.config.MatchUtils; |
| | | import com.ltkj.hosp.domain.*; |
| | | import com.ltkj.hosp.mapper.TjSamplingMapper; |
| | | import com.ltkj.hosp.service.*; |
| | | import com.ltkj.hosp.vodomain.TjCollectFeesVo; |
| | | import com.ltkj.hosp.vodomain.TjRefundProInfoVo; |
| | |
| | | private TjOrderController tjOrderController; |
| | | @Autowired |
| | | private ITbTransitionService tbTransitionService; |
| | | @Autowired |
| | | private TjSamplingMapper tjSamplingMapper; |
| | | @Autowired |
| | | private TjProBlService blService; |
| | | |
| | | /** |
| | | * 查询该体检号对应的订单流水列表 |
| | |
| | | // tjFlowingWater.setPayStasus(1L); |
| | | TjOrder order = orderService.getById(tjFlowingWater.getOrderId()); |
| | | |
| | | if (order.getFinishTime() != null) { |
| | | return AjaxResult.error("该人员已签离,不可补录项目!"); |
| | | if (order.getPrintLastTime() != null) { |
| | | return AjaxResult.error("该人员报告已打印,不可补录项目!"); |
| | | } |
| | | |
| | | TjCustomer customer = customerService.getById(order.getUserId()); |
| | |
| | | wrapper.gt(TbTransition::getNowPrice, 0); |
| | | |
| | | List<TbTransition> list = transitionService.list(wrapper); |
| | | |
| | | List<TbTransition> transitions = transitionService.getBlTbTransitionListByCusId(customer.getCusIdcard(), order.getCardId(), jxbz); |
| | | |
| | | |
| | | |
| | | if(null==transitions || transitions.isEmpty()){ |
| | | remarkService.deleteTjOrderDetailByjxbz(jxbz); |
| | | detailService.deleteTjOrderDetailByjxbz(jxbz); |
| | | tjFlowingWaterService.deleteTjOrderDetailByjxbz(jxbz); |
| | | transitionService.deleteTjOrderDetailByjxbz(jxbz); |
| | | blService.remove(new LambdaQueryWrapper<TjProBl>().eq(TjProBl::getTjh,order.getTjNumber()).eq(TjProBl::getBldh, jxbz)); |
| | | List<String> ids=new ArrayList<>(); |
| | | ids.add(jxbz); |
| | | tjSamplingMapper.deleteByTjNumAndCusIdAndJxbz(order.getTjNumber(), order.getUserId(),ids); |
| | | return AjaxResult.error("补录失败,所选项目可能已存在 不可补录!"); |
| | | } |
| | | |
| | | for (TbTransition transition : list) { |
| | | LambdaQueryWrapper<TjProject> wrapper1 = new LambdaQueryWrapper<>(); |
| | | wrapper1.eq(TjProject::getProId, transition.getProId()); |
| | |
| | | JSONObject data = object.getJSONObject("data"); |
| | | tjFlowingWater.setHisWaterId(data.getStr("feiYongId")); |
| | | JSONArray mxList = data.getJSONArray("mxList"); |
| | | if (mxList != null && mxList.size() > 0) { |
| | | if (mxList != null && !mxList.isEmpty()) { |
| | | List<TjFlowingWaterHis> his = mxList.toList(TjFlowingWaterHis.class); |
| | | tjFlowingWaterHisService.saveBatch(his); |
| | | } |
| | |
| | | .or() |
| | | .eq(TjCustomer::getCusPhone, tjPhone); |
| | | List<TjCustomer> customerList = customerService.list(wq0); |
| | | if (null != customerList && customerList.size() > 0) { |
| | | if (null != customerList && !customerList.isEmpty()) { |
| | | List<TjRefundVo> tjRefundVoList = new ArrayList<>(); |
| | | for (TjCustomer customer : customerList) { |
| | | LambdaQueryWrapper<TjOrder> wq1 = new LambdaQueryWrapper<>(); |
| | |
| | | wq1.orderByDesc(TjOrder::getCreateTime); |
| | | List<TjOrder> tjOrders = orderService.list(wq1); |
| | | TjOrder order = null; |
| | | if (null != tjOrders && tjOrders.size() > 0) { |
| | | if (null != tjOrders && !tjOrders.isEmpty()) { |
| | | order = tjOrders.get(0); |
| | | } |
| | | if (null == order) { |
| | |
| | | wq1.likeLeft(TjOrder::getTjNumber, tjNum); |
| | | wq1.eq(TjOrder::getCheckStatus, 0); |
| | | List<TjOrder> orderList = orderService.list(wq1); |
| | | if (null != orderList && orderList.size() > 0) { |
| | | if (null != orderList && !orderList.isEmpty()) { |
| | | List<TjRefundVo> tjRefundVoList = new ArrayList<>(); |
| | | for (TjOrder order : orderList) { |
| | | LambdaQueryWrapper<TjFlowingWater> wrapper = new LambdaQueryWrapper<>(); |