From 875181b74e35bdb938a712d793a15ce3a85ac6ac Mon Sep 17 00:00:00 2001 From: sunyugang Date: Fri, 15 Aug 2025 16:10:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=AF=8F=E8=BD=AE=E6=8D=9F=E8=80=97=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ktg-admin/src/main/resources/application-dev.yml | 4 ++-- .../src/main/resources/mapper/pro/ProWorkorderMapper.xml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ktg-admin/src/main/resources/application-dev.yml b/ktg-admin/src/main/resources/application-dev.yml index 96f6dfa..fe0d862 100644 --- a/ktg-admin/src/main/resources/application-dev.yml +++ b/ktg-admin/src/main/resources/application-dev.yml @@ -6,9 +6,9 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://101.43.210.133:3306/mes?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + url: jdbc:mysql://localhost:3306/mes?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 username: root - password: yzhs@123 + password: root # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ktg-mes/src/main/resources/mapper/pro/ProWorkorderMapper.xml b/ktg-mes/src/main/resources/mapper/pro/ProWorkorderMapper.xml index 07fed37..7e33499 100644 --- a/ktg-mes/src/main/resources/mapper/pro/ProWorkorderMapper.xml +++ b/ktg-mes/src/main/resources/mapper/pro/ProWorkorderMapper.xml @@ -188,8 +188,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t1.unit_of_measure as unitOfMeasure, t1.machinery_name as machineryName, t1.machinery_no as machineryNo, - t3.use_quantity - t4.rt_quantity AS itemQuantity, - t5.productQuantity + ifnull(t3.use_quantity,0) - ifnull(t4.rt_quantity,0) AS itemQuantity, + ifnull(t5.productQuantity,0) as productQuantity from pro_workorder t1 left join pro_machinery_job t2 on t1.workorder_id = t2.workorder_id LEFT JOIN ( @@ -230,7 +230,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" AND wpr.workorder_id IS NOT NULL GROUP BY wpr.workorder_id - ) AS t5 ON t1.workorder_id = t4.workorder_id + ) AS t5 ON t1.workorder_id = t5.workorder_id and t1.workorder_code = #{workorderCode} and t1.workorder_name like concat('%', #{workorderName}, '%')