-- 7.24

-- Auto-generated SQL script #202407240932
UPDATE base.t_jsc_sql
SET jsc_sql='select #{id} as id,round((coalesce(sum(xz_st),0)*0.01)::NUMERIC,2)st_mj, round((coalesce(sum(xz_sjd),0)*0.01)::NUMERIC,2)sjd_mj,round((coalesce(sum(xz_hd),0)*0.01)::NUMERIC,2)hd_mj from ( SELECT xz_st, xz_sjd, xz_hd FROM vector."AFTER_JCSH" x where xzqdm like #{id}||''%'' )t'
WHERE id='40daac2a-8a4a-4e38-9e66-973615b6b5d5';

UPDATE base.t_jsc_sql
SET jsc_sql='select #{id} as id,dj,round((coalesce(sum(tbdlmj),0)/ 1000000)::numeric,2)tbmj from( select case when gjlyd>=1 and gjlyd <= 4 then 1 when gjlyd>=5 and gjlyd <= 8 then 2 when gjlyd>=9 and gjlyd <= 12 then 3 else 4 end dj, tbdlmj from vector."TB_GDZL" x where xzqhdm like #{id} || ''%'' )t group by dj order by dj'
WHERE id='3cfe4498-b451-4833-bb9e-7ff55b10472c';

-- 新增表
vector."TB_GDZL"

-- 修改表结构和数据，需要同步到现场
vector."AFTER_JCSH"