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}, '%')