| | |
| | | Date date1 = new Date(System.currentTimeMillis()); |
| | | String s1 = SecurityUtils.getUsername() + new SimpleDateFormat("yyMMddHHmmssSSS").format(date1); |
| | | tjFlowingWater.setWaterId(PinyinUtil.getFirstLetter(tjCustomer.getCusName(), "").toUpperCase() + s1); |
| | | |
| | | |
| | | tjFlowingWater.setCopeWith(tjOrder.getTjFlowingWater().getCopeWith()); |
| | | tjFlowingWater.setPaidIn(tjOrder.getTjFlowingWater().getPaidIn()); |
| | | tjFlowingWater.setDiscount(tjOrder.getTjFlowingWater().getDiscount()); |
| | | |
| | | if (isPay.equals("true")) { |
| | | if (null != mallOrder) { |
| | | if (mallOrder.getOrderStatus().equals(201L)) { |
| | |
| | | mallOrder.setOrderStatus(301L); |
| | | mallOrderService.updateById(mallOrder); |
| | | } |
| | | } else { |
| | | } |
| | | else { |
| | | tjFlowingWater.setCopeWith(tjOrder.getTjFlowingWater().getCopeWith()); |
| | | tjFlowingWater.setPaidIn(tjOrder.getTjFlowingWater().getPaidIn()); |
| | | tjFlowingWater.setDiscount(tjOrder.getTjFlowingWater().getDiscount()); |
| | |
| | | if (tjFlowingWaterService.save(tjFlowingWater)) { |
| | | tjOrder.setTjSerialNumber(String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | tjOrderService.updateById(tjOrder); |
| | | |
| | | |
| | | } |
| | | |
| | | //团体 |
| | | if ("1".equals(tjOrder.getTjType())) { |
| | | asyncService.ttextracted(tjOrder, tjCustomer, sysUser, tjReservation, tjFlowingWater); |
| | | } |
| | | |
| | | |
| | | //个人 |
| | | if ("2".equals(tjOrder.getTjType())) { |
| | | |
| | | //asyncService.newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater); |
| | | newSaveextracted(tjOrder, tjCustomer, discount, sysUser, tjReservation, tjFlowingWater); |
| | | } |
| | |
| | | for (TjPackageProject tjPackageProject : ppList) { |
| | | TjProject project = projectService.getTjProjectById(String.valueOf(tjPackageProject.getProId())); |
| | | if (null != project) { |
| | | BigDecimal divide = tjPackageProject.getPriceNow().divide(project.getProPrice(), 5, RoundingMode.HALF_DOWN); |
| | | |
| | | BigDecimal divide = BigDecimal.valueOf(0); |
| | | if(tjPackageProject.getPriceNow().compareTo(BigDecimal.valueOf(0))==0 || project.getProPrice().compareTo(BigDecimal.valueOf(0))==0 ){ |
| | | divide=BigDecimal.valueOf(0); |
| | | }else { |
| | | divide=tjPackageProject.getPriceNow().divide(project.getProPrice(), 5, RoundingMode.HALF_DOWN); |
| | | } |
| | | List<TjProject> tjProSonList = projectService.getTjProjectListBySoneId(String.valueOf(project.getProId())); |
| | | if (null != tjProSonList && tjProSonList.size() > 0) { |
| | | //addRedisTransitionPac(cusId, tbTransitionList, pacId, tjPackageProject, project, divide, tjProSonList); |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | 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<>(); |
| | |
| | | tjOrderDetailService.saveTjOrderDetailsByCusId(tjCustomer.getCusIdcard(), String.valueOf(tjOrder.getOrderId()), sysUser.getNickName(), String.valueOf(sysUser.getUserId())); |
| | | tjOrderDetailService.saveTjPureToneTesByCusId(tjCustomer.getCusIdcard(), tjOrder.getTjNumber(), sysUser.getNickName(), String.valueOf(sysUser.getUserId())); |
| | | //修改每项的原价现价 //修改临时表体检号 |
| | | transitionService.updateTbTransitionPriceByCusId(tjCustomer.getCusIdcard(), discount, tjOrder.getTjNumber()); |
| | | // transitionService.updateTbTransitionPriceByCusId(tjCustomer.getCusIdcard(), discount, tjOrder.getTjNumber()); |
| | | //添加remark表数据 |
| | | remarkService.saveTjOrderRemarkByOrderId(tjOrder.getTjNumber(), sysUser.getNickName(), String.valueOf(sysUser.getUserId()), String.valueOf(tjOrder.getOrderId())); |
| | | //判断是否交钱 |