Commit eea3cd6c authored by chenzhao's avatar chenzhao

Merge branch 'develop_dl_plan6_temp_merge_colony' of…

Merge branch 'develop_dl_plan6_temp_merge_colony' of http://39.98.45.134:8090/moa/amos-boot-biz into develop_dl_plan6_temp_merge_colony
parents 3ab8d98f 41ea5228
......@@ -593,48 +593,41 @@
<select id="getLocation" resultType="Map">
SELECT
*
FROM
(
( SELECT stand_code AS location, longitude, latitude FROM jc_airport_stand WHERE is_delete = 0 ORDER BY rec_date DESC) UNION ALL
(
SELECT
tt.location AS location,
tt.longitude AS longitude,
tt.latitude AS latitude
FROM
(
SELECT
CASE
WHEN
field_code = 'companyLocation' THEN
field_value
END AS location,
CASE
WHEN field_code = 'longitude' THEN
field_value
END AS longitude,
CASE
WHEN field_code = 'latitude' THEN
field_value
END AS latitude
FROM
cb_dynamic_form_instance
WHERE
group_code = '244' ORDER BY rec_date DESC
) tt
WHERE
tt.location IS NOT NULL
) UNION ALL
( SELECT address AS location, coordinate_x AS longitude, coordinate_y AS latitude FROM jc_alert_called WHERE is_delete = 0 ORDER BY rec_date DESC) UNION ALL
( SELECT address_desc AS location, longitude, latitude FROM cb_key_site WHERE is_delete = 0 )
) hh
WHERE
hh.location IS NOT NULL
AND hh.location != '' GROUP by hh.hh.location
*
FROM
(
( SELECT stand_code AS location, longitude, latitude FROM jc_airport_stand WHERE is_delete = 0 ORDER BY rec_date DESC ) UNION ALL
(
SELECT
tt.location AS location,
tt.longitude AS longitude,
tt.latitude AS latitude
FROM
(
SELECT
MAX( CASE WHEN FIELD_CODE = 'companyLocation' THEN FIELD_VALUE END ) AS 'location',
MAX( CASE WHEN FIELD_CODE = 'longitude' THEN FIELD_VALUE END ) AS 'longitude',
MAX( CASE WHEN FIELD_CODE = 'latitude' THEN FIELD_VALUE END ) AS 'latitude'
FROM
cb_dynamic_form_instance
WHERE
group_code = '244'
GROUP BY
instance_id
ORDER BY
rec_date DESC
) tt
WHERE
tt.location IS NOT NULL
) UNION ALL
( SELECT address AS location, coordinate_x AS longitude, coordinate_y AS latitude FROM jc_alert_called WHERE is_delete = 0 ORDER BY rec_date DESC ) UNION ALL
( SELECT address_desc AS location, longitude, latitude FROM cb_key_site WHERE is_delete = 0 )
) hh
WHERE
hh.location IS NOT NULL
AND hh.location != ''
GROUP BY
hh.hh.location
</select>
......
......@@ -1143,6 +1143,7 @@ public class CommandController extends BaseController {
response.setContentType("multipart/form-data");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html");
response.setHeader("X-Frame-Options", "SAMEORIGIN");
ServletOutputStream out;
out = response.getOutputStream();
int b = 0;
......
......@@ -222,7 +222,29 @@
</changeSet>
<changeSet author="tw" id="20221121-01" runAlways="true">
<comment>`getBuildingParentIds`</comment>
<sql endDelimiter="#">
DROP FUNCTION IF EXISTS `getBuildingParentIds`#
CREATE DEFINER=`root`@`%` FUNCTION `getBuildingParentIds`(rootId bigint) RETURNS varchar(1000) CHARSET utf8mb4
DETERMINISTIC
BEGIN
DECLARE fid bigint default 0;
DECLARE str varchar(1000) default concat(rootId, '');
WHILE rootId != 0 do
SET fid =(SELECT parentid FROM get_building_tree WHERE instanceId = rootId);
IF fid != 0 THEN
SET str = concat(str, ',', fid);
SET rootId = fid;
ELSE
SET rootId = fid;
END IF;
END WHILE;
return str;
END#
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment