diff --git a/.vs/SGGL_SeDin_New.slnx/v18/.wsuo b/.vs/SGGL_SeDin_New.slnx/v18/.wsuo new file mode 100644 index 00000000..9f69490a Binary files /dev/null and b/.vs/SGGL_SeDin_New.slnx/v18/.wsuo differ diff --git a/.vs/SGGL_SeDin_New.slnx/v18/DocumentLayout.backup.json b/.vs/SGGL_SeDin_New.slnx/v18/DocumentLayout.backup.json new file mode 100644 index 00000000..75ab69a7 --- /dev/null +++ b/.vs/SGGL_SeDin_New.slnx/v18/DocumentLayout.backup.json @@ -0,0 +1,79 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\\u6570\u636E\\\u8BFA\u5FC5\u8FBE\\\u8D5B\u9F0E\\SGGL_SeDin_New\\", + "Documents": [], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": -1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}" + }, + { + "$type": "Bookmark", + "Name": "ST:133:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:134:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:1:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}" + }, + { + "$type": "Bookmark", + "Name": "ST:131:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:129:0:{13b12e3e-c1b4-4539-9371-4fe9a0d523fc}" + }, + { + "$type": "Bookmark", + "Name": "ST:2:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}" + }, + { + "$type": "Bookmark", + "Name": "ST:3:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1a46fd64-28d5-434c-8eb3-17a02d419b53}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}" + }, + { + "$type": "Bookmark", + "Name": "ST:137:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:138:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:136:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/SGGL_SeDin_New.slnx/v18/DocumentLayout.json b/.vs/SGGL_SeDin_New.slnx/v18/DocumentLayout.json new file mode 100644 index 00000000..7c674097 --- /dev/null +++ b/.vs/SGGL_SeDin_New.slnx/v18/DocumentLayout.json @@ -0,0 +1,95 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\\u6570\u636E\\\u8BFA\u5FC5\u8FBE\\\u8D5B\u9F0E\\SGGL_SeDin_New\\", + "Documents": [], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": -1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}" + }, + { + "$type": "Bookmark", + "Name": "ST:133:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:134:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:1:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}" + }, + { + "$type": "Bookmark", + "Name": "ST:131:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:129:0:{13b12e3e-c1b4-4539-9371-4fe9a0d523fc}" + }, + { + "$type": "Bookmark", + "Name": "ST:2:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}" + }, + { + "$type": "Bookmark", + "Name": "ST:3:0:{f2bd8fb8-fc94-3dae-a733-fd993c73cc87}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1a46fd64-28d5-434c-8eb3-17a02d419b53}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}" + }, + { + "$type": "Bookmark", + "Name": "ST:137:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:138:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:136:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" + }, + { + "$type": "Bookmark", + "Name": "ST:130:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:132:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:131:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index f2dbb8d2..61fd1a62 100644 Binary files a/.vs/SGGL_SeDin_New/v17/.wsuo and b/.vs/SGGL_SeDin_New/v17/.wsuo differ diff --git a/SGGL/BLL/API/HJGL/APIPackagingManageService.cs b/SGGL/BLL/API/HJGL/APIPackagingManageService.cs index b381035f..238a556d 100644 --- a/SGGL/BLL/API/HJGL/APIPackagingManageService.cs +++ b/SGGL/BLL/API/HJGL/APIPackagingManageService.cs @@ -6,30 +6,96 @@ using System.Linq; namespace BLL { public class APIPackagingManageService + { - public static List GetPackagingManageList(string projectId) + public static List GetPackagingManageList(PackagingManageInput filter, int pageIndex, int pageSize, out int totalCount) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var q = (from x in db.HJGL_PackagingManage - join n in db.Base_Project on x.ProjectId equals n.ProjectId - join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt - from t in tt.DefaultIfEmpty() - where x.ProjectId == projectId + // base join query to include project and receive person + var baseQuery = from x in db.HJGL_PackagingManage + join n in db.Base_Project on x.ProjectId equals n.ProjectId + join m in db.Person_Persons on x.ReceiveMan equals m.PersonId into tt + from t in tt.DefaultIfEmpty() + select new { x, n, t }; + + if (filter != null) + { + if (!string.IsNullOrEmpty(filter.PackagingManageId)) + { + baseQuery = baseQuery.Where(z => z.x.PackagingManageId == filter.PackagingManageId); + } + if (!string.IsNullOrEmpty(filter.PackagingCode)) + { + baseQuery = baseQuery.Where(z => z.x.PackagingCode.Contains(filter.PackagingCode)); + } + if (!string.IsNullOrEmpty(filter.ProjectId)) + { + baseQuery = baseQuery.Where(z => z.x.ProjectId == filter.ProjectId); + } + if (!string.IsNullOrEmpty(filter.ProjectName)) + { + baseQuery = baseQuery.Where(z => z.n.ProjectName.Contains(filter.ProjectName)); + } + if (!string.IsNullOrEmpty(filter.ContactName)) + { + baseQuery = baseQuery.Where(z => z.x.ContactName.Contains(filter.ContactName)); + } + if (!string.IsNullOrEmpty(filter.ContactPhone)) + { + baseQuery = baseQuery.Where(z => z.x.ContactPhone.Contains(filter.ContactPhone)); + } + if (!string.IsNullOrEmpty(filter.StackingPosition)) + { + baseQuery = baseQuery.Where(z => z.x.StackingPosition.Contains(filter.StackingPosition)); + } + if (filter.State != null) + { + baseQuery = baseQuery.Where(z => z.x.State == filter.State); + } + if (!string.IsNullOrEmpty(filter.ReceiveMan)) + { + baseQuery = baseQuery.Where(z => z.x.ReceiveMan == filter.ReceiveMan || (z.t != null && z.t.PersonName.Contains(filter.ReceiveMan))); + } + if (!string.IsNullOrEmpty(filter.ReceiveDate)) + { + DateTime dt; + if (DateTime.TryParse(filter.ReceiveDate, out dt)) + { + var start = dt.Date; + var end = start.AddDays(1); + baseQuery = baseQuery.Where(z => z.x.ReceiveDate != null && z.x.ReceiveDate >= start && z.x.ReceiveDate < end); + } + } + if (!string.IsNullOrEmpty(filter.TrainNumberId)) + { + baseQuery = baseQuery.Where(z => z.x.TrainNumber != null && z.x.TrainNumber.Contains(filter.TrainNumberId)); + } + } + + baseQuery = baseQuery.OrderByDescending(z => (z.x.ReceiveDate ?? DateTime.MinValue)).ThenBy(z => z.x.PackagingCode); + + var q = (from z in baseQuery select new PackagingManageDetailItem { - PackagingManageId = x.PackagingManageId, - PackagingCode = x.PackagingCode, - ProjectName = n.ProjectName, - ContactName = x.ContactName, - ContactPhone = x.ContactPhone, - StackingPosition = x.StackingPosition, - State = x.State, - ReceiveMan = t.PersonName, - ReceiveDate = string.Format("{0:g}", x.ReceiveDate), - TrainNumber = x.TrainNumber, + PackagingManageId = z.x.PackagingManageId, + PackagingCode = z.x.PackagingCode, + ProjectName = z.n.ProjectName, + ContactName = z.x.ContactName, + ContactPhone = z.x.ContactPhone, + StackingPosition = z.x.StackingPosition, + State = z.x.State, + ReceiveMan = z.t.PersonName, + ReceiveDate = string.Format("{0:g}", z.x.ReceiveDate), + TrainNumber = z.x.TrainNumber, }).Distinct(); - return q.ToList(); + + totalCount = q.Count(); + + if (pageIndex <=0) pageIndex =1; + if (pageSize <=0) pageSize =20; + + return q.Skip((pageIndex -1) * pageSize).Take(pageSize).ToList(); } } @@ -190,8 +256,6 @@ namespace BLL } } } - - public static string GetNewPackagingCode(string projectId) { return HJGLPackagingmanageService.GetNewPackagingCode(projectId); diff --git a/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs b/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs index 0a1541ac..b9aa8205 100644 --- a/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs +++ b/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs @@ -1,5 +1,8 @@ +using EmitMapper; using FineUIPro; +using MiniExcelLibs; using Model; +using System; using System.Collections; using System.Collections.Generic; using System.Linq; @@ -190,5 +193,96 @@ namespace BLL } + + public static ResponeData ImportData( string path, string projectid) + { + var responeData = new ResponeData(); + try + { + List temeplateDtoIns = MiniExcel.Query(path, startCell: "A1").ToList(); + + if (temeplateDtoIns == null || temeplateDtoIns.Count ==0) + { + responeData.code =0; + responeData.message = "导入数据为空!"; + return responeData; + } + + // 提取材质编码并验证非空 + var materialCodes = new List(); + foreach (var row in temeplateDtoIns) + { + var code = (row.MaterialCode ?? string.Empty).Trim(); + if (string.IsNullOrWhiteSpace(code)) + { + responeData.code =0; + responeData.message = "导入数据中材质列不能为空!"; + return responeData; + } + materialCodes.Add(code); + } + + var materialCodeList = materialCodes.Distinct().ToList(); + + // 从数据库验证这些材质编码是否存在 + var existMaterials = (from m in Funs.DB.Base_Material + where materialCodeList.Contains(m.MaterialCode) + select new { m.MaterialCode, m.MaterialId }).ToList(); + + var existCodes = existMaterials.Select(x => x.MaterialCode).ToList(); + var notExist = materialCodeList.Except(existCodes).ToList(); + if (notExist.Count >0) + { + responeData.code =0; + responeData.message = string.Join(",", notExist) + " 材质不存在!"; + return responeData; + } + + // 插入数据 + foreach (var row in temeplateDtoIns) + { + var code = (row.MaterialCode ?? string.Empty).Trim(); + var mat = existMaterials.FirstOrDefault(x => x.MaterialCode == code); + if (mat == null) + { + responeData.code =0; + responeData.message = code + " 材质不存在!"; + return responeData; + } + + var colorName = string.IsNullOrWhiteSpace(row.ColorName) ? "—" : row.ColorName.Trim(); + var colorCardNo = string.IsNullOrWhiteSpace(row.ColorCardNo) ? "—" : row.ColorCardNo.Trim(); + var rgb = string.IsNullOrWhiteSpace(row.RGB) ? null : row.RGB.Trim(); + var remark = string.IsNullOrWhiteSpace(row.Remark) ? null : row.Remark.Trim(); + + Model.Base_MaterialColor table = new Model.Base_MaterialColor + { + MaterialColorId = BLL.SQLHelper.GetNewID(typeof(Model.Base_MaterialColor)), + UnitId = string.Empty, + ProjectId = projectid, + MaterialId = mat.MaterialId, + ColorName = colorName, + ColorCardNo = colorCardNo, + RGB = rgb, + Remark = remark + }; + Funs.DB.Base_MaterialColor.InsertOnSubmit(table); + } + + Funs.DB.SubmitChanges(); + + responeData.code =1; + responeData.message = "导入成功!"; + responeData.data = temeplateDtoIns.Count; + return responeData; + } + catch (Exception ex) + { + responeData.code =0; + responeData.message = "导入失败:" + ex.ToString(); + return responeData; + } + } + } } \ No newline at end of file diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs index 39c69551..ef028fa0 100644 --- a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs +++ b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs @@ -35,7 +35,12 @@ namespace BLL { "棰勫埗鏁d欢" ,(int)TypeInt.棰勫埗鏁d欢}, { "鍏朵粬鏉愭枡" ,(int)TypeInt.鍏朵粬鏉愭枡}, }; - + public static Dictionary CategoryIntMap = new Dictionary + { + { "鎵撴崋" ,(int)CategoryInt.鎵撴崋}, + { "瑁呯" ,(int)CategoryInt.瑁呯}, + { "鏁h" ,(int)CategoryInt.鏁h}, + }; #endregion Fields #region Enums @@ -46,6 +51,12 @@ namespace BLL 棰勫埗鏁d欢 = 20, 鍏朵粬鏉愭枡 = 30, } + public enum CategoryInt : int + { + 鎵撴崋 = 10, + 瑁呯 = 20, + 鏁h = 30, + } #endregion Enums @@ -73,6 +84,7 @@ namespace BLL TrainNumber = newtable.TrainNumber, TrainNumberId = newtable.TrainNumberId, TypeInt = newtable.TypeInt, + CategoryInt = newtable.CategoryInt, CompileMan = newtable.CompileMan, CompileDate = newtable.CompileDate }; @@ -227,7 +239,9 @@ namespace BLL StackingPosition = x.StackingPosition, State = x.State, TypeInt = x.TypeInt, + CategoryInt = x.CategoryInt, TypeString = GetTypeString(x.TypeInt), + CategoryString = GetCategoryString(x.CategoryInt), ReceiveMan = train.ContactName,//t.PersonName, ReceiveDate = x.ReceiveDate.HasValue ? string.Format("{0:g}", x.ReceiveDate) : "", PlanStartDate = GetMinPlanStartDate(x.PackagingManageId), @@ -261,7 +275,10 @@ namespace BLL { return TypeIntMap.FirstOrDefault(c => c.Value == TypeInt).Key; } - + public static string GetCategoryString(int? CategoryInt) + { + return CategoryIntMap.FirstOrDefault(c => c.Value == CategoryInt).Key; + } /// /// 绠$嚎涓嬫媺妗 /// @@ -313,6 +330,7 @@ namespace BLL table.TrainNumber = newtable.TrainNumber; table.TrainNumberId = newtable.TrainNumberId; table.TypeInt = newtable.TypeInt; + table.CategoryInt = newtable.CategoryInt; db1.SubmitChanges(); } } @@ -344,6 +362,9 @@ namespace BLL public string TrainNumberOld { get; set; } public int? TypeInt { get; set; } public string TypeString { get; set; } + public int? CategoryInt { get; set; } + public string CategoryString { get; set; } + #endregion Properties } diff --git a/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs b/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs index 17572a55..26e0edb0 100644 --- a/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs +++ b/SGGL/BLL/HJGL/PreDesign/TrainNumberManageService.cs @@ -1,19 +1,11 @@ -锘縰sing System.Collections.Generic; +锘縰sing System; +using System.Collections.Generic; using System.Linq; namespace BLL { public static class TrainNumberManageService - { - /// - /// 璁板綍鏁 - /// - public static int Count - { - get; - set; - } - + { private static IQueryable GetByQueryModle(Model.HJGL_TrainNumberManage table) { var q = from x in Funs.DB.HJGL_TrainNumberManage select x; @@ -71,11 +63,11 @@ namespace BLL return GetByQueryModle(table).ToList(); } - public static (List Data, int Total) GetListByQueryModle(Model.HJGL_TrainNumberManage table, int pageIndex = 0, int pageSize = 20) + public static (List Data, int Total) GetListByQueryModle(Model.HJGL_TrainNumberManage table, int pageIndex = 1, int pageSize = 20) { var baseQuery = GetByQueryModle(table); var pagedData = baseQuery - .Skip((pageIndex) * pageSize) + .Skip((pageIndex-1) * pageSize) .Take(pageSize) .ToList(); @@ -94,10 +86,10 @@ namespace BLL public static string GetNewTrainNumber(string ProjectId) { var q = from x in Funs.DB.HJGL_TrainNumberManage - where x.ProjectId == ProjectId + where x.ProjectId == ProjectId select x.TrainNumber; var max = q.Count(); - var NewTrainNumber = (max + 1).ToString().PadLeft(2, '0'); + var NewTrainNumber = string.Format("{0:yyyyMMdd}", DateTime.Now)+"-"+(max + 1).ToString().PadLeft(3, '0'); return NewTrainNumber; } diff --git a/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs b/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs index 966c6fbc..10d93ac4 100644 --- a/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs +++ b/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs @@ -353,13 +353,15 @@ namespace BLL dt.Columns.Add("PipelineCode"); dt.Columns.Add("ManterialCode"); dt.Columns.Add("Specification"); + dt.Columns.Add("MaterialColor"); for (int i = 0; i < tb.Rows.Count; i++) { var newRows = dt.NewRow(); newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString(); - newRows["ManterialCode"] = getMaterialCodeByPipelineId(tb.Rows[i]["PipelineId"].ToString()); + newRows["ManterialCode"] = getMaterialCodeByPipelineId(tb.Rows[i]["PipelineId"].ToString(),out string MaterialColor); newRows["Specification"] = getSpecificationByPipelineId(tb.Rows[i]["PipelineId"].ToString()); + newRows["MaterialColor"] = MaterialColor; dt.Rows.Add(newRows); } @@ -878,18 +880,47 @@ namespace BLL #region 鏍煎紡鍖栧瓧绗︿覆 - public static string getMaterialCodeByPipelineId(string pipelineId) + public static string getMaterialCodeByPipelineId(string pipelineId, out string materialColor) { string materialCode = string.Empty; + materialColor = string.Empty; if (!string.IsNullOrEmpty(pipelineId)) { var weldjoint = (from x in Funs.DB.HJGL_WeldJoint join y in Funs.DB.Base_Material on x.Material1Id equals y.MaterialId join z in Funs.DB.Base_Material on x.Material2Id equals z.MaterialId where x.PipelineId == pipelineId - select new { MaterialCode1 = y.MaterialCode, MaterialCode2 = z.MaterialCode }).FirstOrDefault(); + select new + { + MaterialId1 = y.MaterialId, + MaterialCode1 = y.MaterialCode, + MaterialId2 = z.MaterialId, + MaterialCode2 = z.MaterialCode, + x.ProjectId, + }).FirstOrDefault(); if (weldjoint != null) { + if (!string.IsNullOrEmpty(weldjoint.MaterialId1)) + { + var projectSet = Project_SysSetService.GetSysSetBySetId("11", weldjoint.ProjectId); + Model.BaseMaterialcolorOutput queryModel = new Model.BaseMaterialcolorOutput(); + queryModel.ProjectId = weldjoint.ProjectId; + queryModel.MaterialId = weldjoint.MaterialId1; + var material1 = BLL.BaseMaterialcolorService.GetListByQueryModle(queryModel).FirstOrDefault(); + if (material1 != null) + { + if (projectSet != null && projectSet.SetValue == "1") + { + materialColor = material1.ColorName; + } + else + { + materialColor= material1.ColorCardNo; + } + } + + } + if (!string.IsNullOrEmpty(weldjoint.MaterialCode1) && !string.IsNullOrEmpty(weldjoint.MaterialCode2)) { materialCode = weldjoint.MaterialCode1 + "/" + weldjoint.MaterialCode2; @@ -908,8 +939,7 @@ namespace BLL } } return materialCode; - } - + } public static string getSpecificationByPipelineId(string pipelineId) { string spcificaation = string.Empty; diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs index 1bc23022..a72bc895 100644 --- a/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/PipelineComponentService.cs @@ -497,6 +497,7 @@ namespace BLL Model.SGGLDB db = Funs.DB; var q = (from x in db.HJGL_Pipeline_Component join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId + orderby y.PipelineCode,x.PipelineComponentCode where y.ProjectId.Contains(projectId) && x.State.Equals(State1) && (string.IsNullOrEmpty(pipelineCode) || y.PipelineCode.Contains(pipelineCode)) && (string.IsNullOrEmpty(pipelineComponentCode) || x.PipelineComponentCode.Contains(pipelineComponentCode)) && diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/绠¢亾棰滆壊鏍囪瘑搴撳鍏ユā鏉.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/绠¢亾棰滆壊鏍囪瘑搴撳鍏ユā鏉.xlsx new file mode 100644 index 00000000..1339c4b9 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/绠¢亾棰滆壊鏍囪瘑搴撳鍏ユā鏉.xlsx differ diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/绠¢亾鍘嬪姏璇曢獙鎶鏈姹.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/绠¢亾鍘嬪姏璇曢獙鎶鏈姹.frx index dc0a28f4..31b750af 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/绠¢亾鍘嬪姏璇曢獙鎶鏈姹.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/绠¢亾鍘嬪姏璇曢獙鎶鏈姹.frx @@ -1,5 +1,5 @@ 锘 - + @@ -56,15 +56,15 @@ - - - - - - - - - + + + + + + + + + @@ -74,7 +74,7 @@ - + @@ -87,7 +87,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -113,7 +113,7 @@ - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/绠¢亾鏉愭枡鏉愯川鏍囪瘑妫鏌ヨ褰.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/绠¢亾鏉愭枡鏉愯川鏍囪瘑妫鏌ヨ褰.frx index 79ccb503..569a5c72 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/绠¢亾鏉愭枡鏉愯川鏍囪瘑妫鏌ヨ褰.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/绠¢亾鏉愭枡鏉愯川鏍囪瘑妫鏌ヨ褰.frx @@ -1,5 +1,5 @@ 锘 - + using System; using System.Collections; using System.Collections.Generic; @@ -42,11 +42,12 @@ namespace FastReport } - + + @@ -107,7 +108,7 @@ namespace FastReport - + @@ -125,7 +126,7 @@ namespace FastReport - + @@ -135,8 +136,8 @@ namespace FastReport - - + + @@ -165,7 +166,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/瑁呯鍗.frx b/SGGL/FineUIPro.Web/File/Fastreport/瑁呯鍗.frx index ef8357f2..b6bffbde 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/瑁呯鍗.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/瑁呯鍗.frx @@ -1,5 +1,5 @@ 锘 - + using System; using System.Collections; using System.Collections.Generic; @@ -42,7 +42,7 @@ namespace FastReport } - + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 988a2753..aa834918 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1487,7 +1487,7 @@ - + @@ -10108,12 +10108,12 @@ MaterialColorEdit.aspx - - MaterialColorInaspx.aspx + + MaterialColorIn.aspx ASPXCodeBehind - - MaterialColorInaspx.aspx + + MaterialColorIn.aspx MaterialEdit.aspx @@ -16835,12 +16835,11 @@ 3 0 primary - False True - + diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx index 8564fed7..4165bcb0 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx @@ -43,9 +43,12 @@ + + + - + @@ -57,7 +60,7 @@ + FieldType="String" HeaderText="鏉愯川" TextAlign="Left" HeaderTextAlign="Center" > @@ -66,7 +69,7 @@ FieldType="String" HeaderText="鑹插崱鍙" TextAlign="Left" HeaderTextAlign="Center" > + FieldType="String" HeaderText="RGB" TextAlign="Left" HeaderTextAlign="Center" > diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs index e91bb6ea..6b12fcf9 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs @@ -238,6 +238,13 @@ namespace FineUIPro.Web.HJGL.BaseInfo return sb.ToString(); } - #endregion + #endregion + + #region 瀵煎叆鎸夐挳 + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MaterialColorIn.aspx?", "瀵煎叆 - "))); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.designer.cs index 7853f4ba..b3caa8a5 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.designer.cs @@ -68,6 +68,15 @@ namespace FineUIPro.Web.HJGL.BaseInfo /// protected global::FineUIPro.Button btnNew; + /// + /// btnImport 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Button btnImport; + /// /// btnOut 鎺т欢銆 /// diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx new file mode 100644 index 00000000..4f5262f5 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx @@ -0,0 +1,35 @@ +锘<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialColorIn.aspx.cs" Inherits="FineUIPro.Web.HJGL.BaseInfo.MaterialColorIn" %> + + + + + + + 绠¢亾棰滆壊鏍囪瘑搴撳鍏 + + +
+ + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx.cs new file mode 100644 index 00000000..4b463c73 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx.cs @@ -0,0 +1,142 @@ +锘縰sing BLL; +using Model; +using System; +using System.IO; +using System.Text; +using System.Web; + +namespace FineUIPro.Web.HJGL.BaseInfo +{ + public partial class MaterialColorIn : PageBase + { + #region 鍔犺浇 + + + /// + /// 鍔犺浇椤甸潰 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + } + } + + #endregion + + #region 瀵煎叆 + + /// + /// 瀵煎叆 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + var message = string.Empty; + errorInfos = string.Empty; + if (fuAttachUrl.HasFile == false) + { + ShowNotify("璇烽夋嫨Excel鏂囦欢!", MessageBoxIcon.Warning); + return; + } + + var IsXls = Path.GetExtension(fuAttachUrl.FileName).Trim().ToLower(); + if (IsXls != ".xlsx") + { + ShowNotify("鍙兘閫夋嫨Excel鏂囦欢!", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(errorInfos)) errorInfos = string.Empty; + var rootPath = Server.MapPath("~/"); + var initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) Directory.CreateDirectory(initFullPath); + //鎸囧畾涓婁紶鏂囦欢鍚嶇О + hdFileName.Text = Funs.GetNewFileName() + IsXls; + //涓婁紶鏂囦欢璺緞 + var filePath = initFullPath + hdFileName.Text; + //鏂囦欢涓婁紶鏈嶅姟鍣 + fuAttachUrl.PostedFile.SaveAs(filePath); + //鏂囦欢涓婁紶鏈嶅姟鍣ㄥ悗鐨勫悕绉 + var fileName = rootPath + initPath + hdFileName.Text; + + ResponeData responeData; + responeData = TwInOutplanmasterService.ImportData(fuAttachUrl.FileName, fileName, this.CurrUser.LoginProjectId, this.CurrUser.PersonId); + + + if (responeData.code == 1) + { + ShowNotify("鏁版嵁瀵煎叆鎴愬姛!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert alert = new Alert(); + alert.Message = responeData.message; + alert.MessageBoxIcon = MessageBoxIcon.Error; + alert.Show(); + } + } + + #endregion + + #region 瀹氫箟椤 + + /// + /// 涓婁紶棰勮鐨勮櫄鎷熻矾寰 + /// + private readonly string initPath = Const.ExcelUrl; //"File\\Excel\\DataIn\\"; + + /// + /// 閿欒闆嗗悎 + /// + public static string errorInfos = string.Empty; + + #endregion + + #region 妯℃澘涓嬭浇 + + /// + /// 妯℃澘涓嬭浇 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("纭畾瑕佷笅杞芥ā鏉垮悧?", string.Empty, + MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), + PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 涓嬭浇瀵煎叆妯℃澘 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + var rootPath = Server.MapPath("~/"); + var uploadfilepath = rootPath + Const.Tw_InPlanMasteTemplateUrl; + var filePath = Const.Tw_InPlanMasteTemplateUrl; + var fileName = Path.GetFileName(filePath); + var info = new FileInfo(uploadfilepath); + var fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", + "attachment;filename=" + HttpUtility.UrlEncode(fileName, Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx.designer.cs new file mode 100644 index 00000000..d6656931 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorIn.aspx.designer.cs @@ -0,0 +1,98 @@ +锘//------------------------------------------------------------------------------ +// <鑷姩鐢熸垚> +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆 +// +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉 +// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵鍋氭洿鏀瑰皢涓㈠け銆 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.BaseInfo +{ + + + public partial class MaterialColorIn + { + + /// + /// form1 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar1 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnImport 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// hdFileName 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.HiddenField hdFileName; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx deleted file mode 100644 index 8e0c8a16..00000000 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx +++ /dev/null @@ -1,16 +0,0 @@ -锘<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialColorInaspx.aspx.cs" Inherits="FineUIPro.Web.HJGL.BaseInfo.MaterialColorInaspx" %> - - - - - - - - - -
-
-
-
- - diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.cs deleted file mode 100644 index 7a29323f..00000000 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.cs +++ /dev/null @@ -1,12 +0,0 @@ -锘縰sing System; - -namespace FineUIPro.Web.HJGL.BaseInfo -{ - public partial class MaterialColorInaspx : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - - } - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.designer.cs deleted file mode 100644 index 6a2c9880..00000000 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.designer.cs +++ /dev/null @@ -1,26 +0,0 @@ -锘//------------------------------------------------------------------------------ -// -// 姝や唬鐮佹槸鐢卞伐鍏风敓鎴愮殑銆 -// -// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋 -// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web.HJGL.BaseInfo -{ - - - public partial class MaterialColorInaspx - { - - /// - /// form1 鎺т欢銆 - /// - /// - /// 鑷姩鐢熸垚鐨勫瓧娈点 - /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - } -} diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx index 62d2da0f..7ab340a6 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx @@ -22,6 +22,7 @@ + @@ -56,6 +57,11 @@ EmptyText="杈撳叆鏌ヨ鏉′欢" Width="240px" LabelWidth="100px" LabelAlign="Right"> + + + + +
- - - @@ -104,7 +110,7 @@ FieldType="String" HeaderText="杞︽" HeaderTextAlign="Center" TextAlign="Left"> - diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs index cc196643..0a4212f6 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs @@ -1,5 +1,6 @@ 锘縰sing BLL; using MiniExcelLibs; +using Model; using System; using System.Collections.Generic; using System.Data; @@ -12,7 +13,7 @@ namespace FineUIPro.Web.HJGL.PreDesign public partial class InstallList : PageBase { public int pageSize = 20; - public static DataTable GridDataTable = new DataTable(); + public static IQueryable GridDataTable = null; protected void Page_Load(object sender, EventArgs e) { @@ -213,11 +214,10 @@ namespace FineUIPro.Web.HJGL.PreDesign private void BindGrid() { if (tvControlItem.SelectedNode == null) return; - DataTable tb = BindData(); - GridDataTable = tb; - // 2.鑾峰彇褰撳墠鍒嗛〉鏁版嵁 - Grid1.RecordCount = tb.Rows.Count; - var table = this.GetPagedDataTable(Grid1, tb); + var view_HJGL_InstallDatas = BindData(Grid1.PageIndex+1, Grid1.PageSize,out int totalCount); + // 2.鑾峰彇褰撳墠鍒嗛〉鏁版嵁 + Grid1.RecordCount = totalCount; + var table = view_HJGL_InstallDatas; Grid1.DataSource = table; Grid1.DataBind(); } @@ -226,63 +226,33 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 鏌ヨ鏁版嵁 /// /// - private DataTable BindData() + private List BindData(int pageIndex, int pageSize, out int totalCount) { - string strSql = @"WITH cte as (select newid()as id,pipeline.PipelineCode as PipelineCode, - comonent.PipelineComponentCode as PipelineComponentCode, - '棰勫埗缁勪欢' as Stype, - '' as matdef, - packdetail.Number as Number, - pack.PackagingCode as PackagingCode, - trainnumber.TrainNumber as TrainNumber, - pipeline.FlowingSection as FlowingSection, - pipeline.UnitWorkId as UnitWorkId - from HJGL_Pipeline pipeline - left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId - left join HJGL_Pipeline_Component comonent - on packdetail.PipelineComponentId = comonent.PipelineComponentId - left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId - left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id - where (packdetail.PipelineComponentId is not null or packdetail.PipelineComponentId != '') - union all - select newid()as id,pipeline.PipelineCode as PipelineCode, - packdetail.MaterialCode as PipelineComponentCode, - '棰勫埗鏁d欢' as Stype, - matlib.MaterialDef as matdef, - packdetail.Number as Number, - pack.PackagingCode as PackagingCode, - trainnumber.TrainNumber as TrainNumber, - pipeline.FlowingSection as FlowingSection, - pipeline.UnitWorkId as UnitWorkId - from HJGL_Pipeline pipeline - left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId - left join HJGL_MaterialCodeLib matlib on packdetail.MaterialCode = matlib.MaterialCode - left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId - left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id - where (packdetail.PipelineComponentId is null or packdetail.PipelineComponentId = '')) - SELECT * FROM cte WHERE 1=1 "; - List listStr = new List(); + var baseQuery=from x in Funs.DB.View_HJGL_InstallData + where x.ProjectId == this.CurrUser.LoginProjectId + select x; if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2) { - strSql += " and cte.UnitWorkId =@UnitWorkId"; - listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNodeID)); + baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.NodeID); } else if (tvControlItem.SelectedNode.CommandName == "娴佹按娈") { - strSql += " and cte.FlowingSection = @FlowingSection "; - listStr.Add(new SqlParameter("@FlowingSection", this.tvControlItem.SelectedNode.Text)); - } + baseQuery = baseQuery.Where(x => x.UnitWorkId == tvControlItem.SelectedNode.ParentNode.NodeID && x.FlowingSection == tvControlItem.SelectedNode.Text); + } if (!string.IsNullOrEmpty(txtPipelineCode2.Text)) { - strSql += " AND cte.PipelineCode like @PipelineCode"; - listStr.Add(new SqlParameter("@PipelineCode", "%" + this.txtPipelineCode2.Text.Trim() + "%")); - } + baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode2.Text.Trim())); + + } if (!string.IsNullOrEmpty(txtPipelineComponentCode.Text)) { - strSql += " AND cte.PipelineComponentCode like @PipelineComponentCode"; - listStr.Add(new SqlParameter("@PipelineComponentCode", "%" + this.txtPipelineComponentCode.Text.Trim() + "%")); + baseQuery = baseQuery.Where(x => x.Code.Contains(txtPipelineComponentCode.Text.Trim())); + } + if (!string.IsNullOrEmpty(drpTypeStr.SelectedValue)) + { + baseQuery = baseQuery.Where(x => x.TypeStr.Contains(drpTypeStr.SelectedValue)); } //if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null) //{ @@ -291,13 +261,17 @@ namespace FineUIPro.Web.HJGL.PreDesign //} if (!string.IsNullOrEmpty(txtPipelineCode.Text)) { - strSql += " AND cte.PipelineCode like @pipeline"; - listStr.Add(new SqlParameter("@pipeline", "%" + this.txtPipelineCode.Text.Trim() + "%")); - } - strSql += " ORDER BY PipelineCode,PipelineComponentCode "; - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - return tb; + baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(txtPipelineCode.Text.Trim())); + + } + baseQuery = baseQuery.OrderBy(x => x.PipelineCode).ThenBy(x => x.Code); + totalCount = baseQuery.Count(); + GridDataTable = baseQuery; + // 鍒嗛〉淇濇姢 + if (pageIndex <= 0) pageIndex = 1; + if (pageSize <= 0) pageSize = 10; + var query = baseQuery.Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList(); + return query; } #endregion @@ -392,17 +366,17 @@ namespace FineUIPro.Web.HJGL.PreDesign { if (GridDataTable != null) { - var q = (from x in GridDataTable.AsEnumerable() + var q = (from x in GridDataTable select new { - 绠$嚎鍙 = x.Field("PipelineCode"), - 绫诲瀷 = x.Field("Stype"), - 缁勪欢缂栧彿 = x.Field("PipelineComponentCode"), - 棰勫埗鏁d欢鏉愭枡鎻忚堪 = !string.IsNullOrWhiteSpace(x.Field("matdef")) ? x.Field("matdef") : "-", - 鏁伴噺 = x.Field("Number"), - 鎵鍦ㄥ寘瑁呯紪鍙 = x.Field("PackagingCode"), - 杞︽ = x.Field("TrainNumber"), - 娴佹按娈 = x.Field("FlowingSection") + 绠$嚎鍙 = x.PipelineCode, + 绫诲瀷 = x.TypeStr, + 缂栧彿 = x.Code, + 棰勫埗鏁d欢鏉愭枡鎻忚堪 = x.Matdef??"-", + 鏁伴噺 = x.Number, + 鎵鍦ㄥ寘瑁呯紪鍙 = x.PackagingCode, + 杞︽ = x.TrainNumber, + 娴佹按娈 = x.FlowingSection }); string path = Funs.RootPath + @"File\Excel\Temp\PrePipelineInstallList.xlsx"; path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ".xlsx"); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.designer.cs index e7f9d40b..f8aea7a7 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.designer.cs @@ -131,6 +131,15 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected global::FineUIPro.TextBox txtPipelineComponentCode; + /// + /// drpTypeStr 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.DropDownList drpTypeStr; + /// /// ToolbarFill2 鎺т欢銆 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx index d1265202..3e334bbb 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx @@ -43,6 +43,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx index 36d10e48..bc3c4644 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx @@ -17,11 +17,19 @@ - - + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs index 678a2e53..903e2f8b 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs @@ -30,7 +30,10 @@ namespace FineUIPro.Web.HJGL.PreDesign drpTypeInt.DataSource = HJGLPackagingmanageService.TypeIntMap; drpTypeInt.DataBind(); - + droCategoryInt.DataTextField = "Key"; + droCategoryInt.DataValueField = "Value"; + droCategoryInt.DataSource = HJGLPackagingmanageService.CategoryIntMap; + droCategoryInt.DataBind(); btnClose.OnClientClick = ActiveWindow.GetHideReference(); if (!string.IsNullOrEmpty(PackagingManageId)) { @@ -41,6 +44,7 @@ namespace FineUIPro.Web.HJGL.PreDesign txtStackingPosition.Text = model.StackingPosition; drpTrainNumber.SelectedValue = model.TrainNumberId; drpTypeInt.SelectedValue = model.TypeInt.ToString(); + droCategoryInt.SelectedValue = model.CategoryInt.ToString(); if (model.State == HJGLPackagingmanageService.state_0) { btnSave.Hidden = false; @@ -92,6 +96,7 @@ namespace FineUIPro.Web.HJGL.PreDesign //table.ContactPhone = txtContactPhone.Text; table.TrainNumberId = drpTrainNumber.SelectedValue; table.TypeInt = int.Parse(drpTypeInt.SelectedValue); + table.CategoryInt = int.Parse(droCategoryInt.SelectedValue); table.CompileMan = this.CurrUser.PersonId; table.CompileDate = DateTime.Now; if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.棰勫埗缁勪欢).ToString()) @@ -115,6 +120,7 @@ namespace FineUIPro.Web.HJGL.PreDesign //table.ContactPhone =txtContactPhone.Text; table.TrainNumberId = drpTrainNumber.SelectedValue; table.TypeInt = int.Parse(drpTypeInt.SelectedValue); + table.CategoryInt = int.Parse(droCategoryInt.SelectedValue); if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.棰勫埗缁勪欢).ToString()) { table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs index 94d3a3bc..54fcc8b9 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs @@ -50,6 +50,15 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected global::FineUIPro.TextBox txtPackagingCode; + /// + /// droCategoryInt 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.DropDownList droCategoryInt; + /// /// drpTypeInt 鎺т欢銆 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx index cdf3eee1..d305bd76 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx @@ -17,7 +17,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs index 490b8fb1..8949828e 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManageEdit.aspx.cs @@ -50,7 +50,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } else { - this.txtTrainNumber.Text = TrainNumberManageService.GetNewTrainNumber(this.CurrUser.LoginProjectId); + this.txtTrainNumber.Text = TrainNumberManageService.GetNewTrainNumber(this.CurrUser.LoginProjectId); } } } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx index b2e48c44..bd4c5b85 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx @@ -58,7 +58,7 @@ + FieldType="String" HeaderText="鍙戣揣缂栧彿" TextAlign="Left" HeaderTextAlign="Center"> diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs index 1f4b6d1d..e5db270e 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs @@ -31,7 +31,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage(); table.ProjectId = this.CurrUser.LoginProjectId; - var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize); + var tb = BLL.TrainNumberManageService.GetListByQueryModle(table, Grid1.PageIndex+1, Grid1.PageSize); Grid1.RecordCount = tb.Total; Grid1.DataSource = tb.Data; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs index 43881072..930a9e1b 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageComplete.aspx.cs @@ -134,6 +134,10 @@ namespace FineUIPro.Web.HJGL.TestPackage tn1.Text = q.UnitWorkName + "(宸插畬鎴" + unitWorkTestPackagePassPercent + "%)"; tn1.ToolTip = "鏂藉伐鍗曚綅锛" + unitNamesUnitIds; tn1.CommandName = "鍗曚綅宸ョ▼"; + if (unitWorkTestPackagePassPercent==100) + { + tn1.CssClass = "Green"; + } rootNode1.Nodes.Add(tn1); var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList(); BindNodes(tn1, testPackageUnitList); @@ -151,6 +155,10 @@ namespace FineUIPro.Web.HJGL.TestPackage tn2.Text = q.UnitWorkName + "(宸插畬鎴" + unitWorkTestPackagePassPercent + "%)"; tn2.ToolTip = "鏂藉伐鍗曚綅锛" + unitNamesUnitIds; tn2.CommandName = "鍗曚綅宸ョ▼"; + if (unitWorkTestPackagePassPercent == 100) + { + tn2.CssClass = "Green"; + } rootNode2.Nodes.Add(tn2); var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList(); BindNodes(tn2, testPackageUnitList); diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx index f4e8566e..78c9b1f4 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx @@ -14,7 +14,7 @@ - + @@ -49,7 +49,15 @@ - + + + + + + + + + @@ -99,8 +107,8 @@ - - + + - + @@ -131,7 +139,6 @@ <%-- --%> - diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs index b7f8daa0..657b9e40 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.cs @@ -1,6 +1,8 @@ 锘縰sing BLL; using System; using System.Linq; +using System.Collections.Generic; +using FineUIPro; namespace FineUIPro.Web.common.ProjectSet { @@ -48,595 +50,292 @@ namespace FineUIPro.Web.common.ProjectSet ShowNotify("璇烽夋嫨椤圭洰锛", MessageBoxIcon.Warning); return; } - #region 鐒婃帴 - // 鐒婃帴 - Model.Project_Sys_Set dayReport = BLL.Project_SysSetService.GetSysSetBySetId("1", projectId); - Model.Project_Sys_Set point = BLL.Project_SysSetService.GetSysSetBySetId("2", projectId); - Model.Project_Sys_Set trust = BLL.Project_SysSetService.GetSysSetBySetId("3", projectId); - Model.Project_Sys_Set pdms = BLL.Project_SysSetService.GetSysSetBySetId("4", projectId); - Model.Project_Sys_Set batch = BLL.Project_SysSetService.GetSysSetBySetId("5", projectId); - Model.Project_Sys_Set jointB = BLL.Project_SysSetService.GetSysSetBySetId("6", projectId); - Model.Project_Sys_Set thickness = BLL.Project_SysSetService.GetSysSetBySetId("7", projectId); - Model.Project_Sys_Set pressUnit = BLL.Project_SysSetService.GetSysSetBySetId("8", projectId); - Model.Project_Sys_Set AvevaNetUrl = BLL.Project_SysSetService.GetSysSetBySetId("9", projectId); - Model.Project_Sys_Set PressMustCheckBItem = BLL.Project_SysSetService.GetSysSetBySetId("10", projectId); - if (PressMustCheckBItem != null) - { - if (this.ckPressMustCheckBItem.Checked) - { - PressMustCheckBItem.IsAuto = true; - } - else - { - PressMustCheckBItem.IsAuto = false; - } - BLL.Project_SysSetService.UpdateSet(PressMustCheckBItem); - } - else - { - Model.Project_Sys_Set newPressMustCheckBItem = new Model.Project_Sys_Set(); - newPressMustCheckBItem.SetId = "10"; - newPressMustCheckBItem.ProjectId = projectId; - if (this.ckPressMustCheckBItem.Checked) - { - newPressMustCheckBItem.IsAuto = true; - } - else - { - newPressMustCheckBItem.IsAuto = false; - } - BLL.Project_SysSetService.AddSet(newPressMustCheckBItem); - } - if (jointB != null) - { - if (this.ckbJointB.Checked) - { - jointB.IsAuto = true; - } - else - { - jointB.IsAuto = false; - } - BLL.Project_SysSetService.UpdateSet(jointB); - } - else - { - Model.Project_Sys_Set newJointB = new Model.Project_Sys_Set(); - newJointB.SetId = "6"; - newJointB.ProjectId = projectId; - if (this.ckbJointB.Checked) - { - newJointB.IsAuto = true; - } - else - { - newJointB.IsAuto = false; - } - BLL.Project_SysSetService.AddSet(newJointB); - } - if (pressUnit != null) - { - pressUnit.SetValue = this.rblPressUnit.SelectedValue; - BLL.Project_SysSetService.UpdateSet(pressUnit); - } - else - { - Model.Project_Sys_Set newPressUnit = new Model.Project_Sys_Set(); - newPressUnit.SetId = "8"; - newPressUnit.SetValue = this.rblPressUnit.SelectedValue; - newPressUnit.ProjectId = projectId; - BLL.Project_SysSetService.AddSet(newPressUnit); - } - if (AvevaNetUrl != null) - { - AvevaNetUrl.SetValue = this.AvevaNetUrl.Text.Trim(); - BLL.Project_SysSetService.UpdateSet(AvevaNetUrl); - } - else - { - Model.Project_Sys_Set newAvevaNetUrl = new Model.Project_Sys_Set(); - newAvevaNetUrl.SetId = "9"; - newAvevaNetUrl.SetName = "AVEVA NET 鍦板潃"; - newAvevaNetUrl.SetValue = this.AvevaNetUrl.Text.Trim(); - newAvevaNetUrl.ProjectId = projectId; - BLL.Project_SysSetService.AddSet(newAvevaNetUrl); - } - if (thickness != null) - { - if (this.ckbThickness.Checked) - { - thickness.IsAuto = true; - } - else - { - thickness.IsAuto = false; - } - BLL.Project_SysSetService.UpdateSet(thickness); - } - else - { - Model.Project_Sys_Set newThickness = new Model.Project_Sys_Set(); - newThickness.SetId = "7"; - newThickness.ProjectId = projectId; - if (this.ckbThickness.Checked) - { - newThickness.IsAuto = true; - } - else - { - newThickness.IsAuto = false; - } - BLL.Project_SysSetService.AddSet(newThickness); - } - if (this.ckbPdms.Checked) - { - pdms.IsAuto = true; - } - else - { - pdms.IsAuto = false; - } - if (ckbDayReport.Checked) - { - dayReport.IsAuto = true; - } - else - { - dayReport.IsAuto = false; - } + SaveWeldingSettings(projectId); + SaveColorModelSettings(projectId); + SaveQualitySettings(projectId); - if (ckbPoint.Checked) - { - point.IsAuto = true; - } - else - { - point.IsAuto = false; - } - - if (robStandard.SelectedValue == "1") - { - trust.IsAuto = true; - trust.SetValue = null; - } - else if (robStandard.SelectedValue == "2") - { - trust.IsAuto = false; - trust.SetValue = null; - } - else - { - trust.IsAuto = null; - trust.SetValue = robStandard.SelectedValue; - } - string lists = string.Empty; - if (cb1.Checked) - { - lists += "1|"; - } - if (cb2.Checked) - { - lists += "2|"; - } - if (cb3.Checked) - { - lists += "3|"; - } - if (cb4.Checked) - { - lists += "4|"; - } - if (cb5.Checked) - { - lists += "5|"; - } - if (cb6.Checked) - { - lists += "6|"; - } - if (cb7.Checked) - { - lists += "7|"; - } - if (!string.IsNullOrEmpty(lists)) - { - lists = lists.Substring(0, lists.LastIndexOf('|')); - batch.IsAuto = true; - batch.SetValue = lists; - } - - BLL.Project_SysSetService.UpdateSet(dayReport); - BLL.Project_SysSetService.UpdateSet(point); - BLL.Project_SysSetService.UpdateSet(pdms); - BLL.Project_SysSetService.UpdateSet(trust); - BLL.Project_SysSetService.UpdateSet(batch); - //this.Show(projectId); - #endregion - #region 棰滆壊妯″瀷璁剧疆 - Model.Project_Sys_Set Model_PipelineNOComplete = BLL.Project_SysSetService.GetSysSetBySetName("绠$嚎鏈畬鎴", this.CurrUser.LoginProjectId); - if (Model_PipelineNOComplete != null) - { - - if (!string.IsNullOrEmpty(this.txtPipelineNOComplete.Text.Trim())) - { - Model_PipelineNOComplete.SetValue = this.txtPipelineNOComplete.Text.Trim(); - BLL.Project_SysSetService.UpdateSet(Model_PipelineNOComplete); - } - - } - else - { - if (!string.IsNullOrEmpty(this.txtPipelineNOComplete.Text.Trim())) - { - Model.Project_Sys_Set newModel_PipelineNOComplete = new Model.Project_Sys_Set() - { - SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)), - ProjectId = this.CurrUser.LoginProjectId, - SetName = "绠$嚎鏈畬鎴", - SetValue = this.txtPipelineNOComplete.Text.Trim(), - }; - BLL.Project_SysSetService.AddSet(newModel_PipelineNOComplete); - } - } - Model.Project_Sys_Set Model_PipelineComplete = BLL.Project_SysSetService.GetSysSetBySetName("绠$嚎宸插畬鎴", this.CurrUser.LoginProjectId); - if (Model_PipelineComplete != null) - { - - if (!string.IsNullOrEmpty(this.txtPipelineComplete.Text.Trim())) - { - Model_PipelineComplete.SetValue = this.txtPipelineComplete.Text.Trim(); - BLL.Project_SysSetService.UpdateSet(Model_PipelineComplete); - } - - } - else - { - if (!string.IsNullOrEmpty(this.txtPipelineComplete.Text.Trim())) - { - Model.Project_Sys_Set newModel = new Model.Project_Sys_Set() - { - SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)), - ProjectId = this.CurrUser.LoginProjectId, - SetName = "绠$嚎宸插畬鎴", - SetValue = this.txtPipelineComplete.Text.Trim(), - }; - - BLL.Project_SysSetService.AddSet(newModel); - } - } - Model.Project_Sys_Set Model_JointNOCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("鐒婂彛鏈畬鎴", this.CurrUser.LoginProjectId); - if (Model_JointNOCompleteColor != null) - { - - if (!string.IsNullOrEmpty(this.drpJointNOCompleteColor.SelectedValue.Trim())) - { - Model_JointNOCompleteColor.SetValue = this.drpJointNOCompleteColor.SelectedValue.Trim(); - BLL.Project_SysSetService.UpdateSet(Model_JointNOCompleteColor); - } - - } - else - { - if (!string.IsNullOrEmpty(this.drpJointNOCompleteColor.SelectedValue.Trim())) - { - Model.Project_Sys_Set newModel = new Model.Project_Sys_Set() - { - SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)), - ProjectId = this.CurrUser.LoginProjectId, - SetName = "鐒婂彛鏈畬鎴", - SetValue = this.drpJointNOCompleteColor.SelectedValue.Trim(), - }; - - BLL.Project_SysSetService.AddSet(newModel); - } - } - Model.Project_Sys_Set Model_JointCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("鐒婂彛宸插畬鎴", this.CurrUser.LoginProjectId); - if (Model_JointCompleteColor != null) - { - - if (!string.IsNullOrEmpty(this.drpJointCompleteColor.SelectedValue.Trim())) - { - Model_JointCompleteColor.SetValue = this.drpJointCompleteColor.SelectedValue.Trim(); - BLL.Project_SysSetService.UpdateSet(Model_JointCompleteColor); - } - - } - else - { - if (!string.IsNullOrEmpty(this.drpJointCompleteColor.SelectedValue.Trim())) - { - Model.Project_Sys_Set newModel = new Model.Project_Sys_Set() - { - SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)), - ProjectId = this.CurrUser.LoginProjectId, - SetName = "鐒婂彛宸插畬鎴", - SetValue = this.drpJointCompleteColor.SelectedValue.Trim(), - }; - - BLL.Project_SysSetService.AddSet(newModel); - } - } - - #endregion - #region 璐ㄩ噺 - - Model.Project_Sys_Set CheckEquipmentDay = BLL.Project_SysSetService.GetSysSetBySetName("妫璇曢獙璁惧鍒版湡鎻愰啋澶╂暟", this.CurrUser.LoginProjectId); - if (CheckEquipmentDay != null) - { - - if (!string.IsNullOrEmpty(this.txtRemindDay.Text.Trim())) - { - CheckEquipmentDay.SetValue = this.txtRemindDay.Text.Trim(); - BLL.Project_SysSetService.UpdateSet(CheckEquipmentDay); - } - - } - else - { - if (!string.IsNullOrEmpty(this.txtRemindDay.Text.Trim())) - { - Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set(); - newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)); - - newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId; - newCheckEquipmentDay.SetName = "妫璇曢獙璁惧鍒版湡鎻愰啋澶╂暟"; - newCheckEquipmentDay.SetValue = this.txtRemindDay.Text.Trim(); - BLL.Project_SysSetService.AddSet(newCheckEquipmentDay); - } - } - Model.Project_Sys_Set CheckMonthStartDay = BLL.Project_SysSetService.GetSysSetBySetName("鏈堟姤寮濮嬫棩鏈", this.CurrUser.LoginProjectId); - if (CheckMonthStartDay != null) - { - if (!string.IsNullOrEmpty(this.txtStarTime.Text.Trim())) - { - CheckMonthStartDay.SetValue = this.txtStarTime.Text.Trim(); - BLL.Project_SysSetService.UpdateSet(CheckMonthStartDay); - } - - } - else - { - if (!string.IsNullOrEmpty(this.txtStarTime.Text.Trim())) - { - Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set(); - newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)); - newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId; - newCheckEquipmentDay.SetName = "鏈堟姤寮濮嬫棩鏈"; - newCheckEquipmentDay.SetValue = this.txtStarTime.Text.Trim(); - BLL.Project_SysSetService.AddSet(newCheckEquipmentDay); - } - } - Model.Project_Sys_Set CheckMonthEndDay = BLL.Project_SysSetService.GetSysSetBySetName("鏈堟姤缁撴潫鏃ユ湡", this.CurrUser.LoginProjectId); - if (CheckMonthEndDay != null) - { - if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) - { - CheckMonthEndDay.SetValue = this.txtEndTime.Text.Trim(); - BLL.Project_SysSetService.UpdateSet(CheckMonthEndDay); - } - - } - else - { - if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) - { - Model.Project_Sys_Set newCheckEquipmentDay = new Model.Project_Sys_Set(); - newCheckEquipmentDay.SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)); - newCheckEquipmentDay.ProjectId = this.CurrUser.LoginProjectId; - newCheckEquipmentDay.SetName = "鏈堟姤缁撴潫鏃ユ湡"; - newCheckEquipmentDay.SetValue = this.txtEndTime.Text.Trim(); - BLL.Project_SysSetService.AddSet(newCheckEquipmentDay); - } - } - - #endregion + // 鍒锋柊鐣岄潰 this.Show(projectId); //BLL.Sys_LogService.AddLog(BLL.Const.System_1, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, "鎻愪氦椤圭洰鐜璁剧疆"); Alert.ShowInTop("鎻愪氦鎴愬姛锛", MessageBoxIcon.Success); } + + private void SaveWeldingSettings(string projectId) + { + // Booleans stored in IsAuto + UpsertIsAutoById("1", projectId, this.ckbDayReport.Checked); + UpsertIsAutoById("2", projectId, this.ckbPoint.Checked); + // trust (id 3) uses special mapping: 1->IsAuto=true, 2->IsAuto=false, otherwise IsAuto=null and SetValue holds value + UpsertTrustSetting("3", projectId, this.robStandard.SelectedValue); + UpsertIsAutoById("4", projectId, this.ckbPdms.Checked); + // batch (id 5) is a list of checked items + UpsertBatchSetting("5", projectId); + UpsertIsAutoById("6", projectId, this.ckbJointB.Checked); + UpsertIsAutoById("7", projectId, this.ckbThickness.Checked); + UpsertValueById("8", projectId, this.rblPressUnit.SelectedValue); + UpsertValueById("9", projectId, this.AvevaNetUrl.Text.Trim(), setName: "AVEVA NET 鍦板潃"); + UpsertIsAutoById("10", projectId, this.ckPressMustCheckBItem.Checked); + UpsertValueById("11", projectId, this.rbMaterialColorAttribute.SelectedValue); + } + + private void SaveColorModelSettings(string projectId) + { + UpsertByName("绠$嚎鏈畬鎴", projectId, this.txtPipelineNOComplete.Text.Trim()); + UpsertByName("绠$嚎宸插畬鎴", projectId, this.txtPipelineComplete.Text.Trim()); + UpsertByName("鐒婂彛鏈畬鎴", projectId, this.drpJointNOCompleteColor.SelectedValue.Trim()); + UpsertByName("鐒婂彛宸插畬鎴", projectId, this.drpJointCompleteColor.SelectedValue.Trim()); + } + + private void SaveQualitySettings(string projectId) + { + UpsertByName("妫璇曢獙璁惧鍒版湡鎻愰啋澶╂暟", projectId, this.txtRemindDay.Text.Trim()); + UpsertByName("鏈堟姤寮濮嬫棩鏈", projectId, this.txtStarTime.Text.Trim()); + UpsertByName("鏈堟姤缁撴潫鏃ユ湡", projectId, this.txtEndTime.Text.Trim()); + } + + #endregion + + #region Upsert Helpers + private void UpsertIsAutoById(string setId, string projectId, bool value) + { + var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId); + if (existing != null) + { + existing.IsAuto = value; + BLL.Project_SysSetService.UpdateSet(existing); + } + else + { + var newSet = new Model.Project_Sys_Set + { + SetId = setId, + ProjectId = projectId, + IsAuto = value + }; + BLL.Project_SysSetService.AddSet(newSet); + } + } + + private void UpsertValueById(string setId, string projectId, string value, string setName = null) + { + if (string.IsNullOrEmpty(value)) return; + var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId); + if (existing != null) + { + existing.SetValue = value; + if (!string.IsNullOrEmpty(setName)) existing.SetName = setName; + BLL.Project_SysSetService.UpdateSet(existing); + } + else + { + var newSet = new Model.Project_Sys_Set + { + SetId = setId, + ProjectId = projectId, + SetValue = value, + SetName = setName + }; + BLL.Project_SysSetService.AddSet(newSet); + } + } + + private void UpsertByName(string setName, string projectId, string value) + { + if (string.IsNullOrEmpty(value)) return; + var existing = BLL.Project_SysSetService.GetSysSetBySetName(setName, projectId); + if (existing != null) + { + existing.SetValue = value; + BLL.Project_SysSetService.UpdateSet(existing); + } + else + { + var newSet = new Model.Project_Sys_Set + { + SetId = SQLHelper.GetNewID(typeof(Model.Project_Sys_Set)), + ProjectId = projectId, + SetName = setName, + SetValue = value + }; + BLL.Project_SysSetService.AddSet(newSet); + } + } + + private void UpsertTrustSetting(string setId, string projectId, string selectedValue) + { + var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId); + if (existing != null) + { + if (selectedValue == "1") + { + existing.IsAuto = true; + existing.SetValue = null; + } + else if (selectedValue == "2") + { + existing.IsAuto = false; + existing.SetValue = null; + } + else + { + existing.IsAuto = null; + existing.SetValue = selectedValue; + } + BLL.Project_SysSetService.UpdateSet(existing); + } + else + { + var newSet = new Model.Project_Sys_Set + { + SetId = setId, + ProjectId = projectId + }; + if (selectedValue == "1") + { + newSet.IsAuto = true; + } + else if (selectedValue == "2") + { + newSet.IsAuto = false; + } + else + { + newSet.IsAuto = null; + newSet.SetValue = selectedValue; + } + BLL.Project_SysSetService.AddSet(newSet); + } + } + + private void UpsertBatchSetting(string setId, string projectId) + { + var items = new List(); + if (cb1.Checked) items.Add("1"); + if (cb2.Checked) items.Add("2"); + if (cb3.Checked) items.Add("3"); + if (cb4.Checked) items.Add("4"); + if (cb5.Checked) items.Add("5"); + if (cb6.Checked) items.Add("6"); + if (cb7.Checked) items.Add("7"); + + if (items.Count == 0) return; + + var lists = string.Join("|", items); + var existing = BLL.Project_SysSetService.GetSysSetBySetId(setId, projectId); + if (existing != null) + { + existing.IsAuto = true; + existing.SetValue = lists; + BLL.Project_SysSetService.UpdateSet(existing); + } + else + { + var newSet = new Model.Project_Sys_Set + { + SetId = setId, + ProjectId = projectId, + IsAuto = true, + SetValue = lists + }; + BLL.Project_SysSetService.AddSet(newSet); + } + } #endregion #region 椤甸潰鍛堢幇 /// - /// + /// 椤甸潰鍛堢幇 /// private void Show(string projectId) { var q = from x in Funs.DB.Project_Sys_Set where x.ProjectId == projectId select x; - if (q.Count() > 0) + if (q.Any()) { - foreach (var s in q) - { - if (s.SetId == "1") - { - if (s.IsAuto == true) - { - this.ckbDayReport.Checked = true; - } - else - { - this.ckbDayReport.Checked = false; - } - } - else if (s.SetId == "2") - { - if (s.IsAuto == true) - { - this.ckbPoint.Checked = true; - } - else - { - this.ckbPoint.Checked = false; - } - } - else if (s.SetId == "3") - { - if (s.IsAuto == true) - { - this.robStandard.SelectedValue = "1"; - } - if (s.IsAuto == false) - { - this.robStandard.SelectedValue = "2"; - } - if (s.SetValue == "3") - { - this.robStandard.SelectedValue = "3"; - } - if (s.SetValue == "4") - { - this.robStandard.SelectedValue = "4"; - } - } - else if (s.SetId == "4") - { - if (s.IsAuto == true) - { - this.ckbPdms.Checked = true; - } - else - { - this.ckbPdms.Checked = false; - } - } - else if (s.SetId == "5") - { - cb4.Checked = false; - cb5.Checked = false; - cb6.Checked = false; - cb7.Checked = false; - var lists = s.SetValue.Split('|'); - foreach (var item in lists) - { - if (item == "1") - { - cb1.Checked = true; - } - else if (item == "2") - { - cb2.Checked = true; - } - else if (item == "3") - { - cb3.Checked = true; - } - else if (item == "4") - { - cb4.Checked = true; - } - else if (item == "5") - { - cb5.Checked = true; - } - else if (item == "6") - { - cb6.Checked = true; - } - else if (item == "7") - { - cb7.Checked = true; - } - } - } - else if (s.SetId == "6") - { - if (s.IsAuto == true) - { - this.ckbJointB.Checked = true; - } - else - { - this.ckbJointB.Checked = false; - } - } - else if (s.SetId == "7") - { - if (s.IsAuto == true) - { - this.ckbThickness.Checked = true; - } - else - { - this.ckbThickness.Checked = false; - } - } - else if (s.SetId == "8") - { - if (s.SetValue == "1") - { - this.rblPressUnit.SelectedValue = "1"; - } - else - { - this.rblPressUnit.SelectedValue = "2"; - } - } - else if (s.SetId == "9") - { + var dict = q.ToDictionary(x => x.SetId, x => x); - this.AvevaNetUrl.Text = s.SetValue; - } - else if (s.SetId == "10") - { - if (s.IsAuto == true) - { - this.ckPressMustCheckBItem.Checked = true; - } - else - { - this.ckPressMustCheckBItem.Checked = false; - } - } - } + SetCheckFromDict(dict, "1", this.ckbDayReport); + SetCheckFromDict(dict, "2", this.ckbPoint); + SetRobStandardFromDict(dict, "3"); + SetCheckFromDict(dict, "4", this.ckbPdms); + SetBatchFromDict(dict, "5"); + SetCheckFromDict(dict, "6", this.ckbJointB); + SetCheckFromDict(dict, "7", this.ckbThickness); + SetRadioValueFromDict(dict, "8", this.rblPressUnit, defaultValue: "2"); + if (dict.ContainsKey("9")) this.AvevaNetUrl.Text = dict["9"].SetValue; + SetCheckFromDict(dict, "10", this.ckPressMustCheckBItem); + if (dict.ContainsKey("11")) this.rbMaterialColorAttribute.SelectedValue = dict["11"].SetValue == "1" ? "1" : "2"; } + //棰滆壊妯″瀷璁剧疆 - Model.Project_Sys_Set Model_PipelineNOComplete = BLL.Project_SysSetService.GetSysSetBySetName("绠$嚎鏈畬鎴", this.CurrUser.LoginProjectId); - if (Model_PipelineNOComplete != null) - { - this.txtPipelineNOComplete.Text = Model_PipelineNOComplete.SetValue; - } - Model.Project_Sys_Set Model_PipelineComplete = BLL.Project_SysSetService.GetSysSetBySetName("绠$嚎宸插畬鎴", this.CurrUser.LoginProjectId); - if (Model_PipelineComplete != null) - { - this.txtPipelineComplete.Text = Model_PipelineComplete.SetValue; - } - Model.Project_Sys_Set Model_JointNOCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("鐒婂彛鏈畬鎴", this.CurrUser.LoginProjectId); - if (Model_JointNOCompleteColor != null) - { - this.drpJointNOCompleteColor.SelectedValue = Model_JointNOCompleteColor.SetValue; - } - Model.Project_Sys_Set Model_JointCompleteColor = BLL.Project_SysSetService.GetSysSetBySetName("鐒婂彛宸插畬鎴", this.CurrUser.LoginProjectId); - if (Model_JointCompleteColor != null) - { - this.drpJointCompleteColor.SelectedValue = Model_JointCompleteColor.SetValue; - } + var m1 = BLL.Project_SysSetService.GetSysSetBySetName("绠$嚎鏈畬鎴", this.CurrUser.LoginProjectId); + if (m1 != null) this.txtPipelineNOComplete.Text = m1.SetValue; + var m2 = BLL.Project_SysSetService.GetSysSetBySetName("绠$嚎宸插畬鎴", this.CurrUser.LoginProjectId); + if (m2 != null) this.txtPipelineComplete.Text = m2.SetValue; + var m3 = BLL.Project_SysSetService.GetSysSetBySetName("鐒婂彛鏈畬鎴", this.CurrUser.LoginProjectId); + if (m3 != null) this.drpJointNOCompleteColor.SelectedValue = m3.SetValue; + var m4 = BLL.Project_SysSetService.GetSysSetBySetName("鐒婂彛宸插畬鎴", this.CurrUser.LoginProjectId); + if (m4 != null) this.drpJointCompleteColor.SelectedValue = m4.SetValue; ///璐ㄩ噺椤甸潰鍛堢幇 - Model.Project_Sys_Set CheckEquipmentDay = BLL.Project_SysSetService.GetSysSetBySetName("妫璇曢獙璁惧鍒版湡鎻愰啋澶╂暟", this.CurrUser.LoginProjectId); - if (CheckEquipmentDay != null) + var c1 = BLL.Project_SysSetService.GetSysSetBySetName("妫璇曢獙璁惧鍒版湡鎻愰啋澶╂暟", this.CurrUser.LoginProjectId); + if (c1 != null) this.txtRemindDay.Text = c1.SetValue; + var c2 = BLL.Project_SysSetService.GetSysSetBySetName("鏈堟姤寮濮嬫棩鏈", this.CurrUser.LoginProjectId); + if (c2 != null) this.txtStarTime.Text = c2.SetValue; else this.txtStarTime.Text = "25"; + var c3 = BLL.Project_SysSetService.GetSysSetBySetName("鏈堟姤缁撴潫鏃ユ湡", this.CurrUser.LoginProjectId); + if (c3 != null) this.txtEndTime.Text = c3.SetValue; else this.txtEndTime.Text = "24"; + } + + private void SetCheckFromDict(Dictionary dict, string setId, CheckBox checkBox) + { + if (!dict.ContainsKey(setId)) return; + var s = dict[setId]; + checkBox.Checked = s.IsAuto == true; + } + + private void SetRobStandardFromDict(Dictionary dict, string setId) + { + if (!dict.ContainsKey(setId)) return; + var s = dict[setId]; + if (s.IsAuto == true) this.robStandard.SelectedValue = "1"; + else if (s.IsAuto == false) this.robStandard.SelectedValue = "2"; + else if (s.SetValue == "3") this.robStandard.SelectedValue = "3"; + else if (s.SetValue == "4") this.robStandard.SelectedValue = "4"; + } + + private void SetBatchFromDict(Dictionary dict, string setId) + { + if (!dict.ContainsKey(setId)) return; + // reset some checkboxes first + cb1.Checked = cb2.Checked = cb3.Checked = cb4.Checked = cb5.Checked = cb6.Checked = cb7.Checked = false; + var s = dict[setId]; + if (string.IsNullOrEmpty(s.SetValue)) return; + var items = s.SetValue.Split('|'); + foreach (var item in items) { - this.txtRemindDay.Text = CheckEquipmentDay.SetValue; + switch (item) + { + case "1": cb1.Checked = true; break; + case "2": cb2.Checked = true; break; + case "3": cb3.Checked = true; break; + case "4": cb4.Checked = true; break; + case "5": cb5.Checked = true; break; + case "6": cb6.Checked = true; break; + case "7": cb7.Checked = true; break; + } } - Model.Project_Sys_Set CheckMonthStartDay = BLL.Project_SysSetService.GetSysSetBySetName("鏈堟姤寮濮嬫棩鏈", this.CurrUser.LoginProjectId); - if (CheckMonthStartDay != null) + } + + private void SetRadioValueFromDict(Dictionary dict, string setId, RadioButtonList rbl, string defaultValue = null) + { + if (!dict.ContainsKey(setId)) { - this.txtStarTime.Text = CheckMonthStartDay.SetValue; - } - else - { - this.txtStarTime.Text = "25"; - } - Model.Project_Sys_Set CheckMonthEndDay = BLL.Project_SysSetService.GetSysSetBySetName("鏈堟姤缁撴潫鏃ユ湡", this.CurrUser.LoginProjectId); - if (CheckMonthEndDay != null) - { - this.txtEndTime.Text = CheckMonthEndDay.SetValue; - } - else - { - this.txtEndTime.Text = "24"; + if (defaultValue != null) rbl.SelectedValue = defaultValue; + return; } + var s = dict[setId]; + rbl.SelectedValue = s.SetValue ?? defaultValue; } #endregion } diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.designer.cs index 1673245d..4be47d9a 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSysSet.aspx.designer.cs @@ -113,6 +113,15 @@ namespace FineUIPro.Web.common.ProjectSet /// protected global::FineUIPro.CheckBox ckPressMustCheckBItem; + /// + /// rbMaterialColorAttribute 鎺т欢銆 + /// + /// + /// 鑷姩鐢熸垚鐨勫瓧娈点 + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲 + /// + protected global::FineUIPro.RadioButtonList rbMaterialColorAttribute; + /// /// ckbDayReport 鎺т欢銆 /// diff --git a/SGGL/Model/HJGL/BaseInfo/BaseMaterialcolorDataIn.cs b/SGGL/Model/HJGL/BaseInfo/BaseMaterialcolorDataIn.cs new file mode 100644 index 00000000..d4abeb11 --- /dev/null +++ b/SGGL/Model/HJGL/BaseInfo/BaseMaterialcolorDataIn.cs @@ -0,0 +1,37 @@ +锘縰sing MiniExcelLibs.Attributes; + +namespace Model +{ + /// + /// 绠¢亾鏉愯川棰滆壊瀵煎叆瀹炰綋 + /// + public class BaseMaterialcolorDataIn + { + + /// + /// 鏉愯川 + /// + [ExcelColumnIndex("A")] + public string MaterialCode { get; set; } + /// + /// 棰滆壊鍚嶇О + /// + [ExcelColumnIndex("B")] + public string ColorName { get; set; } + /// + /// 鑹插崱鍙 + /// + [ExcelColumnIndex("C")] + public string ColorCardNo { get; set; } + /// + /// RGB + /// + [ExcelColumnIndex("D")] + public string RGB { get; set; } + /// + /// 澶囨敞 + /// + [ExcelColumnIndex("E")] + public string Remark { get; set; } + } +} diff --git a/SGGL/Model/HJGL/BaseMaterialcolorOutput.cs b/SGGL/Model/HJGL/BaseInfo/BaseMaterialcolorOutput.cs similarity index 100% rename from SGGL/Model/HJGL/BaseMaterialcolorOutput.cs rename to SGGL/Model/HJGL/BaseInfo/BaseMaterialcolorOutput.cs diff --git a/SGGL/Model/HJGL/MaterialStockItem.cs b/SGGL/Model/HJGL/PreDesign/Material/MaterialStockItem.cs similarity index 100% rename from SGGL/Model/HJGL/MaterialStockItem.cs rename to SGGL/Model/HJGL/PreDesign/Material/MaterialStockItem.cs diff --git a/SGGL/Model/HJGL/PreDesign/PackagingManage/PackagingManageInput.cs b/SGGL/Model/HJGL/PreDesign/PackagingManage/PackagingManageInput.cs new file mode 100644 index 00000000..970a6988 --- /dev/null +++ b/SGGL/Model/HJGL/PreDesign/PackagingManage/PackagingManageInput.cs @@ -0,0 +1,59 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + /// + /// 鍖呰绠$悊杈撳叆鍙傛暟 + /// + public class PackagingManageInput + { + /// + /// 涓婚敭 + /// + public string PackagingManageId { get; set; } + /// + /// 鍖呰缂栧彿 + /// + public string PackagingCode { get; set; } + /// + /// 椤圭洰id + /// + public string ProjectId { get; set; } + /// + /// 椤圭洰鍚嶇О + /// + public string ProjectName { get; set; } + /// + /// 鑱旂郴浜哄鍚 + /// + public string ContactName { get; set; } + /// + /// 鑱旂郴浜虹數璇 + /// + public string ContactPhone { get; set; } + /// + /// 棰勫埗宸ヤ綔鍖 + /// + public string StackingPosition { get; set; } + /// + /// 鐘舵 + /// + public int? State { get; set; } + /// + /// 鎺ユ敹浜 + /// + public string ReceiveMan { get; set; } + /// + /// 鎺ユ敹鏃堕棿 + /// + public string ReceiveDate { get; set; } + /// + /// 杞︽id + /// + public string TrainNumberId { get; set; } + } +} diff --git a/SGGL/Model/HJGL/PackagingManagePrintOutput.cs b/SGGL/Model/HJGL/PreDesign/PackagingManage/PackagingManagePrintOutput.cs similarity index 100% rename from SGGL/Model/HJGL/PackagingManagePrintOutput.cs rename to SGGL/Model/HJGL/PreDesign/PackagingManage/PackagingManagePrintOutput.cs diff --git a/SGGL/Model/HJGL/PipelineComponentPrintDto.cs b/SGGL/Model/HJGL/PreDesign/PipelineComponent/PipelineComponentPrintDto.cs similarity index 100% rename from SGGL/Model/HJGL/PipelineComponentPrintDto.cs rename to SGGL/Model/HJGL/PreDesign/PipelineComponent/PipelineComponentPrintDto.cs diff --git a/SGGL/Model/HJGL/Pipeline_ComponentQRCodeItem.cs b/SGGL/Model/HJGL/PreDesign/PipelineComponent/Pipeline_ComponentQRCodeItem.cs similarity index 100% rename from SGGL/Model/HJGL/Pipeline_ComponentQRCodeItem.cs rename to SGGL/Model/HJGL/PreDesign/PipelineComponent/Pipeline_ComponentQRCodeItem.cs diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index aa16a05a..1316a9e7 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -6921,6 +6921,14 @@ namespace Model } } + public System.Data.Linq.Table View_HJGL_InstallData + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_HJGL_JointInfoQuery { get @@ -97820,6 +97828,8 @@ namespace Model private System.Nullable _CompileDate; + private System.Nullable _CategoryInt; + #region 鍙墿灞曟ф柟娉曞畾涔 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -97856,6 +97866,8 @@ namespace Model partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); partial void OnCompileDateChanged(); + partial void OnCategoryIntChanging(System.Nullable value); + partial void OnCategoryIntChanged(); #endregion public HJGL_PackagingManage() @@ -98183,6 +98195,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CategoryInt", DbType="Int")] + public System.Nullable CategoryInt + { + get + { + return this._CategoryInt; + } + set + { + if ((this._CategoryInt != value)) + { + this.OnCategoryIntChanging(value); + this.SendPropertyChanging(); + this._CategoryInt = value; + this.SendPropertyChanged("CategoryInt"); + this.OnCategoryIntChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -290556,6 +290588,213 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_InstallData")] + public partial class View_HJGL_InstallData + { + + private string _Id; + + private string _PipelineCode; + + private string _Code; + + private string _TypeStr; + + private string _Matdef; + + private System.Nullable _Number; + + private string _PackagingCode; + + private string _TrainNumber; + + private string _FlowingSection; + + private string _UnitWorkId; + + private string _ProjectId; + + public View_HJGL_InstallData() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this._Id = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineCode", DbType="NVarChar(200)")] + public string PipelineCode + { + get + { + return this._PipelineCode; + } + set + { + if ((this._PipelineCode != value)) + { + this._PipelineCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="NVarChar(50)")] + public string Code + { + get + { + return this._Code; + } + set + { + if ((this._Code != value)) + { + this._Code = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeStr", DbType="VarChar(8) NOT NULL", CanBeNull=false)] + public string TypeStr + { + get + { + return this._TypeStr; + } + set + { + if ((this._TypeStr != value)) + { + this._TypeStr = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Matdef", DbType="NVarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + public string Matdef + { + get + { + return this._Matdef; + } + set + { + if ((this._Matdef != value)) + { + this._Matdef = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Number", DbType="Decimal(18,2)")] + public System.Nullable Number + { + get + { + return this._Number; + } + set + { + if ((this._Number != value)) + { + this._Number = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackagingCode", DbType="NVarChar(50)")] + public string PackagingCode + { + get + { + return this._PackagingCode; + } + set + { + if ((this._PackagingCode != value)) + { + this._PackagingCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumber", DbType="NVarChar(50)")] + public string TrainNumber + { + get + { + return this._TrainNumber; + } + set + { + if ((this._TrainNumber != value)) + { + this._TrainNumber = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FlowingSection", DbType="NVarChar(200)")] + public string FlowingSection + { + get + { + return this._FlowingSection; + } + set + { + if ((this._FlowingSection != value)) + { + this._FlowingSection = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(50)")] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this._UnitWorkId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_JointInfoQuery")] public partial class View_HJGL_JointInfoQuery { diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index d4309d1c..c0dcf251 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -212,11 +212,11 @@ + - @@ -233,14 +233,16 @@ - - + + + - - + + + - + @@ -299,6 +301,7 @@ +