代码提交
This commit is contained in:
parent
81f82e3007
commit
13aa60f1c5
|
|
@ -589,19 +589,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
CASE
|
CASE
|
||||||
mt.manage_type
|
mt.manage_type
|
||||||
WHEN 0 THEN
|
WHEN 0 THEN
|
||||||
IFNULL( COUNT( mm.ma_id ), 0 ) ELSE IFNULL( mt.storage_num, 0 )
|
IFNULL( COUNT( mm.ma_id ), 0 )
|
||||||
|
ELSE
|
||||||
|
IFNULL( mt.storage_num, 0 )
|
||||||
END AS num,
|
END AS num,
|
||||||
'在库' AS STATUS
|
'在库' AS STATUS
|
||||||
FROM
|
FROM
|
||||||
ma_machine mm
|
ma_type mt
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = mm.type_id
|
LEFT JOIN ma_machine mm ON mt.type_id = mm.type_id
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
WHERE
|
WHERE
|
||||||
mm.ma_code IS NOT NULL
|
mt.LEVEL = 4
|
||||||
AND mm.ma_status IN ( 1 )
|
|
||||||
AND mt.LEVEL = 4
|
|
||||||
<if test="typeName != null and typeName !=''">
|
<if test="typeName != null and typeName !=''">
|
||||||
AND mt2.type_name like concat ('%', #{typeName}, '%')
|
AND mt2.type_name like concat ('%', #{typeName}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
|
@ -611,9 +611,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="isStatics != null">
|
<if test="isStatics != null">
|
||||||
and mt2.is_statics = #{isStatics}
|
and mt2.is_statics = #{isStatics}
|
||||||
</if>
|
</if>
|
||||||
|
AND (
|
||||||
|
mt.manage_type != 0
|
||||||
|
OR (
|
||||||
|
mt.manage_type = 0
|
||||||
|
AND mm.ma_code IS NOT NULL
|
||||||
|
AND mm.ma_status IN (1)
|
||||||
|
))
|
||||||
GROUP BY
|
GROUP BY
|
||||||
mt.type_id
|
mt.type_id)
|
||||||
)
|
|
||||||
</select>
|
</select>
|
||||||
<select id="getPersonNameAndPhone" resultType="com.bonus.system.api.domain.SysUser">
|
<select id="getPersonNameAndPhone" resultType="com.bonus.system.api.domain.SysUser">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue