From 040de31eb1ffaf831c4597828bf2071268d5cb36 Mon Sep 17 00:00:00 2001 From: fei550 <1420031550@qq.com> Date: Mon, 13 Jul 2026 17:25:28 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9D=90=E6=96=99=E7=AE=A1=E7=90=86)?= =?UTF-8?q?=EF=BC=9A=E5=A2=9E=E5=8A=A0=E8=B0=83=E6=8B=A8=E5=87=BA=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2026-07-13-lpf.sql | 44 ++ SGGL/BLL/CLGL/TwConst.cs | 16 +- SGGL/BLL/CLGL/TwInOutplanmasterService.cs | 247 ++++++- SGGL/BLL/CLGL/TwInputmasterService.cs | 3 + SGGL/BLL/CLGL/TwOutputmasterService.cs | 3 + SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs | 10 + .../CLGL/InPlanMasterApplyEdit.aspx.cs | 8 +- SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs | 10 +- .../CLGL/OutPlanMasterDetailImport.aspx.cs | 4 +- .../FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx | 9 +- .../CLGL/OutPlanMasterEdit.aspx.cs | 132 +++- .../CLGL/OutPlanMasterEdit.aspx.designer.cs | 9 + .../DataImport/DrawingRecognitionContent.aspx | 7 +- SGGL/Model/Model.cs | 629 +++++++++++++++++- 14 files changed, 1102 insertions(+), 29 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2026-07-13-lpf.sql diff --git a/DataBase/版本日志/SGGLDB_V2026-07-13-lpf.sql b/DataBase/版本日志/SGGLDB_V2026-07-13-lpf.sql new file mode 100644 index 00000000..e90c52f3 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2026-07-13-lpf.sql @@ -0,0 +1,44 @@ +IF COL_LENGTH('dbo.Tw_InOutPlanMaster', 'TransferWarehouseId') IS NULL +BEGIN + ALTER TABLE dbo.Tw_InOutPlanMaster + ADD TransferWarehouseId NVARCHAR(50) NULL; +END; +GO + +IF COL_LENGTH('dbo.Tw_InOutPlanMaster', 'TransferBatchId') IS NULL +BEGIN + ALTER TABLE dbo.Tw_InOutPlanMaster + ADD TransferBatchId NVARCHAR(50) NULL; +END; +GO + +-- 创建 HJGL_DrawingRecognition_Material 表 +CREATE TABLE HJGL_DrawingRecognition_Material ( + id NVARCHAR(50) NOT NULL, -- 主键 + pipe_no NVARCHAR(200) NULL, -- 管线号 + pipe_page_no INT NULL, -- 管线号码 + seq_no INT NULL, -- 序号(原值为字符串 "1") + category NVARCHAR(255) NULL, -- 类别(允许空) + description NVARCHAR(1000) NULL, -- 描述(支持长文本) + spec NVARCHAR(100) NULL, -- 规格 + code NVARCHAR(100) NULL, -- 代码 + qty NVARCHAR(50) NULL, -- 数量(含单位,如 "3.5 M") + unit NVARCHAR(50) NULL, -- 单位(允许空) + material NVARCHAR(255) NULL, -- 材料(允许空) + drawing_number NVARCHAR(200) NULL, -- 图号(允许空) + remark NVARCHAR(1000) NULL, -- 备注(允许空) + CONSTRAINT PK_HJGL_DrawingRecognition_Material PRIMARY KEY (id) -- 主键约束 +); +GO +-- 创建 HJGL_DrawingRecognition_PipeLengths 表 +CREATE TABLE HJGL_DrawingRecognition_PipeLengths ( + id NVARCHAR(50) NOT NULL, -- 记录ID + pipe_no INT NULL, -- 管线号 + pipe_page_no INT NULL, -- 管线号页码 + group_index INT NULL, -- 组索引 + pos_no NVARCHAR(50) NULL, -- 位置编号(如 "<1>") + length_mm NVARCHAR(50) NULL, -- 长度(单位:毫米) + dn NVARCHAR(50) NULL -- 公称直径(DN) + CONSTRAINT PK_HJGL_DrawingRecognition_PipeLengths PRIMARY KEY (id) -- 主键约束 +); +GO \ No newline at end of file diff --git a/SGGL/BLL/CLGL/TwConst.cs b/SGGL/BLL/CLGL/TwConst.cs index 939103f4..6c6178d2 100644 --- a/SGGL/BLL/CLGL/TwConst.cs +++ b/SGGL/BLL/CLGL/TwConst.cs @@ -18,6 +18,8 @@ namespace BLL 补料出库 = 50, 其他出库 = 60, 散件出库 = 70, + 调拨入库 = 80, + 调拨出库 = 90, } public enum Category : int { @@ -41,7 +43,9 @@ namespace BLL { "领料出库" ,(int)TypeInt.领料出库}, { "补料出库" ,(int)TypeInt.补料出库}, { "其他出库" ,(int)TypeInt.其他出库}, - { "散件出库" ,(int)TypeInt.散件出库} + { "散件出库" ,(int)TypeInt.散件出库}, + { "调拨入库" ,(int)TypeInt.调拨入库}, + { "调拨出库" ,(int)TypeInt.调拨出库} }; public static Dictionary PlanPrintMap = new Dictionary { @@ -51,7 +55,9 @@ namespace BLL { "材料领用申请单" ,(int)TypeInt.领料出库}, { "补料申请单" ,(int)TypeInt.补料出库}, { "其他出库申请单" ,(int)TypeInt.其他出库}, - { "散件出库申请单" ,(int)TypeInt.散件出库} + { "散件出库申请单" ,(int)TypeInt.散件出库}, + { "调拨入库申请单" ,(int)TypeInt.调拨入库}, + { "调拨出库申请单" ,(int)TypeInt.调拨出库} }; public static Dictionary PrintMap = new Dictionary { @@ -61,7 +67,9 @@ namespace BLL { "材料出库单" ,(int)TypeInt.领料出库}, { "补料出库单" ,(int)TypeInt.补料出库}, { "其他出库单" ,(int)TypeInt.其他出库}, - { "散件出库单" ,(int)TypeInt.散件出库} + { "散件出库单" ,(int)TypeInt.散件出库}, + { "调拨入库单" ,(int)TypeInt.调拨入库}, + { "调拨出库单" ,(int)TypeInt.调拨出库} }; public static Dictionary StateMap = new Dictionary { @@ -78,4 +86,4 @@ namespace BLL { "管段" ,(int)Category.管段}, }; } -} \ No newline at end of file +} diff --git a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs index 5f10d815..3c786b2b 100644 --- a/SGGL/BLL/CLGL/TwInOutplanmasterService.cs +++ b/SGGL/BLL/CLGL/TwInOutplanmasterService.cs @@ -8,6 +8,7 @@ using System.Collections; using System.Collections.Generic; using System.Globalization; using System.Linq; +using System.Transactions; namespace BLL @@ -54,6 +55,8 @@ namespace BLL (string.IsNullOrEmpty(table.ReqUnitId) || x.ReqUnitId.Contains(table.ReqUnitId)) && (string.IsNullOrEmpty(table.UnitWorkId) || x.WeldTaskId.Contains(table.UnitWorkId)) && (string.IsNullOrEmpty(table.WeldTaskId) || x.WeldTaskId.Contains(table.WeldTaskId)) && + (string.IsNullOrEmpty(table.TransferWarehouseId) || x.TransferWarehouseId == table.TransferWarehouseId) && + (string.IsNullOrEmpty(table.TransferBatchId) || x.TransferBatchId == table.TransferBatchId) && (table.InOutType == null || x.InOutType == table.InOutType) && (table.TypeInt == null || x.TypeInt == table.TypeInt) && (table.Category == null || x.Category == table.Category) && @@ -90,7 +93,9 @@ namespace BLL WarehouseMan = x.WarehouseMan, WarehouseDate = x.WarehouseDate, WarehouseManName = warehouseperson.PersonName, - PipeLineSortIndex = y.PipeLineSortIndex + PipeLineSortIndex = y.PipeLineSortIndex, + TransferWarehouseId = x.TransferWarehouseId, + TransferBatchId = x.TransferBatchId } ; @@ -153,6 +158,8 @@ namespace BLL WarehouseDate = x.WarehouseDate, WarehouseManName = x.WarehouseManName, PipeLineSortIndex = x.PipeLineSortIndex, + TransferWarehouseId = x.TransferWarehouseId, + TransferBatchId = x.TransferBatchId, }).ToList(); } @@ -203,7 +210,9 @@ namespace BLL AuditDate2 = x.AuditDate2, WarehouseMan = x.WarehouseMan, WarehouseDate = x.WarehouseDate, - WarehouseManName = x.WarehouseManName + WarehouseManName = x.WarehouseManName, + TransferWarehouseId = x.TransferWarehouseId, + TransferBatchId = x.TransferBatchId }; } @@ -721,6 +730,8 @@ namespace BLL AuditDate2 = newtable.AuditDate2, WarehouseMan = newtable.WarehouseMan, WarehouseDate = newtable.WarehouseDate, + TransferWarehouseId = newtable.TransferWarehouseId, + TransferBatchId = newtable.TransferBatchId, }; Funs.DB.Tw_InOutPlanMaster.InsertOnSubmit(table); Funs.DB.SubmitChanges(); @@ -753,6 +764,8 @@ namespace BLL table.AuditDate2 = newtable.AuditDate2; table.WarehouseMan = newtable.WarehouseMan; table.WarehouseDate = newtable.WarehouseDate; + table.TransferWarehouseId = newtable.TransferWarehouseId; + table.TransferBatchId = newtable.TransferBatchId; Funs.DB.SubmitChanges(); } @@ -932,6 +945,22 @@ namespace BLL } public static string GetDataInCusBillCode(string projectid, string unitcode, string typeString, string unitWorkCode = "", string Category = "") { + if (typeString == TwConst.TypeInt.调拨出库.ToString()) + { + string datePrefix = string.Format("{0:yyyyMMdd}", DateTime.Now); + string codePrefix = datePrefix + "-TR-"; + var transferCodes = GetModle(new Tw_InOutMasterOutput + { + ProjectId = projectid, + TypeInt = (int)TwConst.TypeInt.调拨出库 + }) + .Where(x => x.CusBillCode != null && x.CusBillCode.StartsWith(codePrefix)) + .Select(x => x.CusBillCode) + .ToList(); + + int maxSequence = transferCodes.Select(GetTransferSequence).DefaultIfEmpty(0).Max(); + return string.Format("{0}-TR-{1}-OUT-AP", datePrefix, (maxSequence + 1).ToString("D2")); + } if (typeString == TwConst.TypeInt.其他入库.ToString()) { //生成规则是20240919-unitcode-AP-GR01 @@ -998,6 +1027,220 @@ namespace BLL } } + /// + /// 根据调拨出库申请编号生成同批次调拨入库申请编号 + /// + public static string GetTransferInCusBillCode(string outCusBillCode) + { + return (outCusBillCode ?? string.Empty).Replace("-OUT-AP", "-IN-AP"); + } + + private static int GetTransferSequence(string cusBillCode) + { + string[] parts = (cusBillCode ?? string.Empty).Split('-'); + int sequence; + return parts.Length >= 3 && int.TryParse(parts[2], out sequence) ? sequence : 0; + } + + /// + /// 提交调拨出库草稿,并在同一事务内生成配对的调拨入库申请 + /// + public static ResponeData SubmitTransferPlan(string outPlanId, string targetWarehouseId, IDictionary detailPlanNums) + { + ResponeData result = new ResponeData(); + try + { + TransactionOptions options = new TransactionOptions + { + IsolationLevel = System.Transactions.IsolationLevel.Serializable, + Timeout = TransactionManager.DefaultTimeout + }; + using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, options)) + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Tw_InOutPlanMaster outPlan = db.Tw_InOutPlanMaster.FirstOrDefault(x => x.Id == outPlanId); + if (outPlan == null || outPlan.TypeInt != (int)TwConst.TypeInt.调拨出库) + { + result.code = 0; + result.message = "未找到有效的调拨出库申请!"; + return result; + } + if (!string.IsNullOrEmpty(outPlan.TransferBatchId)) + { + Tw_InOutPlanMaster existingInPlan = db.Tw_InOutPlanMaster.FirstOrDefault(x => + x.TransferBatchId == outPlan.TransferBatchId && x.InOutType == (int)TwConst.InOutType.入库); + if (existingInPlan != null) + { + result.data = existingInPlan.Id; + result.message = "调拨入库申请已生成。"; + scope.Complete(); + return result; + } + } + if (outPlan.State != (int)TwConst.State.待提交) + { + result.code = 0; + result.message = "只有待提交的调拨出库申请允许提交!"; + return result; + } + if (string.IsNullOrEmpty(targetWarehouseId) || targetWarehouseId == outPlan.WarehouseId) + { + result.code = 0; + result.message = "调出仓库和调入仓库不能为空且不能相同!"; + return result; + } + + Base_Warehouse sourceWarehouse = db.Base_Warehouse.FirstOrDefault(x => x.WarehouseId == outPlan.WarehouseId && x.ProjectId == outPlan.ProjectId); + Base_Warehouse targetWarehouse = db.Base_Warehouse.FirstOrDefault(x => x.WarehouseId == targetWarehouseId && x.ProjectId == outPlan.ProjectId); + if (sourceWarehouse == null || targetWarehouse == null) + { + result.code = 0; + result.message = "调出仓库或调入仓库不属于当前项目!"; + return result; + } + + if (string.IsNullOrEmpty(outPlan.TransferBatchId)) + { + outPlan.TransferBatchId = Guid.NewGuid().ToString(); + } + + List outDetails = db.Tw_InOutPlanDetail.Where(x => x.InOutPlanMasterId == outPlan.Id).ToList(); + if (outDetails.Count == 0) + { + result.code = 0; + result.message = "请添加调拨明细!"; + return result; + } + if (detailPlanNums == null || detailPlanNums.Keys.Except(outDetails.Select(x => x.Id)).Any()) + { + result.code = 0; + result.message = "调拨明细数据已变化,请刷新后重新提交!"; + return result; + } + foreach (Tw_InOutPlanDetail detail in outDetails) + { + decimal planNum; + if (!detailPlanNums.TryGetValue(detail.Id, out planNum) || planNum <= 0 || string.IsNullOrEmpty(detail.MaterialCode)) + { + result.code = 0; + result.message = "调拨明细的材料主编码不能为空,计划数量必须大于0!"; + return result; + } + detail.PlanNum = planNum; + } + + // 调拨提交按材料主编码汇总校验,防止同一材料拆行后绕过库存上限。 + var planTotals = outDetails.GroupBy(x => x.MaterialCode).Select(x => new + { + MaterialCode = x.Key, + PlanNum = x.Sum(y => y.PlanNum ?? 0) + }).ToList(); + var stockTotals = db.Tw_MaterialStock + .Where(x => x.ProjectId == outPlan.ProjectId && x.WarehouseId == outPlan.WarehouseId) + .GroupBy(x => x.PipeLineMatCode) + .Select(x => new + { + MaterialCode = x.Key, + StockNum = x.Sum(y => y.StockNum ?? 0) + }).ToList(); + foreach (var planTotal in planTotals) + { + decimal stockNum = stockTotals.Where(x => x.MaterialCode == planTotal.MaterialCode).Select(x => x.StockNum).FirstOrDefault(); + if (planTotal.PlanNum > stockNum) + { + result.code = 0; + result.message = string.Format("材料[{0}]计划调拨数量{1}超过当前库存{2}!", planTotal.MaterialCode, planTotal.PlanNum, stockNum); + return result; + } + } + + outPlan.TransferWarehouseId = targetWarehouseId; + outPlan.InOutType = (int)TwConst.InOutType.出库; + outPlan.State = (int)TwConst.State.待审核; + + string inPlanId = Guid.NewGuid().ToString(); + Tw_InOutPlanMaster inPlan = new Tw_InOutPlanMaster + { + Id = inPlanId, + ProjectId = outPlan.ProjectId, + CusBillCode = GetTransferInCusBillCode(outPlan.CusBillCode), + WarehouseId = targetWarehouse.WarehouseId, + WarehouseCode = targetWarehouse.WarehouseName, + TransferWarehouseId = sourceWarehouse.WarehouseId, + TransferBatchId = outPlan.TransferBatchId, + Source = outPlan.Source, + InOutType = (int)TwConst.InOutType.入库, + TypeInt = (int)TwConst.TypeInt.调拨入库, + State = (int)TwConst.State.待审核, + CreateMan = outPlan.CreateMan, + CreateDate = outPlan.CreateDate, + WeldTaskId = outPlan.WeldTaskId, + ReqUnitId = outPlan.ReqUnitId, + Category = outPlan.Category, + Remark = outPlan.Remark + }; + db.Tw_InOutPlanMaster.InsertOnSubmit(inPlan); + + List inDetails = outDetails.Select(x => new Tw_InOutPlanDetail + { + Id = Guid.NewGuid().ToString(), + InOutPlanMasterId = inPlanId, + MaterialCode = x.MaterialCode, + PlanNum = x.PlanNum, + SortIndex = x.SortIndex + }).ToList(); + db.Tw_InOutPlanDetail.InsertAllOnSubmit(inDetails); + db.SubmitChanges(); + scope.Complete(); + result.data = inPlanId; + result.message = "调拨出入库申请生成成功。"; + } + } + catch (Exception ex) + { + string existingInPlanId = GetExistingTransferInPlanId(outPlanId); + if (!string.IsNullOrEmpty(existingInPlanId)) + { + result.code = 1; + result.data = existingInPlanId; + result.message = "调拨入库申请已生成。"; + return result; + } + result.code = 0; + result.message = "调拨申请提交失败:" + ex.Message; + } + return result; + } + + /// + /// 并发提交发生唯一键冲突或死锁时,回查已成功生成的配对入库申请。 + /// + private static string GetExistingTransferInPlanId(string outPlanId) + { + try + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + string transferBatchId = db.Tw_InOutPlanMaster + .Where(x => x.Id == outPlanId) + .Select(x => x.TransferBatchId) + .FirstOrDefault(); + if (string.IsNullOrEmpty(transferBatchId)) + { + return null; + } + return db.Tw_InOutPlanMaster + .Where(x => x.TransferBatchId == transferBatchId && x.InOutType == (int)TwConst.InOutType.入库) + .Select(x => x.Id) + .FirstOrDefault(); + } + } + catch + { + return null; + } + } + /// /// 根据任务单生成出库计划单 /// diff --git a/SGGL/BLL/CLGL/TwInputmasterService.cs b/SGGL/BLL/CLGL/TwInputmasterService.cs index 49c33281..3a01e23e 100644 --- a/SGGL/BLL/CLGL/TwInputmasterService.cs +++ b/SGGL/BLL/CLGL/TwInputmasterService.cs @@ -378,6 +378,9 @@ namespace BLL case TwConst.TypeInt.采购入库: cusBillCode = planCusBillCode.Replace("-AP", ""); ; break; + case TwConst.TypeInt.调拨入库: + cusBillCode = planCusBillCode.Replace("-AP", "-GI"); + break; } return cusBillCode; } diff --git a/SGGL/BLL/CLGL/TwOutputmasterService.cs b/SGGL/BLL/CLGL/TwOutputmasterService.cs index 9ea2bb76..57d8fa32 100644 --- a/SGGL/BLL/CLGL/TwOutputmasterService.cs +++ b/SGGL/BLL/CLGL/TwOutputmasterService.cs @@ -407,6 +407,9 @@ namespace BLL case TwConst.TypeInt.其他出库: cusBillCode = planCusBillCode.Replace("-AP-", "-GI-"); break; + case TwConst.TypeInt.调拨出库: + cusBillCode = planCusBillCode.Replace("-AP", "-GI"); + break; } return cusBillCode; diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs index fcfaee83..a1357456 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMaster.aspx.cs @@ -171,6 +171,11 @@ namespace FineUIPro.Web.CLGL { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); var model = BLL.TwInOutplanmasterService.GetById(rowID); + if (!string.IsNullOrEmpty(model.TransferBatchId)) + { + Alert.ShowInTop("已提交的调拨申请不允许单独删除!", MessageBoxIcon.Warning); + return; + } if (model.State == (int)TwConst.State.已审核 || model.State == (int)TwConst.State.已完成) { Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning); @@ -200,6 +205,11 @@ namespace FineUIPro.Web.CLGL } string ID = Grid1.SelectedRowID; var model = BLL.TwInOutplanmasterService.GetById(ID); + if (model != null && model.TypeInt == (int)TwConst.TypeInt.调拨入库) + { + Alert.ShowInTop("调拨入库申请由调拨出库申请配对生成,不允许单独编辑!", MessageBoxIcon.Warning); + return; + } if (model != null) ///已上报时不能删除 { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InPlanMasterApplyEdit.aspx?Id={0}", ID, "编辑 - "))); diff --git a/SGGL/FineUIPro.Web/CLGL/InPlanMasterApplyEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/InPlanMasterApplyEdit.aspx.cs index ea3bcf64..c7a9f0e1 100644 --- a/SGGL/FineUIPro.Web/CLGL/InPlanMasterApplyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/InPlanMasterApplyEdit.aspx.cs @@ -69,7 +69,7 @@ namespace FineUIPro.Web.CLGL drpTypeInt.DataTextField = "Key"; drpTypeInt.DataValueField = "Value"; - drpTypeInt.DataSource = TwConst.TypeIntMap.Where(x => x.Key.Contains("入库")); + drpTypeInt.DataSource = TwConst.TypeIntMap.Where(x => x.Key.Contains("入库") && x.Value != (int)TwConst.TypeInt.调拨入库); drpTypeInt.DataBind(); drpCategory.DataTextField = "Key"; @@ -160,6 +160,12 @@ namespace FineUIPro.Web.CLGL private bool Save(string type, bool validateDetail) { + var currentModel = string.IsNullOrEmpty(Id) ? null : TwInOutplanmasterService.GetById(Id); + if (currentModel != null && currentModel.TypeInt == (int)TwConst.TypeInt.调拨入库) + { + Alert.ShowInTop("调拨入库申请不允许单独编辑!", MessageBoxIcon.Warning); + return false; + } if (!ValidateMaster()) { return false; diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs index f7e749fd..cd6f5a62 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs @@ -444,6 +444,11 @@ namespace FineUIPro.Web.CLGL { string rowID = Grid1.DataKeys[rowIndex][0].ToString(); var model = BLL.TwInOutplanmasterService.GetById(rowID); + if (!string.IsNullOrEmpty(model.TransferBatchId) && model.State != (int)TwConst.State.待提交) + { + Alert.ShowInTop("已提交的调拨申请不允许单独删除!", MessageBoxIcon.Warning); + return; + } if (model.State == (int)TwConst.State.已审核 || model.State == (int)TwConst.State.已完成) { Alert.ShowInTop("请选择有效的计划!", MessageBoxIcon.Warning); @@ -530,7 +535,10 @@ namespace FineUIPro.Web.CLGL } string planId = Grid1.SelectedRowID; var planMaster = BLL.TwInOutplanmasterService.GetById(planId); - if (planMaster.State == (int)TwConst.State.待提交 && (planMaster.TypeInt == (int)TwConst.TypeInt.散件出库 || planMaster.TypeInt == (int)TwConst.TypeInt.其他出库)) + if (planMaster.State == (int)TwConst.State.待提交 && + (planMaster.TypeInt == (int)TwConst.TypeInt.散件出库 || + planMaster.TypeInt == (int)TwConst.TypeInt.其他出库 || + planMaster.TypeInt == (int)TwConst.TypeInt.调拨出库)) { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterEdit.aspx?UnitWorkId={0}&Id={1} ", tvControlItem.SelectedNodeID, planId, "新增 - "))); diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterDetailImport.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterDetailImport.aspx.cs index 5fa207c2..84e1ad22 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterDetailImport.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterDetailImport.aspx.cs @@ -134,10 +134,10 @@ namespace FineUIPro.Web.CLGL responeData.message = "请先保存出库单后再导入明细!"; return responeData; } - if (master.TypeInt != (int)TwConst.TypeInt.其他出库) + if (master.TypeInt != (int)TwConst.TypeInt.其他出库 && master.TypeInt != (int)TwConst.TypeInt.调拨出库) { responeData.code = 0; - responeData.message = "只有选择其他出库时才允许导入出库明细!"; + responeData.message = "只有选择其他出库或调拨出库时才允许导入出库明细!"; return responeData; } List stockList = GetSelectableStockList(master); diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx index 573b74d9..6511f6d5 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx @@ -40,15 +40,18 @@ + LabelWidth="70px" LabelAlign="Right" Width="170px" Required="true" ShowRedStar="true"> + + - - + diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs index 68ea0f7c..9b655ede 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.cs @@ -63,6 +63,7 @@ namespace FineUIPro.Web.CLGL drpReqUnit.SelectedValue = result.ReqUnitId; drpTypeInt.SelectedValue = result.TypeInt.ToString(); drpWarehouse.SelectedValue = result.WarehouseId; + drpTransferWarehouse.SelectedValue = result.TransferWarehouseId; drpCategory.SelectedValue = result.Category.ToString(); txtRemark.Text = result.Remark; txtCusBillCode.Text = result.CusBillCode; @@ -75,7 +76,7 @@ namespace FineUIPro.Web.CLGL txtCreateMan.Text = this.CurrUser.PersonName; txtCreateDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); drpReqUnit.SelectedValue = this.CurrUser.UnitId; - txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode, drpTypeInt.SelectedText, drpCategory.SelectedText); + txtCusBillCode.Text = TwInOutplanmasterService.GetDataInCusBillCode(this.CurrUser.LoginProjectId, UnitService.GetUnitByUnitId(drpReqUnit.SelectedValue)?.UnitCode, drpTypeInt.SelectedText, UnitWorkService.getUnitWorkByUnitWorkId(UnitWorkId)?.UnitWorkCode, drpCategory.SelectedText); } drpTypeInt_SelectedIndexChanged(null, null); @@ -90,7 +91,13 @@ namespace FineUIPro.Web.CLGL drpWarehouse.DataSource = BLL.TwInOutplanmasterService.GetWarehouseCode(this.CurrUser.LoginProjectId); drpWarehouse.DataBind(); - string[] typeIntArr = { TwConst.TypeInt.散件出库.ToString(), TwConst.TypeInt.其他出库.ToString() }; + drpTransferWarehouse.DataTextField = "Key"; + drpTransferWarehouse.DataValueField = "Value"; + drpTransferWarehouse.DataSource = BLL.TwInOutplanmasterService.GetWarehouseCode(this.CurrUser.LoginProjectId); + drpTransferWarehouse.DataBind(); + Funs.FineUIPleaseSelect(drpTransferWarehouse); + + string[] typeIntArr = { TwConst.TypeInt.散件出库.ToString(), TwConst.TypeInt.其他出库.ToString(), TwConst.TypeInt.调拨出库.ToString() }; drpTypeInt.DataTextField = "Key"; drpTypeInt.DataValueField = "Value"; drpTypeInt.DataSource = BLL.TwConst.TypeIntMap.Where(x => typeIntArr.Contains(x.Key)); @@ -117,7 +124,7 @@ namespace FineUIPro.Web.CLGL { var queryRelationModel = new Tw_InOutDetailOutput(); queryRelationModel.InOutPlanMasterId = Id; - var tb = TwInOutplandetailService.GetListData(queryRelationModel, Grid1); + var tb = TwInOutplandetailService.GetListData(queryRelationModel, Grid2); Grid2.DataSource = tb; Grid2.DataBind(); } @@ -132,19 +139,19 @@ namespace FineUIPro.Web.CLGL /// protected void btnSelect_Click(object sender, EventArgs e) { - Save(Const.BtnSave); + if (!Save(Const.BtnSave)) return; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterSelect.aspx?UnitWorkId={0}&Id={1}", UnitWorkId, Id, "选择- "))); } protected void btnSelectStock_Click(object sender, EventArgs e) { - Save(Const.BtnSave); + if (!Save(Const.BtnSave)) return; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterSelectStock.aspx?UnitWorkId={0}&Id={1}", UnitWorkId, Id, "选择- "))); } protected void btnImportStock_Click(object sender, EventArgs e) { - Save(Const.BtnSave); + if (!Save(Const.BtnSave)) return; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("OutPlanMasterDetailImport.aspx?Id={0}", Id, "导入- "))); } @@ -152,19 +159,50 @@ namespace FineUIPro.Web.CLGL protected void btnSave_Click(object sender, EventArgs e) { - Save(Const.BtnSave); - ShowNotify("保存成功!", MessageBoxIcon.Success); + if (Save(Const.BtnSave)) + { + ShowNotify("保存成功!", MessageBoxIcon.Success); + } } protected void btnSubmit_Click(object sender, EventArgs e) { - Save(Const.BtnSubmit); - ShowNotify("提交成功!", MessageBoxIcon.Success); + if (IsTransferType()) + { + Tw_InOutPlanMaster currentModel = string.IsNullOrEmpty(Id) ? null : TwInOutplanmasterService.GetById(Id); + // 重复提交旧页面时直接查询配对结果,避免先保存而把已提交申请重置为待提交。 + if (currentModel == null || currentModel.State == (int)TwConst.State.待提交) + { + if (!Save(Const.BtnSave)) return; + } + ResponeData result = TwInOutplanmasterService.SubmitTransferPlan(Id, drpTransferWarehouse.SelectedValue, GetDetailPlanNums()); + if (result.code == 0) + { + Alert.ShowInTop(result.message, MessageBoxIcon.Warning); + return; + } + ShowNotify(result.message, MessageBoxIcon.Success); + } + else + { + if (!Save(Const.BtnSubmit)) return; + ShowNotify("提交成功!", MessageBoxIcon.Success); + } PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } - void Save(string type) + private bool Save(string type) { + if (!ValidateMaster()) return false; + + Tw_InOutPlanMaster currentModel = string.IsNullOrEmpty(Id) ? null : TwInOutplanmasterService.GetById(Id); + if (currentModel != null && !string.IsNullOrEmpty(currentModel.TransferBatchId) && + currentModel.State != (int)TwConst.State.待提交) + { + Alert.ShowInTop("已提交的调拨申请不允许修改!", MessageBoxIcon.Warning); + return false; + } + int state = (int)TwConst.State.待提交; switch (type) { @@ -197,11 +235,12 @@ namespace FineUIPro.Web.CLGL Category = int.Parse(drpCategory.SelectedValue), State = state }; + SetTransferFields(model); TwInOutplanmasterService.Add(model); } else { - var model = TwInOutplanmasterService.GetById(Id); + var model = currentModel; model.CusBillCode = txtCusBillCode.Text; model.WarehouseId = drpWarehouse.SelectedValue; model.WarehouseCode = drpWarehouse.SelectedText; @@ -215,6 +254,7 @@ namespace FineUIPro.Web.CLGL model.InOutType = (int)TwConst.InOutType.出库; model.Category = int.Parse(drpCategory.SelectedValue); model.State = state; + SetTransferFields(model); TwInOutplanmasterService.Update(model); } if (drpTypeInt.SelectedValue == ((int)TwConst.TypeInt.散件出库).ToString()) @@ -226,6 +266,66 @@ namespace FineUIPro.Web.CLGL { SaveDetail(); } + return true; + } + + /// + /// 调拨草稿保存对方仓库和稳定批次,切换为普通出库时清空调拨字段。 + /// + private void SetTransferFields(Tw_InOutPlanMaster model) + { + if (IsTransferType()) + { + model.TransferWarehouseId = drpTransferWarehouse.SelectedValue; + if (string.IsNullOrEmpty(model.TransferBatchId)) + { + model.TransferBatchId = Guid.NewGuid().ToString(); + } + } + else + { + model.TransferWarehouseId = null; + model.TransferBatchId = null; + } + } + + private bool ValidateMaster() + { + if (string.IsNullOrEmpty(drpWarehouse.SelectedValue) || drpWarehouse.SelectedValue == Const._Null) + { + Alert.ShowInTop("请选择仓库!", MessageBoxIcon.Warning); + return false; + } + if (IsTransferType()) + { + if (string.IsNullOrEmpty(drpTransferWarehouse.SelectedValue) || drpTransferWarehouse.SelectedValue == Const._Null) + { + Alert.ShowInTop("请选择调入仓库!", MessageBoxIcon.Warning); + return false; + } + if (drpTransferWarehouse.SelectedValue == drpWarehouse.SelectedValue) + { + Alert.ShowInTop("调出仓库和调入仓库不能相同!", MessageBoxIcon.Warning); + return false; + } + } + return true; + } + + private bool IsTransferType() + { + return drpTypeInt.SelectedValue == ((int)TwConst.TypeInt.调拨出库).ToString(); + } + + private IDictionary GetDetailPlanNums() + { + Dictionary result = new Dictionary(); + foreach (JObject row in Grid2.GetMergedData()) + { + JObject values = row.Value("values"); + result[row.Value("id")] = values.Value("PlanNum"); + } + return result; } /// @@ -315,6 +415,14 @@ namespace FineUIPro.Web.CLGL Grid1.Hidden = true; Grid2.Hidden = false; } + + bool isTransfer = IsTransferType(); + drpWarehouse.Label = isTransfer ? "调出仓库" : "仓库"; + drpTransferWarehouse.Hidden = !isTransfer; + if (!isTransfer) + { + drpTransferWarehouse.SelectedValue = Const._Null; + } } } } diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.designer.cs index bbd4432a..d6330b19 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMasterEdit.aspx.designer.cs @@ -86,6 +86,15 @@ namespace FineUIPro.Web.CLGL /// protected global::FineUIPro.DropDownList drpWarehouse; + /// + /// drpTransferWarehouse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpTransferWarehouse; + /// /// drpTypeInt 控件。 /// diff --git a/SGGL/FineUIPro.Web/HJGL/DataImport/DrawingRecognitionContent.aspx b/SGGL/FineUIPro.Web/HJGL/DataImport/DrawingRecognitionContent.aspx index 0db9335d..96a507e6 100644 --- a/SGGL/FineUIPro.Web/HJGL/DataImport/DrawingRecognitionContent.aspx +++ b/SGGL/FineUIPro.Web/HJGL/DataImport/DrawingRecognitionContent.aspx @@ -41,8 +41,11 @@ runat="server" BoxFlex="1" DataKeyNames="id" EnableColumnLines="true" DataIDField="id" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True" EnableRowDoubleClickEvent="true" AllowColumnLocking="true"> - - --%> + + + // 此代码由工具生成。 @@ -660,6 +659,12 @@ namespace Model partial void InsertHJGL_DesignBasisDataImportVerSionLog(HJGL_DesignBasisDataImportVerSionLog instance); partial void UpdateHJGL_DesignBasisDataImportVerSionLog(HJGL_DesignBasisDataImportVerSionLog instance); partial void DeleteHJGL_DesignBasisDataImportVerSionLog(HJGL_DesignBasisDataImportVerSionLog instance); + partial void InsertHJGL_DrawingRecognition_Material(HJGL_DrawingRecognition_Material instance); + partial void UpdateHJGL_DrawingRecognition_Material(HJGL_DrawingRecognition_Material instance); + partial void DeleteHJGL_DrawingRecognition_Material(HJGL_DrawingRecognition_Material instance); + partial void InsertHJGL_DrawingRecognition_PipeLengths(HJGL_DrawingRecognition_PipeLengths instance); + partial void UpdateHJGL_DrawingRecognition_PipeLengths(HJGL_DrawingRecognition_PipeLengths instance); + partial void DeleteHJGL_DrawingRecognition_PipeLengths(HJGL_DrawingRecognition_PipeLengths instance); partial void InsertHJGL_Hard_Report(HJGL_Hard_Report instance); partial void UpdateHJGL_Hard_Report(HJGL_Hard_Report instance); partial void DeleteHJGL_Hard_Report(HJGL_Hard_Report instance); @@ -3662,6 +3667,22 @@ namespace Model } } + public System.Data.Linq.Table HJGL_DrawingRecognition_Material + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table HJGL_DrawingRecognition_PipeLengths + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table HJGL_Hard_Report { get @@ -96966,6 +96987,562 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_DrawingRecognition_Material")] + public partial class HJGL_DrawingRecognition_Material : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _Pipe_no; + + private System.Nullable _Pipe_page_no; + + private System.Nullable _Seq_no; + + private string _Category; + + private string _Description; + + private string _Spec; + + private string _Code; + + private string _Qty; + + private string _Unit; + + private string _Material; + + private string _Drawing_number; + + private string _Remark; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnPipe_noChanging(string value); + partial void OnPipe_noChanged(); + partial void OnPipe_page_noChanging(System.Nullable value); + partial void OnPipe_page_noChanged(); + partial void OnSeq_noChanging(System.Nullable value); + partial void OnSeq_noChanged(); + partial void OnCategoryChanging(string value); + partial void OnCategoryChanged(); + partial void OnDescriptionChanging(string value); + partial void OnDescriptionChanged(); + partial void OnSpecChanging(string value); + partial void OnSpecChanged(); + partial void OnCodeChanging(string value); + partial void OnCodeChanged(); + partial void OnQtyChanging(string value); + partial void OnQtyChanged(); + partial void OnUnitChanging(string value); + partial void OnUnitChanged(); + partial void OnMaterialChanging(string value); + partial void OnMaterialChanged(); + partial void OnDrawing_numberChanging(string value); + partial void OnDrawing_numberChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + #endregion + + public HJGL_DrawingRecognition_Material() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="id", Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="pipe_no", Storage="_Pipe_no", DbType="NVarChar(200)")] + public string Pipe_no + { + get + { + return this._Pipe_no; + } + set + { + if ((this._Pipe_no != value)) + { + this.OnPipe_noChanging(value); + this.SendPropertyChanging(); + this._Pipe_no = value; + this.SendPropertyChanged("Pipe_no"); + this.OnPipe_noChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="pipe_page_no", Storage="_Pipe_page_no", DbType="Int")] + public System.Nullable Pipe_page_no + { + get + { + return this._Pipe_page_no; + } + set + { + if ((this._Pipe_page_no != value)) + { + this.OnPipe_page_noChanging(value); + this.SendPropertyChanging(); + this._Pipe_page_no = value; + this.SendPropertyChanged("Pipe_page_no"); + this.OnPipe_page_noChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="seq_no", Storage="_Seq_no", DbType="Int")] + public System.Nullable Seq_no + { + get + { + return this._Seq_no; + } + set + { + if ((this._Seq_no != value)) + { + this.OnSeq_noChanging(value); + this.SendPropertyChanging(); + this._Seq_no = value; + this.SendPropertyChanged("Seq_no"); + this.OnSeq_noChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="category", Storage="_Category", DbType="NVarChar(255)")] + public string Category + { + get + { + return this._Category; + } + set + { + if ((this._Category != value)) + { + this.OnCategoryChanging(value); + this.SendPropertyChanging(); + this._Category = value; + this.SendPropertyChanged("Category"); + this.OnCategoryChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="description", Storage="_Description", DbType="NVarChar(1000)")] + public string Description + { + get + { + return this._Description; + } + set + { + if ((this._Description != value)) + { + this.OnDescriptionChanging(value); + this.SendPropertyChanging(); + this._Description = value; + this.SendPropertyChanged("Description"); + this.OnDescriptionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="spec", Storage="_Spec", DbType="NVarChar(100)")] + public string Spec + { + get + { + return this._Spec; + } + set + { + if ((this._Spec != value)) + { + this.OnSpecChanging(value); + this.SendPropertyChanging(); + this._Spec = value; + this.SendPropertyChanged("Spec"); + this.OnSpecChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="code", Storage="_Code", DbType="NVarChar(100)")] + public string Code + { + get + { + return this._Code; + } + set + { + if ((this._Code != value)) + { + this.OnCodeChanging(value); + this.SendPropertyChanging(); + this._Code = value; + this.SendPropertyChanged("Code"); + this.OnCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="qty", Storage="_Qty", DbType="NVarChar(50)")] + public string Qty + { + get + { + return this._Qty; + } + set + { + if ((this._Qty != value)) + { + this.OnQtyChanging(value); + this.SendPropertyChanging(); + this._Qty = value; + this.SendPropertyChanged("Qty"); + this.OnQtyChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="unit", Storage="_Unit", DbType="NVarChar(50)")] + public string Unit + { + get + { + return this._Unit; + } + set + { + if ((this._Unit != value)) + { + this.OnUnitChanging(value); + this.SendPropertyChanging(); + this._Unit = value; + this.SendPropertyChanged("Unit"); + this.OnUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="material", Storage="_Material", DbType="NVarChar(255)")] + 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(Name="drawing_number", Storage="_Drawing_number", DbType="NVarChar(200)")] + public string Drawing_number + { + get + { + return this._Drawing_number; + } + set + { + if ((this._Drawing_number != value)) + { + this.OnDrawing_numberChanging(value); + this.SendPropertyChanging(); + this._Drawing_number = value; + this.SendPropertyChanged("Drawing_number"); + this.OnDrawing_numberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="remark", Storage="_Remark", DbType="NVarChar(1000)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_DrawingRecognition_PipeLengths")] + public partial class HJGL_DrawingRecognition_PipeLengths : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private System.Nullable _Pipe_no; + + private System.Nullable _Pipe_page_no; + + private System.Nullable _Group_index; + + private string _Pos_no; + + private string _Length_mm; + + private string _Dn; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnPipe_noChanging(System.Nullable value); + partial void OnPipe_noChanged(); + partial void OnPipe_page_noChanging(System.Nullable value); + partial void OnPipe_page_noChanged(); + partial void OnGroup_indexChanging(System.Nullable value); + partial void OnGroup_indexChanged(); + partial void OnPos_noChanging(string value); + partial void OnPos_noChanged(); + partial void OnLength_mmChanging(string value); + partial void OnLength_mmChanged(); + partial void OnDnChanging(string value); + partial void OnDnChanged(); + #endregion + + public HJGL_DrawingRecognition_PipeLengths() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="id", Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="pipe_no", Storage="_Pipe_no", DbType="Int")] + public System.Nullable Pipe_no + { + get + { + return this._Pipe_no; + } + set + { + if ((this._Pipe_no != value)) + { + this.OnPipe_noChanging(value); + this.SendPropertyChanging(); + this._Pipe_no = value; + this.SendPropertyChanged("Pipe_no"); + this.OnPipe_noChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="pipe_page_no", Storage="_Pipe_page_no", DbType="Int")] + public System.Nullable Pipe_page_no + { + get + { + return this._Pipe_page_no; + } + set + { + if ((this._Pipe_page_no != value)) + { + this.OnPipe_page_noChanging(value); + this.SendPropertyChanging(); + this._Pipe_page_no = value; + this.SendPropertyChanged("Pipe_page_no"); + this.OnPipe_page_noChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="group_index", Storage="_Group_index", DbType="Int")] + public System.Nullable Group_index + { + get + { + return this._Group_index; + } + set + { + if ((this._Group_index != value)) + { + this.OnGroup_indexChanging(value); + this.SendPropertyChanging(); + this._Group_index = value; + this.SendPropertyChanged("Group_index"); + this.OnGroup_indexChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="pos_no", Storage="_Pos_no", DbType="NVarChar(50)")] + public string Pos_no + { + get + { + return this._Pos_no; + } + set + { + if ((this._Pos_no != value)) + { + this.OnPos_noChanging(value); + this.SendPropertyChanging(); + this._Pos_no = value; + this.SendPropertyChanged("Pos_no"); + this.OnPos_noChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="length_mm", Storage="_Length_mm", DbType="NVarChar(50)")] + public string Length_mm + { + get + { + return this._Length_mm; + } + set + { + if ((this._Length_mm != value)) + { + this.OnLength_mmChanging(value); + this.SendPropertyChanging(); + this._Length_mm = value; + this.SendPropertyChanged("Length_mm"); + this.OnLength_mmChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="dn", Storage="_Dn", DbType="NVarChar(50)")] + public string Dn + { + get + { + return this._Dn; + } + set + { + if ((this._Dn != value)) + { + this.OnDnChanging(value); + this.SendPropertyChanging(); + this._Dn = value; + this.SendPropertyChanged("Dn"); + this.OnDnChanged(); + } + } + } + + 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_Hard_Report")] public partial class HJGL_Hard_Report : INotifyPropertyChanging, INotifyPropertyChanged { @@ -278888,6 +279465,10 @@ namespace Model private string _WarehouseId; + private string _TransferWarehouseId; + + private string _TransferBatchId; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -278936,6 +279517,10 @@ namespace Model partial void OnWarehouseDateChanged(); partial void OnWarehouseIdChanging(string value); partial void OnWarehouseIdChanged(); + partial void OnTransferWarehouseIdChanging(string value); + partial void OnTransferWarehouseIdChanged(); + partial void OnTransferBatchIdChanging(string value); + partial void OnTransferBatchIdChanged(); #endregion public Tw_InOutPlanMaster() @@ -279383,6 +279968,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TransferWarehouseId", DbType="NVarChar(50)")] + public string TransferWarehouseId + { + get + { + return this._TransferWarehouseId; + } + set + { + if ((this._TransferWarehouseId != value)) + { + this.OnTransferWarehouseIdChanging(value); + this.SendPropertyChanging(); + this._TransferWarehouseId = value; + this.SendPropertyChanged("TransferWarehouseId"); + this.OnTransferWarehouseIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TransferBatchId", DbType="NVarChar(50)")] + public string TransferBatchId + { + get + { + return this._TransferBatchId; + } + set + { + if ((this._TransferBatchId != value)) + { + this.OnTransferBatchIdChanging(value); + this.SendPropertyChanging(); + this._TransferBatchId = value; + this.SendPropertyChanged("TransferBatchId"); + this.OnTransferBatchIdChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged;