feat(crm): 合同模块新增导出选中功能
- 合同列表新增 checkbox 列支持多选
- 新增"导出选中"按钮及 handleExportSelected 方法
- 后端合同查询接口支持按 ids 数组过滤
- 合同导出时设置不分页以导出全部数据
- 刷新表格时自动清除勾选状态
- 修复联系人导出 setPageNo 误用为 setPageSize 的问题
- 移除主数据中采购价列及客户列表中手机、电话、邮箱列
| | |
| | | @ApiAccessLog(operateType = EXPORT) |
| | | public void exportContactExcel(@Valid CrmContactPageReqVO exportReqVO, |
| | | HttpServletResponse response) throws IOException { |
| | | exportReqVO.setPageNo(PAGE_SIZE_NONE); |
| | | exportReqVO.setPageSize(PAGE_SIZE_NONE); // 不分页,导出全部符合条件的联系人 |
| | | List<CrmContactDO> list = contactService.getContactPage(exportReqVO, getLoginUserId()).getList(); |
| | | ExcelUtils.write(response, "联系人.xls", "数据", CrmContactRespVO.class, buildContactDetailList(list)); |
| | | } |
| | |
| | | @ApiAccessLog(operateType = EXPORT) |
| | | public void exportContractExcel(@Valid CrmContractPageReqVO exportReqVO, |
| | | HttpServletResponse response) throws IOException { |
| | | exportReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); // 不分页,导出全部符合条件的合同 |
| | | PageResult<CrmContractDO> pageResult = contractService.getContractPage(exportReqVO, getLoginUserId()); |
| | | // 拼接客户、商机、签约人、回款金额等关联信息 |
| | | List<CrmContractRespVO> list = buildContractDetailList(pageResult.getList()); |
| | |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.ToString; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Schema(description = "管理后台 - CRM 合同分页 Request VO") |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = true) |
| | |
| | | @Schema(description = "过期类型", example = "1") |
| | | private Integer expiryType; // 过期类型,为 null 时则表示全部 |
| | | |
| | | @Schema(description = "合同编号数组", example = "1,2,3") |
| | | private List<Long> ids; // 合同编号数组,为 null 时则表示全部。导出选中时使用 |
| | | |
| | | } |
| | |
| | | CrmContractDO::getId, userId, pageReqVO.getSceneType()); |
| | | // 拼接自身的查询条件 |
| | | query.selectAll(CrmContractDO.class) |
| | | .inIfPresent(CrmContractDO::getId, pageReqVO.getIds()) |
| | | .likeIfPresent(CrmContractDO::getNo, pageReqVO.getNo()) |
| | | .likeIfPresent(CrmContractDO::getName, pageReqVO.getName()) |
| | | .eqIfPresent(CrmContractDO::getCustomerId, pageReqVO.getCustomerId()) |