From b9349673f1610970530db34ed8ed9b26e8e1e239 Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期三, 28 五月 2025 11:11:01 +0800
Subject: [PATCH] 最新上传

---
 MESApplication/Properties/launchSettings.json             |    2 
 MES.Service/Dto/webApi/ErpItems.cs                        |    1 
 MES.Service/Dto/base/VersionInfo.cs                       |    9 
 MES.Service/Dto/base/UpdateCheckRequest.cs                |    8 
 MES.Service/Modes/MesRohInData.cs                         |    6 
 MES.Service/service/BasicData/MesRohInManager.cs          |    6 
 MESApplication/Controllers/BasicData/ModulesController.cs |  132 ++++++++++++
 MES.Service/Dto/webApi/ErpRohIn.cs                        |    1 
 MES.Service/service/SysUserService.cs                     |  330 ++++++++++++++++++++++++++++++
 MESApplication/Controllers/Base/UpdateController.cs       |   80 +++++++
 MESApplication/bin/Debug/net8.0/MES.Service.pdb           |    0 
 MESApplication/bin/Debug/net8.0/MESApplication.dll        |    0 
 MES.Service/bin/Debug/net8.0/MES.Service.dll              |    0 
 MES.Service/Modes/MesItems.cs                             |    6 
 MESApplication/bin/Debug/net8.0/MESApplication.xml        |   21 +
 MESApplication/bin/Debug/net8.0/MES.Service.dll           |    0 
 MES.Service/Modes/MesRohIn.cs                             |    4 
 MES.Service/Dto/service/UserPermission.cs                 |   17 +
 MESApplication/bin/Debug/net8.0/MESApplication.pdb        |    0 
 MESApplication/bin/Debug/net8.0/MESApplication.exe        |    0 
 MES.Service/Dto/webApi/ErpRohinData.cs                    |    1 
 MES.Service/Dto/service/WarehouseQuery.cs                 |    1 
 MES.Service/service/BasicData/MesItemsManager.cs          |    3 
 MES.Service/bin/Debug/net8.0/MES.Service.pdb              |    0 
 24 files changed, 620 insertions(+), 8 deletions(-)

diff --git a/MES.Service/Dto/base/UpdateCheckRequest.cs b/MES.Service/Dto/base/UpdateCheckRequest.cs
new file mode 100644
index 0000000..e7334e7
--- /dev/null
+++ b/MES.Service/Dto/base/UpdateCheckRequest.cs
@@ -0,0 +1,8 @@
+锘�
+namespace MES.Service.Dto.@base;
+
+public class UpdateCheckRequest
+{
+    public string version { get; set; }
+    public string platform { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/base/VersionInfo.cs b/MES.Service/Dto/base/VersionInfo.cs
new file mode 100644
index 0000000..5c6ad5c
--- /dev/null
+++ b/MES.Service/Dto/base/VersionInfo.cs
@@ -0,0 +1,9 @@
+锘縩amespace MES.Service.Dto.@base;
+
+public class VersionInfo
+{
+    public string Version { get; set; }
+    public string UpdateInfo { get; set; }
+    public string WgtUrl { get; set; }
+    public bool IsForceUpdate { get; set; }
+}
\ No newline at end of file
diff --git a/MES.Service/Dto/service/UserPermission.cs b/MES.Service/Dto/service/UserPermission.cs
new file mode 100644
index 0000000..48b6ef0
--- /dev/null
+++ b/MES.Service/Dto/service/UserPermission.cs
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace MES.Service.Dto.service
+{
+    public class UserPermission
+    {
+        public string Name { get; set; }
+        public string IconType { get; set; }
+        public string Category { get; set; }
+        public string Path { get; set; }
+        public string Color { get; set; }
+    }
+}
diff --git a/MES.Service/Dto/service/WarehouseQuery.cs b/MES.Service/Dto/service/WarehouseQuery.cs
index 6ddeaf6..a3fa4ca 100644
--- a/MES.Service/Dto/service/WarehouseQuery.cs
+++ b/MES.Service/Dto/service/WarehouseQuery.cs
@@ -35,4 +35,5 @@
     public string? daa001 { get; set; }
     
     public decimal? Num { get; set; }
+
 }
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpItems.cs b/MES.Service/Dto/webApi/ErpItems.cs
index aba6886..330691f 100644
--- a/MES.Service/Dto/webApi/ErpItems.cs
+++ b/MES.Service/Dto/webApi/ErpItems.cs
@@ -33,4 +33,5 @@
 
     public string? Expirationdate { get; set; }
     public string? Reviewperiod  { get; set; }
+    public decimal? FLeadDays { get; set; }
 }
