schangxiang@126.com
2025-09-02 6bd89520e09dc1c2d3fab72a80c3d01f2df93490
2222
已添加1个文件
已修改9个文件
347 ■■■■■ 文件已修改
sql/DBScript/01_DDL/03_DDL_VIEW_YunNeiDongLi.sql 40 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/ExtendFunction/SystemWarningMsg.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/Form1.Designer.cs 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/Form1.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/ORM/dbmodel.cs 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/ORM/v_srmStockdetails.cs 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/ThreadTask/mesStockDataForRealMes.cs 72 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/log4net_iWare -编辑版.config 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/log4net_iWare.config 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wcs/yunneiWCS/yunneiWCS/yunneiWCS.csproj 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sql/DBScript/01_DDL/03_DDL_VIEW_YunNeiDongLi.sql
@@ -90,17 +90,13 @@
GO
 /**
 ** ç«‹ä½“库库存
 **/
IF EXISTS(SELECT 1 FROM sys.views WHERE name='v_srmStock')
   DROP VIEW v_srmStock
IF EXISTS(SELECT 1 FROM sys.views WHERE name='VproductStock')
   DROP VIEW VproductStock
GO 
CREATE VIEW v_srmStock
CREATE VIEW VproductStock
AS
SELECT   dbo.productStock.stockId, dbo.position.positionName, dbo.position.isLock, dbo.position.isfree, 
@@ -108,38 +104,44 @@
                dbo.productStock.status, dbo.productStock.createTime, dbo.productStock.updateTime, dbo.position.enable, 
                dbo.productStock.positionId, dbo.productStock.materialId, dbo.productStock.productCode, 
                dbo.productStock.containerCode, dbo.position.positionType, dbo.productStock.supplier, dbo.material.version
FROM      dbo.position LEFT  JOIN
                dbo.productStock ON dbo.position.positionId = dbo.productStock.positionId LEFT JOIN
FROM      dbo.position INNER JOIN
                dbo.productStock ON dbo.position.positionId = dbo.productStock.positionId INNER JOIN
                dbo.material ON dbo.productStock.materialId = dbo.material.materialId
   WHERE [position].row=1 OR  [position].row=2
   
GO
/**
 ** ç«‹ä½“库库存明细(精确到流水号)
 ** ç«‹ä½“库库存明细(精确到流水号) [Editby shaocx,2025-09-02]
 **/
IF EXISTS(SELECT 1 FROM sys.views WHERE name='v_srmStock_details')
   DROP VIEW v_srmStock_details
IF EXISTS(SELECT 1 FROM sys.views WHERE name='v_srmStockdetails')
   DROP VIEW v_srmStockdetails
GO 
CREATE VIEW v_srmStock_details
CREATE VIEW v_srmStockdetails
AS
SELECT  prodList.productName,prodList.serialNumber,
SELECT  prodList.stockListId,prodList.productName,prodList.serialNumber,
    dbo.productStock.stockId, dbo.position.positionName, dbo.position.isLock, dbo.position.isfree, 
                dbo.material.materialCode, dbo.material.materialName, dbo.productStock.quantity, dbo.productStock.taskType, 
                dbo.productStock.status, dbo.productStock.createTime, dbo.productStock.updateTime, dbo.position.enable, 
                dbo.productStock.positionId, dbo.productStock.materialId, dbo.productStock.productCode, 
                dbo.productStock.containerCode, dbo.position.positionType, dbo.productStock.supplier, dbo.material.version
FROM      dbo.position LEFT  JOIN
                dbo.productStock ON dbo.position.positionId = dbo.productStock.positionId
                LEFT JOIN productStockList as prodList on prodList.stockId=dbo.productStock.positionId
FROM      productStockList as prodList
                LEFT JOIN dbo.position on prodList.stockId=dbo.position.positionId
                LEFT  JOIN dbo.productStock ON dbo.position.positionId = dbo.productStock.positionId
                LEFT JOIN dbo.material ON dbo.productStock.materialId = dbo.material.materialId
   WHERE [position].row=1 OR  [position].row=2
    and prodList.stockListId is not null
   
