case a.SOCIAL_HANDLE_STATUS when '0' then '未办理' when '1' then '全部办理成功' when '2' then '全部办理失败' when '3' then '部分办理成功' when '4' then '办理中' else '-' end socialHandleStatus,
case SUBSTRING_INDEX(GROUP_CONCAT(a.SOCIAL_HANDLE_STATUS ORDER BY a.CREATE_TIME desc),',',1) when '0' then '未办理' when '1' then '全部办理成功' when '2' then '全部办理失败' when '3' then '部分办理成功' when '4' then '办理中' else '-' end socialHandleStatus,
case s.ygs_Handle_Status when '0' then '无' when '1' then '待办理' when '2' then '自动办理中' when '3' then '继续办理' when '4' then '中止办理' when '5' then '人工处理' when '6' then '成功' else '-' end ygsHandleStatus,
case s.ysd_Handle_Status when '0' then '无' when '1' then '待办理' when '2' then '自动办理中' when '3' then '继续办理' when '4' then '中止办理' when '5' then '人工处理' when '6' then '成功' else '-' end ysdHandleStatus,
s.YGS_REMARK ygsRemark,s.YSD_REMARK ysdRemark,
a.APPLY_NO dispatchCode,
SUBSTRING_INDEX(GROUP_CONCAT(a.APPLY_NO ORDER BY a.CREATE_TIME desc),',',1) dispatchCode,
a.EMP_NAME empName,
a.EMP_IDCARD empIdcard,
emp_natrue.label empType,
...
...
@@ -1259,6 +1259,7 @@
left join sys_area st2 on st2.id = s.SOCIAL_TOWN
left join view_sys_dict_item emp_natrue on emp_natrue.value=a.EMP_TYPE and emp_natrue.type='emp_natrue'