From a4f725f0fc99e1e51106af1b60263ac3bd2a7c30 Mon Sep 17 00:00:00 2001 From: 展杰 <1240968267@qq.com> Date: 星期二, 13 八月 2024 10:09:14 +0800 Subject: [PATCH] 合并上格新增代码 --- MESApplication/bin/Release/net8.0/MESApplication.exe | 0 MESApplication/bin/Release/net8.0/appsettings.json | 7 MESApplication/bin/Release/net8.0/publish/MESApplication.pdb | 0 MES.Service/Dto/webApi/ErpCAB.cs | 4 MESApplication/Controllers/Base/LoginController.cs | 2 MESApplication/bin/Debug/net8.0/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/publish/MESApplication.dll | 0 MES.Service/service/WomcaaManager.cs | 20 + MESApplication/bin/Debug/net8.0/MES.Service.dll | 0 MESApplication/bin/Debug/net8.0/MESApplication.pdb | 0 MES.Service/Modes/MessageCenter.cs | 15 + MESApplication/bin/Release/net8.0/MES.Service.dll | 0 MESApplication/bin/Release/net8.0/MESApplication.dll | 0 MESApplication/bin/Release/net8.0/publish/MES.Service.pdb | 0 MES.Service/Modes/MesInvItemIns.cs | 591 ++++++++++++++++---------------------- MESApplication/Controllers/BasicData/MesItemsController.cs | 1 MESApplication/bin/Release/net8.0/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/publish/MESApplication.exe | 0 MES.Service/DB/SqlSugarHelper.cs | 5 MESApplication/Controllers/Base/MessageCenterController.cs | 62 +++ MESApplication/Controllers/QC/BaseController.cs | 2 MESApplication/bin/Debug/net8.0/appsettings.json | 7 MESApplication/bin/Release/net8.0/MESApplication.pdb | 0 MESApplication/Controllers/QC/MesLineUserController.cs | 2 MES.Service/DB/OracleSQLHelper.cs | 7 MES.Service/bin/Debug/net8.0/MES.Service.pdb | 0 MESApplication/bin/Release/net8.0/publish/MES.Service.dll | 0 MES.Service/DB/Repository.cs | 6 MES.Service/Dto/webApi/ErpCAA.cs | 6 MES.Service/service/QC/XJService.cs | 10 MESApplication/bin/Debug/net8.0/MESApplication.dll | 0 MESApplication/Controllers/QC/SJController.cs | 2 MES.Service/bin/Debug/net8.0/MES.Service.dll | 0 MES.Service/Modes/MesItems.cs | 2 MESApplication/Controllers/WomcaaController.cs | 11 MES.Service/service/MessageCenterManager.cs | 38 ++ MESApplication/Startup.cs | 16 MESApplication/Controllers/QC/XJController.cs | 2 MESApplication/bin/Debug/net8.0/MESApplication.exe | 0 MES.Service/bin/Release/net8.0/MES.Service.dll | 0 MESApplication/Controllers/Base/DemoController.cs | 2 MESApplication/Controllers/QC/RKJController.cs | 2 MES.Service/bin/Release/net8.0/MES.Service.pdb | 0 MES.Service/service/BasicData/MesItemsManager.cs | 2 MESApplication/bin/Release/net8.0/publish/appsettings.json | 7 MES.Service/DB/DbContext.cs | 5 MESApplication/Controllers/QC/SuspendController.cs | 2 MESApplication/appsettings.json | 7 48 files changed, 453 insertions(+), 392 deletions(-) diff --git a/MES.Service/DB/DbContext.cs b/MES.Service/DB/DbContext.cs index cd0ad78..a2650e2 100644 --- a/MES.Service/DB/DbContext.cs +++ b/MES.Service/DB/DbContext.cs @@ -1,4 +1,5 @@ -锘縰sing SqlSugar; +锘縰sing MES.Service.util; +using SqlSugar; namespace MES.Service.DB; @@ -12,7 +13,7 @@ //mesQaItemXj02Context.Db.Queryable<MesQaItemXj02>().ToList(); private static readonly string connectionString = - "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.107)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = xm_dev; Password=xmdev"; // 杩欓噷鏇挎崲鎴愪綘鐨勫疄闄呰繛鎺ュ瓧绗︿覆; + AppsettingsUtility.Settings.DataBaseConn; // 杩欓噷鏇挎崲鎴愪綘鐨勫疄闄呰繛鎺ュ瓧绗︿覆; /// <summary> /// 娉ㄦ剰锛氫笉鑳藉啓鎴愰潤鎬佺殑 //鐢ㄦ潵澶勭悊浜嬪姟澶氳〃鏌ヨ鍜屽鏉傜殑鎿嶄綔 diff --git a/MES.Service/DB/OracleSQLHelper.cs b/MES.Service/DB/OracleSQLHelper.cs index 3efbc3f..596378f 100644 --- a/MES.Service/DB/OracleSQLHelper.cs +++ b/MES.Service/DB/OracleSQLHelper.cs @@ -1,4 +1,5 @@ 锘縰sing System.Data; +using MES.Service.util; using Oracle.ManagedDataAccess.Client; namespace MES.Service.DB; @@ -8,11 +9,11 @@ /// </summary> public class OracleSQLHelper { - public const string ConnectionString = - "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.107)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = xm_dev; Password=xmdev"; - private readonly string _connectionString; + public readonly string ConnectionString = + AppsettingsUtility.Settings.DataBaseConn; + //public static string connectionString = "Data Source = 192.168.1.19; Persist Security Info=True;User ID = abtdev; Password=abt_dev"; public string connectionString = "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.107)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = xm_dev; Password=xmdev"; // 杩欓噷鏇挎崲鎴愪綘鐨勫疄闄呰繛鎺ュ瓧绗︿覆 diff --git a/MES.Service/DB/Repository.cs b/MES.Service/DB/Repository.cs index aa80782..c84a136 100644 --- a/MES.Service/DB/Repository.cs +++ b/MES.Service/DB/Repository.cs @@ -1,4 +1,5 @@ -锘縰sing SqlSugar; +锘縰sing MES.Service.util; +using SqlSugar; namespace MES.Service.DB; @@ -7,8 +8,7 @@ public static SqlSugarScope Db = new(new ConnectionConfig { DbType = DbType.Oracle, - ConnectionString = - @"Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.107)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = xm_dev; Password=xmdev", + ConnectionString = AppsettingsUtility.Settings.DataBaseConn, IsAutoCloseConnection = true }, db => diff --git a/MES.Service/DB/SqlSugarHelper.cs b/MES.Service/DB/SqlSugarHelper.cs index d2d8900..4852aea 100644 --- a/MES.Service/DB/SqlSugarHelper.cs +++ b/MES.Service/DB/SqlSugarHelper.cs @@ -1,11 +1,12 @@ -锘縰sing SqlSugar; +锘縰sing MES.Service.util; +using SqlSugar; namespace MES.Service.DB; public class SqlSugarHelper { private static readonly string _connectionString = - "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.107)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = xm_dev; Password=xmdev"; // 杩欓噷鏇挎崲鎴愪綘鐨勫疄闄呰繛鎺ュ瓧绗︿覆 + AppsettingsUtility.Settings.DataBaseConn; // 杩欓噷鏇挎崲鎴愪綘鐨勫疄闄呰繛鎺ュ瓧绗︿覆 public static SqlSugarClient GetInstance() { diff --git a/MES.Service/Dto/webApi/ErpCAA.cs b/MES.Service/Dto/webApi/ErpCAA.cs index 4c02d46..523cdaf 100644 --- a/MES.Service/Dto/webApi/ErpCAA.cs +++ b/MES.Service/Dto/webApi/ErpCAA.cs @@ -4,6 +4,8 @@ { public string Id { get; set; } public string? Type { get; set; } + + public string? FBILLTYPE { get; set; } public string? FBillNo { get; set; } public string? FWorkShopID0 { get; set; } public string? FRoutingId { get; set; } @@ -36,4 +38,8 @@ public string? FCloseType { get; set; } public string? FSrcSplitBillNo { get; set; } public string? FMemoItem { get; set; } + + public string? planId { get; set; } + public string? planSeq { get; set; } + public string? planNum { get; set; } } \ No newline at end of file diff --git a/MES.Service/Dto/webApi/ErpCAB.cs b/MES.Service/Dto/webApi/ErpCAB.cs index c052532..53a95a0 100644 --- a/MES.Service/Dto/webApi/ErpCAB.cs +++ b/MES.Service/Dto/webApi/ErpCAB.cs @@ -20,5 +20,7 @@ public string? FNumerator { get; set; } public string? FDenominator { get; set; } public string ID { get; set; } - public string PID { get; set; } + public string? PID { get; set; } + + public string? FSeq { get; set; } } \ No newline at end of file diff --git a/MES.Service/Modes/MesInvItemIns.cs b/MES.Service/Modes/MesInvItemIns.cs index 9392c4f..b38b2cd 100644 --- a/MES.Service/Modes/MesInvItemIns.cs +++ b/MES.Service/Modes/MesInvItemIns.cs @@ -1,5 +1,3 @@ -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; using SqlSugar; namespace MES.Service.Modes; @@ -7,404 +5,311 @@ /// <summary> /// 鐗╂枡鍏ュ簱涓昏〃 /// </summary> -[Table("MES_INV_ITEM_INS")] -[SugarTable("MES_INV_ITEM_INS")] //鐢ㄤ簬SqlSugar +[SugarTable("MES_INV_ITEM_INS")] public class MesInvItemIns { /// <summary> /// ID(SEQ_INV_ID) /// </summary> - [Key] - [Column("ID")] - [SugarColumn(ColumnName = "ID")] //鐢ㄤ簬SqlSugar + [SugarColumn(ColumnName = "ID", IsPrimaryKey = true)] public decimal Id { get; set; } /// <summary> /// 鍏ュ簱鍗曞彿 /// </summary> - [Column("BILL_NO")] - [SugarColumn(ColumnName = "BILL_NO")] //鐢ㄤ簬SqlSugar - [StringLength(100, ErrorMessage = "鍏ュ簱鍗曞彿闀垮害涓嶈兘瓒呭嚭100")] + [SugarColumn(ColumnName = "BILL_NO")] public string BillNo { get; set; } /// <summary> - /// 鍗曟嵁绫诲瀷ID + /// 鐘舵�亅0-鏈鏍�1-瀹℃牳鍏ュ簱\缁撴 /// </summary> - [Column("BILL_TYPE_ID")] - [SugarColumn(ColumnName = "BILL_TYPE_ID")] //鐢ㄤ簬SqlSugar - public decimal? BillTypeId { get; set; } + [SugarColumn(ColumnName = "STATUS")] + public short? Status { get; set; } /// <summary> - /// 鍒拌揣鍗曞彿/璁″垝鍗曞彿 + /// 浠撳簱 /// </summary> - [Column("CBILL_NO")] - [SugarColumn(ColumnName = "CBILL_NO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "鍒拌揣鍗曞彿/璁″垝鍗曞彿闀垮害涓嶈兘瓒呭嚭50")] - public string CbillNo { get; set; } + [SugarColumn(ColumnName = "DEPOTS_ID")] + public decimal? DepotsId { get; set; } /// <summary> - /// 瀹℃牳鏃ユ湡 + /// 鍘熷洜 /// </summary> - [Column("CHECK_DATE")] - [SugarColumn(ColumnName = "CHECK_DATE")] //鐢ㄤ簬SqlSugar - public DateTime? CheckDate { get; set; } - - /// <summary> - /// 宸叉崱鏁伴噺 - /// </summary> - [Column("CHECK_QTY")] - [SugarColumn(ColumnName = "CHECK_QTY")] //鐢ㄤ簬SqlSugar - public decimal? CheckQty { get; set; } - - /// <summary> - /// 妫�楠岀粨鏋� - /// </summary> - [Column("CHECK_RES")] - [SugarColumn(ColumnName = "CHECK_RES")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "妫�楠岀粨鏋滈暱搴︿笉鑳借秴鍑�50")] - public string CheckRes { get; set; } - - /// <summary> - /// 瀹℃牳浜� - /// </summary> - [Column("CHECK_USER")] - [SugarColumn(ColumnName = "CHECK_USER")] //鐢ㄤ簬SqlSugar - [StringLength(32, ErrorMessage = "瀹℃牳浜洪暱搴︿笉鑳借秴鍑�32")] - public string CheckUser { get; set; } - - /// <summary> - /// 鍏徃浠g爜 - /// </summary> - [Column("COMPANY")] - [SugarColumn(ColumnName = "COMPANY")] //鐢ㄤ簬SqlSugar - [StringLength(20, ErrorMessage = "鍏徃浠g爜闀垮害涓嶈兘瓒呭嚭20")] - public string Company { get; set; } + [SugarColumn(ColumnName = "REASON")] + public string Reason { get; set; } /// <summary> /// 鍒涘缓浜� /// </summary> - [Column("CREATE_BY")] - [SugarColumn(ColumnName = "CREATE_BY")] //鐢ㄤ簬SqlSugar - [StringLength(30, ErrorMessage = "鍒涘缓浜洪暱搴︿笉鑳借秴鍑�30")] + [SugarColumn(ColumnName = "CREATE_BY")] public string CreateBy { get; set; } /// <summary> /// 鍒涘缓鏃堕棿 /// </summary> - [Column("CREATE_DATE")] - [SugarColumn(ColumnName = "CREATE_DATE")] //鐢ㄤ簬SqlSugar + [SugarColumn(ColumnName = "CREATE_DATE")] public DateTime? CreateDate { get; set; } - - /// <summary> - /// 瀹㈡埛鍚嶇О - /// </summary> - [Column("CUST_NAME")] - [SugarColumn(ColumnName = "CUST_NAME")] //鐢ㄤ簬SqlSugar - [StringLength(300, ErrorMessage = "瀹㈡埛鍚嶇О闀垮害涓嶈兘瓒呭嚭300")] - public string CustName { get; set; } - - /// <summary> - /// 瀹㈡埛缂栧彿 - /// </summary> - [Column("CUST_NO")] - [SugarColumn(ColumnName = "CUST_NO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "瀹㈡埛缂栧彿闀垮害涓嶈兘瓒呭嚭50")] - public string CustNo { get; set; } - - /// <summary> - /// 浠撳簱缂栫爜 - /// </summary> - [Column("DEPOTS_CODE")] - [SugarColumn(ColumnName = "DEPOTS_CODE")] //鐢ㄤ簬SqlSugar - [StringLength(30, ErrorMessage = "浠撳簱缂栫爜闀垮害涓嶈兘瓒呭嚭30")] - public string DepotsCode { get; set; } - - /// <summary> - /// 浠撳簱 - /// </summary> - [Column("DEPOTS_ID")] - [SugarColumn(ColumnName = "DEPOTS_ID")] //鐢ㄤ簬SqlSugar - public decimal? DepotsId { get; set; } - - /// <summary> - /// SAP閲囪喘璁㈠崟鍙� - /// </summary> - [Column("EBELN")] - [SugarColumn(ColumnName = "EBELN")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "SAP閲囪喘璁㈠崟鍙烽暱搴︿笉鑳借秴鍑�50")] - public string Ebeln { get; set; } - - /// <summary> - /// 宸ュ巶缂栫爜 - /// </summary> - [Column("FACTORY")] - [SugarColumn(ColumnName = "FACTORY")] //鐢ㄤ簬SqlSugar - [StringLength(10, ErrorMessage = "宸ュ巶缂栫爜闀垮害涓嶈兘瓒呭嚭10")] - public string Factory { get; set; } - - /// <summary> - /// 鎶曟枡鍗曡鍙� - /// </summary> - [Column("FBILL_LINO")] - [SugarColumn(ColumnName = "FBILL_LINO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "鎶曟枡鍗曡鍙烽暱搴︿笉鑳借秴鍑�50")] - public string FbillLino { get; set; } - - /// <summary> - /// 鎶曟枡閫氱煡鍗曞崟鍙� - /// </summary> - [Column("FBILLNO")] - [SugarColumn(ColumnName = "FBILLNO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "鎶曟枡閫氱煡鍗曞崟鍙烽暱搴︿笉鑳借秴鍑�50")] - public string Fbillno { get; set; } - - /// <summary> - /// 鍏ュ簱瀹℃牳鏃ユ湡 - /// </summary> - [Column("FCHECK_DATE")] - [SugarColumn(ColumnName = "FCHECK_DATE")] //鐢ㄤ簬SqlSugar - public DateTime? FcheckDate { get; set; } - - /// <summary> - /// 鍏ュ簱瀹℃牳浜� - /// </summary> - [Column("FCHECK_USER")] - [SugarColumn(ColumnName = "FCHECK_USER")] //鐢ㄤ簬SqlSugar - [StringLength(10, ErrorMessage = "鍏ュ簱瀹℃牳浜洪暱搴︿笉鑳借秴鍑�10")] - public string FcheckUser { get; set; } - - /// <summary> - /// 鍏ュ簱鐘舵�� - /// </summary> - [Column("FSTATUS")] - [SugarColumn(ColumnName = "FSTATUS")] //鐢ㄤ簬SqlSugar - public decimal? Fstatus { get; set; } - - /// <summary> - /// 瀹℃牳鍏ュ簱浜� - /// </summary> - [Column("INSBY")] - [SugarColumn(ColumnName = "INSBY")] //鐢ㄤ簬SqlSugar - [StringLength(32, ErrorMessage = "瀹℃牳鍏ュ簱浜洪暱搴︿笉鑳借秴鍑�32")] - public string Insby { get; set; } - - /// <summary> - /// 纭鍏ュ簱鏃ユ湡 - /// </summary> - [Column("INSDATE")] - [SugarColumn(ColumnName = "INSDATE")] //鐢ㄤ簬SqlSugar - public DateTime? Insdate { get; set; } - - /// <summary> - /// 鍏ュ簱鏃ユ湡 - /// </summary> - [Column("INS_DATE")] - [SugarColumn(ColumnName = "INS_DATE")] //鐢ㄤ簬SqlSugar - public DateTime? InsDate { get; set; } - - /// <summary> - /// IQC妫�楠屽崟鍙� - /// </summary> - [Column("IQC_RELEASE_NO")] - [SugarColumn(ColumnName = "IQC_RELEASE_NO")] //鐢ㄤ簬SqlSugar - [StringLength(300, ErrorMessage = "IQC妫�楠屽崟鍙烽暱搴︿笉鑳借秴鍑�300")] - public string IqcReleaseNo { get; set; } - - /// <summary> - /// 鏄惁妫�楠� - /// </summary> - [Column("ISCHECK")] - [SugarColumn(ColumnName = "ISCHECK")] //鐢ㄤ簬SqlSugar - public decimal? Ischeck { get; set; } - - /// <summary> - /// 鏄惁鏄剧ず - /// </summary> - [Column("IS_VISUAL")] - [SugarColumn(ColumnName = "IS_VISUAL")] //鐢ㄤ簬SqlSugar - public decimal? IsVisual { get; set; } - - /// <summary> - /// 鍗婃垚鍝佺紪鍙� - /// </summary> - [Column("ITEM_NO")] - [SugarColumn(ColumnName = "ITEM_NO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "鍗婃垚鍝佺紪鍙烽暱搴︿笉鑳借秴鍑�50")] - public string ItemNo { get; set; } /// <summary> /// 鏈�鍚庢洿鏂颁汉 /// </summary> - [Column("LASTUPDATE_BY")] - [SugarColumn(ColumnName = "LASTUPDATE_BY")] //鐢ㄤ簬SqlSugar - [StringLength(30, ErrorMessage = "鏈�鍚庢洿鏂颁汉闀垮害涓嶈兘瓒呭嚭30")] + [SugarColumn(ColumnName = "LASTUPDATE_BY")] public string LastupdateBy { get; set; } /// <summary> /// 鏈�鍚庢洿鏂版椂闂� /// </summary> - [Column("LASTUPDATE_DATE")] - [SugarColumn(ColumnName = "LASTUPDATE_DATE")] //鐢ㄤ簬SqlSugar + [SugarColumn(ColumnName = "LASTUPDATE_DATE")] public DateTime? LastupdateDate { get; set; } /// <summary> - /// 閲囪喘鍗曡鍙� + /// 鍗曟嵁绫诲瀷ID /// </summary> - [Column("LINE_NO")] - [SugarColumn(ColumnName = "LINE_NO")] //鐢ㄤ簬SqlSugar - [StringLength(20, ErrorMessage = "閲囪喘鍗曡鍙烽暱搴︿笉鑳借秴鍑�20")] - public string LineNo { get; set; } - - /// <summary> - /// 棰嗘枡宸ユ - /// </summary> - [Column("MMLIST")] - [SugarColumn(ColumnName = "MMLIST")] //鐢ㄤ簬SqlSugar - [StringLength(30, ErrorMessage = "棰嗘枡宸ユ闀垮害涓嶈兘瓒呭嚭30")] - public string Mmlist { get; set; } - - /// <summary> - /// 鐢熶骇璁㈠崟 - /// </summary> - [Column("MOCODE")] - [SugarColumn(ColumnName = "MOCODE")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "鐢熶骇璁㈠崟闀垮害涓嶈兘瓒呭嚭50")] - public string Mocode { get; set; } - - /// <summary> - /// 鍐查攢浜嬪姟绫诲瀷缂栫爜 - /// </summary> - [Column("MTTRANSCTION_NO")] - [SugarColumn(ColumnName = "MTTRANSCTION_NO")] //鐢ㄤ簬SqlSugar - public decimal? MttransctionNo { get; set; } - - /// <summary> - /// 閫佽揣鍗曞彿 - /// </summary> - [Column("PAPER_BILL_NO")] - [SugarColumn(ColumnName = "PAPER_BILL_NO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "閫佽揣鍗曞彿闀垮害涓嶈兘瓒呭嚭50")] - public string PaperBillNo { get; set; } - - /// <summary> - /// 0 鐢宠鍗曪紝1鍏ュ簱鍗曟爣璇� - /// </summary> - [Column("PICK_INS")] - [SugarColumn(ColumnName = "PICK_INS")] //鐢ㄤ簬SqlSugar - public decimal? PickIns { get; set; } - - /// <summary> - /// 鍘熷洜 - /// </summary> - [Column("REASON")] - [SugarColumn(ColumnName = "REASON")] //鐢ㄤ簬SqlSugar - [StringLength(1000, ErrorMessage = "鍘熷洜闀垮害涓嶈兘瓒呭嚭1000")] - public string Reason { get; set; } - - /// <summary> - /// 閫�鏂欏師鍥� - /// </summary> - [Column("REM")] - [SugarColumn(ColumnName = "REM")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "閫�鏂欏師鍥犻暱搴︿笉鑳借秴鍑�50")] - public string Rem { get; set; } - - /// <summary> - /// 澶囨敞 - /// </summary> - [Column("REMARK")] - [SugarColumn(ColumnName = "REMARK")] //鐢ㄤ簬SqlSugar - [StringLength(255, ErrorMessage = "澶囨敞闀垮害涓嶈兘瓒呭嚭255")] - public string Remark { get; set; } - - /// <summary> - /// SAP杩斿洖鍗曟嵁 - /// </summary> - [Column("SAPNO")] - [SugarColumn(ColumnName = "SAPNO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "SAP杩斿洖鍗曟嵁闀垮害涓嶈兘瓒呭嚭50")] - public string Sapno { get; set; } - - /// <summary> - /// 鏄惁宸插洖鍐橲AP - /// </summary> - [Column("SAPSTATUS")] - [SugarColumn(ColumnName = "SAPSTATUS")] //鐢ㄤ簬SqlSugar - public decimal? Sapstatus { get; set; } - - /// <summary> - /// SAP杩斿洖淇℃伅 - /// </summary> - [Column("SAPTEXT")] - [SugarColumn(ColumnName = "SAPTEXT")] //鐢ㄤ簬SqlSugar - [StringLength(200, ErrorMessage = "SAP杩斿洖淇℃伅闀垮害涓嶈兘瓒呭嚭200")] - public string Saptext { get; set; } - - /// <summary> - /// SAP杩斿洖骞翠唤 - /// </summary> - [Column("SAPYEAR")] - [SugarColumn(ColumnName = "SAPYEAR")] //鐢ㄤ簬SqlSugar - public decimal? Sapyear { get; set; } - - /// <summary> - /// 鐘舵�亅0-鏈鏍�1-瀹℃牳鍏ュ簱\缁撴 - /// </summary> - [Column("STATUS")] - [SugarColumn(ColumnName = "STATUS")] //鐢ㄤ簬SqlSugar - public decimal? Status { get; set; } - - /// <summary> - /// 渚涘簲鍟嗙紪鐮� - /// </summary> - [Column("SUPP_NO")] - [SugarColumn(ColumnName = "SUPP_NO")] //鐢ㄤ簬SqlSugar - [StringLength(30, ErrorMessage = "渚涘簲鍟嗙紪鐮侀暱搴︿笉鑳借秴鍑�30")] - public string SuppNo { get; set; } - - /// <summary> - /// 宸ュ崟琛屽彿 - /// </summary> - [Column("TASK_LINO")] - [SugarColumn(ColumnName = "TASK_LINO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "宸ュ崟琛屽彿闀垮害涓嶈兘瓒呭嚭50")] - public string TaskLino { get; set; } - - /// <summary> - /// 浠诲姟鍗曞彿 - /// </summary> - [Column("TASK_NO")] - [SugarColumn(ColumnName = "TASK_NO")] //鐢ㄤ簬SqlSugar - [StringLength(50, ErrorMessage = "浠诲姟鍗曞彿闀垮害涓嶈兘瓒呭嚭50")] - public string TaskNo { get; set; } + [SugarColumn(ColumnName = "BILL_TYPE_ID")] + public decimal? BillTypeId { get; set; } /// <summary> /// 浜嬪姟绫诲瀷ID /// </summary> - [Column("TRANSACTION_ID")] - [SugarColumn(ColumnName = "TRANSACTION_ID")] //鐢ㄤ簬SqlSugar + [SugarColumn(ColumnName = "TRANSACTION_ID")] public decimal? TransactionId { get; set; } /// <summary> - /// 浜嬪姟绫诲瀷缂栫爜 + /// 澶囨敞 /// </summary> - [Column("TRANSCTION_NO")] - [SugarColumn(ColumnName = "TRANSCTION_NO")] //鐢ㄤ簬SqlSugar - [StringLength(30, ErrorMessage = "浜嬪姟绫诲瀷缂栫爜闀垮害涓嶈兘瓒呭嚭30")] - public string TransctionNo { get; set; } + [SugarColumn(ColumnName = "REMARK")] + public string Remark { get; set; } /// <summary> - /// 鎬ユ枡鏍囪瘑 + /// 閫佽揣鍗曞彿 /// </summary> - [Column("URGENT_FLAG")] - [SugarColumn(ColumnName = "URGENT_FLAG")] //鐢ㄤ簬SqlSugar - public decimal? UrgentFlag { get; set; } + [SugarColumn(ColumnName = "PAPER_BILL_NO")] + public string PaperBillNo { get; set; } /// <summary> /// 閫�鏂欎汉宸ュ彿 /// </summary> - [Column("USER_NO_BACK")] - [SugarColumn(ColumnName = "USER_NO_BACK")] //鐢ㄤ簬SqlSugar - [StringLength(20, ErrorMessage = "閫�鏂欎汉宸ュ彿闀垮害涓嶈兘瓒呭嚭20")] + [SugarColumn(ColumnName = "USER_NO_BACK")] public string UserNoBack { get; set; } + + /// <summary> + /// 瀹℃牳浜� + /// </summary> + [SugarColumn(ColumnName = "CHECK_USER")] + public string CheckUser { get; set; } + + /// <summary> + /// 瀹℃牳鏃ユ湡 + /// </summary> + [SugarColumn(ColumnName = "CHECK_DATE")] + public DateTime? CheckDate { get; set; } + + /// <summary> + /// 鐢熶骇璁㈠崟鍙� + /// </summary> + [SugarColumn(ColumnName = "TASK_NO")] + public string TaskNo { get; set; } + + /// <summary> + /// 鍏ュ簱鏃ユ湡 + /// </summary> + [SugarColumn(ColumnName = "INS_DATE")] + public DateTime? InsDate { get; set; } + + /// <summary> + /// 妫�楠岀粨鏋� + /// </summary> + [SugarColumn(ColumnName = "CHECK_RES")] + public string CheckRes { get; set; } + + /// <summary> + /// 宸叉崱鏁伴噺 + /// </summary> + [SugarColumn(ColumnName = "CHECK_QTY")] + public decimal? CheckQty { get; set; } + + /// <summary> + /// 棰嗘枡宸ユ + /// </summary> + [SugarColumn(ColumnName = "MMLIST")] + public string Mmlist { get; set; } + + /// <summary> + /// SAP閲囪喘璁㈠崟鍙� + /// </summary> + [SugarColumn(ColumnName = "EBELN")] + public string Ebeln { get; set; } + + /// <summary> + /// 浠撳簱缂栫爜 + /// </summary> + [SugarColumn(ColumnName = "DEPOTS_CODE")] + public string DepotsCode { get; set; } + + /// <summary> + /// 浜嬪姟绫诲瀷缂栫爜 + /// </summary> + [SugarColumn(ColumnName = "TRANSCTION_NO")] + public string TransctionNo { get; set; } + + /// <summary> + /// 渚涘簲鍟嗙紪鐮� + /// </summary> + [SugarColumn(ColumnName = "SUPP_NO")] + public string SuppNo { get; set; } + + /// <summary> + /// 鍏ュ簱鐘舵�� + /// </summary> + [SugarColumn(ColumnName = "FSTATUS")] + public short? Fstatus { get; set; } + + /// <summary> + /// 宸ュ巶缂栫爜 + /// </summary> + [SugarColumn(ColumnName = "FACTORY")] + public string Factory { get; set; } + + /// <summary> + /// 鏄惁宸插洖鍐橲AP + /// </summary> + [SugarColumn(ColumnName = "SAPSTATUS")] + public short? Sapstatus { get; set; } + + /// <summary> + /// SAP杩斿洖鍗曟嵁 + /// </summary> + [SugarColumn(ColumnName = "SAPNO")] + public string Sapno { get; set; } + + /// <summary> + /// SAP杩斿洖骞翠唤 + /// </summary> + [SugarColumn(ColumnName = "SAPYEAR")] + public short? Sapyear { get; set; } + + /// <summary> + /// SAP杩斿洖淇℃伅 + /// </summary> + [SugarColumn(ColumnName = "SAPTEXT")] + public string Saptext { get; set; } + + /// <summary> + /// 纭鍏ュ簱鏃ユ湡 + /// </summary> + [SugarColumn(ColumnName = "INSDATE")] + public DateTime? InsdateA { get; set; } + + /// <summary> + /// 鏄惁妫�楠� + /// </summary> + [SugarColumn(ColumnName = "ISCHECK")] + public decimal? Ischeck { get; set; } + + /// <summary> + /// 瀹℃牳鍏ュ簱浜� + /// </summary> + [SugarColumn(ColumnName = "INSBY")] + public string Insby { get; set; } + + /// <summary> + /// 鏄惁鏄剧ず + /// </summary> + [SugarColumn(ColumnName = "IS_VISUAL")] + public decimal? IsVisual { get; set; } + + /// <summary> + /// 鍏徃浠g爜 + /// </summary> + [SugarColumn(ColumnName = "COMPANY")] + public string Company { get; set; } + + /// <summary> + /// 鎬ユ枡鏍囪瘑 + /// </summary> + [SugarColumn(ColumnName = "URGENT_FLAG")] + public short? UrgentFlag { get; set; } + + /// <summary> + /// 閲囪喘鍗曡鍙� + /// </summary> + [SugarColumn(ColumnName = "LINE_NO")] + public string LineNo { get; set; } + + /// <summary> + /// 鍐查攢浜嬪姟绫诲瀷缂栫爜 + /// </summary> + [SugarColumn(ColumnName = "MTTRANSCTION_NO")] + public decimal? MttransctionNo { get; set; } + + /// <summary> + /// 宸ュ崟琛屽彿 + /// </summary> + [SugarColumn(ColumnName = "TASK_LINO")] + public string TaskLino { get; set; } + + /// <summary> + /// 鎶曟枡閫氱煡鍗曞崟鍙� + /// </summary> + [SugarColumn(ColumnName = "FBILLNO")] + public string Fbillno { get; set; } + + /// <summary> + /// 鎶曟枡鍗曡鍙� + /// </summary> + [SugarColumn(ColumnName = "FBILL_LINO")] + public string FbillLino { get; set; } + + /// <summary> + /// 瀹㈡埛缂栧彿 + /// </summary> + [SugarColumn(ColumnName = "CUST_NO")] + public string CustNo { get; set; } + + /// <summary> + /// 瀹㈡埛鍚嶇О + /// </summary> + [SugarColumn(ColumnName = "CUST_NAME")] + public string CustName { get; set; } + + /// <summary> + /// IQC妫�楠屽崟鍙� + /// </summary> + [SugarColumn(ColumnName = "IQC_RELEASE_NO")] + public string IqcReleaseNo { get; set; } + + /// <summary> + /// 鍒拌揣鍗曞彿 + /// </summary> + [SugarColumn(ColumnName = "CBILL_NO")] + public string CbillNo { get; set; } + + /// <summary> + /// 0 鐢宠鍗曪紝1鍏ュ簱鍗曟爣璇� + /// </summary> + [SugarColumn(ColumnName = "PICK_INS")] + public decimal? PickIns { get; set; } + + /// <summary> + /// 鍏ュ簱瀹℃牳浜� + /// </summary> + [SugarColumn(ColumnName = "FCHECK_USER")] + public string FcheckUser { get; set; } + + /// <summary> + /// 鍏ュ簱瀹℃牳鏃ユ湡 + /// </summary> + [SugarColumn(ColumnName = "FCHECK_DATE")] + public DateTime? FcheckDate { get; set; } + + /// <summary> + /// 浠诲姟姹囨姤鍗� + /// </summary> + [SugarColumn(ColumnName = "RBILL_NO")] + public string RbillNo { get; set; } + + //鍦ㄦ暟鎹簱鏌ヨ鏃跺拷鐣ヨ繖涓瓧娈� + [SugarColumn(IsIgnore = true)] public string? DepotName { get; set; } + + [SugarColumn(IsIgnore = true)] public string? SuppName { get; set; } } \ No newline at end of file diff --git a/MES.Service/Modes/MesItems.cs b/MES.Service/Modes/MesItems.cs index 46fc83d..0ae3080 100644 --- a/MES.Service/Modes/MesItems.cs +++ b/MES.Service/Modes/MesItems.cs @@ -216,7 +216,7 @@ /// 閲囪喘鍗曚綅 /// </summary> [SugarColumn(ColumnName = "FPURCHASEUNITID")] - public string? Fpurchaseunitid { get; set; } + public decimal? Fpurchaseunitid { get; set; } /// <summary> /// 鑷畾涔夊瓧娈�1 diff --git a/MES.Service/Modes/MessageCenter.cs b/MES.Service/Modes/MessageCenter.cs index 74144be..637de92 100644 --- a/MES.Service/Modes/MessageCenter.cs +++ b/MES.Service/Modes/MessageCenter.cs @@ -105,6 +105,21 @@ [SugarColumn(ColumnName = "ROUTE")] public string? Route { get; set; } + /// <summary> + /// 鍙傛暟绫诲瀷 + /// </summary> + [SugarColumn(ColumnName = "Content_Type")] + public string? ContentType { get; set; } + + // + /// <summary> + /// 鏄惁鏄秷鎭� 0涓烘帹閫佸け璐� 1涓烘秷鎭�,榛樿涓�0 + /// </summary> + [SugarColumn(ColumnName = "is_message")] + public short? IsMessage { get; set; } + [SugarColumn(IsIgnore = true)] public int? isShow { get; set; } + + [SugarColumn(IsIgnore = true)] public decimal? Count { 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 d5dc573..59e24d7 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 254baba..f33968d 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/bin/Release/net8.0/MES.Service.dll b/MES.Service/bin/Release/net8.0/MES.Service.dll index fb272f7..3ff9613 100644 --- a/MES.Service/bin/Release/net8.0/MES.Service.dll +++ b/MES.Service/bin/Release/net8.0/MES.Service.dll Binary files differ diff --git a/MES.Service/bin/Release/net8.0/MES.Service.pdb b/MES.Service/bin/Release/net8.0/MES.Service.pdb index d83af0b..e363107 100644 --- a/MES.Service/bin/Release/net8.0/MES.Service.pdb +++ b/MES.Service/bin/Release/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 0c878cb..2282d8d 100644 --- a/MES.Service/service/BasicData/MesItemsManager.cs +++ b/MES.Service/service/BasicData/MesItemsManager.cs @@ -136,7 +136,7 @@ Fissuetype = item.FIssueType, Fisbatchmanage = item.FIsBatchManage, Fpurchaserid = item.FPurchaserId, - Fpurchaseunitid = item.FPurchaseUnitId, + Fpurchaseunitid = Convert.ToDecimal(item.FPurchaseUnitId), Storeunit = item.FStoreUnitID, Saleunit = item.FSaleUnitId, Fforbidstatus = item.FForbidStatus, diff --git a/MES.Service/service/MessageCenterManager.cs b/MES.Service/service/MessageCenterManager.cs index c835790..255bac7 100644 --- a/MES.Service/service/MessageCenterManager.cs +++ b/MES.Service/service/MessageCenterManager.cs @@ -1,5 +1,6 @@ 锘縰sing MES.Service.DB; using MES.Service.Modes; +using SqlSugar; namespace MES.Service.service; @@ -7,25 +8,54 @@ { //褰撳墠绫诲凡缁忕户鎵夸簡 Repository 澧炪�佸垹銆佹煡銆佹敼鐨勬柟娉� - public List<MessageCenter> getPushFailedPage(MessageCenter query) + public List<MessageCenter> GetPushFailedPage(MessageCenter query) { return Context.Queryable<MessageCenter>() .Where(it => it.Result == 0 && it.Status == 1 && - it.Seq == 1 && - it.CreateBy == query.CreateBy) + it.Seq == 1 && it.Title != null) .WhereIF(query.isShow == 1, it => it.DealWith == 0) .OrderByDescending(it => it.CreateDate) .ToPageList(1, 20); } - public bool save(MessageCenter entity) + public int save(MessageCenter entity) { entity.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); entity.Method = "POST"; + return Db.Insertable(entity).ExecuteReturnIdentity(); + } + + public bool SetError(MessageCenter entity) + { + entity.CreateDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); + entity.Method = "POST"; + entity.Result = 0; + entity.DealWith = 0; + entity.Status = 1; return base.Insert(entity); } + //鑾峰彇鎵�鏈夋病鏈夋垚鍔熺殑璇锋眰 + public List<MessageCenter> ErrorMsg() + { + return Context.Queryable<MessageCenter>() + .GroupBy(a => new + { + a.TableName, a.Pid, a.Title, a.PageName + }) + .Where(a => + a.DealWith == 0 && a.Status == 0 && a.Result == 0 && + a.Title == null) + .Select<MessageCenter>(a => new MessageCenter + { + TableName = a.TableName, + Pid = a.Pid, + Title = a.Title, + PageName = a.PageName, + Count = SqlFunc.AggregateCount(a.Id) + }).ToList(); + } //鏍规嵁鍑犵鎯呭喌鏇存柊 淇濇寔椤甸潰id鏄浐瀹氱殑 diff --git a/MES.Service/service/QC/XJService.cs b/MES.Service/service/QC/XJService.cs index 5513747..7c35c43 100644 --- a/MES.Service/service/QC/XJService.cs +++ b/MES.Service/service/QC/XJService.cs @@ -64,7 +64,7 @@ BoardModel = b.BoardModel, PlanQty = c.PlanQty, Mocode = a.Mocode, - BoardStyle = c.BoardStyle, + // BoardStyle = c.BoardStyle, Id = a.Id }) .ToList(); @@ -156,7 +156,7 @@ CatQty = a.CatQty, MoidNum = s.MoidNum, Daa020 = a.LineNo, - DetailMem = a.DetailMem, + // DetailMem = a.DetailMem, TaskNo = a.TaskNo, Id = s.Id, CreateBy = s.CreateBy, @@ -169,9 +169,9 @@ FcheckResu = s.FcheckResu, Remarks = s.Remarks, BoardModel = b.BoardModel, - PlanQty = c.PlanQty, - Mocode = a.Mocode, - BoardStyle = c.BoardStyle + PlanQty = c.PlanQty + // Mocode = a.Mocode, + // BoardStyle = c.BoardStyle }).OrderBy(s => s.CreateDate, OrderByType.Desc) .ToPageList(queryObj.PageIndex, queryObj.Limit); } diff --git a/MES.Service/service/WomcaaManager.cs b/MES.Service/service/WomcaaManager.cs index 354a2c3..f6f8b8d 100644 --- a/MES.Service/service/WomcaaManager.cs +++ b/MES.Service/service/WomcaaManager.cs @@ -74,12 +74,13 @@ private Womcaa MapErpCAAtoWomcaa(ErpCAA dto) { - return new Womcaa + var entity = new Womcaa { Erpid = Convert.ToDecimal(dto.Id), Caa001 = dto.FBillNo, - WorkShopId = dto.FWorkShopID0, + Caa021 = dto.FWorkShopID0, RoutingId = dto.FRoutingId, + WorkShopId = dto.FREMWorkShopId, DepotCode = dto.FStockId, CreateDate = dto.FDate, Caa004 = dto.FBillType, @@ -109,8 +110,16 @@ ForceCloserid = dto.FForceCloserId, CloseType = dto.FCloseType, SrcSplitBillno = dto.FSrcSplitBillNo, - Caa016 = dto.FMemoItem + Caa016 = dto.FMemoItem, + Caa018 = Convert.ToDecimal(dto.planId), + Caa019 = Convert.ToDecimal(dto.planSeq), + Caa020 = dto.planNum }; + + var single = base.GetSingle(it => it.Erpid == entity.Erpid); + if (single != null) entity.Id = single.Id; + + return entity; } private List<Womcab> MapErpCABtoWomcab(List<ErpCAB> dtoList) @@ -123,6 +132,7 @@ { Erpid = Convert.ToDecimal(dto.ID), Cab001 = dto.FBillNo, + Cab002 = dto.FSeq, Cab003 = dto.FMaterialID2, Cab006 = !string.IsNullOrEmpty(dto.FNeedQty2) ? Convert.ToDecimal(dto.FNeedQty2) @@ -148,6 +158,10 @@ Eid = Convert.ToDecimal(dto.PID) }; + var entity = Db.Queryable<Womcab>() + .Where(s => s.Erpid == womcab.Erpid).Single(); + if (entity != null) womcab.Id = entity.Id; + womcabList.Add(womcab); } diff --git a/MESApplication/Controllers/DemoController.cs b/MESApplication/Controllers/Base/DemoController.cs similarity index 97% rename from MESApplication/Controllers/DemoController.cs rename to MESApplication/Controllers/Base/DemoController.cs index f2caea1..ce0eaba 100644 --- a/MESApplication/Controllers/DemoController.cs +++ b/MESApplication/Controllers/Base/DemoController.cs @@ -4,7 +4,7 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.Base; [Route("api/[controller]")] [ApiController] diff --git a/MESApplication/Controllers/LoginController.cs b/MESApplication/Controllers/Base/LoginController.cs similarity index 97% rename from MESApplication/Controllers/LoginController.cs rename to MESApplication/Controllers/Base/LoginController.cs index 9872e67..58de874 100644 --- a/MESApplication/Controllers/LoginController.cs +++ b/MESApplication/Controllers/Base/LoginController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.Base; [Route("api/[controller]")] [ApiController] diff --git a/MESApplication/Controllers/MessageCenterController.cs b/MESApplication/Controllers/Base/MessageCenterController.cs similarity index 75% rename from MESApplication/Controllers/MessageCenterController.cs rename to MESApplication/Controllers/Base/MessageCenterController.cs index e275539..529df7f 100644 --- a/MESApplication/Controllers/MessageCenterController.cs +++ b/MESApplication/Controllers/Base/MessageCenterController.cs @@ -3,13 +3,15 @@ using MES.Service.service; using MES.Service.util; using Microsoft.AspNetCore.Mvc; +using Newtonsoft.Json.Linq; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.Base; [ApiController] [Route("api/[controller]")] public class MessageCenterController : ControllerBase { + private readonly GetErpParametersServer ErpParametersServer = new(); private readonly MessageCenterManager m = new(); @@ -34,13 +36,60 @@ } } - [HttpPost("GetByPid")] - public ResponseResult ResetUpdate(int pid) + //Resend + [HttpPost("Resend")] + public ResponseResult Resend(MessageCenter data) { try { dynamic resultInfos = new ExpandoObject(); - resultInfos.tbBillList = m.GetList(it => it.Pid == pid); + resultInfos.tbBillList = ErpParametersServer.Resend(data); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + //saveError + [HttpPost("SetError")] + public ResponseResult SetError([FromBody] MessageCenter data) + { + try + { + dynamic resultInfos = new ExpandoObject(); + resultInfos.tbBillList = m.SetError(data); + return new ResponseResult + { + status = 0, + message = "OK", + data = resultInfos + }; + } + catch (Exception ex) + { + return ResponseResult.ResponseError(ex); + } + } + + [HttpPost("GetByPid")] + public ResponseResult ResetUpdate([FromBody] JObject data) + { + var pid = Convert.ToDecimal(data["pid"].ToString()); + try + { + dynamic resultInfos = new ExpandoObject(); + + var messageCenter = m.GetById(pid); + var messageCenters = m.GetList(it => it.Pid == pid); + messageCenters.Add(messageCenter); + resultInfos.tbBillList = messageCenters; return new ResponseResult { status = 0, @@ -60,7 +109,7 @@ try { dynamic resultInfos = new ExpandoObject(); - resultInfos.tbBillList = m.getPushFailedPage(query); + resultInfos.tbBillList = m.GetPushFailedPage(query); return new ResponseResult { status = 0, @@ -106,8 +155,9 @@ /// </summary> /// <returns></returns> [HttpPost("GetById")] - public ResponseResult GetById(int id) + public ResponseResult GetById([FromBody] JObject data) { + var id = Convert.ToDecimal(data["id"].ToString()); try { dynamic resultInfos = new ExpandoObject(); diff --git a/MESApplication/Controllers/BasicData/MesItemsController.cs b/MESApplication/Controllers/BasicData/MesItemsController.cs index c44fe56..c095307 100644 --- a/MESApplication/Controllers/BasicData/MesItemsController.cs +++ b/MESApplication/Controllers/BasicData/MesItemsController.cs @@ -32,6 +32,7 @@ entity.Data = JsonConvert.SerializeObject(unit); entity.Status = 1; entity.CreateBy = "PL017"; + try { dynamic resultInfos = new ExpandoObject(); diff --git a/MESApplication/Controllers/BaseController.cs b/MESApplication/Controllers/QC/BaseController.cs similarity index 97% rename from MESApplication/Controllers/BaseController.cs rename to MESApplication/Controllers/QC/BaseController.cs index 22ea012..dd54e7f 100644 --- a/MESApplication/Controllers/BaseController.cs +++ b/MESApplication/Controllers/QC/BaseController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.QC; [Route("api/[controller]")] [ApiController] diff --git a/MESApplication/Controllers/MesLineUserController.cs b/MESApplication/Controllers/QC/MesLineUserController.cs similarity index 98% rename from MESApplication/Controllers/MesLineUserController.cs rename to MESApplication/Controllers/QC/MesLineUserController.cs index 74259cf..944f756 100644 --- a/MESApplication/Controllers/MesLineUserController.cs +++ b/MESApplication/Controllers/QC/MesLineUserController.cs @@ -4,7 +4,7 @@ using MES.Service.util; using Microsoft.AspNetCore.Mvc; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.QC; [ApiController] [Route("api/[controller]")] diff --git a/MESApplication/Controllers/RKJController.cs b/MESApplication/Controllers/QC/RKJController.cs similarity index 99% rename from MESApplication/Controllers/RKJController.cs rename to MESApplication/Controllers/QC/RKJController.cs index a6bed3d..3aea949 100644 --- a/MESApplication/Controllers/RKJController.cs +++ b/MESApplication/Controllers/QC/RKJController.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.QC; [Route("api/[controller]")] [ApiController] diff --git a/MESApplication/Controllers/SJController.cs b/MESApplication/Controllers/QC/SJController.cs similarity index 99% rename from MESApplication/Controllers/SJController.cs rename to MESApplication/Controllers/QC/SJController.cs index d634958..107d6b9 100644 --- a/MESApplication/Controllers/SJController.cs +++ b/MESApplication/Controllers/QC/SJController.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.QC; [Route("api/[controller]")] [ApiController] diff --git a/MESApplication/Controllers/SuspendController.cs b/MESApplication/Controllers/QC/SuspendController.cs similarity index 98% rename from MESApplication/Controllers/SuspendController.cs rename to MESApplication/Controllers/QC/SuspendController.cs index 54e8bfa..ff980df 100644 --- a/MESApplication/Controllers/SuspendController.cs +++ b/MESApplication/Controllers/QC/SuspendController.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.QC; [Route("api/[controller]")] [ApiController] diff --git a/MESApplication/Controllers/XJController.cs b/MESApplication/Controllers/QC/XJController.cs similarity index 99% rename from MESApplication/Controllers/XJController.cs rename to MESApplication/Controllers/QC/XJController.cs index 93fe18d..e43cb9f 100644 --- a/MESApplication/Controllers/XJController.cs +++ b/MESApplication/Controllers/QC/XJController.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Mvc; using Newtonsoft.Json.Linq; -namespace MESApplication.Controllers; +namespace MESApplication.Controllers.QC; [Route("api/[controller]")] [ApiController] diff --git a/MESApplication/Controllers/WomcaaController.cs b/MESApplication/Controllers/WomcaaController.cs index 7ca725a..579cf20 100644 --- a/MESApplication/Controllers/WomcaaController.cs +++ b/MESApplication/Controllers/WomcaaController.cs @@ -12,9 +12,8 @@ [Route("api/[controller]")] public class WomcaaController : ControllerBase { - private readonly WomcaaManager m = new(); - private readonly MessageCenterManager _manager = new(); + private readonly WomcaaManager m = new(); private readonly string METHOD = "POST"; @@ -41,9 +40,13 @@ resultInfos.tbBillList = save; entity.Result = 0; - if (save) entity.Result = 1; + entity.DealWith = 0; + if (save) + { + entity.Result = 1; + entity.DealWith = 1; + } - entity.DealWith = 1; _manager.save(entity); return new ResponseResult diff --git a/MESApplication/Startup.cs b/MESApplication/Startup.cs index fb5ae6c..f506f0e 100644 --- a/MESApplication/Startup.cs +++ b/MESApplication/Startup.cs @@ -1,4 +1,6 @@ -锘縰sing Microsoft.OpenApi.Models; +锘縰sing MES.Service.Dto.@base; +using MES.Service.util; +using Microsoft.OpenApi.Models; using Newtonsoft.Json; using Newtonsoft.Json.Serialization; using Swashbuckle.AspNetCore.SwaggerUI; @@ -13,6 +15,8 @@ public Startup(IConfiguration configuration) { Configuration = configuration; + + new AppsettingsUtility().Initial(configuration); } public IConfiguration Configuration { get; } @@ -21,11 +25,16 @@ public void ConfigureServices(IServiceCollection services) { services.AddControllers(); + + // 璇诲彇 绯荤粺 璁剧疆骞舵敞鍏ュ埌鏈嶅姟涓� + services.Configure<AppSettings>( + Configuration.GetSection("AppSettings")); + services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new OpenApiInfo - { Title = "WebFirst.Api", Version = "v1" }); + { Title = "MESApplication.Api", Version = "v1" }); }); //閰嶇疆JSON.NET @@ -42,6 +51,9 @@ // 璁剧疆鍛藉悕绛栫暐涓洪┘宄板懡鍚� opt.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver(); + + //杩斿洖缁欏墠绔殑鏃堕棿鏍煎紡鍖� + opt.SerializerSettings.DateFormatString = "yyyy-MM-dd HH:mm:ss"; }); //閰嶇疆鍙互璺ㄥ煙 diff --git a/MESApplication/appsettings.json b/MESApplication/appsettings.json index 93b64d3..41c8e8b 100644 --- a/MESApplication/appsettings.json +++ b/MESApplication/appsettings.json @@ -6,5 +6,10 @@ "Microsoft.Hosting.Lifetime": "Information" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "AppSettings": { + "TestErpUrl": "http://192.168.11.120:8098/WebService1.asmx/mesToErpinfo", + "ProductionErpUrl": "http://192.168.11.120:8098/WebService1.asmx/mesToErpinfoFormal", + "DataBaseConn": "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.11.251)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = sg_prd; Password=sgprd" + } } diff --git a/MESApplication/bin/Debug/net8.0/MES.Service.dll b/MESApplication/bin/Debug/net8.0/MES.Service.dll index d5dc573..59e24d7 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 254baba..f33968d 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 23beb52..ec28191 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 30d5081..673b7af 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 c74d56f..cd92d34 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/appsettings.json b/MESApplication/bin/Debug/net8.0/appsettings.json index 93b64d3..41c8e8b 100644 --- a/MESApplication/bin/Debug/net8.0/appsettings.json +++ b/MESApplication/bin/Debug/net8.0/appsettings.json @@ -6,5 +6,10 @@ "Microsoft.Hosting.Lifetime": "Information" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "AppSettings": { + "TestErpUrl": "http://192.168.11.120:8098/WebService1.asmx/mesToErpinfo", + "ProductionErpUrl": "http://192.168.11.120:8098/WebService1.asmx/mesToErpinfoFormal", + "DataBaseConn": "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.11.251)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = sg_prd; Password=sgprd" + } } diff --git a/MESApplication/bin/Release/net8.0/MES.Service.dll b/MESApplication/bin/Release/net8.0/MES.Service.dll index fb272f7..3ff9613 100644 --- a/MESApplication/bin/Release/net8.0/MES.Service.dll +++ b/MESApplication/bin/Release/net8.0/MES.Service.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MES.Service.pdb b/MESApplication/bin/Release/net8.0/MES.Service.pdb index d83af0b..e363107 100644 --- a/MESApplication/bin/Release/net8.0/MES.Service.pdb +++ b/MESApplication/bin/Release/net8.0/MES.Service.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.dll b/MESApplication/bin/Release/net8.0/MESApplication.dll index 2ede2b8..ab3cc03 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.dll +++ b/MESApplication/bin/Release/net8.0/MESApplication.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.exe b/MESApplication/bin/Release/net8.0/MESApplication.exe index 30d5081..673b7af 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.exe +++ b/MESApplication/bin/Release/net8.0/MESApplication.exe Binary files differ diff --git a/MESApplication/bin/Release/net8.0/MESApplication.pdb b/MESApplication/bin/Release/net8.0/MESApplication.pdb index 0db718e..e8953a4 100644 --- a/MESApplication/bin/Release/net8.0/MESApplication.pdb +++ b/MESApplication/bin/Release/net8.0/MESApplication.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/appsettings.json b/MESApplication/bin/Release/net8.0/appsettings.json index 93b64d3..41c8e8b 100644 --- a/MESApplication/bin/Release/net8.0/appsettings.json +++ b/MESApplication/bin/Release/net8.0/appsettings.json @@ -6,5 +6,10 @@ "Microsoft.Hosting.Lifetime": "Information" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "AppSettings": { + "TestErpUrl": "http://192.168.11.120:8098/WebService1.asmx/mesToErpinfo", + "ProductionErpUrl": "http://192.168.11.120:8098/WebService1.asmx/mesToErpinfoFormal", + "DataBaseConn": "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.11.251)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = sg_prd; Password=sgprd" + } } diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll index fb272f7..3ff9613 100644 --- a/MESApplication/bin/Release/net8.0/publish/MES.Service.dll +++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb index d83af0b..e363107 100644 --- a/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb +++ b/MESApplication/bin/Release/net8.0/publish/MES.Service.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll index 2ede2b8..ab3cc03 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.dll +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.dll Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe index 30d5081..673b7af 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.exe +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.exe Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb index 0db718e..e8953a4 100644 --- a/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb +++ b/MESApplication/bin/Release/net8.0/publish/MESApplication.pdb Binary files differ diff --git a/MESApplication/bin/Release/net8.0/publish/appsettings.json b/MESApplication/bin/Release/net8.0/publish/appsettings.json index 93b64d3..41c8e8b 100644 --- a/MESApplication/bin/Release/net8.0/publish/appsettings.json +++ b/MESApplication/bin/Release/net8.0/publish/appsettings.json @@ -6,5 +6,10 @@ "Microsoft.Hosting.Lifetime": "Information" } }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "AppSettings": { + "TestErpUrl": "http://192.168.11.120:8098/WebService1.asmx/mesToErpinfo", + "ProductionErpUrl": "http://192.168.11.120:8098/WebService1.asmx/mesToErpinfoFormal", + "DataBaseConn": "Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.11.251)(PORT = 1521))(CONNECT_DATA = (SERVICE_NAME = ORCL))); Persist Security Info=True;User ID = sg_prd; Password=sgprd" + } } -- Gitblit v1.9.3