wcs/yunneiWCS/yunneiWCS/ExtendFunction/SystemWarningMsg.cs
@@ -71,5 +71,8 @@
        /// MES数据推送线程消息
        /// </summary>
        public static string msg_mesDataTranfficForRealMes = "";
        public static string mesStockDataForRealMes = "";
    }
}
wcs/yunneiWCS/yunneiWCS/Form1.Designer.cs
@@ -33,6 +33,8 @@
            this.label_PLC = new System.Windows.Forms.Label();
            this.pictureBox1 = new System.Windows.Forms.PictureBox();
            this.panel1 = new System.Windows.Forms.Panel();
            this.lbl_msg_mesDataTranffic_V2 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.lbl_ClearDataMsg = new System.Windows.Forms.Label();
            this.lbl_Thread_lbl_shouEntity_Srm = new System.Windows.Forms.Label();
            this.label35 = new System.Windows.Forms.Label();
@@ -59,8 +61,8 @@
            this.label3 = new System.Windows.Forms.Label();
            this.lbl_sendTask_errMsg = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.lbl_msg_mesDataTranffic_V2 = new System.Windows.Forms.Label();
            this.lbl_msg_mesStockDataForRealMes = new System.Windows.Forms.Label();
            this.label14 = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
@@ -91,7 +93,7 @@
            this.pictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
            this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Top;
            this.pictureBox1.Location = new System.Drawing.Point(0, 0);
            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
            this.pictureBox1.Margin = new System.Windows.Forms.Padding(2);
            this.pictureBox1.Name = "pictureBox1";
            this.pictureBox1.Size = new System.Drawing.Size(782, 149);
            this.pictureBox1.TabIndex = 2;
@@ -99,6 +101,8 @@
            // 
            // panel1
            // 
            this.panel1.Controls.Add(this.lbl_msg_mesStockDataForRealMes);
            this.panel1.Controls.Add(this.label14);
            this.panel1.Controls.Add(this.lbl_msg_mesDataTranffic_V2);
            this.panel1.Controls.Add(this.label2);
            this.panel1.Controls.Add(this.lbl_ClearDataMsg);
@@ -129,10 +133,31 @@
            this.panel1.Controls.Add(this.label1);
            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panel1.Location = new System.Drawing.Point(0, 222);
            this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
            this.panel1.Margin = new System.Windows.Forms.Padding(2);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(782, 425);
            this.panel1.TabIndex = 3;
            //
            // lbl_msg_mesDataTranffic_V2
            //
            this.lbl_msg_mesDataTranffic_V2.AutoSize = true;
            this.lbl_msg_mesDataTranffic_V2.ForeColor = System.Drawing.Color.Red;
            this.lbl_msg_mesDataTranffic_V2.Location = new System.Drawing.Point(156, 365);
            this.lbl_msg_mesDataTranffic_V2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.lbl_msg_mesDataTranffic_V2.Name = "lbl_msg_mesDataTranffic_V2";
            this.lbl_msg_mesDataTranffic_V2.Size = new System.Drawing.Size(53, 12);
            this.lbl_msg_mesDataTranffic_V2.TabIndex = 27;
            this.lbl_msg_mesDataTranffic_V2.Text = "错误消息";
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(9, 365);
            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(149, 12);
            this.label2.TabIndex = 26;
            this.label2.Text = "推送给MES出入库数据(V2):";
            // 
            // lbl_ClearDataMsg
            // 
