From 2279eae481e6e2b6f9fe96fa196dd5f0ff6cf767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=82=E7=B3=96?= Date: Sat, 11 Jul 2026 17:17:46 +0800 Subject: [PATCH 1/5] =?UTF-8?q?refactor(wms/cost):=20optimize=E6=8A=98?= =?UTF-8?q?=E7=BA=BF=E5=9B=BE=E5=BC=B9=E7=AA=97=E4=BA=A4=E4=BA=92=E4=B8=8E?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 钢卷发货弹窗增加确认步骤,优化用户操作流程 2. 调整报表时间范围默认从07:00开始而非00:00 3. 重构成本综合页面折线图弹窗: - 新增可拖拽排序的标签选择器 - 本地缓存已选图表列配置 - 优化弹窗样式与空状态提示 --- klp-ui/src/views/cost/comprehensive.vue | 117 ++++++++++++++++-- klp-ui/src/views/wms/coil/panels/base.vue | 7 +- .../src/views/wms/report/template/action.vue | 8 +- 3 files changed, 119 insertions(+), 13 deletions(-) diff --git a/klp-ui/src/views/cost/comprehensive.vue b/klp-ui/src/views/cost/comprehensive.vue index 5a7c79e2d..6736f42c7 100644 --- a/klp-ui/src/views/cost/comprehensive.vue +++ b/klp-ui/src/views/cost/comprehensive.vue @@ -337,12 +337,38 @@ - -
-
+ +
+
+ 已选 + {{ col.itemName || col.metricName || '' }} +
+
+ 待选 + {{ col.itemName || col.metricName || '' }} +
+
+
+
+
@@ -498,7 +524,10 @@ export default { backfilling: false, progressOpen: false, progressTitle: '', progressTasks: [], anomalyOpen: false, anomalyMap: {}, - chartOpen: false, _chartInstances: [] + chartOpen: false, _chartInstances: [], + chartSelectedKeys: [], + _chartTagDragIdx: -1, + _chartTagDragOverIdx: -1 } }, computed: { @@ -599,6 +628,15 @@ export default { const key = 'mv' + col.mIdx return this.gridRows.some(r => r[key] != null) }) + }, + chartActiveCols() { + return this.chartSelectedKeys + .map(key => this.chartDataCols.find(c => this.getColKey(c) === key)) + .filter(Boolean) + }, + chartUnselectedCols() { + const set = new Set(this.chartSelectedKeys) + return this.chartDataCols.filter(c => !set.has(this.getColKey(c))) } }, watch: { configOpen(v) { if (!v) this.rpOpen = false } }, @@ -1266,11 +1304,69 @@ export default { } return makeOption(label, [{ type: 'line', data: rows.map(r => { const v = parseFloat(r['mv'+col.mIdx]); return isNaN(v) ? 0 : v }), smooth: true }]) }, + getColKey(col) { + if (col.$type === 'detail') return 'd-' + col.itemId + return 'm-' + (col.metricId != null ? col.metricId : 'idx' + col.mIdx) + }, + loadChartSelection() { + if (!this.activeReport) return + const key = 'cost_chart_cols_' + this.activeReport.reportId + const allKeys = this.chartDataCols.map(c => this.getColKey(c)) + let selected = [] + try { + const saved = localStorage.getItem(key) + if (saved) { + const parsed = JSON.parse(saved) + selected = (parsed.selected || []).filter(k => allKeys.includes(k)) + } + } catch (e) { /* ignore */ } + this.chartSelectedKeys = selected + }, + saveChartSelection() { + if (!this.activeReport) return + const key = 'cost_chart_cols_' + this.activeReport.reportId + localStorage.setItem(key, JSON.stringify({ + selected: this.chartSelectedKeys + })) + }, + addChartCol(key) { + this.chartSelectedKeys.push(key) + this.saveChartSelection() + this.renderCharts() + }, + removeChartCol(key) { + const idx = this.chartSelectedKeys.indexOf(key) + if (idx >= 0) this.chartSelectedKeys.splice(idx, 1) + this.saveChartSelection() + this.renderCharts() + }, + onChartTagDragStart(e, idx) { + this._chartTagDragIdx = idx + this._chartTagDragOverIdx = -1 + if (e.dataTransfer) e.dataTransfer.effectAllowed = 'move' + }, + onChartTagDragEnter(idx) { this._chartTagDragOverIdx = idx }, + onChartTagDragLeave() { this._chartTagDragOverIdx = -1 }, + onChartTagDragEnd() { this._chartTagDragIdx = -1; this._chartTagDragOverIdx = -1 }, + onChartTagDrop(targetIdx) { + if (this._chartTagDragIdx < 0 || this._chartTagDragIdx === targetIdx) { this._chartTagDragIdx = -1; this._chartTagDragOverIdx = -1; return } + const [item] = this.chartSelectedKeys.splice(this._chartTagDragIdx, 1) + const insertAt = this._chartTagDragIdx < targetIdx ? targetIdx - 1 : targetIdx + this.chartSelectedKeys.splice(insertAt, 0, item) + this._chartTagDragIdx = -1 + this._chartTagDragOverIdx = -1 + this.saveChartSelection() + this.renderCharts() + }, + onChartOpen() { + this.loadChartSelection() + this.renderCharts() + }, renderCharts() { this.disposeCharts() this.$nextTick(() => { this._chartInstances = [] - this.chartDataCols.forEach((col, idx) => { + this.chartActiveCols.forEach((col, idx) => { const el = this.$refs['chart_'+idx] if (!el || !el[0]) return const chart = echarts.init(el[0]) @@ -1344,9 +1440,16 @@ export default { /deep/ .summary-row td .cell { color: #303133; } .summary-label { font-weight: bold; color: #303133; padding: 0 5px; } .summary-val { font-weight: bold; color: #303133; } -/deep/ .chart-fullscreen { width: 100% !important; max-width: 100% !important; height: 100vh !important; margin: 0 !important; } -/deep/ .chart-fullscreen .el-dialog__body { height: calc(100vh - 90px); overflow: auto; padding: 16px 20px; } +/deep/ .chart-fullscreen { width: 100% !important; max-width: 100% !important; margin: 0 !important; } +/deep/ .chart-fullscreen .el-dialog__body { max-height: calc(100vh - 90px); overflow: auto; padding: 16px 20px; } /deep/ .chart-fullscreen .el-dialog__header { padding: 12px 20px; } +.chart-tag-bar { padding: 0 4px 8px; } +.chart-tag-row { display: flex; flex-wrap: wrap; align-items: center; margin-bottom: 4px; } +.chart-tag-row:last-child { margin-bottom: 0; } +.chart-tag-label { font-size: 12px; color: #909399; margin-right: 4px; flex-shrink: 0; } +/deep/ .chart-tag-row .el-tag { transition: transform 0.15s, opacity 0.15s; user-select: none; margin: 1px 4px 1px 0; } +/deep/ .chart-tag-row .el-tag.is-dragging { opacity: 0.3; transform: scale(0.92); } +/deep/ .chart-tag-row .el-tag.drag-over { transform: translateY(-2px); border-color: #409eff !important; } .chart-grid { display: flex; flex-wrap: wrap; } .chart-item { width: 33.33%; padding: 6px; box-sizing: border-box; } diff --git a/klp-ui/src/views/wms/coil/panels/base.vue b/klp-ui/src/views/wms/coil/panels/base.vue index b3bdc664a..a32a88cc8 100644 --- a/klp-ui/src/views/wms/coil/panels/base.vue +++ b/klp-ui/src/views/wms/coil/panels/base.vue @@ -2298,8 +2298,9 @@ export default { }); }, handleExportCoil(row) { - exportCoil(row.coilId).then(response => { - this.$modal.msgSuccess("发货成功"); + this.$modal.confirm('是否确认将钢卷"' + row.currentCoilNo + '"进行发货?').then(() => { + exportCoil(row.coilId).then(response => { + this.$modal.msgSuccess("发货成功"); // 2. 插入一条已完成的待操作记录 addPendingAction({ coilId: row.coilId, @@ -2318,6 +2319,8 @@ export default { }).catch(error => { this.$modal.msgError("发货失败"); }); + }).catch(() => { + }); }, async handleNewExport(row) { this.loading = true diff --git a/klp-ui/src/views/wms/report/template/action.vue b/klp-ui/src/views/wms/report/template/action.vue index 4f25f6afb..333508d1d 100644 --- a/klp-ui/src/views/wms/report/template/action.vue +++ b/klp-ui/src/views/wms/report/template/action.vue @@ -530,8 +530,8 @@ export default { } return { - start: `${startDate} 00:00:00`, - end: `${endDate} 23:59:59` + start: `${startDate} 07:00:00`, + end: `${endDate} 07:00:00` }; }; @@ -812,8 +812,8 @@ export default { // all 类型:年视图日期变更 handleYearDateChange() { if (this.yearDate) { - this.queryParams.startTime = `${this.yearDate}-01-01 00:00:00`; - this.queryParams.endTime = `${this.yearDate}-12-31 23:59:59`; + this.queryParams.startTime = `${this.yearDate}-01-01 07:00:00`; + this.queryParams.endTime = `${this.yearDate}-12-31 07:00:00`; this.handleQuery(); } }, From 07ec810550284dede391261b8a50d272464eee25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E6=98=8A=E5=A4=A9?= <15984976+n2319_0@user.noreply.gitee.com> Date: Sat, 11 Jul 2026 17:28:35 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=90=84=E4=B8=AA=E9=83=A8=E5=88=86?= =?UTF-8?q?=E7=9A=84=E4=BB=A3=E7=A0=81=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- klp-ui/src/api/system/config.js | 20 +++++++++++-------- .../HomeModules/QuickAccessGroup.vue | 8 ++++++-- klp-ui/src/utils/request.js | 17 ++++++++++++---- 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/klp-ui/src/api/system/config.js b/klp-ui/src/api/system/config.js index 02f0cfcd4..ecf0556f6 100644 --- a/klp-ui/src/api/system/config.js +++ b/klp-ui/src/api/system/config.js @@ -1,11 +1,12 @@ import request from '@/utils/request' // 查询参数列表 -export function listConfig(query) { +export function listConfig(query, requestOptions = {}) { return request({ url: '/system/config/list', method: 'get', - params: query + params: query, + ...requestOptions }) } @@ -18,28 +19,31 @@ export function getConfig(configId) { } // 根据参数键名查询参数值 -export function getConfigKey(configKey) { +export function getConfigKey(configKey, requestOptions = {}) { return request({ url: '/system/config/configKey/' + configKey, - method: 'get' + method: 'get', + ...requestOptions }) } // 新增参数配置 -export function addConfig(data) { +export function addConfig(data, requestOptions = {}) { return request({ url: '/system/config', method: 'post', - data: data + data: data, + ...requestOptions }) } // 修改参数配置 -export function updateConfig(data) { +export function updateConfig(data, requestOptions = {}) { return request({ url: '/system/config', method: 'put', - data: data + data: data, + ...requestOptions }) } diff --git a/klp-ui/src/components/HomeModules/QuickAccessGroup.vue b/klp-ui/src/components/HomeModules/QuickAccessGroup.vue index dba44d84b..f5d1d858d 100644 --- a/klp-ui/src/components/HomeModules/QuickAccessGroup.vue +++ b/klp-ui/src/components/HomeModules/QuickAccessGroup.vue @@ -802,6 +802,8 @@ export default { pageNum: 1, pageSize: 10, configKey, + }, { + silentError: true, }) const rows = (res && res.rows) || [] const hit = rows.find(item => item && item.configKey === configKey) @@ -839,7 +841,6 @@ export default { this.debugLog('saveConfig-payload-too-long', { payloadLength: payload.length, persistPayload }) if (this.$cache) this.$cache.local.setJSON(storageKey, persistPayload) this.configVisible = false - if (this.$modal) this.$modal.msgWarning(`配置内容过多,后端参数长度上限为500,当前为${payload.length},已使用本地保存`) return } try { @@ -848,6 +849,8 @@ export default { const updateRes = await updateConfig({ ...existsConfig, configValue: payload, + }, { + silentError: true, }) this.debugLog('saveConfig-updateConfig-success', { storageKey, updateRes, existsConfig }) } else { @@ -859,6 +862,8 @@ export default { configValue: payload, configType: 'Y', remark: `工作台快捷入口配置(${label})`, + }, { + silentError: true, }) this.debugLog('saveConfig-addConfig-success', { storageKey, addRes }) } @@ -869,7 +874,6 @@ export default { this.debugLog('saveConfig-upsert-error', e) if (this.$cache) this.$cache.local.setJSON(storageKey, persistPayload) this.configVisible = false - if (this.$modal) this.$modal.msgWarning('保存失败,已使用本地保存') } }, /** diff --git a/klp-ui/src/utils/request.js b/klp-ui/src/utils/request.js index d9622e0c2..8d19f6af4 100644 --- a/klp-ui/src/utils/request.js +++ b/klp-ui/src/utils/request.js @@ -102,6 +102,7 @@ service.interceptors.response.use(res => { const code = res.data.code || 200; // 获取错误信息 const msg = errorCode[code] || res.data.msg || errorCode['default'] + const silentError = !!(res.config && res.config.silentError) // 二进制数据则直接返回 if (res.request.responseType === 'blob' || res.request.responseType === 'arraybuffer') { return res.data @@ -120,13 +121,19 @@ service.interceptors.response.use(res => { } return Promise.reject('无效的会话,或者会话已过期,请重新登录。') } else if (code === 500) { - Message({ message: msg, type: 'error' }) + if (!silentError) { + Message({ message: msg, type: 'error' }) + } return Promise.reject(new Error(msg)) } else if (code === 601) { - Message({ message: msg, type: 'warning' }) + if (!silentError) { + Message({ message: msg, type: 'warning' }) + } return Promise.reject('error') } else if (code !== 200) { - Notification.error({ title: msg }) + if (!silentError) { + Notification.error({ title: msg }) + } return Promise.reject('error') } else { return res.data @@ -142,7 +149,9 @@ service.interceptors.response.use(res => { } else if (message.includes("Request failed with status code")) { message = "系统接口" + message.substr(message.length - 3) + "异常"; } - Message({ message: message, type: 'error', duration: 5 * 1000 }) + if (!(error.config && error.config.silentError)) { + Message({ message: message, type: 'error', duration: 5 * 1000 }) + } return Promise.reject(error) } ) From 30a4b11fafe33c56bc2c094c47c4ea43d7aad9ba Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Sat, 11 Jul 2026 17:53:56 +0800 Subject: [PATCH 3/5] =?UTF-8?q?refactor(WmsAnnealPerformance):=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E9=80=80=E7=81=AB=E6=80=A7=E8=83=BD=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=9A=84=E8=BF=87=E6=BB=A4=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除 mapper 中废弃的钢卷号过滤条件和库区筛选参数 - 简化 SQL 查询中的条件判断逻辑 - 统一服务层中的空值检查方法 - 优化查询性能并减少不必要的 JOIN 操作 --- .../impl/WmsAnnealPerformanceServiceImpl.java | 11 +++++------ .../resources/mapper/WmsAnnealPerformanceMapper.xml | 13 +------------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java b/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java index b1bb473d6..4544a10b7 100644 --- a/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java +++ b/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java @@ -144,17 +144,17 @@ public class WmsAnnealPerformanceServiceImpl implements IWmsAnnealPerformanceSer continue; // 没找到加工后的卷,跳过 } - // 如果传入了筛选条件,只保留匹配的钢卷 - if (bo.getEnterCoilNo() != null && !bo.getEnterCoilNo().isEmpty()) { + // 筛选加工后的钢卷 + if (StringUtils.isNotBlank(bo.getEnterCoilNo())) { if (coilVo.getEnterCoilNo() == null || !coilVo.getEnterCoilNo().contains(bo.getEnterCoilNo())) { - continue; // 跳过不匹配的钢卷 + continue; } } - if (bo.getCurrentCoilNo() != null && !bo.getCurrentCoilNo().isEmpty()) { + if (StringUtils.isNotBlank(bo.getCurrentCoilNo())) { if (coilVo.getCurrentCoilNo() == null || !coilVo.getCurrentCoilNo().contains(bo.getCurrentCoilNo())) { - continue; // 跳过不匹配的钢卷 + continue; } } // 钢卷本身的逻辑库区筛选(coilVo.warehouseId保持不变) @@ -164,7 +164,6 @@ public class WmsAnnealPerformanceServiceImpl implements IWmsAnnealPerformanceSer continue; // 跳过不匹配的钢卷 } } - // 为每个planCoil创建独立的detail,携带自身的logicWarehouseId/furnaceLevel WmsAnnealPerformanceDetailVo coilDetail = new WmsAnnealPerformanceDetailVo(); coilDetail.setPlanId(detail.getPlanId()); diff --git a/klp-wms/src/main/resources/mapper/WmsAnnealPerformanceMapper.xml b/klp-wms/src/main/resources/mapper/WmsAnnealPerformanceMapper.xml index 7f9831ef7..94a97fceb 100644 --- a/klp-wms/src/main/resources/mapper/WmsAnnealPerformanceMapper.xml +++ b/klp-wms/src/main/resources/mapper/WmsAnnealPerformanceMapper.xml @@ -17,21 +17,10 @@ AND p.plan_no LIKE CONCAT('%', #{planNo}, '%') - - AND mc.enter_coil_no LIKE CONCAT('%', #{enterCoilNo}, '%') - - - - AND mc.current_coil_no LIKE CONCAT('%', #{currentCoilNo}, '%') - AND pc.logic_warehouse_id = #{warehouseId} - - - AND mc.warehouse_id = #{coilWarehouseId} - @@ -54,7 +43,7 @@ p.end_time AS endTime FROM wms_furnace_plan p LEFT JOIN wms_furnace f ON f.furnace_id = p.target_furnace_id - + INNER JOIN wms_furnace_plan_coil pc ON pc.plan_id = p.plan_id AND pc.del_flag = 0 INNER JOIN wms_material_coil mc ON mc.coil_id = pc.coil_id AND mc.del_flag = 0 From a83a8147a41a759c296aef1710199495c5f9a170 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Sat, 11 Jul 2026 17:57:40 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat(service):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E9=80=80=E7=81=AB=E6=80=A7=E8=83=BD=E6=9C=8D=E5=8A=A1=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 IWmsAnnealPerformanceService 接口中添加 WmsMaterialCoilBo 参数 - 修改 queryPlanCoils 方法签名以支持额外的筛选条件 - 更新控制器 WmsAnnealPerformanceController 中的 getRawCoils 方法参数 - 实现类 WmsAnnealPerformanceServiceImpl 中相应调整方法实现 - 钢卷查询逻辑从硬编码改为通过 coilBo 传入筛选条件 --- .../com/klp/controller/WmsAnnealPerformanceController.java | 5 +++-- .../java/com/klp/service/IWmsAnnealPerformanceService.java | 3 ++- .../klp/service/impl/WmsAnnealPerformanceServiceImpl.java | 5 ++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/klp-wms/src/main/java/com/klp/controller/WmsAnnealPerformanceController.java b/klp-wms/src/main/java/com/klp/controller/WmsAnnealPerformanceController.java index c13628186..b04b7408e 100644 --- a/klp-wms/src/main/java/com/klp/controller/WmsAnnealPerformanceController.java +++ b/klp-wms/src/main/java/com/klp/controller/WmsAnnealPerformanceController.java @@ -2,6 +2,7 @@ package com.klp.controller; import com.klp.common.core.domain.R; import com.klp.domain.bo.WmsAnnealPerformanceBo; +import com.klp.domain.bo.WmsMaterialCoilBo; import com.klp.domain.vo.WmsMaterialCoilVo; import com.klp.domain.vo.anneal.WmsAnnealPerformanceVo; import com.klp.service.IWmsAnnealPerformanceService; @@ -36,7 +37,7 @@ public class WmsAnnealPerformanceController { * 查询退火计划中的加工前钢卷列表 */ @GetMapping("/rawCoils") - public R> getRawCoils(WmsAnnealPerformanceBo bo) { - return R.ok(performanceService.queryPlanCoils(bo)); + public R> getRawCoils(WmsAnnealPerformanceBo bo, WmsMaterialCoilBo coilBo) { + return R.ok(performanceService.queryPlanCoils(bo, coilBo)); } } diff --git a/klp-wms/src/main/java/com/klp/service/IWmsAnnealPerformanceService.java b/klp-wms/src/main/java/com/klp/service/IWmsAnnealPerformanceService.java index 61890b130..6e08554db 100644 --- a/klp-wms/src/main/java/com/klp/service/IWmsAnnealPerformanceService.java +++ b/klp-wms/src/main/java/com/klp/service/IWmsAnnealPerformanceService.java @@ -1,6 +1,7 @@ package com.klp.service; import com.klp.domain.bo.WmsAnnealPerformanceBo; +import com.klp.domain.bo.WmsMaterialCoilBo; import com.klp.domain.vo.WmsMaterialCoilVo; import com.klp.domain.vo.anneal.WmsAnnealPerformanceVo; @@ -19,5 +20,5 @@ public interface IWmsAnnealPerformanceService { /** * 查询退火计划中的加工前钢卷列表 */ - List queryPlanCoils(WmsAnnealPerformanceBo bo); + List queryPlanCoils(WmsAnnealPerformanceBo bo, WmsMaterialCoilBo coilBo); } diff --git a/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java b/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java index 4544a10b7..e7356aefe 100644 --- a/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java +++ b/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java @@ -204,7 +204,7 @@ public class WmsAnnealPerformanceServiceImpl implements IWmsAnnealPerformanceSer } @Override - public List queryPlanCoils(WmsAnnealPerformanceBo bo) { + public List queryPlanCoils(WmsAnnealPerformanceBo bo, WmsMaterialCoilBo coilBo) { // 1. 查询退火计划 LambdaQueryWrapper planQw = new LambdaQueryWrapper() .ge(bo.getStartTime() != null, WmsFurnacePlan::getActualStartTime, bo.getStartTime()) @@ -236,8 +236,7 @@ public class WmsAnnealPerformanceServiceImpl implements IWmsAnnealPerformanceSer return Collections.emptyList(); } - // 3. 按coilId直接查询加工前的钢卷 - WmsMaterialCoilBo coilBo = new WmsMaterialCoilBo(); + // 3. 按coilId查询加工前的钢卷,筛选条件由coilBo带入 coilBo.setCoilIds(coilIds.stream().map(String::valueOf).collect(Collectors.joining(","))); PageQuery pageQuery = new PageQuery(); pageQuery.setPageNum(1); From b0a332fda18d6a23775ef51a79730f6bd1b7abf0 Mon Sep 17 00:00:00 2001 From: Joshi <3040996759@qq.com> Date: Sat, 11 Jul 2026 18:09:34 +0800 Subject: [PATCH 5/5] =?UTF-8?q?fix(anneal):=20=E4=BF=AE=E5=A4=8D=E9=80=80?= =?UTF-8?q?=E7=81=AB=E6=80=A7=E8=83=BD=E6=9F=A5=E8=AF=A2=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=BA=93=E5=8C=BA=E7=AD=9B=E9=80=89=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 移除Mapper中废弃的warehouseId筛选条件 - 删除无用的wms_furnace_plan_coil关联查询 - 修复服务层出炉逻辑库区筛选逻辑 - 添加正确的退火计划钢卷库区匹配验证 - 优化钢卷筛选条件确保数据准确性 - 调整查询性能避免不必要的表连接 --- .../service/impl/WmsAnnealPerformanceServiceImpl.java | 10 ++++++++-- .../resources/mapper/WmsAnnealPerformanceMapper.xml | 8 -------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java b/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java index e7356aefe..893cc2016 100644 --- a/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java +++ b/klp-wms/src/main/java/com/klp/service/impl/WmsAnnealPerformanceServiceImpl.java @@ -157,11 +157,17 @@ public class WmsAnnealPerformanceServiceImpl implements IWmsAnnealPerformanceSer continue; } } - // 钢卷本身的逻辑库区筛选(coilVo.warehouseId保持不变) if (bo.getCoilWarehouseId() != null) { if (coilVo.getWarehouseId() == null || !coilVo.getWarehouseId().equals(bo.getCoilWarehouseId())) { - continue; // 跳过不匹配的钢卷 + continue; + } + } + // 出炉逻辑库区筛选(planCoil.logicWarehouseId是加工后去向) + if (bo.getWarehouseId() != null) { + if (planCoil.getLogicWarehouseId() == null || + !planCoil.getLogicWarehouseId().equals(bo.getWarehouseId())) { + continue; } } // 为每个planCoil创建独立的detail,携带自身的logicWarehouseId/furnaceLevel diff --git a/klp-wms/src/main/resources/mapper/WmsAnnealPerformanceMapper.xml b/klp-wms/src/main/resources/mapper/WmsAnnealPerformanceMapper.xml index 94a97fceb..49a48ae71 100644 --- a/klp-wms/src/main/resources/mapper/WmsAnnealPerformanceMapper.xml +++ b/klp-wms/src/main/resources/mapper/WmsAnnealPerformanceMapper.xml @@ -17,10 +17,6 @@ AND p.plan_no LIKE CONCAT('%', #{planNo}, '%') - - - AND pc.logic_warehouse_id = #{warehouseId} - @@ -43,10 +39,6 @@ p.end_time AS endTime FROM wms_furnace_plan p LEFT JOIN wms_furnace f ON f.furnace_id = p.target_furnace_id - - INNER JOIN wms_furnace_plan_coil pc ON pc.plan_id = p.plan_id AND pc.del_flag = 0 - INNER JOIN wms_material_coil mc ON mc.coil_id = pc.coil_id AND mc.del_flag = 0 - GROUP BY p.plan_id, p.plan_no, p.target_furnace_id, f.furnace_name, p.actual_start_time, p.end_time ORDER BY p.actual_start_time DESC, p.plan_no DESC