zjh
2023-10-12 8cde7ee1143bae70eb68d2b75f572d5b4dbadf98
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjFlowingWaterController.java
@@ -104,7 +104,7 @@
    /**
     * 查询体检流水列表
     */
    @PreAuthorize("@ss.hasPermi('hosp:water:list')")
//    @PreAuthorize("@ss.hasPermi('hosp:water:list')")
    @GetMapping("/list")
    @ApiOperation(value = "查询体检流水列表")
    public TableDataInfo list(TjFlowingWater tjFlowingWater) {
@@ -258,7 +258,7 @@
    /**
     * 删除体检流水
     */
    @PreAuthorize("@ss.hasPermi('hosp:water:remove')")
//    @PreAuthorize("@ss.hasPermi('hosp:water:remove')")
    @Log(title = "体检流水", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public AjaxResult remove(@PathVariable String[] ids) {
@@ -418,7 +418,7 @@
                                tjRefundVo.setTjName(MatchUtils.hideCusName(customer.getCusName()));
                                tjRefundVo.setTjPhone(MatchUtils.hidePhoneNum(customer.getCusPhone()));
                                tjRefundVo.setSex(String.valueOf(customer.getCusSex()));
                                tjRefundVo.setIdCard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                               if(null !=customer.getCusIdcard()) tjRefundVo.setIdCard(MatchUtils.hideIdCardNum(customer.getCusIdcard()));
                                DictComp dictComp = compService.getById(order.getFirmId());
                                if(null !=dictComp){
                                    tjRefundVo.setTjComp(dictComp.getCnName());
@@ -539,18 +539,28 @@
                if (null != tjProjectList && tjProjectList.size() > 0) {
                    for (TjProject project : tjProjectList) {
                        if (project.getProParentId() == 0) {
                            LambdaQueryWrapper<TbTransition> wqq1 = new LambdaQueryWrapper<>();
                            wqq1.eq(TbTransition::getCusId, customerService.getById(order.getUserId()).getCusIdcard());
                            wqq1.eq(TbTransition::getParentProId, project.getProId());
                            List<TbTransition> tbTransitionList = transitionService.list(wqq1);
                            BigDecimal bigDecimal = new BigDecimal("0.00");
                            BigDecimal bigDecimal1 = new BigDecimal("0.00");
                            for (TbTransition transition : tbTransitionList) {
                                 bigDecimal = bigDecimal.add(transition.getNowPrice());
                                 bigDecimal1=bigDecimal1.add(transition.getOrdPrice());
                            //                            LambdaQueryWrapper<TbTransition> wqq1 = new LambdaQueryWrapper<>();
//                            wqq1.eq(TbTransition::getCusId, customerService.getById(order.getUserId()).getCusIdcard());
//                            wqq1.eq(TbTransition::getParentProId, project.getProId());
//                            List<TbTransition> tbTransitionList = transitionService.list(wqq1);
//                            BigDecimal bigDecimal = new BigDecimal("0.00");
//                            BigDecimal bigDecimal1 = new BigDecimal("0.00");
//                            for (TbTransition transition : tbTransitionList) {
//                                 bigDecimal = bigDecimal.add(transition.getNowPrice());
//                                 bigDecimal1=bigDecimal1.add(transition.getOrdPrice());
//                            }
//                            project.setProPrice(bigDecimal.setScale(0,BigDecimal.ROUND_UP));
//                            project.setProOrdPrice(bigDecimal1);
                            BigDecimal decimal = transitionService.getTbTransitionPriceAndOrdPrice(customerService.getById(order.getUserId()).getCusIdcard(),
                                    project.getProId());
                            String s = tjFlowingWaterService.getDiscount(OrderId);
                            if(null !=decimal){
                                project.setProPrice(decimal.setScale(2));
                                project.setProOrdPrice(decimal.multiply(new BigDecimal(s)).setScale(2));
                            }else {
                                project.setProPrice(new BigDecimal("0.00"));
                                project.setProOrdPrice(new BigDecimal("0.00"));
                            }
                            project.setProPrice(bigDecimal.setScale(0,BigDecimal.ROUND_UP));
                            project.setProOrdPrice(bigDecimal1);
                        }
                    }
                }