@@ -407,26 +432,26 @@
            this.label1.TabIndex = 0;
            this.label1.Text = "消费已下发的任务线程:";
            // 
            // label2
            // lbl_msg_mesStockDataForRealMes
            // 
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(9, 365);
            this.label2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(113, 12);
            this.label2.TabIndex = 26;
            this.label2.Text = "推送给MES数据(V2):";
            this.lbl_msg_mesStockDataForRealMes.AutoSize = true;
            this.lbl_msg_mesStockDataForRealMes.ForeColor = System.Drawing.Color.Red;
            this.lbl_msg_mesStockDataForRealMes.Location = new System.Drawing.Point(148, 391);
            this.lbl_msg_mesStockDataForRealMes.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.lbl_msg_mesStockDataForRealMes.Name = "lbl_msg_mesStockDataForRealMes";
            this.lbl_msg_mesStockDataForRealMes.Size = new System.Drawing.Size(53, 12);
            this.lbl_msg_mesStockDataForRealMes.TabIndex = 29;
            this.lbl_msg_mesStockDataForRealMes.Text = "错误消息";
            // 
            // lbl_msg_mesDataTranffic_V2
            // label14
            // 
            this.lbl_msg_mesDataTranffic_V2.AutoSize = true;
            this.lbl_msg_mesDataTranffic_V2.ForeColor = System.Drawing.Color.Red;
            this.lbl_msg_mesDataTranffic_V2.Location = new System.Drawing.Point(135, 365);
            this.lbl_msg_mesDataTranffic_V2.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.lbl_msg_mesDataTranffic_V2.Name = "lbl_msg_mesDataTranffic_V2";
            this.lbl_msg_mesDataTranffic_V2.Size = new System.Drawing.Size(53, 12);
            this.lbl_msg_mesDataTranffic_V2.TabIndex = 27;
            this.lbl_msg_mesDataTranffic_V2.Text = "错误消息";
            this.label14.AutoSize = true;
            this.label14.Location = new System.Drawing.Point(9, 391);
            this.label14.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
            this.label14.Name = "label14";
            this.label14.Size = new System.Drawing.Size(137, 12);
            this.label14.TabIndex = 28;
            this.label14.Text = "推送给MES库存数据(V2):";
            // 
            // Form1
            // 
@@ -441,7 +466,7 @@
            this.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
            this.Margin = new System.Windows.Forms.Padding(2);
            this.Name = "Form1";
            this.Text = "伟本智能WCS";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing);
@@ -487,6 +512,8 @@
        private System.Windows.Forms.Label label36;
        private System.Windows.Forms.Label label2;
        private System.Windows.Forms.Label lbl_msg_mesDataTranffic_V2;
        private System.Windows.Forms.Label lbl_msg_mesStockDataForRealMes;
        private System.Windows.Forms.Label label14;
    }
}
wcs/yunneiWCS/yunneiWCS/Form1.cs
@@ -142,6 +142,8 @@
            new Thread(mesDataTranfficForRealMes.Handler).Start();
            new Thread(mesStockDataForRealMes.Handler).Start();
            new Thread(RefershData).Start();
@@ -2832,6 +2834,7 @@
                    this.lbl_msg_mesDataTranffic.Text = showNowTime + SystemWarningMsg.msg_mesDataTranffic;
                    this.lbl_msg_mesDataTranffic_V2.Text = showNowTime + SystemWarningMsg.msg_mesDataTranfficForRealMes;
                    this.lbl_msg_mesStockDataForRealMes.Text = showNowTime + SystemWarningMsg.mesStockDataForRealMes;
                    this.lbl_sendTaskForPick_ErrMsg.Text = showNowTime + SystemWarningMsg.Thread_sendTaskForPick_ErrMsg;
                    this.lbl_ClearDataMsg.Text = showNowTime + SystemWarningMsg.Thread_lbl_ClearDataMsg;
