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 @@ ...@@ -593,48 +593,41 @@
<select id="getLocation" resultType="Map"> <select id="getLocation" resultType="Map">
SELECT SELECT
* *
FROM FROM
( (
( SELECT stand_code AS location, longitude, latitude FROM jc_airport_stand WHERE is_delete = 0 ORDER BY rec_date DESC) UNION ALL ( SELECT stand_code AS location, longitude, latitude FROM jc_airport_stand WHERE is_delete = 0 ORDER BY rec_date DESC ) UNION ALL
( (
SELECT SELECT
tt.location AS location, tt.location AS location,
tt.longitude AS longitude, tt.longitude AS longitude,
tt.latitude AS latitude tt.latitude AS latitude
FROM FROM
( (
SELECT SELECT
CASE MAX( CASE WHEN FIELD_CODE = 'companyLocation' THEN FIELD_VALUE END ) AS 'location',
MAX( CASE WHEN FIELD_CODE = 'longitude' THEN FIELD_VALUE END ) AS 'longitude',
WHEN MAX( CASE WHEN FIELD_CODE = 'latitude' THEN FIELD_VALUE END ) AS 'latitude'
field_code = 'companyLocation' THEN FROM
field_value cb_dynamic_form_instance
END AS location, WHERE
CASE group_code = '244'
GROUP BY
WHEN field_code = 'longitude' THEN instance_id
field_value ORDER BY
END AS longitude, rec_date DESC
CASE ) tt
WHERE
WHEN field_code = 'latitude' THEN tt.location IS NOT NULL
field_value ) UNION ALL
END AS latitude ( 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
FROM ( SELECT address_desc AS location, longitude, latitude FROM cb_key_site WHERE is_delete = 0 )
cb_dynamic_form_instance ) hh
WHERE WHERE
group_code = '244' ORDER BY rec_date DESC hh.location IS NOT NULL
) tt AND hh.location != ''
WHERE GROUP BY
tt.location IS NOT NULL hh.hh.location
) 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> </select>
......
...@@ -1143,6 +1143,7 @@ public class CommandController extends BaseController { ...@@ -1143,6 +1143,7 @@ public class CommandController extends BaseController {
response.setContentType("multipart/form-data"); response.setContentType("multipart/form-data");
response.setCharacterEncoding("UTF-8"); response.setCharacterEncoding("UTF-8");
response.setContentType("text/html"); response.setContentType("text/html");
response.setHeader("X-Frame-Options", "SAMEORIGIN");
ServletOutputStream out; ServletOutputStream out;
out = response.getOutputStream(); out = response.getOutputStream();
int b = 0; int b = 0;
......
...@@ -222,7 +222,29 @@ ...@@ -222,7 +222,29 @@
</changeSet> </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> </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