create unique index uni on wl_equipment_standard (`type`, `equipment_id`, `org_code`);
</sql>
</changeSet>
<changeSetauthor="ls"id="20220601-1">
<comment>`getChildListdate`</comment>
<sqlendDelimiter="#">
DROP FUNCTION IF EXISTS `getChildListdate`#
CREATE DEFINER=`root`@`%` FUNCTION `getChildListdate`(`p_id` VARCHAR(1000)) RETURNS varchar(5000) CHARSET latin1
BEGIN
DECLARE sTemp TEXT;
DECLARE sTempChd VARCHAR(5000);
SET sTemp='';
SET sTempChd = CAST(p_id AS CHAR);
WHILE sTempChd IS NOT NULL DO
SET sTemp = CONCAT(sTemp,',',sTempChd);
SELECT GROUP_CONCAT(distinct a.instance_id) INTO sTempChd FROM
(select wl_form_instance.instance_id ,wl_form_instance.field_value from wl_form_instance where wl_form_instance.group_type in('building','room','floor') and field_name='parentId') a