If Date.Today.DayOfWeek > 0 AndAlso Format(Date.now, "HHmm") >= Functions.Execute("Get","设置",2).split("-")(0) AndAlso Format(Date.now, "HHmm") <= Functions.Execute ("Get","设置",2).split("-")(1) Then
MyTimers("upyc").Enabled = False
DataTables("pos").load()
Dim d As Date = Date.Today.AddDays(0)
Dim unn As String = Functions.Execute("ycun",d,"unn")
Dim dr As DataRow = DataTables("yc").find("date = '" & d & "'")
If dr IsNot Nothing Then
dr("n_y") = unn
dr.save
End If
MyTimers("upyc").Enabled = True
End If
If Date.Today.DayOfWeek > 0 AndAlso Format(Date.now, "HHmm") >= Functions.Execute("Get","设置",3).split("-")(0) AndAlso Format(Date.now, "HHmm") <= Functions.Execute("Get","设置",3).split("-")(1) Then
MyTimers("upyc").Enabled = False
DataTables("pos").load()
Dim d As Date = Date.Today.AddDays(0)
Dim une As String = Functions.Execute("ycun",d,"une")
Dim dr As DataRow = DataTables("yc").find("date = '" & d & "'")
If dr IsNot Nothing Then
dr("e_y") = une
dr.save
End If
MyTimers("upyc").Enabled = True
End If
Static dm As Date
If dm <> Date.today AndAlso Date.today.AddDays(1).DayOfWeek > 0 AndAlso Format(Date.now, "HHmm") >= Functions.Execute("Get","设置",12) AndAlso Format(Date.now, "HHmm") <= Functions.Execute("Get","设置",12) + 5 Then
MyTimers("upyc").Enabled = False
dm = Date.Today
Dim drs As List(Of DataRow) = DataTables("Users").Select("tx = 1 and dc = 1")
For Each dr As DataRow In drs
If dr("userid") > "" And dr("name") > "" Then
Dim dr1 As DataRow = DataTables("yc").SQLFind("date = '" & Date.today.AddDays(1) & "' and (n_b like '%" & dr("name") & "%' or e_b like '%" & dr("name") & "%')")
If dr1 Is Nothing Then
Functions.Execute("sendmsg","textcard",dr("userid"),"","报餐通知",Date.now & vbcrlf & "根据公司相关规定,在食堂用餐员工需要提前一天报餐,您" & Date.today.adddays(1) & "还没有报餐,如需用餐请尽快报餐,以便厨师根据报餐人数安排食材采购等相关事宜!","http://m.xoar.me:81/index.htm","详 情")
End If
End If
Next
MyTimers("upyc").Enabled = False
End If
Static dn As Date
If dn <> Date.today AndAlso Date.Today.DayOfWeek > 0 AndAlso Format(Date.now, "HHmm") >= Functions.Execute("Get","设置",14) AndAlso Format(Date.now, "HHmm") <= Functions.Execute("Get","设置",14) + 5 Then
MyTimers("upyc").Enabled = False
dn = Date.Today
Dim drs As List(Of DataRow) = DataTables("Users").Select("dc = 1")
For Each dr As DataRow In drs
If dr("userid") > "" And dr("name") > "" Then
Dim dr1 As DataRow = DataTables("pos").SQLFind("user_name = '" & dr("name") & "'","pos_time Desc",0)
If dr1 IsNot Nothing Then
dr("ye") = dr1("balance")
dr.save
If dr("ye") > 0 AndAlso dr("ye") <= 30 Then
Functions.Execute("sendmsg","textcard",dr("userid"),"","余额不足",Date.now & vbcrlf & "您的餐卡余额仅剩" & dr("ye") & "元,为了不影响您的用餐,请您尽快充值!----卓尔航空后勤部","http://m.xoar.me:81/cx.htm","详 情")
End If
End If
End If
Next
MyTimers("upyc").Enabled = False
End If