装备管理 youhua
This commit is contained in:
parent
08b1ed900a
commit
e48b2c58bf
|
|
@ -17,6 +17,7 @@ public class DeptEquipmentConfig extends BaseEntity {
|
|||
private String equipmentId;
|
||||
private List<ConfigEntity> configs;
|
||||
private String configStatus;
|
||||
private String jijuType;
|
||||
|
||||
@Excel(name = "配置值")
|
||||
private String configValue;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
config_value,
|
||||
config_rate,
|
||||
config_description,
|
||||
jiju_type,
|
||||
remark
|
||||
)
|
||||
VALUES
|
||||
|
|
@ -75,6 +76,7 @@
|
|||
#{item.basicConfig},
|
||||
#{item.configurationRate},
|
||||
#{item.configurationDescription},
|
||||
#{jijuType},
|
||||
#{remark}
|
||||
)
|
||||
</foreach>
|
||||
|
|
|
|||
|
|
@ -99,16 +99,44 @@
|
|||
mt.type_id AS equipmentId,
|
||||
mt2.type_name AS equipmentName,
|
||||
mt.type_name AS equipmenttype,
|
||||
mt.jiju_type as jijuType,
|
||||
CASE
|
||||
WHEN MAX(mdc.config_value) IS NOT NULL AND MAX(mdc.config_value) != '' THEN '已配置'
|
||||
ELSE '未配置'
|
||||
|
||||
WHEN MAX( mdc.config_value ) IS NOT NULL
|
||||
AND MAX( mdc.config_value ) != '' THEN
|
||||
'已配置' ELSE '未配置'
|
||||
END AS configStatus
|
||||
FROM ma_type mt
|
||||
FROM
|
||||
ma_type mt
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_dept_config mdc
|
||||
ON mdc.type_id = mt.type_id
|
||||
LEFT JOIN ma_dept_config mdc ON mdc.type_id = mt.type_id
|
||||
AND mdc.dept_id = #{deptId}
|
||||
WHERE mt.level = 3
|
||||
WHERE
|
||||
mt.LEVEL =5
|
||||
GROUP BY
|
||||
mt.type_id,
|
||||
mt2.type_name,
|
||||
mt.type_name
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
mt.type_id AS equipmentId,
|
||||
mt2.type_name AS equipmentName,
|
||||
mt.type_name AS equipmenttype,
|
||||
mt.jiju_type as jijuType,
|
||||
CASE
|
||||
|
||||
WHEN MAX( mdc.config_value ) IS NOT NULL
|
||||
AND MAX( mdc.config_value ) != '' THEN
|
||||
'已配置' ELSE '未配置'
|
||||
END AS configStatus
|
||||
FROM
|
||||
tool_type mt
|
||||
LEFT JOIN tool_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_dept_config mdc ON mdc.type_id = mt.type_id
|
||||
AND mdc.dept_id = #{deptId}
|
||||
WHERE
|
||||
mt.LEVEL =4
|
||||
<if test="equipmentName != null and equipmentName != ''">
|
||||
AND mt.type_name LIKE CONCAT('%', #{equipmentName}, '%')
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue