Commit cde4d987 authored by fangxinjiang's avatar fangxinjiang

代码优化-fxj

parent cc688308
...@@ -786,9 +786,10 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id ...@@ -786,9 +786,10 @@ if((sd.id is not null and NOW() <![CDATA[ <= ]]> sd.SOCIAL_END_DATE) or ( sd.id
SUBSTRING_INDEX(GROUP_CONCAT(d.type ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_TYPE SUBSTRING_INDEX(GROUP_CONCAT(d.type ORDER BY d.CREATE_TIME desc),',',1) as DISPATCH_TYPE
FROM t_social_info a FROM t_social_info a
left join t_dispatch_info d on d.SOCIAL_ID = a.id left join t_dispatch_info d on d.SOCIAL_ID = a.id
where a.YSD_REQUEST_ID is not null and a.YSD_REQUEST_ID != '' and a.YSD_REQUEST_ID != '-' and d.AUTO_FLAG='0' where
d.AUTO_FLAG='0'
and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m') and DATE_FORMAT(d.AUDIT_TIME,'%Y%m') = DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 MONTH),'%Y%m')
and a.YSD_HANDLE_STATUS = '3' and (a.YSD_HANDLE_STATUS = '3' or a.YGS_HANDLE_STATUS ='3')
group by a.id group by a.id
order by a.YSD_REQUEST_ID asc order by a.YSD_REQUEST_ID asc
</select> </select>
......
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