Browse Source

部分字典对应处理

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

2
golang_learn/data_office/get_hy_jctj/main.go

@ -79,7 +79,7 @@ select ifnull(M0203,'') IDNumber,
ifnull((select min(code_name) from code_value where M0243=code_value and code_type='ZB148'),'') CurrentRankLevel, ifnull((select min(code_name) from code_value where M0243=code_value and code_type='ZB148'),'') CurrentRankLevel,
ifnull(substr(M0244, 1, 6),'') CurrentRankStartDate, ifnull(substr(M0244, 1, 6),'') CurrentRankStartDate,
IF(M0215 = 1, '是', '否') Has2YearsGrassrootsExp, IF(M0215 = 1, '是', '否') Has2YearsGrassrootsExp,
ifnull((select min(code_name) from code_value where M0251=code_value and code_type='ZB18'),'') 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='@rpt' 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='@rpt' limit 1),'') PersonCategory,
ifnull((select IF(M0525 = 1, '是', '否') from M_M05 where M0503=M0203 and rpt='@rpt' limit 1),'否') SelectedFor2024 ifnull((select IF(M0525 = 1, '是', '否') from M_M05 where M0503=M0203 and rpt='@rpt' limit 1),'否') SelectedFor2024
from M_M02 from M_M02

10
golang_learn/data_office/get_hy_jctj/脚本.sql

@ -49,16 +49,16 @@ select
ifnull(M0201,'') , ifnull(M0201,'') ,
ifnull(substr(M0204, 1, 6) ,'') , ifnull(substr(M0204, 1, 6) ,'') ,
IF(M0202 = 1, '', '') , IF(M0202 = 1, '', '') ,
ifnull((select min(code_name) from code_value where M0205=code_value and code_type='M_D_CM16'),'') , ifnull((select min(code_name) from code_value where M0205=code_value and code_type='GB3304'),'') ,
ifnull(substr(M0216, 1, 6) ,'') , ifnull(substr(M0216, 1, 6) ,'') ,
ifnull((select min(code_name) from code_value where M0206=code_value and code_type='M_D_CD17'),'') , ifnull((select min(code_name) from code_value where M0206=code_value and code_type='GB4762'),'') ,
ifnull((select min(code_name) from code_value where M0242=code_value and code_type='M_D_C11'),'') , ifnull((select min(code_name) from code_value where M0242=code_value and code_type='M_D_C11'),'') ,
ifnull((select min(code_name) from code_value where M0212=code_value and code_type='M_D_C11'),'') , ifnull((select min(code_name) from code_value where M0212=code_value and code_type='M_D_C11'),'') ,
ifnull((select min(code_name) from code_value where M0213=code_value and code_type='M_D_C12'),'') , ifnull((select min(code_name) from code_value where M0213=code_value and code_type='M_D_C12'),'') ,
ifnull((select min(code_name) from code_value where M0246=code_value and code_type='M_D_M0246_1'),'') , ifnull((select min(code_name) from code_value where M0246=code_value and code_type='XZ93'),'') ,
ifnull((select min(code_name) from code_value where M0208=code_value and code_type='M_D_C32_2019'),'') , ifnull((select min(code_name) from code_value where M0208=code_value and code_type='ZB09'),'') ,
ifnull(substr(M0233, 1, 6) ,'') , ifnull(substr(M0233, 1, 6) ,'') ,
ifnull((select min(code_name) from code_value where M0243=code_value and code_type='M_D_C31_2019'),'') , ifnull((select min(code_name) from code_value where M0243=code_value and code_type='ZB148'),'') ,
ifnull(substr(M0244, 1, 6) ,'') , ifnull(substr(M0244, 1, 6) ,'') ,
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,

Loading…
Cancel
Save