Browse Source

再次修改部分SQL报错问题::2024年考录选调生

master
张献维 2 weeks ago
parent
commit
e87a63ba06
  1. 2
      golang_learn/data_office/get_hy_jctj/main.go
  2. 2
      golang_learn/data_office/get_hy_jctj/脚本.sql

2
golang_learn/data_office/get_hy_jctj/main.go

@ -60,7 +60,7 @@ select ifnull(M0203,'') IDNumber,
IF(M0215 = 1, '是', '否') Has2YearsGrassrootsExp, IF(M0215 = 1, '是', '否') Has2YearsGrassrootsExp,
ifnull((select min(code_name) from code_value where M0251=code_value and code_type='M_D_C32_2021'),'') AnnualAssessment2023, ifnull((select min(code_name) from code_value where M0251=code_value and code_type='M_D_C32_2021'),'') AnnualAssessment2023,
ifnull((select case M0104 when 2 then '参照管理机关工作人员' when 3 then '参照管理事业单位人员' else '公务员' end from M_M01 where M_M01.UNID=M_M02.UNID and rpt='2024' limit 1),'') PersonCategory, ifnull((select case M0104 when 2 then '参照管理机关工作人员' when 3 then '参照管理事业单位人员' else '公务员' end from M_M01 where M_M01.UNID=M_M02.UNID and rpt='2024' limit 1),'') PersonCategory,
ifnull((select '是' from M_M05 where M0503=M0203 and rpt='2024' limit 1),'否') SelectedFor2024 ifnull((select IF(M0525 = 1, '是', '否') from M_M05 where M0503=M0203 and rpt='2024' limit 1),'否') SelectedFor2024
from M_M02 from M_M02
where rpt = '2024' where rpt = '2024'
` `

2
golang_learn/data_office/get_hy_jctj/脚本.sql

@ -63,7 +63,7 @@ select
IF(M0215 = 1, '', '') 2, IF(M0215 = 1, '', '') 2,
ifnull((select min(code_name) from code_value where M0251=code_value and code_type='M_D_C32_2021'),'') 2023, ifnull((select min(code_name) from code_value where M0251=code_value and code_type='M_D_C32_2021'),'') 2023,
ifnull((select case M0104 when 2 then '参照管理机关工作人员' when 3 then '参照管理事业单位人员' else '公务员' end from M_M01 where M_M01.UNID=M_M02.UNID and rpt='2024' limit 1),'') , ifnull((select case M0104 when 2 then '参照管理机关工作人员' when 3 then '参照管理事业单位人员' else '公务员' end from M_M01 where M_M01.UNID=M_M02.UNID and rpt='2024' limit 1),'') ,
ifnull((select '' from M_M05 where M0503=M0203 and rpt='2024' limit 1),'') 2024 ifnull((select IF(M0525 = 1, '', '') from M_M05 where M0503=M0203 and rpt='2024' limit 1), '') 2024
from M_M02 where rpt='2024'; from M_M02 where rpt='2024';

Loading…
Cancel
Save