| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | if (null != tbTransitionList && tbTransitionList.size() > 0) { |
| | | if (redisCache.hasKey(cardId + cusId)) { |
| | | redisCache.deleteObject(cardId + cusId); |
| | |
| | | if (!handleOption.isCanship()) { |
| | | return AjaxResult.error("订单不能核销"); |
| | | } |
| | | Date date = new Date(); |
| | | order.setOrderStatus(OrderUtil.STATUS_SHIP.longValue()); |
| | | order.setShipTime(new Date()); |
| | | order.setConfirmTime(new Date()); |
| | | order.setShipTime(date); |
| | | order.setConfirmTime(date); |
| | | |
| | | MallCheckLog checkLog = new MallCheckLog(); |
| | | String s1 = SecurityUtils.getUsername() + new SimpleDateFormat("yyMMddHHmmssSSS").format(new Date()); |
| | | String s1 = SecurityUtils.getUsername() + new SimpleDateFormat("yyMMddHHmmssSSS").format(date); |
| | | checkLog.setCheckBy(String.valueOf(SecurityUtils.getUserId())); |
| | | checkLog.setUserId(order.getUserId()); |
| | | checkLog.setConsignee(order.getConsignee()); |
| | | checkLog.setIdCard(order.getIdCard()); |
| | | checkLog.setOrderId(String.valueOf(order.getId())); |
| | | checkLog.setOrderSn(order.getOrderSn()); |
| | | checkLog.setCheckTime(new Date()); |
| | | checkLog.setCheckTime(date); |
| | | checkLog.setShipSn("HX" + s1); |
| | | mallCheckLogService.save(checkLog); |
| | | mallOrderService.updateById(order); |
| | |
| | | private List<Map<String, Object>> getMaps(String cusId, String cardId) { |
| | | |
| | | List<TbTransition> transitionList = null; |
| | | if (redisCache.hasKey(cardId + cusId)) { |
| | | transitionList = redisCache.getCacheList(cardId + cusId); |
| | | } else { |
| | | // if (redisCache.hasKey(cardId + cusId)) { |
| | | // transitionList = redisCache.getCacheList(cardId + cusId); |
| | | // } else { |
| | | transitionList = transitionService.getTbTransitionListByCusId(cusId, cardId); |
| | | } |
| | | // } |
| | | if (null == transitionList) return null; |
| | | Map<Long, List<TbTransition>> collect = transitionList.stream().collect(Collectors.groupingBy(TbTransition::getParentProId)); |
| | | List<Map<String, Object>> list = new ArrayList<>(); |
| | |
| | | TjPackage aPackage = tjPackageService.getById(entry.getValue().get(0).getPacId()); |
| | | map.put("pacName", aPackage.getPacName()); |
| | | TjProject tjProject = projectService.getById(entry.getKey()); |
| | | TjPackageProject project = tjPackageProjectService.getOne(new LambdaQueryWrapper<TjPackageProject>().eq(TjPackageProject::getPacId, pacId) |
| | | .eq(TjPackageProject::getProId, entry.getKey())); |
| | | // TjPackageProject project = tjPackageProjectService.getOne(new LambdaQueryWrapper<TjPackageProject>().eq(TjPackageProject::getPacId, pacId) |
| | | // .eq(TjPackageProject::getProId, entry.getKey())); |
| | | map.put("ordPrice", tjProject.getProPrice()); |
| | | if (null != project) { |
| | | map.put("nowPrice", project.getPriceNow()); |
| | | } else { |
| | | map.put("nowPrice", tjProject.getProPrice()); |
| | | } |
| | | // if (null != project) { |
| | | // map.put("nowPrice", project.getPriceNow()); |
| | | // } else { |
| | | // map.put("nowPrice", tjProject.getProPrice()); |
| | | // } |
| | | map.put("nowPrice",transitionService.getTbTransitionDxPriceByPac(cusId,entry.getKey(),cardId,pacId)); |
| | | } else { |
| | | map.put("pacName", "单项"); |
| | | List<TbTransition> tbTransitionList = entry.getValue(); |
| | |
| | | } |
| | | map.put("parentName", projectService.getById(entry.getKey()).getProName()); |
| | | map.put("list", entry.getValue()); |
| | | |
| | | |
| | | list.add(map); |
| | | } |
| | | return list; |