feat: 分页默认20条,销售台账导出去掉项目名称,生产订单关联优化
- TableSupport 及首页、知识库分页默认值由 10 调整为 20
- 销售台账导出不再输出项目名称列
- 生产订单/产品主计划关联生产计划改用 json_table,避免 find_in_set 全表扫描
Co-Authored-By: Claude Code <noreply@anthropic.com>
| | |
| | | */ |
| | | @GetMapping("/getList") |
| | | public AjaxResult getList(@RequestParam(defaultValue = "1") long current, |
| | | @RequestParam(defaultValue = "10") long size, KnowledgeBase knowledgeBase) { |
| | | @RequestParam(defaultValue = "20") long size, KnowledgeBase knowledgeBase) { |
| | | Page page = new Page(current, size); |
| | | return AjaxResult.success(knowledgeBaseService.listpage(page, knowledgeBase)); |
| | | } |
| | |
| | | {
|
| | | PageDomain pageDomain = new PageDomain();
|
| | | pageDomain.setPageNum(Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1));
|
| | | pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10));
|
| | | pageDomain.setPageSize(Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 20));
|
| | | pageDomain.setOrderByColumn(ServletUtils.getParameter(ORDER_BY_COLUMN));
|
| | | pageDomain.setIsAsc(ServletUtils.getParameter(IS_ASC));
|
| | | pageDomain.setReasonable(ServletUtils.getParameterToBool(REASONABLE));
|
| | |
| | | @RequestParam(required = false) String status, |
| | | @RequestParam(required = false) String bizDate, |
| | | @RequestParam(defaultValue = "1") Long pageNum, |
| | | @RequestParam(defaultValue = "10") Long pageSize) { |
| | | @RequestParam(defaultValue = "20") Long pageSize) { |
| | | LocalDate queryDate = parseDateOrNull(bizDate); |
| | | if (!isBlank(bizDate) && queryDate == null) { |
| | | return R.fail("bizDate格式错误,请使用yyyy-MM-dd"); |
| | |
| | | /** |
| | | * 项目名称 |
| | | */ |
| | | @Excel(name = "项目名称") |
| | | private String projectName; |
| | | |
| | | /** |
| | |
| | | group_concat(distinct sl2.project_name order by sl2.project_name separator ',') as projectName, |
| | | min(sl2.delivery_date) as deliveryDate |
| | | from production_order po2 |
| | | left join production_plan pp2 |
| | | on find_in_set(pp2.id, replace(replace(replace(po2.production_plan_ids, '[', ''), ']', ''), ' ', '')) > 0 |
| | | join json_table(po2.production_plan_ids, '$[*]' columns(plan_id bigint path '$')) jt |
| | | join production_plan pp2 on pp2.id = jt.plan_id |
| | | left join sales_ledger sl2 on sl2.id = pp2.sales_ledger_id |
| | | group by po2.id |
| | | ) po_sales on po_sales.orderId = po.id |
| | |
| | | group_concat(distinct sl2.project_name order by sl2.project_name separator ',') as projectName, |
| | | min(sl2.delivery_date) as deliveryDate |
| | | from production_order po2 |
| | | left join production_plan pp2 |
| | | on find_in_set(pp2.id, replace(replace(replace(po2.production_plan_ids, '[', ''), ']', ''), ' ', '')) > 0 |
| | | join json_table(po2.production_plan_ids, '$[*]' columns(plan_id bigint path '$')) jt |
| | | join production_plan pp2 on pp2.id = jt.plan_id |
| | | left join sales_ledger sl2 on sl2.id = pp2.sales_ledger_id |
| | | group by po2.id |
| | | ) po_sales on po_sales.orderId = po.id |
| | |
| | | group_concat(distinct sl2.sales_contract_no order by sl2.sales_contract_no separator ',') as salesContractNo, |
| | | group_concat(distinct sl2.customer_name order by sl2.customer_name separator ',') as customerName |
| | | from production_order po2 |
| | | left join production_plan pp2 |
| | | on find_in_set(pp2.id, replace(replace(replace(po2.production_plan_ids, '[', ''), ']', ''), ' ', '')) > 0 |
| | | join json_table(po2.production_plan_ids, '$[*]' columns(plan_id bigint path '$')) jt |
| | | join production_plan pp2 on pp2.id = jt.plan_id |
| | | left join sales_ledger sl2 on sl2.id = pp2.sales_ledger_id |
| | | group by po2.id |
| | | ) po_sales on po_sales.orderId = po.id |