wcs/yunneiWCS/yunneiWCS/ORM/dbmodel.cs
@@ -1,7 +1,4 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;
namespace yunneiWCS.ORM
{
@@ -11,7 +8,7 @@
            : base("name=dbmodel")
        {
        }
        public virtual DbSet<v_srmStockdetails> v_srmStockdetails { get; set; }
        public virtual DbSet<BasicDataSet> BasicDataSet { get; set; }
        public virtual DbSet<inStockOrder> inStockOrder { get; set; }
        public virtual DbSet<inStockOrderList> inStockOrderList { get; set; }
@@ -43,6 +40,42 @@
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<v_srmStockdetails>()
               .Property(e => e.productName)
               .IsUnicode(false);
            modelBuilder.Entity<v_srmStockdetails>()
                .Property(e => e.serialNumber)
                .IsUnicode(false);
            modelBuilder.Entity<v_srmStockdetails>()
                .Property(e => e.positionName)
                .IsUnicode(false);
            modelBuilder.Entity<v_srmStockdetails>()
                .Property(e => e.materialCode)
                .IsUnicode(false);
            modelBuilder.Entity<v_srmStockdetails>()
                .Property(e => e.materialName)
                .IsUnicode(false);
            modelBuilder.Entity<v_srmStockdetails>()
                .Property(e => e.productCode)
                .IsUnicode(false);
            modelBuilder.Entity<v_srmStockdetails>()
                .Property(e => e.containerCode)
                .IsUnicode(false);
            modelBuilder.Entity<v_srmStockdetails>()
                .Property(e => e.supplier)
                .IsUnicode(false);
            modelBuilder.Entity<v_srmStockdetails>()
                .Property(e => e.version)
                .IsUnicode(false);
            modelBuilder.Entity<BasicDataSet>()
                .Property(e => e.BasicDataType)
                .IsFixedLength()
wcs/yunneiWCS/yunneiWCS/ORM/v_srmStockdetails.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,66 @@
namespace yunneiWCS.ORM
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;
    public partial class v_srmStockdetails
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.None)]
        public long stockListId { get; set; }
        [StringLength(50)]
        public string productName { get; set; }
        [StringLength(50)]
        public string serialNumber { get; set; }
        public long? stockId { get; set; }
        [StringLength(10)]
        public string positionName { get; set; }
        public bool? isLock { get; set; }
        public bool? isfree { get; set; }
        [StringLength(50)]
        public string materialCode { get; set; }
        [StringLength(50)]
        public string materialName { get; set; }
        public int? quantity { get; set; }
        public int? taskType { get; set; }
        public int? status { get; set; }
        public DateTime? createTime { get; set; }
        public DateTime? updateTime { get; set; }
        public bool? enable { get; set; }
        public long? positionId { get; set; }
        public long? materialId { get; set; }
        [StringLength(50)]
        public string productCode { get; set; }
        [StringLength(50)]
        public string containerCode { get; set; }
        public byte? positionType { get; set; }
        [StringLength(50)]
        public string supplier { get; set; }
        [StringLength(50)]
        public string version { get; set; }
    }
}
wcs/yunneiWCS/yunneiWCS/ThreadTask/mesStockDataForRealMes.cs
@@ -24,40 +24,34 @@
            {
                try
                {
                    Thread.Sleep(5000);
                    //Log4NetHelper.WriteErrorLog(_logType, "测试啊啊啊啊 ");
                    //Log4NetHelper.WriteInfoLog(_logType, "测试啊啊啊啊 ");
                    using (dbmodel mod = new dbmodel())
                    {
                        List<Wms_outInStockRecord_V2_Mes> sendMesData = mod.Wms_outInStockRecord_V2_Mes.Where(x => x.isSendToMes == 0).ToList();
                        List<v_srmStockdetails> sendMesData = mod.v_srmStockdetails.OrderBy(x => x.positionName).ToList();
                        if (sendMesData.Count > 0)
                        {
                            foreach (var itemTask in sendMesData)
                            {
                                try
                                {
                                    ApiResponse<object> ret = null;
                                    //获取信息明细
                                    var details = mod.Wms_outInStockRecord_Details_V2_Mes.Where(x => x.mainId == itemTask.ID).ToList();
                                    List<InboundStockInfoToMes> pushData = new List<InboundStockInfoToMes>();
                                    foreach (var de in details)
                            foreach (var itemTask in sendMesData)
                                    {
                                        pushData.Add(new InboundStockInfoToMes()
                                        {
                                            containerCode = itemTask.containerCode,
                                            createTime = itemTask.CreateTime?.ToString("yyyy-MM-dd HH:mm:ss"),
                                            materialCode = de.productCode,
                                            materialName = de.productName,
                                            positionName = itemTask.sourcePlace,
                                    createTime = itemTask.createTime?.ToString("yyyy-MM-dd HH:mm:ss"),
                                    materialCode = itemTask.productCode,
                                    materialName = itemTask.productName,
                                    positionName = itemTask.positionName,
                                            productName = itemTask.materialName,
                                            serialNumber = de.serialNumber,
                                    serialNumber = itemTask.serialNumber,
                                            supplier = itemTask.supplier,
                                            version = itemTask.version,
                                        });
                                    }
                                });
                            }
                                    if (Form1.isvirtual)
                                    {//模拟环境
                                        ret = new ApiResponse<object>();
@@ -66,50 +60,24 @@
                                    }
                                    else
                                    {
                                        switch (itemTask.outInFlag)
                                        {
                                            case (int)OutInFlag.入库:
                                                ret = PushMesHandler.Mes_InStockSend(pushData, itemTask.ID.ToString(), _logType);
                                                break;
                                            case (int)OutInFlag.出库:
                                                ret = PushMesHandler.Mes_OutStockSend(pushData, itemTask.ID.ToString(), _logType);
                                                break;
                                            default:
                                                break;
                                        }
                                    }
                                    if (ret.Success)
                                    {
                                        itemTask.isSendToMes = 1;
                                    }
                                    else
                                    {
                                        itemTask.isSendToMes = 0;
                                    }
                                    itemTask.SendToMesTime = DateTime.Now;
                                    itemTask.MesRet = ret.Message;
                                    itemTask.SendToMesCount = (itemTask.SendToMesCount ?? 0) + 1;
                                    mod.SaveChanges();
                                }
                                catch (Exception ex)
                                {
                                    SystemWarningMsg.msg_mesDataTranfficForRealMes = "推送给MES数据异常:" + JsonConvert.SerializeObject(ex);
                                    Log4NetHelper.WriteErrorLog(_logType, SystemWarningMsg.msg_mesDataTranfficForRealMes, ex);
                                }
                                ret = PushMesHandler.Mes_StockSend(pushData, _logType);
                            }
                        }
                        else
                        {
                            SystemWarningMsg.msg_mesDataTranfficForRealMes = "没有数据要推送给MES!";
                            SystemWarningMsg.mesStockDataForRealMes = "没有数据要推送给MES!";
                        }
                    }
                }
                catch (Exception ex)
                {
                    SystemWarningMsg.msg_mesDataTranfficForRealMes = "数据要推送给MES出现异常:" + ex.Message;
                    Log4NetHelper.WriteErrorLog(_logType, SystemWarningMsg.msg_mesDataTranfficForRealMes, ex);
                    SystemWarningMsg.mesStockDataForRealMes = "数据要推送给MES出现异常:" + ex.Message;
                    Log4NetHelper.WriteErrorLog(_logType, SystemWarningMsg.mesStockDataForRealMes, ex);
                }
                finally
                {
                    //Thread.Sleep(5000);//正式需要5分钟推送一次
                    Thread.Sleep(5 * 60 * 1000);//正式需要5分钟推送一次
                }
            }
        }