\ No newline at end of file
diff --git a/MES.Service/Dto/webApi/ErpRohIn.cs b/MES.Service/Dto/webApi/ErpRohIn.cs
index bcd5458..8a54f04 100644
--- a/MES.Service/Dto/webApi/ErpRohIn.cs
+++ b/MES.Service/Dto/webApi/ErpRohIn.cs
@@ -41,6 +41,7 @@
     public string? FApproveDate { get; set; }
 
     public string? FCHANGEREASON { get; set; }
+    
 
 
 
diff --git a/MES.Service/Dto/webApi/ErpRohinData.cs b/MES.Service/Dto/webApi/ErpRohinData.cs
index 754f334..2d39454 100644
--- a/MES.Service/Dto/webApi/ErpRohinData.cs
+++ b/MES.Service/Dto/webApi/ErpRohinData.cs
@@ -49,6 +49,7 @@
     public string? FDepotCode { get; set; }
 
     public string? FDepotName { get; set; }
+    public string? FUrgent_material { get; set; }
     //public string? PurchaseOrderLineNumber { get; set; }
     //public string? Demand { get; set; }
     //public string? Receiving { get; set; }
diff --git a/MES.Service/Modes/MesItems.cs b/MES.Service/Modes/MesItems.cs
index a81e583..ec6e8ab 100644
--- a/MES.Service/Modes/MesItems.cs
+++ b/MES.Service/Modes/MesItems.cs
@@ -317,7 +317,11 @@
     public decimal? ItemId { get; set; }
 
 
-
+    /// <summary>
+    ///     鍥哄畾鍓嶇疆澶╂暟
+    /// </summary>
+    [SugarColumn(ColumnName = "LEAD_DAYS")]
+    public decimal? LeadDays { get; set; }
 
 
 
diff --git a/MES.Service/Modes/MesRohIn.cs b/MES.Service/Modes/MesRohIn.cs
index abdfd74..4e31460 100644
--- a/MES.Service/Modes/MesRohIn.cs
+++ b/MES.Service/Modes/MesRohIn.cs
@@ -243,7 +243,7 @@
     ///     鑷畾涔夊瓧娈�1
     /// </summary>
     [SugarColumn(ColumnName = "REMARK1")]
-    public string? Remark1 { get; set; }
+    public decimal? Remark1 { get; set; }
 
     /// <summary>
     ///     鑷畾涔夊瓧娈�2
@@ -268,4 +268,6 @@
     /// </summary>
     [SugarColumn(ColumnName = "REMARK5")]
     public string? Remark5 { get; set; }
+
+    
 }
\ No newline at end of file
diff --git a/MES.Service/Modes/MesRohInData.cs b/MES.Service/Modes/MesRohInData.cs
index 5b63762..759fb6c 100644
--- a/MES.Service/Modes/MesRohInData.cs
+++ b/MES.Service/Modes/MesRohInData.cs
@@ -357,5 +357,9 @@
     [SugarColumn(ColumnName = "BILLNOTYPE")]
     public string? Billnotype { get; set; }
 
-
+    /// <summary>
+    ///     鎬ユ枡
+    /// </summary>
+    [SugarColumn(ColumnName = "URGENT_MATERIAL")]
+    public string? URGENT_MATERIAL { get; set; }
 }
