diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index c92d44ad..da1f4f68 100644 Binary files a/.vs/SGGL_SeDin_New/v17/.wsuo and b/.vs/SGGL_SeDin_New/v17/.wsuo differ diff --git a/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json b/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json index d1ae1f9c..3e78a4fd 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json @@ -8,7 +8,7 @@ "VerticalTabListWidth": 256, "DocumentGroups": [ { - "DockedWidth": 217, + "DockedWidth": 200, "SelectedChildIndex": -1, "Children": [ { @@ -73,7 +73,7 @@ }, { "$type": "Bookmark", - "Name": "ST:129:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + "Name": "ST:0:0:{cce594b6-0c39-4442-ba28-10c64ac7e89f}" } ] } diff --git a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json index 75ab69a7..6c1cb586 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json @@ -67,6 +67,10 @@ "$type": "Bookmark", "Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}" }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" + }, { "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" diff --git a/SGGL/BLL/API/HJGL/APIPackagingManageService.cs b/SGGL/BLL/API/HJGL/APIPackagingManageService.cs index e0cbf222..97e9ef52 100644 --- a/SGGL/BLL/API/HJGL/APIPackagingManageService.cs +++ b/SGGL/BLL/API/HJGL/APIPackagingManageService.cs @@ -95,13 +95,13 @@ namespace BLL } public static void GetPackingInfoConfirmArrival(string packagingManageId,string PersonId) { - var q= BLL.HJGL_PackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); + var q= BLL.HJGLPackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); if (q!=null) { - q.State = HJGL_PackagingmanageService.state_2; + q.State = HJGLPackagingmanageService.state_2; q.ReceiveMan = PersonId; q.ReceiveDate = DateTime.Now; - HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(q); + HJGLPackagingmanageService.UpdateHJGL_PackagingManage(q); } } public static void getSavePackagingInformationById(string packagingManageId, string PipelineComponentIds) @@ -133,7 +133,7 @@ namespace BLL } } - BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table); + BLL.HJGLPackagingmanageService.UpdateHJGL_PackagingManage(table); var newDetailList = new List(); foreach (var item in table.PipelineComponentId.Split(',')) { diff --git a/SGGL/BLL/API/HJGL/APITrainNumberManagerService.cs b/SGGL/BLL/API/HJGL/APITrainNumberManagerService.cs new file mode 100644 index 00000000..aa7e5475 --- /dev/null +++ b/SGGL/BLL/API/HJGL/APITrainNumberManagerService.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + public class APITrainNumberManagerService + { + /// + /// 车次发货验收 + /// + /// + /// + public static void SaveTrainInfoConfirmArrival(string id, string PersonId) + { + var model=TrainNumberManageService.GetModelById(id); + if (model!=null) + { + model.ReceiveDate = DateTime.Now; + TrainNumberManageService.Update(model); + } + var packManagerList= HJGLPackagingmanageService.GetPackagingManage(id); + foreach (var item in packManagerList) + { + BLL.APIPackagingManageService.GetPackingInfoConfirmArrival(item.PackagingManageId, PersonId); + } + } + + /// + /// 获取指定车次的包装明细(包装表) + /// + public static List GetPackagingByTrainId(string trainNumberId) + { + return HJGLPackagingmanageService.GetPackagingManage(trainNumberId); + } + + /// + /// 将包装关联到车次(设置 HJGL_PackagingManage.TrainNumberId) + /// + public static void AddPackagingToTrain(string packagingManageId, string trainNumberId) + { + var packModel = HJGLPackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); + if (packModel == null) + { + throw new Exception("未找到对应的包装信息"); + } + // 仅允许状态为未出库(state_0)时修改车次号,保持与前端逻辑一致 + if (packModel.State != HJGLPackagingmanageService.state_0) + { + throw new Exception("当前包装状态不可修改车次号"); + } + packModel.TrainNumberId = trainNumberId; + HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel); + } + + /// + /// 取消包装与车次的关联(清空 HJGL_PackagingManage.TrainNumberId) + /// + public static void RemovePackagingFromTrain(string packagingManageId) + { + var packModel = HJGLPackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); + if (packModel == null) + { + throw new Exception("未找到对应的包装信息"); + } + if (packModel.State != HJGLPackagingmanageService.state_0) + { + throw new Exception("当前包装状态不可修改车次号"); + } + packModel.TrainNumberId = null; + packModel.TrainNumber = null; + HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel); + } + } +} diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 5a63de0e..f8cfc939 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -207,6 +207,7 @@ + @@ -276,6 +277,7 @@ + diff --git a/SGGL/BLL/CLGL/TwOutputdetailService..cs b/SGGL/BLL/CLGL/TwOutputdetailService..cs index ec1565dd..93005ebb 100644 --- a/SGGL/BLL/CLGL/TwOutputdetailService..cs +++ b/SGGL/BLL/CLGL/TwOutputdetailService..cs @@ -37,11 +37,14 @@ namespace BLL (string.IsNullOrEmpty(table.Id) || x.Id.Contains(table.Id)) && (string.IsNullOrEmpty(table.OutputMasterId) || x.OutputMasterId.Contains(table.OutputMasterId)) && (string.IsNullOrEmpty(table.PipelineComponentId) || x.PipelineComponentId.Contains(table.PipelineComponentId)) && - (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode)) + (string.IsNullOrEmpty(table.MaterialCode) || x.MaterialCode.Contains(table.MaterialCode))&& + (table.TypeInt ==null || master.TypeInt==table.TypeInt) select new Model.Tw_InOutDetailOutput { Id = x.Id, OutputMasterId = x.OutputMasterId, + CusBillCode=master.CusBillCode, + TypeInt=master.TypeInt, PipelineComponentId = x.PipelineComponentId, MaterialCode = x.MaterialCode, PlanNum = x.PlanNum, diff --git a/SGGL/BLL/CLGL/TwOutputmasterService.cs b/SGGL/BLL/CLGL/TwOutputmasterService.cs index 4417b5cc..1e10ce33 100644 --- a/SGGL/BLL/CLGL/TwOutputmasterService.cs +++ b/SGGL/BLL/CLGL/TwOutputmasterService.cs @@ -122,6 +122,7 @@ namespace BLL CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, WeldTaskId = x.WeldTaskId, WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "", + UnitWorkId= x.WeldTaskId != null? x.WeldTaskId.Split('|')[0].ToString():null, AuditMan = x.AuditMan, AuditManName = x.AuditManName, AuditDate = x.AuditDate, @@ -141,7 +142,7 @@ namespace BLL Count = q.Count(); if (Count == 0) { - return null; + return new List(); } var result = q.ToList(); return (from x in result @@ -166,6 +167,7 @@ namespace BLL CategoryString = TwConst.CategoryMap.FirstOrDefault(y => y.Value == x.Category).Key, WeldTaskId = x.WeldTaskId, WeldTaskCode = x.WeldTaskId != null ? x.WeldTaskId.Contains('|') ? Funs.DB.HJGL_WeldTask.FirstOrDefault(e => e.UnitWorkId == x.WeldTaskId.Split('|')[0].ToString() && e.UnitId == x.WeldTaskId.Split('|')[1].ToString() && e.TaskDate.Value.Date == DateTime.ParseExact(x.WeldTaskId.Split('|')[2].ToString(), "yyyyMMdd", null).Date)?.TaskCode : "" : "", + UnitWorkId = x.WeldTaskId != null ? x.WeldTaskId.Split('|')[0].ToString() : null, AuditMan = x.AuditMan, AuditManName = x.AuditManName, AuditDate = x.AuditDate, diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 841263a7..47c1d207 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -5241,5 +5241,8 @@ namespace BLL /// 质量隐患 /// public const string CQMSRectifyMenuId = "D72BB321-11A8-485B-BAC7-367C7FCA7FBA"; + + + public const string BaseMaterialcolorMenuId = "F6194C00-D256-485D-9056-171FAB75928A"; } } \ No newline at end of file diff --git a/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs b/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs new file mode 100644 index 00000000..ff7ac211 --- /dev/null +++ b/SGGL/BLL/HJGL/BaseInfo/Base_MaterialColorService.cs @@ -0,0 +1,169 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace BLL +{ + + public static class BaseMaterialcolorService + { + + + + #region ȡб + /// + /// ¼ + /// + public static int Count + { + get; + set; + } + private static IQueryable GetByQueryModle(Model.Base_MaterialColor table) + { + var q = from x in Funs.DB.Base_MaterialColor select x; + if (table == null) + { + return q; + } + if (!string.IsNullOrEmpty(table.MaterialColorId)) + { + q = q.Where(x => x.MaterialColorId.Contains(table.MaterialColorId)); + } + if (!string.IsNullOrEmpty(table.UnitId)) + { + q = q.Where(x => x.UnitId.Contains(table.UnitId)); + } + if (!string.IsNullOrEmpty(table.MaterialId)) + { + q = q.Where(x => x.MaterialId.Contains(table.MaterialId)); + } + if (!string.IsNullOrEmpty(table.ColorName)) + { + q = q.Where(x => x.ColorName.Contains(table.ColorName)); + } + if (!string.IsNullOrEmpty(table.ColorCardNo)) + { + q = q.Where(x => x.ColorCardNo.Contains(table.ColorCardNo)); + } + if (!string.IsNullOrEmpty(table.RGB)) + { + q = q.Where(x => x.RGB.Contains(table.RGB)); + } + if (!string.IsNullOrEmpty(table.Remark)) + { + q = q.Where(x => x.Remark.Contains(table.Remark)); + } + ; + + return q; + } + public static List GetListByQueryModle(Model.Base_MaterialColor table) + { + return GetByQueryModle(table).ToList(); + + } + public static (List Data, int Total) GetListByQueryModle(Model.Base_MaterialColor table, int pageIndex = 0, int pageSize = 20) + { + var baseQuery = GetByQueryModle(table); + var pagedData = baseQuery + .Skip((pageIndex) * pageSize) + .Take(pageSize) + .ToList(); + + // ȡܼ¼ӳټŻ + var totalCount = baseQuery.Count(); + + return (pagedData, totalCount); + + } + /// + /// ȡҳб + /// + /// + /// + /// + public static IEnumerable GetListData(Model.Base_MaterialColor table, Grid grid1) + { + var q = GetByQueryModle(table); + Count = q.Count(); + if (Count == 0) + { + return null; + } + q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.MaterialColorId, + x.UnitId, + x.MaterialId, + x.ColorName, + x.ColorCardNo, + x.RGB, + x.Remark, + + }; + } + #endregion + + public static Model.Base_MaterialColor GetModelById(string MaterialColorId) + { + return Funs.DB.Base_MaterialColor.FirstOrDefault(x => x.MaterialColorId == MaterialColorId); + } + + + public static void Add(Model.Base_MaterialColor newtable) + { + + Model.Base_MaterialColor table = new Model.Base_MaterialColor + { + MaterialColorId = newtable.MaterialColorId, + UnitId = newtable.UnitId, + MaterialId = newtable.MaterialId, + ColorName = newtable.ColorName, + ColorCardNo = newtable.ColorCardNo, + RGB = newtable.RGB, + Remark = newtable.Remark, + }; + Funs.DB.Base_MaterialColor.InsertOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + + public static void Update(Model.Base_MaterialColor newtable) + { + + Model.Base_MaterialColor table = Funs.DB.Base_MaterialColor.FirstOrDefault(x => x.MaterialColorId == newtable.MaterialColorId); + if (table != null) + { + table.MaterialColorId = newtable.MaterialColorId; + table.UnitId = newtable.UnitId; + table.MaterialId = newtable.MaterialId; + table.ColorName = newtable.ColorName; + table.ColorCardNo = newtable.ColorCardNo; + table.RGB = newtable.RGB; + table.Remark = newtable.Remark; + Funs.DB.SubmitChanges(); + } + + } + public static void DeleteById(string MaterialColorId) + { + + Model.Base_MaterialColor table = Funs.DB.Base_MaterialColor.FirstOrDefault(x => x.MaterialColorId == MaterialColorId); + if (table != null) + { + Funs.DB.Base_MaterialColor.DeleteOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + } + + } +} \ No newline at end of file diff --git a/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs b/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs index a1d29f42..cecc20c1 100644 --- a/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs +++ b/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs @@ -21,6 +21,58 @@ namespace BLL get; set; } + public static List GetListByQueryModle(Model.HJGL_PackagingManageDetail table) + { + return GetByQueryModle(table).ToList(); + + } + + public static (List Data, int Total) GetListByQueryModle(Model.HJGL_PackagingManageDetail table, int pageIndex = 0, int pageSize = 20) + { + var baseQuery = GetByQueryModle(table); + var pagedData = baseQuery + .Skip((pageIndex) * pageSize) + .Take(pageSize) + .ToList(); + + // 获取总记录数(延迟计数优化) + var totalCount = baseQuery.Count(); + + return (pagedData, totalCount); + + } + + /// + /// 获取分页列表 + /// + /// + /// + /// + public static IEnumerable GetListData(Model.HJGL_PackagingManageDetail table, Grid grid1) + { + var q = GetByQueryModle(table); + Count = q.Count(); + if (Count == 0) + { + return null; + } + q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.Id, + x.PackagingManageId, + x.PipelineId, + x.PipelineComponentId, + x.MaterialCode, + x.Number, + x.CreateTime, + x.CreateUser, + + }; + } + private static IQueryable GetByQueryModle(Model.HJGL_PackagingManageDetail table) { var q = from x in Funs.DB.HJGL_PackagingManageDetail select x; @@ -64,128 +116,9 @@ namespace BLL return q; } - public static List GetListByQueryModle(Model.HJGL_PackagingManageDetail table) - { - return GetByQueryModle(table).ToList(); - - } - public static (List Data, int Total) GetListByQueryModle(Model.HJGL_PackagingManageDetail table, int pageIndex = 0, int pageSize = 20) - { - var baseQuery = GetByQueryModle(table); - var pagedData = baseQuery - .Skip((pageIndex) * pageSize) - .Take(pageSize) - .ToList(); - - // 获取总记录数(延迟计数优化) - var totalCount = baseQuery.Count(); - - return (pagedData, totalCount); - - } - /// - /// 获取分页列表 - /// - /// - /// - /// - public static IEnumerable GetListData(Model.HJGL_PackagingManageDetail table, Grid grid1) - { - var q = GetByQueryModle(table); - Count = q.Count(); - if (Count == 0) - { - return null; - } - q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize); - // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); - return from x in q - select new - { - x.Id, - x.PackagingManageId, - x.PipelineId, - x.PipelineComponentId, - x.MaterialCode, - x.Number, - x.CreateTime, - x.CreateUser, - - }; - } - #endregion - public static Model.HJGL_PackagingManageDetail GetModelById(string Id) - { - return Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == Id); - } - public static IEnumerable GetPackagingData(string PackagingManageId) - { - if (string.IsNullOrEmpty(PackagingManageId)) - { - return null; - } - var pack = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); - if (pack == null) - { - return null; - } - var result = new List(); - if (pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.预制散件) - { - var q = from detail in Funs.DB.HJGL_PackagingManageDetail - join lib in Funs.DB.HJGL_MaterialCodeLib on detail.MaterialCode equals lib.MaterialCode into libJoin - from libItem in libJoin.DefaultIfEmpty() - join line in Funs.DB.HJGL_Pipeline on detail.PipelineId equals line.PipelineId into lineJoin - from lineItem in lineJoin.DefaultIfEmpty() - where detail.PackagingManageId == PackagingManageId /*&& (detail.PipelineId != null || detail.PipelineId != "") && (detail.PipelineComponentId == null || detail.PipelineComponentId == "")*/ - select new PipelinePrefabricatedComponentsItem - { - Id = detail.Id, - MaterialCode = libItem.MaterialCode, - MaterialName = libItem.MaterialName, - MaterialUnit = libItem.MaterialUnit, - MaterialSpec = libItem.MaterialSpec, - MaterialMade = libItem.MaterialMade, - MaterialDef = libItem.MaterialDef, - Number = detail.Number, - PipelineId = lineItem.PipelineId, - PipelineCode = lineItem.PipelineCode, - UnitWorkId = lineItem.UnitWorkId, - FlowingSection = lineItem.FlowingSection, - - }; - result= q.ToList(); - } - else if(pack.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.其他材料) - { - var q = from detail in Funs.DB.HJGL_PackagingManageDetail - join lib in Funs.DB.HJGL_MaterialCodeLib on detail.MaterialCode equals lib.MaterialCode into libJoin - from libItem in libJoin.DefaultIfEmpty() - join line in Funs.DB.HJGL_Pipeline on detail.PipelineId equals line.PipelineId into lineJoin - from lineItem in lineJoin.DefaultIfEmpty() - where detail.PackagingManageId == PackagingManageId /*&& (detail.PipelineId == null || detail.PipelineId == "")*/ - select new PipelinePrefabricatedComponentsItem - { - Id = detail.Id, - MaterialCode = libItem.MaterialCode, - MaterialName = libItem.MaterialName, - MaterialUnit = libItem.MaterialUnit, - MaterialSpec = libItem.MaterialSpec, - MaterialMade = libItem.MaterialMade, - MaterialDef = libItem.MaterialDef, - Number = detail.Number, - PipelineId = lineItem.PipelineId, - PipelineCode = lineItem.PipelineCode, - FlowingSection = lineItem.FlowingSection, - - }; - result = q.ToList(); - - } - return result; - } + #region Methods public static void Add(Model.HJGL_PackagingManageDetail newtable) { @@ -200,10 +133,84 @@ namespace BLL Number = newtable.Number, CreateTime = newtable.CreateTime, CreateUser = newtable.CreateUser, + TwOutputDetailId = newtable.TwOutputDetailId, }; Funs.DB.HJGL_PackagingManageDetail.InsertOnSubmit(table); Funs.DB.SubmitChanges(); } + + public static void AddBulk(List newtables) + { + + Funs.DB.HJGL_PackagingManageDetail.InsertAllOnSubmit(newtables); + Funs.DB.SubmitChanges(); + } + + public static void DeleteById(string Id) + { + + Model.HJGL_PackagingManageDetail table = Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == Id); + if (table != null) + { + Funs.DB.HJGL_PackagingManageDetail.DeleteOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + } + + public static void DeleteByPackagingManageId(string packagingManageId) + { + + var list = Funs.DB.HJGL_PackagingManageDetail.Where(x => x.PackagingManageId == packagingManageId).ToList(); + if (list.Count > 0) + { + Funs.DB.HJGL_PackagingManageDetail.DeleteAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + + } + + public static Model.HJGL_PackagingManageDetail GetModelById(string Id) + { + return Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == Id); + } + public static IEnumerable GetPackagingData(string PackagingManageId) + { + if (string.IsNullOrEmpty(PackagingManageId)) + { + return null; + } + var pack = HJGLPackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); + if (pack == null) + { + return null; + } + var result = new List(); + var q = from tb in Funs.DB.HJGL_PackagingManageDetail + join lib in Funs.DB.HJGL_MaterialCodeLib on tb.MaterialCode equals lib.MaterialCode into libJoin + from libItem in libJoin.DefaultIfEmpty() + join twOutDetail in Funs.DB.Tw_OutputDetail on tb.TwOutputDetailId equals twOutDetail.Id into twOutDetailJoin + from twOutDetailItem in twOutDetailJoin.DefaultIfEmpty() + join twOut in Funs.DB.Tw_OutputMaster on twOutDetailItem.OutputMasterId equals twOut.Id into twOutJoin + from twOutItem in twOutJoin.DefaultIfEmpty() + join twOutPlan in Funs.DB.Tw_InOutPlanMaster on twOutItem.InOutPlanMasterId equals twOutPlan.Id into twOutPlanJoin + from twOutPlanItem in twOutPlanJoin.DefaultIfEmpty() + where tb.PackagingManageId == PackagingManageId /*&& (detail.PipelineId != null || detail.PipelineId != "") && (detail.PipelineComponentId == null || detail.PipelineComponentId == "")*/ + select new PipelinePrefabricatedComponentsItem + { + Id = tb.Id, + MaterialCode = libItem.MaterialCode, + MaterialName = libItem.MaterialName, + MaterialUnit = libItem.MaterialUnit, + MaterialSpec = libItem.MaterialSpec, + MaterialMade = libItem.MaterialMade, + MaterialDef = libItem.MaterialDef, + Number = tb.Number, + CusBillCode = twOutItem.CusBillCode, + }; + result = q.ToList(); + return result; + } public static void Update(Model.HJGL_PackagingManageDetail newtable) { @@ -218,38 +225,12 @@ namespace BLL table.Number = newtable.Number; table.CreateTime = newtable.CreateTime; table.CreateUser = newtable.CreateUser; + table.TwOutputDetailId = newtable.TwOutputDetailId; Funs.DB.SubmitChanges(); } } - public static void DeleteById(string Id) - { - - Model.HJGL_PackagingManageDetail table = Funs.DB.HJGL_PackagingManageDetail.FirstOrDefault(x => x.Id == Id); - if (table != null) - { - Funs.DB.HJGL_PackagingManageDetail.DeleteOnSubmit(table); - Funs.DB.SubmitChanges(); - } - - } - public static void DeleteByPackagingManageId(string packagingManageId) - { - - var list = Funs.DB.HJGL_PackagingManageDetail.Where(x => x.PackagingManageId == packagingManageId).ToList(); - if (list.Count>0) - { - Funs.DB.HJGL_PackagingManageDetail.DeleteAllOnSubmit(list); - Funs.DB.SubmitChanges(); - } - - } - public static void AddBulk(List newtables) - { - - Funs.DB.HJGL_PackagingManageDetail.InsertAllOnSubmit(newtables); - Funs.DB.SubmitChanges(); - } + #endregion Methods } } \ No newline at end of file diff --git a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs index 242e88bb..7339744a 100644 --- a/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs +++ b/SGGL/BLL/HJGL/PreDesign/PackagingManageService .cs @@ -13,32 +13,9 @@ namespace BLL /// /// 包装管理服务类 /// - public static class HJGL_PackagingmanageService + public static class HJGLPackagingmanageService { - public class PackagingManageItem - { - public string PackagingManageId { get; set; } - public string PackagingCode { get; set; } - public string ProjectId { get; set; } - public string ProjectName { get; set; } - public string DriverName { get; set; } - public string DriverPhone { get; set; } - public string LicensePlateNumber { get; set; } - public string ContactName { get; set; } - public string ContactPhone { get; set; } - public string StackingPosition { get; set; } - public int? State { get; set; } - public int? TypeInt { get; set; } - public string TypeString { get; set; } - - public string ReceiveMan { get; set; } - public string ReceiveDate { get; set; } - public string PlanStartDate { get; set; } - - public string Code { get; set; } - public string TrainNumber { get; set; } - public string TrainNumberOld { get; set; } - } + #region Fields /// /// 未到场 @@ -55,14 +32,16 @@ namespace BLL /// public static int state_2 = 2; - public static ListItem[] GetState() + public static Dictionary TypeIntMap = new Dictionary { - ListItem[] list = new ListItem[3]; - list[0] = new ListItem("预出库", state_0.ToString()); - list[1] = new ListItem("已出库", state_1.ToString()); - list[2] = new ListItem("已到场", state_2.ToString()); - return list; - } + { "预制组件" ,(int)TypeInt.预制组件}, + { "预制散件" ,(int)TypeInt.预制散件}, + { "其他材料" ,(int)TypeInt.其他材料}, + }; + + #endregion Fields + + #region Enums public enum TypeInt : int { @@ -71,16 +50,49 @@ namespace BLL 其他材料 = 30, } - public static Dictionary TypeIntMap = new Dictionary - { - { "预制组件" ,(int)TypeInt.预制组件}, - { "预制散件" ,(int)TypeInt.预制散件}, - { "其他材料" ,(int)TypeInt.其他材料}, - }; + #endregion Enums - public static string GetTypeString(int? TypeInt) + #region Methods + + /// + /// 新增实体 + /// + /// + public static void AddHJGL_PackagingManage(Model.HJGL_PackagingManage newtable) { - return TypeIntMap.FirstOrDefault(c => c.Value == TypeInt).Key; + Model.HJGL_PackagingManage table = new Model.HJGL_PackagingManage + { + PackagingManageId = newtable.PackagingManageId, + PackagingCode = newtable.PackagingCode, + ProjectId = newtable.ProjectId, + PipelineComponentId = newtable.PipelineComponentId, + StackingPosition = newtable.StackingPosition, + State = newtable.State, + ContactName = newtable.ContactName, + ContactPhone = newtable.ContactPhone, + Remark = newtable.Remark, + ReceiveDate = newtable.ReceiveDate, + ReceiveMan = newtable.ReceiveMan, + TrainNumber = newtable.TrainNumber, + TrainNumberId = newtable.TrainNumberId, + TypeInt = newtable.TypeInt, + CompileMan = newtable.CompileMan, + CompileDate = newtable.CompileDate + }; + var db1 = Funs.DB; + db1.HJGL_PackagingManage.InsertOnSubmit(table); + db1.SubmitChanges(); + } + + public static void DeleteHJGL_PackagingManageById(string PackagingManageId) + { + var db1 = Funs.DB; + Model.HJGL_PackagingManage table = db1.HJGL_PackagingManage.FirstOrDefault(x => x.PackagingManageId == PackagingManageId); + if (table != null) + { + db1.HJGL_PackagingManage.DeleteOnSubmit(table); + db1.SubmitChanges(); + } } public static Model.HJGL_PackagingManage GetHJGL_PackagingManageById(string PackagingManageId) @@ -103,6 +115,96 @@ namespace BLL return PlanStartDate; } + public static string GetNewPackagingCode(string projectid) + { + string code = ProjectService.GetProjectCodeByProjectId(projectid) + "-" + string.Format("{0:yyyyMMdd}", DateTime.Now) + "-"; + + var q = GetPackagingManageList(projectid, code); + if (q.Total > 0) + { + code = code + (q.Total + 1).ToString().PadLeft(3, '0'); + } + else + { + code = code + "001"; + } + return code; + } + + /// + /// 根据项目号获取包装编号历史记录 + /// + /// + /// + public static List GetPackagingCode(string projectid) + { + Model.SGGLDB db = Funs.DB; + var q = (from x in db.HJGL_PackagingManage + where x.ProjectId.Contains(projectid) + select x.PackagingCode).Distinct().ToList(); + return q; + } + + /// + /// 根据主键获取装箱明细 + /// + /// + /// + public static List GetPackagingDetailById(string PackagingManageId) + { + var model = GetHJGL_PackagingManageById(PackagingManageId); + var result = new List(); + if (model.TypeInt == (int)HJGLPackagingmanageService.TypeInt.预制组件) + { + if (string.IsNullOrEmpty(model.PipelineComponentId)) + return new List(); + var PipelineComponentIds = model?.PipelineComponentId.Split(','); + var query = from com in Funs.DB.HJGL_Pipeline_Component + join pipe in Funs.DB.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeGroup + from pipe in pipeGroup.DefaultIfEmpty() + join unitwork in Funs.DB.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkGroup + from unitwork in unitworkGroup.DefaultIfEmpty() + where PipelineComponentIds.Contains(com.PipelineComponentId) + orderby com.PipelineComponentCode + select new Model.PackagingManagePrintOutput + { + PipelineComponentId = com.PipelineComponentId, + PipelineComponentCode = com.PipelineComponentCode, + PlanStartDate = pipe != null && pipe.PlanStartDate != null ? pipe.PlanStartDate : DateTime.Now, + UnitWorkName = unitwork != null ? unitwork.UnitWorkName : "", + num = "1", + CU = "个", + FlowingSection = pipe != null ? pipe.FlowingSection : "" + }; + result = query.ToList(); + } + else + { + var query = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList(); + var detailList = from x in query + select new Model.PackagingManagePrintOutput + { + PipelineComponentId = x.Id, + PipelineComponentCode = x.MaterialCode, + num = x.Number.ToString(), + CU = x.MaterialUnit, + UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId), + FlowingSection = model.StackingPosition, + }; + result = detailList.ToList(); + } + return result; + } + + public static List GetPackagingManage(string trainNumberId) + { + Model.SGGLDB db = Funs.DB; + var q = (from x in db.HJGL_PackagingManage + where x.TrainNumberId == trainNumberId + select x).Distinct().ToList(); + return q; + } + public static (List Data, int Total) GetPackagingManageList(string projectId, string PackagingCode, int pageIndex = 0, int pageSize = 20) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) @@ -149,6 +251,37 @@ namespace BLL } } + public static ListItem[] GetState() + { + ListItem[] list = new ListItem[3]; + list[0] = new ListItem("预出库", state_0.ToString()); + list[1] = new ListItem("已出库", state_1.ToString()); + list[2] = new ListItem("已到场", state_2.ToString()); + return list; + } + + public static string GetTypeString(int? TypeInt) + { + return TypeIntMap.FirstOrDefault(c => c.Value == TypeInt).Key; + } + + /// + /// 管线下拉框 + /// + /// 下拉框名字 + /// 是否显示请选择 + public static void InitPipelineDownList(FineUIPro.DropDownList dropName, string projectid, bool isShowPlease) + { + dropName.DataValueField = "string"; + dropName.DataTextField = "string"; + dropName.DataSource = GetPackagingCode(projectid); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + /// /// 形成出库单 /// @@ -163,145 +296,6 @@ namespace BLL } } - /// - /// 根据主键获取装箱明细 - /// - /// - /// - /* public static DataTable GetPackagingDetailById(string PackagingManageId) - { - DataTable tb = new DataTable(); - var model = GetHJGL_PackagingManageById(PackagingManageId); - if (!string.IsNullOrEmpty(model.PipelineComponentId)) - { - var PipelineComponentIds = model.PipelineComponentId.Split(','); - string strSql = @"select com.PipelineComponentId, com.PipelineComponentCode,isnull(pipe.PlanStartDate,getdate()) as PlanStartDate,unitwork.UnitWorkName,'1' as num ,'个' as CU,pipe.FlowingSection - from HJGL_Pipeline_Component com - left join HJGL_Pipeline pipe on com.PipelineId=pipe.PipelineId - left join WBS_UnitWork unitwork on pipe.UnitWorkId=unitwork.UnitWorkId - "; - List listStr = new List(); - strSql += string.Format("where com.PipelineComponentId in ( {0}) ", "'" + string.Join("','", PipelineComponentIds) + "'"); - strSql += " order by com.PipelineComponentCode"; - SqlParameter[] parameter = listStr.ToArray(); - tb = SQLHelper.GetDataTableRunText(strSql, parameter); - } - return tb; - }*/ - public static List GetPackagingDetailById(string PackagingManageId) - { - var model = GetHJGL_PackagingManageById(PackagingManageId); - var result = new List(); - if (string.IsNullOrEmpty(model.PipelineComponentId)) - return new List(); - - var PipelineComponentIds = model.PipelineComponentId.Split(','); - - if (model.TypeInt == (int)HJGL_PackagingmanageService.TypeInt.预制组件) - { - var query = from com in Funs.DB.HJGL_Pipeline_Component - join pipe in Funs.DB.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeGroup - from pipe in pipeGroup.DefaultIfEmpty() - join unitwork in Funs.DB.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkGroup - from unitwork in unitworkGroup.DefaultIfEmpty() - where PipelineComponentIds.Contains(com.PipelineComponentId) - orderby com.PipelineComponentCode - select new Model.PackagingManagePrintOutput - { - PipelineComponentId = com.PipelineComponentId, - PipelineComponentCode = com.PipelineComponentCode, - PlanStartDate = pipe != null && pipe.PlanStartDate != null ? pipe.PlanStartDate : DateTime.Now, - UnitWorkName = unitwork != null ? unitwork.UnitWorkName : "", - num = "1", - CU = "个", - FlowingSection = pipe != null ? pipe.FlowingSection : "" - }; - result = query.ToList(); - } - else - { - var query = HJGLPackagingmanagedetailService.GetPackagingData(PackagingManageId).ToList(); - var detailList = from x in query - select new Model.PackagingManagePrintOutput - { - PipelineComponentId = x.Id, - PipelineComponentCode = x.MaterialCode, - num = x.Number.ToString(), - CU = x.MaterialUnit, - UnitWorkName = x.UnitWorkId == null ? "" : UnitWorkService.GetNameById(x.UnitWorkId), - FlowingSection = x.FlowingSection, - }; - result = detailList.ToList(); - } - return result; - } - /// - /// 根据项目号获取包装编号历史记录 - /// - /// - /// - public static List GetPackagingCode(string projectid) - { - Model.SGGLDB db = Funs.DB; - var q = (from x in db.HJGL_PackagingManage - where x.ProjectId.Contains(projectid) - select x.PackagingCode).Distinct().ToList(); - return q; - } - public static List GetPackagingManage(string trainNumberId) - { - Model.SGGLDB db = Funs.DB; - var q = (from x in db.HJGL_PackagingManage - where x.TrainNumberId==trainNumberId - select x).Distinct().ToList(); - return q; - } - public static string GetNewPackagingCode(string projectid) - { - string code = ProjectService.GetProjectCodeByProjectId(projectid) + "-" + string.Format("{0:yyyyMMdd}", DateTime.Now) + "-"; - - var q = GetPackagingManageList(projectid, code); - if (q.Total > 0) - { - code = code + (q.Total + 1).ToString().PadLeft(3, '0'); - } - else - { - code = code + "001"; - } - return code; - } - - /// - /// 新增实体 - /// - /// - public static void AddHJGL_PackagingManage(Model.HJGL_PackagingManage newtable) - { - Model.HJGL_PackagingManage table = new Model.HJGL_PackagingManage - { - PackagingManageId = newtable.PackagingManageId, - PackagingCode = newtable.PackagingCode, - ProjectId = newtable.ProjectId, - PipelineComponentId = newtable.PipelineComponentId, - StackingPosition = newtable.StackingPosition, - State = newtable.State, - ContactName = newtable.ContactName, - ContactPhone = newtable.ContactPhone, - Remark = newtable.Remark, - ReceiveDate = newtable.ReceiveDate, - ReceiveMan = newtable.ReceiveMan, - TrainNumber = newtable.TrainNumber, - TrainNumberId = newtable.TrainNumberId, - TypeInt = newtable.TypeInt, - CompileMan=newtable.CompileMan, - CompileDate = newtable.CompileDate - }; - var db1 = Funs.DB; - db1.HJGL_PackagingManage.InsertOnSubmit(table); - db1.SubmitChanges(); - } - public static void UpdateHJGL_PackagingManage(Model.HJGL_PackagingManage newtable) { var db1 = Funs.DB; @@ -326,32 +320,37 @@ namespace BLL } } - public static void DeleteHJGL_PackagingManageById(string PackagingManageId) + #endregion Methods + + #region Classes + + public class PackagingManageItem { - var db1 = Funs.DB; - Model.HJGL_PackagingManage table = db1.HJGL_PackagingManage.FirstOrDefault(x => x.PackagingManageId == PackagingManageId); - if (table != null) - { - db1.HJGL_PackagingManage.DeleteOnSubmit(table); - db1.SubmitChanges(); - } + #region Properties + + public string Code { get; set; } + public string ContactName { get; set; } + public string ContactPhone { get; set; } + public string DriverName { get; set; } + public string DriverPhone { get; set; } + public string LicensePlateNumber { get; set; } + public string PackagingCode { get; set; } + public string PackagingManageId { get; set; } + public string PlanStartDate { get; set; } + public string ProjectId { get; set; } + public string ProjectName { get; set; } + public string ReceiveDate { get; set; } + public string ReceiveMan { get; set; } + public string StackingPosition { get; set; } + public int? State { get; set; } + public string TrainNumber { get; set; } + public string TrainNumberOld { get; set; } + public int? TypeInt { get; set; } + public string TypeString { get; set; } + + #endregion Properties } - /// - /// 管线下拉框 - /// - /// 下拉框名字 - /// 是否显示请选择 - public static void InitPipelineDownList(FineUIPro.DropDownList dropName, string projectid, bool isShowPlease) - { - dropName.DataValueField = "string"; - dropName.DataTextField = "string"; - dropName.DataSource = GetPackagingCode(projectid); - dropName.DataBind(); - if (isShowPlease) - { - Funs.FineUIPleaseSelect(dropName); - } - } + #endregion Classes } } \ No newline at end of file diff --git a/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs b/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs index 3a2e63db..b3edb223 100644 --- a/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs +++ b/SGGL/BLL/HJGL/TestPackage/TestPackagePrintService.cs @@ -474,8 +474,10 @@ namespace BLL Dictionary keyValuePairs = new Dictionary(); var projectName = BLL.ProjectService.GetProjectNameByProjectId(projectid); var UnitWorkName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + var UnitWorkCode = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkCode; keyValuePairs.Add("projectName", projectName); keyValuePairs.Add("UnitWorkName", UnitWorkName); + keyValuePairs.Add("UnitWorkCode", UnitWorkCode); BLL.FastReportService.AddFastreportParameter(keyValuePairs); string sql3 = @"SELECT isoList.PT_PipeId, isoList.PTP_ID, @@ -680,9 +682,11 @@ namespace BLL Dictionary keyValuePairs = new Dictionary(); var projectName = BLL.ProjectService.GetProjectNameByProjectId(projectid); var UnitWorkName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; + var UnitWorkCode = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkCode; var unitNames = BLL.UnitService.GetUnitNameByUnitId(updateTestPackage.UnitId); keyValuePairs.Add("ProjectName", projectName); keyValuePairs.Add("UnitWorkName", UnitWorkName); + keyValuePairs.Add("UnitWorkCode", UnitWorkCode); keyValuePairs.Add("UnitName2", unitNames);//施工单位 if (!string.IsNullOrEmpty(q.PipingClassId)) { diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index 230f8d1e..c42d9653 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -654,7 +654,7 @@ namespace BLL join y in db.HJGL_Pipeline on x.PipelineId equals y.PipelineId join z in db.Base_Material on y.MaterialId equals z.MaterialId where x.ProjectId == projectId && y.UnitWorkId == unitWorkId && y.FlowingSection == flowingSection && z.SteelType == steelType - && y.PipeArea == "1" && x.JointAttribute == "预制口" + && y.PipeArea == "1" && x.JointAttribute == "预制口" //&& Convert.ToInt32(x.DNDia.Substring(2, x.DNDia.Length - 2)) < c select x); diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs index 849de380..5bc4c5f0 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs @@ -94,7 +94,7 @@ namespace BLL approveManModels.Add(new ApproveManModel { Number = 1, userid = table.ConstructionManager, Rolename = "施工经理" }); // approveManModels.Add(new ApproveManModel { Number = 2, userid = table.ProjectManager, Rolename = "项目经理" }); approveManModels.Add(new ApproveManModel { Number = 2, userid = table.Approval_Construction, Rolename = "施工管理部" }); - //approveManModels.Add(new ApproveManModel { Number = 4, userid = table.DeputyGeneralManager, Rolename = "分管副总经理" }); + approveManModels.Add(new ApproveManModel { Number = 3, userid = table.DeputyGeneralManager, Rolename = "分管领导" }); return approveManModels; } diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterOut.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterOut.aspx.cs index ad17e783..205c3f35 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterOut.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterOut.aspx.cs @@ -35,7 +35,7 @@ namespace FineUIPro.Web.CLGL table.Id = Id; var model = TwInOutplanmasterService.GetListData(table).FirstOrDefault(); - txtCusBillCode.Text = TwOutputmasterService.GetCusBillCode(model.WeldTaskCode, (TwConst.TypeInt)model.TypeInt, (BLL.TwConst.Category)model.Category); + txtCusBillCode.Text = TwOutputmasterService.GetCusBillCode(model.WeldTaskCode, (TwConst.TypeInt)model.TypeInt, (BLL.TwConst.Category)model.Category, model.CusBillCode); txtWarehouseCode.Text = model.WarehouseCode; txtCreateDate.Text = string.Format("{0:yyyy-MM-dd}", model.CreateDate); txtCreateMan.Text = Person_PersonsService.GetPersonsNameById(model.CreateMan); diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/试压包导入模版.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/试压包导入模版.xlsx index 3319b5d8..3f97192b 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/试压包导入模版.xlsx 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 403719ab..b32bbdad 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,7 +42,7 @@ namespace FastReport } - + @@ -67,6 +67,7 @@ namespace FastReport + @@ -115,7 +116,7 @@ namespace FastReport - + @@ -207,7 +208,7 @@ namespace FastReport - + @@ -255,8 +256,8 @@ namespace FastReport - - + + @@ -305,7 +306,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测结果汇总表.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道无损检测结果汇总表.frx index f67dfe60..228ddc37 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; @@ -67,7 +67,7 @@ namespace FastReport } } - + @@ -116,6 +116,7 @@ namespace FastReport + @@ -137,7 +138,7 @@ namespace FastReport - + @@ -158,7 +159,7 @@ namespace FastReport - + @@ -170,7 +171,7 @@ namespace FastReport - + @@ -179,7 +180,7 @@ namespace FastReport - + @@ -257,7 +258,7 @@ namespace FastReport - + @@ -289,7 +290,7 @@ namespace FastReport - + @@ -317,8 +318,8 @@ namespace FastReport - - + + @@ -347,7 +348,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx b/SGGL/FineUIPro.Web/File/Fastreport/JGZL/管道材料材质标识检查记录.frx index c4c7c366..79ccb503 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,7 +42,7 @@ namespace FastReport } - + @@ -107,7 +107,7 @@ namespace FastReport - + @@ -128,15 +128,15 @@ namespace FastReport - + - - + + @@ -165,7 +165,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/发货单.frx b/SGGL/FineUIPro.Web/File/Fastreport/发货单.frx index 83bbfb4b..ff204e02 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,15 +42,24 @@ namespace FastReport } - + - - - - + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx b/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx index 48e59e9e..83863b3a 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 e80957ee..f7d2a628 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1485,6 +1485,9 @@ + + + @@ -10087,6 +10090,27 @@ MaterialCodeLibIn.aspx + + MaterialColor.aspx + ASPXCodeBehind + + + MaterialColor.aspx + + + MaterialColorEdit.aspx + ASPXCodeBehind + + + MaterialColorEdit.aspx + + + MaterialColorInaspx.aspx + ASPXCodeBehind + + + MaterialColorInaspx.aspx + MaterialEdit.aspx ASPXCodeBehind @@ -16812,7 +16836,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx new file mode 100644 index 00000000..7c0ca140 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx @@ -0,0 +1,126 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialColor.aspx.cs" Inherits="FineUIPro.Web.HJGL.BaseInfo.MaterialColor" %> + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs new file mode 100644 index 00000000..70e44f29 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.cs @@ -0,0 +1,247 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.BaseInfo +{ + public partial class MaterialColor : PageBase + { + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + Model.Base_MaterialColor table = new Model.Base_MaterialColor(); + var tb = BLL.BaseMaterialcolorService.GetListByQueryModle(table, Grid1.PageIndex, Grid1.PageSize); + Grid1.RecordCount = tb.Total; + Grid1.DataSource = tb.Data; + Grid1.DataBind(); + } + #endregion + + #region GV 数据操作 + /// + /// 过滤表头 + /// + /// + /// + //protected void Grid1_FilterChange(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + this.Grid1.PageIndex = e.NewPageIndex; + this.BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + this.Grid1.SortDirection = e.SortDirection; + this.Grid1.SortField = e.SortField; + this.BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + this.BindGrid(); + } + #endregion + + #region 数据编辑事件 + /// + /// 新增 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("Base_MaterialColorEdit.aspx?MaterialColorId={0}", string.Empty, "增加 - "))); + } + + /// + /// 编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string ID = Grid1.SelectedRowID; + var model = BLL.BaseMaterialcolorService.GetModelById(ID); + if (model != null) ///已上报时不能删除 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("Base_MaterialColorEdit.aspx?MaterialColorId={0}", ID, "编辑 - "))); + } + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnEdit_Click(null, null); + } + + /// + /// 批量删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var model = BLL.BaseMaterialcolorService.GetModelById(rowID); + if (model != null) + { + BLL.BaseMaterialcolorService.DeleteById(rowID); + } + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 关闭弹出窗 + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 获取权限按钮 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.BaseMaterialcolorMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + } + } + } + #endregion + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as System.Web.UI.WebControls.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #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 new file mode 100644 index 00000000..7853f4ba --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColor.aspx.designer.cs @@ -0,0 +1,152 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.BaseInfo +{ + + + public partial class MaterialColor + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx new file mode 100644 index 00000000..697b092a --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx @@ -0,0 +1,77 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MaterialColorEdit.aspx.cs" Inherits="FineUIPro.Web.HJGL.BaseInfo.MaterialColorEdit" %> + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.cs new file mode 100644 index 00000000..4af16fb9 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.cs @@ -0,0 +1,103 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.BaseInfo +{ + public partial class MaterialColorEdit: PageBase + { + #region + /// + /// 主键 + /// + public string MaterialColorId + { + get + { + return (string)ViewState["MaterialColorId"]; + } + set + { + ViewState["MaterialColorId"] = value; + } + } + #endregion + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + ////权限按钮方法 + this.GetButtonPower(); + this.MaterialColorId = Request.Params["MaterialColorId"]; + if (!string.IsNullOrEmpty(this.MaterialColorId)) + { + Model.Base_MaterialColor model = BLL.BaseMaterialcolorService.GetModelById(this.MaterialColorId); + if (model != null) + { + this.txtUnitId.Text = model.UnitId; + this.txtMaterialId.Text = model.MaterialId; + this.txtColorName.Text = model.ColorName; + this.txtColorCardNo.Text = model.ColorCardNo; + this.txtRGB.Text = model.RGB; + this.txtRemark.Text = model.Remark; + + } + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + Model.Base_MaterialColor table = new Model.Base_MaterialColor(); + table.UnitId = this.txtUnitId.Text; + table.MaterialId = this.txtMaterialId.Text; + table.ColorName = this.txtColorName.Text; + table.ColorCardNo = this.txtColorCardNo.Text; + table.RGB = this.txtRGB.Text; + table.Remark = this.txtRemark.Text; + if (string.IsNullOrEmpty(this.MaterialColorId)) + { + table.MaterialColorId = SQLHelper.GetNewID(typeof(Model.Base_MaterialColor)); + BLL.BaseMaterialcolorService.Add(table); + + } + else + { + table.MaterialColorId = this.MaterialColorId; + BLL.BaseMaterialcolorService.Update(table); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.BaseMaterialcolorMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.designer.cs new file mode 100644 index 00000000..1388cb26 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorEdit.aspx.designer.cs @@ -0,0 +1,134 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.BaseInfo +{ + + + public partial class MaterialColorEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// txtUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnitId; + + /// + /// txtMaterialId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMaterialId; + + /// + /// txtColorName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtColorName; + + /// + /// txtColorCardNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtColorCardNo; + + /// + /// txtRGB 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRGB; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx new file mode 100644 index 00000000..8e0c8a16 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx @@ -0,0 +1,16 @@ +<%@ 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 new file mode 100644 index 00000000..cb7650a1 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +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 new file mode 100644 index 00000000..6a2c9880 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/MaterialColorInaspx.aspx.designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// 此代码是由工具生成的。 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将会丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.BaseInfo +{ + + + public partial class MaterialColorInaspx + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + } +} diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocation.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocation.aspx.cs index 47b7b7c5..116895ff 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocation.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocation.aspx.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using System.Linq; namespace FineUIPro.Web.HJGL.BaseInfo { @@ -225,6 +226,10 @@ namespace FineUIPro.Web.HJGL.BaseInfo private string judgementDelete(string id) { string content = string.Empty; + if (Funs.DB.HJGL_WeldJoint.Any(x=>x.WeldingLocationId==id)) + { + content = "焊口已关联此焊接位置"; + } return content; } #endregion diff --git a/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocationEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocationEdit.aspx.cs index c01e8bd8..001542b3 100644 --- a/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocationEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/BaseInfo/WeldingLocationEdit.aspx.cs @@ -43,24 +43,48 @@ namespace FineUIPro.Web.HJGL.BaseInfo protected void btnSave_Click(object sender, EventArgs e) { string WeldingLocationId = Request.Params["WeldingLocationId"]; - var q = Funs.DB.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationCode == this.txtWeldingLocationCode.Text.Trim() && (x.WeldingLocationId != WeldingLocationId || (WeldingLocationId == null && x.WeldingLocationId != null))); - if (q != null) - { - Alert.ShowInTop("此位置代号已存在!", MessageBoxIcon.Warning); - return; - } + string code = this.txtWeldingLocationCode.Text.Trim(); + string name = this.txtWeldingLocationName.Text.Trim(); - var q2 = Funs.DB.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationName == this.txtWeldingLocationName.Text.Trim() && (x.WeldingLocationId != WeldingLocationId || (WeldingLocationId == null && x.WeldingLocationId != null))); - if (q2 != null) + // 判断是否为编辑场景(id 不为空) + if (!string.IsNullOrEmpty(WeldingLocationId)) { - Alert.ShowInTop("此位置名称已存在!", MessageBoxIcon.Warning); - return; + var q = Funs.DB.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationCode == code && x.WeldingLocationId != WeldingLocationId); + if (q != null) + { + Alert.ShowInTop("此位置代号已存在!", MessageBoxIcon.Warning); + return; + } + + var q2 = Funs.DB.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationName == name && x.WeldingLocationId != WeldingLocationId); + if (q2 != null) + { + Alert.ShowInTop("此位置名称已存在!", MessageBoxIcon.Warning); + return; + } + } + else + { + // 新增场景:只需判断是否存在相同的 code 或 name + var q = Funs.DB.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationCode == code); + if (q != null) + { + Alert.ShowInTop("此位置代号已存在!", MessageBoxIcon.Warning); + return; + } + + var q2 = Funs.DB.Base_WeldingLocation.FirstOrDefault(x => x.WeldingLocationName == name); + if (q2 != null) + { + Alert.ShowInTop("此位置名称已存在!", MessageBoxIcon.Warning); + return; + } } Model.Base_WeldingLocation newWeldingLocation = new Model.Base_WeldingLocation { - WeldingLocationCode = this.txtWeldingLocationCode.Text.Trim(), - WeldingLocationName = this.txtWeldingLocationName.Text.Trim(), + WeldingLocationCode = code, + WeldingLocationName = name, Remark = this.txtRemark.Text.Trim() }; @@ -68,13 +92,11 @@ namespace FineUIPro.Web.HJGL.BaseInfo { newWeldingLocation.WeldingLocationId = WeldingLocationId; BLL.Base_WeldingLocationServie.UpdateWeldingLocation(newWeldingLocation); - //BLL.Sys_LogService.AddLog(Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PipingClassMenuId, Const.BtnModify, newPipingClass.PipingClassId); } else { newWeldingLocation.WeldingLocationId = SQLHelper.GetNewID(typeof(Model.Base_WeldingLocation)); BLL.Base_WeldingLocationServie.AddWeldingLocation(newWeldingLocation); - //BLL.Sys_LogService.AddLog(Const.System_6, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, Const.HJGL_PipingClassMenuId, Const.BtnAdd, newPipingClass.PipingClassId); } ShowNotify("保存成功!", MessageBoxIcon.Success); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx index a313113b..d1265202 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx @@ -29,7 +29,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs index 083ab0a8..4ec47203 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManage.aspx.cs @@ -33,7 +33,7 @@ namespace FineUIPro.Web.HJGL.PreDesign /// private void BindGrid() { - var list = BLL.HJGL_PackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim(), this.Grid1.PageIndex, this.Grid1.PageSize); + var list = BLL.HJGLPackagingmanageService.GetPackagingManageList(this.CurrUser.LoginProjectId, this.txtPackagingCode.Text.Trim(), this.Grid1.PageIndex, this.Grid1.PageSize); Grid1.RecordCount = list.Total; Grid1.DataSource = list.Data; Grid1.DataBind(); @@ -110,20 +110,7 @@ namespace FineUIPro.Web.HJGL.PreDesign BindGrid(); } #endregion - protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) - { - if (e.CommandName == "cmd_detail") - { - string id = Grid1.SelectedRowID; - string url = "PackagingManageView.aspx?PackagingManageId={0}"; - PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format(url, id, "操作 - "))); - } - else if (e.CommandName == "cmd_print") - { - string Id = this.Grid1.SelectedRowID; - Pring(Id); - } - } + #region 增加按钮 /// /// 增加按钮 @@ -184,7 +171,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } string id = Grid1.SelectedRowID; string url = string.Empty; - var wpq = BLL.HJGL_PackagingmanageService.GetHJGL_PackagingManageById(id); + var wpq = BLL.HJGLPackagingmanageService.GetHJGL_PackagingManageById(id); if (wpq != null) { url = "PackagingManageEdit.aspx?PackagingManageId={0}"; @@ -192,6 +179,22 @@ namespace FineUIPro.Web.HJGL.PreDesign PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format(url, id, "操作 - "))); } } + + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + if (e.CommandName == "cmd_detail") + { + string id = Grid1.SelectedRowID; + string url = "PackagingManageView.aspx?PackagingManageId={0}"; + PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format(url, id, "操作 - "))); + } + else if (e.CommandName == "cmd_print") + { + string Id = this.Grid1.SelectedRowID; + Pring(Id); + } + } + #endregion #region 删除 @@ -224,7 +227,7 @@ namespace FineUIPro.Web.HJGL.PreDesign string rowID = Grid1.DataKeys[rowIndex][0].ToString(); if (this.judgementDelete(rowID, isShow)) { - BLL.HJGL_PackagingmanageService.DeleteHJGL_PackagingManageById(rowID); + BLL.HJGLPackagingmanageService.DeleteHJGL_PackagingManageById(rowID); //BLL.Sys_LogService.AddLog(BLL.Const.System_2, this.CurrUser.LoginProjectId, this.CurrUser.PersonId, "删除焊接工艺评定台账"); } } @@ -262,6 +265,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } } #endregion + #region 打印 /// /// 打印 @@ -278,7 +282,7 @@ namespace FineUIPro.Web.HJGL.PreDesign if (!string.IsNullOrEmpty(this.Grid1.SelectedRowID)) { string Id = this.Grid1.SelectedRowID; - var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id); + var model = HJGLPackagingmanageService.GetHJGL_PackagingManageById(Id); if (model != null) { if (!string.IsNullOrEmpty(model.PipelineComponentId)) @@ -289,7 +293,7 @@ namespace FineUIPro.Web.HJGL.PreDesign HJGL_PipelineComponentService.UpdateOutState(item, model.PackagingCode); } } - HJGL_PackagingmanageService.PutOutOrder(Id); + HJGLPackagingmanageService.PutOutOrder(Id); Pring(Id); } } @@ -308,10 +312,10 @@ namespace FineUIPro.Web.HJGL.PreDesign ShowNotify("请选择要打印的项", MessageBoxIcon.Warning); return; } - DataTable tb = LINQToDataTable(BLL.HJGL_PackagingmanageService.GetPackagingDetailById(Id)); + DataTable tb = LINQToDataTable(BLL.HJGLPackagingmanageService.GetPackagingDetailById(Id)); if (tb.Rows.Count > 0) { - var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(Id); + var model = HJGLPackagingmanageService.GetHJGL_PackagingManageById(Id); var dtTable = tb.AsEnumerable().OrderBy(o => o["PlanStartDate"]).CopyToDataTable(); string PlanStartDate = ""; @@ -347,6 +351,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } } #endregion + #region 导出按钮 /// 导出按钮 /// @@ -412,7 +417,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { if (state != null) { - string txt = HJGL_PackagingmanageService.GetState().FirstOrDefault(x => x.Value == state.ToString()).Text; + string txt = HJGLPackagingmanageService.GetState().FirstOrDefault(x => x.Value == state.ToString()).Text; return txt; } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx index 2cc6caaf..36d10e48 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx @@ -93,15 +93,15 @@ - - + --%> - + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs index bd4bb451..634155ed 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs @@ -32,21 +32,21 @@ namespace FineUIPro.Web.HJGL.PreDesign drpTypeInt.DataTextField = "Key"; drpTypeInt.DataValueField = "Value"; - drpTypeInt.DataSource = HJGL_PackagingmanageService.TypeIntMap; + drpTypeInt.DataSource = HJGLPackagingmanageService.TypeIntMap; drpTypeInt.DataBind(); btnClose.OnClientClick = ActiveWindow.GetHideReference(); if (!string.IsNullOrEmpty(PackagingManageId)) { - var model = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); + var model = HJGLPackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); drpTypeInt.Enabled = false; txtPackagingCode.Text = model.PackagingCode; dropPipelineComponentCode.Values = model.PipelineComponentId?.Split(','); txtStackingPosition.Text = model.StackingPosition; drpTrainNumber.SelectedValue = model.TrainNumberId; drpTypeInt.SelectedValue = model.TypeInt.ToString(); - if (model.State== HJGL_PackagingmanageService.state_0) + if (model.State== HJGLPackagingmanageService.state_0) { btnSave.Hidden = false; } @@ -55,7 +55,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { drpTypeInt.Enabled = true; btnSave.Hidden = false; - txtPackagingCode.Text = HJGL_PackagingmanageService.GetNewPackagingCode(this.CurrUser.LoginProjectId); + txtPackagingCode.Text = HJGLPackagingmanageService.GetNewPackagingCode(this.CurrUser.LoginProjectId); } drpTypeInt_SelectedIndexChanged(null, null); } @@ -99,17 +99,17 @@ namespace FineUIPro.Web.HJGL.PreDesign table.TypeInt = int.Parse(drpTypeInt.SelectedValue); table.CompileMan = this.CurrUser.PersonId; table.CompileDate = DateTime.Now; - if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制组件).ToString()) + if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.预制组件).ToString()) { table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); } - BLL.HJGL_PackagingmanageService.AddHJGL_PackagingManage(table); + BLL.HJGLPackagingmanageService.AddHJGL_PackagingManage(table); PackagingManageId= table.PackagingManageId; } else { - Model.HJGL_PackagingManage table = BLL.HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); + Model.HJGL_PackagingManage table = BLL.HJGLPackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); if (table != null) { table.PackagingCode = txtPackagingCode.Text; @@ -120,7 +120,7 @@ namespace FineUIPro.Web.HJGL.PreDesign //table.ContactPhone =txtContactPhone.Text; table.TrainNumberId = drpTrainNumber.SelectedValue; table.TypeInt = int.Parse(drpTypeInt.SelectedValue); - if (drpTypeInt.SelectedValue ==((int)HJGL_PackagingmanageService.TypeInt.预制组件).ToString()) + if (drpTypeInt.SelectedValue ==((int)HJGLPackagingmanageService.TypeInt.预制组件).ToString()) { table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); @@ -147,7 +147,7 @@ namespace FineUIPro.Web.HJGL.PreDesign } } - BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table); + BLL.HJGLPackagingmanageService.UpdateHJGL_PackagingManage(table); } SaveDetail(); } @@ -188,7 +188,7 @@ namespace FineUIPro.Web.HJGL.PreDesign protected void btnSelect_Click(object sender, EventArgs e) { Save(); - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PackagingManageSelect.aspx?PackagingManageId={0}", PackagingManageId, "选择- "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PackagingManageSelect.aspx?PackagingManageId={0}&TypeInt={1}", PackagingManageId, drpTypeInt.SelectedValue, "选择- "))); } protected void btnSelectStock_Click(object sender, EventArgs e) @@ -201,31 +201,22 @@ namespace FineUIPro.Web.HJGL.PreDesign protected void drpTypeInt_SelectedIndexChanged(object sender, EventArgs e) { - if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制组件).ToString()) + if (drpTypeInt.SelectedValue == ((int)HJGLPackagingmanageService.TypeInt.预制组件).ToString()) { dropPipelineComponentCode.Hidden=false; Grid2.Hidden=true; BindGrid(); } - else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.预制散件).ToString()) + else { dropPipelineComponentCode.Hidden = true; Grid2.Hidden = false; btnSelect.Hidden = false; - btnSelectStock.Hidden = true; - BindGrid2(this.PackagingManageId); + //btnSelectStock.Hidden = true; + BindGrid2(this.PackagingManageId); } - else if (drpTypeInt.SelectedValue == ((int)HJGL_PackagingmanageService.TypeInt.其他材料).ToString()) - { - dropPipelineComponentCode.Hidden = true; - Grid2.Hidden = false; - btnSelect.Hidden = true; - btnSelectStock.Hidden = false; - BindGrid2(this.PackagingManageId); - - } - + } protected void Grid2_RowCommand(object sender, GridCommandEventArgs e) { diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs index 4bd77055..94d3a3bc 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PreDesign { - - - public partial class PackagingManageEdit { - +namespace FineUIPro.Web.HJGL.PreDesign +{ + + + public partial class PackagingManageEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Form2 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form2; - + /// /// txtPackagingCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPackagingCode; - + /// /// drpTypeInt 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpTypeInt; - + /// /// dropPipelineComponentCode 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownBox dropPipelineComponentCode; - + /// /// Grid1 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Label1 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label1; - + /// /// Label3 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label3; - + /// /// txtpipelineCode 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtpipelineCode; - + /// /// txtpipelineComponentCode 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtpipelineComponentCode; - + /// /// txtflowingSection 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtflowingSection; - + /// /// btnFind 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnFind; - + /// /// txtStackingPosition 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtStackingPosition; - + /// /// drpTrainNumber 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpTrainNumber; - + /// /// Grid2 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid2; - + /// /// Toolbar3 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// btnSelect 控件。 /// @@ -173,16 +175,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSelect; - - /// - /// btnSelectStock 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSelectStock; - + /// /// tbNumber 控件。 /// @@ -191,7 +184,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox tbNumber; - + /// /// Toolbar2 控件。 /// @@ -200,7 +193,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// btnSave 控件。 /// @@ -209,7 +202,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 控件。 /// @@ -218,7 +211,7 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// Window1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx index 0fdf4afe..d03625a6 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx @@ -49,7 +49,7 @@ + EnableTextSelection="true" > @@ -68,7 +68,7 @@ DataKeyNames="Id" EnableColumnLines="true" DataIDField="Id" EnableTextSelection="True" AllowSorting="true" SortField="MaterialCode" SortDirection="ASC" AllowPaging="false" IsDatabasePaging="true" - PageSize="1000" EnableCheckBoxSelect="true"> + PageSize="1000" EnableCheckBoxSelect="true" OnRowDataBound="Grid1_RowDataBound"> @@ -85,6 +85,9 @@ + + @@ -97,8 +100,8 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs index 834a34b0..9383d294 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageSelect.aspx.cs @@ -1,15 +1,8 @@ using BLL; -using FastReport.DevComponents.DotNetBar; -using FineUIPro.Web.HJGL.WeldingManage; -using Model; using System; -using System.Collections; using System.Collections.Generic; using System.Data; -using System.Data.SqlClient; using System.Linq; -using System.Web; -using System.Web.UI; using System.Web.UI.WebControls; namespace FineUIPro.Web.HJGL.PreDesign @@ -32,6 +25,20 @@ namespace FineUIPro.Web.HJGL.PreDesign ViewState["PackagingManageId"] = value; } } + /// + /// 0是散件 1 是其他 + /// + public string TypeInt + { + get + { + return (string)ViewState["TypeInt"]; + } + set + { + ViewState["TypeInt"] = value; + } + } #endregion 定义项 @@ -46,7 +53,8 @@ namespace FineUIPro.Web.HJGL.PreDesign { if (!IsPostBack) { - PackagingManageId = Request.QueryString["PackagingManageId"]; + PackagingManageId = Request.Params["PackagingManageId"]; + TypeInt = Request.Params["TypeInt"]; this.InitTreeMenu();//加载树 InitDropList(); } @@ -55,12 +63,6 @@ namespace FineUIPro.Web.HJGL.PreDesign #endregion 加载页面 #region 加载树 - - private void BindNodes(TreeNode node) - { - BLL.PipelineService.BindTreeNodes(node, this.tvPipeCode.Text.Trim(), txtMaterialCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize); - } - /// /// 加载树 /// @@ -86,141 +88,46 @@ namespace FineUIPro.Web.HJGL.PreDesign var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList(); // 获取当前用户所在单位 var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId); - + //获取主项 var unitWorkList = (from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null select x).ToList(); + //获取当前项目出库单 + Model.Tw_InOutMasterOutput querytable = new Model.Tw_InOutMasterOutput(); + querytable.ProjectId = this.CurrUser.LoginProjectId; + querytable.InOutType = (int?)TwConst.InOutType.出库; + querytable.TypeInt = TypeInt == ((int)HJGLPackagingmanageService.TypeInt.预制散件).ToString() ? (int)TwConst.TypeInt.散件出库 : (int)TwConst.TypeInt.其他出库; + var outMasterOutputs = BLL.TwOutputmasterService.GetListData(querytable); List unitWork1 = null; List unitWork2 = null; - //// 当前为施工单位,只能操作本单位的数据 - //if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2) - //{ - // unitWork1 = (from x in unitWorkList - // where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1" - // select x).ToList(); - // unitWork2 = (from x in unitWorkList - // where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2" - // select x).ToList(); - //} - //else - //{ - unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList(); unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList(); - //} - //var dbpipeLineMat = from x in Funs.DB.HJGL_PipeLineMat select x; - //var DBpipeline = from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId select x; - if (unitWork1.Count() > 0) - { - foreach (var q in unitWork1) - { - string strSql = " SELECT DISTINCT [t0].[PipelineId] FROM [dbo].[HJGL_Pipeline] AS [t0]\r\nleft JOIN [dbo].[HJGL_PipeLineMat] AS [t1] ON [t0].[PipelineId] = [t1].[PipelineId]"; - strSql += "where [t0].[UnitWorkId] =@UnitWorkId "; - List listStr = new List(); - listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId)); - - if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim())) - { - strSql += " and [t1].[MaterialCode] like @MaterialCode"; - listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%")); - - } - if (!string.IsNullOrEmpty(tvPipeCode.Text.Trim())) - { - strSql += " and [t0].[PipelineCode] like @PipelineCode"; - listStr.Add(new SqlParameter("@PipelineCode", "%" + tvPipeCode.Text.Trim() + "%")); - - } - SqlParameter[] parameter = listStr.ToArray(); - DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter); - var a = dt.Rows.Count; - - //int a = (from x in DBpipeline - // join y in dbpipeLineMat on x.PipelineId equals y.PipelineId - // where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId - // && y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) - // select x.PipelineId).Distinct().Count(); - var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); - TreeNode tn1 = new TreeNode(); - tn1.NodeID = q.UnitWorkId; - tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; - tn1.ToolTip = "施工单位:" + unitNamesUnitIds; - tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); - tn1.EnableExpandEvent = true; - rootNode1.Nodes.Add(tn1); - if (a > 0) - { - // BindNodes(tn1); - TreeNode newNode = new TreeNode(); - newNode.Text = "加载管线..."; - newNode.NodeID = "加载管线..."; - tn1.Nodes.Add(newNode); - } - } - } + if (unitWork2.Count() > 0) { foreach (var q in unitWork2) { - string strSql = " SELECT DISTINCT [t0].[PipelineId] FROM [dbo].[HJGL_Pipeline] AS [t0]\r\nleft JOIN [dbo].[HJGL_PipeLineMat] AS [t1] ON [t0].[PipelineId] = [t1].[PipelineId]"; - strSql += "where [t0].[UnitWorkId] =@UnitWorkId "; - List listStr = new List(); - listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId)); - - if (!string.IsNullOrEmpty(txtMaterialCode.Text.Trim())) - { - strSql += " and [t1].[MaterialCode] like @MaterialCode"; - listStr.Add(new SqlParameter("@MaterialCode", "%" + txtMaterialCode.Text.Trim() + "%")); - - } - if (!string.IsNullOrEmpty(tvPipeCode.Text.Trim())) - { - strSql += " and [t0].[PipelineCode] like @PipelineCode"; - listStr.Add(new SqlParameter("@PipelineCode", "%" + tvPipeCode.Text.Trim() + "%")); - - } - SqlParameter[] parameter = listStr.ToArray(); - DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter); - - var a = dt.Rows.Count; - - //var b = (from x in Funs.DB.HJGL_Pipeline - // join y in Funs.DB.HJGL_PipeLineMat on x.PipelineId equals y.PipelineId - // where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) - // select x).Distinct(); - //var b = (from x in DBpipeline - // join y in dbpipeLineMat on x.PipelineId equals y.PipelineId - // where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId - // && y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) - // select x.PipelineId).Distinct(); - //int a = (from x in DBpipeline - // join y in dbpipeLineMat on x.PipelineId equals y.PipelineId - // where x.PipelineCode.Contains(tvPipeCode.Text.Trim()) && x.UnitWorkId == q.UnitWorkId - // && y.MaterialCode.Contains(txtMaterialCode.Text.Trim()) - // select x.PipelineId).Distinct().Count(); + var unitworkOutMasterOutputs = outMasterOutputs.Where(x => x.UnitWorkId == q.UnitWorkId); var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); TreeNode tn2 = new TreeNode(); tn2.NodeID = q.UnitWorkId; - tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; - //if (q.UnitWorkId == this.hdUnitWorkId.Text) - //{ - // tn2.Expanded = true; - //} + tn2.Text = q.UnitWorkName; tn2.ToolTip = "施工单位:" + unitNamesUnitIds; - tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); + //tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); tn2.EnableExpandEvent = true; tn2.EnableClickEvent = true; rootNode2.Nodes.Add(tn2); - if (a > 0) + foreach (var item in unitworkOutMasterOutputs) { - // BindNodes(tn2); - TreeNode newNode = new TreeNode(); - newNode.Text = "加载管线..."; - newNode.NodeID = "加载管线..."; + FineUIPro.TreeNode newNode = new FineUIPro.TreeNode(); + newNode.Text = item.CusBillCode; + newNode.NodeID = item.Id; + newNode.CommandName = "出库单"; + newNode.EnableClickEvent = true; tn2.Nodes.Add(newNode); } } @@ -234,20 +141,6 @@ namespace FineUIPro.Web.HJGL.PreDesign protected void btnTreeFind_Click(object sender, EventArgs e) { this.InitTreeMenu(); - //this.BindGrid3(this.tvControlItem.SelectedNodeID); - } - - #endregion Methods - - #region Methods - - protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e) - { - if (e.Node.Nodes[0].NodeID == "加载管线...") - { - e.Node.Nodes.Clear(); - BindNodes(e.Node); - } } #endregion Methods @@ -267,20 +160,14 @@ namespace FineUIPro.Web.HJGL.PreDesign e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]); TreeNode treeNode = e.Node.ParentNode; treeNode.Nodes.Remove(e.Node); - BindNodes(e.Node.ParentNode); } else { if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) - { - Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID); - this.hdUnitWorkId.Text = string.Empty; - if (pipeline != null) - { - this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID; + { + + this.BindGrid(this.tvControlItem.SelectedNodeID); - this.BindGrid(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text); - } } } } @@ -288,23 +175,44 @@ namespace FineUIPro.Web.HJGL.PreDesign #endregion 点击TreeView #region 数据绑定 - - private void BindGrid(string pipelineId, string unitworkid) + /// + /// 行绑定事件(没有焊接方法无法选择) + /// + /// + /// + protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) { - var Prelist = HJGL_PipelineComponentService.GetPipelinePrefabricatedComponent(unitworkid, pipelineId); + DataRowView row = e.DataItem as DataRowView; + string id = e.RowID; + if (Funs.DB.HJGL_PackagingManageDetail.Any(x=>x.TwOutputDetailId==id)) + { + e.RowSelectable = false; + } + ; + } + private void BindGrid(string outputMasterId) + { + ////var Prelist = HJGL_PipelineComponentService.GetPipelinePrefabricatedComponent(unitworkid, pipelineId); - var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail - where x.PipelineId == pipelineId - && (x.PipelineComponentId == null || x.PipelineComponentId == "") - select x).ToList(); - var queryList = Prelist; - // 优化 Linq 过滤条件,过滤已经进入包装的预制散件 - var result = (from x in queryList - join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy - from y in yy.DefaultIfEmpty() - where y == null - select x).ToList(); - Grid1.DataSource = result; + ////var inoutplandetail = (from x in Funs.DB.HJGL_PackagingManageDetail + //// where x.PipelineId == pipelineId + //// && (x.PipelineComponentId == null || x.PipelineComponentId == "") + //// select x).ToList(); + ////var queryList = Prelist; + ////// 优化 Linq 过滤条件,过滤已经进入包装的预制散件 + ////var result = (from x in queryList + //// join y in inoutplandetail on x.MaterialCode equals y.MaterialCode into yy + //// from y in yy.DefaultIfEmpty() + //// where y == null + //// select x).ToList(); + ////Grid1.DataSource = result; + ////Grid1.DataBind(); + + + Model.Tw_InOutDetailOutput table = new Model.Tw_InOutDetailOutput(); + table.OutputMasterId = outputMasterId; + var tb = BLL.TwOutputdetailService.GetByModle(table).ToList(); + Grid1.DataSource = tb; Grid1.DataBind(); } @@ -338,26 +246,27 @@ namespace FineUIPro.Web.HJGL.PreDesign protected void btnSave_Click(object sender, EventArgs e) { Save(); - this.BindGrid(this.tvControlItem.SelectedNodeID, this.hdUnitWorkId.Text); + this.BindGrid(this.tvControlItem.SelectedNodeID); } private void Save() { - var List_Id = Grid1.SelectedRowIDArray; - if (List_Id != null) + var SelectIDArry = Grid1.SelectedRowIDArray; + if (SelectIDArry != null) { - foreach (var id in List_Id) + foreach (var id in SelectIDArry) { - var hJGL_PipeLineMat = BLL.PipelineMatService.GetPipeLineMat(id); - if (hJGL_PipeLineMat != null) + var twoutputdetailModel = BLL.TwOutputdetailService.GetById(id); + if (twoutputdetailModel != null) { var model = new Model.HJGL_PackagingManageDetail() { Id = SQLHelper.GetNewID(), PackagingManageId = this.PackagingManageId, - PipelineId = hJGL_PipeLineMat.PipelineId, - MaterialCode = hJGL_PipeLineMat.MaterialCode, - Number = hJGL_PipeLineMat.Number, + //PipelineId = hJGL_PipeLineMat.PipelineId, + MaterialCode = twoutputdetailModel.MaterialCode, + Number = twoutputdetailModel.ActNum, + TwOutputDetailId = twoutputdetailModel.Id, CreateTime = DateTime.Now, CreateUser = this.CurrUser.PersonId, }; diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs index 7df62d97..0212dbad 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageView.aspx.cs @@ -45,9 +45,9 @@ namespace FineUIPro.Web.HJGL.PreDesign /// private void BindGrid() { - var pack = HJGL_PackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); + var pack = HJGLPackagingmanageService.GetHJGL_PackagingManageById(PackagingManageId); if (pack == null) return; - var detailList= HJGL_PackagingmanageService.GetPackagingDetailById(PackagingManageId); + var detailList= HJGLPackagingmanageService.GetPackagingDetailById(PackagingManageId); Grid1.RecordCount = detailList.Count(); Grid1.DataSource = detailList; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs index d2a474a6..c1322c3c 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs @@ -366,6 +366,7 @@ namespace FineUIPro.Web.HJGL.PreDesign // List listStr = new List(); // listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); // if (!string.IsNullOrEmpty(this.hdUnitWorkId.Text)) + // { // listStr.Add(new SqlParameter("@unitWorkId", this.hdUnitWorkId.Text)); // } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx index abd202d5..9c378c2f 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx @@ -43,7 +43,7 @@ OnClick="btnNew_Click"> + EnableAjax="false" DisableControlBeforePostBack="false" Hidden="true"> diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs index c86b1e1a..a2ec53e7 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManager.aspx.cs @@ -296,7 +296,7 @@ namespace FineUIPro.Web.HJGL.PreDesign ShowNotify("请选择要打印的项", MessageBoxIcon.Warning); return; } - DataTable tb = LINQToDataTable(HJGL_PackagingmanageService.GetPackagingManage(Id)); + DataTable tb = LINQToDataTable(HJGLPackagingmanageService.GetPackagingManage(Id)); if (tb.Rows.Count > 0) { var model = TrainNumberManageService.GetModelById(Id); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx.cs index 01684c8a..37503509 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/TrainNumberManagerView.aspx.cs @@ -44,7 +44,7 @@ namespace FineUIPro.Web.HJGL.PreDesign private void BindGrid() { - var result = HJGL_PackagingmanageService.GetPackagingManage(TrainNumberId); + var result = HJGLPackagingmanageService.GetPackagingManage(TrainNumberId); Grid1.RecordCount = result.Count(); Grid1.DataSource = result; Grid1.DataBind(); diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx index 4f1e93c8..dceb187d 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx @@ -64,7 +64,7 @@ - + diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs index 29cf4e06..26f6d63d 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageData.aspx.cs @@ -317,7 +317,7 @@ namespace FineUIPro.Web.HJGL.TestPackage } protected Dictionary exportWord(string ptp_id) { - Dictionary keyValuePairs = new Dictionary(); + var keyValuePairs = new Dictionary(); if (string.IsNullOrEmpty(ptp_id)) { Alert.ShowInTop("请选择要打印的单据!", MessageBoxIcon.Warning); @@ -359,7 +359,7 @@ namespace FineUIPro.Web.HJGL.TestPackage List FastReportItemList = new List(); foreach (var item in list) { - FastReportItemList.Add(GetFastReportItem(updateTestPackage, item.Text, ptp_id)); + FastReportItemList.Add(TestPackagePrintService.GetFastReportItem(updateTestPackage, item.Text, ptp_id, this.CurrUser.LoginProjectId)); } string Path = Funs.RootPath + "FileUpload/" + ptp_id + ".pdf"; @@ -389,7 +389,7 @@ namespace FineUIPro.Web.HJGL.TestPackage List FastReportItemList = new List(); foreach (var item in list) { - FastReportItemList.Add(GetFastReportItem(updateTestPackage, item.Text, ptp_id)); + FastReportItemList.Add(TestPackagePrintService.GetFastReportItem(updateTestPackage, item.Text, ptp_id, this.CurrUser.LoginProjectId)); } var PathA = Funs.RootPath + "FileUpload/" + ptp_id + ".docx"; BLL.FastReportService.ExportMergeReport(FastReportItemList, PathA, this.drpPrintType.SelectedValue); @@ -400,7 +400,7 @@ namespace FineUIPro.Web.HJGL.TestPackage List FastReportItemList2 = new List(); foreach (var item in list2) { - FastReportItemList2.Add(GetFastReportItem(updateTestPackage, item.Text, ptp_id)); + FastReportItemList2.Add(TestPackagePrintService.GetFastReportItem(updateTestPackage, item.Text, ptp_id, this.CurrUser.LoginProjectId)); } var PathB = Funs.RootPath + "FileUpload/" + ptp_id + "2.docx"; BLL.FastReportService.ExportMergeReport(FastReportItemList2, PathB, this.drpPrintType.SelectedValue); @@ -415,7 +415,7 @@ namespace FineUIPro.Web.HJGL.TestPackage List FastReportItemList3 = new List(); foreach (var item in list3) { - FastReportItemList3.Add(GetFastReportItem(updateTestPackage, item.Text, ptp_id)); + FastReportItemList3.Add(TestPackagePrintService.GetFastReportItem(updateTestPackage, item.Text, ptp_id, this.CurrUser.LoginProjectId)); } var PathC = Funs.RootPath + "FileUpload/" + ptp_id + "3.docx"; BLL.FastReportService.ExportMergeReport(FastReportItemList3, PathC, this.drpPrintType.SelectedValue); @@ -429,7 +429,7 @@ namespace FineUIPro.Web.HJGL.TestPackage List FastReportItemList4 = new List(); foreach (var item in list4) { - FastReportItemList4.Add(GetFastReportItem(updateTestPackage, item.Text, ptp_id)); + FastReportItemList4.Add(TestPackagePrintService.GetFastReportItem(updateTestPackage, item.Text, ptp_id, this.CurrUser.LoginProjectId)); } var PathD = Funs.RootPath + "FileUpload/" + ptp_id + "4.docx"; BLL.FastReportService.ExportMergeReport(FastReportItemList4, PathD, this.drpPrintType.SelectedValue); @@ -444,7 +444,7 @@ namespace FineUIPro.Web.HJGL.TestPackage List FastReportItemList5 = new List(); foreach (var item in list5) { - FastReportItemList5.Add(GetFastReportItem(updateTestPackage, item.Text, ptp_id)); + FastReportItemList5.Add(TestPackagePrintService.GetFastReportItem(updateTestPackage, item.Text, ptp_id, this.CurrUser.LoginProjectId)); } var PathE = Funs.RootPath + "FileUpload/" + ptp_id + "5.docx"; BLL.FastReportService.ExportMergeReport(FastReportItemList5, PathE, this.drpPrintType.SelectedValue); @@ -481,1116 +481,6 @@ namespace FineUIPro.Web.HJGL.TestPackage } - protected Model.FastReportItem GetFastReportItem(Model.PTP_TestPackage updateTestPackage, string printType, string ptp_id) - { - string initTemplatePath = ""; - Model.FastReportItem fastReportItem = new Model.FastReportItem(); - switch (printType) - { - case "0"://管道试压包文件资料 - { - Dictionary keyValuePairs = new Dictionary(); - var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); - var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; - keyValuePairs.Add("ProjectName", projectName); - keyValuePairs.Add("InstallationName", projectName + InstallationName); - keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道试压包文件资料.frx"; - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - } - break; - case "1"://管道压力试验技术要求 - { - Dictionary keyValuePairs = new Dictionary(); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道压力试验技术要求.frx"; - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - } - break; - case "2"://管道压力包文件资料目录 - { - Dictionary keyValuePairs = new Dictionary(); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道压力包文件资料目录.frx"; - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - } - break; - case "3"://管道系统压力试验条件确认记录 - { - Dictionary keyValuePairs = new Dictionary(); - var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); - var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; - keyValuePairs.Add("ProjectName", projectName); - keyValuePairs.Add("InstallationName", InstallationName); - keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo); - keyValuePairs.Add("TestPackageName", updateTestPackage.TestPackageName); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道系统压力试验条件确认记录.frx"; - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - } - break; - case "4"://管道试压包尾项清单 - { - string sql = @"select ItemCheckId,PTP_ID,PTP_ItemEndCheck.PipelineId,Content,ItemType,Result,HJGL_Pipeline.PipelineCode from PTP_ItemEndCheck - left join PTP_ItemEndCheckList on PTP_ItemEndCheckList.ItemEndCheckListId = PTP_ItemEndCheck.ItemEndCheckListId - left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = PTP_ItemEndCheck.PipelineId - where PTP_ItemEndCheckList.PTP_ID=@ptp_id"; - List listStr = new List - { - new SqlParameter("@ptp_id", ptp_id), - }; - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter); - - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("SortNumber"); - dt.Columns.Add("PipelineCode"); - dt.Columns.Add("Content"); - dt.Columns.Add("ItemType"); - - for (int i = 0; i < tb.Rows.Count; i++) - { - var newRows = dt.NewRow(); - newRows["SortNumber"] = (i + 1).ToString(); - newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString(); - newRows["Content"] = tb.Rows[i]["Content"].ToString(); - newRows["ItemType"] = tb.Rows[i]["ItemType"].ToString(); - - dt.Rows.Add(newRows); - } - BLL.FastReportService.AddFastreportTable(dt); - - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道试压包尾项清单.frx"; - - List dataTables = new List(); - dataTables.Add(dt); - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - fastReportItem.DataTables = dataTables; - } - break; - case "5"://管道系统压力试验记录 - { - string sql = @"SELECT ptpPipe.PT_PipeId, - ptpPipe.PTP_ID, - ptpPipe.PipelineId, - IsoInfo.DesignPress, --设计压力 - IsoInfo.DesignTemperature, --设计温度 - IsoInfo.TestPressure, --试验压力 - IsoInfo.PipelineCode,--管道编号/单线号 - testMedium.MediumName,--试验介质 - testPackage.AmbientTemperature,--试验环境温度 - testPackage.TestMediumTemperature--试验介质温度 - FROM dbo.PTP_PipelineList AS ptpPipe - LEFT JOIN dbo.HJGL_Pipeline AS IsoInfo ON ptpPipe.PipelineId = IsoInfo.PipelineId - LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = IsoInfo.TestMedium - left join PTP_TestPackage as testPackage on testPackage.PTP_ID = ptpPipe.PTP_ID - where ptpPipe.PTP_ID=@ptp_id"; - List listStr = new List - { - new SqlParameter("@ptp_id", ptp_id), - }; - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter); - - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("PipelineCode"); - dt.Columns.Add("DesignPress"); - dt.Columns.Add("DesignTemperature"); - dt.Columns.Add("MediumName"); - dt.Columns.Add("TestPressure"); - dt.Columns.Add("AmbientTemperature"); - dt.Columns.Add("TestMediumTemperature"); - - for (int i = 0; i < tb.Rows.Count; i++) - { - var newRows = dt.NewRow(); - newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString(); - newRows["DesignPress"] = tb.Rows[i]["DesignPress"].ToString(); - newRows["DesignTemperature"] = tb.Rows[i]["DesignTemperature"].ToString(); - newRows["MediumName"] = tb.Rows[i]["MediumName"].ToString(); - newRows["TestPressure"] = tb.Rows[i]["TestPressure"].ToString(); - newRows["AmbientTemperature"] = tb.Rows[i]["AmbientTemperature"].ToString(); - var temp = tb.Rows[i]["TestMediumTemperature"].ToString(); - newRows["TestMediumTemperature"] = tb.Rows[i]["TestMediumTemperature"].ToString(); - - dt.Rows.Add(newRows); - } - BLL.FastReportService.AddFastreportTable(dt); - - var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); - var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", projectName); - keyValuePairs.Add("InstallationName", InstallationName); - keyValuePairs.Add("TestPackageNo", updateTestPackage.TestPackageNo); - keyValuePairs.Add("TestPackageName", updateTestPackage.TestPackageName); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道系统压力试验记录.frx"; - - List dataTables = new List(); - dataTables.Add(dt); - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - fastReportItem.DataTables = dataTables; - } - break; - case "6"://管道材料材质标识检查记录 - { - string sql = @"select PT_PipeId, PTP_ID,pipelineList.PipelineId,pipeline.PipelineCode - from PTP_PipelineList as pipelineList - left join HJGL_Pipeline as pipeline on pipeline.PipelineId = pipelineList.PipelineId - where PTP_ID=@ptp_id"; - List listStr = new List - { - new SqlParameter("@ptp_id", ptp_id), - }; - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter); - - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("PipelineCode"); - dt.Columns.Add("ManterialCode"); - dt.Columns.Add("Specification"); - - 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["Specification"] = getSpecificationByPipelineId(tb.Rows[i]["PipelineId"].ToString()); - - dt.Rows.Add(newRows); - } - BLL.FastReportService.AddFastreportTable(dt); - - var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); - var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", projectName); - keyValuePairs.Add("InstallationName", InstallationName); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道材料材质标识检查记录.frx"; - - List dataTables = new List(); - dataTables.Add(dt); - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - fastReportItem.DataTables = dataTables; - } - break; - case "7"://管道焊接工作记录 - { - var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id); - if (iosList.Count > 0) - { - var q = iosList[0]; - var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).ToArray()); - string sql = @"select weldJoint.WeldJointId, - weldJoint.PipelineId, - weldJoint.ProjectId, - weldJoint.PipelineCode,--管线号 - weldJoint.WeldJointCode,--焊口号 - (case when person.WelderCode is not null then - case when person2.WelderCode is not null and person.WelderCode<>person2.WelderCode - then person.WelderCode+'/'+person2.WelderCode - else person2.WelderCode end - else person.WelderCode end) as WelderCode,--焊工代号 - weldJoint.Specification, --规格 - (case when material1.MaterialCode is not null then - case when material2.MaterialCode is not null and material1.MaterialCode<>material2.MaterialCode - then material1.MaterialCode+'/'+material2.MaterialCode - else material2.MaterialCode end - else material1.MaterialCode end) as MaterialCode, --材质 - weldJoint.WeldingLocationId,--焊接位置 - weldingMethod.WeldingMethodCode,--焊接方法 - (case - when consumables1.ConsumablesName is not null then - case - when consumables2.ConsumablesName is not null and consumables1.ConsumablesName <> consumables2.ConsumablesName - then consumables1.ConsumablesName + '+' + consumables2.ConsumablesName - else consumables1.ConsumablesName end - else consumables2.ConsumablesName end) as WeldingMaterial,--焊材牌号 - convert(varchar(10),weldingDaily.WeldingDate,111) as WeldingDate --焊接日期 - from HJGL_WeldJoint as weldJoint - left join HJGL_Pipeline as pipeline on pipeline.PipelineId = weldJoint.PipelineId - left join SitePerson_Person as person on person.PersonId = weldJoint.CoverWelderId - left join SitePerson_Person as person2 on person2.PersonId = weldJoint.BackingWelderId - left join Base_Material as material1 on material1.MaterialId = weldJoint.Material1Id - left join Base_Material as material2 on material2.MaterialId = weldJoint.Material2Id - left join HJGL_WeldingDaily as weldingDaily on weldingDaily.WeldingDailyId = weldJoint.WeldingDailyId - left join Base_WeldingMethod as weldingMethod on weldingMethod.WeldingMethodId = weldJoint.WeldingMethodId - left join Base_Consumables as consumables1 on consumables1.ConsumablesId = weldJoint.WeldingWire - left join Base_Consumables as consumables2 on consumables2.ConsumablesId = weldJoint.WeldingRod - where weldJoint.WeldingDailyId is not null and weldJoint.PipelineId in ('" + isoIds + "')"; - - List listStr = new List - { - //new SqlParameter("@ptp_id", this.PTP_ID), - }; - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(sql, parameter); - - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("PipelineCode"); - dt.Columns.Add("WeldJointCode"); - dt.Columns.Add("WelderCode"); - dt.Columns.Add("Specification"); - dt.Columns.Add("MaterialCode"); - dt.Columns.Add("WeldingLocationId"); - dt.Columns.Add("WeldingMethodCode"); - dt.Columns.Add("WeldingMaterial"); - dt.Columns.Add("WeldingDate"); - - for (int i = 0; i < tb.Rows.Count; i++) - { - var newRows = dt.NewRow(); - newRows["PipelineCode"] = tb.Rows[i]["PipelineCode"].ToString(); - newRows["WeldJointCode"] = tb.Rows[i]["WeldJointCode"].ToString(); - newRows["WelderCode"] = tb.Rows[i]["WelderCode"].ToString(); - newRows["Specification"] = tb.Rows[i]["Specification"].ToString(); - newRows["MaterialCode"] = tb.Rows[i]["MaterialCode"].ToString(); - newRows["WeldingLocationId"] = tb.Rows[i]["WeldingLocationId"].ToString(); - newRows["WeldingMethodCode"] = tb.Rows[i]["WeldingMethodCode"].ToString(); - newRows["WeldingMaterial"] = tb.Rows[i]["WeldingMaterial"].ToString(); - newRows["WeldingDate"] = tb.Rows[i]["WeldingDate"].ToString(); - - dt.Rows.Add(newRows); - } - BLL.FastReportService.AddFastreportTable(dt); - - var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); - var InstallationName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; - Dictionary keyValuePairs = new Dictionary(); - keyValuePairs.Add("ProjectName", projectName); - keyValuePairs.Add("InstallationName", InstallationName); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - - initTemplatePath = "File\\Fastreport\\JGZL\\管道焊接工作记录.frx"; - - List dataTables = new List(); - dataTables.Add(dt); - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - fastReportItem.DataTables = dataTables; - } - } - break; - case "8"://管道无损检测数量统计表 - { - var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id); - if (iosList.Count > 0) - { - var q = iosList[0]; - var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).ToArray()); - Dictionary keyValuePairs = new Dictionary(); - var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); - var UnitWorkName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; - keyValuePairs.Add("projectName", projectName); - keyValuePairs.Add("UnitWorkName", UnitWorkName); - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - string sql3 = @"SELECT isoList.PT_PipeId, - isoList.PTP_ID, - isoList.PipelineId, - testPackage.ProjectId, - isoInfo.PipelineCode, - isoInfo.SingleNumber, - (convert(nvarchar(10),dr.DetectionRateValue)+'%') as DetectionRateValue, - '' as totalJotCountBW, - '' as RTtotalJotCountBW, - '' as UTtotalJotCountBW, - '' as MTtotalJotCountBW, - '' as PTtotalJotCountBW, - '' as totalJotCountFW, - '' as MTtotalJotCountFW, - '' as PTtotalJotCountFW, - '' as totalJotCountDW, - '' as RTtotalJotCountDW, - '' as UTtotalJotCountDW, - '' as MTtotalJotCountDW, - '' as PTtotalJotCountDW - FROM PTP_PipelineList AS isoList - LEFT JOIN PTP_TestPackage AS testPackage ON testPackage.PTP_ID = isoList.PTP_ID - LEFT JOIN HJGL_Pipeline AS isoInfo ON isoInfo.PipelineId = isoList.PipelineId - left join Base_DetectionRate as dr on dr.DetectionRateId = isoInfo.DetectionRateId - where isoList.PipelineId in ('" + isoIds + "')"; - DataTable dt = SQLHelper.GetDataTableRunText(sql3, null); - if (dt != null) - { - dt.TableName = "Data"; - - for (int i = 0; i < dt.Rows.Count; i++) - { - #region 对接焊接头 - int totalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "BW" - select x).Count();//对接检测合格数量 - int RTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "BW" - && w.DetectionTypeCode == "RT" - select x).Count();//RT对接检测合格数量 - int UTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "BW" - && w.DetectionTypeCode == "UT" - select x).Count();//UT对接检测合格数量 - int MTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "BW" - && w.DetectionTypeCode == "MT" - select x).Count();// MT对接检测合格数量 - int PTtotalJotCountBW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "BW" - && w.DetectionTypeCode == "PT" - select x).Count();//PT对接检测合格数量 - - dt.Rows[i]["totalJotCountBW"] = totalJotCountBW.ToString(); - dt.Rows[i]["RTtotalJotCountBW"] = RTtotalJotCountBW.ToString(); - dt.Rows[i]["UTtotalJotCountBW"] = UTtotalJotCountBW.ToString(); - dt.Rows[i]["MTtotalJotCountBW"] = MTtotalJotCountBW.ToString(); - dt.Rows[i]["PTtotalJotCountBW"] = PTtotalJotCountBW.ToString(); - #endregion - - #region 角焊接头 - int totalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && (z.WeldTypeCode == "C"|| z.WeldTypeCode == "E") - select x).Count();//对接检测合格数量 - int MTtotalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && (z.WeldTypeCode == "C" || z.WeldTypeCode == "E") - && w.DetectionTypeCode == "MT" - select x).Count();//MT对接检测合格数量 - int PTtotalJotCountFW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && (z.WeldTypeCode == "C" || z.WeldTypeCode == "E") - && w.DetectionTypeCode == "PT" - select x).Count();//PT对接检测合格数量 - - dt.Rows[i]["totalJotCountFW"] = totalJotCountFW.ToString(); - dt.Rows[i]["MTtotalJotCountFW"] = MTtotalJotCountFW.ToString(); - dt.Rows[i]["PTtotalJotCountFW"] = PTtotalJotCountFW.ToString(); - #endregion - - #region 支管连接接头 - int totalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "D" - select x).Count();//支管检测合格数量 - int RTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "D" - && w.DetectionTypeCode == "RT" - select x).Count();//支管检测合格数量 - int UTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "D" - && w.DetectionTypeCode == "UT" - select x).Count();//支管检测合格数量 - int MTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "D" - && w.DetectionTypeCode == "MT" - select x).Count();//支管检测合格数量 - int PTtotalJotCountDW = (from x in Funs.DB.HJGL_Batch_NDEItem - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join y in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals y.WeldJointId - join z in Funs.DB.Base_WeldType on y.WeldTypeId equals z.WeldTypeId - join w in Funs.DB.Base_DetectionType on x.DetectionTypeId equals w.DetectionTypeId - where y.PipelineId == dt.Rows[i]["PipelineId"].ToString() - && x.CheckResult == "1" - && z.WeldTypeCode == "D" - && w.DetectionTypeCode == "PT" - select x).Count();//支管检测合格数量 - - dt.Rows[i]["totalJotCountDW"] = totalJotCountDW.ToString(); - dt.Rows[i]["RTtotalJotCountDW"] = RTtotalJotCountDW.ToString(); - dt.Rows[i]["UTtotalJotCountDW"] = UTtotalJotCountDW.ToString(); - dt.Rows[i]["MTtotalJotCountDW"] = MTtotalJotCountDW.ToString(); - dt.Rows[i]["PTtotalJotCountDW"] = PTtotalJotCountDW.ToString(); - #endregion - } - } - BLL.FastReportService.AddFastreportTable(dt); - initTemplatePath = "File\\Fastreport\\JGZL\\管道无损检测数量统计表.frx"; - List dataTables = new List(); - dataTables.Add(dt); - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - fastReportItem.DataTables = dataTables; - } - } - break; - case "9"://无损检测结果汇总表 - { - var iosList = BLL.TestPackageEditService.GetPipeLineListByPTP_ID(ptp_id); - if (iosList.Count > 0) - { - var q = iosList[0]; - var isoNos = string.Join(",", iosList.Select(x => x.PipelineCode).ToArray()); - var isoIds = string.Join("','", iosList.Select(x => x.PipelineId).ToArray()); - Dictionary keyValuePairs = new Dictionary(); - var projectName = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); - var UnitWorkName = BLL.UnitWorkService.getUnitWorkByUnitWorkId(updateTestPackage.UnitWorkId).UnitWorkName; - var unitNames = BLL.UnitService.GetUnitNameByUnitId(updateTestPackage.UnitId); - keyValuePairs.Add("ProjectName", projectName); - keyValuePairs.Add("UnitWorkName", UnitWorkName); - keyValuePairs.Add("UnitName2", unitNames);//施工单位 - if (!string.IsNullOrEmpty(q.PipingClassId)) - { - var PipingClass = BLL.Base_PipingClassService.GetPipingClassByPipingClassId(q.PipingClassId); - if (PipingClass != null) - { - keyValuePairs.Add("ISOLevel", PipingClass.PipingClassName); - } - } - keyValuePairs.Add("isoCode", isoNos); - - //监理单位 - var Unit1 = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_3); - if (Unit1 != null) - { - var unitNames1 = string.Join(",", Unit1.Select(x => x.UnitName).ToArray()); - keyValuePairs.Add("UnitName1", unitNames1); - - } - #region 定义变量 - int rtdjJoint = 0;//RT对接焊口数 - int? rtdjFilm = 0;//RT对接片数 - int rtjhJoint = 0;//RT角焊焊口数 - int? rtjhFilm = 0;//RT角焊片数 - int rtzgJoint = 0;//RT支管连接焊口数 - int? rtzgFilm = 0;//RT支管连接片数 - - int utdjJoint = 0;//UT对接焊口数 - //int? utdjFilm = 0;//UT对接片数 - int utjhJoint = 0;//UT角焊焊口数 - //int? utjhFilm = 0;//UT角焊片数 - int utzgJoint = 0;//UT支管连接焊口数 - //int? utzgFilm = 0;//UT支管连接片数 - - int mtdjJoint = 0;//MT对接焊口数 - //int? mtdjFilm = 0;//MT对接片数 - int mtjhJoint = 0;//MT角焊焊口数 - //int? mtjhFilm = 0;//MT角焊片数 - int mtzgJoint = 0;//MT支管连接焊口数 - //int? mtzgFilm = 0;//MT支管连接片数 - - int ptdjJoint = 0;//PT对接焊口数 - //int? ptdjFilm = 0;//PT对接片数 - int ptjhJoint = 0;//PT角焊焊口数 - //int? ptjhFilm = 0;//PT角焊片数 - int ptzgJoint = 0;//PT支管连接焊口数 - //int? ptzgFilm = 0;//PT支管连接片数 - - int rtdjNoPassJoint = 0; - int? rtdjNoPassFilm = 0; - int rtjhNoPassJoint = 0; - int? rtjhNoPassFilm = 0; - int rtzgNoPassJoint = 0; - int? rtzgNoPassFilm = 0; - - int utdjNoPassJoint = 0; - decimal? utdjNoPassFilm = 0; - int utjhNoPassJoint = 0; - decimal? utjhNoPassFilm = 0; - int utzgNoPassJoint = 0; - decimal? utzgNoPassFilm = 0; - - int mtdjNoPassJoint = 0; - decimal? mtdjNoPassFilm = 0; - int mtjhNoPassJoint = 0; - decimal? mtjhNoPassFilm = 0; - int mtzgNoPassJoint = 0; - decimal? mtzgNoPassFilm = 0; - - int ptdjNoPassJoint = 0; - decimal? ptdjNoPassFilm = 0; - int ptjhNoPassJoint = 0; - decimal? ptjhNoPassFilm = 0; - int ptzgNoPassJoint = 0; - decimal? ptzgNoPassFilm = 0; - #endregion - foreach (var iso in iosList) - { - #region 检测数量统计 - #region RT对焊接头 - rtdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId - select x).Count();//RT对接焊口数 - - rtdjFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId - select x.TotalFilm).Sum();//RT对接片数 - #endregion - #region RT角焊接头 - rtjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C"|| w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId - select x).Count();//RT角焊焊口数 - - rtjhFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId - select x.TotalFilm).Sum();//RT角焊片数 - #endregion - #region RT支管连接焊口数 - rtzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId - select x).Count();//RT支管连接焊口数 - - rtzgFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId - select x.TotalFilm).Sum();//RT支管连接片数 - #endregion - - #region UT对焊接头 - utdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId - select x).Count();//UT对接焊口数 - - //utdjFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//UT对接片数 - #endregion - #region UT角焊接头 - utjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId - select x).Count();//UT角焊焊口数 - //utjhFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//UT角焊片数 - #endregion - #region UT支管连接焊口数 - utzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId - select x).Count();//UT支管连接焊口数 - - //utzgFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//UT支管连接片数 - #endregion - - #region MT对焊接头 - mtdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId - select x).Count();//MT对接焊口数 - - //mtdjFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//MT对接片数 - #endregion - #region MT角焊接头 - mtjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId - select x).Count();//MT角焊焊口数 - - //mtjhFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//MT角焊片数 - #endregion - #region MT支管连接焊口数 - mtzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId - select x).Count();//MT支管连接焊口数 - //mtzgFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//MT支管连接片数 - #endregion - - #region PT对焊接头 - ptdjJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId - select x).Count();//PT对接焊口数 - //ptdjFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//PT对接片数 - #endregion - #region PT角焊接头 - ptjhJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId - select x).Count();//PT角焊焊口数 - //ptjhFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "FW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//PT角焊片数 - #endregion - #region PT支管连接焊口数 - ptzgJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId - select x).Count();//PT支管连接焊口数 - //ptzgFilm += (from x in Funs.DB.CH_CheckItem - // join y in Funs.DB.Base_DetectionType on x.CHT_CheckMethod equals y.DetectionTypeId - // join z in Funs.DB.PW_JointInfo on x.JOT_ID equals z.JOT_ID - // join w in Funs.DB.Base_WeldType on z.JOTY_ID equals w.WeldTypeId - // where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "DW" && z.ISO_ID == iso.ISO_ID - // select x.CHT_TotalFilm).Sum();//PT支管连接片数 - #endregion - #endregion - - #region 不合格情况统计 - #region RT对焊接头 - rtdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//RT对接焊口数 - rtdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select (x.TotalFilm - x.PassFilm)).Sum();//RT对接片数 - #endregion - #region RT角焊接头 - rtjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode=="E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//RT角焊焊口数 - - rtjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select (x.TotalFilm - x.PassFilm)).Sum();//RT角焊片数 - #endregion - #region RT支管连接焊口数 - rtzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//RT支管连接焊口数 - rtzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "RT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select (x.TotalFilm - x.PassFilm)).Sum();//RT支管连接片数 - #endregion - - #region UT对焊接头 - utdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//UT对接焊口数 - - utdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//UT对接片数 - #endregion - #region UT角焊接头 - utjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//UT角焊焊口数 - utjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//UT角焊片数 - #endregion - #region UT支管连接焊口数 - utzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//UT支管连接焊口数 - utzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "UT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//UT支管连接片数 - #endregion - - #region MT对焊接头 - mtdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//MT对接焊口数 - mtdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//MT对接片数 - #endregion - #region MT角焊接头 - mtjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C"|| w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//MT角焊焊口数 - mtjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//MT角焊片数 - #endregion - #region MT支管连接焊口数 - mtzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//MT支管连接焊口数 - mtzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "MT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//MT支管连接片数 - #endregion - - #region PT对焊接头 - ptdjNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//PT对接焊口数 - ptdjNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "BW" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//PT对接片数 - #endregion - #region PT角焊接头 - ptjhNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C"|| w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//PT角焊焊口数 - ptjhNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && (w.WeldTypeCode == "C" || w.WeldTypeCode == "E") && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//PT角焊片数 - #endregion - #region PT支管连接焊口数 - ptzgNoPassJoint += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x).Count();//PT支管连接焊口数 - ptzgNoPassFilm += (from x in Funs.DB.HJGL_Batch_NDEItem - join y in Funs.DB.Base_DetectionType on x.DetectionTypeId equals y.DetectionTypeId - join t in Funs.DB.HJGL_Batch_BatchTrustItem on x.TrustBatchItemId equals t.TrustBatchItemId - join z in Funs.DB.HJGL_WeldJoint on t.WeldJointId equals z.WeldJointId - join w in Funs.DB.Base_WeldType on z.WeldTypeId equals w.WeldTypeId - where y.DetectionTypeCode == "PT" && w.WeldTypeCode == "D" && z.PipelineId == iso.PipelineId && x.CheckResult == "2" - select x.TotalFilm - x.PassFilm).Sum();//PT支管连接片数 - #endregion - #endregion - } - keyValuePairs.Add("RTBW", (rtdjJoint > 0 ? rtdjJoint.ToString() + "道" : "") + "/" + (rtdjFilm > 0 ? rtdjFilm.ToString() + "张" : "")); - keyValuePairs.Add("RTFW", (rtjhJoint > 0 ? rtjhJoint.ToString() + "道" : "") + "/" + (rtjhFilm > 0 ? rtjhFilm.ToString() + "张" : "")); - keyValuePairs.Add("RTDW", (rtzgJoint > 0 ? rtzgJoint.ToString() + "道" : "") + "/" + (rtzgFilm > 0 ? rtzgFilm.ToString() + "张" : "")); - keyValuePairs.Add("UTBW", (utdjJoint > 0 ? utdjJoint.ToString() + "道" : "") + "/" + (utdjJoint > 0 ? utdjJoint.ToString() + "米" : "")); - keyValuePairs.Add("UTFW", (utjhJoint > 0 ? utjhJoint.ToString() + "道" : "") + "/" + (utjhJoint > 0 ? utjhJoint.ToString() + "米" : "")); - keyValuePairs.Add("UTDW", (utzgJoint > 0 ? utzgJoint.ToString() + "道" : "") + "/" + (utzgJoint > 0 ? utzgJoint.ToString() + "米" : "")); - keyValuePairs.Add("MTBW", (mtdjJoint > 0 ? mtdjJoint.ToString() + "道" : "") + "/" + (mtdjJoint > 0 ? mtdjJoint.ToString() + "米" : "")); - keyValuePairs.Add("MTFW", (mtjhJoint > 0 ? mtjhJoint.ToString() + "道" : "") + "/" + (mtjhJoint > 0 ? mtjhJoint.ToString() + "米" : "")); - keyValuePairs.Add("MTDW", (mtzgJoint > 0 ? mtzgJoint.ToString() + "道" : "") + "/" + (mtzgJoint > 0 ? mtzgJoint.ToString() + "米" : "")); - keyValuePairs.Add("PTBW", (ptdjJoint > 0 ? ptdjJoint.ToString() + "道" : "") + "/" + (ptdjJoint > 0 ? ptdjJoint.ToString() + "米" : "")); - keyValuePairs.Add("PTFW", (ptjhJoint > 0 ? ptjhJoint.ToString() + "道" : "") + "/" + (ptjhJoint > 0 ? ptjhJoint.ToString() + "米" : "")); - keyValuePairs.Add("PTDW", (ptzgJoint > 0 ? ptzgJoint.ToString() + "道" : "") + "/" + (ptzgJoint > 0 ? ptzgJoint.ToString() + "米" : "")); - - keyValuePairs.Add("RTNoPassBW", (rtdjNoPassJoint > 0 ? rtdjNoPassJoint.ToString() + "道" : "") + "/" + (rtdjNoPassFilm > 0 ? rtdjNoPassFilm.ToString() + "张" : "")); - keyValuePairs.Add("RTNoPassFW", (rtjhNoPassJoint > 0 ? rtjhNoPassJoint.ToString() + "道" : "") + "/" + (rtjhNoPassFilm > 0 ? rtjhNoPassFilm.ToString() + "张" : "")); - keyValuePairs.Add("RTNoPassDW", (rtzgNoPassJoint > 0 ? rtzgNoPassJoint.ToString() + "道" : "") + "/" + (rtzgNoPassFilm > 0 ? rtzgNoPassFilm.ToString() + "张" : "")); - keyValuePairs.Add("UTNoPassBW", (utdjNoPassJoint > 0 ? utdjNoPassJoint.ToString() + "道" : "") + "/" + (utdjNoPassFilm > 0 ? utdjNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("UTNoPassFW", (utjhNoPassJoint > 0 ? utjhNoPassJoint.ToString() + "道" : "") + "/" + (utjhNoPassFilm > 0 ? utjhNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("UTNoPassDW", (utzgNoPassJoint > 0 ? utzgNoPassJoint.ToString() + "道" : "") + "/" + (utzgNoPassFilm > 0 ? utzgNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("MTNoPassBW", (mtdjNoPassJoint > 0 ? mtdjNoPassJoint.ToString() + "道" : "") + "/" + (mtdjNoPassFilm > 0 ? mtdjNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("MTNoPassFW", (mtjhNoPassJoint > 0 ? mtjhNoPassJoint.ToString() + "道" : "") + "/" + (mtjhNoPassFilm > 0 ? mtjhNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("MTNoPassDW", (mtzgNoPassJoint > 0 ? mtzgNoPassJoint.ToString() + "道" : "") + "/" + (mtzgNoPassFilm > 0 ? mtzgNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("PTNoPassBW", (ptdjNoPassJoint > 0 ? ptdjNoPassJoint.ToString() + "道" : "") + "/" + (ptdjNoPassFilm > 0 ? ptdjNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("PTNoPassFW", (ptjhNoPassJoint > 0 ? ptjhNoPassJoint.ToString() + "道" : "") + "/" + (ptjhNoPassFilm > 0 ? ptjhNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("PTNoPassDW", (ptzgNoPassJoint > 0 ? ptzgNoPassJoint.ToString() + "道" : "") + "/" + (ptzgNoPassFilm > 0 ? ptzgNoPassFilm.ToString() + "处" : "")); - keyValuePairs.Add("isoIds", isoIds); - - BLL.FastReportService.AddFastreportParameter(keyValuePairs); - string sql3 = @"select nDEItem.NDEItemID, - i.SingleName, - i.PipelineCode, - j.WeldJointCode, - (case when j.CoverWelderId is not null then ( - case when j.BackingWelderId is not null and j.CoverWelderId<>j.BackingWelderId - then cWelder.JobNum+'/'+fWelder.JobNum - else cWelder.JobNum end) else fWelder.JobNum end) as WelderCode, - (case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then - (case nDEItem.CheckResult when '1' then '合格' when '2' then '不合格' else '/' end) else '/' end) as RTUTResult, - (case when d.DetectionTypeCode='RT' or d.DetectionTypeCode='UT' then nDEItem.NDEReportNo else '/' end) as RTUTCheckNo, - (case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then - (case nDEItem.CheckResult when '1' then '合格' when '2' then '不合格' else '/' end) else '/' end) as MTPTResult, - (case when d.DetectionTypeCode='MT' or d.DetectionTypeCode='PT' then nDEItem.NDEReportNo else '/' end) as MTPTCheckNo, - nDEItem.Remark as CHT_Remark,pointBatch.PointBatchCode - from HJGL_Batch_NDEItem as nDEItem - left join HJGL_Batch_NDE as c on c.NDEID = nDEItem.NDEID - left join HJGL_Batch_BatchTrustItem as t on t.TrustBatchItemId = nDEItem.TrustBatchItemId - left join HJGL_WeldJoint as j on j.WeldJointId = t.WeldJointId - left join HJGL_Pipeline as i on i.PipelineId =j.PipelineId - left join Person_Persons as cWelder on cWelder.PersonId = j.CoverWelderId - left join Person_Persons as fWelder on fWelder.PersonId = j.BackingWelderId - left join Base_DetectionType as d on d.DetectionTypeId = nDEItem.DetectionTypeId - left join HJGL_Batch_PointBatchItem as pointBatchItem on pointBatchItem.PointBatchItemId = t.PointBatchItemId - left join HJGL_Batch_PointBatch as pointBatch on pointBatch.PointBatchId = pointBatchItem.PointBatchId - where j.PipelineId in ('" + isoIds + "')"; - - List listStr = new List(); - SqlParameter[] parameter = listStr.ToArray(); - DataTable dt0 = SQLHelper.GetDataTableRunText(sql3, parameter); - - sql3 += " order by PipelineCode,WeldJointCode"; - - DataTable dt = new DataTable(); - dt.TableName = "Data"; - dt.Columns.Add("SingleName"); - dt.Columns.Add("WeldJointCode"); - dt.Columns.Add("WelderCode"); - dt.Columns.Add("PointBatchCode"); - dt.Columns.Add("RTUTResult"); - dt.Columns.Add("RTUTCheckNo"); - dt.Columns.Add("MTPTResult"); - dt.Columns.Add("MTPTCheckNo"); - dt.Columns.Add("CHT_Remark"); - - dt0.DefaultView.Sort = "PipelineCode,WeldJointCode asc"; - DataRow[] rows = dt0.DefaultView.ToTable().Select(); - - foreach (var row in rows) - { - var newRow = dt.NewRow(); - newRow["SingleName"] = row["SingleName"].ToString(); - newRow["WeldJointCode"] = row["WeldJointCode"].ToString(); - newRow["WelderCode"] = row["WelderCode"].ToString(); - newRow["PointBatchCode"] = row["PointBatchCode"].ToString(); - newRow["RTUTResult"] = row["RTUTResult"].ToString(); - newRow["RTUTCheckNo"] = row["RTUTCheckNo"].ToString(); - newRow["MTPTResult"] = row["MTPTResult"].ToString(); - newRow["MTPTCheckNo"] = row["MTPTCheckNo"].ToString(); - newRow["CHT_Remark"] = row["CHT_Remark"].ToString(); - dt.Rows.Add(newRow); - } - BLL.FastReportService.AddFastreportTable(dt); - initTemplatePath = "File\\Fastreport\\JGZL\\管道无损检测结果汇总表.frx"; - List dataTables = new List(); - dataTables.Add(dt); - fastReportItem.ReportPath = initTemplatePath; - fastReportItem.ParameterValues = keyValuePairs; - fastReportItem.DataTables = dataTables; - } - } - break; - } - return fastReportItem; - } #endregion #region 格式化字符串 diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx index 35a83262..f1040866 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx @@ -33,7 +33,7 @@ diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx.cs index 54383345..ce32eb04 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageDatePrint.aspx.cs @@ -58,26 +58,28 @@ namespace FineUIPro.Web.HJGL.TestPackage protected void btnPrint_Click(object sender, EventArgs e) { Model.PTP_TestPackage updateTestPackage = Funs.DB.PTP_TestPackage.FirstOrDefault(x => x.PTP_ID == PTP_ID); - - var fastReportItem = BLL.TestPackagePrintService.GetFastReportItem(updateTestPackage,Grid1.SelectedRowID,PTP_ID,this.CurrUser.LoginProjectId); - BLL.FastReportService.ResetData(); - BLL.FastReportService.AddFastreportParameter(fastReportItem.ParameterValues); - if (fastReportItem.DataTables!=null) + List FastReportItemList = new List(); + foreach (var item in Grid1.SelectedRowIDArray) { - foreach (var item in fastReportItem.DataTables) - { - BLL.FastReportService.AddFastreportTable(item); - } + var fastReportItem = BLL.TestPackagePrintService.GetFastReportItem(updateTestPackage, item, PTP_ID, this.CurrUser.LoginProjectId); + FastReportItemList.Add(fastReportItem); + TestPackagePrintService.AddPrintCountByTypeInt(PTP_ID, int.Parse(item)); //增加打印次数 } - string initTemplatePath = ""; - string rootPath = Server.MapPath("~/"); - initTemplatePath = fastReportItem.ReportPath; - if (File.Exists(rootPath + initTemplatePath)) - { - TestPackagePrintService.AddPrintCountByTypeInt(PTP_ID, int.Parse( Grid1.SelectedRowID)); - PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); - } - } + // 在文件名中加入时间戳,例如:PTP_ID_2025-09-17-14-30-00.pdf + string timeStamp = DateTime.Now.ToString("yyyy-MM-dd-HH-mm-ss"); + string fileName = $"{PTP_ID}_{timeStamp}.pdf"; + string filePath = System.IO.Path.Combine(Funs.RootPath, "FileUpload", fileName); + BLL.FastReportService.ExportMergeReport(FastReportItemList, filePath, "1"); + FileInfo info = new FileInfo(filePath); + long fileSize = info.Length; + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("试压包资料子类.pdf", System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(filePath, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Close(); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx index dd67bfc2..b7efb2dd 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx @@ -37,9 +37,9 @@ - + TitleToolTip="三维模型显示" AutoScroll="true" RegionPercent="30%"> @@ -50,7 +50,7 @@ + TitleToolTip="试压包" AutoScroll="true" RegionPercent="70%"> - @@ -121,6 +121,10 @@ EnableMaximize="true" Target="Top" EnableResize="false" runat="server" IsModal="true" Width="1024px" Height="900px"> + diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.designer.cs index 88fc3844..9d9b808f 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.TestPackage { - - - public partial class TestPackageEdit { - +namespace FineUIPro.Web.HJGL.TestPackage +{ + + + public partial class TestPackageEdit + { + /// /// Head1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - + /// /// form1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// txtCode 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCode; - + /// /// tvControlItem 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// hdPTP_ID 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdPTP_ID; - + /// /// Panel2 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// panelTopRegion 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelTopRegion; - + /// /// ContentPanel1 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ContentPanel ContentPanel1; - + /// /// ctlAuditFlow 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Web.Controls._3DLook ctlAuditFlow; - + /// /// panelCenterRegion 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Grid1 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// txtTestPackageNo 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTestPackageNo; - + /// /// txtTestPackageName 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTestPackageName; - + /// /// txtRemark 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtRemark; - + /// /// txtadjustTestPressure 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtadjustTestPressure; - + /// /// ToolbarSeparator1 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -200,7 +202,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -209,7 +211,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -218,7 +220,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -227,7 +229,16 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + + /// + /// Window3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window3; + /// /// Menu1 控件。 /// @@ -236,7 +247,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuImport 控件。 /// @@ -245,7 +256,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuImport; - + /// /// btnMenuNew 控件。 /// @@ -254,7 +265,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuNew; - + /// /// btnMenuModify 控件。 /// @@ -263,7 +274,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuSee 控件。 /// @@ -272,7 +283,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuSee; - + /// /// btnMenuDel 控件。 /// @@ -281,7 +292,7 @@ namespace FineUIPro.Web.HJGL.TestPackage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuDel; - + /// /// btnPrinterAll 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs index b79ff86b..afa7e8b8 100644 --- a/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TestPackage/TestPackageImport.aspx.cs @@ -194,9 +194,9 @@ namespace FineUIPro.Web.HJGL.TestPackage pipeline.UnitId = unitWork.UnitId; } - if (pds[i].A != null) + if (pds[i].B != null) { - string col0 = pds[i].A.ToString(); + string col0 = pds[i].B.ToString(); if (string.IsNullOrEmpty(col0)) { result.Add("第" + (i + 1).ToString() + "行," + "试压包编号" + "," + "此项为必填项!" + "|"); @@ -210,21 +210,21 @@ namespace FineUIPro.Web.HJGL.TestPackage { result.Add("第" + (i + 1).ToString() + "行," + "试压包编号" + "," + "此项为必填项!" + "|"); } - if (pds[i].B != null) - { - pipeline.TestPackageName = pds[i].B.ToString();//系统名称 - } if (pds[i].C != null) { - pipeline.AdjustTestPressure = pds[i].C.ToString();//调整试验压力 + pipeline.TestPackageName = pds[i].C.ToString();//系统名称 } if (pds[i].D != null) { - pipeline.Remark = pds[i].D.ToString(); //备注 + pipeline.AdjustTestPressure = pds[i].D.ToString();//调整试验压力 } - if (pds[i].E != null) //管线号 + if (pds[i].E != null) { - string col2 = pds[i].E.ToString(); + pipeline.Remark = pds[i].E.ToString(); //备注 + } + if (pds[i].F != null) //管线号 + { + string col2 = pds[i].F.ToString(); if (string.IsNullOrEmpty(col2)) { result.Add("第" + (i + 1).ToString() + "行," + "管线号" + "," + "此项为必填项!" + "|"); @@ -532,9 +532,24 @@ namespace FineUIPro.Web.HJGL.TestPackage x.TestPressure }; + // materialize and add sequence number + var list = queryList.ToList(); + var indexed = list.Select((x, idx) => new + { + No = idx + 1, + x.PipelineId, + x.PipelineCode, + x.PipingClassCode, + x.MediumName, + x.DesignPress, + x.DesignTemperature, + x.TestMediumCode, + x.TestPressure + }).ToList(); + var value = new { - model = queryList.ToList() + model = indexed }; MiniExcel.SaveAsByTemplate(path, uploadfilepath, value); } diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx index ab518508..33ecbf53 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx @@ -13,7 +13,7 @@ - - diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx.cs index b369be43..ff2edc46 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReview.aspx.cs @@ -32,7 +32,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement Const.ContractReviewing.ToString (), Const.ContractReview_Refuse.ToString() }; - btnNew.OnClientClick = Window1.GetShowReference("ApproveUserReviewEdit.aspx", "评标小组名单审批创建") + "return false;"; + btnNew.OnClientClick = Window1.GetShowReference("ApproveUserReviewEdit.aspx", "评标委员会组建审批") + "return false;"; GetButtonPower(); BindGrid(); } diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx index 6c8c0889..b8818b6d 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx @@ -97,13 +97,12 @@ - - - <%-- + + - + - --%> + diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs index f94eb823..919f0ea5 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs @@ -50,6 +50,9 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropApproval_Construction, null, CurrUser.UnitId, Const.ConstructionMinister + "," + Const.ConstructionViceMinister, false); Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(this.DropConstructionManager, null, Const.UnitId_SEDIN, null, true); + //分管领导 + Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropDeputyGeneralManager, null, this.CurrUser.UnitId, Const.DeputyGeneralManager, false); + Bind(); BindGrid(); #region Grid1 @@ -109,7 +112,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement DropConstructionManager.SelectedValue = Bid.ConstructionManager; // DropProjectManager.SelectedValue = Bid.ProjectManager; DropApproval_Construction.SelectedValue = Bid.Approval_Construction; - //DropDeputyGeneralManager.SelectedValue = Bid.DeputyGeneralManager; + DropDeputyGeneralManager.SelectedValue = Bid.DeputyGeneralManager; DropDepart.SelectedValue = Bid.DepartId; } @@ -192,12 +195,12 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement return false; } - //if (DropDeputyGeneralManager.SelectedValue == Const._Null) - //{ - // ShowNotify("请选择分管副总经理!", MessageBoxIcon.Warning); - // return false; +/* if (DropDeputyGeneralManager.SelectedValue == Const._Null) + { + ShowNotify("请选择分管副总经理!", MessageBoxIcon.Warning); + return false; - //} + }*/ Model.PHTGL_BidApproveUserReview newtable = new Model.PHTGL_BidApproveUserReview(); var Bid = BLL.PHTGL_BidDocumentsReviewService.GetPHTGL_BidDocumentsReviewById(drpBidDocumentCode.SelectedValue); @@ -211,7 +214,7 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement newtable.ConstructionManager = DropConstructionManager.SelectedValue; // newtable.ProjectManager = DropProjectManager.SelectedValue; newtable.Approval_Construction = DropApproval_Construction.SelectedValue; - // newtable.DeputyGeneralManager = DropDeputyGeneralManager.SelectedValue; + newtable.DeputyGeneralManager = DropDeputyGeneralManager.SelectedValue; newtable.DepartId = DropDepart.SelectedValue; if (string.IsNullOrEmpty(ApproveUserReviewID)) { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.designer.cs index 0364cac4..c709db41 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.designer.cs @@ -194,6 +194,15 @@ namespace FineUIPro.Web.PHTGL.BiddingManagement /// protected global::FineUIPro.DropDownList DropApproval_Construction; + /// + /// DropDeputyGeneralManager 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropDeputyGeneralManager; + /// /// label12 控件。 /// diff --git a/SGGL/Model/CLGL/Tw_InOutDetailOutput.cs b/SGGL/Model/CLGL/Tw_InOutDetailOutput.cs index e68b3233..ff127295 100644 --- a/SGGL/Model/CLGL/Tw_InOutDetailOutput.cs +++ b/SGGL/Model/CLGL/Tw_InOutDetailOutput.cs @@ -22,6 +22,8 @@ namespace Model public string MaterialDef { get; set; } public string InputMasterId { get; set; } public string OutputMasterId { get; set; } + public string CusBillCode { get; set; } + public int? TypeInt { get; set; } /// /// 库存数量 /// diff --git a/SGGL/Model/HJGL/PipelinePrefabricatedComponentsItem.cs b/SGGL/Model/HJGL/PipelinePrefabricatedComponentsItem.cs index 742e0a67..7584d9f4 100644 --- a/SGGL/Model/HJGL/PipelinePrefabricatedComponentsItem.cs +++ b/SGGL/Model/HJGL/PipelinePrefabricatedComponentsItem.cs @@ -25,5 +25,6 @@ namespace Model public string UnitWorkId { get; set; } public string ProjectId { get; set; } public string FlowingSection { get; set; } + public string CusBillCode { get; set; } } } diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 1125683b..25c686a1 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -167,6 +167,9 @@ namespace Model partial void InsertBase_Material(Base_Material instance); partial void UpdateBase_Material(Base_Material instance); partial void DeleteBase_Material(Base_Material instance); + partial void InsertBase_MaterialColor(Base_MaterialColor instance); + partial void UpdateBase_MaterialColor(Base_MaterialColor instance); + partial void DeleteBase_MaterialColor(Base_MaterialColor instance); partial void InsertBase_MaterialType(Base_MaterialType instance); partial void UpdateBase_MaterialType(Base_MaterialType instance); partial void DeleteBase_MaterialType(Base_MaterialType instance); @@ -2286,6 +2289,14 @@ namespace Model } } + public System.Data.Linq.Table Base_MaterialColor + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Base_MaterialType { get @@ -12240,7 +12251,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] public string ApproveIdea { get @@ -22409,6 +22420,212 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_MaterialColor")] + public partial class Base_MaterialColor : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _MaterialColorId; + + private string _UnitId; + + private string _MaterialId; + + private string _ColorName; + + private string _ColorCardNo; + + private string _RGB; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnMaterialColorIdChanging(string value); + partial void OnMaterialColorIdChanged(); + partial void OnUnitIdChanging(string value); + partial void OnUnitIdChanged(); + partial void OnMaterialIdChanging(string value); + partial void OnMaterialIdChanged(); + partial void OnColorNameChanging(string value); + partial void OnColorNameChanged(); + partial void OnColorCardNoChanging(string value); + partial void OnColorCardNoChanged(); + partial void OnRGBChanging(string value); + partial void OnRGBChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public Base_MaterialColor() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialColorId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string MaterialColorId + { + get + { + return this._MaterialColorId; + } + set + { + if ((this._MaterialColorId != value)) + { + this.OnMaterialColorIdChanging(value); + this.SendPropertyChanging(); + this._MaterialColorId = value; + this.SendPropertyChanged("MaterialColorId"); + this.OnMaterialColorIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")] + public string UnitId + { + get + { + return this._UnitId; + } + set + { + if ((this._UnitId != value)) + { + this.OnUnitIdChanging(value); + this.SendPropertyChanging(); + this._UnitId = value; + this.SendPropertyChanged("UnitId"); + this.OnUnitIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialId", DbType="NVarChar(50)")] + public string MaterialId + { + get + { + return this._MaterialId; + } + set + { + if ((this._MaterialId != value)) + { + this.OnMaterialIdChanging(value); + this.SendPropertyChanging(); + this._MaterialId = value; + this.SendPropertyChanged("MaterialId"); + this.OnMaterialIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ColorName", DbType="NVarChar(50)")] + public string ColorName + { + get + { + return this._ColorName; + } + set + { + if ((this._ColorName != value)) + { + this.OnColorNameChanging(value); + this.SendPropertyChanging(); + this._ColorName = value; + this.SendPropertyChanged("ColorName"); + this.OnColorNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ColorCardNo", DbType="NVarChar(50)")] + public string ColorCardNo + { + get + { + return this._ColorCardNo; + } + set + { + if ((this._ColorCardNo != value)) + { + this.OnColorCardNoChanging(value); + this.SendPropertyChanging(); + this._ColorCardNo = value; + this.SendPropertyChanged("ColorCardNo"); + this.OnColorCardNoChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RGB", DbType="NVarChar(20)")] + public string RGB + { + get + { + return this._RGB; + } + set + { + if ((this._RGB != value)) + { + this.OnRGBChanging(value); + this.SendPropertyChanging(); + this._RGB = value; + this.SendPropertyChanged("RGB"); + this.OnRGBChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_MaterialType")] public partial class Base_MaterialType : INotifyPropertyChanging, INotifyPropertyChanged { @@ -97563,10 +97780,10 @@ namespace Model private string _TrainNumber; - private System.Nullable _TypeInt; - private string _TrainNumberId; + private System.Nullable _TypeInt; + private string _CompileMan; private System.Nullable _CompileDate; @@ -97599,10 +97816,10 @@ namespace Model partial void OnReceiveDateChanged(); partial void OnTrainNumberChanging(string value); partial void OnTrainNumberChanged(); - partial void OnTypeIntChanging(System.Nullable value); - partial void OnTypeIntChanged(); partial void OnTrainNumberIdChanging(string value); partial void OnTrainNumberIdChanged(); + partial void OnTypeIntChanging(System.Nullable value); + partial void OnTypeIntChanged(); partial void OnCompileManChanging(string value); partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); @@ -97854,26 +98071,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")] - public System.Nullable TypeInt - { - get - { - return this._TypeInt; - } - set - { - if ((this._TypeInt != value)) - { - this.OnTypeIntChanging(value); - this.SendPropertyChanging(); - this._TypeInt = value; - this.SendPropertyChanged("TypeInt"); - this.OnTypeIntChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TrainNumberId", DbType="VarChar(50)")] public string TrainNumberId { @@ -97894,6 +98091,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeInt", DbType="Int")] + public System.Nullable TypeInt + { + get + { + return this._TypeInt; + } + set + { + if ((this._TypeInt != value)) + { + this.OnTypeIntChanging(value); + this.SendPropertyChanging(); + this._TypeInt = value; + this.SendPropertyChanged("TypeInt"); + this.OnTypeIntChanged(); + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] public string CompileMan { @@ -97977,6 +98194,8 @@ namespace Model private string _CreateUser; + private string _TwOutputDetailId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -97997,6 +98216,8 @@ namespace Model partial void OnCreateTimeChanged(); partial void OnCreateUserChanging(string value); partial void OnCreateUserChanged(); + partial void OnTwOutputDetailIdChanging(string value); + partial void OnTwOutputDetailIdChanged(); #endregion public HJGL_PackagingManageDetail() @@ -98164,6 +98385,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TwOutputDetailId", DbType="NVarChar(50)")] + public string TwOutputDetailId + { + get + { + return this._TwOutputDetailId; + } + set + { + if ((this._TwOutputDetailId != value)) + { + this.OnTwOutputDetailIdChanging(value); + this.SendPropertyChanging(); + this._TwOutputDetailId = value; + this.SendPropertyChanged("TwOutputDetailId"); + this.OnTwOutputDetailIdChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -109097,7 +109338,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Rectification", DbType="NVarChar(50)")] public string Rectification { get @@ -109223,7 +109464,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Measures", DbType="NVarChar(50)")] public string Measures { get @@ -161938,7 +162179,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")] public string AttentPerson { get @@ -192921,7 +193162,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")] public string ProjectDescription { get @@ -193041,7 +193282,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")] public string CalculationRule { get @@ -193101,7 +193342,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")] public string ConstructionSubcontractor { get @@ -193485,7 +193726,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")] public System.Nullable WorkPackageEstimate { get @@ -193790,16 +194031,6 @@ namespace Model private string _ProjectId; - private string _ContractId; - - private string _OrderCode; - - private System.Nullable _OrderInDate; - - private System.Nullable _OrderOutDate; - - private string _MaterialRequisitionUnit; - private System.Nullable _State; private string _InvoiceCode; @@ -193828,6 +194059,16 @@ namespace Model private string _CreateUser; + private string _ContractId; + + private System.Nullable _OrderInDate; + + private string _OrderCode; + + private System.Nullable _OrderOutDate; + + private string _MaterialRequisitionUnit; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -193836,16 +194077,6 @@ namespace Model partial void OnInvoiceIdChanged(); partial void OnProjectIdChanging(string value); partial void OnProjectIdChanged(); - partial void OnContractIdChanging(string value); - partial void OnContractIdChanged(); - partial void OnOrderCodeChanging(string value); - partial void OnOrderCodeChanged(); - partial void OnOrderInDateChanging(System.Nullable value); - partial void OnOrderInDateChanged(); - partial void OnOrderOutDateChanging(System.Nullable value); - partial void OnOrderOutDateChanged(); - partial void OnMaterialRequisitionUnitChanging(string value); - partial void OnMaterialRequisitionUnitChanged(); partial void OnStateChanging(System.Nullable value); partial void OnStateChanged(); partial void OnInvoiceCodeChanging(string value); @@ -193874,6 +194105,16 @@ namespace Model partial void OnCreateDateChanged(); partial void OnCreateUserChanging(string value); partial void OnCreateUserChanged(); + partial void OnContractIdChanging(string value); + partial void OnContractIdChanged(); + partial void OnOrderInDateChanging(System.Nullable value); + partial void OnOrderInDateChanged(); + partial void OnOrderCodeChanging(string value); + partial void OnOrderCodeChanged(); + partial void OnOrderOutDateChanging(System.Nullable value); + partial void OnOrderOutDateChanged(); + partial void OnMaterialRequisitionUnitChanging(string value); + partial void OnMaterialRequisitionUnitChanged(); #endregion public PHTGL_Invoice() @@ -193921,106 +194162,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] - public string ContractId - { - get - { - return this._ContractId; - } - set - { - if ((this._ContractId != value)) - { - this.OnContractIdChanging(value); - this.SendPropertyChanging(); - this._ContractId = value; - this.SendPropertyChanged("ContractId"); - this.OnContractIdChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] - public string OrderCode - { - get - { - return this._OrderCode; - } - set - { - if ((this._OrderCode != value)) - { - this.OnOrderCodeChanging(value); - this.SendPropertyChanging(); - this._OrderCode = value; - this.SendPropertyChanged("OrderCode"); - this.OnOrderCodeChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] - public System.Nullable OrderInDate - { - get - { - return this._OrderInDate; - } - set - { - if ((this._OrderInDate != value)) - { - this.OnOrderInDateChanging(value); - this.SendPropertyChanging(); - this._OrderInDate = value; - this.SendPropertyChanged("OrderInDate"); - this.OnOrderInDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] - public System.Nullable OrderOutDate - { - get - { - return this._OrderOutDate; - } - set - { - if ((this._OrderOutDate != value)) - { - this.OnOrderOutDateChanging(value); - this.SendPropertyChanging(); - this._OrderOutDate = value; - this.SendPropertyChanged("OrderOutDate"); - this.OnOrderOutDateChanged(); - } - } - } - - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] - public string MaterialRequisitionUnit - { - get - { - return this._MaterialRequisitionUnit; - } - set - { - if ((this._MaterialRequisitionUnit != value)) - { - this.OnMaterialRequisitionUnitChanging(value); - this.SendPropertyChanging(); - this._MaterialRequisitionUnit = value; - this.SendPropertyChanged("MaterialRequisitionUnit"); - this.OnMaterialRequisitionUnitChanged(); - } - } - } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")] public System.Nullable State { @@ -194301,6 +194442,106 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] + public string ContractId + { + get + { + return this._ContractId; + } + set + { + if ((this._ContractId != value)) + { + this.OnContractIdChanging(value); + this.SendPropertyChanging(); + this._ContractId = value; + this.SendPropertyChanged("ContractId"); + this.OnContractIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] + public System.Nullable OrderInDate + { + get + { + return this._OrderInDate; + } + set + { + if ((this._OrderInDate != value)) + { + this.OnOrderInDateChanging(value); + this.SendPropertyChanging(); + this._OrderInDate = value; + this.SendPropertyChanged("OrderInDate"); + this.OnOrderInDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] + public string OrderCode + { + get + { + return this._OrderCode; + } + set + { + if ((this._OrderCode != value)) + { + this.OnOrderCodeChanging(value); + this.SendPropertyChanging(); + this._OrderCode = value; + this.SendPropertyChanged("OrderCode"); + this.OnOrderCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] + public System.Nullable OrderOutDate + { + get + { + return this._OrderOutDate; + } + set + { + if ((this._OrderOutDate != value)) + { + this.OnOrderOutDateChanging(value); + this.SendPropertyChanging(); + this._OrderOutDate = value; + this.SendPropertyChanged("OrderOutDate"); + this.OnOrderOutDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] + public string MaterialRequisitionUnit + { + get + { + return this._MaterialRequisitionUnit; + } + set + { + if ((this._MaterialRequisitionUnit != value)) + { + this.OnMaterialRequisitionUnitChanging(value); + this.SendPropertyChanging(); + this._MaterialRequisitionUnit = value; + this.SendPropertyChanged("MaterialRequisitionUnit"); + this.OnMaterialRequisitionUnitChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -313473,7 +313714,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] public string Name { get @@ -314050,7 +314291,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -314241,7 +314482,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -319580,7 +319821,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -321052,7 +321293,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -330603,7 +330844,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")] public string ContractNo { get @@ -330623,7 +330864,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")] public string UnitWorks { get diff --git a/SGGL/WebAPI/Controllers/HJGL/PackagingManageController.cs b/SGGL/WebAPI/Controllers/HJGL/PackagingManageController.cs index e83ae241..04039b7a 100644 --- a/SGGL/WebAPI/Controllers/HJGL/PackagingManageController.cs +++ b/SGGL/WebAPI/Controllers/HJGL/PackagingManageController.cs @@ -82,5 +82,37 @@ namespace WebAPI.Controllers return responeData; } + + [HttpGet] + public Model.ResponeData SavePackingInformation(string packagingManageId, string trainNumberId) + { + var responeData = new Model.ResponeData(); + try + { + var packModel=HJGLPackagingmanageService.GetHJGL_PackagingManageById(packagingManageId); + if (packModel == null) + { + responeData.code = 0; + responeData.message = "未找到对应的包装信息"; + return responeData; + + } + if (packModel.State != 0) + { + responeData.code = 0; + responeData.message = "当前包装状态不可修改车次号"; + return responeData; + + } + packModel.TrainNumberId = trainNumberId; + HJGLPackagingmanageService.UpdateHJGL_PackagingManage(packModel); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } } } \ No newline at end of file diff --git a/SGGL/WebAPI/Controllers/HJGL/TrainNumberManageController.cs b/SGGL/WebAPI/Controllers/HJGL/TrainNumberManageController.cs new file mode 100644 index 00000000..0b51ce1b --- /dev/null +++ b/SGGL/WebAPI/Controllers/HJGL/TrainNumberManageController.cs @@ -0,0 +1,133 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; + +namespace WebAPI.Controllers +{ + /// + /// 车次管理接口 + /// + public class TrainNumberManageController : ApiController + { + /// + /// 发货验收 + /// + /// + /// + /// + public Model.ResponeData SaveTrainInfoConfirmArrival(string Id, string PersonId) + { + var responeData = new Model.ResponeData(); + try + { + BLL.APITrainNumberManagerService.SaveTrainInfoConfirmArrival(Id, PersonId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + /// + /// 获取发货列表 + /// + /// + /// + /// + /// + public Model.ResponeData GetTrainNumberList(string projectId, int pagesize, int pageindex) + { + var responeData = new Model.ResponeData(); + try + { + Model.HJGL_TrainNumberManage table = new Model.HJGL_TrainNumberManage(); + table.ProjectId = projectId; + var result = TrainNumberManageService.GetListByQueryModle(table, pageindex, pagesize); + var getDataList = result.Data; + int pageCount = result.Total; + responeData.data = new { pageCount, getDataList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + /// + /// 获取指定车次的包装明细 + /// + /// + /// + [HttpGet] + + public Model.ResponeData GetPackagingByTrain(string trainNumberId) + { + var responeData = new Model.ResponeData(); + try + { + var list = APITrainNumberManagerService.GetPackagingByTrainId(trainNumberId); + responeData.data = list; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + /// + /// 添加车次包装关联 + /// + /// + /// + /// + [HttpGet] + public Model.ResponeData SavePackagingToTrain(string packagingManageId, string trainNumberId) + { + var responeData = new Model.ResponeData(); + try + { + APITrainNumberManagerService.AddPackagingToTrain(packagingManageId, trainNumberId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + /// + /// 删除包装与车次的关联(清空 HJGL_PackagingManage.TrainNumberId) + /// + /// + /// + [HttpGet] + public Model.ResponeData DeletePackagingFromTrain(string packagingManageId) + { + var responeData = new Model.ResponeData(); + try + { + APITrainNumberManagerService.RemovePackagingFromTrain(packagingManageId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + //获取发货明细列表 + + } +} \ No newline at end of file diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index b9f7ff91..cebc7a97 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -65,6 +65,9 @@ + + ..\packages\System.ValueTuple.4.5.0\lib\net461\System.ValueTuple.dll + @@ -186,6 +189,7 @@ +