chore: 初始化解放动力大柴MES管理站点

This commit is contained in:
yexingqiang
2026-05-29 13:52:39 +08:00
commit 1aae1cb2d7
164 changed files with 116667 additions and 0 deletions

139
App_code/SendGPRS.cs Normal file
View File

@@ -0,0 +1,139 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ChatClient;
/// <summary>
///SendGPRS 的摘要说明
/// </summary>
public static class SendGPRS
{
private static string GPRShead = "GPRS|WEB|";
/// <summary>
///1.通断器实时数据查询
///命令格式CXTD|通断器编号||
/// </summary>
/// <param name="CJQ"></param>
/// <param name="TQC"></param>
public static void SendGPRS_CXTD(string CJQ,string TDQ)
{
//"GPRS|WEB|0001|CXTD|0002|!";
string command = GPRShead + CJQ + "|" + "CXTD|" + TDQ + "||!";
webChatClient.sentmessage(command);
}
/// <summary>
//2、 热量表实时数据查询
//命令格式CXRB|热量表类型|热量表编号|
/// </summary>
public static void SendGPRS_CXRB(string CJQ, string RLBtype, string RLB)
{
string command = GPRShead + CJQ +"|" + "CXRB|" + RLBtype + "|" + RLB + "|!";
webChatClient.sentmessage(command);
}
/// <summary>
//3、 中心统一校时命令
//命令格式TIME|采集器编号|时间(20130805171824)|
/// </summary>
public static void SendGPRS_TIME(string CJQ)
{
string time = System.DateTime.Now.ToString("yyyyMMddHHmmss");
string command = GPRShead + CJQ + "|" + "TIME|" + CJQ + "|" + time + "|!";
webChatClient.sentmessage(command);
}
/// <summary>
//4,强制关断阀门
//命令格式QZGD|通断器编号|ON/OFF|!
//GPRS收到后回传格式QZGD |通断器编号|OK|
/// </summary>
public static void SendGPRS_QZGD(string CJQ, string TDQ, string ONorOFF)
{
string command = GPRShead + CJQ +"|" + "QZGD|" + TDQ+"|" + ONorOFF + "|!";
webChatClient.sentmessage(command);
}
/// <summary>
//5、 设定用户温度 0005 0105
//命令格式TEMP|通断器编号|温度|!
//GPRS收到后回传格式TEMP |通断器编号|OK|
/// </summary>
public static void SendGPRS_TEMP(string CJQ, string TDQ, string WD)
{
if (WD.Length == 1)
{
WD = "0" + WD;
}
string command = GPRShead +CJQ + "|" + "TEMP|" + TDQ +"|"+WD+ "|!";
webChatClient.sentmessage(command);
}
/// <summary>
//7、 遥控器设温使能 00/01
//命令格式YKSN|通断器编号|遥控器不可以控制/遥控器可以控制|!
//GPRS收到后回传格式YKSN|通断器编号|OK|
/// </summary>
public static void SendGPRS_TEMPControl(string CJQ, string TDQ, string ONOFF)
{
if (ONOFF == "ON")
{
ONOFF = "01";
}
else
{
ONOFF = "00";
}
string command = GPRShead + CJQ + "|" + "YKSN|" + TDQ + "|" + ONOFF + "|!";
webChatClient.sentmessage(command);
}
/// <summary>
//6、 配置面积信息
//命令格式AREA|通断器编号|面积|
//GPRS收到后回传格式AREA|通断器编号|OK|
/// </summary>
public static void SendGPRS_AREA(string CJQ, string TDQ, string AREA)
{
string command = GPRShead + CJQ +"|" + "AREA|" + TDQ + "|" + AREA + "|!";
webChatClient.sentmessage(command);
}
/// <summary>
///7 供暖启停
/// 命令格式GNQT|采集器编号| ON/OFF|
///GPRS收到后回传格式GNQT|采集器编号|OK|
/// </summary>
public static void SendGPRS_GNQT(string CJQ,string ONOFF)
{
string command = GPRShead + CJQ + "|" + "GNQT|" + CJQ + "|" + ONOFF + "|!";
webChatClient.sentmessage(command);
}
/// <summary>
///8更换热表
/// 命令格式GHRB|旧热表编号|新热表编号|
///GPRS收到后回传格式GHRB |新热表编号|OK|
/// </summary>
public static void SendGPRS_GHRB(string CJQ, string OldNum, string NewNum, string newtype)
{
string command = GPRShead + CJQ + "|" + "GHRB|" + OldNum + "|" + newtype+"+" + NewNum + "|!";
webChatClient.sentmessage(command);
}
/// <summary>
///9更换通断
/// 命令格式GHTD|旧通断编号|新通断编号|
///GPRS收到后回传格式GHTD |新通断编号|OK|
/// </summary>
public static void SendGPRS_GHTD(string CJQ, string OldNum, string NewNum)
{
string command = GPRShead + CJQ + "|" + "GHTD|" + OldNum + "|" + NewNum + "|!";
webChatClient.sentmessage(command);
}
}