导入测试
This commit is contained in:
@@ -7,8 +7,8 @@ import com.ruoyi.ccdi.domain.dto.CcdiPurchaseTransactionQueryDTO;
|
||||
import com.ruoyi.ccdi.domain.excel.CcdiPurchaseTransactionExcel;
|
||||
import com.ruoyi.ccdi.domain.vo.CcdiPurchaseTransactionVO;
|
||||
import com.ruoyi.ccdi.domain.vo.ImportResultVO;
|
||||
import com.ruoyi.ccdi.domain.vo.PurchaseTransactionImportFailureVO;
|
||||
import com.ruoyi.ccdi.domain.vo.ImportStatusVO;
|
||||
import com.ruoyi.ccdi.domain.vo.PurchaseTransactionImportFailureVO;
|
||||
import com.ruoyi.ccdi.service.ICcdiPurchaseTransactionImportService;
|
||||
import com.ruoyi.ccdi.service.ICcdiPurchaseTransactionService;
|
||||
import com.ruoyi.ccdi.utils.EasyExcelUtil;
|
||||
@@ -175,10 +175,23 @@ public class CcdiPurchaseTransactionController extends BaseController {
|
||||
*/
|
||||
@Operation(summary = "查询导入失败记录")
|
||||
@Parameter(name = "taskId", description = "任务ID", required = true)
|
||||
@Parameter(name = "pageNum", description = "页码", required = false)
|
||||
@Parameter(name = "pageSize", description = "每页条数", required = false)
|
||||
@PreAuthorize("@ss.hasPermi('ccdi:purchaseTransaction:import')")
|
||||
@GetMapping("/importFailures/{taskId}")
|
||||
public AjaxResult getImportFailures(@PathVariable String taskId) {
|
||||
public TableDataInfo getImportFailures(
|
||||
@PathVariable String taskId,
|
||||
@RequestParam(defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(defaultValue = "10") Integer pageSize) {
|
||||
|
||||
List<PurchaseTransactionImportFailureVO> failures = transactionImportService.getImportFailures(taskId);
|
||||
return success(failures);
|
||||
|
||||
// 手动分页
|
||||
int fromIndex = (pageNum - 1) * pageSize;
|
||||
int toIndex = Math.min(fromIndex + pageSize, failures.size());
|
||||
|
||||
List<PurchaseTransactionImportFailureVO> pageData = failures.subList(fromIndex, toIndex);
|
||||
|
||||
return getDataTable(pageData, failures.size());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 采购交易信息Excel导入导出对象
|
||||
@@ -52,33 +54,33 @@ public class CcdiPurchaseTransactionExcel implements Serializable {
|
||||
@ExcelProperty(value = "采购数量", index = 5)
|
||||
@ColumnWidth(15)
|
||||
@Required
|
||||
private String purchaseQty;
|
||||
private BigDecimal purchaseQty;
|
||||
|
||||
/** 预算金额 */
|
||||
@ExcelProperty(value = "预算金额", index = 6)
|
||||
@ColumnWidth(18)
|
||||
@Required
|
||||
private String budgetAmount;
|
||||
private BigDecimal budgetAmount;
|
||||
|
||||
/** 中标金额 */
|
||||
@ExcelProperty(value = "中标金额", index = 7)
|
||||
@ColumnWidth(18)
|
||||
private String bidAmount;
|
||||
private BigDecimal bidAmount;
|
||||
|
||||
/** 实际采购金额 */
|
||||
@ExcelProperty(value = "实际采购金额", index = 8)
|
||||
@ColumnWidth(18)
|
||||
private String actualAmount;
|
||||
private BigDecimal actualAmount;
|
||||
|
||||
/** 合同金额 */
|
||||
@ExcelProperty(value = "合同金额", index = 9)
|
||||
@ColumnWidth(18)
|
||||
private String contractAmount;
|
||||
private BigDecimal contractAmount;
|
||||
|
||||
/** 结算金额 */
|
||||
@ExcelProperty(value = "结算金额", index = 10)
|
||||
@ColumnWidth(18)
|
||||
private String settlementAmount;
|
||||
private BigDecimal settlementAmount;
|
||||
|
||||
/** 采购方式 */
|
||||
@ExcelProperty(value = "采购方式", index = 11)
|
||||
@@ -115,47 +117,47 @@ public class CcdiPurchaseTransactionExcel implements Serializable {
|
||||
@ExcelProperty(value = "采购申请日期", index = 17)
|
||||
@ColumnWidth(18)
|
||||
@Required
|
||||
private String applyDate;
|
||||
private Date applyDate;
|
||||
|
||||
/** 采购计划批准日期 */
|
||||
@ExcelProperty(value = "采购计划批准日期", index = 18)
|
||||
@ColumnWidth(18)
|
||||
private String planApproveDate;
|
||||
private Date planApproveDate;
|
||||
|
||||
/** 采购公告发布日期 */
|
||||
@ExcelProperty(value = "采购公告发布日期", index = 19)
|
||||
@ColumnWidth(18)
|
||||
private String announceDate;
|
||||
private Date announceDate;
|
||||
|
||||
/** 开标日期 */
|
||||
@ExcelProperty(value = "开标日期", index = 20)
|
||||
@ColumnWidth(18)
|
||||
private String bidOpenDate;
|
||||
private Date bidOpenDate;
|
||||
|
||||
/** 合同签订日期 */
|
||||
@ExcelProperty(value = "合同签订日期", index = 21)
|
||||
@ColumnWidth(18)
|
||||
private String contractSignDate;
|
||||
private Date contractSignDate;
|
||||
|
||||
/** 预计交货日期 */
|
||||
@ExcelProperty(value = "预计交货日期", index = 22)
|
||||
@ColumnWidth(18)
|
||||
private String expectedDeliveryDate;
|
||||
private Date expectedDeliveryDate;
|
||||
|
||||
/** 实际交货日期 */
|
||||
@ExcelProperty(value = "实际交货日期", index = 23)
|
||||
@ColumnWidth(18)
|
||||
private String actualDeliveryDate;
|
||||
private Date actualDeliveryDate;
|
||||
|
||||
/** 验收日期 */
|
||||
@ExcelProperty(value = "验收日期", index = 24)
|
||||
@ColumnWidth(18)
|
||||
private String acceptanceDate;
|
||||
private Date acceptanceDate;
|
||||
|
||||
/** 结算日期 */
|
||||
@ExcelProperty(value = "结算日期", index = 25)
|
||||
@ColumnWidth(18)
|
||||
private String settlementDate;
|
||||
private Date settlementDate;
|
||||
|
||||
/** 申请人工号 */
|
||||
@ExcelProperty(value = "申请人工号", index = 26)
|
||||
|
||||
Reference in New Issue
Block a user