diff --git a/golang_learn/data_office/get_hy_jctj/main.go b/golang_learn/data_office/get_hy_jctj/main.go index bfa09f9..2ffa253 100644 --- a/golang_learn/data_office/get_hy_jctj/main.go +++ b/golang_learn/data_office/get_hy_jctj/main.go @@ -27,13 +27,13 @@ select ifnull(A0184,'')IDNumber, from A08 where A0831=1 and A01.A0000=A08.A0000), '') FullTimeEducation, ifnull((select case when A0801B like '1%' then '研究生' when A0801B like '2%' then '大学本科' when A0801B like '3%' then '大学专科' else '中专及以下' end from A08 where A0834=1 and A01.A0000=A08.A0000), '') HighestEducation, - ifnull((select case when A0831 like '3%' then '硕士' when A0831 like '4%' then '学士' else '博士' end from A08 where A0835=1 and A01.A0000=A08.A0000), '') HighestDegree, + ifnull((select case when A0901B like '3%' then '硕士' when A0901B like '4%' then '学士' else '博士' end from A08 where A0835=1 and A01.A0000=A08.A0000), '') HighestDegree, ifnull((select min(code_name) from code_value where A0123=code_value and code_type='XZ93'),'') JobCategory, ifnull((select min(code_name) from A05, code_value where A0501B=code_value and code_type='ZB09' and A0531=0 and A0524=1 and A01.A0000=A05.A0000), '') CurrentPositionLevel, ifnull((select substr(A0504, 1, 6) from A05 where A0531=0 and A0524=1 and A01.A0000=A05.A0000), '') CurrentPositionStartDate, ifnull((select min(code_name) from A05, code_value where A0501B=code_value and code_type='ZB148' and A0531=1 and A0524=1 and A01.A0000=A05.A0000), '') CurrentRankLevel, - (select ifnull(DATE_FORMAT(DATE_ADD(concat(substr(A0530, 1, 4),'-',substr(A0530, 5, 2),'-01'), INTERVAL ifnull(A0532, 0) MONTH), '%Y%m'), - substr(A0504, 1, 6)) from A05 where A0531=1 and A0524=1 and A01.A0000=A05.A0000) CurrentRankStartDate, + ifnull((select ifnull(DATE_FORMAT(DATE_ADD(concat(substr(A0530, 1, 4),'-',substr(A0530, 5, 2),'-01'), INTERVAL ifnull(A0532, 0) MONTH), '%Y%m'), + ifnull(substr(A0504, 1, 6), '')) from A05 where A0531=1 and A0524=1 and A01.A0000=A05.A0000), '') CurrentRankStartDate, IF(A0197 = 1, '是', '否') Has2YearsGrassrootsExp, ifnull((select min(code_name) from A15, code_value where A1517=code_value and code_type='ZB18' and A1521='2023' and A01.A0000=A15.A0000), '') AnnualAssessment2023, ifnull((select min(code_name) from code_value where A0160=code_value and code_type='ZB125'),'') PersonCategory, diff --git a/golang_learn/data_office/get_hy_jctj/脚本.sql b/golang_learn/data_office/get_hy_jctj/脚本.sql index 89b53ac..9305aa4 100644 --- a/golang_learn/data_office/get_hy_jctj/脚本.sql +++ b/golang_learn/data_office/get_hy_jctj/脚本.sql @@ -82,13 +82,13 @@ select from A08 where A0831=1 and A01.A0000=A08.A0000), '') 全日制学历, ifnull((select case when A0801B like '1%' then '研究生' when A0801B like '2%' then '大学本科' when A0801B like '3%' then '大学专科' else '中专及以下' end from A08 where A0834=1 and A01.A0000=A08.A0000), '') 最高学历, - ifnull((select case when A0831 like '3%' then '硕士' when A0831 like '4%' then '学士' else '博士' end from A08 where A0835=1 and A01.A0000=A08.A0000), '') 最高学位, + ifnull((select case when A0901B like '3%' then '硕士' when A0901B like '4%' then '学士' else '博士' end from A08 where A0835=1 and A01.A0000=A08.A0000), '') 最高学位, ifnull((select min(code_name) from code_value where A0123=code_value and code_type='XZ93'),'') 职位类别, ifnull((select min(code_name) from A05, code_value where A0501B=code_value and code_type='ZB09' and A0531=0 and A0524=1 and A01.A0000=A05.A0000), '') 现职务层次, ifnull((select substr(A0504, 1, 6) from A05 where A0531=0 and A0524=1 and A01.A0000=A05.A0000), '') 任现职务层次时间, ifnull((select min(code_name) from A05, code_value where A0501B=code_value and code_type='ZB148' and A0531=1 and A0524=1 and A01.A0000=A05.A0000), '') 现职级层次, - (select ifnull(DATE_FORMAT(DATE_ADD(concat(substr(A0530, 1, 4),'-',substr(A0530, 5, 2),'-01'), INTERVAL ifnull(A0532, 0) MONTH), '%Y%m'), - substr(A0504, 1, 6)) from A05 where A0531=1 and A0524=1 and A01.A0000=A05.A0000) 任现职级层次时间, + ifnull((select ifnull(DATE_FORMAT(DATE_ADD(concat(substr(A0530, 1, 4),'-',substr(A0530, 5, 2),'-01'), INTERVAL ifnull(A0532, 0) MONTH), '%Y%m'), + ifnull(substr(A0504, 1, 6), '')) from A05 where A0531=1 and A0524=1 and A01.A0000=A05.A0000), '') 任现职级层次时间, IF(A0197 = 1, '是', '否') 是否具有2年以上基层经验, ifnull((select min(code_name) from A15, code_value where A1517=code_value and code_type='ZB18' and A1521='2023' and A01.A0000=A15.A0000), '') 2023年度考核结果, ifnull((select min(code_name) from code_value where A0160=code_value and code_type='ZB125'),'') 人员类别,