| | |
| | | import com.ruoyi.sales.service.ReceiptPaymentService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | |
| | | /** |
| | | * 回款登记新增 |
| | | * @param receiptPayment |
| | | * @param receiptPaymentList |
| | | * @return |
| | | */ |
| | | @PostMapping("/saveOrUpdate") |
| | | public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody ReceiptPayment receiptPayment) { |
| | | receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment); |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult receiptPaymentSaveOrUpdate (@RequestBody List<ReceiptPayment> receiptPaymentList) { |
| | | for (ReceiptPayment receiptPayment : receiptPaymentList) { |
| | | receiptPaymentService.receiptPaymentSaveOrUpdate(receiptPayment); |
| | | } |
| | | |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | |
| | | List<ReceiptPaymentRecordDto> receiptPaymentRecordDtos = new ArrayList<>(); |
| | | salesLedgerIPage.getRecords().forEach(receiptPaymentRecordDto -> { |
| | | ReceiptPaymentRecordDto receiptPaymentRecordDto1 = new ReceiptPaymentRecordDto(); |
| | | BeanUtils.copyBeanProp(receiptPaymentRecordDto, receiptPaymentRecordDto1); |
| | | BeanUtils.copyProperties(receiptPaymentRecordDto, receiptPaymentRecordDto1); |
| | | receiptPaymentRecordDtos.add(receiptPaymentRecordDto1); |
| | | }); |
| | | util.exportExcel(response, receiptPaymentRecordDtos, "导出开票登记列表"); |