chenhaozhe
2 天以前 2f19dbfe2d75abdd583f2ecc1b5d03cc4f3be968
新增 工作联系表 分页查询 接口
新增 WebSocket 服务端
7个文件已添加
22个文件已修改
455 ■■■■■ 已修改文件
APSM/APSM.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
APSM/app.config 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
Kanban/Kanban.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Kanban/app.config 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MES/app.config 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Model/obj/Release/Model.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
NETERPNoWin/app.config 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
SelM/SelM.csproj 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SelM/app.config 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WarM/app.config 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/Sc_ProcessMangementController.cs 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Global.asax.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebAPI.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/WebSocketServer.cs 179 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/packages.config 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WorkM/WorkM.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WorkM/app.config 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/bin/Debug/TopSdk.dll 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.AssemblyReference.cache 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.dll 补丁 | 查看 | 原始文档 | blame | 历史
sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb 补丁 | 查看 | 原始文档 | blame | 历史
APSM/APSM.csproj
@@ -685,6 +685,9 @@
  <ItemGroup>
    <Folder Include="月度评审\" />
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
APSM/app.config
New file
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.3.2.10" newVersion="1.3.2.10" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
DBUtility/obj/Release/DBUtility.csproj.AssemblyReference.cache
Binary files differ
Kanban/Kanban.csproj
@@ -514,6 +514,9 @@
      <Install>false</Install>
    </BootstrapperPackage>
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
Kanban/app.config
New file
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.3.2.10" newVersion="1.3.2.10" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
MES/app.config
@@ -1,3 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
Model/obj/Release/Model.csproj.AssemblyReference.cache
Binary files differ
NETERPNoWin/app.config
@@ -1,3 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.3.2.10" newVersion="1.3.2.10" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
SQLHelper/obj/Release/SQLHelper.csproj.AssemblyReference.cache
Binary files differ
SelM/SelM.csproj
@@ -621,6 +621,9 @@
      <Name>WorkM</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
SelM/app.config
New file
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.AssemblyReference.cache
Binary files differ
SyntacticSugar/obj/Debug/SyntacticSugar.csproj.FileListAbsolute.txt
@@ -35,3 +35,4 @@
D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.CoreCompileInputs.cache
D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.dll
D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.pdb
D:\WorkBench\MES-WEB-API\SyntacticSugar\obj\Debug\SyntacticSugar.csproj.AssemblyReference.cache
WarM/app.config
@@ -1,5 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
    </configSections>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /></startup>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
WebAPI/Controllers/SCGL/Sc_MESTransFerWorkBillController.cs
@@ -6591,6 +6591,69 @@
        }
        #endregion
        #region 工作联系单列表 分页
        [Route("Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListPage")]
        [HttpGet]
        public object GetOA_WorkLinkBillListPage(string sWhere, string user, int page, int size)
        {
            try
            {
                List<object> columnNameList = new List<object>();
                //查看权限
                if (!DBUtility.ClsPub.Security_Log("OA_WorkLinkBillList", 1, false, user))
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "无查看权限!";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                if (sWhere == null || sWhere.Equals(""))
                {
                    string sql = $@"
                    select count(1) count from h_v_OA_WorkLinkBillAllList
                    select * from h_v_OA_WorkLinkBillAllList order by 单据号 desc
                    offset {(page - 1) * size} rows fetch next {size} rows only";
                    ds = oCN.RunProcReturn(sql, "h_v_OA_WorkLinkBillAllList");
                }
                else
                {
                    string sql1 = $@"
                         select count(1) count from h_v_OA_WorkLinkBillAllList where 1 = 1 {sWhere}
                        select * from h_v_OA_WorkLinkBillAllList where 1 = 1
                        {sWhere} order by 单据号 desc
                        offset {(page - 1) * size} rows fetch next {size} rows only";
                    ds = oCN.RunProcReturn(sql1, "h_v_OA_WorkLinkBillAllList");
                }
                //添加列名
                foreach (DataColumn col in ds.Tables[1].Columns)
                {
                    Type dataType = col.DataType;
                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//获取到DataColumn列对象的列名
                }
                objJsonResult.code = "1";
                objJsonResult.count = int.Parse(ds.Tables[0].Rows[0]["count"].ToString());
                objJsonResult.Message = "Sucess!";
                objJsonResult.data = ds.Tables[1];
                objJsonResult.list = columnNameList;
                return objJsonResult;
            }
            catch (Exception ex)
            {
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "查询数据异常,请与管理员联系!" + ex.ToString();
                objJsonResult.data = null;
                return objJsonResult;
            }
        }
        #endregion
        #region 工作联系单编辑获取数据
        [Route("Sc_MESTransFerWorkBill/GetOA_WorkLinkBillListCheckDetai")]
        [HttpGet]
