| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.ltkj.common.annotation.Log; |
| | | import com.ltkj.common.core.controller.BaseController; |
| | |
| | | SysUser sysUser = userService.getById(userId); |
| | | |
| | | TjFlowingWater flowingWater = tjFlowingWaterService.getById(tjFlowingWater.getTjSerialNumber()); |
| | | tjFlowingWater.setTollCollectorId(String.valueOf(SecurityUtils.getLoginUser().getUserId())); |
| | | tjFlowingWater.setPayStasus(1L); |
| | | // tjFlowingWater.setTollCollectorId(String.valueOf(SecurityUtils.getLoginUser().getUserId())); |
| | | // tjFlowingWater.setPayStasus(1L); |
| | | TjOrder order = orderService.getById(tjFlowingWater.getOrderId()); |
| | | |
| | | if(order.getFinishTime() !=null){ |
| | | return AjaxResult.error("该人员已签离,不可补录项目!"); |
| | | } |
| | | |
| | | TjCustomer customer = customerService.getById(order.getUserId()); |
| | | if (null != tjFlowingWater.getTjProIds() && tjFlowingWater.getTjProIds().length > 0) { |
| | | tjFlowingWater.setWaterId(PinyinUtil.getFirstLetter(customer.getCusName(), "").toUpperCase() + DateUtil.format(new Date(), "yyMMddHHmmssSSS")); |
| | | tjFlowingWater.setWaterId(PinyinUtil.getFirstLetter(customer.getCusName(), "").toUpperCase() +SecurityUtils.getUsername() + DateUtil.format(new Date(), "yyMMddHHmmssSSS")); |
| | | tjFlowingWater.setIsAddition("Y"); |
| | | if (tjFlowingWaterService.save(tjFlowingWater)) { |
| | | //异步单项收费明细 |
| | | asyncService.iundividualCharges(tjFlowingWater, order, customer, sysUser); |
| | | // if(!b){ |
| | | // TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); |
| | | // } |
| | | //extracted(tjFlowingWater, order, customer); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("waterId", tjFlowingWater.getWaterId()); |
| | |
| | | } else { |
| | | tjProjectList = detailService.selectTjOrderDetailListByFlowingWaterIdIsNotNull(OrderId); |
| | | } |
| | | String pacId = transitionService.selectPacIdByTbTransitionTjNumAndProId(order.getTjNumber()); |
| | | String pacId = transitionService.selectPacIdByTbTransitionTjNumAndProId(order.getTjNumber(),order.getCardId()); |
| | | String s = tjFlowingWaterService.getDiscount(OrderId); |
| | | if (null != tjProjectList && tjProjectList.size() > 0) { |
| | | for (TjProject project : tjProjectList) { |
| | |
| | | wq.ne(TjOrderDetail::getTjStatus, 3); |
| | | wq.isNotNull(TjOrderDetail::getFlowingWaterId); |
| | | List<TjOrderDetail> detailList = detailService.list(wq); |
| | | String pacId = transitionService.selectPacIdByTbTransitionTjNumAndProId(tjOrder.getTjNumber()); |
| | | String pacId = transitionService.selectPacIdByTbTransitionTjNumAndProId(tjOrder.getTjNumber(),tjOrder.getCardId()); |
| | | if (null != detailList && detailList.size() > 0) { |
| | | List<TjRefundProInfoVo> tjRefundProInfoVoList = new ArrayList<>(); |
| | | for (TjOrderDetail detail : detailList) { |