From 95ebbf3dc96da6cfc7952ff7a26044dc6b2b8a36 Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Sat, 20 Dec 2025 17:21:55 +0800
Subject: [PATCH 01/10] 11
---
DataBase/版本日志/SGGLDB_V2025-12-20.sql | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 DataBase/版本日志/SGGLDB_V2025-12-20.sql
diff --git a/DataBase/版本日志/SGGLDB_V2025-12-20.sql b/DataBase/版本日志/SGGLDB_V2025-12-20.sql
new file mode 100644
index 00000000..6d2428f9
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-12-20.sql
@@ -0,0 +1,21 @@
+
+CREATE TABLE [dbo].[Project_Devices](
+ [DeviceId] [nvarchar](50) NOT NULL,
+ [DeviceName] [nvarchar](50) NULL,
+ [Address] [nvarchar](500) NULL,
+ [CreateDate] [date] NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [DeviceSerial] [nvarchar](50) NULL,
+ [isInOut] [nvarchar](50) NULL,
+ [ValidateCode] [nvarchar](50) NULL,
+ [YunMouDeviceId] [nvarchar](50) NULL,
+ [YunMouPermission] [nvarchar](50) NULL,
+ CONSTRAINT [PK_Project_Devices] PRIMARY KEY CLUSTERED
+(
+ [DeviceId] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+
From 9127a6ebaee39b5135c407d897559e950dcf2c74 Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Sat, 20 Dec 2025 17:51:14 +0800
Subject: [PATCH 02/10] 11
---
SGGL/BLL/BLL.csproj | 1 +
SGGL/BLL/Common/YunMouHelper.cs | 574 ++++++++++++++++++++++++++++++++
2 files changed, 575 insertions(+)
create mode 100644 SGGL/BLL/Common/YunMouHelper.cs
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 5e1398c9..daa650a0 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -288,6 +288,7 @@
+
diff --git a/SGGL/BLL/Common/YunMouHelper.cs b/SGGL/BLL/Common/YunMouHelper.cs
new file mode 100644
index 00000000..2825490b
--- /dev/null
+++ b/SGGL/BLL/Common/YunMouHelper.cs
@@ -0,0 +1,574 @@
+
+using Newtonsoft.Json;
+using System;
+using System.Configuration;
+using System.Drawing;
+using System.IO;
+using System.Net;
+using System.Text;
+
+namespace BLL.Common
+{
+ public class YunMouHelper
+ {
+ public static string YunMouUrl = ConfigurationManager.AppSettings["YunMouUrl"];
+ public static string ClientSecret = ConfigurationManager.AppSettings["ClientSecret"];
+ public static string ClientId = ConfigurationManager.AppSettings["ClientId"];
+
+ public static string getToken()
+ {
+ string data = "client_id=" + ClientId + "&client_secret=" + ClientSecret + "&grant_type=client_credentials&scope=app";
+ string result = Post(YunMouUrl + "oauth/token", data, "application/x-www-form-urlencoded", "");
+ var j2 = JsonConvert.DeserializeObject(result);
+ return j2.access_token;
+
+ }
+ ///
+ /// 添加设备组(一个项目一个)
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string addDevicesGroups(string groupName, string groupNo, string access_token)
+ {
+ if (groupName.Length > 64)
+ {
+ groupName = groupName.Substring(0, 63);
+ }
+ string data = "{\"groupName\":\"" + groupName + "\",\"groupNo\":\"" + groupNo + "\"}";
+ string result = Post(YunMouUrl + "api/v1/open/basic/groups/create", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "添加设备组");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.message;
+ else
+ {
+ return "";
+ }
+ }
+
+ ///
+ /// 删除设备分组
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string deleteDevicesGroups(string groupNo, string access_token)
+ {
+
+ string result = Post(YunMouUrl + "api/v1/open/basic/groups/delete?groupNo=" + groupNo, "", "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "删除设备组");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.message;
+ else
+ {
+ return "";
+ }
+ }
+
+ ///
+ /// 添加设备
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string addDevices(string deviceSerial, string groupNo, string validateCode, string access_token)
+ {
+ string data = "{\"deviceSerial\":\"" + deviceSerial + "\",\"groupNo\":\"" + groupNo + "\",\"validateCode\":\"" + validateCode + "\"}";
+ string result = Post(YunMouUrl + "api/v1/open/basic/devices/create", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "添加设备");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.data.groupId;
+ else
+ {
+ return "";
+ }
+ }
+ ///
+ /// 修改设备名称(按设备序列号)
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string updateDevices(string deviceSerial, string deviceName, string access_token)
+ {
+ string data = "{\"deviceSerial\":\"" + deviceSerial + "\",\"deviceName\":\"" + deviceName + "\"}";
+ string result = Post(YunMouUrl + "api/v1/open/basic/devices/update", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "修改设备名称");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.message;
+ else
+ {
+ return "";
+ }
+ }
+ ///
+ /// 删除设备
+ ///
+ ///
+ ///
+ ///
+ public static string deleteDevices(string deviceSerial, string access_token)
+ {
+
+ string result = Post(YunMouUrl + "api/v1/open/basic/devices/delete?deviceSerial=" + deviceSerial, "", "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "删除设备");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.message;
+ else
+ {
+ return "";
+ }
+ }
+ ///
+ /// 添加权限组,建议一个项目一个
+ ///
+ ///
+ ///
+ ///
+ public static string addPermissionGroups(string groupName, string access_token)
+ {
+
+ char[] TrimChar = { '、', ' ', '-', '\'', '\"', '\\', '.', '、', '-', '[', ']', '【', '】', '(', ')', '#', '@', '~', '<', '>' };
+ //groupname不能大于32位
+ if (groupName.Length > 32)
+ {
+ groupName = groupName.Substring(0, 31).Trim(TrimChar);
+ }
+ groupName = groupName.Replace("、", "").Replace("/", "").Replace(".", "").Replace("-", "").Replace("[", "").Replace("]", "").Replace("【", "").Replace("】", "").Replace("(", "")
+ .Replace(")", "").Replace("#", "").Replace("@", "").Replace("~", "").Replace("<", "").Replace(">", "")
+ .Replace("(", "")
+ .Replace(")", "");
+ string data = "{\"groupName\":\"" + groupName + "\"}";
+ string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/create", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "添加权限组");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.data.groupId;
+ else
+ {
+ return "";
+ }
+ }
+
+ ///
+ /// 根据权限组下发权限
+ ///
+ ///
+ ///
+ ///
+ public static string issuedByGroup(string groupId, string access_token)
+ {
+ string data = "{\"groupId\":\"" + groupId + "\"}";
+ string result = Post(YunMouUrl + "api/v1/open/accessControl/allots/actions/issuedByGroup", data, "application/json;charset=UTF-8", access_token);
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.code;
+ else
+ {
+ return "";
+ }
+ }
+
+
+
+ ///
+ /// 删除权限组(会同时移除权限组下人员和设备下发记录以及已下发到设备的权限)
+ ///
+ ///
+ ///
+ ///
+ public static string deletePermissionGroups(string groupId, string access_token)
+ {
+ string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/delete?groupId=" + groupId, "", "application/json;charset=UTF-8", access_token);
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ {
+ return j2.data.groupId;
+ }
+ else
+ {
+ return "";
+ }
+ }
+
+ ///
+ /// 填加员工到权限组
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string addPersonsToGroups(string groupId, string[] employeeNos, string access_token)
+ {
+
+ //string permissions = "";
+ //if (employeeNos.Length == 1)
+ //{
+ // permissions = "\"permissions\":[{\"employeeNo\": \"" + employeeNos[0] + "\",\"validBeginTime\": \"2020-01-11\"," +
+ // "\"validEndTime\": \"2050-12-30\"}]";
+ //}
+ string data = "{\"groupId\":\"" + groupId + "\",\"employeeNos\":[\"" + string.Join("\", \"", employeeNos) + "\"],\"autoIssue\":\"true\"}";
+ string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/actions/addPersons", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "填加员工到权限组");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.data.statisticsId;
+ else
+ {
+ return "";
+ }
+ }
+ ///
+ /// 从权限组移除员工
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string deletePersonsFromGroups(string groupId, string[] employeeNos, string access_token)
+ {
+ string data = "{\"groupId\":\"" + groupId + "\",\"employeeNos\":[\"" + string.Join("\", \"", employeeNos) + "\"]}";
+ string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/actions/removePersons", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "从权限组移除员工");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.data.statisticsId;
+ else
+ {
+ return "";
+ }
+ }
+ ///
+ /// 添加设备到权限组
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string addDevicesToGroups(string groupId, string[] devices, string access_token)
+ {
+ string data = "{\"groupId\":\"" + groupId + "\",\"deviceSerials\":[\"" + string.Join("\", \"", devices) + "\"],\"autoIssue\":true,\"checkCapability\":true}";
+ string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/actions/addDevices", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "添加设备到权限组");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.code;
+ else
+ {
+ return "";
+ }
+ }
+ ///
+ /// 从权限组移除设备
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string deleteDevicesFromGroups(string groupId, string[] devices, string access_token)
+ {
+ string data = "{\"groupId\":\"" + groupId + "\",\"deviceSerials\":[\"" + string.Join("\", \"", devices) + "\"],\"autoIssue\":true,\"checkCapability\":true}";
+ string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/actions/removeDevices", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(result, "从权限组移除设备");
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.message;
+ else
+ {
+ return "";
+ }
+ }
+ ///
+ /// 添加人员
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+
+ public static string addPerson(string employeeNo, string personName, string personPhone, string pic, string access_token)
+ {
+ string rootUrl = ConfigurationManager.AppSettings["localRoot"];
+ string filename = rootUrl + pic;
+ FileInfo fi1 = new FileInfo(filename);
+ if (fi1.Length > 200 * 1024)//base64编码的人脸图片,图片大小需小于200kB,数据需去除base64前缀
+ {
+ filename = filename.Replace(".jpg", "_new.jpg").Replace(".jpeg", "_new.jpeg");
+ CropImage(fi1.FullName, filename, 200);
+ }
+ string faceImageBase64 = ImageToByte64String(filename, System.Drawing.Imaging.ImageFormat.Jpeg); // 图片的base64编码
+ string data = "{\"employeeNo\":\"" + employeeNo + "\",\"personName\":\"" + personName + "\",\"faceImageBase64\":\"" + faceImageBase64 + "\",\"verifyImage\":true}";
+ string result = Post(YunMouUrl + "api/v1/open/basic/persons/create", data, "application/json;charset=UTF-8", access_token);
+ LogService.AddLog(personName + result, "添加人员");
+ var j2 = JsonConvert.DeserializeObject(result);
+ return j2.code;
+ }
+ ///
+ /// 根据employeeNo更新人员信息
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string updatePerson(string employeeNo, string personName, string personPhone, string pic, string access_token)
+ {
+ string rootUrl = ConfigurationManager.AppSettings["localRoot"];
+ string filename = rootUrl + pic;
+ FileInfo fi1 = new FileInfo(filename);
+ if (fi1.Length > 200 * 1024)//base64编码的人脸图片,图片大小需小于200kB,数据需去除base64前缀
+ {
+ filename = filename.Replace(".jpg", "_new.jpg").Replace(".jpeg", "_new.jpeg");
+ CropImage(fi1.FullName, filename, 200);
+ }
+ string faceImageBase64 = ImageToByte64String(filename, System.Drawing.Imaging.ImageFormat.Jpeg); // 图片的base64编码
+ string data = "{\"employeeNo\":\"" + employeeNo + "\",\"personName\":\"" + personName + "\",\"faceImageBase64\":\"" + faceImageBase64 + "\",\"verifyImage\":true}";
+ string result = Post(YunMouUrl + "api/v1/open/basic/persons/update", data, "application/json;charset=UTF-8", access_token);
+ var j2 = JsonConvert.DeserializeObject(result);
+ return j2.code;
+ }
+ ///
+ /// 获取人员
+ ///
+ ///
+ ///
+ ///
+ public static string getPerson(string employeeNo, string access_token)
+ {
+ string result = Get(YunMouUrl + "api/v1/open/basic/persons/get?employeeNo=" + employeeNo, "application/json;charset=UTF-8", access_token);
+ return result;
+ }
+
+
+
+ ///
+ /// 设备布防
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string setDefence(string deviceSerial, string isDefence, string access_token)
+ {
+ string result = Post(YunMouUrl + "api/v1/ezviz/devices/actions/setDefence/deviceSerial?deviceSerial=" + deviceSerial + "&isDefence=" + isDefence, "", "application/json;charset=UTF-8", access_token);
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.message;
+ else
+ {
+ return "";
+ }
+ }
+
+ ///
+ /// 添加消息通道
+ ///
+ ///
+ ///
+ public static string addConsumer(string access_token)
+ {
+ string result = Post(YunMouUrl + "api/v1/mq/consumer/group1", "", "application/json;charset=UTF-8", access_token);
+ var j2 = JsonConvert.DeserializeObject(result);
+ if (j2.code == "200")
+ return j2.data.consumerId;
+ else
+ {
+ return "";
+ }
+ }
+ ///
+ /// 提交偏移量
+ ///
+ ///
+ ///
+ ///
+ public static string offsets(string consumerId, string access_token)
+ {
+ string data = "consumerId=" + consumerId;
+ string result = Post(YunMouUrl + "api/v1/mq/consumer/offsets", data, "application/x-www-form-urlencoded", access_token);
+ return result;
+ }
+
+ ///
+ /// 消费消息
+ ///
+ ///
+ ///
+ ///
+ public static string consumerMessage(string consumerId, string access_token)
+ {
+ string data = "consumerId=" + consumerId + "&autoCommit=true";
+ string result = Post(YunMouUrl + "api/v1/mq/consumer/messages", data, "application/x-www-form-urlencoded", access_token);
+ return result;
+ }
+
+ ///
+ /// POST请求
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string Post(string url, string data, string ContentType, string token)
+ {
+ Encoding encoding = Encoding.Default;
+
+ ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;//设置这个安全协议必须在创建请求之前!
+ HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;//创建请求对象
+ request.Method = "POST";//请求方式
+ request.ContentType = ContentType;//链接类型
+ if (!string.IsNullOrEmpty(token))
+ {
+ request.Headers.Add("Authorization", "Bearer " + token);
+ }
+ try
+ {
+ byte[] buffer = Encoding.UTF8.GetBytes(data);
+ //RequestStream.Write(bytes, 0, bytes.Length);
+ // byte[] buffer = encoding.GetBytes(data);
+ request.ContentLength = buffer.Length;
+ request.GetRequestStream().Write(buffer, 0, buffer.Length);
+ HttpWebResponse webresponse = request.GetResponse() as HttpWebResponse;
+ using (Stream s = webresponse.GetResponseStream())
+ {
+ HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+ StreamReader reader = new StreamReader(s, Encoding.UTF8);
+
+ string res = reader.ReadToEnd();
+ LogService.AddLog(res, "http请求返回");
+ return res;
+ }
+ }
+ catch (Exception ex)
+ {
+ return "";
+ }
+ }
+ ///
+ /// GET请求
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static string Get(string url, string ContentType, string token)
+ {
+ Encoding encoding = Encoding.Default;
+
+ ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;//设置这个安全协议必须在创建请求之前!
+ HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;//创建请求对象
+ request.Method = "GET";//请求方式
+ request.ContentType = ContentType;//链接类型
+ if (!string.IsNullOrEmpty(token))
+ {
+ request.Headers.Add("Authorization", "Bearer " + token);
+ }
+ try
+ {
+ HttpWebResponse webresponse = request.GetResponse() as HttpWebResponse;
+ using (Stream s = webresponse.GetResponseStream())
+ {
+ HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+ StreamReader reader = new StreamReader(s, Encoding.UTF8);
+ return reader.ReadToEnd();
+ }
+ }
+ catch (Exception ex)
+ {
+ return "";
+ }
+ }
+ public static string ImageToByte64String(string filePath, System.Drawing.Imaging.ImageFormat format)
+ {
+ Bitmap bitmap = new Bitmap(filePath);
+ MemoryStream memoryStream = new MemoryStream();
+ bitmap.Save(memoryStream, format);
+ byte[] array = new byte[memoryStream.Length];
+ memoryStream.Position = 0L;
+ memoryStream.Read(array, 0, (int)memoryStream.Length);
+ memoryStream.Close();
+ return Convert.ToBase64String(array);
+ }
+ public static void CropImage(string inputFilePath, string outputFilePath, int maxSizeInKB)
+ {
+ // 加载图片
+ using (Image image = Image.FromFile(inputFilePath))
+ {
+ // 计算最大字节大小
+ int maxSizeBytes = maxSizeInKB * 1024;
+
+ // 如果图片大小已经小于或等于最大限制,则不裁剪直接保存
+ if (GetImageSizeInBytes(image) <= maxSizeBytes)
+ {
+ image.Save(outputFilePath, image.RawFormat);
+ return;
+ }
+
+ // 裁剪图片
+ // 这里只是一个简单的示例,实际应用中可能需要根据需求来裁剪图片
+ using (Image croppedImage = CropImageToHalfSize(image))
+ {
+ // 保存裁剪后的图片
+ using (MemoryStream memoryStream = new MemoryStream())
+ {
+ croppedImage.Save(memoryStream, image.RawFormat);
+
+ // 如果裁剪后的图片大小仍然大于限制,则递归裁剪
+ if (memoryStream.Length > maxSizeBytes)
+ {
+ memoryStream.Position = 0;
+ string tempFile = outputFilePath.Replace(".jpg", "temp.jpg").Replace(".jpeg", "temp.jpg");
+ using (FileStream fileStream = new FileStream(tempFile, FileMode.Create))
+ {
+ memoryStream.CopyTo(fileStream);
+ }
+ CropImage(tempFile, outputFilePath, maxSizeInKB);
+ }
+ else
+ {
+ // 保存到文件
+ memoryStream.Position = 0;
+ using (FileStream fileStream = new FileStream(outputFilePath, FileMode.Create))
+ {
+ memoryStream.CopyTo(fileStream);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ private static Image CropImageToHalfSize(Image image)
+ {
+ // 这里只是一个示例,实际情况可能需要根据需求来裁剪图片
+ int newWidth = image.Width / 2;
+ int newHeight = image.Height / 2;
+ return image.GetThumbnailImage(newWidth, newHeight, () => { return false; }, IntPtr.Zero);
+ }
+
+ private static long GetImageSizeInBytes(Image image)
+ {
+ using (MemoryStream memoryStream = new MemoryStream())
+ {
+ image.Save(memoryStream, image.RawFormat);
+ return memoryStream.Length;
+ }
+ }
+ }
+
+
+}
From f0c35de27dd69b6bc90d1f8524e75612f010bbfc Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Mon, 22 Dec 2025 21:14:34 +0800
Subject: [PATCH 03/10] 11
---
DataBase/版本日志/SGGLDB_V2025-12-20.sql | 15 +
SGGL/BLL/Common/Const.cs | 5 +
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 16 +
.../ProjectData/ProjectDevices.aspx | 134 +++++++
.../ProjectData/ProjectDevices.aspx.cs | 327 ++++++++++++++++++
.../ProjectDevices.aspx.designer.cs | 179 ++++++++++
.../ProjectData/ProjectDevicesEdit.aspx | 63 ++++
.../ProjectData/ProjectDevicesEdit.aspx.cs | 131 +++++++
.../ProjectDevicesEdit.aspx.designer.cs | 125 +++++++
.../ProjectData/ProjectSysSet.aspx | 24 ++
.../ProjectData/ProjectSysSet.aspx.cs | 43 +++
.../ProjectSysSet.aspx.designer.cs | 27 ++
SGGL/WebAPI/Controllers/PersonController.cs | 6 +-
13 files changed, 1094 insertions(+), 1 deletion(-)
create mode 100644 SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx
create mode 100644 SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx
create mode 100644 SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.designer.cs
diff --git a/DataBase/版本日志/SGGLDB_V2025-12-20.sql b/DataBase/版本日志/SGGLDB_V2025-12-20.sql
index 6d2428f9..83d9a18f 100644
--- a/DataBase/版本日志/SGGLDB_V2025-12-20.sql
+++ b/DataBase/版本日志/SGGLDB_V2025-12-20.sql
@@ -1,3 +1,18 @@
+INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'项目设备', NULL, N'ProjectData/ProjectDevices.aspx', '86', N'0', N'Menu_ProjectSet', '0', '1', '1');
+
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'1E3A5ADC-BAA7-45BC-AAF9-012A024F4752', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'保存', '4');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'37E51622-FB4E-40F4-8D37-603EE626DB7F', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'增加', '1');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'6EBFA308-581A-4260-9ECA-7E30283EF9EA', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'删除', '3');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'939F4F2D-F03B-4DBD-963C-D55196535D8C', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'修改', '2');
+
+
+
+Alter TABLE [dbo].[Base_Project]
+ add
+ [IsYunMou] [bit] NULL,
+ [YunMouGroupId] [nvarchar](50) NULL
+
+GO
CREATE TABLE [dbo].[Project_Devices](
[DeviceId] [nvarchar](50) NOT NULL,
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 153ce344..b9bbcc74 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -5131,6 +5131,11 @@ namespace BLL
///
public const string SafetyProductionEvaluationMenuId = "C48087A8-4C9F-485D-B0A4-C85E112BA705";
+
+ ///
+ /// 项目设备
+ ///
+ public const string ProjectDevicesMenuId = "E4DC0A35-C585-4C4F-8F79-10F528892314";
///
/// 中央企业安全生产治本攻坚三年行动工作台账
///
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index fd310b8d..99c39687 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -3061,6 +3061,8 @@
+
+
@@ -14772,6 +14774,20 @@
MainItemView.aspx
+
+ ProjectDevices.aspx
+ ASPXCodeBehind
+
+
+ ProjectDevices.aspx
+
+
+ ProjectDevicesEdit.aspx
+ ASPXCodeBehind
+
+
+ ProjectDevicesEdit.aspx
+
ProjectInformation.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx
new file mode 100644
index 00000000..bf46519f
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx
@@ -0,0 +1,134 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectDevices.aspx.cs" Inherits="FineUIPro.Web.ProjectData.ProjectDevices" %>
+
+
+
+
+
+ 项目设备
+
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx.cs
new file mode 100644
index 00000000..f85822d3
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx.cs
@@ -0,0 +1,327 @@
+using BLL;
+using BLL.Common;
+using FineUIPro.Web.DataShow;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using System.Web.Services.Description;
+using WIA;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.ProjectData
+{
+ public partial class ProjectDevices : PageBase
+ {
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+
+ this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+
+ // 绑定表格
+ this.BindGrid();
+ ////权限按钮方法
+ this.GetButtonPower();
+ }
+ }
+ #endregion
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+
+ string strSql = @" Select * ,case when [isInOut] =1 then '进' else '出' end [IsInOutValue] ,case when [YunMouDeviceId] is not null and [YunMouDeviceId] <> '' then '是' else '' end [DeviceToYunMou] from Project_Devices WHERE ";
+ List listStr = new List();
+ strSql += " ProjectId = @ProjectId";
+ listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
+ if (!string.IsNullOrEmpty(this.txtDeviceName.Text.Trim()))
+ {
+ strSql += " AND DeviceName LIKE @DeviceName";
+ listStr.Add(new SqlParameter("@DeviceName", "%" + this.txtDeviceName.Text.Trim() + "%"));
+ }
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+
+ Grid1.RecordCount = tb.Rows.Count;
+ tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+
+ #region 操作 Events
+ ///
+ /// 右键删除事件
+ ///
+ ///
+ ///
+ protected void btnMenuDelete_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ string unitName = string.Empty;
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string deviceId = Grid1.DataKeys[rowIndex][0].ToString();
+ Model.Project_Devices devices = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == deviceId);
+ var token = YunMouHelper.getToken();
+ YunMouHelper.deleteDevices(devices.DeviceSerial, token);
+ Funs.DB.Project_Devices.DeleteOnSubmit(devices);
+ Funs.DB.SubmitChanges();
+ }
+
+ BindGrid();
+ if (string.IsNullOrEmpty(unitName))
+ {
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+ }
+ #endregion
+
+ #region 排序 分页
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ ///
+ /// 增加按钮事件
+ ///
+ ///
+ ///
+ protected void btnAdd_Click(object sender, EventArgs e)
+ {
+
+ PageContext.RegisterStartupScript(Window1.GetShowReference("ProjectDevicesEdit.aspx", "添加设备", 800, 300));
+
+ }
+
+ ///
+ /// 双击事件
+ ///
+ ///
+ ///
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ this.EditData();
+ }
+
+ ///
+ /// 右键编辑事件
+ ///
+ ///
+ ///
+ protected void btnMenuEdit_Click(object sender, EventArgs e)
+ {
+ this.EditData();
+ }
+ protected void btnMenuDeviceToYunMou_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ var device = Funs.DB.Project_Devices.FirstOrDefault(x=>x.DeviceId== Grid1.SelectedRowID) ;
+ if (device != null)
+ {
+ var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
+ var token = YunMouHelper.getToken();
+ string data;
+ data = Regex.Replace(project.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
+ var YunMouDeviceId = YunMouHelper.addDevices(device.DeviceSerial, data, device.ValidateCode, token);//添加设备
+ if (!string.IsNullOrEmpty(YunMouDeviceId))
+ {
+ device.YunMouDeviceId = YunMouDeviceId;
+ Funs.DB.SubmitChanges();
+ ShowNotify("同步成功", MessageBoxIcon.Success);
+ BindGrid();
+ }
+ else
+ {
+ Alert.ShowInTop("同步设备出错!", MessageBoxIcon.Warning);
+
+ }
+ }
+ }
+ protected void btnMenuSyncPermission_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ var device = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == Grid1.SelectedRowID);
+ if (device != null)
+ {
+ var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
+ var token = YunMouHelper.getToken();
+ var res = YunMouHelper.addDevicesToGroups(project.YunMouGroupId, new string[] { device.DeviceSerial }, token);//添加到权限组
+ YunMouHelper.setDefence(device.DeviceSerial,"1",token);
+ if (string.IsNullOrEmpty(res))
+ {
+ Alert.ShowInTop("关联权限出错!", MessageBoxIcon.Warning);
+
+ }
+ else {
+ device.YunMouPermission = "是";
+ Funs.DB.SubmitChanges();
+ ShowNotify("关联成功", MessageBoxIcon.Success);
+ BindGrid();
+ }
+ }
+ }
+
+ protected void btnMenuDeletePermission_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ var device = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceId == Grid1.SelectedRowID);
+ if (device != null)
+ {
+ var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
+ var token = YunMouHelper.getToken();
+ var res = YunMouHelper.deleteDevicesFromGroups(project.YunMouGroupId, new string[] { device.DeviceSerial }, token);//从权限组移除设备
+ if (string.IsNullOrEmpty(res))
+ {
+ Alert.ShowInTop("关联权限出错!", MessageBoxIcon.Warning);
+
+ }
+ else
+ {
+ device.YunMouPermission = null;
+ Funs.DB.SubmitChanges();
+ BindGrid();
+ }
+
+ }
+ }
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData()
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectDevicesEdit.aspx?DeviceId={0}", Grid1.SelectedRowID), "编辑项目单位", 800, 300));
+
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Window1_Close(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ string menuId = BLL.Const.ProjectDevicesMenuId;
+
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, menuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnAdd.Hidden = false;
+
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuDeletePermission.Hidden= false;
+ this.btnAdd.Hidden = false;
+ this.btnMenuEdit.Hidden = false;
+ this.btnMenuDeviceToYunMou.Hidden = false;
+ this.btnMenuSyncPermission.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDelete.Hidden = false;
+ }
+ }
+
+
+ }
+ #endregion
+
+ #region 查询
+ ///
+ /// 查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ this.GetButtonPower();
+ }
+ #endregion
+
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx.designer.cs
new file mode 100644
index 00000000..62f2bf25
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectDevices.aspx.designer.cs
@@ -0,0 +1,179 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ProjectData
+{
+
+
+ public partial class ProjectDevices
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtDeviceName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDeviceName;
+
+ ///
+ /// btnAdd 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnAdd;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuEdit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuEdit;
+
+ ///
+ /// btnMenuDeviceToYunMou 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDeviceToYunMou;
+
+ ///
+ /// btnMenuSyncPermission 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuSyncPermission;
+
+ ///
+ /// btnMenuDeletePermission 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDeletePermission;
+
+ ///
+ /// btnMenuDelete 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDelete;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx
new file mode 100644
index 00000000..15651b88
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx
@@ -0,0 +1,63 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectDevicesEdit.aspx.cs"
+ Inherits="FineUIPro.Web.ProjectData.ProjectDevicesEdit" %>
+
+
+
+
+ 编辑班组信息
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.cs
new file mode 100644
index 00000000..ade4bc6c
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.cs
@@ -0,0 +1,131 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using BLL;
+using BLL.Common;
+using FastReport.Cloud.OAuth;
+using FineUIPro.Web.DataShow;
+using Org.BouncyCastle.Crypto;
+
+namespace FineUIPro.Web.ProjectData
+{
+ public partial class ProjectDevicesEdit : PageBase
+ {
+ #region 定义项
+ ///
+ /// 主键
+ ///
+ public string DeviceId
+ {
+ get
+ {
+ return (string)ViewState["DeviceId"];
+ }
+ set
+ {
+ ViewState["DeviceId"] = value;
+ }
+ }
+ #endregion
+
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ this.DeviceId = Request.Params["DeviceId"];
+ if (!string.IsNullOrEmpty(this.DeviceId))
+ {
+ Model.Project_Devices device = Funs.DB.Project_Devices.FirstOrDefault(x=>x.DeviceId==this.DeviceId);
+ if (device != null)
+ {
+ this.txtDeviceName.Text = device.DeviceName;
+ this.txtDeviceSerial.Text = device.DeviceSerial;
+ this.txtAddress.Text = device.Address;
+ this.txtValidateCode.Text = device.ValidateCode;
+ if (!string.IsNullOrEmpty(device.IsInOut))
+ {
+ this.drpInOut.SelectedValue = device.IsInOut;
+ }
+ //this.txtThirdTeamCode.Text = teamGroup.ThirdTeamCode;
+ if (device.CreateDate != null)
+ {
+ this.dpCreateDate.Text = string.Format("{0:yyyy-MM-dd}", device.CreateDate);
+ }
+
+ }
+ }
+ }
+ }
+ #endregion
+
+ #region 保存
+ ///
+ /// 保存按钮
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+
+
+ Model.Project_Devices device = new Model.Project_Devices
+ {
+ ProjectId = this.CurrUser.LoginProjectId,
+ DeviceName = this.txtDeviceName.Text.Trim(),
+ DeviceSerial = this.txtDeviceSerial.Text.Trim(),
+ Address = txtAddress.Text.Trim(),
+ ValidateCode=txtValidateCode.Text.Trim(),
+ CreateDate = Funs.GetNewDateTime(this.dpCreateDate.Text.Trim())
+ };
+ if (this.drpInOut.SelectedValue != BLL.Const._Null)
+ {
+ device.IsInOut = this.drpInOut.SelectedValue;
+ }
+
+ if (!string.IsNullOrEmpty(this.DeviceId))
+ {
+ device.DeviceId = this.DeviceId;
+ BLL.ProjectDeviceService.UpdateProjectDevice(device);
+ var token = YunMouHelper.getToken();
+ YunMouHelper.updateDevices(device.DeviceSerial, device.DeviceName, token);
+ BLL.LogService.AddSys_Log(this.CurrUser, device.DeviceName, device.DeviceId, BLL.Const.ProjectDevicesMenuId, BLL.Const.BtnModify);
+ }
+ else
+ {
+ this.DeviceId = SQLHelper.GetNewID(typeof(Model.Project_Devices));
+ device.DeviceId = this.DeviceId;
+ var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
+ var token = YunMouHelper.getToken();
+ string data;
+ data = Regex.Replace(project.ProjectCode, "[^0-9A-Fa-f]", "", RegexOptions.IgnoreCase);
+ device.YunMouDeviceId = YunMouHelper.addDevices(device.DeviceSerial, data, device.ValidateCode, token);//添加设备之后,将权限添加到权限组
+ var res = YunMouHelper.addDevicesToGroups(project.YunMouGroupId, new string[] { device.DeviceSerial }, token);//添加到权限组
+ if (!string.IsNullOrEmpty(res))
+ {
+ device.YunMouPermission = "已关联";
+ }
+ BLL.ProjectDeviceService.AddProjectDevice(device);
+ BLL.LogService.AddSys_Log(this.CurrUser, device.DeviceName, device.DeviceId, BLL.Const.ProjectDevicesMenuId, BLL.Const.BtnAdd);
+ }
+ ShowNotify("保存数据成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ #endregion
+
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.designer.cs
new file mode 100644
index 00000000..f88bb1f4
--- /dev/null
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.designer.cs
@@ -0,0 +1,125 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ProjectData
+{
+
+
+ public partial class ProjectDevicesEdit
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtDeviceName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDeviceName;
+
+ ///
+ /// txtDeviceSerial 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtDeviceSerial;
+
+ ///
+ /// dpCreateDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker dpCreateDate;
+
+ ///
+ /// drpInOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpInOut;
+
+ ///
+ /// txtValidateCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtValidateCode;
+
+ ///
+ /// txtAddress 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtAddress;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx
index 192002cd..3d269000 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx
@@ -14,6 +14,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
protected global::FineUIPro.Region Region2;
+ ///
+ /// GroupPanel0 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel0;
+
+ ///
+ /// Form4 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form Form4;
+
+ ///
+ /// ckbIsYunMou 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox ckbIsYunMou;
+
///
/// GroupPanel2 控件。
///
diff --git a/SGGL/WebAPI/Controllers/PersonController.cs b/SGGL/WebAPI/Controllers/PersonController.cs
index 86800b99..d115bc9b 100644
--- a/SGGL/WebAPI/Controllers/PersonController.cs
+++ b/SGGL/WebAPI/Controllers/PersonController.cs
@@ -762,11 +762,15 @@ namespace WebAPI.Controllers
var responeData = new Model.ResponeData();
try
{
+ var trainingIds = Funs.DB.EduTrain_TrainRecord.Where(x => projectId == projectId).Select(x => x.TrainingId).ToList();
+ var personIds = Funs.DB.EduTrain_TrainRecordDetail.Where(x => trainingIds.Contains(x.TrainingId)).Select(x=>x.PersonId).ToList(); ;
+
responeData.data = (from x in Funs.DB.SitePerson_Person
join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId
- join persons in Funs.DB.Person_Persons on x.IdentityCard equals persons.IdentityCard
+ join persons in Funs.DB.Person_Persons on x.IdentityCard equals persons.IdentityCard
where x.ProjectId == projectId && !x.ExchangeTime.HasValue
&& x.States == Const.ProjectPersonStates_1 && x.CardNo.Length > 5 && persons.PhotoUrl != null
+ where personIds.Contains(x.PersonId)
select new
{
x.PersonId,
From a9f0cd7fba544a45d6707a1ee220e56d6eb2d898 Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Tue, 23 Dec 2025 20:33:12 +0800
Subject: [PATCH 04/10] 11
---
DataBase/版本日志/SGGLDB_V2025-12-23-002.sql | 36 +
DataBase/版本日志/SGGLDB_V2025-12-23.sql | 2 +
SGGL/BLL/BLL.csproj | 2 +
SGGL/BLL/Common/Const.cs | 4 +
SGGL/BLL/OpenService/YunMouService.cs | 416 +++++++
SGGL/BLL/ProjectData/ProjectDeviceService.cs | 87 ++
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 10 +-
SGGL/FineUIPro.Web/Global.asax.cs | 1 +
.../HSSE/SitePerson/DateManage.aspx | 107 ++
.../HSSE/SitePerson/DateManage.aspx.cs | 112 ++
.../SitePerson/DateManage.aspx.designer.cs | 188 +++
.../HSSE/SitePerson/PersonInfo.aspx | 3 +
.../HSSE/SitePerson/PersonInfo.aspx.cs | 37 +-
.../SitePerson/PersonInfo.aspx.designer.cs | 77 +-
.../HSSE/SitePerson/PersonList.aspx | 7 +-
.../HSSE/SitePerson/PersonList.aspx.cs | 29 +
.../SitePerson/PersonList.aspx.designer.cs | 18 +-
.../ProjectData/ProjectDevicesEdit.aspx.cs | 5 +-
.../ProjectData/ProjectSysSet.aspx.cs | 3 +-
SGGL/Microsoft.PowerShell_profile.ps1 | 0
SGGL/Model/Model.cs | 1106 ++++++++++++++---
21 files changed, 2015 insertions(+), 235 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2025-12-23-002.sql
create mode 100644 DataBase/版本日志/SGGLDB_V2025-12-23.sql
create mode 100644 SGGL/BLL/OpenService/YunMouService.cs
create mode 100644 SGGL/BLL/ProjectData/ProjectDeviceService.cs
create mode 100644 SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx
create mode 100644 SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx.designer.cs
create mode 100644 SGGL/Microsoft.PowerShell_profile.ps1
diff --git a/DataBase/版本日志/SGGLDB_V2025-12-23-002.sql b/DataBase/版本日志/SGGLDB_V2025-12-23-002.sql
new file mode 100644
index 00000000..234f8b4b
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-12-23-002.sql
@@ -0,0 +1,36 @@
+INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'5B302FF3-A6E4-4305-A0C0-64CA7377777A', N'ʱ', NULL, N'HSSE/SitePerson/DateManage.aspx', '9', N'0', N'Menu_SMZGL', '0', '1', '1');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'1CFF6CE1-52F4-41F4-A40F-1DB4DB353974', N'5B302FF3-A6E4-4305-A0C0-64CA7377777A', N'', '1');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'46F5F687-D838-4D7E-A7D0-F0262BFC9F04', N'5B302FF3-A6E4-4305-A0C0-64CA7377777A', N'ɾ', '3');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'CEC8EAE8-A691-496A-BE4B-AFD9C8BD6FAD', N'5B302FF3-A6E4-4305-A0C0-64CA7377777A', N'', '4');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'DF01EF57-7D20-4E1D-AE6C-CC65798D5830', N'5B302FF3-A6E4-4305-A0C0-64CA7377777A', N'', '2');
+
+
+CREATE TABLE [dbo].[Kqgl_DateManage](
+ [Id] [nvarchar](50) NOT NULL,
+ [ProjectId] [nvarchar](50) NULL,
+ [AmStartTime1] [time](7) NULL,
+ [AmStartTime2] [time](7) NULL,
+ [AmEndTime1] [time](7) NULL,
+ [AmEndTime2] [time](7) NULL,
+ [PmStartTime1] [time](7) NULL,
+ [PmStartTime2] [time](7) NULL,
+ [PmEndTime1] [time](7) NULL,
+ [PmEndTime2] [time](7) NULL,
+ [LateTime] [int] NULL,
+ [LeaveTime] [int] NULL,
+ [EquipmentCode] [nvarchar](500) NULL,
+ CONSTRAINT [PK_Kqgl_DateManage] PRIMARY KEY CLUSTERED
+(
+ [Id] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ٵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Kqgl_DateManage', @level2type=N'COLUMN',@level2name=N'LateTime'
+GO
+
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Kqgl_DateManage', @level2type=N'COLUMN',@level2name=N'LeaveTime'
+GO
+
+
diff --git a/DataBase/版本日志/SGGLDB_V2025-12-23.sql b/DataBase/版本日志/SGGLDB_V2025-12-23.sql
new file mode 100644
index 00000000..3b602ae5
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-12-23.sql
@@ -0,0 +1,2 @@
+Alter TABLE [dbo].[Person_Persons]
+add [YunMouState] [nvarchar](50) NULL
\ No newline at end of file
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 7f6a19fa..72a496c3 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -602,6 +602,7 @@
+
@@ -672,6 +673,7 @@
+
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 8a64bef8..7ad3c8af 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -2048,6 +2048,10 @@ namespace BLL
///
public const string DayReportMenuId = "8F15D3BE-BE21-4A6F-AD5C-2BBECEE46149";
+ ///
+ /// 考勤时间管理
+ ///
+ public const string Menu_KqglDateManger = "5B302FF3-A6E4-4305-A0C0-64CA7377777A";
///
/// 人工时月报
///
diff --git a/SGGL/BLL/OpenService/YunMouService.cs b/SGGL/BLL/OpenService/YunMouService.cs
new file mode 100644
index 00000000..98a1f3d9
--- /dev/null
+++ b/SGGL/BLL/OpenService/YunMouService.cs
@@ -0,0 +1,416 @@
+using BLL.Common;
+using Newtonsoft.Json;
+using System;
+using System.Linq;
+using System.Timers;
+
+namespace BLL
+{
+ public class YunMouService
+ {
+
+ #region 启动监视器 系统启动5分钟
+ ///
+ /// 监视组件
+ ///
+ private static Timer messageTimer;
+ private static string token;
+ private static string consumerId;
+ ///
+ /// 启动监视器,不一定能成功,根据系统设置决定对监视器执行的操作 系统启动5分钟
+ ///
+ public static void StartMonitor()
+ {
+ token = YunMouHelper.getToken();
+ consumerId = YunMouHelper.addConsumer(token);
+
+ if (messageTimer != null)
+ {
+ messageTimer.Stop();
+ messageTimer.Dispose();
+ messageTimer = null;
+ }
+
+ messageTimer = new Timer
+ {
+ AutoReset = true
+ };
+ messageTimer.Elapsed += new ElapsedEventHandler(InProcess);
+ messageTimer.Interval = 4000 * 60;// 10分钟
+ messageTimer.Start();
+ }
+
+ ///
+ /// 流程确认 定时执行 系统启动5分钟
+ ///
+ /// Timer组件
+ /// 事件参数
+ private static void InProcess(object sender, ElapsedEventArgs e)
+ {
+ //自动调用
+ DoSynchDataNew();
+ }
+ #endregion
+
+ ///
+ /// 手动调用
+ ///
+ public static void manualOperation(string tokenSd, string consumerIdSd)
+ {
+ DoSynchData(tokenSd, consumerIdSd);
+ }
+
+ ///
+ ///
+ ///
+ public static void DoSynchData(string tokenSd = "", string consumerIdSd = "")
+ {
+ try
+ {
+ if (string.IsNullOrEmpty(token))
+ {
+ token = tokenSd;
+ }
+
+ if (string.IsNullOrEmpty(consumerId))
+ {
+ consumerId = consumerIdSd;
+ }
+ ////获取token
+ //token = YunMouHelper.getToken();
+ ////创建消费者消费者如果5分钟未调用拉取消息接口将被删除。
+ //consumerId = YunMouHelper.addConsumer(token);
+
+ LogService.AddLog(token + ";" + consumerId, "调用消息队列参数");
+ string content = YunMouHelper.consumerMessage(consumerId, token);
+ //调用消息队列第一次
+ LogService.AddLog(content, "调用消息队列1");
+ var j2 = JsonConvert.DeserializeObject(content);
+
+ //消费者首次拉取消息时需要与消息通道建立连接,此次调用实际拉到消息列表为空,
+ //再次调用即可拉取到消息,30秒内必须再次调用拉取消息接口,否则将断开与消息通道的连接。
+ //因此拉取间隔需要在30秒以内,否则每次拉到的消息是空的
+ if (j2.data.Count > 0)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ for (int i = 0; i < j2.data.Count; i++)
+ {
+ var msg = JsonConvert.DeserializeObject(j2.data[i]["content"].ToString());
+ if (!string.IsNullOrEmpty(Convert.ToString(msg.employeeNo)))
+ {
+ string deviceSerial = Convert.ToString(msg.deviceSerial);
+ string employeeNo = Convert.ToString(msg.employeeNo);
+ DateTime dateTime = Convert.ToDateTime(Convert.ToString(msg.dateTime));
+ var devices = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceSerial == deviceSerial);
+ Model.SitePerson_PersonInOut newInOut = new Model.SitePerson_PersonInOut
+ {
+ ProjectId = devices.ProjectId,
+ IdentityCard = employeeNo,
+ IsIn = true,
+ ChangeTime = dateTime,
+ InOutWay = Const.InOutWay_1,
+ };
+ InsertInOut(newInOut);
+ }
+
+ }
+ }
+ }
+ else
+ {
+ //修改 如果为空循环调用最多5次
+ for (int y = 0; y < 5; y++)
+ {
+ //如果为空再调一次
+ content = YunMouHelper.consumerMessage(consumerId, token);
+ //调用消息队列第二次
+ LogService.AddLog(content, "调用消息队列" + (y + 2).ToString());
+ j2 = JsonConvert.DeserializeObject(content);
+ if (j2.data.Count > 0)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ for (int i = 0; i < j2.data.Count; i++)
+ {
+ var msg = JsonConvert.DeserializeObject(j2.data[i]["content"].ToString());
+ if (!string.IsNullOrEmpty(Convert.ToString(msg.employeeNo)))
+ {
+ string deviceSerial = Convert.ToString(msg.deviceSerial);
+ string employeeNo = Convert.ToString(msg.employeeNo);
+ DateTime dateTime = Convert.ToDateTime(Convert.ToString(msg.dateTime));
+
+ var devices = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceSerial == deviceSerial);
+ //身份证号时
+ if (employeeNo.Length == 18)
+ {
+ Model.SitePerson_PersonInOut newInOut = new Model.SitePerson_PersonInOut
+ {
+ ProjectId = devices.ProjectId,
+ IdentityCard = employeeNo,
+ IsIn = true,
+ ChangeTime = dateTime,
+ InOutWay = Const.InOutWay_1,
+ };
+ InsertInOut(newInOut);
+
+ }
+ }
+
+ }
+ //提交偏移量
+ var msgOffset = YunMouHelper.offsets(consumerId, token);
+ }
+ //有值跳出循环
+ break;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ var erro = ex.Message;
+ LogService.AddLog(ex.Message, "调用消息队列");
+ }
+ }
+
+ public static void DoSynchDataNew()
+ {
+ try
+ {
+ ////获取token
+ //token = YunMouHelper.getToken();
+ ////创建消费者消费者如果5分钟未调用拉取消息接口将被删除。
+ //consumerId = YunMouHelper.addConsumer(token);
+
+ LogService.AddLog(token + ";" + consumerId, "调用消息队列参数");
+ string content = YunMouHelper.consumerMessage(consumerId, token);
+ //调用消息队列第一次
+ LogService.AddLog(content, "调用消息队列1");
+ var j2 = JsonConvert.DeserializeObject(content);
+
+ //消费者首次拉取消息时需要与消息通道建立连接,此次调用实际拉到消息列表为空,
+ //再次调用即可拉取到消息,30秒内必须再次调用拉取消息接口,否则将断开与消息通道的连接。
+ //因此拉取间隔需要在30秒以内,否则每次拉到的消息是空的
+ if (j2.data.Count > 0)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ for (int i = 0; i < j2.data.Count; i++)
+ {
+ var msg = JsonConvert.DeserializeObject(j2.data[i]["content"].ToString());
+ if (!string.IsNullOrEmpty(Convert.ToString(msg.employeeNo)))
+ {
+ string deviceSerial = Convert.ToString(msg.deviceSerial);
+ string employeeNo = Convert.ToString(msg.employeeNo);
+ DateTime dateTime = Convert.ToDateTime(Convert.ToString(msg.dateTime));
+ var devices = db.Project_Devices.FirstOrDefault(x => x.DeviceSerial == deviceSerial);
+ Model.SitePerson_PersonInOut newInOut = new Model.SitePerson_PersonInOut
+ {
+ ProjectId = devices.ProjectId,
+ IdentityCard = employeeNo,
+ IsIn = true,
+ ChangeTime = dateTime,
+ InOutWay = Const.InOutWay_1,
+ };
+ InsertInOut(newInOut);
+ }
+
+ }
+ }
+ }
+ else
+ {
+ //修改 如果为空循环调用最多5次
+ for (int y = 0; y < 5; y++)
+ {
+ //如果为空再调一次
+ content = YunMouHelper.consumerMessage(consumerId, token);
+ //调用消息队列第二次
+ LogService.AddLog(content, "调用消息队列" + (y + 2).ToString());
+ j2 = JsonConvert.DeserializeObject(content);
+ if (j2.data.Count > 0)
+ {
+ using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
+ {
+ for (int i = 0; i < j2.data.Count; i++)
+ {
+ var msg = JsonConvert.DeserializeObject(j2.data[i]["content"].ToString());
+ if (!string.IsNullOrEmpty(Convert.ToString(msg.employeeNo)))
+ {
+ string deviceSerial = Convert.ToString(msg.deviceSerial);
+ string employeeNo = Convert.ToString(msg.employeeNo);
+ DateTime dateTime = Convert.ToDateTime(Convert.ToString(msg.dateTime));
+
+ var devices = Funs.DB.Project_Devices.FirstOrDefault(x => x.DeviceSerial == deviceSerial);
+ //身份证号时
+ if (employeeNo.Length == 18)
+ {
+ Model.SitePerson_PersonInOut newInOut = new Model.SitePerson_PersonInOut
+ {
+ ProjectId = devices.ProjectId,
+ IdentityCard = employeeNo,
+ IsIn = true,
+ ChangeTime = dateTime,
+ InOutWay = Const.InOutWay_1,
+ };
+ InsertInOut(newInOut);
+
+ }
+ }
+
+ }
+ //提交偏移量
+ var msgOffset = YunMouHelper.offsets(consumerId, token);
+ }
+ //有值跳出循环
+ break;
+ }
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ var erro = ex.Message;
+ LogService.AddLog(ex.Message, "调用消息队列");
+ }
+ }
+
+ #region 根据考勤时间进入考勤
+ public static void InsertInOut(Model.SitePerson_PersonInOut model)
+ {
+ //考勤时间配置不为空的情况
+ var Kqgl_DateManageModel = Funs.DB.Kqgl_DateManage.FirstOrDefault(x => x.ProjectId == model.ProjectId);
+ if (Kqgl_DateManageModel != null)
+ {
+ var changeTime = Convert.ToDateTime(model.ChangeTime);
+ var nowTime = TimeSpan.Parse(changeTime.ToString("HH:mm:ss"));//当前时间的时分秒
+ #region 根据规则判断是进门还是出门
+ TimeSpan AmStartTime1 = TimeSpan.Parse(Kqgl_DateManageModel.AmStartTime1.ToString());
+ TimeSpan AmStartTime2 = TimeSpan.Parse(Kqgl_DateManageModel.AmStartTime2.ToString());
+
+ TimeSpan AmEndTime1 = TimeSpan.Parse(Kqgl_DateManageModel.AmEndTime1.ToString());
+ TimeSpan AmEndTime2 = TimeSpan.Parse(Kqgl_DateManageModel.AmEndTime2.ToString());
+
+ TimeSpan PmStartTime1 = TimeSpan.Parse(Kqgl_DateManageModel.PmStartTime1.ToString());
+ TimeSpan PmStartTime2 = TimeSpan.Parse(Kqgl_DateManageModel.PmStartTime2.ToString());
+
+ TimeSpan PmEndTime1 = TimeSpan.Parse(Kqgl_DateManageModel.PmEndTime1.ToString());
+ TimeSpan PmEndTime2 = TimeSpan.Parse(Kqgl_DateManageModel.PmEndTime2.ToString());
+
+ TimeSpan time1 = new TimeSpan(0, Convert.ToInt32(Kqgl_DateManageModel.LateTime), 0);
+ TimeSpan time2 = new TimeSpan(0, Convert.ToInt32(Kqgl_DateManageModel.LeaveTime), 0);
+ //允许迟到x分钟
+ AmStartTime2 = AmStartTime2.Add(time2);
+ PmStartTime2 = PmStartTime2.Add(time2);
+
+ //允许早退x分钟
+ AmEndTime1 = AmEndTime1.Add(-time1);
+ PmEndTime1 = PmEndTime1.Add(-time1);
+
+ var personModel = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.IdentityCard == model.IdentityCard && x.ProjectId == model.ProjectId);
+ if (personModel != null)
+ {
+ //状态:0上午上班 1上午下班 2下午上班 3下午下班
+ var state = "";
+ //如果是在进场时间内
+ if (nowTime >= AmStartTime1 && nowTime <= AmStartTime2)
+ {
+ model.IsIn = true;
+ state = "0";
+ }
+ if (nowTime >= PmStartTime1 && nowTime <= PmStartTime2)
+ {
+ model.IsIn = true;
+ state = "2";
+ }
+ if (nowTime >= AmEndTime1 && nowTime <= AmEndTime2)
+ {
+ model.IsIn = false;
+ state = "1";
+ }
+ if (nowTime >= PmEndTime1 && nowTime <= PmEndTime2)
+ {
+ model.IsIn = false;
+ state = "3";
+ }
+ Model.SGGLDB db = Funs.DB;
+ #region 这个人该时间点内有数据的话,就删掉(上班打卡时间取最早不删除,下班取最晚,删除早的)
+ var objTime1 = Convert.ToDateTime(Convert.ToDateTime(changeTime).ToString("yyyy-MM-dd") + " " + AmStartTime1.ToString());
+ var objTime2 = Convert.ToDateTime(Convert.ToDateTime(changeTime).ToString("yyyy-MM-dd") + " " + AmStartTime2.ToString());
+
+ var objTime3 = Convert.ToDateTime(Convert.ToDateTime(changeTime).ToString("yyyy-MM-dd") + " " + AmEndTime1.ToString());
+ var objTime4 = Convert.ToDateTime(Convert.ToDateTime(changeTime).ToString("yyyy-MM-dd") + " " + AmEndTime2.ToString());
+
+ var objTime5 = Convert.ToDateTime(Convert.ToDateTime(changeTime).ToString("yyyy-MM-dd") + " " + PmStartTime1.ToString());
+ var objTime6 = Convert.ToDateTime(Convert.ToDateTime(changeTime).ToString("yyyy-MM-dd") + " " + PmStartTime2.ToString());
+
+ var objTime7 = Convert.ToDateTime(Convert.ToDateTime(changeTime).ToString("yyyy-MM-dd") + " " + PmEndTime1.ToString());
+ var objTime8 = Convert.ToDateTime(Convert.ToDateTime(changeTime).ToString("yyyy-MM-dd") + " " + PmEndTime2.ToString());
+
+ //1.上午上班
+ var result1 = db.SitePerson_PersonInOut.Where(x => x.ProjectId == model.ProjectId && x.IdentityCard == personModel.IdentityCard &&
+ x.ChangeTime >= objTime1 && x.ChangeTime <= objTime2
+ ).ToList();
+ //2.上午下班
+ var result2 = db.SitePerson_PersonInOut.Where(x => x.ProjectId == model.ProjectId && x.IdentityCard == personModel.IdentityCard &&
+ x.ChangeTime >= objTime3 && x.ChangeTime <= objTime4
+ ).ToList();
+ //3.下午上班
+ var result3 = db.SitePerson_PersonInOut.Where(x => x.ProjectId == model.ProjectId && x.IdentityCard == personModel.IdentityCard &&
+ x.ChangeTime >= objTime5 && x.ChangeTime <= objTime6
+ ).ToList();
+ //4.下午下班
+ var result4 = db.SitePerson_PersonInOut.Where(x => x.ProjectId == model.ProjectId && x.IdentityCard == personModel.IdentityCard &&
+ x.ChangeTime >= objTime7 && x.ChangeTime <= objTime8
+ ).ToList();
+
+ //上班打卡时间取最早,下班取最晚
+ if (result1.Count > 0 && state == "0")
+ {
+ //db.SitePerson_PersonInOut.DeleteAllOnSubmit(result1);
+ //db.SubmitChanges();
+ }
+ else if (result1.Count == 0 && state == "0")
+ {
+ PersonInOutService.AddPersonInOut(model);
+ }
+ if (result2.Count > 0 && state == "1")
+ {
+ db.SitePerson_PersonInOut.DeleteAllOnSubmit(result2);
+ db.SubmitChanges();
+ PersonInOutService.AddPersonInOut(model);
+ }
+ else if (result2.Count == 0 && state == "1")
+ {
+ PersonInOutService.AddPersonInOut(model);
+ }
+ if (result3.Count > 0 && state == "2")
+ {
+ //db.SitePerson_PersonInOut.DeleteAllOnSubmit(result3);
+ //db.SubmitChanges();
+ }
+ else if (result3.Count == 0 && state == "2")
+ {
+ PersonInOutService.AddPersonInOut(model);
+ }
+ if (result4.Count > 0 && state == "3")
+ {
+ db.SitePerson_PersonInOut.DeleteAllOnSubmit(result4);
+ db.SubmitChanges();
+ PersonInOutService.AddPersonInOut(model);
+ }
+ else if (result4.Count == 0 && state == "3")
+ {
+ PersonInOutService.AddPersonInOut(model);
+ }
+ #endregion
+ }
+
+ #endregion
+ }
+
+ }
+ #endregion
+ }
+}
diff --git a/SGGL/BLL/ProjectData/ProjectDeviceService.cs b/SGGL/BLL/ProjectData/ProjectDeviceService.cs
new file mode 100644
index 00000000..96cc1141
--- /dev/null
+++ b/SGGL/BLL/ProjectData/ProjectDeviceService.cs
@@ -0,0 +1,87 @@
+namespace BLL
+{
+ using System.Collections.Generic;
+ using System.Linq;
+ using Model;
+
+ public static class ProjectDeviceService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ ///获取项目单位信息
+ ///
+ ///
+ public static Model.Project_Devices GetProjectDeviceById(string deviceId)
+ {
+ return Funs.DB.Project_Devices.FirstOrDefault(e => e.DeviceId == deviceId);
+ }
+
+
+ ///
+ /// 增加项目设备信息
+ ///
+ ///
+ public static void AddProjectDevice(Project_Devices projectDevices)
+ {
+ SGGLDB db = Funs.DB;
+ Project_Devices newProjectUnit = new Project_Devices
+ {
+ DeviceId = SQLHelper.GetNewID(typeof(Model.Project_Devices)),
+ ProjectId = projectDevices.ProjectId,
+ DeviceName = projectDevices.DeviceName,
+ DeviceSerial = projectDevices.DeviceSerial,
+ CreateDate = projectDevices.CreateDate,
+ Address = projectDevices.Address,
+ IsInOut = projectDevices.IsInOut,
+ ValidateCode = projectDevices.ValidateCode,
+ YunMouDeviceId = projectDevices.YunMouDeviceId,
+ YunMouPermission = projectDevices.YunMouPermission,
+ };
+ db.Project_Devices.InsertOnSubmit(newProjectUnit);
+ db.SubmitChanges();
+ }
+
+ ///
+ ///修改项目设备信息
+ ///
+ ///
+ public static void UpdateProjectDevice(Model.Project_Devices devices)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Project_Devices newDevices = db.Project_Devices.FirstOrDefault(e => e.DeviceId == devices.DeviceId);
+ if (newDevices != null)
+ {
+ newDevices.ProjectId = devices.ProjectId;
+ newDevices.DeviceName = devices.DeviceName;
+ newDevices.DeviceSerial = devices.DeviceSerial;
+ newDevices.CreateDate = devices.CreateDate;
+ newDevices.Address = devices.Address;
+ newDevices.IsInOut = devices.IsInOut;
+ newDevices.ValidateCode = devices.ValidateCode;
+ newDevices.YunMouPermission = devices.YunMouPermission;
+ newDevices.YunMouDeviceId = devices.YunMouDeviceId;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据项目单位Id删除一个项目单位信息
+ ///
+ ///
+ public static void DeleteProjectDeviceById(string deviceId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.Project_Devices devices = db.Project_Devices.FirstOrDefault(e => e.DeviceId == deviceId);
+ if (devices != null)
+ {
+ db.Project_Devices.DeleteOnSubmit(devices);
+ db.SubmitChanges();
+ }
+ }
+
+
+
+
+ }
+}
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 83aff9e3..c68fe42c 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1982,6 +1982,7 @@
+
@@ -13577,6 +13578,13 @@
SafetyOrganizationEdit.aspx
+
+ DateManage.aspx
+ ASPXCodeBehind
+
+
+ DateManage.aspx
+
DayReport.aspx
ASPXCodeBehind
@@ -16854,7 +16862,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/Global.asax.cs b/SGGL/FineUIPro.Web/Global.asax.cs
index dc8e23be..fcdc7c02 100644
--- a/SGGL/FineUIPro.Web/Global.asax.cs
+++ b/SGGL/FineUIPro.Web/Global.asax.cs
@@ -64,6 +64,7 @@
{
BLL.MonitorService.StartMonitor();
BLL.MonitorService.StartMonitorEve();
+ BLL.YunMouService.StartMonitor();
//BLL.MonitorService.StartPersonQuarterCheck();
QuartzServices.Init();
}
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx
new file mode 100644
index 00000000..c4bea2b7
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx
@@ -0,0 +1,107 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DateManage.aspx.cs" Inherits="FineUIPro.Web.HSSE.SitePerson.DateManage" %>
+
+
+
+
+
+
+ 考勤时间管理
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx.cs
new file mode 100644
index 00000000..cfbe063d
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx.cs
@@ -0,0 +1,112 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using BLL;
+
+namespace FineUIPro.Web.HSSE.SitePerson
+{
+ public partial class DateManage : PageBase
+ {
+ public string ProjectId
+ {
+ get
+ {
+ return (string)ViewState["ProjectId"];
+ }
+ set
+ {
+ ViewState["ProjectId"] = value;
+ }
+ }
+
+ public Model.SGGLDB db = Funs.DB;
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ ProjectId = CurrUser.LoginProjectId;
+ GetButtonPower();
+ var result = db.Kqgl_DateManage.FirstOrDefault(x => x.ProjectId == ProjectId);
+ if (result!=null)
+ {
+ txtAmStartTime1.Text = result.AmStartTime1.ToString();
+ txtAmStartTime2.Text = result.AmStartTime2.ToString();
+ txtAmEndTime1.Text = result.AmEndTime1.ToString();
+ txtAmEndTime2.Text = result.AmEndTime2.ToString();
+ txtPmStartTime1.Text = result.PmStartTime1.ToString();
+ txtPmStartTime2.Text = result.PmStartTime2.ToString();
+ txtPmEndTime1.Text = result.PmEndTime1.ToString();
+ txtPmEndTime2.Text = result.PmEndTime2.ToString();
+ txtLateTime.Text = result.LateTime.ToString();
+ txtLeaveTime.Text = result.LeaveTime.ToString();
+ txtEquipmentCode.Text = result.EquipmentCode;
+ }
+ }
+ }
+
+ void GetButtonPower()
+ {
+ if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.Menu_KqglDateManger, Const.BtnSave))
+ {
+ this.btnSave.Hidden = false;
+ }
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e) {
+ var result = db.Kqgl_DateManage.FirstOrDefault(x => x.ProjectId == ProjectId);
+ if (result==null)
+ {
+ Model.Kqgl_DateManage model = new Model.Kqgl_DateManage()
+ {
+ ProjectId=ProjectId,
+ Id = Guid.NewGuid().ToString(),
+
+ AmStartTime2 = TimeSpan.Parse(txtAmStartTime2.Text),
+
+ AmEndTime1 = TimeSpan.Parse(txtAmEndTime1.Text),
+ AmEndTime2 = TimeSpan.Parse(txtAmEndTime2.Text),
+
+ PmStartTime1 = TimeSpan.Parse(txtPmStartTime1.Text),
+ PmStartTime2 = TimeSpan.Parse(txtPmStartTime2.Text),
+
+ PmEndTime1 = TimeSpan.Parse(txtPmEndTime1.Text),
+ PmEndTime2 = TimeSpan.Parse(txtPmEndTime2.Text),
+
+ LateTime = Convert.ToInt32(txtLateTime.Text),
+ LeaveTime = Convert.ToInt32(txtLeaveTime.Text),
+ EquipmentCode= txtEquipmentCode.Text.Trim()
+ };
+ model.AmStartTime1 = TimeSpan.Parse(txtAmStartTime1.Text);
+ db.Kqgl_DateManage.InsertOnSubmit(model);
+ db.SubmitChanges();
+ }
+ else
+ {
+ var model = db.Kqgl_DateManage.FirstOrDefault(x => x.Id == result.Id) ;
+
+
+ model.AmStartTime2 = TimeSpan.Parse(txtAmStartTime2.Text);
+
+ model.AmEndTime1 = TimeSpan.Parse(txtAmEndTime1.Text);
+ model.AmEndTime2 = TimeSpan.Parse(txtAmEndTime2.Text);
+
+ model.PmStartTime1 = TimeSpan.Parse(txtPmStartTime1.Text);
+ model.PmStartTime2 = TimeSpan.Parse(txtPmStartTime2.Text);
+
+ model.PmEndTime1 = TimeSpan.Parse(txtPmEndTime1.Text);
+ model.PmEndTime2 = TimeSpan.Parse(txtPmEndTime2.Text);
+
+ model.LateTime = Convert.ToInt32(txtLateTime.Text);
+ model.LeaveTime = Convert.ToInt32(txtLeaveTime.Text);
+
+ model.AmStartTime1 = TimeSpan.Parse(txtAmStartTime1.Text);
+ model.EquipmentCode = txtEquipmentCode.Text.Trim();
+ db.SubmitChanges();
+ }
+ Alert.ShowInTop("编辑成功!", MessageBoxIcon.Success);
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx.designer.cs
new file mode 100644
index 00000000..3318e4a5
--- /dev/null
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/DateManage.aspx.designer.cs
@@ -0,0 +1,188 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.HSSE.SitePerson
+{
+
+
+ public partial class DateManage
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// RegionPanel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RegionPanel RegionPanel1;
+
+ ///
+ /// Region2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Region Region2;
+
+ ///
+ /// GroupPanel0 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.GroupPanel GroupPanel0;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtAmStartTime1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtAmStartTime1;
+
+ ///
+ /// txtAmStartTime2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtAmStartTime2;
+
+ ///
+ /// txtAmEndTime1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtAmEndTime1;
+
+ ///
+ /// txtAmEndTime2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtAmEndTime2;
+
+ ///
+ /// txtPmStartTime1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtPmStartTime1;
+
+ ///
+ /// txtPmStartTime2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtPmStartTime2;
+
+ ///
+ /// txtPmEndTime1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtPmEndTime1;
+
+ ///
+ /// txtPmEndTime2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtPmEndTime2;
+
+ ///
+ /// txtLateTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtLateTime;
+
+ ///
+ /// txtLeaveTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.NumberBox txtLeaveTime;
+
+ ///
+ /// txtEquipmentCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtEquipmentCode;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx
index 0350b8ea..7a6418c2 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx
@@ -36,6 +36,9 @@
+
+
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs
index 5009dbfc..2cdfcfa0 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs
@@ -1,5 +1,7 @@
-using BLL;
+using Apache.NMS.ActiveMQ.Commands;
+using BLL;
using System;
+using BLL.Common;
using System.Linq;
using System.Text;
using AspNet = System.Web.UI.WebControls;
@@ -8,6 +10,28 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
public partial class PersonInfo : PageBase
{
+ public string consumerIdR
+ {
+ get
+ {
+ return (string)ViewState["consumerIdR"];
+ }
+ set
+ {
+ ViewState["consumerIdR"] = value;
+ }
+ }
+ public string tokenR
+ {
+ get
+ {
+ return (string)ViewState["tokenR"];
+ }
+ set
+ {
+ ViewState["tokenR"] = value;
+ }
+ }
#region 加载页面
///
/// 加载页面
@@ -18,6 +42,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
{
if (!IsPostBack)
{
+ ////获取token
+ tokenR = YunMouHelper.getToken();
+ ////创建消费者消费者如果5分钟未调用拉取消息接口将被删除。
+ consumerIdR = YunMouHelper.addConsumer(tokenR);
+
+
////权限按钮方法
this.GetButtonPower();
btnNew.OnClientClick = Window1.GetShowReference("PersonInfoEdit.aspx") + "return false;";
@@ -369,6 +399,11 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
Alert.ShowInTop("写入考勤" + count.ToString() + "条。", MessageBoxIcon.Success);
+ } //云眸同步
+ protected void btnYunMou_Click(object sender, EventArgs e)
+ {
+ YunMouService.manualOperation(tokenR, consumerIdR);
+ BindGrid();
}
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.designer.cs
index 5adb8b0f..6b54b1eb 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.HSSE.SitePerson {
-
-
- public partial class PersonInfo {
-
+namespace FineUIPro.Web.HSSE.SitePerson
+{
+
+
+ public partial class PersonInfo
+ {
+
///
/// form1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// Grid1 控件。
///
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Toolbar2 控件。
///
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar2;
-
+
///
/// rbInOutWay 控件。
///
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.RadioButtonList rbInOutWay;
-
+
///
/// drpUnit 控件。
///
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpUnit;
-
+
///
/// txtStartDate 控件。
///
@@ -83,7 +85,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtStartDate;
-
+
///
/// txtEndDate 控件。
///
@@ -92,7 +94,16 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DatePicker txtEndDate;
-
+
+ ///
+ /// Button1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button Button1;
+
///
/// btnNew 控件。
///
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// btnImport 控件。
///
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnImport;
-
+
///
/// Toolbar1 控件。
///
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// txtPersonName 控件。
///
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtPersonName;
-
+
///
/// txtIdCard 控件。
///
@@ -137,7 +148,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtIdCard;
-
+
///
/// btSearch 控件。
///
@@ -146,7 +157,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btSearch;
-
+
///
/// btnOut 控件。
///
@@ -155,7 +166,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnOut;
-
+
///
/// btnInRealName 控件。
///
@@ -164,7 +175,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnInRealName;
-
+
///
/// btnPersonOut 控件。
///
@@ -173,7 +184,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnPersonOut;
-
+
///
/// labNumber 控件。
///
@@ -182,7 +193,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label labNumber;
-
+
///
/// lblIdentityCard 控件。
///
@@ -191,7 +202,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label lblIdentityCard;
-
+
///
/// lblIntoOut 控件。
///
@@ -200,7 +211,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label lblIntoOut;
-
+
///
/// lblInOutWayName 控件。
///
@@ -209,7 +220,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.WebControls.Label lblInOutWayName;
-
+
///
/// ToolbarSeparator1 控件。
///
@@ -218,7 +229,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
-
+
///
/// ToolbarText1 控件。
///
@@ -227,7 +238,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
@@ -236,7 +247,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlPageSize;
-
+
///
/// Window1 控件。
///
@@ -245,7 +256,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Window Window1;
-
+
///
/// Menu1 控件。
///
@@ -254,7 +265,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Menu Menu1;
-
+
///
/// btnMenuEdit 控件。
///
@@ -263,7 +274,7 @@ namespace FineUIPro.Web.HSSE.SitePerson {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuEdit;
-
+
///
/// btnMenuDelete 控件。
///
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
index 433821fe..fdc92fb6 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
@@ -105,6 +105,9 @@
+
+
+
@@ -140,11 +143,11 @@
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd HH:mm:ss" HeaderText="上报集团时间"
HeaderTextAlign="Center" TextAlign="Center">
-
+ <%--
-
+ --%>
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
index be2a08ef..746eb531 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
@@ -1,4 +1,5 @@
using BLL;
+using BLL.Common;
using System;
using System.Collections.Generic;
using System.Data;
@@ -737,5 +738,33 @@ Where ProjectId=@ProjectId ";
int count = GetDataService.SendCarNo(this.ProjectId);
Alert.ShowInTop("刷新完成" + count.ToString() + "条。", MessageBoxIcon.Success);
}
+
+ protected void btnToYunMou_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ var sitePerson = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.SitePersonId == rowID);
+ var person = Funs.DB.Person_Persons.FirstOrDefault(x => x.IdentityCard == sitePerson.IdentityCard);
+ if (!string.IsNullOrEmpty(person.PhotoUrl))
+ {
+ var token = YunMouHelper.getToken();
+ var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == CurrUser.LoginProjectId);
+
+ var res1 = YunMouHelper.addPerson(person.IdentityCard, person.PersonName, string.IsNullOrEmpty(person.Telephone) ? "" : person.Telephone, person.PhotoUrl, token);
+ var res2 = YunMouHelper.addPersonsToGroups(project.YunMouGroupId, new string[] { person.IdentityCard }, token);
+ person.YunMouState = "已经同步";
+ Funs.DB.SubmitChanges();
+ }
+ }
+ this.BindGrid();
+ }
+ else
+ {
+ ShowNotify("请选择用户", MessageBoxIcon.Warning);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
index fce5b39a..f668e6bb 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.designer.cs
@@ -230,6 +230,15 @@ namespace FineUIPro.Web.HSSE.SitePerson
///
protected global::FineUIPro.Button btnImport;
+ ///
+ /// Button1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button Button1;
+
///
/// btnOut 控件。
///
@@ -257,15 +266,6 @@ namespace FineUIPro.Web.HSSE.SitePerson
///
protected global::FineUIPro.Button btnRefresh;
- ///
- /// lbIsPost 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::System.Web.UI.WebControls.Label lbIsPost;
-
///
/// ToolbarSeparator1 控件。
///
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.cs
index ade4bc6c..d2471ca8 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectDevicesEdit.aspx.cs
@@ -6,10 +6,7 @@ using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
-using BLL.Common;
-using FastReport.Cloud.OAuth;
-using FineUIPro.Web.DataShow;
-using Org.BouncyCastle.Crypto;
+using BLL.Common;
namespace FineUIPro.Web.ProjectData
{
diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs
index f6d5d4f2..de5019cc 100644
--- a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs
+++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs
@@ -38,7 +38,6 @@ namespace FineUIPro.Web.common.ProjectSet
}
#endregion
- #region 提交按钮
///
/// 提交按钮
///
@@ -152,7 +151,7 @@ namespace FineUIPro.Web.common.ProjectSet
{
pdms.IsAuto = false;
}
-
+ }
private void SaveColorModelSettings(string projectId)
{
UpsertByName("管线未完成", projectId, this.txtPipelineNOComplete.Text.Trim());
diff --git a/SGGL/Microsoft.PowerShell_profile.ps1 b/SGGL/Microsoft.PowerShell_profile.ps1
new file mode 100644
index 00000000..e69de29b
diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs
index f283c84e..d873c5d0 100644
--- a/SGGL/Model/Model.cs
+++ b/SGGL/Model/Model.cs
@@ -914,6 +914,9 @@ namespace Model
partial void InsertInterFaceTask(InterFaceTask instance);
partial void UpdateInterFaceTask(InterFaceTask instance);
partial void DeleteInterFaceTask(InterFaceTask instance);
+ partial void InsertKqgl_DateManage(Kqgl_DateManage instance);
+ partial void UpdateKqgl_DateManage(Kqgl_DateManage instance);
+ partial void DeleteKqgl_DateManage(Kqgl_DateManage instance);
partial void InsertLaw_HSSEStandardsList(Law_HSSEStandardsList instance);
partial void UpdateLaw_HSSEStandardsList(Law_HSSEStandardsList instance);
partial void DeleteLaw_HSSEStandardsList(Law_HSSEStandardsList instance);
@@ -1268,6 +1271,9 @@ namespace Model
partial void InsertProject_CQMSData_CQMS(Project_CQMSData_CQMS instance);
partial void UpdateProject_CQMSData_CQMS(Project_CQMSData_CQMS instance);
partial void DeleteProject_CQMSData_CQMS(Project_CQMSData_CQMS instance);
+ partial void InsertProject_Devices(Project_Devices instance);
+ partial void UpdateProject_Devices(Project_Devices instance);
+ partial void DeleteProject_Devices(Project_Devices instance);
partial void InsertProject_FileCabinet(Project_FileCabinet instance);
partial void UpdateProject_FileCabinet(Project_FileCabinet instance);
partial void DeleteProject_FileCabinet(Project_FileCabinet instance);
@@ -4289,6 +4295,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table Kqgl_DateManage
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table Law_HSSEStandardsList
{
get
@@ -5241,6 +5255,14 @@ namespace Model
}
}
+ public System.Data.Linq.Table Project_Devices
+ {
+ get
+ {
+ return this.GetTable();
+ }
+ }
+
public System.Data.Linq.Table Project_FileCabinet
{
get
@@ -12291,7 +12313,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")]
public string ApproveIdea
{
get
@@ -22470,8 +22492,6 @@ namespace Model
private string _UnitId;
- private string _ProjectId;
-
private string _MaterialId;
private string _ColorName;
@@ -22482,6 +22502,8 @@ namespace Model
private string _Remark;
+ private string _ProjectId;
+
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -22490,8 +22512,6 @@ namespace Model
partial void OnMaterialColorIdChanged();
partial void OnUnitIdChanging(string value);
partial void OnUnitIdChanged();
- partial void OnProjectIdChanging(string value);
- partial void OnProjectIdChanged();
partial void OnMaterialIdChanging(string value);
partial void OnMaterialIdChanged();
partial void OnColorNameChanging(string value);
@@ -22502,6 +22522,8 @@ namespace Model
partial void OnRGBChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
#endregion
public Base_MaterialColor()
@@ -22549,26 +22571,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
- public string ProjectId
- {
- get
- {
- return this._ProjectId;
- }
- set
- {
- if ((this._ProjectId != value))
- {
- this.OnProjectIdChanging(value);
- this.SendPropertyChanging();
- this._ProjectId = value;
- this.SendPropertyChanged("ProjectId");
- this.OnProjectIdChanged();
- }
- }
- }
-
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialId", DbType="NVarChar(50)")]
public string MaterialId
{
@@ -22669,6 +22671,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
+ public string ProjectId
+ {
+ get
+ {
+ return this._ProjectId;
+ }
+ set
+ {
+ if ((this._ProjectId != value))
+ {
+ this.OnProjectIdChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectId = value;
+ this.SendPropertyChanged("ProjectId");
+ this.OnProjectIdChanged();
+ }
+ }
+ }
+
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -24600,6 +24622,10 @@ namespace Model
private string _MasterSysId;
+ private System.Nullable _IsYunMou;
+
+ private string _YunMouGroupId;
+
private EntitySet _Accident_AccidentHandle;
private EntitySet _Accident_AccidentPersonRecord;
@@ -25030,6 +25056,10 @@ namespace Model
partial void OnIsCNCECShowChanged();
partial void OnMasterSysIdChanging(string value);
partial void OnMasterSysIdChanged();
+ partial void OnIsYunMouChanging(System.Nullable value);
+ partial void OnIsYunMouChanged();
+ partial void OnYunMouGroupIdChanging(string value);
+ partial void OnYunMouGroupIdChanged();
#endregion
public Base_Project()
@@ -25847,6 +25877,46 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsYunMou", DbType="Bit")]
+ public System.Nullable IsYunMou
+ {
+ get
+ {
+ return this._IsYunMou;
+ }
+ set
+ {
+ if ((this._IsYunMou != value))
+ {
+ this.OnIsYunMouChanging(value);
+ this.SendPropertyChanging();
+ this._IsYunMou = value;
+ this.SendPropertyChanged("IsYunMou");
+ this.OnIsYunMouChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YunMouGroupId", DbType="NVarChar(50)")]
+ public string YunMouGroupId
+ {
+ get
+ {
+ return this._YunMouGroupId;
+ }
+ set
+ {
+ if ((this._YunMouGroupId != value))
+ {
+ this.OnYunMouGroupIdChanging(value);
+ this.SendPropertyChanging();
+ this._YunMouGroupId = value;
+ this.SendPropertyChanged("YunMouGroupId");
+ this.OnYunMouGroupIdChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Base_Project", Storage="_Accident_AccidentHandle", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet Accident_AccidentHandle
{
@@ -97844,10 +97914,10 @@ namespace Model
private string _TrainNumber;
- private string _TrainNumberId;
-
private System.Nullable _TypeInt;
+ private string _TrainNumberId;
+
private string _CompileMan;
private System.Nullable _CompileDate;
@@ -97882,10 +97952,10 @@ namespace Model
partial void OnReceiveDateChanged();
partial void OnTrainNumberChanging(string value);
partial void OnTrainNumberChanged();
- partial void OnTrainNumberIdChanging(string value);
- partial void OnTrainNumberIdChanged();
partial void OnTypeIntChanging(System.Nullable value);
partial void OnTypeIntChanged();
+ partial void OnTrainNumberIdChanging(string value);
+ partial void OnTrainNumberIdChanged();
partial void OnCompileManChanging(string value);
partial void OnCompileManChanged();
partial void OnCompileDateChanging(System.Nullable value);
@@ -98139,26 +98209,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")]
- public string TrainNumberId
- {
- get
- {
- return this._TrainNumberId;
- }
- set
- {
- if ((this._TrainNumberId != value))
- {
- this.OnTrainNumberIdChanging(value);
- this.SendPropertyChanging();
- this._TrainNumberId = value;
- this.SendPropertyChanged("TrainNumberId");
- this.OnTrainNumberIdChanged();
- }
- }
- }
-
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")]
public System.Nullable TypeInt
{
@@ -98179,6 +98229,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")]
+ public string TrainNumberId
+ {
+ get
+ {
+ return this._TrainNumberId;
+ }
+ set
+ {
+ if ((this._TrainNumberId != value))
+ {
+ this.OnTrainNumberIdChanging(value);
+ this.SendPropertyChanging();
+ this._TrainNumberId = value;
+ this.SendPropertyChanged("TrainNumberId");
+ this.OnTrainNumberIdChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
public string CompileMan
{
@@ -109426,7 +109496,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(500)")]
public string Rectification
{
get
@@ -109552,7 +109622,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(500)")]
public string Measures
{
get
@@ -144268,6 +144338,356 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Kqgl_DateManage")]
+ public partial class Kqgl_DateManage : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _Id;
+
+ private string _ProjectId;
+
+ private System.Nullable _AmStartTime1;
+
+ private System.Nullable _AmStartTime2;
+
+ private System.Nullable _AmEndTime1;
+
+ private System.Nullable _AmEndTime2;
+
+ private System.Nullable _PmStartTime1;
+
+ private System.Nullable _PmStartTime2;
+
+ private System.Nullable _PmEndTime1;
+
+ private System.Nullable _PmEndTime2;
+
+ private System.Nullable _LateTime;
+
+ private System.Nullable _LeaveTime;
+
+ private string _EquipmentCode;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnIdChanging(string value);
+ partial void OnIdChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
+ partial void OnAmStartTime1Changing(System.Nullable value);
+ partial void OnAmStartTime1Changed();
+ partial void OnAmStartTime2Changing(System.Nullable value);
+ partial void OnAmStartTime2Changed();
+ partial void OnAmEndTime1Changing(System.Nullable value);
+ partial void OnAmEndTime1Changed();
+ partial void OnAmEndTime2Changing(System.Nullable value);
+ partial void OnAmEndTime2Changed();
+ partial void OnPmStartTime1Changing(System.Nullable value);
+ partial void OnPmStartTime1Changed();
+ partial void OnPmStartTime2Changing(System.Nullable value);
+ partial void OnPmStartTime2Changed();
+ partial void OnPmEndTime1Changing(System.Nullable value);
+ partial void OnPmEndTime1Changed();
+ partial void OnPmEndTime2Changing(System.Nullable value);
+ partial void OnPmEndTime2Changed();
+ partial void OnLateTimeChanging(System.Nullable value);
+ partial void OnLateTimeChanged();
+ partial void OnLeaveTimeChanging(System.Nullable value);
+ partial void OnLeaveTimeChanged();
+ partial void OnEquipmentCodeChanging(string value);
+ partial void OnEquipmentCodeChanged();
+ #endregion
+
+ public Kqgl_DateManage()
+ {
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string Id
+ {
+ get
+ {
+ return this._Id;
+ }
+ set
+ {
+ if ((this._Id != value))
+ {
+ this.OnIdChanging(value);
+ this.SendPropertyChanging();
+ this._Id = value;
+ this.SendPropertyChanged("Id");
+ this.OnIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
+ public string ProjectId
+ {
+ get
+ {
+ return this._ProjectId;
+ }
+ set
+ {
+ if ((this._ProjectId != value))
+ {
+ this.OnProjectIdChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectId = value;
+ this.SendPropertyChanged("ProjectId");
+ this.OnProjectIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AmStartTime1", DbType="Time(7)")]
+ public System.Nullable AmStartTime1
+ {
+ get
+ {
+ return this._AmStartTime1;
+ }
+ set
+ {
+ if ((this._AmStartTime1 != value))
+ {
+ this.OnAmStartTime1Changing(value);
+ this.SendPropertyChanging();
+ this._AmStartTime1 = value;
+ this.SendPropertyChanged("AmStartTime1");
+ this.OnAmStartTime1Changed();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AmStartTime2", DbType="Time(7)")]
+ public System.Nullable AmStartTime2
+ {
+ get
+ {
+ return this._AmStartTime2;
+ }
+ set
+ {
+ if ((this._AmStartTime2 != value))
+ {
+ this.OnAmStartTime2Changing(value);
+ this.SendPropertyChanging();
+ this._AmStartTime2 = value;
+ this.SendPropertyChanged("AmStartTime2");
+ this.OnAmStartTime2Changed();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AmEndTime1", DbType="Time(7)")]
+ public System.Nullable AmEndTime1
+ {
+ get
+ {
+ return this._AmEndTime1;
+ }
+ set
+ {
+ if ((this._AmEndTime1 != value))
+ {
+ this.OnAmEndTime1Changing(value);
+ this.SendPropertyChanging();
+ this._AmEndTime1 = value;
+ this.SendPropertyChanged("AmEndTime1");
+ this.OnAmEndTime1Changed();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AmEndTime2", DbType="Time(7)")]
+ public System.Nullable AmEndTime2
+ {
+ get
+ {
+ return this._AmEndTime2;
+ }
+ set
+ {
+ if ((this._AmEndTime2 != value))
+ {
+ this.OnAmEndTime2Changing(value);
+ this.SendPropertyChanging();
+ this._AmEndTime2 = value;
+ this.SendPropertyChanged("AmEndTime2");
+ this.OnAmEndTime2Changed();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PmStartTime1", DbType="Time(7)")]
+ public System.Nullable PmStartTime1
+ {
+ get
+ {
+ return this._PmStartTime1;
+ }
+ set
+ {
+ if ((this._PmStartTime1 != value))
+ {
+ this.OnPmStartTime1Changing(value);
+ this.SendPropertyChanging();
+ this._PmStartTime1 = value;
+ this.SendPropertyChanged("PmStartTime1");
+ this.OnPmStartTime1Changed();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PmStartTime2", DbType="Time(7)")]
+ public System.Nullable PmStartTime2
+ {
+ get
+ {
+ return this._PmStartTime2;
+ }
+ set
+ {
+ if ((this._PmStartTime2 != value))
+ {
+ this.OnPmStartTime2Changing(value);
+ this.SendPropertyChanging();
+ this._PmStartTime2 = value;
+ this.SendPropertyChanged("PmStartTime2");
+ this.OnPmStartTime2Changed();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PmEndTime1", DbType="Time(7)")]
+ public System.Nullable PmEndTime1
+ {
+ get
+ {
+ return this._PmEndTime1;
+ }
+ set
+ {
+ if ((this._PmEndTime1 != value))
+ {
+ this.OnPmEndTime1Changing(value);
+ this.SendPropertyChanging();
+ this._PmEndTime1 = value;
+ this.SendPropertyChanged("PmEndTime1");
+ this.OnPmEndTime1Changed();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PmEndTime2", DbType="Time(7)")]
+ public System.Nullable PmEndTime2
+ {
+ get
+ {
+ return this._PmEndTime2;
+ }
+ set
+ {
+ if ((this._PmEndTime2 != value))
+ {
+ this.OnPmEndTime2Changing(value);
+ this.SendPropertyChanging();
+ this._PmEndTime2 = value;
+ this.SendPropertyChanged("PmEndTime2");
+ this.OnPmEndTime2Changed();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LateTime", DbType="Int")]
+ public System.Nullable LateTime
+ {
+ get
+ {
+ return this._LateTime;
+ }
+ set
+ {
+ if ((this._LateTime != value))
+ {
+ this.OnLateTimeChanging(value);
+ this.SendPropertyChanging();
+ this._LateTime = value;
+ this.SendPropertyChanged("LateTime");
+ this.OnLateTimeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_LeaveTime", DbType="Int")]
+ public System.Nullable LeaveTime
+ {
+ get
+ {
+ return this._LeaveTime;
+ }
+ set
+ {
+ if ((this._LeaveTime != value))
+ {
+ this.OnLeaveTimeChanging(value);
+ this.SendPropertyChanging();
+ this._LeaveTime = value;
+ this.SendPropertyChanged("LeaveTime");
+ this.OnLeaveTimeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentCode", DbType="NVarChar(500)")]
+ public string EquipmentCode
+ {
+ get
+ {
+ return this._EquipmentCode;
+ }
+ set
+ {
+ if ((this._EquipmentCode != value))
+ {
+ this.OnEquipmentCodeChanging(value);
+ this.SendPropertyChanging();
+ this._EquipmentCode = value;
+ this.SendPropertyChanged("EquipmentCode");
+ this.OnEquipmentCodeChanged();
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Law_HSSEStandardsList")]
public partial class Law_HSSEStandardsList : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -162267,7 +162687,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")]
public string AttentPerson
{
get
@@ -167178,6 +167598,8 @@ namespace Model
private System.Nullable _IsInspectionBrigade;
+ private string _YunMouState;
+
private EntitySet _Accident_AccidentHandle;
private EntitySet _Accident_AccidentPersonRecord;
@@ -167792,6 +168214,8 @@ namespace Model
partial void OnLogMachineIdChanged();
partial void OnIsInspectionBrigadeChanging(System.Nullable value);
partial void OnIsInspectionBrigadeChanged();
+ partial void OnYunMouStateChanging(string value);
+ partial void OnYunMouStateChanged();
#endregion
public Person_Persons()
@@ -169374,6 +169798,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YunMouState", DbType="NVarChar(50)")]
+ public string YunMouState
+ {
+ get
+ {
+ return this._YunMouState;
+ }
+ set
+ {
+ if ((this._YunMouState != value))
+ {
+ this.OnYunMouStateChanging(value);
+ this.SendPropertyChanging();
+ this._YunMouState = value;
+ this.SendPropertyChanged("YunMouState");
+ this.OnYunMouStateChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Person_Persons", Storage="_Accident_AccidentHandle", ThisKey="PersonId", OtherKey="CompileMan", DeleteRule="NO ACTION")]
public EntitySet Accident_AccidentHandle
{
@@ -193250,7 +193694,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string ProjectDescription
{
get
@@ -193370,7 +193814,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)]
public string CalculationRule
{
get
@@ -193430,7 +193874,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")]
public string ConstructionSubcontractor
{
get
@@ -193814,7 +194258,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")]
public System.Nullable WorkPackageEstimate
{
get
@@ -194119,6 +194563,16 @@ namespace Model
private string _ProjectId;
+ private string _ContractId;
+
+ private string _OrderCode;
+
+ private System.Nullable _OrderInDate;
+
+ private System.Nullable _OrderOutDate;
+
+ private string _MaterialRequisitionUnit;
+
private System.Nullable _State;
private string _InvoiceCode;
@@ -194147,16 +194601,6 @@ namespace Model
private string _CreateUser;
- private string _ContractId;
-
- private System.Nullable _OrderInDate;
-
- private string _OrderCode;
-
- private System.Nullable _OrderOutDate;
-
- private string _MaterialRequisitionUnit;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -194165,6 +194609,16 @@ namespace Model
partial void OnInvoiceIdChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
+ partial void OnContractIdChanging(string value);
+ partial void OnContractIdChanged();
+ partial void OnOrderCodeChanging(string value);
+ partial void OnOrderCodeChanged();
+ partial void OnOrderInDateChanging(System.Nullable value);
+ partial void OnOrderInDateChanged();
+ partial void OnOrderOutDateChanging(System.Nullable value);
+ partial void OnOrderOutDateChanged();
+ partial void OnMaterialRequisitionUnitChanging(string value);
+ partial void OnMaterialRequisitionUnitChanged();
partial void OnStateChanging(System.Nullable value);
partial void OnStateChanged();
partial void OnInvoiceCodeChanging(string value);
@@ -194193,16 +194647,6 @@ namespace Model
partial void OnCreateDateChanged();
partial void OnCreateUserChanging(string value);
partial void OnCreateUserChanged();
- partial void OnContractIdChanging(string value);
- partial void OnContractIdChanged();
- partial void OnOrderInDateChanging(System.Nullable value);
- partial void OnOrderInDateChanged();
- partial void OnOrderCodeChanging(string value);
- partial void OnOrderCodeChanged();
- partial void OnOrderOutDateChanging(System.Nullable value);
- partial void OnOrderOutDateChanged();
- partial void OnMaterialRequisitionUnitChanging(string value);
- partial void OnMaterialRequisitionUnitChanged();
#endregion
public PHTGL_Invoice()
@@ -194250,6 +194694,106 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")]
+ public string ContractId
+ {
+ get
+ {
+ return this._ContractId;
+ }
+ set
+ {
+ if ((this._ContractId != value))
+ {
+ this.OnContractIdChanging(value);
+ this.SendPropertyChanging();
+ this._ContractId = value;
+ this.SendPropertyChanged("ContractId");
+ this.OnContractIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")]
+ public string OrderCode
+ {
+ get
+ {
+ return this._OrderCode;
+ }
+ set
+ {
+ if ((this._OrderCode != value))
+ {
+ this.OnOrderCodeChanging(value);
+ this.SendPropertyChanging();
+ this._OrderCode = value;
+ this.SendPropertyChanged("OrderCode");
+ this.OnOrderCodeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")]
+ public System.Nullable OrderInDate
+ {
+ get
+ {
+ return this._OrderInDate;
+ }
+ set
+ {
+ if ((this._OrderInDate != value))
+ {
+ this.OnOrderInDateChanging(value);
+ this.SendPropertyChanging();
+ this._OrderInDate = value;
+ this.SendPropertyChanged("OrderInDate");
+ this.OnOrderInDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")]
+ public System.Nullable OrderOutDate
+ {
+ get
+ {
+ return this._OrderOutDate;
+ }
+ set
+ {
+ if ((this._OrderOutDate != value))
+ {
+ this.OnOrderOutDateChanging(value);
+ this.SendPropertyChanging();
+ this._OrderOutDate = value;
+ this.SendPropertyChanged("OrderOutDate");
+ this.OnOrderOutDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")]
+ public string MaterialRequisitionUnit
+ {
+ get
+ {
+ return this._MaterialRequisitionUnit;
+ }
+ set
+ {
+ if ((this._MaterialRequisitionUnit != value))
+ {
+ this.OnMaterialRequisitionUnitChanging(value);
+ this.SendPropertyChanging();
+ this._MaterialRequisitionUnit = value;
+ this.SendPropertyChanged("MaterialRequisitionUnit");
+ this.OnMaterialRequisitionUnitChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")]
public System.Nullable State
{
@@ -194530,106 +195074,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")]
- public string ContractId
- {
- get
- {
- return this._ContractId;
- }
- set
- {
- if ((this._ContractId != value))
- {
- this.OnContractIdChanging(value);
- this.SendPropertyChanging();
- this._ContractId = value;
- this.SendPropertyChanged("ContractId");
- this.OnContractIdChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")]
- public System.Nullable OrderInDate
- {
- get
- {
- return this._OrderInDate;
- }
- set
- {
- if ((this._OrderInDate != value))
- {
- this.OnOrderInDateChanging(value);
- this.SendPropertyChanging();
- this._OrderInDate = value;
- this.SendPropertyChanged("OrderInDate");
- this.OnOrderInDateChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")]
- public string OrderCode
- {
- get
- {
- return this._OrderCode;
- }
- set
- {
- if ((this._OrderCode != value))
- {
- this.OnOrderCodeChanging(value);
- this.SendPropertyChanging();
- this._OrderCode = value;
- this.SendPropertyChanged("OrderCode");
- this.OnOrderCodeChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")]
- public System.Nullable OrderOutDate
- {
- get
- {
- return this._OrderOutDate;
- }
- set
- {
- if ((this._OrderOutDate != value))
- {
- this.OnOrderOutDateChanging(value);
- this.SendPropertyChanging();
- this._OrderOutDate = value;
- this.SendPropertyChanged("OrderOutDate");
- this.OnOrderOutDateChanged();
- }
- }
- }
-
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")]
- public string MaterialRequisitionUnit
- {
- get
- {
- return this._MaterialRequisitionUnit;
- }
- set
- {
- if ((this._MaterialRequisitionUnit != value))
- {
- this.OnMaterialRequisitionUnitChanging(value);
- this.SendPropertyChanging();
- this._MaterialRequisitionUnit = value;
- this.SendPropertyChanged("MaterialRequisitionUnit");
- this.OnMaterialRequisitionUnitChanged();
- }
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -205038,6 +205482,284 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Project_Devices")]
+ public partial class Project_Devices : INotifyPropertyChanging, INotifyPropertyChanged
+ {
+
+ private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
+
+ private string _DeviceId;
+
+ private string _DeviceName;
+
+ private string _Address;
+
+ private System.Nullable _CreateDate;
+
+ private string _ProjectId;
+
+ private string _DeviceSerial;
+
+ private string _IsInOut;
+
+ private string _ValidateCode;
+
+ private string _YunMouDeviceId;
+
+ private string _YunMouPermission;
+
+ #region 可扩展性方法定义
+ partial void OnLoaded();
+ partial void OnValidate(System.Data.Linq.ChangeAction action);
+ partial void OnCreated();
+ partial void OnDeviceIdChanging(string value);
+ partial void OnDeviceIdChanged();
+ partial void OnDeviceNameChanging(string value);
+ partial void OnDeviceNameChanged();
+ partial void OnAddressChanging(string value);
+ partial void OnAddressChanged();
+ partial void OnCreateDateChanging(System.Nullable value);
+ partial void OnCreateDateChanged();
+ partial void OnProjectIdChanging(string value);
+ partial void OnProjectIdChanged();
+ partial void OnDeviceSerialChanging(string value);
+ partial void OnDeviceSerialChanged();
+ partial void OnIsInOutChanging(string value);
+ partial void OnIsInOutChanged();
+ partial void OnValidateCodeChanging(string value);
+ partial void OnValidateCodeChanged();
+ partial void OnYunMouDeviceIdChanging(string value);
+ partial void OnYunMouDeviceIdChanged();
+ partial void OnYunMouPermissionChanging(string value);
+ partial void OnYunMouPermissionChanged();
+ #endregion
+
+ public Project_Devices()
+ {
+ OnCreated();
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeviceId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
+ public string DeviceId
+ {
+ get
+ {
+ return this._DeviceId;
+ }
+ set
+ {
+ if ((this._DeviceId != value))
+ {
+ this.OnDeviceIdChanging(value);
+ this.SendPropertyChanging();
+ this._DeviceId = value;
+ this.SendPropertyChanged("DeviceId");
+ this.OnDeviceIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeviceName", DbType="NVarChar(50)")]
+ public string DeviceName
+ {
+ get
+ {
+ return this._DeviceName;
+ }
+ set
+ {
+ if ((this._DeviceName != value))
+ {
+ this.OnDeviceNameChanging(value);
+ this.SendPropertyChanging();
+ this._DeviceName = value;
+ this.SendPropertyChanged("DeviceName");
+ this.OnDeviceNameChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Address", DbType="NVarChar(500)")]
+ public string Address
+ {
+ get
+ {
+ return this._Address;
+ }
+ set
+ {
+ if ((this._Address != value))
+ {
+ this.OnAddressChanging(value);
+ this.SendPropertyChanging();
+ this._Address = value;
+ this.SendPropertyChanged("Address");
+ this.OnAddressChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateDate", DbType="Date")]
+ public System.Nullable CreateDate
+ {
+ get
+ {
+ return this._CreateDate;
+ }
+ set
+ {
+ if ((this._CreateDate != value))
+ {
+ this.OnCreateDateChanging(value);
+ this.SendPropertyChanging();
+ this._CreateDate = value;
+ this.SendPropertyChanged("CreateDate");
+ this.OnCreateDateChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
+ public string ProjectId
+ {
+ get
+ {
+ return this._ProjectId;
+ }
+ set
+ {
+ if ((this._ProjectId != value))
+ {
+ this.OnProjectIdChanging(value);
+ this.SendPropertyChanging();
+ this._ProjectId = value;
+ this.SendPropertyChanged("ProjectId");
+ this.OnProjectIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DeviceSerial", DbType="NVarChar(50)")]
+ public string DeviceSerial
+ {
+ get
+ {
+ return this._DeviceSerial;
+ }
+ set
+ {
+ if ((this._DeviceSerial != value))
+ {
+ this.OnDeviceSerialChanging(value);
+ this.SendPropertyChanging();
+ this._DeviceSerial = value;
+ this.SendPropertyChanged("DeviceSerial");
+ this.OnDeviceSerialChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Name="isInOut", Storage="_IsInOut", DbType="NVarChar(50)")]
+ public string IsInOut
+ {
+ get
+ {
+ return this._IsInOut;
+ }
+ set
+ {
+ if ((this._IsInOut != value))
+ {
+ this.OnIsInOutChanging(value);
+ this.SendPropertyChanging();
+ this._IsInOut = value;
+ this.SendPropertyChanged("IsInOut");
+ this.OnIsInOutChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ValidateCode", DbType="NVarChar(50)")]
+ public string ValidateCode
+ {
+ get
+ {
+ return this._ValidateCode;
+ }
+ set
+ {
+ if ((this._ValidateCode != value))
+ {
+ this.OnValidateCodeChanging(value);
+ this.SendPropertyChanging();
+ this._ValidateCode = value;
+ this.SendPropertyChanged("ValidateCode");
+ this.OnValidateCodeChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YunMouDeviceId", DbType="NVarChar(50)")]
+ public string YunMouDeviceId
+ {
+ get
+ {
+ return this._YunMouDeviceId;
+ }
+ set
+ {
+ if ((this._YunMouDeviceId != value))
+ {
+ this.OnYunMouDeviceIdChanging(value);
+ this.SendPropertyChanging();
+ this._YunMouDeviceId = value;
+ this.SendPropertyChanged("YunMouDeviceId");
+ this.OnYunMouDeviceIdChanged();
+ }
+ }
+ }
+
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_YunMouPermission", DbType="NVarChar(50)")]
+ public string YunMouPermission
+ {
+ get
+ {
+ return this._YunMouPermission;
+ }
+ set
+ {
+ if ((this._YunMouPermission != value))
+ {
+ this.OnYunMouPermissionChanging(value);
+ this.SendPropertyChanging();
+ this._YunMouPermission = value;
+ this.SendPropertyChanged("YunMouPermission");
+ this.OnYunMouPermissionChanged();
+ }
+ }
+ }
+
+ public event PropertyChangingEventHandler PropertyChanging;
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ protected virtual void SendPropertyChanging()
+ {
+ if ((this.PropertyChanging != null))
+ {
+ this.PropertyChanging(this, emptyChangingEventArgs);
+ }
+ }
+
+ protected virtual void SendPropertyChanged(String propertyName)
+ {
+ if ((this.PropertyChanged != null))
+ {
+ this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Project_FileCabinet")]
public partial class Project_FileCabinet : INotifyPropertyChanging, INotifyPropertyChanged
{
@@ -282807,6 +283529,8 @@ namespace Model
private string _ProblemTypes;
+ private string _RiskLevel;
+
private System.Nullable _SortIndex;
private string _Situation;
@@ -283131,6 +283855,22 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RiskLevel", DbType="NVarChar(50)")]
+ public string RiskLevel
+ {
+ get
+ {
+ return this._RiskLevel;
+ }
+ set
+ {
+ if ((this._RiskLevel != value))
+ {
+ this._RiskLevel = value;
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")]
public System.Nullable SortIndex
{
@@ -317351,7 +318091,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")]
public string Name
{
get
@@ -317928,7 +318668,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@@ -318119,7 +318859,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@@ -323458,7 +324198,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@@ -324930,7 +325670,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")]
public string PackageContent
{
get
@@ -334481,7 +335221,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")]
public string ContractNo
{
get
@@ -334501,7 +335241,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")]
public string UnitWorks
{
get
From b43291cb16e681f1e7aab4791e621783c98eb2b4 Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Tue, 23 Dec 2025 20:38:34 +0800
Subject: [PATCH 05/10] 11
---
.gitignore | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
index 91fef947..2c9c729f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,4 +34,4 @@ SGGL/.svn
/SGGL/BLLTests
/SGGL/FineUIPro.Web/ErrLog.txt
/SGGL/CLAUDE.md
-/SGGL/.claude/settings.local.json
+/SGGL/.claude
From 376d03209adef89941366341e3e69032656c7bc2 Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Tue, 23 Dec 2025 20:52:03 +0800
Subject: [PATCH 06/10] =?UTF-8?q?=E5=90=8C=E6=AD=A5=E4=BA=BA=E5=91=98?=
=?UTF-8?q?=E5=88=B0=E4=BA=91=E7=9C=B8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
DataBase/版本日志/SGGLDB_V2025-12-23-003.sql | 100 ++++++++++++++++++
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +-
.../HSSE/SitePerson/PersonList.aspx | 2 +
.../HSSE/SitePerson/PersonList.aspx.cs | 2 +-
4 files changed, 104 insertions(+), 2 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2025-12-23-003.sql
diff --git a/DataBase/版本日志/SGGLDB_V2025-12-23-003.sql b/DataBase/版本日志/SGGLDB_V2025-12-23-003.sql
new file mode 100644
index 00000000..d4c3e452
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-12-23-003.sql
@@ -0,0 +1,100 @@
+
+
+ALTER VIEW [dbo].[View_SitePerson_Person]
+AS
+/*ֳԱͼ*/
+SELECT SitePerson.ProjectId,
+ Project.ProjectCode,
+ Project.ProjectName,
+ SitePerson.SitePersonId,
+ persons.PersonId,
+ SitePerson.CardNo,
+ Persons.PersonName,
+ Persons.Sex,
+ (Case Persons.Sex WHEN '1' THEN '' WHEN '2' THEN 'Ů' ELSE '' END) AS SexName,
+ Persons.IdentityCard,
+ Persons.Address,
+ SitePerson.UnitId,
+ Persons.DepartId,
+ Persons.Birthday,
+ SitePerson.TeamGroupId,
+ SitePerson.WorkAreaId,
+ SitePerson.WorkPostId,
+ SitePerson.InTime,
+ SitePerson.OutTime,
+ SitePerson.OutResult,
+ Persons.Telephone,
+ Persons.PositionId,
+ Persons.PostTitleId,
+ Persons.PhotoUrl,
+ Unit.UnitCode,
+ Unit.UnitName,
+ TeamGroup.TeamGroupName,
+ Post.WorkPostName,
+ Position.PositionName,
+ Title.PostTitleName,
+ Depart.DepartName,
+ Post.PostType,
+ Post.IsHsse,
+ (SELECT COUNT(*) FROM EduTrain_TrainRecordDetail T
+ LEFT JOIN EduTrain_TrainRecord AS E ON T.TrainingId=E.TrainingId
+ WHERE T.PersonId=SitePerson.PersonId AND E.ProjectId=SitePerson.ProjectId AND T.CheckResult=1) AS TrainCount,
+ (SELECT COUNT(*) FROM Training_TestRecord R
+ WHERE R.TestManId=SitePerson.PersonId AND R.ProjectId=SitePerson.ProjectId and R.TestScores > ISNULL((SELECT TOP 1 PassingScore FROM Sys_TestRule),60)) AS TrainCount1,
+ SitePerson.AuditorId,
+ Persons.PersonName AS AuditorName,
+ SitePerson.AuditorDate,
+ Persons.IDCardUrl,
+ Persons.IsForeign,
+ case when Persons.IsForeign=1 then '' else '' end as IsForeignStr,
+ Persons.IdcardType,
+ BasicData1.dictName as IdcardTypeName,
+ Persons.IdcardStartDate,
+ Persons.IdcardEndDate,
+ Persons.IdcardForever,
+ case when Persons.IdcardForever='Y' then '' else '' end as IdcardForeverStr,
+ Persons.PoliticsStatus,
+ BasicData2.dictName as PoliticsStatusName,
+ Persons.IdcardAddress,
+ Persons.Nation,
+ BasicData3.dictName as NationName,
+ Persons.EduLevel,
+ BasicData4.dictName as EduLevelName,
+ Persons.MaritalStatus,
+ BasicData5.dictName as MaritalStatusName,
+ Persons.CountryCode,
+ Country.cname as CountryName,
+ Persons.ProvinceCode,
+ City.cname as ProvinceName,
+ Persons.PersonType,
+ (case when Persons.PersonType='2' then 'Ƹ' when Persons.PersonType='3' then '' else 'Ա' end) as IsOutsideStr,
+ --WorkArea.UnitWorkCode AS WorkAreaCode,
+ WorkAreaCode= STUFF((SELECT ',' + UnitWorkCode FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +SitePerson.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
+ --WorkArea.UnitWorkName AS WorkAreaName
+ WorkAreaName= STUFF((SELECT ',' + UnitWorkName FROM dbo.WBS_UnitWork where PATINDEX('%,' + RTRIM(UnitWorkId) + ',%',',' +SitePerson.WorkAreaId + ',')>0 FOR XML PATH('')), 1, 1,''),
+ SitePerson.RealNameAddTime,
+ SitePerson.RealNameUpdateTime,
+ Persons.HeadImage,
+ SitePerson.States,
+ Persons.YunMouState
+FROM SitePerson_Person AS SitePerson
+LEFT JOIN Person_Persons AS Persons ON SitePerson.PersonId=Persons.PersonId
+LEFT JOIN Base_Project AS Project ON Project.ProjectId=SitePerson.ProjectId
+LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = SitePerson.UnitId
+LEFT JOIN ProjectData_TeamGroup AS TeamGroup ON TeamGroup.TeamGroupId=SitePerson.TeamGroupId
+LEFT JOIN Base_WorkPost AS Post ON Post.WorkPostId = SitePerson.WorkPostId
+LEFT JOIN Base_Position AS Position ON Position.PositionId = Persons.PositionId
+Left JOIN Base_PostTitle AS Title ON Title.PostTitleId = Persons.PostTitleId
+Left JOIN Base_Depart AS Depart ON Depart.DepartId = Persons.DepartId
+Left JOIN RealName_BasicData AS BasicData1 ON BasicData1.dictCode = Persons.IdcardType
+Left JOIN RealName_BasicData AS BasicData2 ON BasicData2.dictCode = Persons.PoliticsStatus
+Left JOIN RealName_BasicData AS BasicData3 ON BasicData3.dictCode = Persons.Nation
+Left JOIN RealName_BasicData AS BasicData4 ON BasicData4.dictCode = Persons.EduLevel
+Left JOIN RealName_BasicData AS BasicData5 ON BasicData5.dictCode = Persons.MaritalStatus
+Left JOIN RealName_Country AS Country ON Country.CountryId = Persons.CountryCode
+Left JOIN RealName_City AS City ON City.provinceCode = Persons.ProvinceCode and City.CountryId = Persons.CountryCode
+
+
+GO
+
+
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 6524e870..c68fe42c 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -16862,7 +16862,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
index fdc92fb6..424a577a 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
@@ -143,6 +143,8 @@
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd HH:mm:ss" HeaderText="上报集团时间"
HeaderTextAlign="Center" TextAlign="Center">
+
<%--
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
index 746eb531..5b4deed6 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx.cs
@@ -193,7 +193,7 @@ namespace FineUIPro.Web.HSSE.SitePerson
}
string strSql = @"SELECT ProjectId,SitePersonId,PersonId,PersonName,IdentityCard,CardNo,PersonName
-,WorkPostId,WorkPostName,UnitId,UnitName,TeamGroupId,TeamGroupName,InTime,RealNameAddTime,States, TrainCount,TrainCount1
+,WorkPostId,WorkPostName,UnitId,UnitName,TeamGroupId,TeamGroupName,InTime,RealNameAddTime,States, TrainCount,TrainCount1,YunMouState
FROM View_SitePerson_Person
Where ProjectId=@ProjectId ";
List listStr = new List
From 9e6f4e08103d5dddbca6716ccc3adab60726219c Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Wed, 24 Dec 2025 08:59:31 +0800
Subject: [PATCH 07/10] 1
---
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +-
SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index c68fe42c..6524e870 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -16862,7 +16862,7 @@
-
+
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
index 424a577a..3b30cd86 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonList.aspx
@@ -145,6 +145,7 @@
+
<%--
From f2127a7500171eb41073e12865ac4513d3eed1e4 Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Wed, 24 Dec 2025 10:28:49 +0800
Subject: [PATCH 08/10] 11
---
DataBase/版本日志/SGGLDB_V2025-12-24-001.sql | 6 ++++++
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
create mode 100644 DataBase/版本日志/SGGLDB_V2025-12-24-001.sql
diff --git a/DataBase/版本日志/SGGLDB_V2025-12-24-001.sql b/DataBase/版本日志/SGGLDB_V2025-12-24-001.sql
new file mode 100644
index 00000000..5b315d92
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-12-24-001.sql
@@ -0,0 +1,6 @@
+INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'Ŀ豸', NULL, N'ProjectData/ProjectDevices.aspx', '86', N'0', N'Menu_ProjectSet', '0', '1', '1');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'1E3A5ADC-BAA7-45BC-AAF9-012A024F4752', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'', '4');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'37E51622-FB4E-40F4-8D37-603EE626DB7F', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'', '1');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'6EBFA308-581A-4260-9ECA-7E30283EF9EA', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'ɾ', '3');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'939F4F2D-F03B-4DBD-963C-D55196535D8C', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'', '2');
+UPDATE TOP(1)[dbo].[Sys_Menu] SET [MenuId]=N'5B302FF3-A6E4-4305-A0C0-64CA7377777A', [MenuName]=N'ʱ', [Icon]=NULL, [Url]=N'HSSE/SitePerson/DateManage.aspx', [SortIndex]='9', [SuperMenu]=N'EE260447-028F-46AF-8864-9A5DC9DAA5BD', [MenuType]=N'Menu_HSSE', [IsOffice]='0', [IsEnd]='1', [IsUsed]='1' WHERE ([MenuId]=N'5B302FF3-A6E4-4305-A0C0-64CA7377777A');
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index 6524e870..c68fe42c 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -16862,7 +16862,7 @@
-
+
From f68199396209ca09b83ad5cd5b76faff2fe90bb2 Mon Sep 17 00:00:00 2001
From: gaofei1985 <181547018@qq.com>
Date: Wed, 24 Dec 2025 10:56:06 +0800
Subject: [PATCH 09/10] 1
---
DataBase/版本日志/SGGLDB_V2025-12-24-001.sql | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 DataBase/版本日志/SGGLDB_V2025-12-24-001.sql
diff --git a/DataBase/版本日志/SGGLDB_V2025-12-24-001.sql b/DataBase/版本日志/SGGLDB_V2025-12-24-001.sql
new file mode 100644
index 00000000..6e472944
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2025-12-24-001.sql
@@ -0,0 +1,8 @@
+INSERT INTO [dbo].[Sys_Menu] ([MenuId], [MenuName], [Icon], [Url], [SortIndex], [SuperMenu], [MenuType], [IsOffice], [IsEnd], [IsUsed]) VALUES (N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'Ŀ豸', NULL, N'ProjectData/ProjectDevices.aspx', '86', N'0', N'Menu_ProjectSet', '0', '1', '1');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'1E3A5ADC-BAA7-45BC-AAF9-012A024F4752', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'', '4');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'37E51622-FB4E-40F4-8D37-603EE626DB7F', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'', '1');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'6EBFA308-581A-4260-9ECA-7E30283EF9EA', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'ɾ', '3');
+INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) VALUES (N'939F4F2D-F03B-4DBD-963C-D55196535D8C', N'E4DC0A35-C585-4C4F-8F79-10F528892314', N'', '2');
+GO
+UPDATE TOP(1)[dbo].[Sys_Menu] SET [MenuId]=N'5B302FF3-A6E4-4305-A0C0-64CA7377777A', [MenuName]=N'ʱ', [Icon]=NULL, [Url]=N'HSSE/SitePerson/DateManage.aspx', [SortIndex]='9', [SuperMenu]=N'EE260447-028F-46AF-8864-9A5DC9DAA5BD', [MenuType]=N'Menu_HSSE', [IsOffice]='0', [IsEnd]='1', [IsUsed]='1' WHERE ([MenuId]=N'5B302FF3-A6E4-4305-A0C0-64CA7377777A');
+GO
\ No newline at end of file
From 1af8e1126a9e21a3bf7f44ecd33e1de12cb3292c Mon Sep 17 00:00:00 2001
From: 10191 <506754232@qq.com>
Date: Wed, 24 Dec 2025 15:35:40 +0800
Subject: [PATCH 10/10] =?UTF-8?q?=E4=BA=91=E7=9C=B8=20=E6=97=A5=E5=BF=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SGGL/BLL/Common/YunMouHelper.cs | 33 ++++++++++++-------
SGGL/BLL/OpenService/YunMouService.cs | 18 +++++-----
.../HSSE/SitePerson/DayReport.aspx.cs | 2 --
3 files changed, 30 insertions(+), 23 deletions(-)
diff --git a/SGGL/BLL/Common/YunMouHelper.cs b/SGGL/BLL/Common/YunMouHelper.cs
index 2825490b..10691aad 100644
--- a/SGGL/BLL/Common/YunMouHelper.cs
+++ b/SGGL/BLL/Common/YunMouHelper.cs
@@ -38,7 +38,9 @@ namespace BLL.Common
}
string data = "{\"groupName\":\"" + groupName + "\",\"groupNo\":\"" + groupNo + "\"}";
string result = Post(YunMouUrl + "api/v1/open/basic/groups/create", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "添加设备组");
+
+ ErrLogInfo.WriteLog(result);
+
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.message;
@@ -59,7 +61,8 @@ namespace BLL.Common
{
string result = Post(YunMouUrl + "api/v1/open/basic/groups/delete?groupNo=" + groupNo, "", "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "删除设备组");
+ ErrLogInfo.WriteLog(result);
+
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.message;
@@ -81,7 +84,8 @@ namespace BLL.Common
{
string data = "{\"deviceSerial\":\"" + deviceSerial + "\",\"groupNo\":\"" + groupNo + "\",\"validateCode\":\"" + validateCode + "\"}";
string result = Post(YunMouUrl + "api/v1/open/basic/devices/create", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "添加设备");
+ ErrLogInfo.WriteLog(result);
+
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.data.groupId;
@@ -101,7 +105,8 @@ namespace BLL.Common
{
string data = "{\"deviceSerial\":\"" + deviceSerial + "\",\"deviceName\":\"" + deviceName + "\"}";
string result = Post(YunMouUrl + "api/v1/open/basic/devices/update", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "修改设备名称");
+ ErrLogInfo.WriteLog(result);
+
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.message;
@@ -120,7 +125,7 @@ namespace BLL.Common
{
string result = Post(YunMouUrl + "api/v1/open/basic/devices/delete?deviceSerial=" + deviceSerial, "", "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "删除设备");
+ ErrLogInfo.WriteLog(result);
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.message;
@@ -150,7 +155,7 @@ namespace BLL.Common
.Replace(")", "");
string data = "{\"groupName\":\"" + groupName + "\"}";
string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/create", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "添加权限组");
+ ErrLogInfo.WriteLog(result);
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.data.groupId;
@@ -219,7 +224,7 @@ namespace BLL.Common
//}
string data = "{\"groupId\":\"" + groupId + "\",\"employeeNos\":[\"" + string.Join("\", \"", employeeNos) + "\"],\"autoIssue\":\"true\"}";
string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/actions/addPersons", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "填加员工到权限组");
+ ErrLogInfo.WriteLog(result);
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.data.statisticsId;
@@ -239,7 +244,7 @@ namespace BLL.Common
{
string data = "{\"groupId\":\"" + groupId + "\",\"employeeNos\":[\"" + string.Join("\", \"", employeeNos) + "\"]}";
string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/actions/removePersons", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "从权限组移除员工");
+ ErrLogInfo.WriteLog(result);
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.data.statisticsId;
@@ -259,7 +264,8 @@ namespace BLL.Common
{
string data = "{\"groupId\":\"" + groupId + "\",\"deviceSerials\":[\"" + string.Join("\", \"", devices) + "\"],\"autoIssue\":true,\"checkCapability\":true}";
string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/actions/addDevices", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "添加设备到权限组");
+ ErrLogInfo.WriteLog(result);
+
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.code;
@@ -279,7 +285,8 @@ namespace BLL.Common
{
string data = "{\"groupId\":\"" + groupId + "\",\"deviceSerials\":[\"" + string.Join("\", \"", devices) + "\"],\"autoIssue\":true,\"checkCapability\":true}";
string result = Post(YunMouUrl + "api/v1/open/accessControl/permissionGroups/actions/removeDevices", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(result, "从权限组移除设备");
+ ErrLogInfo.WriteLog(result);
+
var j2 = JsonConvert.DeserializeObject(result);
if (j2.code == "200")
return j2.message;
@@ -311,7 +318,9 @@ namespace BLL.Common
string faceImageBase64 = ImageToByte64String(filename, System.Drawing.Imaging.ImageFormat.Jpeg); // 图片的base64编码
string data = "{\"employeeNo\":\"" + employeeNo + "\",\"personName\":\"" + personName + "\",\"faceImageBase64\":\"" + faceImageBase64 + "\",\"verifyImage\":true}";
string result = Post(YunMouUrl + "api/v1/open/basic/persons/create", data, "application/json;charset=UTF-8", access_token);
- LogService.AddLog(personName + result, "添加人员");
+
+ ErrLogInfo.WriteLog(personName + result);
+
var j2 = JsonConvert.DeserializeObject(result);
return j2.code;
}
@@ -449,7 +458,7 @@ namespace BLL.Common
StreamReader reader = new StreamReader(s, Encoding.UTF8);
string res = reader.ReadToEnd();
- LogService.AddLog(res, "http请求返回");
+ ErrLogInfo.WriteLog(res);
return res;
}
}
diff --git a/SGGL/BLL/OpenService/YunMouService.cs b/SGGL/BLL/OpenService/YunMouService.cs
index 98a1f3d9..9990fff4 100644
--- a/SGGL/BLL/OpenService/YunMouService.cs
+++ b/SGGL/BLL/OpenService/YunMouService.cs
@@ -80,11 +80,11 @@ namespace BLL
//token = YunMouHelper.getToken();
////创建消费者消费者如果5分钟未调用拉取消息接口将被删除。
//consumerId = YunMouHelper.addConsumer(token);
-
- LogService.AddLog(token + ";" + consumerId, "调用消息队列参数");
+ ErrLogInfo.WriteLog(token + ";" + consumerId);
+
string content = YunMouHelper.consumerMessage(consumerId, token);
//调用消息队列第一次
- LogService.AddLog(content, "调用消息队列1");
+ ErrLogInfo.WriteLog(content);
var j2 = JsonConvert.DeserializeObject(content);
//消费者首次拉取消息时需要与消息通道建立连接,此次调用实际拉到消息列表为空,
@@ -125,7 +125,7 @@ namespace BLL
//如果为空再调一次
content = YunMouHelper.consumerMessage(consumerId, token);
//调用消息队列第二次
- LogService.AddLog(content, "调用消息队列" + (y + 2).ToString());
+ ErrLogInfo.WriteLog(content+"调用消息队列" + (y + 2).ToString());
j2 = JsonConvert.DeserializeObject(content);
if (j2.data.Count > 0)
{
@@ -170,7 +170,7 @@ namespace BLL
catch (Exception ex)
{
var erro = ex.Message;
- LogService.AddLog(ex.Message, "调用消息队列");
+ ErrLogInfo.WriteLog(ex.Message);
}
}
@@ -183,10 +183,10 @@ namespace BLL
////创建消费者消费者如果5分钟未调用拉取消息接口将被删除。
//consumerId = YunMouHelper.addConsumer(token);
- LogService.AddLog(token + ";" + consumerId, "调用消息队列参数");
+ ErrLogInfo.WriteLog(token + ";" + consumerId+ "调用消息队列参数");
string content = YunMouHelper.consumerMessage(consumerId, token);
//调用消息队列第一次
- LogService.AddLog(content, "调用消息队列1");
+ ErrLogInfo.WriteLog(content );
var j2 = JsonConvert.DeserializeObject(content);
//消费者首次拉取消息时需要与消息通道建立连接,此次调用实际拉到消息列表为空,
@@ -227,7 +227,7 @@ namespace BLL
//如果为空再调一次
content = YunMouHelper.consumerMessage(consumerId, token);
//调用消息队列第二次
- LogService.AddLog(content, "调用消息队列" + (y + 2).ToString());
+ ErrLogInfo.WriteLog(content+ "调用消息队列" + (y + 2).ToString());
j2 = JsonConvert.DeserializeObject(content);
if (j2.data.Count > 0)
{
@@ -272,7 +272,7 @@ namespace BLL
catch (Exception ex)
{
var erro = ex.Message;
- LogService.AddLog(ex.Message, "调用消息队列");
+ ErrLogInfo.WriteLog(ex.Message );
}
}
diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/DayReport.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/DayReport.aspx.cs
index 58372af6..95a960b4 100644
--- a/SGGL/FineUIPro.Web/HSSE/SitePerson/DayReport.aspx.cs
+++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/DayReport.aspx.cs
@@ -198,14 +198,12 @@ namespace FineUIPro.Web.HSSE.SitePerson
Response.End();
}
-#pragma warning disable CS0108 // “DayReport.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
///
/// 导出方法
///
///
///
private string GetGridTableHtml(Grid grid)
-#pragma warning restore CS0108 // “DayReport.GetGridTableHtml(Grid)”隐藏继承的成员“PageBase.GetGridTableHtml(Grid)”。如果是有意隐藏,请使用关键字 new。
{
StringBuilder sb = new StringBuilder();
sb.Append("");