WebAPI/Controllers/Sc_ProcessMangementController.cs
@@ -1708,8 +1708,8 @@
                    return objJsonResult;
                }
                //if (oSystemParameter.omodel.WMS_CampanyName == "锦隆")
                //{
                if (oSystemParameter.omodel.WMS_CampanyName == "锦隆")
                {
                    string sql = @"select a.FID,a.FNUMBER Employee,d.FNUMBER Dept from Gy_Employee e
                             join JL20250716203240..T_HR_EMPINFO a on e.HNumber = a.FNUMBER
                             join JL20250716203240..T_BD_STAFFTEMP c on c.FID = a.FID
@@ -1726,7 +1726,7 @@
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                //}
                }
                
@@ -1738,10 +1738,10 @@
                model.Add("FSourceOrgId", new JObject() { ["Fnumber"] = HZJOrgNumber.ToString() }); //来源组织
                                                                                                    //model.Add("FInspectDepId", new JObject() { ["Fnumber"] = ds.Tables[0].Rows[0]["Dept"].ToString() }); //质检部门
                //if (oSystemParameter.omodel.WMS_CampanyName == "锦隆")
                //{
                if (oSystemParameter.omodel.WMS_CampanyName == "锦隆")
                {
                    model.Add("FInspectorId", new JObject() { ["Fnumber"] = ds.Tables[0].Rows[0]["Employee"].ToString() }); //质检员
                //}
                }
                model.Add("FISSYNCED", "false");//  是否已同步
                model.Add("F_PGKJ_Date", DateTime.Now.ToString("yyyy-MM-dd"));//  报检日期
                model.Add("FBillNo", HBillNo);
WebAPI/Global.asax.cs
@@ -4,14 +4,22 @@
using System.Web;
using System.Web.Http;
using System.Web.Routing;
using WebApiWithFleck;
namespace WebAPI
{
    public class WebApiApplication : System.Web.HttpApplication
    {
        protected void Application_Start()
        {
            // webSocket 服务
            WebSocketServer.Start();
            GlobalConfiguration.Configure(WebApiConfig.Register);
        }
        // 应用关闭时,停止服务,防止泄露
        protected void Application_End()
        {
            WebSocketServer.Stop();
        }
    }
}
WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user
@@ -4,7 +4,7 @@
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <History>True|2026-01-09T08:36:44.2830874Z;True|2026-01-09T16:21:05.9871545+08:00;True|2026-01-09T14:55:34.0836897+08:00;True|2026-01-09T14:42:10.5351820+08:00;True|2026-01-09T13:40:39.7710387+08:00;True|2026-01-09T13:09:07.1659040+08:00;False|2026-01-09T13:08:10.7966066+08:00;True|2026-01-07T16:57:09.8396720+08:00;True|2026-01-07T16:51:09.4832997+08:00;True|2026-01-07T08:33:25.1699359+08:00;False|2026-01-07T08:32:42.2399276+08:00;True|2026-01-06T15:42:14.9929597+08:00;False|2026-01-06T15:41:13.0031526+08:00;True|2026-01-05T23:26:15.9058534+08:00;True|2026-01-05T23:10:09.2125130+08:00;True|2026-01-05T23:05:18.2406265+08:00;False|2026-01-05T23:04:03.0504675+08:00;</History>
    <History>True|2026-01-15T03:20:50.6475092Z;False|2026-01-15T11:19:59.7534646+08:00;True|2026-01-14T20:41:43.9883379+08:00;True|2026-01-14T20:22:48.8565101+08:00;True|2026-01-14T20:15:24.3086903+08:00;True|2026-01-14T20:02:51.1449573+08:00;True|2026-01-14T19:34:17.2207757+08:00;False|2026-01-14T19:33:23.4483176+08:00;True|2026-01-14T16:38:20.3556540+08:00;True|2026-01-14T16:00:52.4103661+08:00;True|2026-01-14T15:51:38.7850563+08:00;True|2026-01-14T15:39:44.6043907+08:00;True|2026-01-14T15:35:57.0927454+08:00;True|2026-01-14T15:21:50.6267386+08:00;True|2026-01-14T15:16:50.0467191+08:00;True|2026-01-14T15:07:50.8883990+08:00;True|2026-01-14T15:06:48.4113380+08:00;True|2026-01-14T14:56:38.9951358+08:00;True|2026-01-14T14:47:54.1709715+08:00;False|2026-01-14T14:47:18.6643968+08:00;True|2026-01-14T14:23:04.8458680+08:00;True|2026-01-14T12:46:17.8939526+08:00;True|2026-01-14T12:36:52.1574055+08:00;True|2026-01-14T11:09:25.0136169+08:00;False|2026-01-14T11:09:01.8893030+08:00;True|2026-01-14T10:17:49.2308483+08:00;False|2026-01-14T10:16:58.1687159+08:00;True|2026-01-13T16:45:58.5516225+08:00;True|2026-01-13T16:39:21.8005878+08:00;True|2026-01-13T16:33:54.0530482+08:00;True|2026-01-13T16:24:44.8972702+08:00;True|2026-01-13T16:21:20.7807839+08:00;True|2026-01-13T16:13:51.1240658+08:00;True|2026-01-13T16:07:20.6737800+08:00;True|2026-01-13T15:58:46.9059892+08:00;True|2026-01-13T15:49:02.1873905+08:00;True|2026-01-13T15:43:26.5884945+08:00;False|2026-01-13T15:42:53.4426774+08:00;True|2026-01-09T16:36:44.2830874+08:00;True|2026-01-09T16:21:05.9871545+08:00;True|2026-01-09T14:55:34.0836897+08:00;True|2026-01-09T14:42:10.5351820+08:00;True|2026-01-09T13:40:39.7710387+08:00;True|2026-01-09T13:09:07.1659040+08:00;False|2026-01-09T13:08:10.7966066+08:00;True|2026-01-07T16:57:09.8396720+08:00;True|2026-01-07T16:51:09.4832997+08:00;True|2026-01-07T08:33:25.1699359+08:00;False|2026-01-07T08:32:42.2399276+08:00;True|2026-01-06T15:42:14.9929597+08:00;False|2026-01-06T15:41:13.0031526+08:00;True|2026-01-05T23:26:15.9058534+08:00;True|2026-01-05T23:10:09.2125130+08:00;True|2026-01-05T23:05:18.2406265+08:00;False|2026-01-05T23:04:03.0504675+08:00;</History>
    <_PublishTargetUrl>D:\网站发布\智云MESWMS\API</_PublishTargetUrl>
  </PropertyGroup>
  <ItemGroup>
