| | |
| | | modify sale_ledger_id bigint default 0 null comment '销售台账id'; |
| | | |
| | | |
| | | alter table ticket_registration |
| | | add enter_date timestamp null; |
| | | |
| | |
| | | */ |
| | | @GetMapping("/productRecordPage") |
| | | public AjaxResult productRecordPage(Page page, TicketRegistrationDto ticketRegistrationDto) { |
| | | |
| | | IPage<ProductRecordDto> list = productRecordService.productRecordPage(page,ticketRegistrationDto); |
| | | return AjaxResult.success(list); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.purchase.pojo.TicketRegistration; |
| | | import com.ruoyi.sales.pojo.CommonFile; |
| | | import com.ruoyi.sales.pojo.SalesLedgerProduct; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | private String businessPerson; |
| | | |
| | | |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate enterDate; |
| | | |
| | | /** |
| | | * 业务员id |
| | | */ |
| | |
| | | private String issueDateStart; |
| | | @TableField(exist = false) |
| | | private String issueDateEnd; |
| | | |
| | | @ApiModelProperty(value = "录入时间") |
| | | private LocalDate enterDate; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public IPage<ProductRecordDto> productRecordPage(Page page, TicketRegistrationDto ticketRegistrationDto) { |
| | | IPage<ProductRecordDto> productRecordDtoIPage1 = productRecordMapper.productRecordPage(page, ticketRegistrationDto); |
| | | page.setSize(productRecordDtoIPage1.getTotal()); |
| | | IPage<ProductRecordDto> productRecordDtoIPage = productRecordMapper.productRecordPage(page, ticketRegistrationDto); |
| | | productRecordDtoIPage.getRecords().forEach(productRecordDto -> { |
| | | productRecordDto.setCommonFiles(commonFileMapper.selectList(new LambdaQueryWrapper<CommonFile>().eq(CommonFile::getCommonId, productRecordDto.getTicketRegistrationId()) |
| | |
| | | ticketRegistration.setIssueDate(ticketRegistrationDto.getIssueDate()); |
| | | ticketRegistration.setContractAmount(purchaseLedger.getContractAmount()); |
| | | ticketRegistration.setSalesLedgerId(purchaseLedger.getSalesLedgerId()); |
| | | ticketRegistration.setEnterDate(ticketRegistrationDto.getEnterDate()); |
| | | |
| | | // 4. 处理子表数据 |
| | | List<SalesLedgerProduct> productData = ticketRegistrationDto.getProductData(); |
| | |
| | | fileRecord.setName(originalFilename); |
| | | fileRecord.setUrl(formalFilePath.toString()); |
| | | fileRecord.setCreateTime(LocalDateTime.now()); |
| | | fileRecord.setType(tempFile.getType()); |
| | | fileRecord.setType(4); |
| | | commonFileMapper.insert(fileRecord); |
| | | |
| | | log.info("文件迁移成功: {} -> {}", tempFile.getTempPath(), formalFilePath); |