\ No newline at end of file
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.dll b/MES.Service/bin/Debug/net8.0/MES.Service.dll
index 0e54cb2..32dfbf5 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.dll
+++ b/MES.Service/bin/Debug/net8.0/MES.Service.dll
Binary files differ
diff --git a/MES.Service/bin/Debug/net8.0/MES.Service.pdb b/MES.Service/bin/Debug/net8.0/MES.Service.pdb
index a090e7f..996f0a4 100644
--- a/MES.Service/bin/Debug/net8.0/MES.Service.pdb
+++ b/MES.Service/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MES.Service/service/BasicData/MesItemsManager.cs b/MES.Service/service/BasicData/MesItemsManager.cs
index 1684e64..1533419 100644
--- a/MES.Service/service/BasicData/MesItemsManager.cs
+++ b/MES.Service/service/BasicData/MesItemsManager.cs
@@ -159,7 +159,8 @@
             Type    = item.Type,
             Inspectionmethod = item.Inspectionmethod,
             Expirationdate = item.Expirationdate,
-            Reviewperiod   = item.Reviewperiod
+            Reviewperiod   = item.Reviewperiod,
+            LeadDays       = item.FLeadDays
 
         };
     }
diff --git a/MES.Service/service/BasicData/MesRohInManager.cs b/MES.Service/service/BasicData/MesRohInManager.cs
index 02fa615..2c067ea 100644
--- a/MES.Service/service/BasicData/MesRohInManager.cs
+++ b/MES.Service/service/BasicData/MesRohInManager.cs
@@ -186,7 +186,6 @@
         mesRohIn.ErpCheckBy = rohIn.FApproverId;
         mesRohIn.ErpCheckDate = rohIn.FApproveDate;
         mesRohIn.Changereason = rohIn.FCHANGEREASON;
-
         return mesRohIn;
     }
 
@@ -228,8 +227,9 @@
                 SourceDocumentId = s.FSrcBillNo,
                 DemandTrackingId = s.FReqTraceNo,
                 DepotCode = s.FDepotCode,
-                DepotName = s.FDepotName
-            };
+                DepotName = s.FDepotName,
+                URGENT_MATERIAL = s.FUrgent_material
+        };
 
           
 