@@ -67,6 +67,9 @@
    </File>
    <File Include="bin/DBUtility.pdb">
      <publishTime>01/05/2026 23:04:18</publishTime>
    </File>
    <File Include="bin/Fleck.dll">
      <publishTime>04/22/2021 11:48:12</publishTime>
    </File>
    <File Include="bin/Grpc.Core.Api.dll">
      <publishTime>03/22/2022 13:17:26</publishTime>
@@ -294,13 +297,13 @@
      <publishTime>11/24/2014 19:18:48</publishTime>
    </File>
    <File Include="bin/WebAPI.dll">
      <publishTime>01/09/2026 16:36:34</publishTime>
      <publishTime>01/15/2026 11:20:26</publishTime>
    </File>
    <File Include="bin/WebAPI.pdb">
      <publishTime>01/09/2026 16:36:34</publishTime>
      <publishTime>01/15/2026 11:20:26</publishTime>
    </File>
    <File Include="bin/WebAPI.XmlSerializers.dll">
      <publishTime>01/09/2026 16:36:42</publishTime>
      <publishTime>01/15/2026 11:20:48</publishTime>
    </File>
    <File Include="bin/WebGrease.dll">
      <publishTime>07/18/2013 01:03:52</publishTime>
@@ -390,7 +393,7 @@
      <publishTime>04/21/2025 11:46:16</publishTime>
    </File>
    <File Include="packages.config">
      <publishTime>12/29/2025 09:02:47</publishTime>
      <publishTime>01/13/2026 15:38:16</publishTime>
    </File>
    <File Include="Properties/PublishProfiles/JFAPI.pubxml.user">
      <publishTime>12/07/2025 12:01:10</publishTime>
@@ -504,7 +507,7 @@
      <publishTime>04/21/2025 11:46:17</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>01/05/2026 23:05:15</publishTime>
      <publishTime>01/13/2026 15:43:26</publishTime>
    </File>
  </ItemGroup>
