分支自 SuZhouGuanHong/TaiYuanTaiZhong

dengjunjie
2024-06-20 58bd958f1fa8a85d0a3ac33a1ab1e2cab5d63dd2
代码管理/PCS/WCS_Server/WIDESEA_Comm/LogInfo/WriteDBLog.cs
@@ -6,9 +6,12 @@
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Comm.DBItem;
using WIDESEA_Core.EFDbContext;
using WIDESEA_Core.FreeDB;
using WIDESEA_Core.ManageUser;
using WIDESEA_Entity.DomainModels;
using WIDESEA_System.IRepositories;
using WIDESEA_System.Repositories;
using WIDESEA_WCS.JobsPart.Common;
namespace WIDESEA_Comm.LogInfo
@@ -88,7 +91,10 @@
        {
            try
            {
                VOLContext context = new VOLContext();
                Idt_log_pcsRepository pcsRepository = new dt_log_pcsRepository(context);
                //dt_log log = new dt_log();
                dt_log_pcs log = new dt_log_pcs();
                log.id = Guid.NewGuid();
                log.createtime = DateTime.Now;
@@ -105,7 +111,14 @@
                    log.info = JsonConvert.SerializeObject(info);
                }
                //StoredProcedure.Main(log, MethodName.Add);
                StoredProcedure.EXECAdd(log, MethodName.Add);
                //var data = pcsRepository.Find(x => x.dataForm == log.dataForm && x.describe == log.describe && x.status == log.status && x.info == log.info).FirstOrDefault();
                //if (data == null)
                    StoredProcedure.EXECAdd(log, MethodName.Add);
                //else
                //{
                //    data.createtime = DateTime.Now;
                //    pcsRepository.Update(data, true);
                //}
                //freeDB.Add(log);
            }
            catch (Exception ex)