diff --git a/MES.Service/service/SysUserService.cs b/MES.Service/service/SysUserService.cs
new file mode 100644
index 0000000..849dc9c
--- /dev/null
+++ b/MES.Service/service/SysUserService.cs
@@ -0,0 +1,330 @@
+锘縰sing MES.Service.DB;
+using MES.Service.Dto.service;
+using MES.Service.Dto.webApi;
+using MES.Service.Modes;
+using MES.Service.util;
+using Microsoft.Data.SqlClient;
+using SqlSugar;
+using System.Data;
+using System.Dynamic;
+
+namespace MES.Service.service
+{
+    public class SysUserService : Repository<SysUser>
+    {
+
+            public List<UserPermission> QueryPurview(string userNo)
+            {
+                // 鑾峰彇鐢ㄦ埛鏉冮檺鍒楄〃
+                List<string> purviewData = this.DoPurview(userNo);
+                List<UserPermission> resultList = new List<UserPermission>();
+
+                if (purviewData.Count > 0)
+                {
+                    string purviewString = purviewData[0];
+                    string[] splitResult = purviewString.Split(new string[] { "[" }, StringSplitOptions.None);
+
+                    if (splitResult.Length > 2)
+                    {
+                        for (int i = 2; i < splitResult.Length; i++)
+                        {
+                            string trimmedStr = splitResult[i].Trim(); // 鍘绘帀绌烘牸
+                            string[] itemArray = trimmedStr.Split(new char[] { '#' });
+
+                            UserPermission permission = new UserPermission
+                            {
+                                Name = itemArray[0],
+                                Category = "鍏ㄩ儴搴旂敤",
+                                IconType = itemArray[1],
+                                Path = "input" ,
+                                Color = itemArray[2]
+                            };
+
+                            resultList.Add(permission);
+                        }
+                    }
+                }
+
+                // 娣诲姞閫�鍑洪�夐」
+               /* resultList.Add(new UserPermission
+                {
+                    Name = "閫�鍑�",
+                    Category = "鍏ㄩ儴搴旂敤",
+                    IconType = "close",
+                    Path = "/logout",
+                    Color = "red"
+                });*/
+
+                return resultList;
+            }
+
+
+        private List<string> DoPurview(string userNo)
+        {
+            List<string> resultList = new List<string>();
+
+            try
+            {
+                // 瀹氫箟杈撳叆鍙傛暟
+                var inputParam1 = new SugarParameter("c_User_No", userNo.ToUpper());
+                var inputParam2 = new SugarParameter("c_MachType", "AN");
+
+                // 瀹氫箟杈撳嚭鍙傛暟
+                var outParam = new SugarParameter("c_Result", null, true);
+
+                // 浣跨敤SqlSugar鎵ц瀛樺偍杩囩▼
+                Db.Ado.ExecuteCommand("BEGIN Prc_rf_j2_user_login(:c_User_No, :c_MachType, :c_Result); END;",
+                    inputParam1, inputParam2, outParam);
+
+                // 鑾峰彇杈撳嚭鍙傛暟鐨勫��
+                string result = outParam.Value == DBNull.Value ? string.Empty : (string)outParam.Value;
+
+                // 娣诲姞鍒扮粨鏋滃垪琛�
+                if (!string.IsNullOrEmpty(result))
+                {
+                    resultList.Add(result);
+                }
+            }
+            catch (Exception ex)
+            {
+                // 璁板綍寮傚父
+                Console.WriteLine($"鑾峰彇鐢ㄦ埛鏉冮檺澶辫触: {ex.Message}");
+                // 鍙互閫夋嫨鎶涘嚭寮傚父鎴栬繑鍥炵┖鍒楄〃
+            }
+
+            return resultList;
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇鍔熻兘鐣岄潰璁剧疆
+        /// </summary>
+        /// <param name="functionName">鍔熻兘鍚嶇О</param>
+
+
+        /// <summary>
+        /// 鑾峰彇鍔熻兘鐣岄潰璁剧疆
+        /// </summary>
+        /// <param name="functionName">鍔熻兘鍚嶇О</param>
+        /// <returns>鍔熻兘鐣岄潰璁剧疆淇℃伅</returns>
+        public ResponseResult GetRfSetup(string functionName)
+        {
+            try
+            {
+                List<string> setupData = DoRfSetup(functionName);
+
+                if (setupData.Count > 0 && !string.IsNullOrEmpty(setupData[0]))
+                {
+                    dynamic resultInfos = new ExpandoObject();
+                    resultInfos.setupData = setupData[0];
+
+                    return new ResponseResult
+                    {
+                        status = 0,
+                        message = "鏌ヨ鍔熻兘鐣岄潰鎴愬姛锛�",
+                        data = resultInfos
+                    };
+                }
+                else
+                {
+                    return new ResponseResult
+                    {
+                        status = 1,
+                        message = "鏈壘鍒板姛鑳界晫闈㈣缃紒"
+                    };
+                }
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.ToString());
+                return new ResponseResult
+                {
+                    status = 1,
+                    message = "鏌ヨ鍔熻兘鐣岄潰澶辫触锛�"
+                };
+            }
+        }
+
+
+        /// <summary>
+        /// 鑾峰彇鍔熻兘鐣岄潰璁剧疆鏁版嵁
+        /// </summary>
+        /// <param name="functionName">鍔熻兘鍚嶇О</param>
+        /// <returns>鍔熻兘鐣岄潰璁剧疆鏁版嵁鍒楄〃</returns>
+        private List<string> DoRfSetup(string functionName)
+        {
+            List<string> resultList = new List<string>();
+
+            try
+            {
+                // 瀹氫箟杈撳叆鍙傛暟
+                var inputParam1 = new SugarParameter("functionName", functionName);
+                var inputParam2 = new SugarParameter("deviceType", "AN");
+
+                // 瀹氫箟杈撳嚭鍙傛暟
+                var outParam = new SugarParameter("result", null, true);
+
+                // 浣跨敤SqlSugar鎵ц瀛樺偍杩囩▼
+                Db.Ado.ExecuteCommand("BEGIN Prc_rf_setup(:functionName, :deviceType, :result); END;",
+                    inputParam1, inputParam2, outParam);
+
+                // 鑾峰彇杈撳嚭鍙傛暟鐨勫��
+                string result = outParam.Value == DBNull.Value ? string.Empty : (string)outParam.Value;
+
+                // 娣诲姞鍒扮粨鏋滃垪琛�
+                if (!string.IsNullOrEmpty(result))
+                {
+                    resultList.Add(result);
+                }
+            }
+            catch (Exception ex)
+            {
+                // 璁板綍寮傚父
+                Console.WriteLine($"鑾峰彇鍔熻兘鐣岄潰璁剧疆澶辫触: {ex.Message}");
+                // 鍙互閫夋嫨鎶涘嚭寮傚父鎴栬繑鍥炵┖鍒楄〃
+            }
+
+            return resultList;
+        }
+
+
+
+        public ResponseResult GetExcProc(string functionName, string fileName, string pmachtype, string fileValue, string outFiles)
+        {
+            try
+            {
+                List<string> resultList = DoExcProc(functionName, fileName, pmachtype, fileValue);
+                Console.WriteLine(string.Join(", ", resultList));
+
+                if (resultList.Count > 0)
+                {
+                    string s = resultList[0];
+                    string[] strs = s.Split('[');
+
+                    if (strs.Length < 1)
+                    {
+                        return new ResponseResult
+                        {
+                            status = 1,
+                            message = "杩斿洖鍊肩殑鏍煎紡涓嶆纭�!" + string.Join(", ", resultList)
+                        };
+                    }
+
+                    // 鍒ゆ柇鍙栧�兼槸鍚︽垚鍔�
+                    string str = strs[0];
+                    if (str.Equals("002"))
+                    {
+                        return new ResponseResult
+                        {
+                            status = 1,
+                            message = strs[1]
+                        };
+                    }
+                    else
+                    {
+                        if (string.IsNullOrEmpty(outFiles))
+                        {
+                            if (strs.Length < 2)
+                            {
+                                return new ResponseResult
+                                {
+                                    status = 0,
+                                    data = ""
+                                };
+                            }
+                            return new ResponseResult
+                            {
+                                status = 0,
+                                data = strs[1]
+                            };
+                        }
+                        else
+                        {
+                            List<string[]> at = new List<string[]>();
+                            // [001[4500108372,80000123,100,鐗╂枡80000123浠婃棩宸叉敹璐� 100]
+                            string[] files = outFiles.Split(',');
+                            string[] res = strs[1].Split(new char[] { ',' }, StringSplitOptions.None);
+
+                            for (int i = 0; i < files.Length; i++)
+                            {
+                                string[] temp = new string[2];
+                                temp[0] = files[i];
+                                temp[1] = res[i];
+                                at.Add(temp);
+                            }
+
+                            return new ResponseResult
+                            {
+                                status = 0,
+                                data = at
+                            };
+                        }
+                    }
+                }
+
+                return new ResponseResult
+                {
+                    status = 0,
+                    data = resultList
+                };
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.ToString());
+                return new ResponseResult
+                {
+                    status = 1,
+                    message = "鎵ц瀛樺偍杩囩▼澶辫触锛�" + ex.Message
+                };
+            }
+        }
+
+
+        /// <summary>
+        /// 鎵ц瀛樺偍杩囩▼
+        /// </summary>
+        /// <param name="functionName">鍔熻兘鍚嶇О</param>
+        /// <param name="fileName">瀛楁鍚�</param>
+        /// <param name="pmachtype">璁惧绫诲瀷</param>
+        /// <param name="fileValue">鍙傛暟鍊�</param>
+        /// <returns>瀛樺偍杩囩▼鎵ц缁撴灉</returns>
+        private List<string> DoExcProc(string functionName, string fileName, string pmachtype, string fileValue)
+        {
+            List<string> resultList = new List<string>();
+
+            try
+            {
+                // 瀹氫箟杈撳叆鍙傛暟
+                var inputParam1 = new SugarParameter("functionName", functionName);
+                var inputParam2 = new SugarParameter("fileName", fileName?.Trim());
+                var inputParam3 = new SugarParameter("pmachtype", "AN"); // 璁惧绫诲瀷 wince5,wmb5,wmb6
+                var inputParam4 = new SugarParameter("fileValue", fileValue); // 鍙傛暟鍊糩绗竴浣嶆槸鐢ㄦ埛]
+
+                // 瀹氫箟杈撳嚭鍙傛暟
+                var outParam = new SugarParameter("result", null, true);
+
+                // 浣跨敤SqlSugar鎵ц瀛樺偍杩囩▼
+                Db.Ado.ExecuteCommand("BEGIN Prc_rf_setup_ExcProc(:functionName, :fileName, :pmachtype, :fileValue, :result); END;",
+                    inputParam1, inputParam2, inputParam3, inputParam4, outParam);
+
+                // 鑾峰彇杈撳嚭鍙傛暟鐨勫��
+                string result = outParam.Value == DBNull.Value ? string.Empty : (string)outParam.Value;
+
+                // 娣诲姞鍒扮粨鏋滃垪琛�
+                if (!string.IsNullOrEmpty(result))
+                {
+                    resultList.Add(result);
+                }
+            }
+            catch (Exception ex)
+            {
+                // 璁板綍寮傚父
+                Console.WriteLine($"鎵ц瀛樺偍杩囩▼澶辫触: {ex.Message}");
+                // 鍙互閫夋嫨鎶涘嚭寮傚父鎴栬繑鍥炵┖鍒楄〃
+            }
+
+            return resultList;
+        }
+
+    }
+}
diff --git a/MESApplication/Controllers/Base/UpdateController.cs b/MESApplication/Controllers/Base/UpdateController.cs
new file mode 100644
index 0000000..9290acf
--- /dev/null
+++ b/MESApplication/Controllers/Base/UpdateController.cs
@@ -0,0 +1,80 @@
+锘縰sing System.Dynamic;
+using MES.Service.Dto.@base;
+using MES.Service.service;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json.Linq;
+
+namespace MESApplication.Controllers.Base;
+
+[ApiController]
+[Route("api/[controller]")]
+public class UpdateController : ControllerBase
+{
+    [HttpPost]
+    [Route("checkUpdate")]
+    public ResponseResult CheckUpdate([FromBody] UpdateCheckRequest request)
+    {
+        try
+        {
+            // 浠庨厤缃枃浠舵垨鏁版嵁搴撹幏鍙栨渶鏂扮増鏈俊鎭�
+            var latestVersion = GetLatestVersion(request.platform);
+
+            // 姣旇緝鐗堟湰鍙�
+            if (CompareVersion(request.version, latestVersion.Version) < 0)
+            {
+                // 闇�瑕佹洿鏂�
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "鍙戠幇鏂扮増鏈�",
+                    data = new
+                    {
+                        hasUpdate = true,
+                        version = latestVersion.Version,
+                        updateInfo = latestVersion.UpdateInfo,
+                        wgtUrl = latestVersion.WgtUrl,
+                        isForceUpdate = latestVersion.IsForceUpdate
+                    }
+                };
+            }
+            else
+            {
+                // 涓嶉渶瑕佹洿鏂�
+                return new ResponseResult
+                {
+                    status = 0,
+                    message = "褰撳墠宸叉槸鏈�鏂扮増鏈�",
+                    data = new { hasUpdate = false }
+                };
+            }
+        }
+        catch (Exception ex)
+        {
+            return ResponseResult.ResponseError(ex);
+        }
+    }
+
+    // 鑾峰彇鏈�鏂扮増鏈俊鎭�
+    public VersionInfo GetLatestVersion(string platform)
+    {
+        // 杩欓噷鍙互浠庢暟鎹簱鎴栭厤缃枃浠朵腑璇诲彇
+        // 绀轰緥涓洿鎺ヨ繑鍥炵‖缂栫爜鐨勭増鏈俊鎭�
+        return new VersionInfo
+        {
+            Version = "1.0.1",
+            UpdateInfo = "1. 淇浜嗕竴浜涘凡鐭ラ棶棰榎n2. 浼樺寲浜嗙敤鎴蜂綋楠孿n3. 鏂板浜嗕竴浜涘姛鑳�",
+            WgtUrl = "https://192.168.1.223:8085/updates/app_update_1.0.1.wgt",
+            IsForceUpdate = false
+        };
+    }
+
+    // 姣旇緝鐗堟湰鍙�
+    private int CompareVersion(string version1, string version2)
+    {
+        var v1 = new Version(version1);
+        var v2 = new Version(version2);
+        return v1.CompareTo(v2);
+    }
+}
+
diff --git a/MESApplication/Controllers/BasicData/ModulesController.cs b/MESApplication/Controllers/BasicData/ModulesController.cs
new file mode 100644
index 0000000..cc10287
--- /dev/null
+++ b/MESApplication/Controllers/BasicData/ModulesController.cs
@@ -0,0 +1,132 @@
+锘�
+using System.Dynamic;
+using System.Net;
+using MES.Service.Dto.service;
+using MES.Service.Modes;
+using MES.Service.service;
+using MES.Service.util;
+using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json.Linq;
+
+
+
+namespace MESApplication.Controllers.BasicData;
+
+    
+    [Route("api/[controller]")]
+    [ApiController]
+    public class ModulesController : ControllerBase
+    {
+        private readonly SysUserService _sysUserService = new SysUserService();
+
+        /// <summary>
+        /// 鏌ヨ鏉冮檺
+        /// </summary>
+        /// <param name="userno">鐢ㄦ埛Id</param>
+        /// <returns>鏉冮檺淇℃伅</returns>
+        [HttpPost("queryPurview")]
+        public ResponseResult QueryPurview([FromBody] JObject data)
+        {
+            var userno = data["userno"]?.ToString();
+            try
+            {
+                List<UserPermission> userForBase = _sysUserService.QueryPurview(userno);
+
+                if (userForBase.Count == 0)
+                {
+                    return new ResponseResult
+                    {
+                        status = 1,
+                        message = "鏉冮檺涓嶅瓨鍦紒"
+                    };
+                }
+                else
+                {
+                    dynamic resultInfos = new ExpandoObject();
+                    resultInfos.tbBillList = userForBase;
+
+                    return new ResponseResult
+                    {
+                        status = 0,
+                        message = "鏌ヨ鏉冮檺鎴愬姛锛�",
+                        data = resultInfos
+                    };
+                }
+            }
+            catch (Exception ex)
+            {
+                Console.WriteLine(ex.ToString());
+                return new ResponseResult
+                {
+                    status = 1,
+                    message = "鏌ヨ鏉冮檺澶辫触锛�"
+                };
+            }
+        }
+
+
+            /// <summary>
+            /// 鍔熻兘鐣岄潰
+            /// </summary>
+            /// <param name="functionName">鏂规硶鍚嶇О</param>
+            /// <returns>鍔熻兘鐣岄潰淇℃伅</returns>
+            [HttpPost("getRfSetup")]
+            public ResponseResult GetRfSetup([FromBody] JObject data)
+            {
+
+              var functionName = data["functionName"]?.ToString();
+            try
+                {
+                    Console.WriteLine(functionName);
+                    string decodedFunctionName = WebUtility.UrlDecode(functionName);
+                    return _sysUserService.GetRfSetup(functionName);
+                }
+                catch (Exception ex)
+                {
+                    Console.WriteLine(ex.ToString());
+                    return new ResponseResult
+                    {
+                        status = 1,
+                        message = "鏌ヨ鍔熻兘鐣岄潰澶辫触锛�"
+                    };
+                }
+            }
+
+
+
+
+            /// <summary>
+            /// 鍔熻兘鎵ц瀛樺偍杩囩▼
+            /// </summary>
+            /// <param name="data">璇锋眰鍙傛暟</param>
+            /// <returns>API鍝嶅簲缁撴灉</returns>
+            [HttpPost("getExcProc")]
+            public ResponseResult GetExcProc([FromBody] JObject data)
+            {
+                var functionName = data["functionName"]?.ToString();
+                var fileName = data["fileName"]?.ToString();
+                var pmachtype = data["pmachtype"]?.ToString();
+                var fileValue = data["fileValue"]?.ToString();
+                var outFiles = data["outFiles"]?.ToString();
+
+                try
+                {
+                    Console.WriteLine(functionName);
+                    string decodedFunctionName = WebUtility.UrlDecode(functionName);
+                    return _sysUserService.GetExcProc(decodedFunctionName, fileName, pmachtype, fileValue, outFiles);
+                }
+                catch (Exception ex)
+                {
+                    Console.WriteLine(ex.ToString());
+                    return new ResponseResult
+                    {
+                        status = 1,
+                        message = "鏌ヨ鍔熻兘鐣岄潰澶辫触锛�"
+                    };
+                }
+            }
+
+}
+
+
+    
diff --git a/MESApplication/Properties/launchSettings.json b/MESApplication/Properties/launchSettings.json
index b1c68c4..116b55b 100644
--- a/MESApplication/Properties/launchSettings.json
+++ b/MESApplication/Properties/launchSettings.json
@@ -25,7 +25,7 @@
     "windowsAuthentication": false,
     "anonymousAuthentication": true,
     "iisExpress": {
-      "applicationUrl": "http://192.168.1.164:10054",
+      "applicationUrl": "http://localhost:10054",
       "sslPort": 0
     }
   }
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll
index 0e54cb2..32dfbf5 100644
--- a/MESApplication/bin/Debug/net8.0/MES.Service.dll
+++ b/MESApplication/bin/Debug/net8.0/MES.Service.dll
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.pdb b/MESApplication/bin/Debug/net8.0/MES.Service.pdb
index a090e7f..996f0a4 100644
--- a/MESApplication/bin/Debug/net8.0/MES.Service.pdb
+++ b/MESApplication/bin/Debug/net8.0/MES.Service.pdb
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.dll b/MESApplication/bin/Debug/net8.0/MESApplication.dll
index 3f63ff0..661da81 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.dll
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.dll
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.exe b/MESApplication/bin/Debug/net8.0/MESApplication.exe
index 8baae59..689dc15 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.exe
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.exe
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.pdb b/MESApplication/bin/Debug/net8.0/MESApplication.pdb
index 8cbcfab..6228cea 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.pdb
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.pdb
Binary files differ
diff --git a/MESApplication/bin/Debug/net8.0/MESApplication.xml b/MESApplication/bin/Debug/net8.0/MESApplication.xml
index 0696b68..7118a8e 100644
--- a/MESApplication/bin/Debug/net8.0/MESApplication.xml
+++ b/MESApplication/bin/Debug/net8.0/MESApplication.xml
@@ -498,6 +498,27 @@
             </summary>
             <returns></returns>
         </member>
