diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index 60ab5882..0d938fb0 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 d8a6cc55..81a66a8a 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.backup.json @@ -67,6 +67,10 @@ "$type": "Bookmark", "Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}" }, + { + "$type": "Bookmark", + "Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}" + }, { "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" diff --git a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json index d8a6cc55..4a8a0ea7 100644 --- a/.vs/SGGL_SeDin_New/v17/DocumentLayout.json +++ b/.vs/SGGL_SeDin_New/v17/DocumentLayout.json @@ -67,9 +67,17 @@ "$type": "Bookmark", "Name": "ST:0:0:{5726b0e3-1012-5233-81f9-d1fad48e7a56}" }, + { + "$type": "Bookmark", + "Name": "ST:2:0:{b9f91511-5ca5-40ec-9726-f3e3a7e534e2}" + }, { "$type": "Bookmark", "Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}" } ] } diff --git a/DataBase/版本日志/SGGLDB_V2025-05-13-001_bwj.sql b/DataBase/版本日志/SGGLDB_V2025-05-13-001_bwj.sql new file mode 100644 index 00000000..92221b63 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-05-13-001_bwj.sql @@ -0,0 +1,94 @@ + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('53948077-B51D-4FF3-BFB0-AB4E27C42875','Ųƻ','HJGL/PreDesign/ProductionSchedulingPlan.aspx',70,'1E36EA73-D536-4215-BFB9-A8771937BD89','Menu_HJGL',0,1,1) +go +insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('824DDB94-628F-4A4D-9977-E38F039578AA','53948077-B51D-4FF3-BFB0-AB4E27C42875','',1) +insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('5491A74E-F3EC-4C1D-AA5D-BB0283C7E36D','53948077-B51D-4FF3-BFB0-AB4E27C42875','޸',2) +insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('9B72FF93-6E2F-41DF-8BA9-3A1C82923B3B','53948077-B51D-4FF3-BFB0-AB4E27C42875','ɾ',3) +insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('8AD82894-12DA-47E8-8382-3E27633750E0','53948077-B51D-4FF3-BFB0-AB4E27C42875','',4) +go + +CREATE TABLE [dbo].[HJGL_ProductionSchedulingPlan]( + [ProductionSchedulingPlanId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [PipelineId] [nvarchar](50) NULL, + [FlowNum] [nvarchar](50) NULL, + [MainItemName] [nvarchar](50) NULL, + [Material] [nvarchar](50) NULL, + [Caliber] [nvarchar](50) NULL, + [Dain] [decimal](18, 2) NULL, + [TotalDyne] [decimal](18, 2) NULL, + [TotalPriority] [nvarchar](50) NULL, + [PriorityTotalDyne] [decimal](18, 2) NULL, + [PlanStartDate] [datetime] NULL, + [PlanEndDate] [datetime] NULL, + [Days] [int] NULL, + [AvgDailyWorkload] [numeric](18, 2) NULL, + CONSTRAINT [PK_HJGL_ProductionSchedulingPlan] PRIMARY KEY CLUSTERED +( + [ProductionSchedulingPlanId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +GO + +ALTER TABLE [dbo].[HJGL_ProductionSchedulingPlan] WITH CHECK ADD CONSTRAINT [FK_HJGL_ProductionSchedulingPlan_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[HJGL_ProductionSchedulingPlan] CHECK CONSTRAINT [FK_HJGL_ProductionSchedulingPlan_Base_Project] +GO + +ALTER TABLE [dbo].[HJGL_ProductionSchedulingPlan] WITH CHECK ADD CONSTRAINT [FK_HJGL_ProductionSchedulingPlan_HJGL_Pipeline] FOREIGN KEY([PipelineId]) +REFERENCES [dbo].[HJGL_Pipeline] ([PipelineId]) +GO + +ALTER TABLE [dbo].[HJGL_ProductionSchedulingPlan] CHECK CONSTRAINT [FK_HJGL_ProductionSchedulingPlan_HJGL_Pipeline] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'PipelineId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ˮκ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'FlowNum' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'MainItemName' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'Material' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ھ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'Caliber' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'Dain' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'TotalDyne' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'TotalPriority' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ȼܴ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'PriorityTotalDyne' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƻʼʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'PlanStartDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƻʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'PlanEndDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'Days' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƽÿ칤' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan', @level2type=N'COLUMN',@level2name=N'AvgDailyWorkload' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ųƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'HJGL_ProductionSchedulingPlan' +GO + + diff --git a/DataBase/版本日志/SGGLDB_V2025-05-14-001_bwj.sql b/DataBase/版本日志/SGGLDB_V2025-05-14-001_bwj.sql new file mode 100644 index 00000000..87bbe5db --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-05-14-001_bwj.sql @@ -0,0 +1,57 @@ + +CREATE VIEW [dbo].[View_HJGL_ProductionSchedulingPlanStatistics] +as +/************Ųƻͳ**********/ +SELECT distinct unitWork.UnitWorkId, +unitWork.UnitWorkCode, +unitWork.UnitWorkName, +unitWork.ProjectId, +pipeline.FlowingSection, +(case p.SteelType when '1' then '̼' when '2' then '' when '3' then '' when '4' then 'ͺϽ' when '5' then 'Ͻ' when '6' then 'ѺϽ' when '7' then '' end) as Material, +'<100' as Caliber, +isnull(weldJoint.Dia,0) as Dia +FROM WBS_UnitWork AS unitWork +LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId + +LEFT JOIN (select distinct Base_Material.SteelType,UnitWorkId from HJGL_WeldJoint + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id + where PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ') as p on p.UnitWorkId = unitWork.UnitWorkId +-- +LEFT JOIN (select sum(Dia) as Dia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id + where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' + and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)<100 + group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as weldJoint on weldJoint.UnitWorkId =unitWork.UnitWorkId + and weldJoint.FlowingSection = pipeline.FlowingSection + +union + +SELECT distinct unitWork.UnitWorkId, +unitWork.UnitWorkCode, +unitWork.UnitWorkName, +unitWork.ProjectId, +pipeline.FlowingSection, +(case p.SteelType when '1' then '̼' when '2' then '' when '3' then '' when '4' then 'ͺϽ' when '5' then 'Ͻ' when '6' then 'ѺϽ' when '7' then '' end) as Material, +'100' as Caliber, +isnull(weldJoint.Dia,0) as Dia +FROM WBS_UnitWork AS unitWork +LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId + +LEFT JOIN (select distinct Base_Material.SteelType,UnitWorkId from HJGL_WeldJoint + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id + where PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ') as p on p.UnitWorkId = unitWork.UnitWorkId + +LEFT JOIN (select sum(Dia) as Dia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia from HJGL_WeldJoint + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + left join Base_Material on Base_Material.MaterialId = HJGL_WeldJoint.Material1Id + where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' + and cast(SUBSTRING(HJGL_WeldJoint.DNDia,CHARINDEX('N',HJGL_WeldJoint.DNDia)+1,len(HJGL_WeldJoint.DNDia)-charindex('N',HJGL_WeldJoint.DNDia)) as int)>=100 + group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection,Base_Material.SteelType,HJGL_WeldJoint.DNDia) as weldJoint on weldJoint.UnitWorkId =unitWork.UnitWorkId + and weldJoint.FlowingSection = pipeline.FlowingSection + +GO + + diff --git a/SGGL/BLL/API/HJGL/APIPackagingManageService.cs b/SGGL/BLL/API/HJGL/APIPackagingManageService.cs index 95f4e477..e0cbf222 100644 --- a/SGGL/BLL/API/HJGL/APIPackagingManageService.cs +++ b/SGGL/BLL/API/HJGL/APIPackagingManageService.cs @@ -130,9 +130,29 @@ namespace BLL } table.PipelineComponentId = string.Join(",", set); + } } BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table); + var newDetailList = new List(); + foreach (var item in table.PipelineComponentId.Split(',')) + { + var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(item); + if (ComponentModel != null) + { + var model = new Model.HJGL_PackagingManageDetail() + { + Id = SQLHelper.GetNewID(), + PackagingManageId = table.PackagingManageId, + PipelineId = ComponentModel.PipelineId, + PipelineComponentId = item, + CreateTime = DateTime.Now, + }; + newDetailList.Add(model); + } + } + HJGLPackagingmanagedetailService.DeleteByPackagingManageId(table.PackagingManageId); + HJGLPackagingmanagedetailService.AddBulk(newDetailList); } } diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index ddb375f2..63464188 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -407,6 +407,7 @@ + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 5a9981a1..00cd10f3 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -4801,6 +4801,11 @@ namespace BLL /// public const string Pipeline_ComponentPath = "File\\Excel\\DataIn\\组件管理二维码信息导入.xlsx"; + /// + /// 排产计划导出模板 + /// + public const string HJGL_ProductionSchedulingPlanPath = "File\\Excel\\DataOut\\排产计划导出模板.xlsx"; + #region 焊接报表 /// diff --git a/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs b/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs index dcfbca42..7f2a10b4 100644 --- a/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs +++ b/SGGL/BLL/HJGL/PreDesign/HJGLPackagingmanagedetailService.cs @@ -231,6 +231,23 @@ namespace BLL } } + 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(); + } } } \ No newline at end of file diff --git a/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs new file mode 100644 index 00000000..ae787f4c --- /dev/null +++ b/SGGL/BLL/HJGL/PreDesign/ProductionSchedulingPlanService.cs @@ -0,0 +1,120 @@ +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; + +namespace BLL +{ + /// + /// 排产计划 + /// + public class ProductionSchedulingPlanService + { + /// + /// 根据主键获取排产计划 + /// + /// + /// + public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlanById(string productionSchedulingPlanId) + { + return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProductionSchedulingPlanId == productionSchedulingPlanId); + } + + + public static Model.HJGL_ProductionSchedulingPlan GetProductionSchedulingPlan(string loginProjectId, string flowingSection, string unitWorkName, string material, string caliber) + { + return Funs.DB.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProjectId == loginProjectId && e.FlowNum == flowingSection && e.MainItemName == unitWorkName && e.Caliber == caliber); + } + + /// + /// 增加排产计划 + /// + /// + public static void AddProductionSchedulingPlan(Model.HJGL_ProductionSchedulingPlan plan) + { + SGGLDB db = Funs.DB; + Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan(); + newPlan.ProductionSchedulingPlanId = plan.ProductionSchedulingPlanId; + newPlan.ProjectId = plan.ProjectId; + newPlan.PipelineId = plan.PipelineId; + newPlan.FlowNum = plan.FlowNum; + newPlan.MainItemName = plan.MainItemName; + newPlan.Material = plan.Material; + newPlan.Caliber = plan.Caliber; + newPlan.Dain = plan.Dain; + newPlan.TotalDyne = plan.TotalDyne; + newPlan.TotalPriority = plan.TotalPriority; + newPlan.PriorityTotalDyne = plan.PriorityTotalDyne; + newPlan.PlanStartDate = plan.PlanStartDate; + newPlan.PlanEndDate = plan.PlanEndDate; + newPlan.Days = plan.Days; + newPlan.AvgDailyWorkload = plan.Days; + db.HJGL_ProductionSchedulingPlan.InsertOnSubmit(newPlan); + db.SubmitChanges(); + } + + /// + /// 修改排产计划 + /// + /// + public static void UpdateProductionSchedulingPlan(Model.HJGL_ProductionSchedulingPlan plan) + { + Model.SGGLDB db = Funs.DB; + Model.HJGL_ProductionSchedulingPlan newPlan = db.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProductionSchedulingPlanId == plan.ProductionSchedulingPlanId); + if (newPlan != null) + { + newPlan.PipelineId = plan.PipelineId; + newPlan.FlowNum = plan.FlowNum; + newPlan.MainItemName = plan.MainItemName; + newPlan.Material = plan.Material; + newPlan.Caliber = plan.Caliber; + newPlan.Dain = plan.Dain; + newPlan.TotalDyne = plan.TotalDyne; + newPlan.TotalPriority = plan.TotalPriority; + newPlan.PriorityTotalDyne = plan.PriorityTotalDyne; + newPlan.PlanStartDate = plan.PlanStartDate; + newPlan.PlanEndDate = plan.PlanEndDate; + newPlan.Days = plan.Days; + newPlan.AvgDailyWorkload = plan.AvgDailyWorkload; + try + { + db.SubmitChanges(System.Data.Linq.ConflictMode.ContinueOnConflict); + } + catch (System.Data.Linq.ChangeConflictException ex) + { + foreach (System.Data.Linq.ObjectChangeConflict occ in db.ChangeConflicts) + { + //以下是解决冲突的三种方法,选一种即可 + // 使用当前数据库中的值,覆盖Linq缓存中实体对象的值 + occ.Resolve(System.Data.Linq.RefreshMode.OverwriteCurrentValues); + // 使用Linq缓存中实体对象的值,覆盖当前数据库中的值 + occ.Resolve(System.Data.Linq.RefreshMode.KeepCurrentValues); + // 只更新实体对象中改变的字段的值,其他的保留不变 + occ.Resolve(System.Data.Linq.RefreshMode.KeepChanges); + } + // 这个地方要注意,Catch方法中,我们前面只是指明了怎样来解决冲突,这个地方还需要再次提交更新,这样的话,值 //才会提交到数据库。 + db.SubmitChanges(); + } + } + } + + /// + /// 根据主键删除排产计划 + /// + /// + public static void DeleteProductionSchedulingPlanById(string productionSchedulingPlanId) + { + SGGLDB db = Funs.DB; + Model.HJGL_ProductionSchedulingPlan plan = db.HJGL_ProductionSchedulingPlan.FirstOrDefault(e => e.ProductionSchedulingPlanId == productionSchedulingPlanId); + if (plan != null) + { + db.HJGL_ProductionSchedulingPlan.DeleteOnSubmit(plan); + db.SubmitChanges(); + } + } + + } +} diff --git a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs index 160c451a..f2f06986 100644 --- a/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/WeldJointService.cs @@ -466,6 +466,8 @@ namespace BLL baseQuery = baseQuery.Where(x => x.PipelineCode.Contains(model.PipelineCode)); if (!string.IsNullOrEmpty(model.WeldJointCode)) baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains(model.WeldJointCode)); + //构建排序 + baseQuery = baseQuery.OrderBy(x => x.PipelineId).ThenBy(x => x.WeldJointCode); return baseQuery.ToList(); } @@ -503,7 +505,7 @@ namespace BLL baseQuery = baseQuery.Where(x => x.WeldJointCode.Contains( model.WeldJointCode)); // 阶段三:排序与分页控制(索引优化关键) - var orderedQuery = baseQuery.OrderBy(x => x.WeldJointCode); + var orderedQuery = baseQuery.OrderBy(x=>x.PipelineId).ThenBy(x => x.WeldJointCode); // 阶段四:分页执行(数据库层面分页) var pagedData = orderedQuery diff --git a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs index f8921e18..fab4c19f 100644 --- a/SGGL/BLL/HSSE/CostGoods/CostManageService.cs +++ b/SGGL/BLL/HSSE/CostGoods/CostManageService.cs @@ -1,8 +1,12 @@ using Model; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; using NPOI.SS.UserModel; using System; using System.Collections.Generic; +using System.IO; using System.Linq; +using System.Numerics; namespace BLL { @@ -11,7 +15,7 @@ namespace BLL /// public static class CostManageService { - + /// /// 根据主键获取安全费用管理 @@ -29,12 +33,12 @@ namespace BLL /// /// /// - public static decimal GetSumHSECost(string ProjectId, string UnitId, string costManageId ) + public static decimal GetSumHSECost(string ProjectId, string UnitId, string costManageId) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { decimal sumCost = 0; - var getData = from x in db.CostGoods_CostManage + var getData = from x in db.CostGoods_CostManage where x.ProjectId == ProjectId && x.UnitId == UnitId && x.States == Const.State_2 && x.CostManageId != costManageId select x; if (getData.Count() > 0) @@ -70,12 +74,12 @@ namespace BLL States = costManage.States, CompileMan = costManage.CompileMan, CompileDate = costManage.CompileDate, - NextManId= costManage.NextManId, + NextManId = costManage.NextManId, }; db.CostGoods_CostManage.InsertOnSubmit(newCostManage); db.SubmitChanges(); - + AddCostManageFlowOperate(newCostManage); } @@ -172,7 +176,7 @@ namespace BLL /// /// public static Model.CostGoods_CostManageFlowOperate getNowCostManageFlowOperateList(string costManageId) - { + { var getAllNoClose = Funs.DB.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId && (x.IsClosed == null || x.IsClosed == false)); if (getAllNoClose.Count() > 0) { @@ -190,10 +194,10 @@ namespace BLL /// /// /// - public static Model.CostGoods_CostManageFlowOperate getNextCostManageFlowOperateList(string costManageId,string operaterId) + public static Model.CostGoods_CostManageFlowOperate getNextCostManageFlowOperateList(string costManageId, string operaterId) { int minSortIndex = 1; - var getAllNoClose = Funs.DB.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId && (x.IsClosed == null || x.IsClosed == false)); + var getAllNoClose = Funs.DB.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId && (x.IsClosed == null || x.IsClosed == false)); if (getAllNoClose.Count() > 0) { var getFlowOperate = getAllNoClose.Where(x => x.OperaterId == operaterId); @@ -210,7 +214,7 @@ namespace BLL } else { - return null; + return null; } } @@ -342,10 +346,10 @@ namespace BLL { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - var getDatas = db.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId && x.IsClosed==true); - foreach ( var item in getDatas) + var getDatas = db.CostGoods_CostManageFlowOperate.Where(x => x.CostManageId == costManageId && x.IsClosed == true); + foreach (var item in getDatas) { - item.IsClosed= false; + item.IsClosed = false; db.SubmitChanges(); } } @@ -367,5 +371,107 @@ namespace BLL } } } + + + /// 推送数据到HSE系统 + /// + public static string PushDataToHSE(string projectId, string contractNum) + { + try + { + string message = ""; + // 查询当前合同所有审核通过的数据 + var costData = from x in Funs.DB.CostGoods_CostManage + where x.ProjectId == projectId && x.ContractNum == contractNum && x.States == Const.State_2 + orderby x.CostManageDate descending + select x; + + if (costData.Any()) + { + // 获取所有附件文件 + var files = new List(); + decimal totalAmount = 0; + + foreach (var item in costData) + { + var fileDetails = GetBase64FilesWithDetails(item.CostManageId); + if (fileDetails != null && fileDetails.Count > 0) + { + files.AddRange(fileDetails); + totalAmount += item.SumMoney ?? 0; + } + } + + // 构建请求体 + var requestBody = new + { + projectId = projectId, + contractNo = contractNum, + amountHSE = totalAmount.ToString(), + files = files + }; + var jsonBody = JsonConvert.SerializeObject(requestBody); + // 调用HSE接口推送数据 + // TODO: 实现实际的HSE接口调用逻辑 + var url="http://172.29.60.33:8080"; + var requestGetTokenUrl = url + "/api/Token/GetToken"; + string requestGetTokenBody = "{\r\n\r\n\"username\": \"coadmin\",\r\n\r\n\"password\": \"coadminPu@2025\"\r\n\r\n}"; + var response = Funs.RequestPost(requestGetTokenUrl, "", requestGetTokenBody); + var responseStr = JsonConvert.DeserializeObject(response); + if (responseStr == null || responseStr["data"].ToString() != "200") + { + message = "获取Pu系统Token失败"; + + } + string accessToken = responseStr["data"]["token"].ToString(); + var requestUrl = url + "/api/PuPayCraftAmount/AddPuPayCraftAmount"; + var responseHSE = Funs.RequestPost(requestUrl, accessToken, jsonBody); + var responseHSEStr = JsonConvert.DeserializeObject(responseHSE); + if (responseHSEStr == null || responseHSEStr["data"].ToString()!= "200") + { + message = "推送数据到HSE系统失败"; + } + } + return message; + + } + catch (Exception ex) + { + // 记录错误日志 + ErrLogInfo.WriteLog(ex.Message, ex.StackTrace); + return "推送数据失败"+ex.Message; + + } + } + + /// + /// 获取Base64编码的附件文件 + /// + public static List GetBase64FilesWithDetails(string costManageId) + { + var result = new List(); + // 获取费用管理信息 + var costManage = GetCostManageById(costManageId); + // 获取附件文件 + var attachments = AttachFileService.getFileUrl(costManageId); + + if (!string.IsNullOrEmpty(attachments)) + { + string filePath=Funs.RootPath+attachments.Split(',')[0]; + FileInfo file = new FileInfo(filePath); + byte[] fileBytes = File.ReadAllBytes(filePath); + string base64Content = Convert.ToBase64String(fileBytes); + + result.Add(new Model.PuPayCraftAmountFileInput + { + name = file.Name, + content = base64Content, + thisamount = costManage?.SumMoney?.ToString() ?? "0", + date = costManage?.CostManageDate?.ToString("yyyy-MM-dd") ?? DateTime.Now.ToString("yyyy-MM-dd") + }); + } + + return result; + } } } diff --git a/SGGL/BLL/HSSE/Environmental/EnvironmentalCheckService.cs b/SGGL/BLL/HSSE/Environmental/EnvironmentalCheckService.cs index 77107202..fee9c321 100644 --- a/SGGL/BLL/HSSE/Environmental/EnvironmentalCheckService.cs +++ b/SGGL/BLL/HSSE/Environmental/EnvironmentalCheckService.cs @@ -12,6 +12,7 @@ namespace BLL /// public static class EnvironmentalCheckService { + #region 推送环境监测数据 /// @@ -20,8 +21,8 @@ namespace BLL /// public static ReturnData PushEnvironmentalCheckData() { - var db1 = Funs.DB; - var items = (from x in db1.EnvironmentalCheck where x.IsPushed == false select x).ToList(); + var db = Funs.DB; + var items = (from x in db.EnvironmentalCheck where x.IsPushed == false select x).ToList(); Model.ReturnData responeData = new Model.ReturnData(); if (items.Count() > 0) { @@ -34,11 +35,11 @@ namespace BLL {//推送成功后,修改数据状态 foreach (var item in items) { - Model.EnvironmentalCheck envModel = db1.EnvironmentalCheck.FirstOrDefault(e => e.Id == item.Id); + Model.EnvironmentalCheck envModel = db.EnvironmentalCheck.FirstOrDefault(e => e.Id == item.Id); if (envModel != null) { envModel.IsPushed = true; - db1.SubmitChanges(); + db.SubmitChanges(); } } } diff --git a/SGGL/BLL/PHTGL/ContractCompile/ContractService.cs b/SGGL/BLL/PHTGL/ContractCompile/ContractService.cs index c7704a71..bce910e4 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/ContractService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/ContractService.cs @@ -44,8 +44,22 @@ namespace BLL select y).ToList(); return list; } - - + /// + /// 获取审批完成的主合同 + /// + /// + /// + public static List GetCompletedContracts(string ProjectId) + { + var q= from x in Funs.DB.PHTGL_Contract + join y in Funs.DB.PHTGL_ContractReview on x.ContractId equals y.ContractId + where + y.State== Const.ContractReview_Complete && + x.ContractAttribute==0 && + x.ProjectId==ProjectId + select x; + return q.ToList(); + } public static void InitAllProjectCodeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) { dropName.DataValueField = "ProjectId"; @@ -62,7 +76,14 @@ namespace BLL Funs.FineUIPleaseSelect(dropName); } } - + public static void InitCompletedContractsDropDownList(string projectId, FineUIPro.DropDownList dropName) + { + dropName.DataValueField = "ContractNum"; + dropName.DataTextField = "ContractNum"; + var CompletedContractslist = GetCompletedContracts(projectId); + dropName.DataSource = CompletedContractslist; + dropName.DataBind(); + } /// /// 增加合同基本信息 diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx new file mode 100644 index 00000000..af9e3643 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx differ diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx index e84a3140..99752f7d 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -45,7 +45,8 @@ namespace FastReport Table4.PrintColumns(); Table4.PrintRow(5); Table4.PrintColumns(); - + Table4.PrintRow(6); + Table4.PrintColumns(); // go next data source row rowData.Next(); @@ -89,7 +90,7 @@ namespace FastReport } - + @@ -169,8 +170,8 @@ namespace FastReport - - + + @@ -239,9 +240,24 @@ namespace FastReport + + + + + + + + + + + + + + + - + @@ -272,8 +288,8 @@ namespace FastReport - - + + @@ -297,7 +313,7 @@ namespace FastReport - + @@ -338,7 +354,7 @@ namespace FastReport - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx b/SGGL/FineUIPro.Web/File/Fastreport/装箱单.frx index 8e28c107..5ca4de20 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 0beaad22..0fbcf266 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1558,6 +1558,7 @@ + @@ -10585,6 +10586,13 @@ PrePipelineQRCodeIn.aspx + + ProductionSchedulingPlan.aspx + ASPXCodeBehind + + + ProductionSchedulingPlan.aspx + TrainNumberManager.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs index 3cbf319c..a99cd7a5 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/JointQuery.aspx.cs @@ -487,14 +487,18 @@ namespace FineUIPro.Web.HJGL.InfoQuery /// protected void btnOut_Click(object sender, EventArgs e) { + string fileName = ""; if (this.tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2) //单位工程 { Model.View_HJGL_WeldJoint model = new Model.View_HJGL_WeldJoint(); model.UnitWorkId = this.tvControlItem.SelectedNodeID; var list = BLL.WeldJointService.GetViewWeldJointsBymodel(model); View_HJGL_WeldJoint = list; - /* PrintByUnitWork(this.tvControlItem.SelectedNodeID); - return;*/ + fileName = UnitWorkService.GetNameById(model.UnitWorkId); + } + else if (this.tvControlItem.SelectedNode.CommandName == "管线") + { + fileName = PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID)?.PipelineCode; } string path = Funs.RootPath + @"File\Excel\Temp\JointQuery.xlsx"; @@ -537,7 +541,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery }).ToList(); MiniExcel.SaveAs(path, q); - string fileName = "焊口信息总览.xlsx"; + fileName = fileName+ "-焊口信息总览.xlsx"; FileInfo info = new FileInfo(path); long fileSize = info.Length; System.Web.HttpContext.Current.Response.Clear(); diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs index f636dc99..ffcd1152 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs @@ -1082,9 +1082,7 @@ namespace FineUIPro.Web.HJGL.PointTrust //{ //} - #endregion - - + #endregion #region 切除焊口 diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx index 469afc47..3d22fdea 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx @@ -75,7 +75,7 @@ --%> + diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs index 56165d31..46930720 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.cs @@ -989,6 +989,9 @@ namespace FineUIPro.Web.HJGL.PointTrust } } + protected void btnBack_Click(object sender, EventArgs e) + { + } #region 判断是否可删除 /// /// 判断是否可以删除 diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.designer.cs index 1b5a6891..742b613c 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/TrustBatch.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.PointTrust { - - - public partial class TrustBatch { - +namespace FineUIPro.Web.HJGL.PointTrust +{ + + + public partial class TrustBatch + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelLeftRegion 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelLeftRegion; - + /// /// Toolbar2 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// drpUnit 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// Toolbar4 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar4; - + /// /// txtWelderCode 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWelderCode; - + /// /// Toolbar1 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// txtTrustDateMonth 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtTrustDateMonth; - + /// /// tvControlItem 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Tree tvControlItem; - + /// /// panelCenterRegion 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar3 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// ToolbarFill1 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnAudit 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAudit; - + /// /// btnDelete 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// btnPrint 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnPrint; - + /// /// SimpleForm1 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtTrustBatchCode 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTrustBatchCode; - + /// /// txtTrustDate 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtTrustDate; - + /// /// txtDetectionTypeCode 控件。 /// @@ -200,7 +202,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label txtDetectionTypeCode; - + /// /// lbNDEUnit 控件。 /// @@ -209,7 +211,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbNDEUnit; - + /// /// lbIsTrust 控件。 /// @@ -218,7 +220,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbIsTrust; - + /// /// lbIsAudit 控件。 /// @@ -227,7 +229,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lbIsAudit; - + /// /// Button1 控件。 /// @@ -236,7 +238,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button Button1; - + /// /// Grid1 控件。 /// @@ -245,7 +247,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolbarSeparator1 控件。 /// @@ -254,7 +256,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -263,7 +265,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -272,7 +274,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -281,7 +283,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -290,7 +292,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Menu1 控件。 /// @@ -299,7 +301,7 @@ namespace FineUIPro.Web.HJGL.PointTrust { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnPointAudit 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs index 60908f79..31f1e319 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.cs @@ -229,36 +229,36 @@ namespace FineUIPro.Web.HJGL.PreDesign private DataTable BindData() { string strSql = @"WITH cte as (select pipeline.PipelineCode as PipelineCode, -comonent.PipelineComponentCode as PipelineComponentCode, -'' as matdef, -packdetail.Number as Number, -pack.PackagingCode as PackagingCode, -trainnumber.TrainNumber as TrainNumber, -pipeline.FlowingSection as FlowingSection, -pipeline.UnitWorkId as UnitWorkId -from HJGL_Pipeline pipeline -left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId -left join HJGL_Pipeline_Component comonent -on packdetail.PipelineComponentId = comonent.PipelineComponentId -left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId -left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id -where (packdetail.PipelineComponentId is not null or packdetail.PipelineComponentId != '') -union all -select pipeline.PipelineCode as PipelineCode, -packdetail.MaterialCode as PipelineComponentCode, -matlib.MaterialDef as matdef, -packdetail.Number as Number, -pack.PackagingCode as PackagingCode, -trainnumber.TrainNumber as TrainNumber, -pipeline.FlowingSection as FlowingSection, -pipeline.UnitWorkId as UnitWorkId -from HJGL_Pipeline pipeline -left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId -left join HJGL_MaterialCodeLib matlib on packdetail.MaterialCode = matlib.MaterialCode -left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId -left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id -where (packdetail.PipelineComponentId is null or packdetail.PipelineComponentId = '')) -SELECT * FROM cte WHERE 1=1 "; + comonent.PipelineComponentCode as PipelineComponentCode, + '' as matdef, + packdetail.Number as Number, + pack.PackagingCode as PackagingCode, + trainnumber.TrainNumber as TrainNumber, + pipeline.FlowingSection as FlowingSection, + pipeline.UnitWorkId as UnitWorkId + from HJGL_Pipeline pipeline + left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId + left join HJGL_Pipeline_Component comonent + on packdetail.PipelineComponentId = comonent.PipelineComponentId + left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId + left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id + where (packdetail.PipelineComponentId is not null or packdetail.PipelineComponentId != '') + union all + select pipeline.PipelineCode as PipelineCode, + packdetail.MaterialCode as PipelineComponentCode, + matlib.MaterialDef as matdef, + packdetail.Number as Number, + pack.PackagingCode as PackagingCode, + trainnumber.TrainNumber as TrainNumber, + pipeline.FlowingSection as FlowingSection, + pipeline.UnitWorkId as UnitWorkId + from HJGL_Pipeline pipeline + left join HJGL_PackagingManageDetail packdetail on pipeline.PipelineId = packdetail.PipelineId + left join HJGL_MaterialCodeLib matlib on packdetail.MaterialCode = matlib.MaterialCode + left join HJGL_PackagingManage pack on packdetail.PackagingManageId = pack.PackagingManageId + left join HJGL_TrainNumberManage trainnumber on pack.TrainNumberId = TrainNumber.Id + where (packdetail.PipelineComponentId is null or packdetail.PipelineComponentId = '')) + SELECT * FROM cte WHERE 1=1 "; List listStr = new List(); if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2) @@ -390,7 +390,7 @@ SELECT * FROM cte WHERE 1=1 "; 管线号 = x.Field("PipelineCode"), 组件编号 = x.Field("PipelineComponentCode"), 预制散件材料描述 = !string.IsNullOrWhiteSpace(x.Field("matdef")) ? x.Field("matdef") : "-", - 数量 = x.Field("Number"), + 数量 = x.Field("Number"), 所在包装编号 = x.Field("PackagingCode"), 车次 = x.Field("TrainNumber"), 流水段 = x.Field("FlowingSection") diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs index af9cc677..15f29f23 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PackagingManageEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using Model; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -122,6 +123,27 @@ namespace FineUIPro.Web.HJGL.PreDesign { table.PipelineComponentId = string.Join(",", dropPipelineComponentCode.Values); + var newDetailList= new List(); + foreach (var item in dropPipelineComponentCode.Values) + { + var ComponentModel = BLL.HJGL_PipelineComponentService.GetPipelineComponentById(item); + if (ComponentModel != null) + { + var model = new Model.HJGL_PackagingManageDetail() + { + Id = SQLHelper.GetNewID(), + PackagingManageId = this.PackagingManageId, + PipelineId = ComponentModel.PipelineId, + PipelineComponentId = item, + CreateTime = DateTime.Now, + CreateUser = this.CurrUser.PersonId, + }; + newDetailList.Add(model); + } + } + HJGLPackagingmanagedetailService.DeleteByPackagingManageId(this.PackagingManageId); + HJGLPackagingmanagedetailService.AddBulk(newDetailList); + } } BLL.HJGL_PackagingmanageService.UpdateHJGL_PackagingManage(table); diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx new file mode 100644 index 00000000..c6f83703 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx @@ -0,0 +1,171 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProductionSchedulingPlan.aspx.cs" Inherits="FineUIPro.Web.HJGL.PreDesign.ProductionSchedulingPlan" %> + + + + + + + 排产计划 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs new file mode 100644 index 00000000..54a1c395 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs @@ -0,0 +1,526 @@ +using BLL; +using MiniExcelLibs; +using Model; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Data.SqlTypes; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Web; +using System.Web.WebSockets; + +namespace FineUIPro.Web.HJGL.PreDesign +{ + public partial class ProductionSchedulingPlan : PageBase + { + public int pageSize = 20; + public static DataTable GridDataTable = new DataTable(); + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + this.InitTreeMenu();//加载树 + } + } + + #region 加载树装置-单位-工作区 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.tvControlItem.Nodes.Clear(); + + TreeNode rootNode1 = new TreeNode(); + rootNode1.NodeID = "1"; + rootNode1.Text = "建筑工程"; + rootNode1.CommandName = "建筑工程"; + rootNode1.Selectable = false; + this.tvControlItem.Nodes.Add(rootNode1); + + TreeNode rootNode2 = new TreeNode(); + rootNode2.NodeID = "2"; + rootNode2.Text = "安装工程"; + rootNode2.CommandName = "安装工程"; + rootNode2.Expanded = true; + this.tvControlItem.Nodes.Add(rootNode2); + + 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(); + + 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(); + //} + + if (unitWork1.Count() > 0) + { + foreach (var q in unitWork1) + { + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" && x.PipelineCode.Contains(txtPipelineCode.Text.Trim()) select x.FlowingSection).Distinct().Count(); + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); + TreeNode tn1 = new TreeNode(); + tn1.NodeID = q.UnitWorkId; + //tn1.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; + tn1.Text = q.UnitWorkName; + tn1.ToolTip = "施工单位:" + unitNamesUnitIds; + tn1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); + tn1.EnableClickEvent = true; + 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 (a > 0) + //{ + // BindNodes(tn1); + //} + } + } + if (unitWork2.Count() > 0) + { + foreach (var q in unitWork2) + { + int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId && x.PipeArea == "1" && x.PipelineCode.Contains(txtPipelineCode.Text.Trim()) select x.FlowingSection).Distinct().Count(); + var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId); + TreeNode tn2 = new TreeNode(); + tn2.NodeID = q.UnitWorkId; + //tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线"; + tn2.Text = q.UnitWorkName; + if (q.UnitWorkId == this.hdUnitWorkId.Text) + { + tn2.Expanded = true; + } + tn2.ToolTip = "施工单位:" + unitNamesUnitIds; + tn2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); + tn2.EnableClickEvent = true; + tn2.EnableExpandEvent = true; + rootNode2.Nodes.Add(tn2); + if (a > 0) + { + // BindNodes(tn1); + TreeNode newNode = new TreeNode(); + newNode.Text = "加载流水段..."; + newNode.NodeID = "加载流水段..."; + tn2.Nodes.Add(newNode); + } + //if (a > 0) + //{ + // BindNodes(tn2); + //} + } + } + } + + private void BindNodes(TreeNode node) + { + List flowingSection = new List(); + //List pipeline = new List(); + var list = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.PipeArea == "1" && x.UnitWorkId == node.NodeID && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x.FlowingSection).ToList(); + flowingSection = list.Where(x => !string.IsNullOrWhiteSpace(x) == true).Distinct().OrderBy(x => x).ToList(); + //int pageindex = int.Parse(node.CommandName.Split('|')[0]); + //int pageCount = int.Parse(node.CommandName.Split('|')[1]); + //if (pageindex <= pageCount) + //{ + // flowingSection = flowingSection.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList(); + foreach (var item in flowingSection) + { + //var comCount = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineId == item.PipelineId select x).Count(); + TreeNode newNode = new TreeNode(); + //newNode.Text = item.PipelineCode + "【" + comCount.ToString() + " " + "组件" + "】"; + + newNode.Text = item; + newNode.ToolTip = "流水段"; + newNode.CommandName = "流水段"; + newNode.NodeID = SQLHelper.GetNewID(); + newNode.EnableClickEvent = true; + node.Nodes.Add(newNode); + } + // if (pageindex < pageCount) + // { + // TreeNode newNode = new TreeNode(); + // newNode.Text = "加载"; + // newNode.NodeID = "加载"; + // //newNode.NodeID = SQLHelper.GetNewID(); + // newNode.CommandName = "加载"; + // newNode.Icon = Icon.ArrowDown; + // newNode.EnableClickEvent = true; + // node.Nodes.Add(newNode); + // } + //} + } + + #endregion + protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e) + { + if (e.Node.Nodes[0].NodeID == "加载流水段...") + { + e.Node.Nodes.Clear(); + BindNodes(e.Node); + } + + } + #region 点击TreeView + /// + /// 点击TreeView + /// + /// + /// + protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) + { + if (e.CommandName == "流水段") + { + Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByFlowingSection(this.tvControlItem.SelectedNode.Text); + this.hdUnitWorkId.Text = string.Empty; + if (pipeline != null) + { + this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID; + SaveProductionSchedulingPlan(); + } + } + this.BindGrid(); + } + + /// + /// 保存数据 + /// + /// + private void SaveProductionSchedulingPlan() + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + List lists = (from x in Funs.DB.View_HJGL_ProductionSchedulingPlanStatistics.Where(x => x.ProjectId == this.CurrUser.LoginProjectId && x.FlowingSection == this.tvControlItem.SelectedNode.Text) select x).ToList(); + foreach (var item in lists) + { + var plan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlan(this.CurrUser.LoginProjectId, item.FlowingSection, item.UnitWorkName, item.Material, item.Caliber); + if (plan == null) + { + Model.HJGL_ProductionSchedulingPlan newPlan = new HJGL_ProductionSchedulingPlan(); + newPlan.ProductionSchedulingPlanId = SQLHelper.GetNewID(typeof(Model.HJGL_ProductionSchedulingPlan)); + newPlan.ProjectId = this.CurrUser.LoginProjectId; + //newPlan.PipelineId = this.tvControlItem.SelectedNodeID; + newPlan.FlowNum = item.FlowingSection; + newPlan.MainItemName = item.UnitWorkName; + newPlan.Material = item.Material; + newPlan.Caliber = item.Caliber; + newPlan.Dain = item.Dia; + newPlan.TotalDyne = lists.Sum(x => x.Dia); + BLL.ProductionSchedulingPlanService.AddProductionSchedulingPlan(newPlan); + } + } + } + } + #endregion + + #region 数据绑定 + /// + /// 数据绑定 + /// + private void BindGrid() + { + if (tvControlItem.SelectedNode == null) return; + string strSql = @"SELECT p.ProductionSchedulingPlanId, + p.ProjectId, + p.PipelineId, + p.FlowNum, + p.MainItemName, + p.Material, + p.Caliber, + p.Dain, + p.TotalDyne, + p.TotalPriority, + p.PriorityTotalDyne, + p.PlanStartDate, + p.PlanEndDate, + p.Days, + p.AvgDailyWorkload + FROM HJGL_ProductionSchedulingPlan p + WHERE 1=1 "; + List listStr = new List(); + + if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2) + { + strSql += " and p.MainItemName =@UnitWorkId"; + listStr.Add(new SqlParameter("@UnitWorkId", this.tvControlItem.SelectedNode.Text)); + + } + else if (tvControlItem.SelectedNode.CommandName == "流水段") + { + strSql += " and p.FlowNum = @FlowNum "; + listStr.Add(new SqlParameter("@FlowNum", this.tvControlItem.SelectedNode.Text)); + + } + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + GridDataTable = tb; + // 2.获取当前分页数据 + Grid1.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + #endregion + + #region 分页排序 + #region 页索引改变事件 + /// + /// 页索引改变事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + #endregion + + #region 排序 + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + #endregion + + #region 分页选择下拉改变事件 + /// + /// 分页选择下拉改变事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + #endregion + + #region 维护事件 + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + + #endregion + + #region 关闭弹出窗口及刷新页面 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + protected void btnTreeFind_Click(object sender, EventArgs e) + { + this.InitTreeMenu(); + + } + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.Grid1.Rows.Count > 0) + { + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + string rowId = Grid1.Rows[i].RowID; + var newPlan = BLL.ProductionSchedulingPlanService.GetProductionSchedulingPlanById(rowId); + if (newPlan != null) + { + newPlan.TotalPriority = values.Value("TotalPriority"); + newPlan.PriorityTotalDyne = Funs.GetNewDecimal(values.Value("PriorityTotalDyne")); + newPlan.PlanStartDate = Funs.GetNewDateTime(values.Value("PlanStartDate")); + newPlan.PlanEndDate = Funs.GetNewDateTime(values.Value("PlanEndDate")); + newPlan.Days = Funs.GetNewInt(values.Value("Days")); + newPlan.AvgDailyWorkload = Funs.GetNewDecimal(values.Value("AvgDailyWorkload")); + BLL.ProductionSchedulingPlanService.UpdateProductionSchedulingPlan(newPlan); + } + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + BindGrid(); + } + } + #endregion + + #region 导出 + protected void btnOut_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = Const.HJGL_ProductionSchedulingPlanPath; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + uploadfilepath = rootPath + initTemplatePath; + + var lists = (from x in Funs.DB.HJGL_ProductionSchedulingPlan + where x.ProjectId == this.CurrUser.LoginProjectId + select x); + + if (tvControlItem.SelectedNode.CommandName.Split('|').Length == 2) + { + lists = lists.Where(x => x.MainItemName == this.tvControlItem.SelectedNode.Text); + } + else if (tvControlItem.SelectedNode.CommandName == "流水段") + { + lists = lists.Where(x => x.FlowNum == this.tvControlItem.SelectedNode.Text); + } + + if (lists != null) + { + newUrl = uploadfilepath.Replace("排产计划导出模板", "排产计划(" + DateTime.Now.ToString("yyyyMMdd") + ")"); + if (File.Exists(newUrl)) + { + File.Delete(newUrl); + } + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); + //workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); + } + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle(); + cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 + var font = workbook.CreateFont(); + font.FontHeightInPoints = 11; + cellStyle.SetFont(font); + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + NPOI.SS.UserModel.IRow row = sheet.GetRow(0); + NPOI.SS.UserModel.ICell cell; + int i = 1; + foreach (var item in lists) + { + // 第二步:创建新数据行 + row = sheet.CreateRow(i); + // 添加数据 + cell = row.CreateCell(0); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.FlowNum);//流水段号 + + cell = row.CreateCell(1); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.MainItemName);//主项名称 + + cell = row.CreateCell(2); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Material);//材质 + + cell = row.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Caliber);//口径 + + cell = row.CreateCell(4); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Dain.HasValue ? item.Dain.ToString() : "");//达因数 + + cell = row.CreateCell(5); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.TotalDyne.HasValue?item.TotalDyne.ToString():"");//总达因数 + + cell = row.CreateCell(6); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.TotalPriority);//总优先级 + + cell = row.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.PriorityTotalDyne.HasValue ? item.PriorityTotalDyne.ToString() : "");//优先级总达因 + + cell = row.CreateCell(8); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.PlanStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PlanStartDate) : "");//计划开始时间 + + cell = row.CreateCell(9); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.PlanEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", item.PlanEndDate) : "");//计划结束时间 + + cell = row.CreateCell(10); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Days.HasValue?item.Days.ToString():"");//天数 + + cell = row.CreateCell(11); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.AvgDailyWorkload.HasValue ? item.AvgDailyWorkload.ToString():"");//平均每天工作量 + + i++; + } + // 第三步:写入文件流 + using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + { + workbook.Write(stream); + workbook.Close(); + } + string fileName = Path.GetFileName(newUrl); + FileInfo info = new FileInfo(newUrl); + long fileSize = info.Length; + Response.Clear(); + Response.ContentType = "application/x-zip-compressed"; + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.AddHeader("Content-Length", fileSize.ToString()); + Response.TransmitFile(newUrl, 0, fileSize); + Response.Flush(); + Response.Close(); + File.Delete(newUrl); + } + else + { + Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs new file mode 100644 index 00000000..7468eff7 --- /dev/null +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs @@ -0,0 +1,233 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.PreDesign +{ + + + public partial class ProductionSchedulingPlan + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtPipelineCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineCode; + + /// + /// hdUnitWorkId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdUnitWorkId; + + /// + /// btnTreeFind 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnTreeFind; + + /// + /// tvControlItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree tvControlItem; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// txtTotalPriority 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTotalPriority; + + /// + /// txtPriorityTotalDyne 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtPriorityTotalDyne; + + /// + /// txtPlanStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPlanStartDate; + + /// + /// txtPlanEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPlanEndDate; + + /// + /// txtDays 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtDays; + + /// + /// txtAvgDailyWorkload 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtAvgDailyWorkload; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx index c28b1360..798ec89a 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx @@ -32,6 +32,8 @@ + + diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.cs index 9697773f..03c9f175 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.cs @@ -329,5 +329,35 @@ namespace FineUIPro.Web.HSSE.CostGoods PrinterDocService.PrinterDocMethod(Const.ProjectCostManageMenuId, Grid1.SelectedRowID, "HSSE费用管理"); } + + protected void Button1_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string costManageId = Grid1.SelectedRowID; + var costManage = CostManageService.GetCostManageById(costManageId); + if (costManage != null && costManage.States == Const.State_2) + { + if (string.IsNullOrEmpty(costManage.ContractNum)) + { + Alert.ShowInTop("未关联合同,无法推送!", MessageBoxIcon.Warning); + + } + else + { + string messaage = CostManageService.PushDataToHSE(this.CurrUser.LoginProjectId, costManage.ContractNum); + + } + + } + else + { + Alert.ShowInTop("未审核完成无法推送!", MessageBoxIcon.Warning); + + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.designer.cs index 0289b609..0ba3452f 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManage.aspx.designer.cs @@ -86,6 +86,15 @@ namespace FineUIPro.Web.HSSE.CostGoods /// protected global::FineUIPro.Button btnNew; + /// + /// Button1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button Button1; + /// /// btnOut 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs index 10a014c6..942ea3d1 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageAudit.aspx.cs @@ -187,7 +187,7 @@ namespace FineUIPro.Web.HSSE.CostGoods ///
/// private void SaveData() - { + { var getCost = CostManageService.GetCostManageById(this.CostManageId); if (getCost != null) { @@ -227,7 +227,7 @@ namespace FineUIPro.Web.HSSE.CostGoods } PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } + } #endregion #region 附件上传 diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx index 34bce891..9c8b5f26 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx @@ -29,8 +29,10 @@ - - + <%-- + --%> + + @@ -39,8 +41,9 @@ - + + diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs index f85a854b..5f6ab11d 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.cs @@ -52,7 +52,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { this.btnClose.OnClientClick = ActiveWindow.GetHideRefreshReference(); this.ProjectId = this.CurrUser.LoginProjectId; - + BLL.ContractService.InitCompletedContractsDropDownList(this.ProjectId,this.drpContractNum); BLL.UnitService.InitUnitDropDownList(this.drpUnit, this.ProjectId, false); this.CostManageId = Request.Params["CostManageId"] ?? SQLHelper.GetNewID(); var costManage = BLL.CostManageService.GetCostManageById(this.CostManageId); @@ -68,7 +68,7 @@ namespace FineUIPro.Web.HSSE.CostGoods { this.drpUnit.SelectedValue = costManage.UnitId; } - this.txtContractNum.Text = costManage.ContractNum; + this.drpContractNum.SelectedValue = costManage.ContractNum; this.txtCostManageDate.Text = string.Format("{0:yyyy-MM-dd}", costManage.CostManageDate); } @@ -303,13 +303,17 @@ namespace FineUIPro.Web.HSSE.CostGoods { ProjectId = this.ProjectId, UnitId = this.drpUnit.SelectedValue == Const._Null ? null : this.drpUnit.SelectedValue, - ContractNum = this.txtContractNum.Text.Trim(), + ContractNum = this.drpContractNum.SelectedValue, CostManageDate = Funs.GetNewDateTime(this.txtCostManageDate.Text.Trim()), States = BLL.Const.State_0, CompileMan = this.CurrUser.PersonId, CompileDate = DateTime.Now, }; - + var costManageItems = CostManageItemService.GetCostManageItemByCostManageId(this.CostManageId); + if (costManageItems.Count ==0) + { + costManage.SumMoney = decimal.Parse(txtHseCost.Text.Trim()); + } if (type == Const.BtnSubmit) { costManage.States = BLL.Const.State_1; diff --git a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.designer.cs index 29d8b08a..eb84ce00 100644 --- a/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/CostGoods/CostManageEdit.aspx.designer.cs @@ -60,13 +60,13 @@ namespace FineUIPro.Web.HSSE.CostGoods protected global::FineUIPro.DropDownList drpUnit; /// - /// txtContractNum 控件。 + /// drpContractNum 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtContractNum; + protected global::FineUIPro.DropDownList drpContractNum; /// /// txtCostManageDate 控件。 @@ -95,6 +95,15 @@ namespace FineUIPro.Web.HSSE.CostGoods /// protected global::FineUIPro.TextBox txtGetCost; + /// + /// txtSumMoney 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSumMoney; + /// /// Grid1 控件。 /// diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index 9eccc8db..a5d4a3cd 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -17,6 +17,7 @@ + diff --git a/SGGL/Model/HSSE/PuPayCraftAmountInput.cs b/SGGL/Model/HSSE/PuPayCraftAmountInput.cs new file mode 100644 index 00000000..bfd31626 --- /dev/null +++ b/SGGL/Model/HSSE/PuPayCraftAmountInput.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + /// + /// pu推送安全费用模型 + /// + public class PuPayCraftAmountInput + { + public string projectId { get; set; } + public string contractNo { get; set; } + public string amountHSE { get; set; } + public PuPayCraftAmountFileInput[] files { get; set; } + } + /// + /// pu推送安全费用文件模型 + /// + public class PuPayCraftAmountFileInput + { + public string name { get; set; } + public string content { get; set; } + public string thisamount { get; set; } + public string date { get; set; } + } +} diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 9c9e67e6..43d2498c 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -686,6 +686,9 @@ namespace Model partial void InsertHJGL_PreWeldingDaily(HJGL_PreWeldingDaily instance); partial void UpdateHJGL_PreWeldingDaily(HJGL_PreWeldingDaily instance); partial void DeleteHJGL_PreWeldingDaily(HJGL_PreWeldingDaily instance); + partial void InsertHJGL_ProductionSchedulingPlan(HJGL_ProductionSchedulingPlan instance); + partial void UpdateHJGL_ProductionSchedulingPlan(HJGL_ProductionSchedulingPlan instance); + partial void DeleteHJGL_ProductionSchedulingPlan(HJGL_ProductionSchedulingPlan instance); partial void InsertHJGL_RepairRecord(HJGL_RepairRecord instance); partial void UpdateHJGL_RepairRecord(HJGL_RepairRecord instance); partial void DeleteHJGL_RepairRecord(HJGL_RepairRecord instance); @@ -3646,6 +3649,14 @@ namespace Model } } + public System.Data.Linq.Table HJGL_ProductionSchedulingPlan + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table HJGL_RepairRecord { get @@ -6846,6 +6857,14 @@ namespace Model } } + public System.Data.Linq.Table View_HJGL_ProductionSchedulingPlanStatistics + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table View_HJGL_WeldingTask { get @@ -24315,6 +24334,8 @@ namespace Model private EntitySet _HJGL_Pipeline; + private EntitySet _HJGL_ProductionSchedulingPlan; + private EntitySet _HJGL_RepairRecord; private EntitySet _HJGL_WeldJoint; @@ -24681,6 +24702,7 @@ namespace Model this._HJGL_MaterialManage = new EntitySet(new Action(this.attach_HJGL_MaterialManage), new Action(this.detach_HJGL_MaterialManage)); this._HJGL_PC_PurgingCleaning = new EntitySet(new Action(this.attach_HJGL_PC_PurgingCleaning), new Action(this.detach_HJGL_PC_PurgingCleaning)); this._HJGL_Pipeline = new EntitySet(new Action(this.attach_HJGL_Pipeline), new Action(this.detach_HJGL_Pipeline)); + this._HJGL_ProductionSchedulingPlan = new EntitySet(new Action(this.attach_HJGL_ProductionSchedulingPlan), new Action(this.detach_HJGL_ProductionSchedulingPlan)); this._HJGL_RepairRecord = new EntitySet(new Action(this.attach_HJGL_RepairRecord), new Action(this.detach_HJGL_RepairRecord)); this._HJGL_WeldJoint = new EntitySet(new Action(this.attach_HJGL_WeldJoint), new Action(this.detach_HJGL_WeldJoint)); this._HJGL_HotProess_Trust = new EntitySet(new Action(this.attach_HJGL_HotProess_Trust), new Action(this.detach_HJGL_HotProess_Trust)); @@ -26252,6 +26274,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_ProductionSchedulingPlan_Base_Project", Storage="_HJGL_ProductionSchedulingPlan", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet HJGL_ProductionSchedulingPlan + { + get + { + return this._HJGL_ProductionSchedulingPlan; + } + set + { + this._HJGL_ProductionSchedulingPlan.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_RepairRecord_Base_Project", Storage="_HJGL_RepairRecord", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet HJGL_RepairRecord { @@ -28502,6 +28537,18 @@ namespace Model entity.Base_Project = null; } + private void attach_HJGL_ProductionSchedulingPlan(HJGL_ProductionSchedulingPlan entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_HJGL_ProductionSchedulingPlan(HJGL_ProductionSchedulingPlan entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_HJGL_RepairRecord(HJGL_RepairRecord entity) { this.SendPropertyChanging(); @@ -64067,6 +64114,44 @@ namespace Model private System.Nullable _CreateDate; + private System.Nullable _EquipmentInspectionNum; + + private System.Nullable _EquipmentInspectionQualifiedNum; + + private System.Nullable _MachineInspectionNum; + + private System.Nullable _MachineInspectionQualifiedNum; + + private System.Nullable _PersonInspectionNum; + + private System.Nullable _PersonInspectionQualifiedNum; + + private System.Nullable _MaterialInspectionNum; + + private System.Nullable _MaterialInspectionQualifiedNum; + + private System.Nullable _ConstructSolutionNum; + + private System.Nullable _ConstructSolutionProjectApproveNum; + + private System.Nullable _ConstructSolutionUnitApproveNum; + + private System.Nullable _SpecialEquipmentQualityAssuranceSystemNum; + + private System.Nullable _DesignDetailsNum; + + private System.Nullable _UnitProjectAcceptNum; + + private System.Nullable _UnitProjectAcceptOKNum; + + private System.Nullable _SubProjectAcceptNum; + + private System.Nullable _SubProjectAcceptOKNum; + + private System.Nullable _SubdivisionalWorksAcceptNum; + + private System.Nullable _SubdivisionalWorksAcceptOKNum; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -64145,6 +64230,44 @@ namespace Model partial void OnCreateManChanged(); partial void OnCreateDateChanging(System.Nullable value); partial void OnCreateDateChanged(); + partial void OnEquipmentInspectionNumChanging(System.Nullable value); + partial void OnEquipmentInspectionNumChanged(); + partial void OnEquipmentInspectionQualifiedNumChanging(System.Nullable value); + partial void OnEquipmentInspectionQualifiedNumChanged(); + partial void OnMachineInspectionNumChanging(System.Nullable value); + partial void OnMachineInspectionNumChanged(); + partial void OnMachineInspectionQualifiedNumChanging(System.Nullable value); + partial void OnMachineInspectionQualifiedNumChanged(); + partial void OnPersonInspectionNumChanging(System.Nullable value); + partial void OnPersonInspectionNumChanged(); + partial void OnPersonInspectionQualifiedNumChanging(System.Nullable value); + partial void OnPersonInspectionQualifiedNumChanged(); + partial void OnMaterialInspectionNumChanging(System.Nullable value); + partial void OnMaterialInspectionNumChanged(); + partial void OnMaterialInspectionQualifiedNumChanging(System.Nullable value); + partial void OnMaterialInspectionQualifiedNumChanged(); + partial void OnConstructSolutionNumChanging(System.Nullable value); + partial void OnConstructSolutionNumChanged(); + partial void OnConstructSolutionProjectApproveNumChanging(System.Nullable value); + partial void OnConstructSolutionProjectApproveNumChanged(); + partial void OnConstructSolutionUnitApproveNumChanging(System.Nullable value); + partial void OnConstructSolutionUnitApproveNumChanged(); + partial void OnSpecialEquipmentQualityAssuranceSystemNumChanging(System.Nullable value); + partial void OnSpecialEquipmentQualityAssuranceSystemNumChanged(); + partial void OnDesignDetailsNumChanging(System.Nullable value); + partial void OnDesignDetailsNumChanged(); + partial void OnUnitProjectAcceptNumChanging(System.Nullable value); + partial void OnUnitProjectAcceptNumChanged(); + partial void OnUnitProjectAcceptOKNumChanging(System.Nullable value); + partial void OnUnitProjectAcceptOKNumChanged(); + partial void OnSubProjectAcceptNumChanging(System.Nullable value); + partial void OnSubProjectAcceptNumChanged(); + partial void OnSubProjectAcceptOKNumChanging(System.Nullable value); + partial void OnSubProjectAcceptOKNumChanged(); + partial void OnSubdivisionalWorksAcceptNumChanging(System.Nullable value); + partial void OnSubdivisionalWorksAcceptNumChanged(); + partial void OnSubdivisionalWorksAcceptOKNumChanging(System.Nullable value); + partial void OnSubdivisionalWorksAcceptOKNumChanged(); #endregion public CQMSData_CQMS() @@ -64892,6 +65015,386 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentInspectionNum", DbType="Int")] + public System.Nullable EquipmentInspectionNum + { + get + { + return this._EquipmentInspectionNum; + } + set + { + if ((this._EquipmentInspectionNum != value)) + { + this.OnEquipmentInspectionNumChanging(value); + this.SendPropertyChanging(); + this._EquipmentInspectionNum = value; + this.SendPropertyChanged("EquipmentInspectionNum"); + this.OnEquipmentInspectionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentInspectionQualifiedNum", DbType="Int")] + public System.Nullable EquipmentInspectionQualifiedNum + { + get + { + return this._EquipmentInspectionQualifiedNum; + } + set + { + if ((this._EquipmentInspectionQualifiedNum != value)) + { + this.OnEquipmentInspectionQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._EquipmentInspectionQualifiedNum = value; + this.SendPropertyChanged("EquipmentInspectionQualifiedNum"); + this.OnEquipmentInspectionQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MachineInspectionNum", DbType="Int")] + public System.Nullable MachineInspectionNum + { + get + { + return this._MachineInspectionNum; + } + set + { + if ((this._MachineInspectionNum != value)) + { + this.OnMachineInspectionNumChanging(value); + this.SendPropertyChanging(); + this._MachineInspectionNum = value; + this.SendPropertyChanged("MachineInspectionNum"); + this.OnMachineInspectionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MachineInspectionQualifiedNum", DbType="Int")] + public System.Nullable MachineInspectionQualifiedNum + { + get + { + return this._MachineInspectionQualifiedNum; + } + set + { + if ((this._MachineInspectionQualifiedNum != value)) + { + this.OnMachineInspectionQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._MachineInspectionQualifiedNum = value; + this.SendPropertyChanged("MachineInspectionQualifiedNum"); + this.OnMachineInspectionQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonInspectionNum", DbType="Int")] + public System.Nullable PersonInspectionNum + { + get + { + return this._PersonInspectionNum; + } + set + { + if ((this._PersonInspectionNum != value)) + { + this.OnPersonInspectionNumChanging(value); + this.SendPropertyChanging(); + this._PersonInspectionNum = value; + this.SendPropertyChanged("PersonInspectionNum"); + this.OnPersonInspectionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonInspectionQualifiedNum", DbType="Int")] + public System.Nullable PersonInspectionQualifiedNum + { + get + { + return this._PersonInspectionQualifiedNum; + } + set + { + if ((this._PersonInspectionQualifiedNum != value)) + { + this.OnPersonInspectionQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._PersonInspectionQualifiedNum = value; + this.SendPropertyChanged("PersonInspectionQualifiedNum"); + this.OnPersonInspectionQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialInspectionNum", DbType="Int")] + public System.Nullable MaterialInspectionNum + { + get + { + return this._MaterialInspectionNum; + } + set + { + if ((this._MaterialInspectionNum != value)) + { + this.OnMaterialInspectionNumChanging(value); + this.SendPropertyChanging(); + this._MaterialInspectionNum = value; + this.SendPropertyChanged("MaterialInspectionNum"); + this.OnMaterialInspectionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialInspectionQualifiedNum", DbType="Int")] + public System.Nullable MaterialInspectionQualifiedNum + { + get + { + return this._MaterialInspectionQualifiedNum; + } + set + { + if ((this._MaterialInspectionQualifiedNum != value)) + { + this.OnMaterialInspectionQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._MaterialInspectionQualifiedNum = value; + this.SendPropertyChanged("MaterialInspectionQualifiedNum"); + this.OnMaterialInspectionQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionNum", DbType="Int")] + public System.Nullable ConstructSolutionNum + { + get + { + return this._ConstructSolutionNum; + } + set + { + if ((this._ConstructSolutionNum != value)) + { + this.OnConstructSolutionNumChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionNum = value; + this.SendPropertyChanged("ConstructSolutionNum"); + this.OnConstructSolutionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionProjectApproveNum", DbType="Int")] + public System.Nullable ConstructSolutionProjectApproveNum + { + get + { + return this._ConstructSolutionProjectApproveNum; + } + set + { + if ((this._ConstructSolutionProjectApproveNum != value)) + { + this.OnConstructSolutionProjectApproveNumChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionProjectApproveNum = value; + this.SendPropertyChanged("ConstructSolutionProjectApproveNum"); + this.OnConstructSolutionProjectApproveNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionUnitApproveNum", DbType="Int")] + public System.Nullable ConstructSolutionUnitApproveNum + { + get + { + return this._ConstructSolutionUnitApproveNum; + } + set + { + if ((this._ConstructSolutionUnitApproveNum != value)) + { + this.OnConstructSolutionUnitApproveNumChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionUnitApproveNum = value; + this.SendPropertyChanged("ConstructSolutionUnitApproveNum"); + this.OnConstructSolutionUnitApproveNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialEquipmentQualityAssuranceSystemNum", DbType="Int")] + public System.Nullable SpecialEquipmentQualityAssuranceSystemNum + { + get + { + return this._SpecialEquipmentQualityAssuranceSystemNum; + } + set + { + if ((this._SpecialEquipmentQualityAssuranceSystemNum != value)) + { + this.OnSpecialEquipmentQualityAssuranceSystemNumChanging(value); + this.SendPropertyChanging(); + this._SpecialEquipmentQualityAssuranceSystemNum = value; + this.SendPropertyChanged("SpecialEquipmentQualityAssuranceSystemNum"); + this.OnSpecialEquipmentQualityAssuranceSystemNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDetailsNum", DbType="Int")] + public System.Nullable DesignDetailsNum + { + get + { + return this._DesignDetailsNum; + } + set + { + if ((this._DesignDetailsNum != value)) + { + this.OnDesignDetailsNumChanging(value); + this.SendPropertyChanging(); + this._DesignDetailsNum = value; + this.SendPropertyChanged("DesignDetailsNum"); + this.OnDesignDetailsNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitProjectAcceptNum", DbType="Int")] + public System.Nullable UnitProjectAcceptNum + { + get + { + return this._UnitProjectAcceptNum; + } + set + { + if ((this._UnitProjectAcceptNum != value)) + { + this.OnUnitProjectAcceptNumChanging(value); + this.SendPropertyChanging(); + this._UnitProjectAcceptNum = value; + this.SendPropertyChanged("UnitProjectAcceptNum"); + this.OnUnitProjectAcceptNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitProjectAcceptOKNum", DbType="Int")] + public System.Nullable UnitProjectAcceptOKNum + { + get + { + return this._UnitProjectAcceptOKNum; + } + set + { + if ((this._UnitProjectAcceptOKNum != value)) + { + this.OnUnitProjectAcceptOKNumChanging(value); + this.SendPropertyChanging(); + this._UnitProjectAcceptOKNum = value; + this.SendPropertyChanged("UnitProjectAcceptOKNum"); + this.OnUnitProjectAcceptOKNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubProjectAcceptNum", DbType="Int")] + public System.Nullable SubProjectAcceptNum + { + get + { + return this._SubProjectAcceptNum; + } + set + { + if ((this._SubProjectAcceptNum != value)) + { + this.OnSubProjectAcceptNumChanging(value); + this.SendPropertyChanging(); + this._SubProjectAcceptNum = value; + this.SendPropertyChanged("SubProjectAcceptNum"); + this.OnSubProjectAcceptNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubProjectAcceptOKNum", DbType="Int")] + public System.Nullable SubProjectAcceptOKNum + { + get + { + return this._SubProjectAcceptOKNum; + } + set + { + if ((this._SubProjectAcceptOKNum != value)) + { + this.OnSubProjectAcceptOKNumChanging(value); + this.SendPropertyChanging(); + this._SubProjectAcceptOKNum = value; + this.SendPropertyChanged("SubProjectAcceptOKNum"); + this.OnSubProjectAcceptOKNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubdivisionalWorksAcceptNum", DbType="Int")] + public System.Nullable SubdivisionalWorksAcceptNum + { + get + { + return this._SubdivisionalWorksAcceptNum; + } + set + { + if ((this._SubdivisionalWorksAcceptNum != value)) + { + this.OnSubdivisionalWorksAcceptNumChanging(value); + this.SendPropertyChanging(); + this._SubdivisionalWorksAcceptNum = value; + this.SendPropertyChanged("SubdivisionalWorksAcceptNum"); + this.OnSubdivisionalWorksAcceptNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubdivisionalWorksAcceptOKNum", DbType="Int")] + public System.Nullable SubdivisionalWorksAcceptOKNum + { + get + { + return this._SubdivisionalWorksAcceptOKNum; + } + set + { + if ((this._SubdivisionalWorksAcceptOKNum != value)) + { + this.OnSubdivisionalWorksAcceptOKNumChanging(value); + this.SendPropertyChanging(); + this._SubdivisionalWorksAcceptOKNum = value; + this.SendPropertyChanged("SubdivisionalWorksAcceptOKNum"); + this.OnSubdivisionalWorksAcceptOKNumChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -97327,6 +97830,8 @@ namespace Model private EntitySet _HJGL_PipeLineMat; + private EntitySet _HJGL_ProductionSchedulingPlan; + private EntitySet _HJGL_WeldJoint; private EntitySet _PTP_BItemEndCheck; @@ -97422,6 +97927,7 @@ namespace Model this._HJGL_Pipeline_Component = new EntitySet(new Action(this.attach_HJGL_Pipeline_Component), new Action(this.detach_HJGL_Pipeline_Component)); this._WBS_UnitWork = default(EntityRef); this._HJGL_PipeLineMat = new EntitySet(new Action(this.attach_HJGL_PipeLineMat), new Action(this.detach_HJGL_PipeLineMat)); + this._HJGL_ProductionSchedulingPlan = new EntitySet(new Action(this.attach_HJGL_ProductionSchedulingPlan), new Action(this.detach_HJGL_ProductionSchedulingPlan)); this._HJGL_WeldJoint = new EntitySet(new Action(this.attach_HJGL_WeldJoint), new Action(this.detach_HJGL_WeldJoint)); this._PTP_BItemEndCheck = new EntitySet(new Action(this.attach_PTP_BItemEndCheck), new Action(this.detach_PTP_BItemEndCheck)); this._PTP_ItemEndCheck = new EntitySet(new Action(this.attach_PTP_ItemEndCheck), new Action(this.detach_PTP_ItemEndCheck)); @@ -98458,6 +98964,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_ProductionSchedulingPlan_HJGL_Pipeline", Storage="_HJGL_ProductionSchedulingPlan", ThisKey="PipelineId", OtherKey="PipelineId", DeleteRule="NO ACTION")] + public EntitySet HJGL_ProductionSchedulingPlan + { + get + { + return this._HJGL_ProductionSchedulingPlan; + } + set + { + this._HJGL_ProductionSchedulingPlan.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_WeldJoint_HJGL_Pipeline", Storage="_HJGL_WeldJoint", ThisKey="PipelineId", OtherKey="PipelineId", DeleteRule="NO ACTION")] public EntitySet HJGL_WeldJoint { @@ -98590,6 +99109,18 @@ namespace Model entity.HJGL_Pipeline = null; } + private void attach_HJGL_ProductionSchedulingPlan(HJGL_ProductionSchedulingPlan entity) + { + this.SendPropertyChanging(); + entity.HJGL_Pipeline = this; + } + + private void detach_HJGL_ProductionSchedulingPlan(HJGL_ProductionSchedulingPlan entity) + { + this.SendPropertyChanging(); + entity.HJGL_Pipeline = null; + } + private void attach_HJGL_WeldJoint(HJGL_WeldJoint entity) { this.SendPropertyChanging(); @@ -99970,6 +100501,486 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_ProductionSchedulingPlan")] + public partial class HJGL_ProductionSchedulingPlan : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _ProductionSchedulingPlanId; + + private string _ProjectId; + + private string _PipelineId; + + private string _FlowNum; + + private string _MainItemName; + + private string _Material; + + private string _Caliber; + + private System.Nullable _Dain; + + private System.Nullable _TotalDyne; + + private string _TotalPriority; + + private System.Nullable _PriorityTotalDyne; + + private System.Nullable _PlanStartDate; + + private System.Nullable _PlanEndDate; + + private System.Nullable _Days; + + private System.Nullable _AvgDailyWorkload; + + private EntityRef _Base_Project; + + private EntityRef _HJGL_Pipeline; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnProductionSchedulingPlanIdChanging(string value); + partial void OnProductionSchedulingPlanIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnPipelineIdChanging(string value); + partial void OnPipelineIdChanged(); + partial void OnFlowNumChanging(string value); + partial void OnFlowNumChanged(); + partial void OnMainItemNameChanging(string value); + partial void OnMainItemNameChanged(); + partial void OnMaterialChanging(string value); + partial void OnMaterialChanged(); + partial void OnCaliberChanging(string value); + partial void OnCaliberChanged(); + partial void OnDainChanging(System.Nullable value); + partial void OnDainChanged(); + partial void OnTotalDyneChanging(System.Nullable value); + partial void OnTotalDyneChanged(); + partial void OnTotalPriorityChanging(string value); + partial void OnTotalPriorityChanged(); + partial void OnPriorityTotalDyneChanging(System.Nullable value); + partial void OnPriorityTotalDyneChanged(); + partial void OnPlanStartDateChanging(System.Nullable value); + partial void OnPlanStartDateChanged(); + partial void OnPlanEndDateChanging(System.Nullable value); + partial void OnPlanEndDateChanged(); + partial void OnDaysChanging(System.Nullable value); + partial void OnDaysChanged(); + partial void OnAvgDailyWorkloadChanging(System.Nullable value); + partial void OnAvgDailyWorkloadChanged(); + #endregion + + public HJGL_ProductionSchedulingPlan() + { + this._Base_Project = default(EntityRef); + this._HJGL_Pipeline = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProductionSchedulingPlanId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string ProductionSchedulingPlanId + { + get + { + return this._ProductionSchedulingPlanId; + } + set + { + if ((this._ProductionSchedulingPlanId != value)) + { + this.OnProductionSchedulingPlanIdChanging(value); + this.SendPropertyChanging(); + this._ProductionSchedulingPlanId = value; + this.SendPropertyChanged("ProductionSchedulingPlanId"); + this.OnProductionSchedulingPlanIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PipelineId", DbType="NVarChar(50)")] + public string PipelineId + { + get + { + return this._PipelineId; + } + set + { + if ((this._PipelineId != value)) + { + if (this._HJGL_Pipeline.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnPipelineIdChanging(value); + this.SendPropertyChanging(); + this._PipelineId = value; + this.SendPropertyChanged("PipelineId"); + this.OnPipelineIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FlowNum", DbType="NVarChar(50)")] + public string FlowNum + { + get + { + return this._FlowNum; + } + set + { + if ((this._FlowNum != value)) + { + this.OnFlowNumChanging(value); + this.SendPropertyChanging(); + this._FlowNum = value; + this.SendPropertyChanged("FlowNum"); + this.OnFlowNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainItemName", DbType="NVarChar(50)")] + public string MainItemName + { + get + { + return this._MainItemName; + } + set + { + if ((this._MainItemName != value)) + { + this.OnMainItemNameChanging(value); + this.SendPropertyChanging(); + this._MainItemName = value; + this.SendPropertyChanged("MainItemName"); + this.OnMainItemNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="NVarChar(50)")] + public string Material + { + get + { + return this._Material; + } + set + { + if ((this._Material != value)) + { + this.OnMaterialChanging(value); + this.SendPropertyChanging(); + this._Material = value; + this.SendPropertyChanged("Material"); + this.OnMaterialChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Caliber", DbType="NVarChar(50)")] + public string Caliber + { + get + { + return this._Caliber; + } + set + { + if ((this._Caliber != value)) + { + this.OnCaliberChanging(value); + this.SendPropertyChanging(); + this._Caliber = value; + this.SendPropertyChanged("Caliber"); + this.OnCaliberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Dain", DbType="Decimal(18,2)")] + public System.Nullable Dain + { + get + { + return this._Dain; + } + set + { + if ((this._Dain != value)) + { + this.OnDainChanging(value); + this.SendPropertyChanging(); + this._Dain = value; + this.SendPropertyChanged("Dain"); + this.OnDainChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalDyne", DbType="Decimal(18,2)")] + public System.Nullable TotalDyne + { + get + { + return this._TotalDyne; + } + set + { + if ((this._TotalDyne != value)) + { + this.OnTotalDyneChanging(value); + this.SendPropertyChanging(); + this._TotalDyne = value; + this.SendPropertyChanged("TotalDyne"); + this.OnTotalDyneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalPriority", DbType="NVarChar(50)")] + public string TotalPriority + { + get + { + return this._TotalPriority; + } + set + { + if ((this._TotalPriority != value)) + { + this.OnTotalPriorityChanging(value); + this.SendPropertyChanging(); + this._TotalPriority = value; + this.SendPropertyChanged("TotalPriority"); + this.OnTotalPriorityChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PriorityTotalDyne", DbType="Decimal(18,2)")] + public System.Nullable PriorityTotalDyne + { + get + { + return this._PriorityTotalDyne; + } + set + { + if ((this._PriorityTotalDyne != value)) + { + this.OnPriorityTotalDyneChanging(value); + this.SendPropertyChanging(); + this._PriorityTotalDyne = value; + this.SendPropertyChanged("PriorityTotalDyne"); + this.OnPriorityTotalDyneChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanStartDate", DbType="DateTime")] + public System.Nullable PlanStartDate + { + get + { + return this._PlanStartDate; + } + set + { + if ((this._PlanStartDate != value)) + { + this.OnPlanStartDateChanging(value); + this.SendPropertyChanging(); + this._PlanStartDate = value; + this.SendPropertyChanged("PlanStartDate"); + this.OnPlanStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanEndDate", DbType="DateTime")] + public System.Nullable PlanEndDate + { + get + { + return this._PlanEndDate; + } + set + { + if ((this._PlanEndDate != value)) + { + this.OnPlanEndDateChanging(value); + this.SendPropertyChanging(); + this._PlanEndDate = value; + this.SendPropertyChanged("PlanEndDate"); + this.OnPlanEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Days", DbType="Int")] + public System.Nullable Days + { + get + { + return this._Days; + } + set + { + if ((this._Days != value)) + { + this.OnDaysChanging(value); + this.SendPropertyChanging(); + this._Days = value; + this.SendPropertyChanged("Days"); + this.OnDaysChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AvgDailyWorkload", DbType="Decimal(18,2)")] + public System.Nullable AvgDailyWorkload + { + get + { + return this._AvgDailyWorkload; + } + set + { + if ((this._AvgDailyWorkload != value)) + { + this.OnAvgDailyWorkloadChanging(value); + this.SendPropertyChanging(); + this._AvgDailyWorkload = value; + this.SendPropertyChanged("AvgDailyWorkload"); + this.OnAvgDailyWorkloadChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_ProductionSchedulingPlan_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.HJGL_ProductionSchedulingPlan.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.HJGL_ProductionSchedulingPlan.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_ProductionSchedulingPlan_HJGL_Pipeline", Storage="_HJGL_Pipeline", ThisKey="PipelineId", OtherKey="PipelineId", IsForeignKey=true)] + public HJGL_Pipeline HJGL_Pipeline + { + get + { + return this._HJGL_Pipeline.Entity; + } + set + { + HJGL_Pipeline previousValue = this._HJGL_Pipeline.Entity; + if (((previousValue != value) + || (this._HJGL_Pipeline.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._HJGL_Pipeline.Entity = null; + previousValue.HJGL_ProductionSchedulingPlan.Remove(this); + } + this._HJGL_Pipeline.Entity = value; + if ((value != null)) + { + value.HJGL_ProductionSchedulingPlan.Add(this); + this._PipelineId = value.PipelineId; + } + else + { + this._PipelineId = default(string); + } + this.SendPropertyChanged("HJGL_Pipeline"); + } + } + } + + 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.HJGL_RepairRecord")] public partial class HJGL_RepairRecord : INotifyPropertyChanging, INotifyPropertyChanged { @@ -199731,6 +200742,44 @@ namespace Model private System.Nullable _InspectionLotNum; + private System.Nullable _EquipmentInspectionNum; + + private System.Nullable _EquipmentInspectionQualifiedNum; + + private System.Nullable _MachineInspectionNum; + + private System.Nullable _MachineInspectionQualifiedNum; + + private System.Nullable _PersonInspectionNum; + + private System.Nullable _PersonInspectionQualifiedNum; + + private System.Nullable _MaterialInspectionNum; + + private System.Nullable _MaterialInspectionQualifiedNum; + + private System.Nullable _ConstructSolutionNum; + + private System.Nullable _ConstructSolutionProjectApproveNum; + + private System.Nullable _ConstructSolutionUnitApproveNum; + + private System.Nullable _SpecialEquipmentQualityAssuranceSystemNum; + + private System.Nullable _DesignDetailsNum; + + private System.Nullable _UnitProjectAcceptNum; + + private System.Nullable _UnitProjectAcceptOKNum; + + private System.Nullable _SubProjectAcceptNum; + + private System.Nullable _SubProjectAcceptOKNum; + + private System.Nullable _SubdivisionalWorksAcceptNum; + + private System.Nullable _SubdivisionalWorksAcceptOKNum; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -199805,6 +200854,44 @@ namespace Model partial void OnSubdivisionalWorksNumChanged(); partial void OnInspectionLotNumChanging(System.Nullable value); partial void OnInspectionLotNumChanged(); + partial void OnEquipmentInspectionNumChanging(System.Nullable value); + partial void OnEquipmentInspectionNumChanged(); + partial void OnEquipmentInspectionQualifiedNumChanging(System.Nullable value); + partial void OnEquipmentInspectionQualifiedNumChanged(); + partial void OnMachineInspectionNumChanging(System.Nullable value); + partial void OnMachineInspectionNumChanged(); + partial void OnMachineInspectionQualifiedNumChanging(System.Nullable value); + partial void OnMachineInspectionQualifiedNumChanged(); + partial void OnPersonInspectionNumChanging(System.Nullable value); + partial void OnPersonInspectionNumChanged(); + partial void OnPersonInspectionQualifiedNumChanging(System.Nullable value); + partial void OnPersonInspectionQualifiedNumChanged(); + partial void OnMaterialInspectionNumChanging(System.Nullable value); + partial void OnMaterialInspectionNumChanged(); + partial void OnMaterialInspectionQualifiedNumChanging(System.Nullable value); + partial void OnMaterialInspectionQualifiedNumChanged(); + partial void OnConstructSolutionNumChanging(System.Nullable value); + partial void OnConstructSolutionNumChanged(); + partial void OnConstructSolutionProjectApproveNumChanging(System.Nullable value); + partial void OnConstructSolutionProjectApproveNumChanged(); + partial void OnConstructSolutionUnitApproveNumChanging(System.Nullable value); + partial void OnConstructSolutionUnitApproveNumChanged(); + partial void OnSpecialEquipmentQualityAssuranceSystemNumChanging(System.Nullable value); + partial void OnSpecialEquipmentQualityAssuranceSystemNumChanged(); + partial void OnDesignDetailsNumChanging(System.Nullable value); + partial void OnDesignDetailsNumChanged(); + partial void OnUnitProjectAcceptNumChanging(System.Nullable value); + partial void OnUnitProjectAcceptNumChanged(); + partial void OnUnitProjectAcceptOKNumChanging(System.Nullable value); + partial void OnUnitProjectAcceptOKNumChanged(); + partial void OnSubProjectAcceptNumChanging(System.Nullable value); + partial void OnSubProjectAcceptNumChanged(); + partial void OnSubProjectAcceptOKNumChanging(System.Nullable value); + partial void OnSubProjectAcceptOKNumChanged(); + partial void OnSubdivisionalWorksAcceptNumChanging(System.Nullable value); + partial void OnSubdivisionalWorksAcceptNumChanged(); + partial void OnSubdivisionalWorksAcceptOKNumChanging(System.Nullable value); + partial void OnSubdivisionalWorksAcceptOKNumChanged(); #endregion public Project_CQMSData_CQMS() @@ -200512,6 +201599,386 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentInspectionNum", DbType="Int")] + public System.Nullable EquipmentInspectionNum + { + get + { + return this._EquipmentInspectionNum; + } + set + { + if ((this._EquipmentInspectionNum != value)) + { + this.OnEquipmentInspectionNumChanging(value); + this.SendPropertyChanging(); + this._EquipmentInspectionNum = value; + this.SendPropertyChanged("EquipmentInspectionNum"); + this.OnEquipmentInspectionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EquipmentInspectionQualifiedNum", DbType="Int")] + public System.Nullable EquipmentInspectionQualifiedNum + { + get + { + return this._EquipmentInspectionQualifiedNum; + } + set + { + if ((this._EquipmentInspectionQualifiedNum != value)) + { + this.OnEquipmentInspectionQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._EquipmentInspectionQualifiedNum = value; + this.SendPropertyChanged("EquipmentInspectionQualifiedNum"); + this.OnEquipmentInspectionQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MachineInspectionNum", DbType="Int")] + public System.Nullable MachineInspectionNum + { + get + { + return this._MachineInspectionNum; + } + set + { + if ((this._MachineInspectionNum != value)) + { + this.OnMachineInspectionNumChanging(value); + this.SendPropertyChanging(); + this._MachineInspectionNum = value; + this.SendPropertyChanged("MachineInspectionNum"); + this.OnMachineInspectionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MachineInspectionQualifiedNum", DbType="Int")] + public System.Nullable MachineInspectionQualifiedNum + { + get + { + return this._MachineInspectionQualifiedNum; + } + set + { + if ((this._MachineInspectionQualifiedNum != value)) + { + this.OnMachineInspectionQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._MachineInspectionQualifiedNum = value; + this.SendPropertyChanged("MachineInspectionQualifiedNum"); + this.OnMachineInspectionQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonInspectionNum", DbType="Int")] + public System.Nullable PersonInspectionNum + { + get + { + return this._PersonInspectionNum; + } + set + { + if ((this._PersonInspectionNum != value)) + { + this.OnPersonInspectionNumChanging(value); + this.SendPropertyChanging(); + this._PersonInspectionNum = value; + this.SendPropertyChanged("PersonInspectionNum"); + this.OnPersonInspectionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonInspectionQualifiedNum", DbType="Int")] + public System.Nullable PersonInspectionQualifiedNum + { + get + { + return this._PersonInspectionQualifiedNum; + } + set + { + if ((this._PersonInspectionQualifiedNum != value)) + { + this.OnPersonInspectionQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._PersonInspectionQualifiedNum = value; + this.SendPropertyChanged("PersonInspectionQualifiedNum"); + this.OnPersonInspectionQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialInspectionNum", DbType="Int")] + public System.Nullable MaterialInspectionNum + { + get + { + return this._MaterialInspectionNum; + } + set + { + if ((this._MaterialInspectionNum != value)) + { + this.OnMaterialInspectionNumChanging(value); + this.SendPropertyChanging(); + this._MaterialInspectionNum = value; + this.SendPropertyChanged("MaterialInspectionNum"); + this.OnMaterialInspectionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialInspectionQualifiedNum", DbType="Int")] + public System.Nullable MaterialInspectionQualifiedNum + { + get + { + return this._MaterialInspectionQualifiedNum; + } + set + { + if ((this._MaterialInspectionQualifiedNum != value)) + { + this.OnMaterialInspectionQualifiedNumChanging(value); + this.SendPropertyChanging(); + this._MaterialInspectionQualifiedNum = value; + this.SendPropertyChanged("MaterialInspectionQualifiedNum"); + this.OnMaterialInspectionQualifiedNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionNum", DbType="Int")] + public System.Nullable ConstructSolutionNum + { + get + { + return this._ConstructSolutionNum; + } + set + { + if ((this._ConstructSolutionNum != value)) + { + this.OnConstructSolutionNumChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionNum = value; + this.SendPropertyChanged("ConstructSolutionNum"); + this.OnConstructSolutionNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionProjectApproveNum", DbType="Int")] + public System.Nullable ConstructSolutionProjectApproveNum + { + get + { + return this._ConstructSolutionProjectApproveNum; + } + set + { + if ((this._ConstructSolutionProjectApproveNum != value)) + { + this.OnConstructSolutionProjectApproveNumChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionProjectApproveNum = value; + this.SendPropertyChanged("ConstructSolutionProjectApproveNum"); + this.OnConstructSolutionProjectApproveNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructSolutionUnitApproveNum", DbType="Int")] + public System.Nullable ConstructSolutionUnitApproveNum + { + get + { + return this._ConstructSolutionUnitApproveNum; + } + set + { + if ((this._ConstructSolutionUnitApproveNum != value)) + { + this.OnConstructSolutionUnitApproveNumChanging(value); + this.SendPropertyChanging(); + this._ConstructSolutionUnitApproveNum = value; + this.SendPropertyChanged("ConstructSolutionUnitApproveNum"); + this.OnConstructSolutionUnitApproveNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialEquipmentQualityAssuranceSystemNum", DbType="Int")] + public System.Nullable SpecialEquipmentQualityAssuranceSystemNum + { + get + { + return this._SpecialEquipmentQualityAssuranceSystemNum; + } + set + { + if ((this._SpecialEquipmentQualityAssuranceSystemNum != value)) + { + this.OnSpecialEquipmentQualityAssuranceSystemNumChanging(value); + this.SendPropertyChanging(); + this._SpecialEquipmentQualityAssuranceSystemNum = value; + this.SendPropertyChanged("SpecialEquipmentQualityAssuranceSystemNum"); + this.OnSpecialEquipmentQualityAssuranceSystemNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDetailsNum", DbType="Int")] + public System.Nullable DesignDetailsNum + { + get + { + return this._DesignDetailsNum; + } + set + { + if ((this._DesignDetailsNum != value)) + { + this.OnDesignDetailsNumChanging(value); + this.SendPropertyChanging(); + this._DesignDetailsNum = value; + this.SendPropertyChanged("DesignDetailsNum"); + this.OnDesignDetailsNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitProjectAcceptNum", DbType="Int")] + public System.Nullable UnitProjectAcceptNum + { + get + { + return this._UnitProjectAcceptNum; + } + set + { + if ((this._UnitProjectAcceptNum != value)) + { + this.OnUnitProjectAcceptNumChanging(value); + this.SendPropertyChanging(); + this._UnitProjectAcceptNum = value; + this.SendPropertyChanged("UnitProjectAcceptNum"); + this.OnUnitProjectAcceptNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitProjectAcceptOKNum", DbType="Int")] + public System.Nullable UnitProjectAcceptOKNum + { + get + { + return this._UnitProjectAcceptOKNum; + } + set + { + if ((this._UnitProjectAcceptOKNum != value)) + { + this.OnUnitProjectAcceptOKNumChanging(value); + this.SendPropertyChanging(); + this._UnitProjectAcceptOKNum = value; + this.SendPropertyChanged("UnitProjectAcceptOKNum"); + this.OnUnitProjectAcceptOKNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubProjectAcceptNum", DbType="Int")] + public System.Nullable SubProjectAcceptNum + { + get + { + return this._SubProjectAcceptNum; + } + set + { + if ((this._SubProjectAcceptNum != value)) + { + this.OnSubProjectAcceptNumChanging(value); + this.SendPropertyChanging(); + this._SubProjectAcceptNum = value; + this.SendPropertyChanged("SubProjectAcceptNum"); + this.OnSubProjectAcceptNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubProjectAcceptOKNum", DbType="Int")] + public System.Nullable SubProjectAcceptOKNum + { + get + { + return this._SubProjectAcceptOKNum; + } + set + { + if ((this._SubProjectAcceptOKNum != value)) + { + this.OnSubProjectAcceptOKNumChanging(value); + this.SendPropertyChanging(); + this._SubProjectAcceptOKNum = value; + this.SendPropertyChanged("SubProjectAcceptOKNum"); + this.OnSubProjectAcceptOKNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubdivisionalWorksAcceptNum", DbType="Int")] + public System.Nullable SubdivisionalWorksAcceptNum + { + get + { + return this._SubdivisionalWorksAcceptNum; + } + set + { + if ((this._SubdivisionalWorksAcceptNum != value)) + { + this.OnSubdivisionalWorksAcceptNumChanging(value); + this.SendPropertyChanging(); + this._SubdivisionalWorksAcceptNum = value; + this.SendPropertyChanged("SubdivisionalWorksAcceptNum"); + this.OnSubdivisionalWorksAcceptNumChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubdivisionalWorksAcceptOKNum", DbType="Int")] + public System.Nullable SubdivisionalWorksAcceptOKNum + { + get + { + return this._SubdivisionalWorksAcceptOKNum; + } + set + { + if ((this._SubdivisionalWorksAcceptOKNum != value)) + { + this.OnSubdivisionalWorksAcceptOKNumChanging(value); + this.SendPropertyChanging(); + this._SubdivisionalWorksAcceptOKNum = value; + this.SendPropertyChanged("SubdivisionalWorksAcceptOKNum"); + this.OnSubdivisionalWorksAcceptOKNumChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -285786,6 +287253,159 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_ProductionSchedulingPlanStatistics")] + public partial class View_HJGL_ProductionSchedulingPlanStatistics + { + + private string _UnitWorkId; + + private string _UnitWorkCode; + + private string _UnitWorkName; + + private string _ProjectId; + + private string _FlowingSection; + + private string _Material; + + private string _Caliber; + + private decimal _Dia; + + public View_HJGL_ProductionSchedulingPlanStatistics() + { + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)] + public string UnitWorkId + { + get + { + return this._UnitWorkId; + } + set + { + if ((this._UnitWorkId != value)) + { + this._UnitWorkId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkCode", DbType="NVarChar(10)")] + public string UnitWorkCode + { + get + { + return this._UnitWorkCode; + } + set + { + if ((this._UnitWorkCode != value)) + { + this._UnitWorkCode = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkName", DbType="NVarChar(30)")] + public string UnitWorkName + { + get + { + return this._UnitWorkName; + } + set + { + if ((this._UnitWorkName != value)) + { + this._UnitWorkName = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this._ProjectId = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FlowingSection", DbType="NVarChar(200)")] + public string FlowingSection + { + get + { + return this._FlowingSection; + } + set + { + if ((this._FlowingSection != value)) + { + this._FlowingSection = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Material", DbType="VarChar(8)")] + public string Material + { + get + { + return this._Material; + } + set + { + if ((this._Material != value)) + { + this._Material = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Caliber", DbType="VarChar(5) NOT NULL", CanBeNull=false)] + public string Caliber + { + get + { + return this._Caliber; + } + set + { + if ((this._Caliber != value)) + { + this._Caliber = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Dia", DbType="Decimal(38,3) NOT NULL")] + public decimal Dia + { + get + { + return this._Dia; + } + set + { + if ((this._Dia != value)) + { + this._Dia = value; + } + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_WeldingTask")] public partial class View_HJGL_WeldingTask { diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index 472a096b..398d142c 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -236,6 +236,7 @@ + diff --git a/SGGL/WebAPI/Controllers/HSSE/PayCraftAmountController.cs b/SGGL/WebAPI/Controllers/HSSE/PayCraftAmountController.cs new file mode 100644 index 00000000..e69de29b