Commit 84c9402a authored by huyuchen's avatar huyuchen

提供角色类表接口

parent 2b69a263
......@@ -790,12 +790,12 @@
when s.PENSION_HANDLE = 5 then "派减待办理"
else null end,
IF(a.TYPE='1',
case when if(ifnull(h.id,0) != 0,h.PENSION_HANDLE,s.PENSION_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != 0,h.PENSION_HANDLE,s.PENSION_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != 0,h.PENSION_HANDLE,s.PENSION_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != 0,h.PENSION_HANDLE,s.PENSION_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != 0,h.PENSION_HANDLE,s.PENSION_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != 0,h.PENSION_HANDLE,s.PENSION_HANDLE) = 5 then "派减待办理"
case when if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) = 5 then "派减待办理"
else null end,""
))
as PENSION_HANDLE,
......@@ -808,12 +808,12 @@
when s.MEDICAL_HANDLE = 5 then "派减待办理"
else null end,
IF(a.TYPE='1',
case when if(ifnull(h.id,0) != 0,h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != 0,h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != 0,h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != 0,h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != 0,h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != 0,h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 5 then "派减待办理"
case when if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) = 5 then "派减待办理"
else null end,""
))
as MEDICAL_HANDLE,
......@@ -826,12 +826,12 @@
when s.UNEMPLOY_HANDLE = 5 then "派减待办理"
else null end,
IF(a.TYPE='1',
case when if(ifnull(h.id,0) != 0,h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != 0,h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != 0,h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != 0,h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != 0,h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != 0,h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 5 then "派减待办理"
case when if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) = 5 then "派减待办理"
else null end,""
))
as UNEMPLOY_HANDLE,
......@@ -844,12 +844,12 @@
when s.WORK_INJURY_HANDLE = 5 then "派减待办理"
else null end,
IF(a.TYPE='1',
case when if(ifnull(h.id,0) != 0,h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != 0,h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != 0,h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != 0,h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != 0,h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != 0,h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 5 then "派减待办理"
case when if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) = 5 then "派减待办理"
else null end,""
))
as WORK_INJURY_HANDLE,
......@@ -862,12 +862,12 @@
when s.BIRTH_HANDLE = 5 then "派减待办理"
else null end,
IF(a.TYPE='1',
case when if(ifnull(h.id,0) != 0,h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != 0,h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != 0,h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != 0,h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != 0,h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != 0,h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 5 then "派减待办理"
case when if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) = 5 then "派减待办理"
else null end,""
))
as BIRTH_HANDLE,
......@@ -880,12 +880,12 @@
when s.BIGAILMENT_HANDLE = 5 then "派减待办理"
else null end,
IF(a.TYPE='1',
case when if(ifnull(h.id,0) != 0,h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != 0,h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != 0,h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != 0,h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != 0,h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != 0,h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 5 then "派减待办理"
case when if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 0 then "派增待办理"
when if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 1 then "派增办理成功"
when if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 2 then "派增办理失败"
when if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 3 then "已派减"
when if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 4 then "派减失败"
when if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) = 5 then "派减待办理"
else null end,""
))
as BIGAILMENT_HANDLE,
......@@ -946,12 +946,12 @@
s.RECORD_BASE,
s.HANDLE_USER_NAME as HANDLE_USER,
s.HANDLE_TIME,
if(ifnull(h.id,0) != 0,h.UNIT_PENSION_CARDINAL,s.UNIT_PENSION_CARDINAL) UNIT_PENSION_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_MEDICAL_CARDINAL,s.UNIT_MEDICAL_CARDINAL) UNIT_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_UNEMPLOYMENT_CARDINAL,s.UNIT_UNEMPLOYMENT_CARDINAL) UNIT_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_BIGAILMENT_CARDINAL,s.UNIT_BIGAILMENT_CARDINAL) UNIT_BIGAILMENT_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_WORK_INJURY_CARDINAL,s.UNIT_WORK_INJURY_CARDINAL) UNIT_WORK_INJURY_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_BIRTH_CARDINAL,s.UNIT_BIRTH_CARDINAL) UNIT_BIRTH_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_PENSION_CARDINAL,s.UNIT_PENSION_CARDINAL) UNIT_PENSION_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_MEDICAL_CARDINAL,s.UNIT_MEDICAL_CARDINAL) UNIT_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_UNEMPLOYMENT_CARDINAL,s.UNIT_UNEMPLOYMENT_CARDINAL) UNIT_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_BIGAILMENT_CARDINAL,s.UNIT_BIGAILMENT_CARDINAL) UNIT_BIGAILMENT_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_WORK_INJURY_CARDINAL,s.UNIT_WORK_INJURY_CARDINAL) UNIT_WORK_INJURY_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_BIRTH_CARDINAL,s.UNIT_BIRTH_CARDINAL) UNIT_BIRTH_CARDINAL,
c.PROVIDENT_HOUSEHOLD_NAME,
c.UNIT_PROVIDENG_CARDINAL,
c.UNIT_PROVIDENT_PER,
......@@ -1004,16 +1004,16 @@
b.SOCIAL_START_DATE,
b.PAYMENT_TYPE,
b.RECORD_BASE,
if(ifnull(h.id,0) != 0,h.UNIT_PENSION_CARDINAL,b.UNIT_PENSION_CARDINAL) UNIT_PENSION_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_MEDICAL_CARDINAL,b.UNIT_MEDICAL_CARDINAL) UNIT_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_UNEMPLOYMENT_CARDINAL,b.UNIT_UNEMPLOYMENT_CARDINAL) UNIT_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_WORK_INJURY_CARDINAL,b.UNIT_WORK_INJURY_CARDINAL) UNIT_WORK_INJURY_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_BIRTH_CARDINAL,b.UNIT_BIRTH_CARDINAL) UNIT_BIRTH_CARDINAL,
if(ifnull(h.id,0) != 0,h.PERSONAL_PENSION_CARDINAL,b.PERSONAL_PENSION_CARDINAL) PERSONAL_PENSION_CARDINAL,
if(ifnull(h.id,0) != 0,h.PERSONAL_MEDICAL_CARDINAL,b.PERSONAL_MEDICAL_CARDINAL) PERSONAL_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != 0,h.PERSONAL_UNEMPLOYMENT_CARDINAL,b.PERSONAL_UNEMPLOYMENT_CARDINAL) PERSONAL_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != 0,h.PERSONAL_BIGAILMENT_MONEY,b.PERSONAL_BIGAILMENT_MONEY) PERSONAL_BIGAILMENT_MONEY,
if(ifnull(h.id,0) != 0,h.UNIT_BIGAILMENT_MONEY,b.UNIT_BIGAILMENT_MONEY) UNIT_BIGAILMENT_MONEY,
if(ifnull(h.id,0) != '0',h.UNIT_PENSION_CARDINAL,b.UNIT_PENSION_CARDINAL) UNIT_PENSION_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_MEDICAL_CARDINAL,b.UNIT_MEDICAL_CARDINAL) UNIT_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_UNEMPLOYMENT_CARDINAL,b.UNIT_UNEMPLOYMENT_CARDINAL) UNIT_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_WORK_INJURY_CARDINAL,b.UNIT_WORK_INJURY_CARDINAL) UNIT_WORK_INJURY_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_BIRTH_CARDINAL,b.UNIT_BIRTH_CARDINAL) UNIT_BIRTH_CARDINAL,
if(ifnull(h.id,0) != '0',h.PERSONAL_PENSION_CARDINAL,b.PERSONAL_PENSION_CARDINAL) PERSONAL_PENSION_CARDINAL,
if(ifnull(h.id,0) != '0',h.PERSONAL_MEDICAL_CARDINAL,b.PERSONAL_MEDICAL_CARDINAL) PERSONAL_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != '0',h.PERSONAL_UNEMPLOYMENT_CARDINAL,b.PERSONAL_UNEMPLOYMENT_CARDINAL) PERSONAL_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != '0',h.PERSONAL_BIGAILMENT_MONEY,b.PERSONAL_BIGAILMENT_MONEY) PERSONAL_BIGAILMENT_MONEY,
if(ifnull(h.id,0) != '0',h.UNIT_BIGAILMENT_MONEY,b.UNIT_BIGAILMENT_MONEY) UNIT_BIGAILMENT_MONEY,
c.UNIT_PROVIDENG_CARDINAL,
c.PROVIDENT_START,
c.PERSONAL_PROVIDENT_CARDINAL,
......@@ -1152,12 +1152,12 @@
IF(a.TYPE='0',s.WORK_INJURY_HANDLE,IF(s.WORK_INJURY_HANDLE='2',"--",a.SOCIAL_HANDLE_STATUS)) as "WORK_INJURY_HANDLE",
IF(a.TYPE='0',s.BIRTH_HANDLE,IF(s.BIRTH_HANDLE='2',"--",a.SOCIAL_HANDLE_STATUS)) as "BIRTH_HANDLE",
IF(a.TYPE='0',s.BIGAILMENT_HANDLE,IF(s.BIGAILMENT_HANDLE='2',"--",a.SOCIAL_HANDLE_STATUS)) as "BIGAILMENT_HANDLE",*/
if(ifnull(h.id,0) != 0,h.PENSION_HANDLE,s.PENSION_HANDLE) PENSION_HANDLE,
if(ifnull(h.id,0) != 0,h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) MEDICAL_HANDLE,
if(ifnull(h.id,0) != 0,h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) UNEMPLOY_HANDLE,
if(ifnull(h.id,0) != 0,h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) WORK_INJURY_HANDLE,
if(ifnull(h.id,0) != 0,h.BIRTH_HANDLE,s.BIRTH_HANDLE) BIRTH_HANDLE,
if(ifnull(h.id,0) != 0,h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) BIGAILMENT_HANDLE,
if(ifnull(h.id,0) != '0',h.PENSION_HANDLE,s.PENSION_HANDLE) PENSION_HANDLE,
if(ifnull(h.id,0) != '0',h.MEDICAL_HANDLE,s.MEDICAL_HANDLE) MEDICAL_HANDLE,
if(ifnull(h.id,0) != '0',h.UNEMPLOY_HANDLE,s.UNEMPLOY_HANDLE) UNEMPLOY_HANDLE,
if(ifnull(h.id,0) != '0',h.WORK_INJURY_HANDLE,s.WORK_INJURY_HANDLE) WORK_INJURY_HANDLE,
if(ifnull(h.id,0) != '0',h.BIRTH_HANDLE,s.BIRTH_HANDLE) BIRTH_HANDLE,
if(ifnull(h.id,0) != '0',h.BIGAILMENT_HANDLE,s.BIGAILMENT_HANDLE) BIGAILMENT_HANDLE,
a.EMP_NAME,
a.EMP_IDCARD,
a.EDUCATION_NAME,
......@@ -1178,23 +1178,23 @@
s.RECORD_BASE,
s.PAYMENT_TYPE,
a.SOCIAL_HOUSEHOLD_NAME,
if(ifnull(h.id,0) != 0,h.SOCIAL_PROVINCE,s.SOCIAL_PROVINCE) SOCIAL_PROVINCE,
if(ifnull(h.id,0) != 0,h.SOCIAL_CITY,s.SOCIAL_CITY) SOCIAL_CITY,
if(ifnull(h.id,0) != 0,h.SOCIAL_TOWN,s.SOCIAL_TOWN) SOCIAL_TOWN,
if(ifnull(h.id,0) != 0,h.PENSION_START,s.PENSION_START) PENSION_START,
if(ifnull(h.id,0) != 0,h.UNIT_PENSION_CARDINAL,s.UNIT_PENSION_CARDINAL) UNIT_PENSION_CARDINAL,
if(ifnull(h.id,0) != 0,h.MEDICAL_START,s.MEDICAL_START) MEDICAL_START,
if(ifnull(h.id,0) != 0,h.UNIT_MEDICAL_CARDINAL,s.UNIT_MEDICAL_CARDINAL) UNIT_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNEMPLOY_START,s.UNEMPLOY_START) UNEMPLOY_START,
if(ifnull(h.id,0) != 0,h.UNIT_UNEMPLOYMENT_CARDINAL,s.UNIT_UNEMPLOYMENT_CARDINAL) UNIT_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != 0,h.WORK_INJURY_START,s.WORK_INJURY_START) WORK_INJURY_START,
if(ifnull(h.id,0) != 0,h.UNIT_WORK_INJURY_CARDINAL,s.UNIT_WORK_INJURY_CARDINAL) UNIT_WORK_INJURY_CARDINAL,
if(ifnull(h.id,0) != 0,h.BIRTH_START,s.BIRTH_START) BIRTH_START,
if(ifnull(h.id,0) != 0,h.UNIT_BIRTH_CARDINAL,s.UNIT_BIRTH_CARDINAL) UNIT_BIRTH_CARDINAL,
if(ifnull(h.id,0) != 0,h.BIGAILMENT_START,s.BIGAILMENT_START) BIGAILMENT_START,
if(ifnull(h.id,0) != 0,h.UNIT_BIGAILMENT_CARDINAL,s.UNIT_BIGAILMENT_CARDINAL) UNIT_BIGAILMENT_CARDINAL,
if(ifnull(h.id,0) != 0,h.UNIT_BIGAILMENT_MONEY,s.UNIT_BIGAILMENT_MONEY) UNIT_BIGAILMENT_MONEY,
if(ifnull(h.id,0) != 0,h.PERSONAL_BIGAILMENT_MONEY,s.PERSONAL_BIGAILMENT_MONEY) PERSONAL_BIGAILMENT_MONEY,
if(ifnull(h.id,0) != '0',h.SOCIAL_PROVINCE,s.SOCIAL_PROVINCE) SOCIAL_PROVINCE,
if(ifnull(h.id,0) != '0',h.SOCIAL_CITY,s.SOCIAL_CITY) SOCIAL_CITY,
if(ifnull(h.id,0) != '0',h.SOCIAL_TOWN,s.SOCIAL_TOWN) SOCIAL_TOWN,
if(ifnull(h.id,0) != '0',h.PENSION_START,s.PENSION_START) PENSION_START,
if(ifnull(h.id,0) != '0',h.UNIT_PENSION_CARDINAL,s.UNIT_PENSION_CARDINAL) UNIT_PENSION_CARDINAL,
if(ifnull(h.id,0) != '0',h.MEDICAL_START,s.MEDICAL_START) MEDICAL_START,
if(ifnull(h.id,0) != '0',h.UNIT_MEDICAL_CARDINAL,s.UNIT_MEDICAL_CARDINAL) UNIT_MEDICAL_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNEMPLOY_START,s.UNEMPLOY_START) UNEMPLOY_START,
if(ifnull(h.id,0) != '0',h.UNIT_UNEMPLOYMENT_CARDINAL,s.UNIT_UNEMPLOYMENT_CARDINAL) UNIT_UNEMPLOYMENT_CARDINAL,
if(ifnull(h.id,0) != '0',h.WORK_INJURY_START,s.WORK_INJURY_START) WORK_INJURY_START,
if(ifnull(h.id,0) != '0',h.UNIT_WORK_INJURY_CARDINAL,s.UNIT_WORK_INJURY_CARDINAL) UNIT_WORK_INJURY_CARDINAL,
if(ifnull(h.id,0) != '0',h.BIRTH_START,s.BIRTH_START) BIRTH_START,
if(ifnull(h.id,0) != '0',h.UNIT_BIRTH_CARDINAL,s.UNIT_BIRTH_CARDINAL) UNIT_BIRTH_CARDINAL,
if(ifnull(h.id,0) != '0',h.BIGAILMENT_START,s.BIGAILMENT_START) BIGAILMENT_START,
if(ifnull(h.id,0) != '0',h.UNIT_BIGAILMENT_CARDINAL,s.UNIT_BIGAILMENT_CARDINAL) UNIT_BIGAILMENT_CARDINAL,
if(ifnull(h.id,0) != '0',h.UNIT_BIGAILMENT_MONEY,s.UNIT_BIGAILMENT_MONEY) UNIT_BIGAILMENT_MONEY,
if(ifnull(h.id,0) != '0',h.PERSONAL_BIGAILMENT_MONEY,s.PERSONAL_BIGAILMENT_MONEY) PERSONAL_BIGAILMENT_MONEY,
a.TRUST_REMARK,
a.REDUCE_REASON,
'1' as EXPORT_SOCIAL_FLAG,
......@@ -1623,7 +1623,7 @@
/*社保代办理 1.派单审核通过 2.派增(type=0):待办理(social_handle_status='0') or 派减(type=1):已办理完成或部分办理失败 且已派减*/
AND a.social_id is not null
AND a.STATUS = "2"
and (( a.type = '0' AND (s.HANDLE_STATUS = "0" or s.HANDLE_STATUS = "4") ) or ( a.type ='1' AND (if(ifnull(h.id,0) != 0,h.HANDLE_STATUS,s.HANDLE_STATUS) in ('1','5','6','3','7') or (s.HANDLE_STATUS in ('1','5','6','3','7') and s.REDUCE_CAN = '1')) ))
and (( a.type = '0' AND (s.HANDLE_STATUS = "0" or s.HANDLE_STATUS = "4") ) or ( a.type ='1' AND (if(ifnull(h.id,0) != '0',h.HANDLE_STATUS,s.HANDLE_STATUS) in ('1','5','6','3','7') or (s.HANDLE_STATUS in ('1','5','6','3','7') and s.REDUCE_CAN = '1')) ))
and a.SOCIAL_HANDLE_STATUS in ('0','4')
<!--<if test="tDispatchInfo.status != null and tDispatchInfo.status.trim() != ''">
......@@ -1663,12 +1663,12 @@
AND a.TYPE = #{tDispatchInfo.type}
</if>
<if test="tDispatchInfo.socialProvince != null and tDispatchInfo.socialProvince!= null">
AND if(ifnull(h.id,0) != 0,h.social_province,s.social_province) = #{tDispatchInfo.socialProvince}
AND if(ifnull(h.id,0) != '0',h.social_province,s.social_province) = #{tDispatchInfo.socialProvince}
<if test="tDispatchInfo.socialCity != null and tDispatchInfo.socialCity!= null">
AND if(ifnull(h.id,0) != 0,h.social_city,s.social_city) = #{tDispatchInfo.socialCity}
AND if(ifnull(h.id,0) != '0',h.social_city,s.social_city) = #{tDispatchInfo.socialCity}
</if>
<if test="tDispatchInfo.socialTown != null and tDispatchInfo.socialTown!= null">
AND if(ifnull(h.id,0) != 0,h.social_town,s.social_town) = #{tDispatchInfo.socialTown}
AND if(ifnull(h.id,0) != '0',h.social_town,s.social_town) = #{tDispatchInfo.socialTown}
</if>
</if>
<if test="tDispatchInfo.empName != null and tDispatchInfo.empName.trim() != ''">
......
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