wcs/yunneiWCS/yunneiWCS/log4net_iWare -±à¼­°æ.config
@@ -6,8 +6,8 @@
  </appSettings>
  <log4net>
    <!--  é‡æ–°èŽ·å–å‘åŠ¨æœºä¿¡æ¯ã€ä¿¡æ¯ã€‘æ—¥å¿—-->
    <appender name="DataProcess_RobotBuffer_ForceOutbound_Info" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\YuNei\\WCS\\DataProcess_RobotBuffer_ForceOutbound_Info\\" />
    <appender name="mesStockDataForRealMes_Info" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\YuNei\\WCS\\mesStockDataForRealMes_Info\\" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
@@ -17,13 +17,13 @@
        <param name="ConversionPattern" value="%n消息时间:%d [%t] %n消息级别:%-5p %n消 æ¯ ç±»ï¼š%c [%x] %n%m %n "/>
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="DataProcess_RobotBuffer_ForceOutbound_Info" />
        <loggerToMatch value="mesStockDataForRealMes_Info" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <!--重新获取发动机信息【错误】日志-->
    <appender name="DataProcess_RobotBuffer_ForceOutbound_Error" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\YuNei\\WCS\\DataProcess_RobotBuffer_ForceOutbound_Error\\" />
    <appender name="mesStockDataForRealMes_Error" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\YuNei\\WCS\\mesStockDataForRealMes_Error\\" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
