如下代码,为什么红色代码不执行?(前提是fdr 有)
Dim fileid As String=args(0) 'fileid
Dim s4 As String=args(1) '备注
Dim urls As String=args(2) '网址
Dim fdr As DataRow= DataTables("C_PYH_WorkFile_DTL").SQLFind("Work_id='"& fileid &"' and is_active='1' ")
If fdr IsNot Nothing Then
‘这里能执行
‘msgbox("执行成功")
For Each dr As DataRow In DataTables("S_PYH_WCHACT_INFO").SQLSelect("IS_ACTIVE='1' and enterprise_id > '' ")
If Functions.Execute("getProdCodeByid",dr("enterprise_id")) .contains(fdr("attach_pcode")) Then
Dim xdr As DataRow=DataTables("C_PYH_WORK_Process").SQLFind("WORK_id ='"& fileid &"' and dept_id= '"& dr("enterprise_id") &"' And WORK_STATUS='完成' and IS_ACTIVE='1' ")
If xdr Is Nothing Then
'加入发送队列
Dim r As DataRow =DataTables("Wechat_TM_Send_List").SQLAddNew()
r("WCHAT_ID")=dr("WCHAT_ID")
r("fileid")=fileid
r("remarks")=s4
r("urls")=urls
r("state")=1
r.save()
'立即发送
' Functions.Execute("TemplateMessage_send_File",dr("WCHAT_ID"),fileid,s4,urls)
End If
End If
Next
’这里不执行!
MyTimers("微信模板消息").Enabled = True
Functions.Execute("TemplateMessage_send_File","otmQFs6MaQBpfCrkihqi_XMw4V4s",fileid,s4,urls) '这是发送到我自己手机的,测试用的
’msgbox("执行成功")
End If
[此贴子已经被作者于2018/3/30 11:16:39编辑过]