</Project>
WebAPI/WebAPI.csproj
@@ -84,6 +84,9 @@
    <Reference Include="Dapper, Version=1.50.2.0, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\packages\Dapper.1.50.2\lib\net45\Dapper.dll</HintPath>
    </Reference>
    <Reference Include="Fleck, Version=1.2.0.0, Culture=neutral, processorArchitecture=MSIL">
      <HintPath>..\packages\Fleck.1.2.0\lib\net45\Fleck.dll</HintPath>
    </Reference>
    <Reference Include="Grpc.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=d754f35622e28bad, processorArchitecture=MSIL">
      <HintPath>..\packages\Grpc.Core.2.45.0\lib\net45\Grpc.Core.dll</HintPath>
    </Reference>
@@ -1222,6 +1225,7 @@
      <DependentUpon>Reference.map</DependentUpon>
    </Compile>
    <Compile Include="WebServer.cs" />
    <Compile Include="WebSocketServer.cs" />
  </ItemGroup>
  <ItemGroup>
    <Content Include="packages.config">
WebAPI/WebSocketServer.cs
New file
@@ -0,0 +1,179 @@
using Fleck;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Data;
using System.Web;
using WebAPI;
namespace WebApiWithFleck
{
    /// <summary>
    /// Fleck WebSocket 服务封装
    /// </summary>
    public static class WebSocketServer
    {
        private static List<IWebSocketConnection> _connections = new List<IWebSocketConnection>();
        private static ConcurrentDictionary<IWebSocketConnection, string> _NameConnectionDict = new ConcurrentDictionary<IWebSocketConnection, string>();
        private static Fleck.WebSocketServer _server;
        // 内置定时器(用于定时查询数据库并推送)
        private static System.Timers.Timer _pushTimer;
        // 300000
        private static readonly int _pushInterval = 10000;
        /// <summary>
        /// 启动 WebSocket 服务(监听 18080 端口)
        /// </summary>
        public static void Start()
        {
            // 配置 WebSocket 监听地址(独立端口 8089)
            var wsUrl = "ws://0.0.0.0:8089/ws"; // 0.0.0.0 允许外部访问
            _server = new Fleck.WebSocketServer(wsUrl);
            _pushTimer = new System.Timers.Timer(_pushInterval);
            _pushTimer.AutoReset = false; // 非自动重置,避免并发
            _pushTimer.Elapsed += OnTimerElapsed; // 绑定静态事件
            // 配置 Fleck 服务
            _server.Start(connection =>
            {
                _pushTimer.Start();
                // 客户端连接建立时
                connection.OnOpen = () =>
                {
                    string userId = "";
                    string userName = "";
                    // 获取参数
                    string path = connection.ConnectionInfo.Path;
                    Uri dummyUri = new Uri($"http://localhost{path}");
                    var queryParams = HttpUtility.ParseQueryString(dummyUri.Query);
                    userId = queryParams["userId"];
                    userName = queryParams["userName"];
                    LogService.Write($"WebSocket 客户端连接:{userId}_{userName}-{connection.ConnectionInfo.ClientIpAddress}");
                    _connections.Add(connection); // 保存连接
                    _NameConnectionDict[connection] =  $@"{userId}_{userName}";
                };
                // 收到客户端消息时
                connection.OnMessage = message =>
                {
                    Console.WriteLine($"收到消息:{message}");
                    // TODO 心跳信号
                };
                // 客户端断开连接时
                connection.OnClose = () =>
                {
                    LogService.Write($"WebSocket 客户端断开:{connection.ConnectionInfo.ClientIpAddress}");
                    string success = "";
                    // 移除连接
                    _NameConnectionDict.TryRemove(connection,out success);
                    // _connections.Remove(connection);
                };
                // 连接出错时
                connection.OnError = ex =>
                {
                    string success = "";
                    LogService.Write($"WebSocket 错误:{ex.Message}");
                    _NameConnectionDict.TryRemove(connection, out success);
                };
            });
            LogService.Write($"Fleck WebSocket 服务已启动,监听:{wsUrl}");
        }
        /// <summary>
        /// 停止 WebSocket 服务
        /// </summary>
        public static void Stop()
        {
            _server?.Dispose();
            _pushTimer?.Stop();
            Console.WriteLine("Fleck WebSocket 服务已停止");
        }
        /// <summary>
        /// 静态定时器触发事件
        /// </summary>
        private static void OnTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
        {
            SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
            DataSet ds = new DataSet();
            try
            {
                JObject NameMsgKVP = new JObject();
                // 获取数据库中未被读取的数据
                ds = oCN.RunProcReturn("select * from h_v_OA_WorkLinkBillAllList where 单据状态 = '已审核' and 阅读状态 = '未阅'", "h_v_OA_WorkLinkBillAllList");
                // 判断广播还是私发 ,统计数据
                JArray dataTableJArray = JArray.Parse(JsonConvert.SerializeObject(ds.Tables[0]));
                foreach (JToken row in dataTableJArray)
                {
                    // 提前获取并处理行数据(避免重复访问 row["列名"],且处理 null)
                    string receiver = row["接收人"]?.ToString() ?? string.Empty; // 为 null 时返回空字符串
                    string ccUsers = row["所有抄送人"]?.ToString() ?? string.Empty;
                    string sendType = row["发送类型"]?.ToString() ?? string.Empty;
                    // 跳过无效数据行(三列均为空时,无需处理)
                    if (string.IsNullOrEmpty(receiver) && string.IsNullOrEmpty(ccUsers) && string.IsNullOrEmpty(sendType))
                        continue;
                    foreach (var dictOne in _NameConnectionDict)
                    {
                        string UName = dictOne.Value.Split('_')[1];
                        // 将接收人 抄送人 获取 广播的消息添加到消息缓存
                        if (string.Equals(row["接收人"].ToString(), UName)
                            || row["所有抄送人"].ToString().Contains(UName)
                            || string.Equals(row["发送类型"].ToString(), "公共"))
                        {
                            string dictOneVal = dictOne.Value.ToString();
                            if (NameMsgKVP[dictOneVal] == null)
                            {
                                NameMsgKVP[dictOneVal] = new JArray();
                            }
                            var jArray = NameMsgKVP[dictOneVal] as JArray;
                            jArray.Add(row);
                        }
                    }
                }
                // 根据用户ID分发到不同的客户端
                foreach (var dictOne in _NameConnectionDict)
                {
                    if(NameMsgKVP[dictOne.Value.ToString()] != null)
                    {
                        // 封装 websocket 信息
                        dictOne.Key.Send(new JObject{
                            ["Type"]="Message",
                            ["Content"]= NameMsgKVP[dictOne.Value.ToString()].ToString()
                        }.ToString());
                    }
                }
                LogService.Write("消息推送完成...");
            }
            catch (Exception ex)
            {
                LogService.Write(ex.ToString());
                return;
            }
            finally
            {
                // 静态定时器手动重启
                if (_pushTimer != null && !_pushTimer.Enabled)
                {
                    _pushTimer.Start();
                }
            }
        }
    }
}
WebAPI/packages.config
@@ -12,6 +12,7 @@
  <package id="Antlr" version="3.4.1.9004" targetFramework="net45" />
  <package id="bootstrap" version="3.0.0" targetFramework="net45" />
  <package id="Dapper" version="1.50.2" targetFramework="net45" />
  <package id="Fleck" version="1.2.0" targetFramework="net45" />
  <package id="Grpc.Core" version="2.45.0" targetFramework="net45" />
  <package id="Grpc.Core.Api" version="2.45.0" targetFramework="net45" />
  <package id="jQuery" version="1.10.2" targetFramework="net45" />
WorkM/WorkM.csproj
@@ -1462,6 +1462,7 @@
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="app.config" />
    <None Include="packages.config" />
  </ItemGroup>
  <ItemGroup>
WorkM/app.config
New file
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="ICSharpCode.SharpZipLib" publicKeyToken="1b03e6acf1164f73" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.3.2.10" newVersion="1.3.2.10" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Net.Http.Formatting" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Http" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.2.7.0" newVersion="5.2.7.0" />
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="WebGrease" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>
sdk_dingding/TopSdk/bin/Debug/TopSdk.dll
Binary files differ
sdk_dingding/TopSdk/bin/Debug/TopSdk.pdb
Binary files differ
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.AssemblyReference.cache
Binary files differ
sdk_dingding/TopSdk/obj/Debug/TopSdk.csproj.FileListAbsolute.txt
@@ -9,3 +9,4 @@
D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.CoreCompileInputs.cache
D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.dll
D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.pdb
D:\WorkBench\MES-WEB-API\sdk_dingding\TopSdk\obj\Debug\TopSdk.csproj.AssemblyReference.cache
sdk_dingding/TopSdk/obj/Debug/TopSdk.dll
Binary files differ
sdk_dingding/TopSdk/obj/Debug/TopSdk.pdb
Binary files differ