|
@@ -22,8 +22,8 @@
|
|
|
|
|
|
FROM
|
|
FROM
|
|
supplier t1
|
|
supplier t1
|
|
- INNER JOIN supplier_price sp ON t1.ID = sp.FactoryId
|
|
|
|
- INNER JOIN material t3 ON t3.`Code` = sp.MaterialCode
|
|
|
|
|
|
+ LEFT JOIN supplier_price sp ON t1.ID = sp.FactoryId
|
|
|
|
+ LEFT JOIN material t3 ON t3.`Code` = sp.MaterialCode
|
|
<include refid="list_condition"/>
|
|
<include refid="list_condition"/>
|
|
GROUP BY t1.ID
|
|
GROUP BY t1.ID
|
|
ORDER BY t1.CreatedTime DESC
|
|
ORDER BY t1.CreatedTime DESC
|
|
@@ -323,10 +323,11 @@
|
|
select m.SafetyWarnDay safetyWarnDay,
|
|
select m.SafetyWarnDay safetyWarnDay,
|
|
sp.FactoryId factoryId
|
|
sp.FactoryId factoryId
|
|
from material m
|
|
from material m
|
|
- inner join supplier_price sp on sp.FactoryId is not null and sp.MaterialCode = m.Code
|
|
|
|
|
|
+ inner join supplier_price sp on sp.MaterialCode = m.Code and sp.IsDelete = 0
|
|
|
|
+ inner join supplier s on s.ID = sp.FactoryId and s.IsDelete = 0
|
|
where m.IsDelete = 0
|
|
where m.IsDelete = 0
|
|
- and sp.IsDelete = 0
|
|
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
<select id="getSafetyWarnDayBySupplier" resultType="java.util.Map">
|
|
<select id="getSafetyWarnDayBySupplier" resultType="java.util.Map">
|
|
select m.Name materialName,
|
|
select m.Name materialName,
|
|
m.Code materialCode,
|
|
m.Code materialCode,
|