| | |
| | | import com.ruoyi.approve.bean.vo.ApproveProcessVO; |
| | | import com.ruoyi.basic.mapper.CustomerMapper; |
| | | import com.ruoyi.basic.pojo.Customer; |
| | | import com.ruoyi.common.enums.IsDeleteEnum; |
| | | import com.ruoyi.common.utils.OrderUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | |
| | | public boolean add(SalesQuotationDto salesQuotationDto) { |
| | | LoginUser loginUser = SecurityUtils.getLoginUser(); |
| | | SalesQuotation salesQuotation = new SalesQuotation(); |
| | | BeanUtils.copyProperties(salesQuotationDto, salesQuotation); |
| | | salesQuotation.setId(null); |
| | | Customer customer = customerMapper.selectById(Long.valueOf(salesQuotationDto.getCustomerId())); |
| | | if (ObjectUtils.isNotEmpty(customer)) { |
| | | salesQuotation.setCustomer(customer.getCustomerName()); |
| | |
| | | // 删除报价审批 |
| | | ApproveProcess one = approveProcessService.getOne(new LambdaQueryWrapper<ApproveProcess>() |
| | | .eq(ApproveProcess::getApproveType, 6) |
| | | .eq(ApproveProcess::getApproveDelete, IsDeleteEnum.NOT_DELETED) |
| | | .eq(ApproveProcess::getApproveReason, salesQuotation.getQuotationNo())); |
| | | if(one != null){ |
| | | approveProcessService.delByIds(Collections.singletonList(one.getId())); |