diff --git a/.vs/SGGL_SeDin_New/v17/.wsuo b/.vs/SGGL_SeDin_New/v17/.wsuo index ccfe80e6..5fc722e7 100644 Binary files a/.vs/SGGL_SeDin_New/v17/.wsuo and b/.vs/SGGL_SeDin_New/v17/.wsuo differ diff --git a/DataBase/版本日志/SGGLDB_V2024-12-06.sql b/DataBase/版本日志/SGGLDB_V2024-12-06.sql index 9eaf219b..0550cb3e 100644 --- a/DataBase/版本日志/SGGLDB_V2024-12-06.sql +++ b/DataBase/版本日志/SGGLDB_V2024-12-06.sql @@ -9,4 +9,89 @@ alter table HJGL_WeldTask go alter table Tw_OutputMaster add AuditMan2 varchar(50), - AuditDate2 datetime \ No newline at end of file + AuditDate2 datetime; +go +alter view dbo.View_HJGL_Pipeline as + SELECT pipeline.PipelineId, + pipeline.ProjectId, + pipeline.UnitId, + pipeline.UnitWorkId, + pipeline.PipelineCode, + pipeline.SingleName, + pipeline.SingleNumber, + pipeline.PipingClassId, + pipeline.MediumId, + pipingClass.PipingClassCode, + pipeline.DetectionRateId, + rate.DetectionRateCode, + pipeline.DetectionType, + pipeline.TestPressure, + pipeline.TestMedium, + pipeline.PressurePipingClassId, + pc.PressurePipingClassCode, + pipeline.PipeLenth, + pipeline.DesignPress, + pipeline.DesignTemperature, + pipeline.Remark, + pipeline.LeakPressure, + pipeline.LeakMedium, + pipeline.VacuumPressure, + pipeline.PCMedium, + pipeline.PCtype, + pipeline.MaterialId, + pipeline.PipeArea, + case pipeline.PipeArea when '1' then '工厂预制' when '2' then '现场施工' else '' end as PipeAreaStr, + pipeline.FlowingSection, + mat.MaterialCode, + dType.DetectionTypeCode, + lea.MediumName AS LeakMediumName, + pur.PurgeMethodName AS PCMediumName, + CAST((SELECT SUM(ISNULL(Size, 0)) + FROM dbo.HJGL_WeldJoint + WHERE PipelineId = pipeline.PipelineId) AS DECIMAL(8, 3)) AS TotalDin, + CAST((SELECT ISNULL(SUM(ISNULL(jot.Size, 0)), 0) + FROM dbo.HJGL_WeldJoint jot + WHERE jot.PipelineId = pipeline.PipelineId + AND jot.WeldingDailyId IS NOT NULL) AS DECIMAL(8, 3)) AS FinishSize, + (SELECT COUNT(WeldJointId) + FROM dbo.HJGL_WeldJoint + WHERE PipelineId = pipeline.PipelineId and IsTwoJoint is null) AS JointCount, + (SELECT COUNT(WeldJointId) + FROM dbo.HJGL_WeldJoint + WHERE PipelineId = pipeline.PipelineId + and IsTwoJoint is null + and JointAttribute = '预制口') AS ShopJointCount, + (SELECT COUNT(WeldJointId) + FROM dbo.HJGL_WeldJoint + WHERE PipelineId = pipeline.PipelineId + and IsTwoJoint is null + and WeldingDailyId IS NOT NULL) AS FinishJointCount, + unit.UnitName, + workArea.UnitWorkCode, + medium.MediumCode, + medium.MediumName AS MediumName, + testMedium.MediumCode AS TestMediumCode, + pipeline.ActEndDate AS FinishedDate, + pipeline.IsFinished + FROM dbo.HJGL_Pipeline AS pipeline + LEFT JOIN Base_PipingClass AS pipingClass ON pipingClass.PipingClassId = pipeline.PipingClassId + LEFT JOIN dbo.Base_Unit AS unit ON unit.UnitId = pipeline.UnitId + LEFT JOIN WBS_UnitWork AS workArea ON workArea.UnitWorkId = pipeline.UnitWorkId + LEFT JOIN Base_Medium AS medium ON medium.MediumId = pipeline.MediumId + LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = pipeline.TestMedium + LEFT JOIN dbo.Base_DetectionRate rate ON rate.DetectionRateId = pipeline.DetectionRateId + LEFT JOIN dbo.Base_PressurePipingClass pc ON pc.PressurePipingClassId = pipeline.PressurePipingClassId + LEFT JOIN dbo.Base_TestMedium AS lea ON lea.TestMediumId = pipeline.LeakMedium + LEFT JOIN dbo.Base_PurgeMethod AS pur ON pur.PurgeMethodId = pipeline.PCMedium + LEFT JOIN dbo.Base_Material AS mat ON mat.MaterialId = pipeline.MaterialId + LEFT JOIN dbo.Base_DetectionType dType on dType.DetectionTypeId = pipeline.DetectionType +go +create index HJGL_WeldTask_UnitWorkId_index + on dbo.HJGL_WeldTask (UnitWorkId) +go + +create index HJGL_WeldTask_TaskDate_index + on dbo.HJGL_WeldTask (TaskDate) +go + + diff --git a/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs b/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs index c5f796ac..ab67ac76 100644 --- a/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs +++ b/SGGL/BLL/API/HJGL/APIPreWeldingDailyService.cs @@ -274,8 +274,8 @@ namespace BLL { res = "焊口不存在"; return res; - } - var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date); + } + var weldingDaily = db.HJGL_WeldingDaily.FirstOrDefault(x => x.WeldingDate.Value.Date == Convert.ToDateTime(time).Date && x.UnitWorkId == joint.UnitWorkId); var weldTask=db.HJGL_WeldTask.FirstOrDefault(x=>x.WeldJointId==joint.WeldJointId); if (weldingDaily == null) { @@ -461,17 +461,11 @@ namespace BLL /// private static string InsertWeldingDailyItem(string weldJointId, string coverWelderId, string backingWelderId, string jointAttribute, DateTime? weldingDate, string batchCondition, bool isSave, string weldingDailyId, string projectId) { - string errlog = string.Empty; - string[] condition = batchCondition.Split('|'); - var project = BLL.ProjectService.GetProjectByProjectId(projectId); + string errlog = string.Empty; var newWeldJoint = BLL.WeldJointService.GetWeldJointByWeldJointId(weldJointId); - var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId); - var unitWork = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(pipeline.UnitWorkId); - var unit = BLL.UnitService.GetUnitByUnitId(pipeline.UnitId); - var ndt = BLL.Base_DetectionTypeService.GetDetectionTypeByDetectionTypeId(newWeldJoint.DetectionTypeId); - var ndtr = BLL.Base_DetectionRateService.GetDetectionRateByDetectionRateId(pipeline.DetectionRateId); + var pipeline = BLL.PipelineService.GetPipelineByPipelineId(newWeldJoint.PipelineId); var weldingDaily = BLL.WeldingDailyService.GetPipeline_WeldingDailyByWeldingDailyId(weldingDailyId); - if (newWeldJoint != null && string.IsNullOrEmpty(newWeldJoint.WeldingDailyId)) + if (newWeldJoint != null /*&& string.IsNullOrEmpty(newWeldJoint.WeldingDailyId)*/) { if (!string.IsNullOrEmpty(coverWelderId) && !string.IsNullOrEmpty(backingWelderId)) { @@ -481,6 +475,8 @@ namespace BLL newWeldJoint.WeldingDailyCode = weldingDaily.WeldingDailyCode; newWeldJoint.CoverWelderId = coverWelderId; newWeldJoint.BackingWelderId = backingWelderId; + newWeldJoint.CoverWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, coverWelderId).TeamGroupId; + newWeldJoint.BackingWelderTeamGroupId = SitePerson_PersonService.GetSitePersonByProjectIdPersonId(pipeline.ProjectId, backingWelderId).TeamGroupId; //if (item.WeldingLocationId != Const._Null) //{ // newWeldJoint.WeldingLocationId = item.WeldingLocationId; @@ -493,163 +489,12 @@ namespace BLL // 进批 //BLL.Batch_PointBatchItemService.InsertPointBatch(this.ProjectId, this.drpUnit.SelectedValue, this.drpUnitWork.SelectedValue, item.CoverWelderId, item.WeldJointId, weldingDate); - bool isPass = true; - foreach (string c in condition) + if (isSave) { - if (c == "1") - { - if (string.IsNullOrEmpty(pipeline.UnitWorkId)) - { - isPass = false; - break; - } - } - if (c == "2") - { - if (string.IsNullOrEmpty(pipeline.UnitId)) - { - isPass = false; - break; - - } - } - if (c == "3") - { - if (string.IsNullOrEmpty(newWeldJoint.DetectionTypeId)) - { - isPass = false; - break; - } - } - if (c == "4") - { - if (string.IsNullOrEmpty(pipeline.DetectionRateId)) - { - isPass = false; - break; - } - } - if (c == "5") - { - if (string.IsNullOrEmpty(pipeline.PipingClassId)) - { - isPass = false; - break; - } - } - // 6是管线,7是焊工都不可能为空,这里就不判断了 + errlog = PointBatchService.AddBatchByWeldJointId(weldJointId, weldingDate, batchCondition);//自动组批 } - if (isPass) - { - string strSql = @"SELECT PointBatchId FROM dbo.HJGL_Batch_PointBatch - WHERE (EndDate IS NULL OR EndDate ='') - AND ProjectId = @ProjectId - AND UnitWorkId = @UnitWorkId AND UnitId =@UnitId - AND DetectionTypeId =@DetectionTypeId - AND DetectionRateId =@DetectionRateId"; - List listStr = new List(); - listStr.Add(new SqlParameter("@ProjectId", projectId)); - listStr.Add(new SqlParameter("@UnitWorkId", pipeline.UnitWorkId)); - listStr.Add(new SqlParameter("@UnitId", pipeline.UnitId)); - listStr.Add(new SqlParameter("@DetectionTypeId", newWeldJoint.DetectionTypeId)); - listStr.Add(new SqlParameter("@DetectionRateId", pipeline.DetectionRateId)); - - // 5,6,7项为可选项 - if (condition.Contains("5")) - { - strSql += " AND PipingClassId =@PipingClassId"; - listStr.Add(new SqlParameter("@PipingClassId", pipeline.PipingClassId)); - } - if (condition.Contains("6")) - { - strSql += " AND PipelineId =@PipelineId"; - listStr.Add(new SqlParameter("@PipelineId", newWeldJoint.PipelineId)); - } - if (condition.Contains("7")) - { - strSql += " AND WelderId =@WelderId"; - listStr.Add(new SqlParameter("@WelderId", newWeldJoint.CoverWelderId)); - } - - SqlParameter[] parameter = listStr.ToArray(); - DataTable batchInfo = SQLHelper.GetDataTableRunText(strSql, parameter); - - string batchId = string.Empty; - if (batchInfo.Rows.Count == 0) - { - Model.HJGL_Batch_PointBatch batch = new Model.HJGL_Batch_PointBatch(); - batch.PointBatchId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_PointBatch)); - batchId = batch.PointBatchId; - string perfix = project.ProjectCode + "-" + unitWork.UnitWorkCode + "-GD-DK-" + ndt.DetectionTypeCode + "-" + ndtr.DetectionRateValue.ToString() + "%-"; - batch.PointBatchCode = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_Batch_PointBatch", "PointBatchCode", projectId, perfix); - - batch.ProjectId = projectId; - batch.UnitWorkId = pipeline.UnitWorkId; - batch.BatchCondition = batchCondition; - batch.UnitId = pipeline.UnitId; - batch.DetectionTypeId = newWeldJoint.DetectionTypeId; - batch.DetectionRateId = pipeline.DetectionRateId; - if (condition.Contains("5")) - { - batch.PipingClassId = pipeline.PipingClassId; - } - if (condition.Contains("6")) - { - batch.PipelineId = newWeldJoint.PipelineId; - } - if (condition.Contains("7")) - { - batch.WelderId = newWeldJoint.CoverWelderId; - } - batch.StartDate = DateTime.Now; - BLL.PointBatchService.AddPointBatch(batch); - } - else - { - batchId = batchInfo.Rows[0][0].ToString(); - } - - var b = BLL.PointBatchDetailService.GetBatchDetailByJotId(weldJointId); - if (b == null) - { - try - { - Model.HJGL_Batch_PointBatchItem batchDetail = new Model.HJGL_Batch_PointBatchItem(); - string pointBatchItemId = SQLHelper.GetNewID(typeof(Model.HJGL_Batch_PointBatchItem)); - batchDetail.PointBatchItemId = pointBatchItemId; - batchDetail.PointBatchId = batchId; - batchDetail.WeldJointId = weldJointId; - batchDetail.WeldingDate = weldingDate; - batchDetail.CreatDate = DateTime.Now; - BLL.Funs.DB.HJGL_Batch_PointBatchItem.InsertOnSubmit(batchDetail); - BLL.Funs.DB.SubmitChanges(); - - // 焊工首道口RT必点 - var joints = from x in Funs.DB.HJGL_Batch_PointBatchItem - join y in Funs.DB.HJGL_Batch_PointBatch on x.PointBatchId equals y.PointBatchId - join z in Funs.DB.Base_DetectionType on y.DetectionTypeId equals z.DetectionTypeId - join j in Funs.DB.HJGL_WeldJoint on x.WeldJointId equals j.WeldJointId - where z.DetectionTypeCode == "RT" - && j.CoverWelderId == newWeldJoint.CoverWelderId - select x; - if (joints.Count() <= 1) - { - BLL.PointBatchDetailService.UpdatePointBatchDetail(pointBatchItemId, "1", System.DateTime.Now); - BLL.PointBatchDetailService.UpdateWelderFirst(pointBatchItemId, true); - } - } - catch - { - - } - } - } - else - { - errlog += "焊口【" + newWeldJoint.WeldJointCode + "】组批条件不能为空。"; - } } diff --git a/SGGL/BLL/CLGL/TwInOutplandetailRelationService.cs b/SGGL/BLL/CLGL/TwInOutplandetailRelationService.cs index 0be38443..a9ada9c2 100644 --- a/SGGL/BLL/CLGL/TwInOutplandetailRelationService.cs +++ b/SGGL/BLL/CLGL/TwInOutplandetailRelationService.cs @@ -203,5 +203,29 @@ namespace BLL TwInoutplandetailRelationService.AddList(twinoutplandetailRelationList, inOutPlanMasterId); } + + + public static IEnumerable GetPrintListByOutputMasterIds(List outputMasterIds) + { + var q = from x in Funs.DB.Tw_InOutPlanDetail_Relation + join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode + join plan in Funs.DB.Tw_InOutPlanMaster on x.InOutPlanMasterId equals plan.Id + join master in Funs.DB.Tw_OutputMaster on plan.Id equals master.InOutPlanMasterId + join pipe in Funs.DB.HJGL_Pipeline on x.PipelineId equals pipe.PipelineId + where outputMasterIds.Contains(master.Id) + orderby master.CusBillCode + select new + { + 出库单编号 = master.CusBillCode, + 管线号=pipe.PipelineCode, + 预制组件号= x.PrefabricatedComponents, + 材料编码 = x.MaterialCode, + 材料名称 = y.MaterialName, + 材料描述 = y.MaterialDef, + 单位=y.MaterialUnit, + 所需量 = x.Number, + }; + return q; + } } } \ No newline at end of file diff --git a/SGGL/BLL/CLGL/TwOutputdetailService..cs b/SGGL/BLL/CLGL/TwOutputdetailService..cs index 73366d9e..ec1565dd 100644 --- a/SGGL/BLL/CLGL/TwOutputdetailService..cs +++ b/SGGL/BLL/CLGL/TwOutputdetailService..cs @@ -129,5 +129,24 @@ namespace BLL } + public static IEnumerable GetPrintListByOutputMasterIds(List outputMasterIds) + { + var q= from x in Funs.DB.Tw_OutputDetail + join y in Funs.DB.HJGL_MaterialCodeLib on x.MaterialCode equals y.MaterialCode + join master in Funs.DB.Tw_OutputMaster on x.OutputMasterId equals master.Id + where outputMasterIds.Contains(x.OutputMasterId) + orderby master.CusBillCode + select new + { + 出库单编号 = master.CusBillCode, + 材料编码 = x.MaterialCode, + 材料名称 = y.MaterialName, + 材料描述 = y.MaterialDef, + 计划数量 = x.PlanNum, + 实际数量 = x.ActNum, + }; + return q; + } + } } \ No newline at end of file diff --git a/SGGL/BLL/CLGL/TwOutputmasterService.cs b/SGGL/BLL/CLGL/TwOutputmasterService.cs index 8650d177..990223c2 100644 --- a/SGGL/BLL/CLGL/TwOutputmasterService.cs +++ b/SGGL/BLL/CLGL/TwOutputmasterService.cs @@ -52,6 +52,7 @@ namespace BLL (table.TypeInt == null || x.TypeInt == table.TypeInt) && (table.Category == null || x.Category == table.Category) && (table.State == null || x.State == table.State) + orderby x.CreateDate descending select new Model.Tw_InOutMasterOutput { Id = x.Id, diff --git a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs index f87516e6..cf0e465e 100644 --- a/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs +++ b/SGGL/BLL/HJGL/PointTrust/PointBatchService.cs @@ -158,7 +158,7 @@ namespace BLL } if (c == "2") { - if (string.IsNullOrEmpty(pipeline.UnitId)) + if (string.IsNullOrEmpty(WeldingDaily.UnitId)) { isPass = false; break; diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx index 5fd4633a..19ee4bf6 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx @@ -77,6 +77,9 @@ + + diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs index 147ffba1..de8bfd99 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.cs @@ -53,6 +53,11 @@ namespace FineUIPro.Web.CLGL drpStates.DataSource = BLL.TwConst.StateMap; drpStates.DataBind(); Funs.FineUIPleaseSelect(this.drpStates); + drpCategory.DataTextField = "Key"; + drpCategory.DataValueField = "Value"; + drpCategory.DataSource = BLL.TwConst.CategoryMap; + drpCategory.DataBind(); + Funs.FineUIPleaseSelect(this.drpCategory); } #region 数据绑定 @@ -72,6 +77,10 @@ namespace FineUIPro.Web.CLGL { table.State = Convert.ToInt32(drpStates.SelectedValue); } + if (drpCategory.SelectedValue != Const._Null) + { + table.Category = Convert.ToInt32(drpCategory.SelectedValue); + } if (drpWarehouse.SelectedValue != Const._Null) { table.WarehouseCode = drpWarehouse.SelectedValue; @@ -284,6 +293,7 @@ namespace FineUIPro.Web.CLGL ReqUnitName = result.ReqUnitName, CusBillCode = result.CusBillCode, CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"), + CreateManName = !string.IsNullOrEmpty(result.CreateMan) ? BLL.Person_PersonsService.getSignatureUrl(result.CreateMan) : "", ProjectName = ProjectService.GetProjectNameByProjectId(result.ProjectId), CategoryString = result.CategoryString, BillName = TwConst.PlanPrintMap.Where(x => x.Value == result.TypeInt).Select(x => x.Key).FirstOrDefault(), diff --git a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.designer.cs index 947c4f13..ce42a0a3 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutPlanMaster.aspx.designer.cs @@ -149,6 +149,15 @@ namespace FineUIPro.Web.CLGL /// protected global::FineUIPro.DropDownList drpStates; + /// + /// drpCategory 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCategory; + /// /// ToolbarFill1 控件。 /// diff --git a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx index 6a800010..dc2da718 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx +++ b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx @@ -76,6 +76,9 @@ + + @@ -84,6 +87,9 @@ + + diff --git a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs index a88399b1..3614f27a 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.cs @@ -10,6 +10,8 @@ using System.Text; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; +using MiniExcelLibs; +using NPOI.SS.Formula.Functions; namespace FineUIPro.Web.CLGL { @@ -47,6 +49,11 @@ namespace FineUIPro.Web.CLGL drpStates.DataSource = BLL.TwConst.StateMap; drpStates.DataBind(); Funs.FineUIPleaseSelect(this.drpStates); + drpCategory.DataTextField = "Key"; + drpCategory.DataValueField = "Value"; + drpCategory.DataSource = BLL.TwConst.CategoryMap; + drpCategory.DataBind(); + Funs.FineUIPleaseSelect(this.drpCategory); } #region 数据绑定 @@ -66,6 +73,10 @@ namespace FineUIPro.Web.CLGL { table.State = Convert.ToInt32(drpStates.SelectedValue); } + if (drpCategory.SelectedValue != Const._Null) + { + table.Category = Convert.ToInt32(drpCategory.SelectedValue); + } if (drpWarehouse.SelectedValue != Const._Null) { table.WarehouseCode = drpWarehouse.SelectedValue; @@ -558,10 +569,11 @@ namespace FineUIPro.Web.CLGL List tw_PrintDetails = new List(); Model.Tw_PrintMaster printMaster = new Model.Tw_PrintMaster { - + ReqUnitName = result.ReqUnitName, CusBillCode = result.CusBillCode, CreateDate = result.CreateDate.Value.ToString("yyyy-MM-dd"), + CreateManName = !string.IsNullOrEmpty(result.CreateMan) ? BLL.Person_PersonsService.getSignatureUrl(result.CreateMan) : "", ProjectName = ProjectService.GetProjectNameByProjectId(result.ProjectId), CategoryString = result.CategoryString, BillName = TwConst.PrintMap.Where(x => x.Value == result.TypeInt).Select(x => x.Key).FirstOrDefault(), @@ -650,5 +662,32 @@ namespace FineUIPro.Web.CLGL #endregion + protected void btnOut_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIDArray.Length > 0) + { + var sheets = new Dictionary + { + ["出库明细"] = TwOutputdetailService.GetPrintListByOutputMasterIds(Grid1.SelectedRowIDArray.ToList()), + ["管线材料明细"] = TwInoutplandetailRelationService.GetPrintListByOutputMasterIds(Grid1.SelectedRowIDArray.ToList()) + }; + string path = Funs.RootPath + @"File\Excel\Temp\OutputDetail.xlsx"; + path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); + + MiniExcel.SaveAs(path, sheets); + + string fileName = "出库明细表.xlsx"; + FileInfo info = new FileInfo(path); + long fileSize = info.Length; + System.Web.HttpContext.Current.Response.Clear(); + System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed"; + System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString()); + System.Web.HttpContext.Current.Response.TransmitFile(path, 0, fileSize); + System.Web.HttpContext.Current.Response.Flush(); + System.Web.HttpContext.Current.Response.Close(); + File.Delete(path); + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.designer.cs b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.designer.cs index e6444bfa..ac80dc43 100644 --- a/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CLGL/OutputMaster.aspx.designer.cs @@ -149,6 +149,15 @@ namespace FineUIPro.Web.CLGL /// protected global::FineUIPro.DropDownList drpStates; + /// + /// drpCategory 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCategory; + /// /// ToolbarFill1 控件。 /// @@ -185,6 +194,15 @@ namespace FineUIPro.Web.CLGL /// protected global::FineUIPro.Button btnGenOutPlanMaster; + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + /// /// Grid1 控件。 /// diff --git a/SGGL/FineUIPro.Web/File/Fastreport/材料出库单.frx b/SGGL/FineUIPro.Web/File/Fastreport/材料出库单.frx index ea4c5193..81a439cb 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; @@ -84,7 +84,7 @@ namespace FastReport } - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/材料出库计划单.frx b/SGGL/FineUIPro.Web/File/Fastreport/材料出库计划单.frx index c308aa62..b0a5e3d0 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; @@ -84,7 +84,7 @@ namespace FastReport } - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊接任务单.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊接任务单.frx index c6bc0ac7..78ec0792 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; @@ -59,7 +59,7 @@ namespace FastReport } - + @@ -174,33 +174,25 @@ namespace FastReport - - - - - - - + + + + + - + - - - + - - - - - + diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx index 330b1bd5..cd5fb01b 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx @@ -130,6 +130,10 @@ HeaderText="总焊口量" HeaderTextAlign="Center" TextAlign="Right"> + + diff --git a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs index 208981a3..353ca5bc 100644 --- a/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/InfoQuery/PipelineQuery.aspx.cs @@ -317,6 +317,7 @@ namespace FineUIPro.Web.HJGL.InfoQuery 完成焊口=x.FinishJointCount, 总达因数 =x.TotalDin, 总焊口量=x.JointCount, + 预制口量=x.ShopJointCount, 管线划分 = x.PipeAreaStr, 无损检测类型=x.DetectionTypeCode, 探伤比例 =x.DetectionRateCode, diff --git a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx index 1deb0646..0bf00fb3 100644 --- a/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx +++ b/SGGL/FineUIPro.Web/HJGL/WeldingManage/WeldTask.aspx @@ -87,9 +87,7 @@ - - - +