+        <member name="M:MESApplication.Controllers.BasicData.ModulesController.QueryPurview(Newtonsoft.Json.Linq.JObject)">
+            <summary>
+            鏌ヨ鏉冮檺
+            </summary>
+            <param name="userno">鐢ㄦ埛Id</param>
+            <returns>鏉冮檺淇℃伅</returns>
+        </member>
+        <member name="M:MESApplication.Controllers.BasicData.ModulesController.GetRfSetup(Newtonsoft.Json.Linq.JObject)">
+            <summary>
+            鍔熻兘鐣岄潰
+            </summary>
+            <param name="functionName">鏂规硶鍚嶇О</param>
+            <returns>鍔熻兘鐣岄潰淇℃伅</returns>
+        </member>
+        <member name="M:MESApplication.Controllers.BasicData.ModulesController.GetExcProc(Newtonsoft.Json.Linq.JObject)">
+            <summary>
+            鍔熻兘鎵ц瀛樺偍杩囩▼
+            </summary>
+            <param name="data">璇锋眰鍙傛暟</param>
+            <returns>API鍝嶅簲缁撴灉</returns>
+        </member>
         <member name="M:MESApplication.Controllers.BasicData.SalesOrderController.GetList">
             <summary>
                 鑾峰彇鎵�鏈�

--
Gitblit v1.9.3