@@ -33,14 +33,14 @@
        <param name="ConversionPattern" value="%n异常时间:%d [%t] %n异常级别:%-5p %n异 å¸¸ ç±»ï¼š%c [%x] %n%m %n "/>
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="DataProcess_RobotBuffer_ForceOutbound_Error" />
        <loggerToMatch value="mesStockDataForRealMes_Error" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <root>
      <level value="ALL"/>
      <appender-ref ref="DataProcess_RobotBuffer_ForceOutbound_Info"/>
      <appender-ref ref="DataProcess_RobotBuffer_ForceOutbound_Error"/>
      <appender-ref ref="mesStockDataForRealMes_Info"/>
      <appender-ref ref="mesStockDataForRealMes_Error"/>
    </root>
  </log4net>
</configuration>
wcs/yunneiWCS/yunneiWCS/log4net_iWare.config
@@ -37,10 +37,44 @@
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <!--  é‡æ–°èŽ·å–å‘åŠ¨æœºä¿¡æ¯ã€ä¿¡æ¯ã€‘æ—¥å¿—-->
    <appender name="mesStockDataForRealMes_Info" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\YuNei\\WCS\\mesStockDataForRealMes_Info\\" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
      <datePattern value="yyyy-MM-dd.LOG" />
      <layout type="log4net.Layout.PatternLayout">
        <!--输出格式-->
        <param name="ConversionPattern" value="%n消息时间:%d [%t] %n消息级别:%-5p %n消 æ¯ ç±»ï¼š%c [%x] %n%m %n "/>
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="mesStockDataForRealMes_Info" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <!--重新获取发动机信息【错误】日志-->
    <appender name="mesStockDataForRealMes_Error" type="log4net.Appender.RollingFileAppender">
      <file value="d:\\Log\\YuNei\\WCS\\mesStockDataForRealMes_Error\\" />
      <appendToFile value="true" />
      <rollingStyle value="Date" />
      <staticLogFileName value="false" />
      <datePattern value="yyyy-MM-dd.LOG" />
      <layout type="log4net.Layout.PatternLayout">
        <!--输出格式-->
        <param name="ConversionPattern" value="%n异常时间:%d [%t] %n异常级别:%-5p %n异 å¸¸ ç±»ï¼š%c [%x] %n%m %n "/>
      </layout>
      <filter type="log4net.Filter.LoggerMatchFilter">
        <loggerToMatch value="mesStockDataForRealMes_Error" />
      </filter>
      <filter type="log4net.Filter.DenyAllFilter" />
    </appender>
    <root>
      <level value="ALL"/>
      <appender-ref ref="mesDataTranfficForRealMes_Info"/>
      <appender-ref ref="mesDataTranfficForRealMes_Error"/>
      <appender-ref ref="mesStockDataForRealMes_Info"/>
      <appender-ref ref="mesStockDataForRealMes_Error"/>
    </root>
  </log4net>
</configuration>
wcs/yunneiWCS/yunneiWCS/yunneiWCS.csproj
@@ -161,6 +161,7 @@
    <Compile Include="TestForm.Designer.cs">
      <DependentUpon>TestForm.cs</DependentUpon>
    </Compile>
    <Compile Include="ORM\v_srmStockdetails.cs" />
    <Compile Include="ThreadTask\mesStockDataForRealMes.cs" />
    <Compile Include="ThreadTask\mesDataTranfficForRealMes.cs" />
    <Compile Include="Utils\Log4Net\C_LogWriter.cs" />