1. 消息推送

待整理

每天定时发送钉钉消息

insert into ebs_kernel.dbo.pub_message(msg_cmpid,msg_mpid,msg_text,msg_senddate,msg_type,msg_target,msg_cuid)
select 1,65,'截止'+convert(varchar(50),getdate(),23)+'日,你有'+convert(varchar(100),num)+'个待办事项未处理,请及时跟进处理!{title}EBS2待办事项提醒('+convert(varchar(100),num)+'个){url}/default/mywork.mobile.htm',getdate(),'DING',substring(cu_ding , 22,50),cu_id
from (select 
      count(1) num ,cu_id,max(cu_ding) cu_ding
    from mps_job with(nolock) ,
      mps_login with(nolock)
    where jb_cmpid=1
      and jb_wsid=0 
      and jb_isauto=1 
      and jb_enabled=0 
      and jb_back=1 
      and jb_showinundo=0 
      and jb_ordno not like '%临%' 
      and jb_cuid = cu_id
      and cu_ding>''
    group by cu_id having count(1)>0
) as x

results matching ""

    No results matching ""