| | |
| | | import java.util.stream.Collectors; |
| | | import java.util.stream.Stream; |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | |
| | | import cn.hutool.core.codec.Base64; |
| | |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpRequest; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | order.setTjCustomerSex(tjCustomer.getCusSex()); |
| | | order.setTjCustomerAge(DateUtil.ageOfNow(tjCustomer.getCusBrithday())); |
| | | order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName())); |
| | | order.setTjCustomerName(MatchUtils.hideCusName(tjCustomer.getCusName())); |
| | | order.setTjCustomerName(tjCustomer.getCusName()); |
| | | order.setTjCustomerPhone(MatchUtils.hidePhoneNum(tjCustomer.getCusPhone())); |
| | | // order.setTjCusIdCard(MatchUtils.hideIdCardNum(tjCustomer.getCusIdcard())); |
| | | order.setTjCusIdCard(tjCustomer.getCusIdcard()); |
| | |
| | | for (TjOrderRemark remark : remarkList) { |
| | | TjProject project = projectService.getTjProjectById(String.valueOf(remark.getProId())); |
| | | if (null != project) { |
| | | if ("N".equals(project.getNeedReport())) { |
| | | continue; |
| | | } |
| | | // if ("N".equals(project.getNeedReport())) { |
| | | // continue; |
| | | // } |
| | | remark.setProCheckType(project.getProCheckType()); |
| | | remark.setProName(project.getProName()); |
| | | } |
| | |
| | | if (tjFlowingWater.getPayStasus() == 1L) { |
| | | tjOrderDetailService.updateTjOrderDetailsByOrderId(String.valueOf(tjOrder.getOrderId()), |
| | | sysUser.getNickName(), String.valueOf(sysUser.getUserId()), String.valueOf(tjFlowingWater.getTjSerialNumber())); |
| | | tjFlowingWater.setPaidIn(tjOrder.getTjFlowingWater().getPaidIn()); |
| | | tjFlowingWater.setCopeWith(tjOrder.getTjFlowingWater().getCopeWith()); |
| | | tjFlowingWater.setPayType(4L); |
| | | tjFlowingWaterService.updateById(tjFlowingWater); |
| | | asyncService.addTjChargingStandard(tjOrder, transitionService.getTbTransitionListByCusId(tjCustomer.getCusIdcard(), tjOrder.getCardId()), sysUser); |
| | | } |
| | | // System.out.println("这段代码时间" + (System.currentTimeMillis() - l)); |
| | | } |
| | |
| | | return AjaxResult.success("暂无历史记录"); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getHistryTjOrderByCusId") |
| | | @ApiOperation(value = "根据客户id查看历史体检记录") |
| | | @Transactional |
| | | public AjaxResult getHistryTjOrderByCusId(@RequestParam String cusId) { |
| | | TjCustomer tjCustomer = tjCustomerService.getById(cusId); |
| | | List<HistoryTjOrder> list = new ArrayList<>(); |
| | | if (null != tjCustomer) { |
| | | List<TjOrder> orderList = tjOrderService.getTjOrderListByCusId(tjCustomer.getCusId()); |
| | | for (TjOrder order : orderList) { |
| | | HistoryTjOrder historyTjOrder = new HistoryTjOrder(); |
| | | historyTjOrder.setUserName(tjCustomer.getCusName()); |
| | | historyTjOrder.setTjNum(order.getTjNumber()); |
| | | historyTjOrder.setTjTime(order.getCreateTime()); |
| | | historyTjOrder.setTjProName(tjOrderService.getHistoryTjOrderProByTjNum(order.getTjNumber())); |
| | | |
| | | //查流水 |
| | | BigDecimal res = new BigDecimal(0); |
| | | LambdaQueryWrapper<TjFlowingWater> wqq = new LambdaQueryWrapper<>(); |
| | | wqq.eq(TjFlowingWater::getOrderId, order.getOrderId()); |
| | | final List<TjFlowingWater> list1 = tjFlowingWaterService.list(wqq); |
| | | if (list1 != null) { |
| | | for (TjFlowingWater tjFlowingWater : list1) { |
| | | if (tjFlowingWater!=null && tjFlowingWater.getPaidIn()!=null){ |
| | | res.add(tjFlowingWater.getPaidIn()); |
| | | } |
| | | } |
| | | } |
| | | historyTjOrder.setPaidIn(res); |
| | | list.add(historyTjOrder); |
| | | } |
| | | } |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | } |
| | | |