【调度系统】广东民航医疗快线调度系统源代码
wlzboy
2025-09-06 2decf5219e3476e30095fd9dbf6e49c55e105563
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
 
<%
'-------------------------------------------------------------发票申请
ServiceOrdID= SafeRequest(request("ServiceOrdID"))
DispatchOrdID=SafeRequest(request("DispatchOrdID"))
InvoiceID=SafeRequest(request("InvoiceID"))
ReturnID    = SafeRequest(request("ReturnID"))
 
InvoiceType    = SafeRequest(request("InvoiceType"))    '发票类型
InvoiceName    = SafeRequest(request("InvoiceName"))    '发票抬头
InvoiceMakeout        = SafeRequest(request("InvoiceMakeout"))    '发票备注
 
InvoiceCompanyPhone= SafeRequest(request("InvoiceCompanyPhone"))    '企业电话
InvoiceCompanyID    = SafeRequest(request("InvoiceCompanyID"))    '纳税识别号
InvoiceCompanyAdd    = SafeRequest(request("InvoiceCompanyAdd"))    '企业注册地址
InvoiceCompanyBank    = SafeRequest(request("InvoiceCompanyBank"))    '企业开户银行
InvoiceCompanyBankNo= SafeRequest(request("InvoiceCompanyBankNo"))    '企业银行账号
InvoiceZipCode        = SafeRequest(request("InvoiceZipCode"))    '邮编
Invoice_strAdd        = SafeRequest(request("Invoice_strAdd"))    '邮寄地址
Invoice_strName        = SafeRequest(request("Invoice_strName"))     '联系人
Invoice_strPhone    = SafeRequest(request("Invoice_strPhone"))    '联系电话
Invoice_strEmail    = SafeRequest(request("Invoice_strEmail"))    '电子邮箱
 
InvoiceMoney        = SafeRequest(request("InvoiceMoney"))     '发票金额
 
If InvoiceMoney="" Or InvoiceMoney="0" Then%>
    Response.Write "开票金额不可为0!!"
    Response.End
End If
If InvoiceMoney="" Or InvoiceMoney="0" Or InvoiceType="" Or ServiceOrdID="" Then
        Response.Write "参数错误!!"
        Response.End
End If
 
If InvoiceID="0" Or InvoiceID="" Then
    sql="insert into InvoiceData (ServiceOrderIDPK, InvoiceType, InvoiceName, InvoiceMakeout, InvoiceCompanyPhone, InvoiceCompanyID, InvoiceCompanyAdd, InvoiceCompanyBank, InvoiceCompanyBankNo, InvoiceZipCode, Invoice_strAdd, Invoice_strName, Invoice_strPhone,Invoice_strEmail,InvoiceMoney,ApplyOAID) values ("&ServiceOrdID&","&InvoiceType&",'"&InvoiceName&"','"&InvoiceMakeout&"','"&InvoiceCompanyPhone&"','"&InvoiceCompanyID&"','"&InvoiceCompanyAdd&"','"&InvoiceCompanyBank&"','"&InvoiceCompanyBankNo&"','"&InvoiceZipCode&"','"&Invoice_strAdd&"','"&Invoice_strName&"','"&Invoice_strPhone&"','"&Invoice_strEmail&"',"&InvoiceMoney&","&session("adminID")&")"
    objConn.Execute sql
Else
    sql="update InvoiceData set InvoiceType="&InvoiceType&",InvoiceName='"&InvoiceName&"',InvoiceMakeout='"&InvoiceMakeout&"',InvoiceCompanyPhone='"&InvoiceCompanyPhone&"',InvoiceCompanyID='"&InvoiceCompanyID&"',InvoiceCompanyAdd='"&InvoiceCompanyAdd&"',InvoiceCompanyBank='"&InvoiceCompanyBank&"',InvoiceCompanyBankNo='"&InvoiceCompanyBankNo&"',InvoiceZipCode='"&InvoiceZipCode&"',Invoice_strAdd='"&Invoice_strAdd&"',Invoice_strEmail='"&Invoice_strEmail&"',Invoice_strName='"&Invoice_strName&"',Invoice_strPhone='"&Invoice_strPhone&"',AuditStatus=0,AuditMakeout='"&AuditMakeout&"',InvoiceNo='"&InvoiceNo&"',InvoiceMoney="&InvoiceMoney&",AuditOAID="&session("adminID")&",AuditTime=getdate() where InvoiceID="&InvoiceID
    objConn.Execute sql
End If
 
Call OA_Running("申请发票:"&ServiceOrdID)
rsRollbackTrans(objConn.Errors.count)
 
'企微通知%>
<!--#include virtual="/weixin/JsonPost_1000006.gds"-->
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select InvoiceID from InvoiceData where  AuditStatus not in (3,4) and ServiceOrderIDPK="&ServiceOrdID
rs.open sql,objConn,1,1
If not rs.Eof then
    InvoiceID    = rs("InvoiceID")
end if
rs.close()
title="新的发票申请(PC后台)"
description=InvoiceName&",有一个新的发票申请,请即时处理"
sql="SELECT OA_weixinID=STUFF((SELECT '|' + OA_weixinUserID from OA_User where OA_Power like '%030205%' and OA_execLevel>=1 FOR XML PATH('')), 1, 1, '')"
rs.open sql,objConn,1,1
If not rs.Eof then
    touser    = rs("OA_weixinID")
end if
rs.close()
'touser="liaojunliang|ylkx_vicgame"    '测试
If touser<>"" And title<>"" Then
    '微信OA信息下发接口
    appUrl="https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token="&access_token
    args1="{"
    args1=args1&"""touser"": """&touser&""","    '成员ID列表(消息接收者,多个接收者用‘|’分隔,最多支持1000个)。特殊情况:指定为@all,则向关注该企业应用的全部成员发送 |liaojunliang
    args1=args1&"""toparty"": """","        '部门ID列表,多个接收者用‘|’分隔,最多支持100个。当touser为@all时忽略本参数
    args1=args1&"""totag"": """","            '标签ID列表,多个接收者用‘|’分隔。当touser为@all时忽略本参数
    args1=args1&"""agentid"": 1000006,"            '企业应用的id,整型。可在应用的设置页面查看
    args1=args1&"""msgtype"": ""news"","
    args1=args1&"""news"": {"
        args1=args1&"""articles"":["
            args1=args1&"{"
            args1=args1&"""title"": ""【"&title&"】"","
            args1=args1&"""description"": """&description&""","
            args1=args1&"""url"": ""https://sys.966120.com.cn/m_Invoice.gds?InvoiceID="&InvoiceID&"&ServiceOrdID="&ServiceOrdID&"&order_type=11"""
            args1=args1&"}"  
        args1=args1&"]"
    args1=args1&"}"
    args1=args1&"}"
    call PostBody(appUrl,args1)
End If
Response.Write "success"
Response.End
%>