diff --git a/DataBase/版本日志/HJGLDB_DS_2026-07-23_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-07-23_bwj.sql new file mode 100644 index 0000000..1882fb2 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-07-23_bwj.sql @@ -0,0 +1,125 @@ + +ALTER VIEW [dbo].[HJGL_View_JointInfo] +AS +/*ߺϢͼ*/ +SELECT + JointInfo.JOT_ID, + JointInfo.ProjectId, + JointInfo.PointType, + JointInfo.RT1_RepairFilm, + JointInfo.dreportid, + IsoInfo.BSU_ID, + JointInfo.STE_ID, + JOT_JointNo, + JOT_DailyReportNo, --ձ + (CASE WHEN JointInfo.Jot_WeldingDate IS NOT NULL THEN JointInfo.Jot_WeldingDate + ELSE WeldReportMain.JOT_WeldDate END) AS JOT_WeldDate, -- + JointInfo.ISO_ID, + ISO_IsoNo, --ߺ + Unit.UnitCode, + Unit.UnitName, + Steel.STE_Code AS STE_Name1,--1 + Steel1.STE_Code AS STE_Name2,--2 + Welder.WED_Code AS WED_Code1, --溸 + Welder.WED_Name AS WED_Name1, --溸 + FloorWelder.WED_Code AS WED_Code2, --׺ + FloorWelder.WED_Name AS WED_Name2, --׺ + JointInfo.WLO_Code, + (CASE WHEN JointInfo.WLO_Code='F' THEN 'ֳװ' ELSE 'Ԥ' END) AS WLO_Name,-- + JOT_DoneDin, + IS_Compute, + com1.Com_Name AS Component1,--1 + com1.COM_Code AS COM_Code1,--1 + com2.COM_Name AS Component2,--2 + com2.COM_Code AS COM_Code2,--1 + m1.WeldName AS WeldMat,-- + WeldMaterial.WeldName AS WeldSilk,--˿ + batchDetail.PointType AS JointStatus,---״̬ + JOT_Dia, + JOT_Size, + JOT_Sch, + JOT_FactSch, + JOT_JointFlag, + JOT_TrustFlag, + ProessTypes, + JOT_JointDesc, + JointInfo.JOTY_ID, + JointType.JOTY_Name,-- + JointType.JOTY_Code,-- + JointInfo.WME_ID, + WeldMethod.WME_Name AS WME_Name,--ӷ + WeldMethod.WME_Code,--ӷ + SlopeType.JST_Name, --¿ + SlopeType.JST_Code, --¿ʹ + IS_Proess, + (CASE WHEN IS_Proess=1 THEN '' ELSE '' END) AS IS_ProessName, + JOT_PrepareTemp, + JOT_CellTemp, + JOT_LastTemp, + JOT_JointAttribute, + JOT_Location, + batch.BatchCode AS BatchCode,--κ + batchDetail.PointDate AS PointDate,-- + NULL AS CH_TrustCode, NULL AS CH_TrustDate, + --NDTType.NDT_Name as NDT_Name,--̽ + JointInfo.JOT_Remark, + JointInfo.RT_States, + JointInfo.UT_States, + JointInfo.MT_States, + JointInfo.PT_States, + JointInfo.PAUT_States, + (case when (select top 1 IsOK from HJGL_CH_HotProessResult hr where hr.JOT_ID=JointInfo.JOT_ID)=1 then 'ϸ' + else '' end) as HotProessResult, + Servicess.SER_Code,--ʴ + --NDTRate.NDTR_Name as NDTR_Name, --̽˱ + --NDTRate.NDTR_Code, --̽˱ + isoInfo.ISO_TestPress,--ѹ + isoInfo.ISO_DesignPress,--ѹ + isoInfo.ISO_DesignTemperature,--¶ + IsoClass.ISC_IsoCode,--ߵȼ + is_hj= CAST((CASE WHEN JointInfo.DReportID IS NULL THEN '0' ELSE '1' END ) AS BIT), --Ƿ񺸽 + if_dk=CAST((CASE WHEN batchDetail.NDT IS NULL THEN '0' ELSE '1' END) AS BIT), --Ƿ + JointInfo.InstallationId, + JointInfo.NDTR_ID, + JointInfo.IsSpecial, + JointInfo.IsSpecial AS IsSpecialName, --Ƿ + Installation.InstallationName,--װ + NDTRate.NDTR_Name, + JointInfo.Sort1,JointInfo.Sort2,JointInfo.Sort3,JointInfo.Sort4,JointInfo.Sort5 + ,JointType.JOTY_Group, + JointInfo.JOT_Electricity,--ӵ + JointInfo.JOT_Voltage, --ӵѹ + JointInfo.WeldL, --dz + JointInfo.IsGold,--Ƿƽ + JointInfo.JOT_QualifiedLevel, --ϸȼ + Steel.HardQuaStandard--ӲȺϸ׼ +FROM HJGL_PW_JointInfo AS JointInfo +LEFT JOIN HJGL_PW_IsoInfo AS IsoInfo ON IsoInfo.ISO_ID=JointInfo.ISO_ID +LEFT JOIN HJGL_BO_WeldReportMain AS WeldReportMain ON WeldReportMain.DReportID=JointInfo.DReportID +LEFT JOIN HJGL_BS_Steel AS Steel ON Steel.STE_ID=JointInfo.STE_ID +LEFT JOIN HJGL_BS_Steel AS Steel1 ON Steel1.STE_ID=JointInfo.STE_ID2 +LEFT JOIN HJGL_BS_Welder AS Welder ON Welder.WED_ID= JointInfo.JOT_CellWelder +LEFT JOIN HJGL_BS_Welder AS FloorWelder ON FloorWelder.WED_ID=JointInfo.JOT_FloorWelder +--LEFT JOIN HJGL_BS_WeldLocation AS WeldLocation ON WeldLocation.WLO_Code =JointInfo.WLO_Code +LEFT JOIN HJGL_BS_Component AS com1 ON com1.COM_ID=JointInfo.JOT_Component1 +LEFT JOIN HJGL_BS_Component AS com2 ON com2.COM_ID=JointInfo.JOT_Component2 +--LEFT JOIN HJGL_BS_WeldMaterial m1 ON m1.WMT_ID=JointInfo.JOT_WeldMat +--LEFT JOIN HJGL_BS_WeldMaterial AS WeldMaterial ON WeldMaterial.WMT_ID=JointInfo.JOT_WeldSilk +LEFT JOIN View_WeldInfoDropDownLists as m1 on m1.WeldId = JointInfo.JOT_WeldMat and m1.WeldTypeName like '%%' +LEFT JOIN View_WeldInfoDropDownLists as WeldMaterial on WeldMaterial.WeldId = JointInfo.JOT_WeldSilk and WeldMaterial.WeldTypeName like '%˿%' +LEFT JOIN HJGL_BS_JointType AS JointType ON JointType.JOTY_ID=JointInfo.JOTY_ID +LEFT JOIN HJGL_BS_WeldMethod AS WeldMethod ON WeldMethod .WME_ID=JointInfo.WME_ID +LEFT JOIN HJGL_BS_SlopeType AS SlopeType ON SlopeType.JST_ID=JointInfo.JST_ID +LEFT JOIN dbo.HJGL_BO_BatchDetail AS batchDetail ON batchDetail.JOT_ID = JointInfo.JOT_ID +LEFT JOIN dbo.HJGL_BO_Batch AS batch ON batch.BatchId = batchDetail.BatchId +LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=IsoInfo.BSU_ID +--left join HJGL_BS_NDTRate AS NDTRate on NDTRate.NDTR_ID=IsoInfo.NDTR_ID +LEFT JOIN HJGL_BS_Service AS Servicess ON Servicess.SER_ID=IsoInfo.SER_ID +LEFT JOIN HJGL_BS_IsoClass AS IsoClass ON IsoClass.ISC_ID=IsoInfo.ISC_ID +LEFT JOIN Project_Installation AS Installation ON Installation.InstallationId =JointInfo.InstallationId +LEFT JOIN HJGL_BS_NDTRate AS NDTRate ON NDTRate.NDTR_ID =JointInfo.NDTR_ID + + +GO + + diff --git a/DataBase/版本日志/HJGLDB_DS_2026-07-28_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-07-28_bwj.sql new file mode 100644 index 0000000..20cc6a7 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-07-28_bwj.sql @@ -0,0 +1,113 @@ + +ALTER PROC [dbo].[HJGL_sp_rpt_welderStatistics] + @unitcode varchar(50) = NULL, + @WED_ID nvarchar(50) = NULL, + @projectId NVARCHAR(50) = NULL +AS +/*ӼͳƱ*/ +SELECT welder.ProjectWelderId, + welder.ProjectId, + project.ProjectCode,--ʩ + wld.wed_code,-- + wld.wed_name,-- + + ISNULL(totalJoint.totalJoint,0) AS totalJoint, --Ѻ + ISNULL(TrustJointNum.TrustJointNum,0) AS TrustJointNum, --ίк + CAST((CASE ISNULL(TrustJointNum.TrustJointNum,0) WHEN 0 THEN 0 + ELSE 1.0 * ISNULL(TrustJointNum.TrustJointNum,0)/(1.0 * totalJoint.totalJoint) END) AS DECIMAL(19,3)) + AS OneCheckRate , ---һμ + + ISNULL(FixedJoint.FixedJoint,0) AS FixedJoint, --Ѻ̶ + ISNULL(TrustFixedJoint.TrustFixedJoint,0) AS TrustFixedJoint, --ίй̶ + CAST((CASE ISNULL(TrustFixedJoint.TrustFixedJoint,0) WHEN 0 THEN 0 + ELSE 1.0 * ISNULL(TrustFixedJoint.TrustFixedJoint,0)/(1.0 * FixedJoint.FixedJoint) END) AS DECIMAL(19,3)) + AS FixedJointCheckRate , ---̶ڼ + + ISNULL(ButtJoint.ButtJoint,0) AS ButtJoint, --ѺԽӺ + ISNULL(TrustButtJoint.TrustButtJoint,0) AS TrustButtJoint, --ίжԽӺ + CAST((CASE ISNULL(TrustButtJoint.TrustButtJoint,0) WHEN 0 THEN 0 + ELSE 1.0 * ISNULL(TrustButtJoint.TrustButtJoint,0)/(1.0 * ButtJoint.ButtJoint) END) AS DECIMAL(19,3)) + AS ButtJointCheckRate , ---ԽӺ + + ISNULL(FilletJoint.FilletJoint,0) AS FilletJoint, --ѺǺ + ISNULL(TrustFilletJoint.TrustFilletJoint,0) AS TrustFilletJoint, --ίнǺ + CAST((CASE ISNULL(TrustFilletJoint.TrustFilletJoint,0) WHEN 0 THEN 0 + ELSE 1.0 * ISNULL(TrustFilletJoint.TrustFilletJoint,0)/(1.0 * FilletJoint.FilletJoint) END) AS DECIMAL(19,3)) + AS FilletJointCheckRate + +FROM dbo.Project_Welder AS welder +LEFT JOIN Base_Project project on welder.ProjectId=project.ProjectId +LEFT JOIN dbo.HJGL_BS_Welder wld on wld.WED_ID=welder.WED_ID + --Ѻ +LEFT JOIN (SELECT COUNT(*) AS totalJoint,HJGL_pw_jointinfo.JOT_CellWelder,ProjectId + FROM HJGL_PW_JointInfo + WHERE HJGL_pw_jointinfo.DReportID is not null + GROUP BY HJGL_pw_jointinfo.JOT_CellWelder,ProjectId) AS totalJoint ON totalJoint.JOT_CellWelder = welder.WED_ID and totalJoint.ProjectId=welder.ProjectId + + --Ѻ̶ +LEFT JOIN (SELECT COUNT(*) AS FixedJoint,JOT_CellWelder,ProjectId + FROM HJGL_PW_JointInfo + WHERE DReportID is not null AND JOT_JointAttribute='̶' + GROUP BY HJGL_pw_jointinfo.JOT_CellWelder,ProjectId) AS FixedJoint ON FixedJoint.JOT_CellWelder = welder.WED_ID and FixedJoint.ProjectId=welder.ProjectId + + + --ѺԽӺ +LEFT JOIN (SELECT COUNT(*) AS ButtJoint,joint.JOT_CellWelder,ProjectId + FROM HJGL_PW_JointInfo joint + LEFT JOIN dbo.HJGL_BS_JointType jointType on jointType.JOTY_ID=joint.JOTY_ID + WHERE DReportID is not null AND jointType.JOTY_Group='1' + GROUP BY joint.JOT_CellWelder,ProjectId) AS ButtJoint ON ButtJoint.JOT_CellWelder = welder.WED_ID and ButtJoint.ProjectId=welder.ProjectId + + + --ѺǺ +LEFT JOIN (SELECT COUNT(*) AS FilletJoint,joint.JOT_CellWelder,ProjectId + FROM HJGL_PW_JointInfo joint + LEFT JOIN dbo.HJGL_BS_JointType jointType on jointType.JOTY_ID=joint.JOTY_ID + WHERE DReportID is not null AND jointType.JOTY_Group='2' + GROUP BY joint.JOT_CellWelder,ProjectId) AS FilletJoint ON FilletJoint.JOT_CellWelder = welder.WED_ID and FilletJoint.ProjectId=welder.ProjectId + + +--ίк + LEFT JOIN (SELECT COUNT(*) AS TrustJointNum,joint.JOT_CellWelder,ProjectId + FROM dbo.HJGL_BO_BatchDetail batchDetail + LEFT JOIN HJGL_pw_jointinfo joint ON joint.jot_id=batchDetail.jot_id + WHERE (batchDetail.NDT is not null OR batchDetail.NDT!='') and joint.JOT_JointNo not like '%A%' and joint.JOT_JointNo not like '%B%' and batchDetail.PointType!='2' + GROUP BY joint.JOT_CellWelder,ProjectId) AS TrustJointNum ON TrustJointNum.JOT_CellWelder = welder.WED_ID and TrustJointNum.ProjectId=welder.ProjectId + + +--ίй̶ + LEFT JOIN (SELECT COUNT(*) AS TrustFixedJoint,joint.JOT_CellWelder,ProjectId + FROM dbo.HJGL_BO_BatchDetail batchDetail + LEFT JOIN HJGL_pw_jointinfo joint ON joint.jot_id=batchDetail.jot_id + WHERE (batchDetail.NDT is not null OR batchDetail.NDT!='') + AND joint.JOT_JointAttribute='̶' and joint.JOT_JointNo not like '%A%' and joint.JOT_JointNo not like '%B%' and batchDetail.PointType!='2' + GROUP BY joint.JOT_CellWelder,ProjectId) AS TrustFixedJoint ON TrustFixedJoint.JOT_CellWelder = welder.WED_ID and TrustFixedJoint.ProjectId=welder.ProjectId + + +--ίжԽӺ + LEFT JOIN (SELECT COUNT(*) AS TrustButtJoint,joint.JOT_CellWelder,ProjectId + FROM dbo.HJGL_BO_BatchDetail batchDetail + LEFT JOIN HJGL_pw_jointinfo joint ON joint.jot_id=batchDetail.jot_id + LEFT JOIN dbo.HJGL_BS_JointType jointType on jointType.JOTY_ID=joint.JOTY_ID + WHERE (batchDetail.NDT is not null OR batchDetail.NDT!='') + AND jointType.JOTY_Group='1' and joint.JOT_JointNo not like '%A%' and joint.JOT_JointNo not like '%B%' and batchDetail.PointType!='2' + GROUP BY joint.JOT_CellWelder,ProjectId) AS TrustButtJoint ON TrustButtJoint.JOT_CellWelder = welder.WED_ID and TrustButtJoint.ProjectId=welder.ProjectId + +--ίнǺ + LEFT JOIN (SELECT COUNT(*) AS TrustFilletJoint,joint.JOT_CellWelder,ProjectId + FROM dbo.HJGL_BO_BatchDetail batchDetail + LEFT JOIN HJGL_pw_jointinfo joint ON joint.jot_id=batchDetail.jot_id + LEFT JOIN dbo.HJGL_BS_JointType jointType on jointType.JOTY_ID=joint.JOTY_ID + WHERE (batchDetail.NDT is not null OR batchDetail.NDT!='') + AND jointType.JOTY_Group='2' and joint.JOT_JointNo not like '%A%' and joint.JOT_JointNo not like '%B%' and batchDetail.PointType!='2' + GROUP BY joint.JOT_CellWelder,ProjectId) AS TrustFilletJoint ON TrustFilletJoint.JOT_CellWelder = welder.WED_ID and TrustFilletJoint.ProjectId=welder.ProjectId + + +WHERE (welder.ProjectId = @projectId OR @projectId IS NULL) +AND (wld.WED_Unit=@unitcode OR @unitcode IS NULL) +AND (wld.WED_ID=@WED_ID OR @WED_ID is null) +order BY wld.WED_Code + + +GO + diff --git a/DataBase/版本日志/HJGLDB_DS_2026-08-07_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-08-07_bwj.sql new file mode 100644 index 0000000..b4c6ac9 --- /dev/null +++ b/DataBase/版本日志/HJGLDB_DS_2026-08-07_bwj.sql @@ -0,0 +1,22 @@ + +alter table HJGL_PW_JointInfo add QRCodeAttachUrl nvarchar(200) +go + +CREATE view [dbo].[View_PrintJointInfo] +as +select joint.JOT_ID, +joint.ProjectId, +joint.ISO_ID, +unit.UnitName, +installation.InstallationName, +iso.ISO_IsoNo, +joint.JOT_JointNo, +joint.JOT_JointDesc, +Steel.STE_Code, +joint.QRCodeAttachUrl +from HJGL_PW_JointInfo as joint +left join HJGL_PW_IsoInfo as iso on iso.ISO_ID = joint.ISO_ID +left join Project_Installation as installation on installation.InstallationId = joint.InstallationId +left join Base_Unit as unit on unit.UnitId = iso.BSU_ID +LEFT JOIN HJGL_BS_Steel AS Steel ON Steel.STE_ID = joint.STE_ID +GO diff --git a/HJGL_DS/BLL/API/APIBaseServices.cs b/HJGL_DS/BLL/API/APIBaseServices.cs index 0e2214f..10cbb17 100644 --- a/HJGL_DS/BLL/API/APIBaseServices.cs +++ b/HJGL_DS/BLL/API/APIBaseServices.cs @@ -222,6 +222,70 @@ namespace BLL.API return respone; } + public static Model.ResponeData weldMethodList() + { + Model.ResponeData respone = new ResponeData(); + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var q = BLL.HJGL_WeldingMethodService.GetWeldMethodNameList(); + List res = new List(); + foreach (var p in q) + { + WeldMethodItem item = new WeldMethodItem(); + item.WME_ID = p.WME_ID; + item.WME_Name = p.WME_Name; + res.Add(item); + } + + respone.data = res; + } + return respone; + } + + public static Model.ResponeData weldSilkList() + { + Model.ResponeData respone = new ResponeData(); + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var q = from x in db.View_WeldInfoDropDownLists + where x.WeldTypeName.Contains("焊丝") + select x; + List res = new List(); + foreach (var p in q) + { + WeldInfoItem item = new WeldInfoItem(); + item.WeldId = p.WeldId; + item.WeldName = p.WeldName; + res.Add(item); + } + + respone.data = res; + } + return respone; + } + + public static Model.ResponeData weldMatList() + { + Model.ResponeData respone = new ResponeData(); + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var q = from x in db.View_WeldInfoDropDownLists + where x.WeldTypeName.Contains("焊条") + select x; + List res = new List(); + foreach (var p in q) + { + WeldInfoItem item = new WeldInfoItem(); + item.WeldId = p.WeldId; + item.WeldName = p.WeldName; + res.Add(item); + } + + respone.data = res; + } + return respone; + } + public static Model.ResponeData getWeldInfo(string weldId) { Model.ResponeData respone = new ResponeData(); diff --git a/HJGL_DS/BLL/API/APIWeldServices.cs b/HJGL_DS/BLL/API/APIWeldServices.cs index bd2f877..35f1ed6 100644 --- a/HJGL_DS/BLL/API/APIWeldServices.cs +++ b/HJGL_DS/BLL/API/APIWeldServices.cs @@ -25,7 +25,7 @@ namespace BLL.API projectids.AddRange(wpids); if (userId == BLL.Const.GlyId) { - projectids = (from x in db.Base_Project where x.ProjectSoft == "1" select x.ProjectId).ToList(); + projectids = (from x in db.Base_Project where x.ProjectSoft == "1" select x.ProjectId).Take(2000).ToList(); } var q = from x in db.Weld_UsingPlan where projectids.Contains(x.ProjectId) && (x.UsingManOne == userId || x.InPutMan == userId) select x; @@ -312,6 +312,104 @@ namespace BLL.API return respone; } + public static Model.ResponeData getUsingPlanTempByUserId(string userId) + { + Model.ResponeData respone = new ResponeData(); + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Weld_UsingPlan_Temp usingPlan = (from x in db.Weld_UsingPlan_Temp where x.InPutMan == userId select x).FirstOrDefault(); + + UsingPlanItem planItem = new UsingPlanItem(); + planItem.UsingPlanId = usingPlan.UsingPlanTempId; + planItem.WeldId = usingPlan.WeldId; + planItem.ProjectId = usingPlan.ProjectId; + planItem.UsePosition = usingPlan.UsePosition; + planItem.Amount = usingPlan.Amount; + planItem.UsingManOne = usingPlan.UsingManOne; + planItem.UsingManTwo = usingPlan.UsingManTwo; + if (usingPlan.InPutDate != null) + { + planItem.InPutDate = string.Format("{0:yyyy-MM-dd}", usingPlan.InPutDate); + } + if (usingPlan.CancelDate != null) + { + planItem.CancelDate = string.Format("{0:yyyy-MM-dd}", usingPlan.CancelDate); + } + planItem.IsCancel = usingPlan.IsCancel; + planItem.FinishMan = usingPlan.FinishMan; + planItem.OrderTime = usingPlan.OrderTime; + if (usingPlan.OrderDate != null) + { + planItem.OrderDate = string.Format("{0:yyyy-MM-dd}", usingPlan.OrderDate); + } + planItem.CancelResult = usingPlan.CancelResult; + planItem.IsSubmit = usingPlan.IsSubmit; + planItem.UsingUnit = usingPlan.UsingUnit; + planItem.IsNeedConfirm = usingPlan.IsNeedConfirm; + planItem.InPutMan = usingPlan.InPutMan; + planItem.IsSteelStru = usingPlan.IsSteelStru; + planItem.TeamGroupId = usingPlan.TeamGroupId; + planItem.STE_ID = usingPlan.STE_ID; + planItem.IsFinish = usingPlan.IsFinish; + planItem.STE_Name = usingPlan.STE_Name; + planItem.UnitStoreId = BLL.UnitStoreService.GetUnitStoreNameById(usingPlan.UnitStoreId); + + if (!string.IsNullOrEmpty(planItem.ProjectId)) + { + var project = db.Base_Project.Where(x => x.ProjectId == planItem.ProjectId).FirstOrDefault(); + if (project != null) + { + planItem.ProjectName = project.ProjectName; + planItem.ProjectCode = project.ProjectCode; + } + } + if (!string.IsNullOrEmpty(planItem.WeldId)) + { + var weldInfo = db.Weld_WeldInfo.Where(x => x.WeldId == planItem.WeldId).FirstOrDefault(); + if (weldInfo != null) + { + planItem.WeldName = weldInfo.WeldName; + planItem.WeldSpec = weldInfo.WeldSpec; + planItem.WeldCode = weldInfo.WeldCode; + } + if (weldInfo != null && !string.IsNullOrEmpty(weldInfo.WeldTypeId)) + { + var weldType = db.Weld_WeldType.Where(x => x.WeldTypeId == weldInfo.WeldTypeId).FirstOrDefault(); + + if (weldType != null) + { + + } + } + } + + if (!string.IsNullOrEmpty(planItem.UsingManOne)) + { + planItem.UsingManOneName = db.HJGL_BS_Welder.Where(x => x.WED_ID == planItem.UsingManOne).Select(x => x.WED_Name).FirstOrDefault(); + } + if (!string.IsNullOrEmpty(planItem.UsingManTwo)) + { + planItem.UsingManTwoName = db.HJGL_BS_Welder.Where(x => x.WED_ID == planItem.UsingManTwo).Select(x => x.WED_Name).FirstOrDefault(); + } + if (!string.IsNullOrEmpty(planItem.UsingUnit)) + { + planItem.UsingUnitName = db.Base_Unit.Where(x => x.UnitId == planItem.UsingUnit).Select(x => x.UnitName).FirstOrDefault(); + } + if (!string.IsNullOrEmpty(planItem.InPutMan)) + { + planItem.InPutManName = db.Sys_User.Where(x => x.UserId == planItem.InPutMan).Select(x => x.UserName).FirstOrDefault(); + } + if (!string.IsNullOrEmpty(planItem.TeamGroupId)) + { + planItem.TeamGroupName = db.Base_TeamGroup.Where(x => x.TeamGroupId == planItem.TeamGroupId).Select(x => x.TeamGroupName).FirstOrDefault(); + } + + + respone.data = planItem; + } + return respone; + } + public static Model.ResponeData welderQueIsPass(string welderId, string steelType, bool isSteelStru) { Model.ResponeData respone = new ResponeData(); @@ -523,11 +621,12 @@ namespace BLL.API where x.ProjectId == projectId select new { + WED_ID = y.WED_ID, WED_Code = y.WED_Code, WED_Name = y.WED_Name, }; - responeData.data = res.Skip(page * pageSize).Take(pageSize); + responeData.data = res.Skip(page * pageSize).Take(pageSize).ToList(); } } catch (Exception ex) @@ -540,5 +639,45 @@ namespace BLL.API } #endregion + #region 根据项目id获取可选择的焊工信息列表 + /// + /// 根据项目id获取可选择的焊工信息列表 + /// + /// 人员ID + /// 交换类型 + /// + public static Model.ResponeData getProjectWelderSelectList(string projectId, string str, int page, int pageSize) + { + var responeData = new Model.ResponeData(); + try + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var res = db.HJGL_BS_Welder + .Where(w => w.IsOAM == true) // 对应 AND IsOAM=1 + .Where(w => !db.Project_Welder + .Any(pw => pw.ProjectId == projectId && pw.WED_ID == w.WED_ID)) // 对应 NOT IN 子查询 + .Select(w => new + { + WED_ID = w.WED_ID, + WED_Code = w.WED_Code, + WED_Name = w.WED_Name + "(" + w.WED_Code + ")", + }); + if (!string.IsNullOrEmpty(str)) + { + res = res.Where(w => w.WED_Code.Contains(str) || w.WED_Name.Contains(str)); + } + responeData.data = res.Skip(page * pageSize).Take(pageSize).ToList(); + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + ErrLogInfo.WriteLog(ex, "根据项目id获取可选择的焊工信息列表", "WeldController.getProjectWelderSelectList"); + } + return responeData; + } + #endregion } } diff --git a/HJGL_DS/BLL/BLL.csproj b/HJGL_DS/BLL/BLL.csproj index 499139d..37b3876 100644 --- a/HJGL_DS/BLL/BLL.csproj +++ b/HJGL_DS/BLL/BLL.csproj @@ -112,6 +112,9 @@ + + ..\packages\ThoughtWorks.QRCode.1.1.0\lib\ThoughtWorks.QRCode.dll + @@ -135,6 +138,7 @@ + diff --git a/HJGL_DS/BLL/Common/CreateQRCodeService.cs b/HJGL_DS/BLL/Common/CreateQRCodeService.cs new file mode 100644 index 0000000..a8a3034 --- /dev/null +++ b/HJGL_DS/BLL/Common/CreateQRCodeService.cs @@ -0,0 +1,85 @@ +using System; +using System.IO; +using System.Text; +using ThoughtWorks.QRCode.Codec; +using System.Web.UI; + +namespace BLL +{ + /// + /// 上传附件相关 + /// + public class CreateQRCodeService + { + /// + /// 生成二维码方法一 + /// + public static string CreateCode_Simple(string nr) + { + string imageUrl = string.Empty; + if (!string.IsNullOrEmpty(nr)) + { + QRCodeEncoder qrCodeEncoder = new QRCodeEncoder + { + QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE, + QRCodeScale = nr.Length, + QRCodeVersion = 0, + QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M + }; + System.Drawing.Image image = qrCodeEncoder.Encode(nr, Encoding.UTF8); + string filepath = Funs.RootPath + UploadFileService.QRCodeImageFilePath; + //如果文件夹不存在,则创建 + if (!Directory.Exists(filepath)) + { + Directory.CreateDirectory(filepath); + } + string filename = DateTime.Now.ToString("yyyymmddhhmmssfff").ToString() + ".jpg"; + FileStream fs = new FileStream(filepath + filename, FileMode.OpenOrCreate, FileAccess.Write); + image.Save(fs, System.Drawing.Imaging.ImageFormat.Jpeg); + fs.Close(); + image.Dispose(); + imageUrl= UploadFileService.QRCodeImageFilePath + filename; + } + return imageUrl; + } + + //public static string CreateCode_Simple2(string nr) + //{ + // string imageUrl = string.Empty; + // if (!string.IsNullOrEmpty(nr)) + // { + // QRCodeEncoder qrCodeEncoder = new QRCodeEncoder + // { + // QRCodeEncodeMode = QRCodeEncoder.ENCODE_MODE.BYTE, + // QRCodeScale = nr.Length, + // QRCodeVersion = 0, + // QRCodeErrorCorrect = QRCodeEncoder.ERROR_CORRECTION.M + // }; + // System.Drawing.Image image = qrCodeEncoder.Encode(nr, Encoding.UTF8); + // string filepath = Funs.RootPath + UploadFileService.WelderQRCodeImageFilePath; + // //如果文件夹不存在,则创建 + // if (!Directory.Exists(filepath)) + // { + // Directory.CreateDirectory(filepath); + // } + // string filename = DateTime.Now.ToString("yyyymmddhhmmssfff").ToString() + ".jpg"; + // FileStream fs = new FileStream(filepath + filename, FileMode.OpenOrCreate, FileAccess.Write); + // image.Save(fs, System.Drawing.Imaging.ImageFormat.Jpeg); + // fs.Close(); + // image.Dispose(); + // imageUrl = UploadFileService.WelderQRCodeImageFilePath + filename; + // } + // return imageUrl; + //} + + /// + /// + /// + /// + public static bool isHaveImage(string url) + { + string filepath = Funs.RootPath + url; + return File.Exists(filepath); + } + } +} \ No newline at end of file diff --git a/HJGL_DS/BLL/Common/OpenAIhelper.cs b/HJGL_DS/BLL/Common/OpenAIhelper.cs index da77afc..e0f9dc3 100644 --- a/HJGL_DS/BLL/Common/OpenAIhelper.cs +++ b/HJGL_DS/BLL/Common/OpenAIhelper.cs @@ -14,7 +14,7 @@ namespace BLL.Common { public class OpenAIhelper { - private const string ApiKey = "sk-a5014a22a49049d1b2179a6c0d8eec1c"; + private const string ApiKey = "sk-8bfd57eaf2c7438388ec584ac86dfb34"; private const string AIURL = "https://api.deepseek.com/chat/completions"; public static string ChatCompletion(string content) diff --git a/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_JointInfoService.cs b/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_JointInfoService.cs index a462f94..8770e1f 100644 --- a/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_JointInfoService.cs +++ b/HJGL_DS/BLL/HJGL/WeldingManage/HJGL_PW_JointInfoService.cs @@ -1358,5 +1358,163 @@ namespace BLL && (y.JOTY_Name.Contains("支管连接焊缝") || y.JOTY_Name.Contains("角焊缝")) select x).ToList(); } + + public static string ConvertJointCodeString(string jotIdList) + { + string name = string.Empty; + string[] list = jotIdList.Split(','); + foreach (var item in list) + { + if (!string.IsNullOrEmpty(item)) + { + name += GetJointInfoByJotID(item).JOT_JointNo + ","; + } + } + if (!string.IsNullOrEmpty(name)) + { + name = name.Substring(0, name.LastIndexOf(",")); + } + return name; + } + + /// + /// 根据焊口Id获取焊口信息 + /// + /// + /// + public static Model.HJGL_SpRpWeldReportItem GetJointItemByJotID(string jot_id) + { + Model.HJGL_SpRpWeldReportItem newWeldReportItem = new Model.HJGL_SpRpWeldReportItem(); + Model.SGGLDB db = Funs.DB; + var jotInfo = db.HJGL_PW_JointInfo.FirstOrDefault(e => e.JOT_ID == jot_id); + var jotView = db.HJGL_View_JointInfo.FirstOrDefault(e => e.JOT_ID == jot_id); + newWeldReportItem.JOT_ID = jotInfo.JOT_ID; + newWeldReportItem.JOT_JointNo = jotInfo.JOT_JointNo; + newWeldReportItem.ProjectId = jotInfo.ProjectId; + var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(jotInfo.ISO_ID); + if (isoInfo != null) + { + newWeldReportItem.ISO_IsoNo = isoInfo.ISO_IsoNo; + newWeldReportItem.ISO_Id = isoInfo.ISO_ID; + + } + if (jotInfo.WLO_Code == "F") + { + newWeldReportItem.WLO_CodeName = "现场安装"; + newWeldReportItem.WLO_CodeID = "F"; + } + else + { + newWeldReportItem.WLO_CodeName = "预制"; + newWeldReportItem.WLO_CodeID = "S"; + } + + newWeldReportItem.JOT_JointAttribute = jotInfo.JOT_JointAttribute; + string steName = string.Empty; + if (jotView.STE_Name1 != null && jotView.STE_Name2 != null && jotView.STE_Name1 != jotView.STE_Name2) + { + steName = jotView.STE_Name1 + "/" + jotView.STE_Name2; + } + else if (jotView.STE_Name1 != null) + { + steName = jotView.STE_Name1; + } + else if (jotView.STE_Name2 != null) + { + steName = jotView.STE_Name2; + } + newWeldReportItem.STE_Code = steName; + var joty = BLL.HJGL_WeldService.GetJointTypeByID(jotInfo.JOTY_ID); + newWeldReportItem.JOTY_Group = joty.JOTY_Group; + + if (jotInfo.JOT_JointAttribute == "固定") + { + if (joty != null && (joty.JOTY_Group == "2" || joty.JOTY_Group == "3")) + { + newWeldReportItem.JOT_Location = "5F"; + } + else if (joty != null && joty.JOTY_Group == "1") + { + newWeldReportItem.JOT_Location = "2G"; + } + else + { + newWeldReportItem.JOT_Location = "5G"; + } + } + else + { + if (joty != null && (joty.JOTY_Group == "2" || joty.JOTY_Group == "3")) + { + newWeldReportItem.JOT_Location = "1F"; + } + else + { + newWeldReportItem.JOT_Location = "1G"; + } + } + newWeldReportItem.JOT_Size = jotInfo.JOT_Size; + newWeldReportItem.JOT_DoneDin = jotInfo.JOT_Size; + newWeldReportItem.JOT_Dia = jotInfo.JOT_Dia; + newWeldReportItem.JOT_Sch = jotInfo.JOT_Sch; + if (!string.IsNullOrEmpty(jotInfo.JOT_CellWelder)) //盖面焊工 + { + var cellWelder = BLL.HJGL_PersonManageService.GetWelderByWenId(jotInfo.JOT_CellWelder); + if (cellWelder != null) + { + newWeldReportItem.JOT_CellWelderID = cellWelder.WED_ID; + newWeldReportItem.JOT_CellWelderCode = cellWelder.WED_Name + "(" + cellWelder.WED_Code + ")"; + } + } + if (!string.IsNullOrEmpty(jotInfo.JOT_FloorWelder)) //打底焊工 + { + var floorWelder = BLL.HJGL_PersonManageService.GetWelderByWenId(jotInfo.JOT_FloorWelder); + if (floorWelder != null) + { + newWeldReportItem.JOT_FloorWelderID = floorWelder.WED_ID; + newWeldReportItem.JOT_FloorWelderCode = floorWelder.WED_Name + "(" + floorWelder.WED_Code + ")"; + } + } + if (!string.IsNullOrEmpty(jotInfo.WME_ID)) + { + var weldingMethod = BLL.HJGL_WeldingMethodService.GetWeldMethodByWMEID(jotInfo.WME_ID); + if (weldingMethod != null) + { + newWeldReportItem.WME_ID = weldingMethod.WME_ID; + newWeldReportItem.WME_Name = weldingMethod.WME_Name; + } + } + if (!string.IsNullOrEmpty(jotInfo.JOT_WeldMat)) + { + //var weldMat = BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(jotInfo.JOT_WeldMat); + //if (weldMat != null) + //{ + // newWeldReportItem.JOT_WeldMat = weldMat.WMT_ID; + // newWeldReportItem.WeldMatCode = weldMat.WMT_MatCode; + //} + var weldMat = (from x in Funs.DB.View_WeldInfoDropDownLists where x.WeldId == jotInfo.JOT_WeldMat select x).FirstOrDefault(); + if (weldMat != null) + { + newWeldReportItem.JOT_WeldMat = weldMat.WeldId; + newWeldReportItem.WeldMatCode = weldMat.WeldName; + } + } + if (!string.IsNullOrEmpty(jotInfo.JOT_WeldSilk)) + { + //var weldSilk = BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(jotInfo.JOT_WeldSilk); + //if (weldSilk != null) + //{ + // newWeldReportItem.JOT_WeldSilk = weldSilk.WMT_ID; + // newWeldReportItem.WeldSilkCode = weldSilk.WMT_MatCode; + //} + var weldSilk = Funs.DB.View_WeldInfoDropDownLists.FirstOrDefault(x => x.WeldId == jotInfo.JOT_WeldSilk); + if (weldSilk != null) + { + newWeldReportItem.JOT_WeldSilk = weldSilk.WeldId; + newWeldReportItem.WeldSilkCode = weldSilk.WeldName; + } + } + return newWeldReportItem; + } } } diff --git a/HJGL_DS/BLL/packages.config b/HJGL_DS/BLL/packages.config index 3816bf3..f5895ec 100644 --- a/HJGL_DS/BLL/packages.config +++ b/HJGL_DS/BLL/packages.config @@ -5,4 +5,5 @@ + \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx index 63822ea..260d33d 100644 --- a/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/JGZL/管道焊接工作记录.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -50,7 +50,7 @@ namespace FastReport } - + @@ -84,7 +84,7 @@ namespace FastReport - + diff --git a/HJGL_DS/FineUIPro.Web/File/Fastreport/焊口打印.frx b/HJGL_DS/FineUIPro.Web/File/Fastreport/焊口打印.frx new file mode 100644 index 0000000..741fb45 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/File/Fastreport/焊口打印.frx @@ -0,0 +1,156 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + /** + private void Table3_ManualBuild(object sender, EventArgs e) + { + // get the data source by its name + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + Tabel_Data.PrintRow(0); + // each PrintRow call must be followed by either PrintColumn or PrintColumns call + // to print cells on the row + Tabel_Data.PrintColumns(); + + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + // print the table body + Tabel_Data.PrintRow(0); + Tabel_Data.PrintColumns(); + + // go next data source row + rowData.Next(); + } + + + // print the last table row - it is a footer + //Tabel_Data.PrintRow(2); + //Table3.PrintColumns(); + } + + + + private void Table4_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Table1"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + Table4.PrintRow(0); + // each PrintRow call must be followed by either PrintColumn or PrintColumns call + // to print cells on the row + Table4.PrintColumns(); + + // now enumerate the data source and print the table body + + // print the table body + Table4.PrintRow(1); + Table4.PrintColumns(); + Table4.PrintRow(2); + Table4.PrintColumns(); + Table4.PrintRow(3); + Table4.PrintColumns(); + Table4.PrintRow(4); + Table4.PrintColumns(); + Table4.PrintRow(5); + Table4.PrintColumns(); + Table4.PrintRow(6); + Table4.PrintColumns(); + // go next data source row + rowData.Next(); + + } + + private void Table5_ManualBuild(object sender, EventArgs e) + { + Table5.PrintRow(0); + Table5.PrintColumns(); + Table5.PrintRow(1); + Table5.PrintColumns(); + } + **/ + + + + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165249887899.png b/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165249887899.png deleted file mode 100644 index 99bc941..0000000 Binary files a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165249887899.png and /dev/null differ diff --git a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250157901.gif b/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250157901.gif deleted file mode 100644 index 21f6832..0000000 Binary files a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250157901.gif and /dev/null differ diff --git a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250197900.gif b/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250197900.gif deleted file mode 100644 index 3da3cfe..0000000 Binary files a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250197900.gif and /dev/null differ diff --git a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250247900.gif b/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250247900.gif deleted file mode 100644 index 9e5d2d5..0000000 Binary files a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250247900.gif and /dev/null differ diff --git a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250297898.gif b/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250297898.gif deleted file mode 100644 index 52f1a29..0000000 Binary files a/HJGL_DS/FineUIPro.Web/FileUpload/HJGL/HotProessManage/638555165250297898.gif and /dev/null differ diff --git a/HJGL_DS/FineUIPro.Web/FileUpload/WeldMat/QualityCertificate/639008956132961833_焊口信息导入模板.xls b/HJGL_DS/FineUIPro.Web/FileUpload/WeldMat/QualityCertificate/639008956132961833_焊口信息导入模板.xls deleted file mode 100644 index 2bb2a2f..0000000 Binary files a/HJGL_DS/FineUIPro.Web/FileUpload/WeldMat/QualityCertificate/639008956132961833_焊口信息导入模板.xls and /dev/null differ diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj index 555f340..73bce3c 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj @@ -58,6 +58,7 @@ true AnyCPU false + false @@ -1304,6 +1305,7 @@ + @@ -6476,6 +6478,13 @@ DetectionPoint.aspx + + JointInfoBatchModity.aspx + ASPXCodeBehind + + + JointInfoBatchModity.aspx + JointInfoBatchUpdate.aspx ASPXCodeBehind diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user index e3436b8..80f7761 100644 --- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,4 +1,4 @@ - + true diff --git a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx index a7a96c7..836857e 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx @@ -36,6 +36,7 @@ + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx.cs index 82d7bab..e558b26 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx.cs @@ -1,4 +1,8 @@ -using System; +using BLL; +using FastReport.Utils; +using NPOI.POIFS.Crypt.Dsig; +using NPOI.SS.Formula.Functions; +using System; using System.Collections.Generic; using System.Data; using System.Data.OleDb; @@ -8,7 +12,6 @@ using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; -using BLL; namespace FineUIPro.Web.HJGL.DataIn { public partial class JointIn : PageBase @@ -607,7 +610,7 @@ namespace FineUIPro.Web.HJGL.DataIn if (getProject != null && getPWisInfo != null) { var getJoint = Funs.DB.HJGL_PW_JointInfo.FirstOrDefault(x => x.ProjectId == getProject.ProjectId && x.ISO_ID == getPWisInfo.ISO_ID && x.JOT_JointNo == col2); - if (getJoint != null) + if (getJoint != null && this.cbUpdateIn.Checked == false) { result += "第" + (i + 2).ToString() + "行," + "该焊口已存在" + "\n"; } @@ -940,7 +943,56 @@ namespace FineUIPro.Web.HJGL.DataIn } else { - result += "第" + (i + 2).ToString() + "行," + "该焊口已存在" + "\n"; + if (this.cbUpdateIn.Checked) + { + newJointInfo.JOT_JointNo = col2; + if (col8 == "固定") + { + if (newJointInfo.JOT_JointNo.Last() != 'G') + { + newJointInfo.JOT_JointNo = newJointInfo.JOT_JointNo + "G"; + } + } + if (newJointInfo.IsGold == true) + { + if (newJointInfo.JOT_JointNo.Last() != 'H') + { + newJointInfo.JOT_JointNo = newJointInfo.JOT_JointNo + "H"; + } + } + newJointInfo.JOT_ID = getJoint.JOT_ID; + BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo); + + // 更新排序字段 + string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET + Sort1=(case when PATINDEX('[A-Z]%',JOT_JointNo)>0 THEN 'B' + WHEN ISNUMERIC(JOT_JointNo)=1 then 'C' ELSE 'C' END), + Sort2=(CASE WHEN ISNUMERIC(JOT_JointNo)=1 then try_cast(REPLACE(JOT_JointNo,'.','') AS INT) + WHEN ISNUMERIC(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)))=1 + THEN TRY_CAST(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)) as int) + WHEN PATINDEX('[0-9]%',JOT_JointNo)>0 then + TRY_CAST(left(JOT_JointNo,PATINDEX('%[^0-9]%',JOT_JointNo)-1) as int) + ELSE 0 END), + Sort3= SUBSTRING(JOT_JointNo,1,1), + Sort4=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 and SUBSTRING(JOT_JointNo,1,1)<>'Z' + THEN ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,CHARINDEX('Z',JOT_JointNo)-2) as int),0) + WHEN PATINDEX('%[A-G]%',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0 + THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-2) as int),0) + ELSE ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)) as int),0) END), + Sort5=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 + THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,charindex('Z',JOT_JointNo)+1,len(JOT_JointNo)) AS INT),0) + WHEN PATINDEX('%[A-Y]',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0 + THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-1) as int),0) ELSE 0 END) + WHERE JOT_ID='" + newJointInfo.JOT_ID + "'"; + SQLHelper.ExecutSql(strSort); + + //JOT_IDStr += Funs.DB.HJGL_PW_JointInfo.FirstOrDefault(x => x.ProjectId == getProject.ProjectId && x.ISO_ID == getPWisInfo.ISO_ID && x.JOT_JointNo == col2).JOT_ID + ","; + JOT_IDStr += newJointInfo.JOT_ID + ","; + } + else + { + result += "第" + (i + 2).ToString() + "行," + "该焊口已存在" + "\n"; + } } } errorInfos += result; diff --git a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx.designer.cs index e6ed166..335d19a 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/DataIn/JointIn.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.DataIn { - - - public partial class JointIn { - +namespace FineUIPro.Web.HJGL.DataIn +{ + + + public partial class JointIn + { + /// /// Head1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlHead Head1; - + /// /// form1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// panelCenterRegion 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel panelCenterRegion; - + /// /// Toolbar2 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// FileExcel 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FileUpload FileExcel; - + /// /// btnAudit 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAudit; - + /// /// imgbtnImport 控件。 /// @@ -92,7 +94,16 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button imgbtnImport; - + + /// + /// cbUpdateIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox cbUpdateIn; + /// /// ToolbarFill1 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// imgbtnUpload 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button imgbtnUpload; - + /// /// hdFileName 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdFileName; - + /// /// Grid1 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolbarSeparator1 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.HJGL.DataIn { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuDelete 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx index 7823936..2b82106 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx @@ -71,15 +71,12 @@ - + - - - @@ -95,6 +92,8 @@ + + @@ -102,6 +101,8 @@ + + <%-- --%> @@ -123,6 +124,12 @@ + + + + + @@ -172,8 +179,8 @@ <%----%> - + @@ -384,6 +391,10 @@ Target="top" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true" Width="800px" Height="650px"> + /// 定义集合 @@ -115,6 +127,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage this.Grid1.Columns[35].Hidden = true; this.Grid1.Columns[36].Hidden = true; this.Grid1.Columns[37].Hidden = true; + //this.Grid1.Columns[38].Hidden = true; List columns = column.Split(',').ToList(); foreach (var item in columns) @@ -1350,7 +1363,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage list.Remove(rowID); } } - } + } } #endregion @@ -1364,113 +1377,77 @@ namespace FineUIPro.Web.HJGL.WeldingManage if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnDelete)) { // 第一次点击:只打开复选框 - if (this.Grid1.Columns[0].Hidden) + if (this.Grid1.Columns[0].Hidden || SelectedType == "BatchModity") { + list.Clear(); + SelectedType = "Delete"; this.Grid1.Columns[0].Hidden = false; + this.Grid1.Columns[0].HeaderText = "选择删除"; this.BindGrid(); return; } if (list.Count == 0) { - Alert.ShowInTop("请勾选一条记录!", MessageBoxIcon.Warning); + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); return; } - bool isShow = true; - if (list.Count > 1) + if (SelectedType == "Delete") { - isShow = false; - } - string err = string.Empty; - for (int i = 0; i < list.Count; i++) - { - string rowID = list[i]; - string content = judgementDelete(rowID, isShow); - if (string.IsNullOrEmpty(content)) + bool isShow = true; + if (list.Count > 1) { - Model.SGGLDB db = Funs.DB; - var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID); - if (hotProessTrustItem != null) + isShow = false; + } + string err = string.Empty; + for (int i = 0; i < list.Count; i++) + { + string rowID = list[i]; + string content = judgementDelete(rowID, isShow); + if (string.IsNullOrEmpty(content)) { - db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem); + Model.SGGLDB db = Funs.DB; + var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID); + if (hotProessTrustItem != null) + { + db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem); + } + var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID); + if (hotProessItem != null) + { + db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem); + } + var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID); + if (hotProessResult != null) + { + db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult); + } + db.SubmitChanges(); + BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细 + BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID); + BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "删除焊口信息"); } - var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID); - if (hotProessItem != null) + else { - db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem); + err += content; } - var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID); - if (hotProessResult != null) - { - db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult); - } - db.SubmitChanges(); - BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细 - BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID); - BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.ProjectId, this.CurrUser.UserId, "删除焊口信息"); + } + + list.Clear(); + + if (string.IsNullOrEmpty(err)) + { + Alert.ShowInTop("删除成功!", MessageBoxIcon.Success); + // 删除完成后,恢复按钮状态 + this.Grid1.Columns[0].Hidden = true; + SelectedType = string.Empty; } else { - err += content; + Alert.ShowInTop(err, MessageBoxIcon.Warning); } - } - //if (Grid1.SelectedRowIndexArray.Length == 0) - //{ - // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); - // return; - //} - //bool isShow = true; - //if (Grid1.SelectedRowIndexArray.Length > 1) - //{ - // isShow = false; - //} - //string err = string.Empty; - //foreach (int rowIndex in Grid1.SelectedRowIndexArray) - //{ - // string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - // string content = judgementDelete(rowID, isShow); - // if (string.IsNullOrEmpty(content)) - // { - // Model.SGGLDB db = Funs.DB; - // var hotProessTrustItem = db.HJGL_CH_HotProessTrustItem.FirstOrDefault(x => x.JOT_ID == rowID); - // if (hotProessTrustItem != null) - // { - // db.HJGL_CH_HotProessTrustItem.DeleteOnSubmit(hotProessTrustItem); - // } - // var hotProessItem = db.HJGL_HotProessItem.FirstOrDefault(x => x.JOT_ID == rowID); - // if (hotProessItem != null) - // { - // db.HJGL_HotProessItem.DeleteOnSubmit(hotProessItem); - // } - // var hotProessResult = db.HJGL_CH_HotProessResult.FirstOrDefault(x => x.JOT_ID == rowID); - // if (hotProessResult != null) - // { - // db.HJGL_CH_HotProessResult.DeleteOnSubmit(hotProessResult); - // } - // db.SubmitChanges(); - // BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细 - // BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID); - // BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息"); - // } - // else - // { - // err += content; - // } - //} - // 删除完成后,恢复按钮状态 - this.Grid1.Columns[0].Hidden = true; - list.Clear(); - - if (string.IsNullOrEmpty(err)) - { - Alert.ShowInTop("删除成功!", MessageBoxIcon.Success); + this.BindGrid(); } - else - { - Alert.ShowInTop(err, MessageBoxIcon.Warning); - } - - this.BindGrid(); } else { @@ -1503,5 +1480,166 @@ namespace FineUIPro.Web.HJGL.WeldingManage } } + /// + /// 批量修改焊口信息 + /// + /// + /// + protected void btnBatchModity_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.ProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnModify)) + { + // 第一次点击:只打开复选框 + if (this.Grid1.Columns[0].Hidden || SelectedType == "Delete") + { + list.Clear(); + SelectedType = "BatchModity"; + this.Grid1.Columns[0].Hidden = false; + this.Grid1.Columns[0].HeaderText = "选择修改"; + this.BindGrid(); + return; + } + if (SelectedType == "BatchModity") + { + if (list.Count == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string jotIdList = string.Join(",", list); + PageContext.RegisterStartupScript(Window10.GetShowReference(String.Format("JointInfoBatchModity.aspx?jotIdList={0}", jotIdList, "批量修改 - "))); + + } + //bool isShow = true; + //if (list.Count > 1) + //{ + // isShow = false; + //} + //string err = string.Empty; + //for (int i = 0; i < list.Count; i++) + //{ + // string rowID = list[i]; + // string content = judgementDelete(rowID, isShow); + // if (string.IsNullOrEmpty(content)) + // { + // } + //} + + //if (Grid1.SelectedRowIndexArray.Length == 0) + //{ + // Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + // return; + //} + //string jotIdList = string.Join(",", Grid1.SelectedRowIDArray); + //PageContext.RegisterStartupScript(Window10.GetShowReference(String.Format("JointInfoBatchModity.aspx?jotIdList={0}", jotIdList, "批量修改 - "))); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + + /// + /// 批量生成二维码 + /// + /// + /// + protected void btnQR_Click(object sender, EventArgs e) + { + Model.SGGLDB db = Funs.DB; + var p = db.HJGL_PW_IsoInfo.Where(x => x.ISO_ID == this.tvControlItem.SelectedNodeID).FirstOrDefault(); + if (p != null) + { + var getJoints = from x in db.HJGL_PW_JointInfo + where x.ProjectId == this.ProjectId && x.ISO_ID == this.tvControlItem.SelectedNodeID + select x; + int num = 0; + if (getJoints.Any()) + { + foreach (var item in getJoints) + { + string url = CreateQRCodeService.CreateCode_Simple(item.JOT_ID); + if (!string.IsNullOrEmpty(url)) + { + item.QRCodeAttachUrl = url; + num++; + } + } + db.SubmitChanges(); + } + ShowNotify("操作完成,新生成二维码" + num.ToString() + "条", MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop("请选择一条管线!", MessageBoxIcon.Warning); + return; + } + } + + #region 打印二维码 + protected void btnPrintJoint_Click(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID)) + { + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + BLL.Common.FastReportService.ResetData(); + + Dictionary keyValuePairs = new Dictionary(); + //keyValuePairs.Add("ProjectName", projectName); + BLL.Common.FastReportService.AddFastreportParameter(keyValuePairs); + + string strSql = "select * from View_PrintJointInfo where ProjectId=@projectId and ISO_ID =@isoId"; + + List listStr = new List + { + new SqlParameter("@projectId", this.CurrUser.LoginProjectId), + new SqlParameter("@isoId", this.tvControlItem.SelectedNodeID), + }; + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + DataTable dt = new DataTable(); + dt.TableName = "Table1"; + dt.Columns.Add("UnitName"); + dt.Columns.Add("WorkAreaCode"); + dt.Columns.Add("ISO_IsoNo"); + dt.Columns.Add("JOT_JointNo"); + dt.Columns.Add("JOT_JointDesc"); + dt.Columns.Add("STE_Code"); + dt.Columns.Add("QRCodeAttachUrl"); + + DataView dv = tb.DefaultView;//获取表视图 + dv.Sort = "JOT_JointNo ASC";//按照ID排序 + tb = dv.ToTable();//转为表 + DataRow[] rows = tb.DefaultView.ToTable().Select(); + foreach (var row in rows) + { + var newRow = dt.NewRow(); + newRow["ISO_IsoNo"] = row["ISO_IsoNo"].ToString(); + newRow["UnitName"] = row["UnitName"].ToString(); + newRow["WorkAreaCode"] = row["InstallationName"].ToString(); + newRow["JOT_JointNo"] = row["JOT_JointNo"].ToString(); + newRow["JOT_JointDesc"] = row["JOT_JointDesc"].ToString(); + newRow["STE_Code"] = row["STE_Code"].ToString(); + newRow["QRCodeAttachUrl"] = Funs.RootPath + row["QRCodeAttachUrl"].ToString(); + dt.Rows.Add(newRow); + } + BLL.Common.FastReportService.AddFastreportTable(dt); + initTemplatePath = "File\\Fastreport\\焊口打印.frx"; + + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../common/ReportPrint/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + } + } + else + { + Alert.ShowInTop("请选择要打印的管线!", MessageBoxIcon.Warning); + return; + } + } + #endregion } } \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs index c8f56b1..37abab8 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.designer.cs @@ -195,13 +195,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage protected global::FineUIPro.Button btnBatchAdd; /// - /// btnBatchModify 控件。 + /// btnBatchUpdate 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnBatchModify; + protected global::FineUIPro.Button btnBatchUpdate; /// /// btnBatchDel 控件。 @@ -221,15 +221,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.Button btnOut; - /// - /// btnFileName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnFileName; - /// /// hdColumn 控件。 /// @@ -293,6 +284,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.ToolbarFill ToolbarFill2; + /// + /// btnBatchModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnBatchModify; + /// /// btnPrint 控件。 /// @@ -320,6 +320,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.Button btnSelectColumn; + /// + /// btnFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnFileName; + /// /// Toolbar4 控件。 /// @@ -356,6 +365,33 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.RadioButtonList rbHotProessResult; + /// + /// ToolbarFill3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill3; + + /// + /// btnQR 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnQR; + + /// + /// btnPrintJoint 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnPrintJoint; + /// /// Toolbar5 控件。 /// @@ -536,6 +572,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage /// protected global::FineUIPro.Window Window9; + /// + /// Window10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window10; + /// /// Menu1 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx new file mode 100644 index 0000000..7cc4480 --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx @@ -0,0 +1,172 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JointInfoBatchModity.aspx.cs" Inherits="FineUIPro.Web.HJGL.WeldingManage.JointInfoBatchModity" %> + + + + + + + 批量修改焊口信息 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx.cs new file mode 100644 index 0000000..ce7cbcd --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx.cs @@ -0,0 +1,899 @@ +using BLL; +using FineUIPro.Web.HJGL.DataIn; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.HJGL.WeldingManage +{ + public partial class JointInfoBatchModity : PageBase + { + #region 定义项 + /// + /// 管线主键 + /// + private string ISO_ID + { + get + { + return (string)ViewState["ISO_ID"]; + } + set + { + ViewState["ISO_ID"] = value; + } + } + #endregion + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ///初始化下拉框 + this.LoadDropDownList(); + ///初始化显示信息 + this.LoadShowInfo(); + } + } + + #region 加载下拉框 + /// + /// 加载下拉框 + /// + private void LoadDropDownList() + { + ///材质1 + this.ddlSTE1.DataTextField = "STE_Code"; + this.ddlSTE1.DataValueField = "STE_ID"; + this.ddlSTE1.DataSource = BLL.HJGL_MaterialService.GetSteelList(); + this.ddlSTE1.DataBind(); + Funs.FineUIPleaseSelect(this.ddlSTE1); + + ///材质2 + this.ddlSTE2.DataTextField = "STE_Code"; + this.ddlSTE2.DataValueField = "STE_ID"; + this.ddlSTE2.DataSource = BLL.HJGL_MaterialService.GetSteelList(); + this.ddlSTE2.DataBind(); + Funs.FineUIPleaseSelect(this.ddlSTE2); + + ///焊缝类型 + this.ddlJOTY_ID.DataTextField = "JOTY_Name"; + this.ddlJOTY_ID.DataValueField = "JOTY_ID"; + this.ddlJOTY_ID.DataSource = BLL.HJGL_WeldService.GetJointTypeNameList("2"); + this.ddlJOTY_ID.DataBind(); + Funs.FineUIPleaseSelect(this.ddlJOTY_ID); + + ///坡口类型 + this.ddlJST_ID.DataTextField = "JST_Name"; + this.ddlJST_ID.DataValueField = "JST_ID"; + this.ddlJST_ID.DataSource = BLL.HJGL_GrooveService.GetSlopeTypeNameList(); + this.ddlJST_ID.DataBind(); + Funs.FineUIPleaseSelect(this.ddlJST_ID); + + ///焊口属性 + this.ddlJointAttribute.DataTextField = "Text"; + this.ddlJointAttribute.DataValueField = "Value"; + this.ddlJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttributeItem(); + this.ddlJointAttribute.DataBind(); + Funs.FineUIPleaseSelect(this.ddlJointAttribute); + + ///焊接方法 + this.ddlWME_ID.DataTextField = "WME_Name"; + this.ddlWME_ID.DataValueField = "WME_ID"; + this.ddlWME_ID.DataSource = BLL.HJGL_WeldingMethodService.GetWeldMethodNameList(); + this.ddlWME_ID.DataBind(); + Funs.FineUIPleaseSelect(this.ddlWME_ID); + + ///焊接区域 + this.ddlWLO_CODE.DataTextField = "Text"; + this.ddlWLO_CODE.DataValueField = "Value"; + this.ddlWLO_CODE.DataSource = BLL.DropListService.HJGL_WLO_CODEItem(); + this.ddlWLO_CODE.DataBind(); + Funs.FineUIPleaseSelect(this.ddlWLO_CODE); + + ///组件1号 + this.ddlComponent1.DataTextField = "COM_Name"; + this.ddlComponent1.DataValueField = "COM_ID"; + this.ddlComponent1.DataSource = BLL.HJGL_ComponentsService.GetComponentNameList(); + this.ddlComponent1.DataBind(); + Funs.FineUIPleaseSelect(this.ddlComponent1); + + ///组件2号 + this.ddlComponent2.DataTextField = "COM_Name"; + this.ddlComponent2.DataValueField = "COM_ID"; + this.ddlComponent2.DataSource = BLL.HJGL_ComponentsService.GetComponentNameList(); + this.ddlComponent2.DataBind(); + Funs.FineUIPleaseSelect(this.ddlComponent2); + + ///焊丝 + this.ddlWeldSilk.DataTextField = "WeldName"; + this.ddlWeldSilk.DataValueField = "WeldId"; + this.ddlWeldSilk.DataSource = from x in Funs.DB.View_WeldInfoDropDownLists + where x.WeldTypeName.Contains("焊丝") + select x; // BLL.HJGL_ConsumablesService.GetMaterialList("1"); + this.ddlWeldSilk.DataBind(); + Funs.FineUIPleaseSelect(this.ddlWeldSilk); + + ///焊条 + this.ddlWeldMat.DataTextField = "WeldName"; + this.ddlWeldMat.DataValueField = "WeldId"; + this.ddlWeldMat.DataSource = from x in Funs.DB.View_WeldInfoDropDownLists + where x.WeldTypeName.Contains("焊条") + select x; //BLL.HJGL_ConsumablesService.GetMaterialList("2"); + this.ddlWeldMat.DataBind(); + Funs.FineUIPleaseSelect(this.ddlWeldMat); + + List myList = new List(); + myList = BLL.HJGL_PW_JointInfoService.GetProessTypes(); + RadioButtonList1.DataTextField = "Name"; + RadioButtonList1.DataValueField = "Id"; + RadioButtonList1.DataSource = myList; + RadioButtonList1.DataBind(); + + this.drpInstallationId.DataTextField = "Text"; + this.drpInstallationId.DataValueField = "Value"; + this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.CurrUser.LoginProjectId); + this.drpInstallationId.DataBind(); + Funs.FineUIPleaseSelect(this.drpInstallationId); + + //探伤比例 + this.drpNDTR_ID.DataTextField = "NDTR_Name"; + this.drpNDTR_ID.DataValueField = "NDTR_ID"; + this.drpNDTR_ID.DataSource = BLL.HJGL_DetectionService.GetNDTRateNameList(); + this.drpNDTR_ID.DataBind(); + Funs.FineUIPleaseSelect(this.drpNDTR_ID); + + //合格等级 + this.drpJOT_QualifiedLevel.DataTextField = "Text"; + this.drpJOT_QualifiedLevel.DataValueField = "Value"; + this.drpJOT_QualifiedLevel.DataSource = BLL.DropListService.HJGL_NDTClassItem(); + this.drpJOT_QualifiedLevel.DataBind(); + Funs.FineUIPleaseSelect(this.drpJOT_QualifiedLevel); + } + #endregion + + #region 加载页面显示信息 + /// + /// 加载页面显示信息 + /// + private void LoadShowInfo() + { + string jotIdStr = Request.Params["jotIdList"]; + if (!string.IsNullOrEmpty(jotIdStr)) + { + var jotIdList = jotIdStr.Split(','); + txtJointNoS.Text = BLL.HJGL_PW_JointInfoService.ConvertJointCodeString(jotIdStr); + var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(jotIdList[0]); + this.ISO_ID = jointInfo.ISO_ID; + if (jointInfo != null) + { + this.txtJointDesc.Text = jointInfo.JOT_JointDesc; + if (!string.IsNullOrEmpty(jointInfo.DReportID)) + { + this.drpNDTR_ID.Enabled = false; + this.drpIsGold.Enabled = false; + } + if (!string.IsNullOrEmpty(jointInfo.STE_ID)) + { + this.ddlSTE1.SelectedValue = jointInfo.STE_ID; + var ste = BLL.HJGL_MaterialService.GetSteelBySteID(jointInfo.STE_ID); + if (ste != null) + { + this.txtHardQuaStandard.Text = ste.HardQuaStandard; + } + } + if (!string.IsNullOrEmpty(jointInfo.STE_ID2)) + { + this.ddlSTE2.SelectedValue = jointInfo.STE_ID2; + } + if (!string.IsNullOrEmpty(jointInfo.JOTY_ID)) + { + this.ddlJOTY_ID.SelectedValue = jointInfo.JOTY_ID; + } + if (!string.IsNullOrEmpty(jointInfo.JST_ID)) + { + this.ddlJST_ID.SelectedValue = jointInfo.JST_ID; + } + if (!string.IsNullOrEmpty(jointInfo.JOT_JointAttribute)) + { + this.ddlJointAttribute.SelectedValue = jointInfo.JOT_JointAttribute; + //if (this.ddlJointAttribute.SelectedValue == "固定") + //{ + // if (this.txtJointNo.Text.Trim().Last() != 'G') + // { + // this.txtJointNo.Text = this.txtJointNo.Text.Trim() + "G"; + // } + //} + //else + //{ + // if (this.txtJointNo.Text.Trim().Last() == 'G') + // { + // this.txtJointNo.Text = this.txtJointNo.Text.Trim().Replace("G", ""); + // } + //} + } + if (!string.IsNullOrEmpty(jointInfo.WME_ID)) + { + this.ddlWME_ID.SelectedValue = jointInfo.WME_ID; + } + this.txtSize.Text = Convert.ToString(jointInfo.JOT_Size); + this.txtDial.Text = (jointInfo.JOT_Dia ?? 0).ToString("N2"); + this.txtSch.Text = jointInfo.JOT_Sch; + if (!string.IsNullOrEmpty(jointInfo.WLO_Code)) + { + this.ddlWLO_CODE.SelectedValue = jointInfo.WLO_Code; + } + if (!string.IsNullOrEmpty(jointInfo.JOT_Component1)) + { + this.ddlComponent1.SelectedValue = jointInfo.JOT_Component1; + } + if (!string.IsNullOrEmpty(jointInfo.JOT_Component2)) + { + this.ddlComponent2.SelectedValue = jointInfo.JOT_Component2; + } + this.txtLastTemp.Text = Convert.ToString(jointInfo.JOT_LastTemp); + this.txtCellTemp.Text = Convert.ToString(jointInfo.JOT_CellTemp); + this.txtPrepareTemp.Text = Convert.ToString(jointInfo.JOT_PrepareTemp); + if (!string.IsNullOrEmpty(jointInfo.JOT_WeldSilk)) + { + this.ddlWeldSilk.SelectedValue = jointInfo.JOT_WeldSilk; + } + if (jointInfo.WeldL != null) + { + this.txtWeldL.Text = jointInfo.WeldL.ToString(); + } + if (!string.IsNullOrEmpty(jointInfo.JOT_WeldMat)) + { + this.ddlWeldMat.SelectedValue = jointInfo.JOT_WeldMat; + } + this.txtElectricity.Text = jointInfo.JOT_Electricity; + this.txtVoltage.Text = jointInfo.JOT_Voltage; + if (!string.IsNullOrEmpty(jointInfo.IS_Proess)) + { + this.drpIS_Proess.SelectedValue = jointInfo.IS_Proess; + if (jointInfo.IS_Proess == "1") + { + this.drpProessTypes.Hidden = false; + if (!string.IsNullOrEmpty(jointInfo.ProessTypes)) + { + string[] proessTypes = jointInfo.ProessTypes.Split('|'); + this.drpProessTypes.Values = proessTypes; + } + } + } + if (jointInfo.IsSpecial == true) + { + this.drpIsSpecial.SelectedValue = "1"; + } + else + { + this.drpIsSpecial.SelectedValue = "0"; + } + this.txtRemark.Text = jointInfo.JOT_Remark; + if (!string.IsNullOrEmpty(jointInfo.InstallationId)) + { + this.drpInstallationId.Items.Clear(); + this.drpInstallationId.DataTextField = "Text"; + this.drpInstallationId.DataValueField = "Value"; + this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(jointInfo.ProjectId); + this.drpInstallationId.DataBind(); + Funs.FineUIPleaseSelect(this.drpInstallationId); + this.drpInstallationId.SelectedValue = jointInfo.InstallationId; + } + if (!string.IsNullOrEmpty(jointInfo.NDTR_ID)) + { + this.drpNDTR_ID.SelectedValue = jointInfo.NDTR_ID; + } + if (!string.IsNullOrEmpty(jointInfo.JOT_QualifiedLevel)) + { + this.drpJOT_QualifiedLevel.SelectedValue = jointInfo.JOT_QualifiedLevel; + } + this.txtPressureTestPackageNo.Text = jointInfo.PressureTestPackageNo; + if (jointInfo.IsGold == true) + { + this.drpIsGold.SelectedValue = "1"; + this.drpNDTR_ID.Enabled = false; + } + else + { + this.drpIsGold.SelectedValue = "0"; + } + } + } + } + #endregion + + #region 文本框是否可编辑 + /// + /// 文本框是否可编辑 + /// + /// + private void TextIsReadOnly(bool readOnly) + { + //this.btnSave.Hidden = readOnly; + //this.txtJointNo.Readonly = readOnly; + this.ddlWLO_CODE.Enabled = !readOnly; + this.ddlSTE1.Enabled = !readOnly; + this.ddlSTE2.Enabled = !readOnly; + this.ddlComponent1.Enabled = !readOnly; + this.ddlComponent2.Enabled = !readOnly; + this.txtJointDesc.Readonly = readOnly; + this.ddlJOTY_ID.Enabled = !readOnly; + this.txtSize.Readonly = readOnly; + this.txtDial.Readonly = readOnly; + this.ddlJST_ID.Enabled = !readOnly; + this.txtSch.Readonly = readOnly; + this.txtLastTemp.Readonly = readOnly; + this.txtCellTemp.Readonly = readOnly; + //this.txtPrepareTemp.Readonly = readOnly; + this.ddlJointAttribute.Enabled = !readOnly; + this.ddlWME_ID.Enabled = !readOnly; + this.ddlWeldSilk.Enabled = !readOnly; + this.ddlWeldMat.Enabled = !readOnly; + this.txtElectricity.Readonly = readOnly; + this.txtVoltage.Readonly = readOnly; + this.txtRemark.Readonly = readOnly; + this.drpInstallationId.Enabled = !readOnly; + this.drpNDTR_ID.Enabled = !readOnly; + this.drpJOT_QualifiedLevel.Enabled = !readOnly; + this.drpIsSpecial.Enabled = !readOnly; + this.txtHardQuaStandard.Readonly = readOnly; + this.txtWeldL.Readonly = readOnly; + } + #endregion + + #region 提交按钮 + /// + /// 提交按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnSave)) + { + if (this.drpInstallationId.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpInstallationId.SelectedValue)) + { + Alert.ShowInTop("请选择装置!", MessageBoxIcon.Warning); + return; + } + if (this.ddlSTE1.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.ddlSTE1.SelectedValue)) + { + Alert.ShowInTop("请选择材质1!", MessageBoxIcon.Warning); + return; + } + if (this.ddlJOTY_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJOTY_ID.SelectedValue)) + { + Alert.ShowInTop("请选择焊缝类型!", MessageBoxIcon.Warning); + return; + } + if (this.ddlJST_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJST_ID.SelectedValue)) + { + Alert.ShowInTop("请选择坡口类型!", MessageBoxIcon.Warning); + return; + } + if (this.ddlJointAttribute.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlJointAttribute.SelectedValue)) + { + Alert.ShowInTop("请选择焊口属性!", MessageBoxIcon.Warning); + return; + } + if (this.ddlWME_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.ddlWME_ID.SelectedValue)) + { + Alert.ShowInTop("请选择焊接方法!", MessageBoxIcon.Warning); + return; + } + if (this.drpNDTR_ID.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpNDTR_ID.SelectedValue)) + { + Alert.ShowInTop("请选择探伤比例!", MessageBoxIcon.Warning); + return; + } + if (this.drpJOT_QualifiedLevel.SelectedValue == BLL.Const._Null||string.IsNullOrEmpty(this.drpJOT_QualifiedLevel.SelectedValue)) + { + Alert.ShowInTop("请选择合格等级!", MessageBoxIcon.Warning); + return; + } + + string jotIdStr = Request.Params["jotIdList"]; + if (!string.IsNullOrEmpty(jotIdStr)) + { + Model.SGGLDB db = Funs.DB; + var jotIdList = jotIdStr.Split(','); + foreach (var jotId in jotIdList) + { + Model.HJGL_PW_JointInfo newJointInfo = db.HJGL_PW_JointInfo.FirstOrDefault(x => x.JOT_ID == jotId); + var hotItems = from x in BLL.Funs.DB.HJGL_CH_HotProessTrustItem where x.JOT_ID == jotId select x; + var batchDetail = BLL.HJGL_BO_BatchDetailService.GetBatchDetailByJotId(jotId); + if ((batchDetail != null || hotItems.Count() > 0) && this.CurrUser.UserId != BLL.Const.GlyId) + { + newJointInfo.JOT_PrepareTemp = Funs.GetNewDecimal(this.txtPrepareTemp.Text); + newJointInfo.PressureTestPackageNo = this.txtPressureTestPackageNo.Text; + if (this.drpIS_Proess.SelectedValue != BLL.Const._Null) + { + newJointInfo.IS_Proess = this.drpIS_Proess.SelectedValue; + if (this.drpIS_Proess.SelectedValue == "1") + { + if (drpProessTypes.Values.Length > 0) + { + newJointInfo.ProessTypes = String.Join("|", drpProessTypes.Values); + } + else + { + Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning); + return; + } + } + } + BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo); + } + else + { + newJointInfo.JOT_JointDesc = this.txtJointDesc.Text.Trim(); + newJointInfo.STE_ID = this.ddlSTE1.SelectedValue; + if (this.ddlSTE2.SelectedValue != BLL.Const._Null) + { + newJointInfo.STE_ID2 = this.ddlSTE2.SelectedValue; + } + newJointInfo.JOTY_ID = this.ddlJOTY_ID.SelectedValue; + newJointInfo.JST_ID = this.ddlJST_ID.SelectedValue; + newJointInfo.JOT_JointAttribute = this.ddlJointAttribute.SelectedValue; + newJointInfo.WME_ID = this.ddlWME_ID.SelectedValue; + newJointInfo.JOT_Size = Funs.GetNewDecimal(this.txtSize.Text); + newJointInfo.JOT_Dia = Funs.GetNewDecimal(this.txtDial.Text); + newJointInfo.JOT_Sch = this.txtSch.Text.Trim(); + if (this.ddlWLO_CODE.SelectedValue != BLL.Const._Null) + { + newJointInfo.WLO_Code = this.ddlWLO_CODE.SelectedValue; + } + if (this.ddlComponent1.SelectedValue != BLL.Const._Null) + { + newJointInfo.JOT_Component1 = this.ddlComponent1.SelectedValue; + } + if (this.ddlComponent2.SelectedValue != BLL.Const._Null) + { + newJointInfo.JOT_Component2 = this.ddlComponent2.SelectedValue; + } + newJointInfo.JOT_LastTemp = Funs.GetNewDecimal(this.txtLastTemp.Text); + newJointInfo.JOT_CellTemp = Funs.GetNewDecimal(this.txtCellTemp.Text); + newJointInfo.JOT_PrepareTemp = Funs.GetNewDecimal(this.txtPrepareTemp.Text); + if (this.ddlWeldSilk.SelectedValue != BLL.Const._Null) + { + newJointInfo.JOT_WeldSilk = this.ddlWeldSilk.SelectedValue; + } + if (this.ddlWeldMat.SelectedValue != BLL.Const._Null) + { + newJointInfo.JOT_WeldMat = this.ddlWeldMat.SelectedValue; + } + newJointInfo.JOT_Electricity = this.txtElectricity.Text.Trim(); + newJointInfo.JOT_Voltage = this.txtVoltage.Text.Trim(); + if (this.drpIS_Proess.SelectedValue != BLL.Const._Null) + { + newJointInfo.IS_Proess = this.drpIS_Proess.SelectedValue; + if (this.drpIS_Proess.SelectedValue == "1") + { + if (drpProessTypes.Values.Length > 0) + { + newJointInfo.ProessTypes = String.Join("|", drpProessTypes.Values); + } + else + { + Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning); + return; + } + } + } + newJointInfo.JOT_Remark = this.txtRemark.Text; + newJointInfo.PressureTestPackageNo = this.txtPressureTestPackageNo.Text; + newJointInfo.InstallationId = this.drpInstallationId.SelectedValue; + newJointInfo.NDTR_ID = this.drpNDTR_ID.SelectedValue; + newJointInfo.JOT_QualifiedLevel = this.drpJOT_QualifiedLevel.SelectedValue; + if (this.drpIsSpecial.SelectedValue == "1") + { + newJointInfo.IsSpecial = true; + } + else + { + newJointInfo.IsSpecial = false; + } + if (this.drpIsGold.SelectedValue == "1") + { + newJointInfo.IsGold = true; + } + else + { + newJointInfo.IsGold = false; + } + if (!string.IsNullOrEmpty(this.txtWeldL.Text)) + { + newJointInfo.WeldL = Convert.ToInt32(this.txtWeldL.Text); + } + newJointInfo.JOT_JointStatus = "100"; + newJointInfo.JOT_TrustFlag = "00"; + newJointInfo.JOT_CheckFlag = "00"; + if (newJointInfo.DReportID != null) + { + BLL.HJGL_PW_JointInfoService.UpdateJointNoAddG(jotId, this.ddlJointAttribute.SelectedValue, Const.BtnModify); + } + var joty = BLL.HJGL_WeldService.GetJointTypeByID(newJointInfo.JOTY_ID); + if (joty != null) + { + var jot = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(jotId); + if (jot != null) + { + if (!string.IsNullOrEmpty(jot.JOT_JointNo)) + { + if (joty.JOTY_Group == "2")//角焊缝(承插) + { + if (char.IsDigit(jot.JOT_JointNo[0])) + { + newJointInfo.JOT_JointNo = "C" + jot.JOT_JointNo; + } + else + { + newJointInfo.JOT_JointNo = "C" + jot.JOT_JointNo.Substring(1); + } + } + else if (joty.JOTY_Group == "3")//支管连接焊缝 + { + if (char.IsDigit(jot.JOT_JointNo[0])) + { + newJointInfo.JOT_JointNo = "D" + jot.JOT_JointNo; + } + else + { + newJointInfo.JOT_JointNo = "D" + jot.JOT_JointNo.Substring(1); + } + } + } + } + } + BLL.HJGL_PW_JointInfoService.UpdateJointInfo(newJointInfo); + + //// 更新排序字段 + string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET + Sort1=(case when PATINDEX('[A-Z]%',JOT_JointNo)>0 THEN 'B' + WHEN ISNUMERIC(JOT_JointNo)=1 then 'C' ELSE 'C' END), + Sort2=(CASE WHEN ISNUMERIC(JOT_JointNo)=1 then try_cast(REPLACE(JOT_JointNo,'.','') AS INT) + WHEN ISNUMERIC(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)))=1 + THEN TRY_CAST(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)) as int) + WHEN PATINDEX('[0-9]%',JOT_JointNo)>0 then + TRY_CAST(left(JOT_JointNo,PATINDEX('%[^0-9]%',JOT_JointNo)-1) as int) + ELSE 0 END), + Sort3= SUBSTRING(JOT_JointNo,1,1), + Sort4=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 and SUBSTRING(JOT_JointNo,1,1)<>'Z' + THEN ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,CHARINDEX('Z',JOT_JointNo)-2) as int),0) + WHEN PATINDEX('%[A-G]%',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0 + THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-2) as int),0) + ELSE ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)) as int),0) END), + Sort5=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 + THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,charindex('Z',JOT_JointNo)+1,len(JOT_JointNo)) AS INT),0) + WHEN PATINDEX('%[A-Y]',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0 + THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-1) as int),0) ELSE 0 END) + WHERE JOT_ID='" + jotId+ "'"; + SQLHelper.ExecutSql(strSort); + } + } + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + ShowNotify("提交成功!", MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + return; + } + } + #endregion + + #region 格式化字符串 + /// + /// 材质1下拉选择事件 + /// + /// + /// + protected void ddlSTE1_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.ddlSTE1.SelectedValue != BLL.Const._Null) + { + var ste = BLL.HJGL_MaterialService.GetSteelBySteID(this.ddlSTE1.SelectedValue); + if (ste != null) + { + this.txtHardQuaStandard.Text = ste.HardQuaStandard; + } + else + { + this.txtHardQuaStandard.Text = string.Empty; + } + this.ddlSTE2.SelectedValue = ddlSTE1.SelectedValue; + } + else + { + this.txtHardQuaStandard.Text = string.Empty; + } + } + + /// + /// 焊缝类型下拉选择事件 + /// + /// + /// + protected void ddlJOTY_ID_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.ddlJOTY_ID.SelectedValue != BLL.Const._Null) + { + var joty = BLL.HJGL_WeldService.GetJointTypeByID(this.ddlJOTY_ID.SelectedValue); + if (joty != null) + { + var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(this.ISO_ID); + if (isoInfo != null) + { + if (joty.JOTY_Group == "1")//对接 + { + if (!string.IsNullOrEmpty(isoInfo.Joty_B_Rate)) + { + this.drpNDTR_ID.SelectedValue = isoInfo.Joty_B_Rate; + } + else + { + this.drpNDTR_ID.SelectedValue = BLL.Const._Null; + } + if (!string.IsNullOrEmpty(isoInfo.Joty_B_Level)) + { + this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_B_Level; + } + else + { + this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null; + } + } + else if (joty.JOTY_Group == "2")//角焊缝(承插) + { + if (!string.IsNullOrEmpty(isoInfo.Joty_C_Rate)) + { + this.drpNDTR_ID.SelectedValue = isoInfo.Joty_C_Rate; + } + else + { + this.drpNDTR_ID.SelectedValue = BLL.Const._Null; + } + if (!string.IsNullOrEmpty(isoInfo.Joty_C_Level)) + { + this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_C_Level; + } + else + { + this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null; + } + //焊口号前自动加C + //string jointNo = this.txtJointNo.Text.Trim(); + //if (!string.IsNullOrEmpty(jointNo)) + //{ + // if (char.IsDigit(jointNo[0])) + // { + // this.txtJointNo.Text = "C" + jointNo; + // } + // else + // { + // this.txtJointNo.Text = "C" + jointNo.Substring(1); + // } + //} + //else + //{ + // this.txtJointNo.Text = "C"; + //} + } + else if (joty.JOTY_Group == "3")//支管连接焊缝 + { + if (!string.IsNullOrEmpty(isoInfo.Joty_D_Rate)) + { + this.drpNDTR_ID.SelectedValue = isoInfo.Joty_D_Rate; + } + else + { + this.drpNDTR_ID.SelectedValue = BLL.Const._Null; + } + if (!string.IsNullOrEmpty(isoInfo.Joty_D_Level)) + { + this.drpJOT_QualifiedLevel.SelectedValue = isoInfo.Joty_D_Level; + } + else + { + this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null; + } + ////焊口号前自动加D + //string jointNo = this.txtJointNo.Text.Trim(); + //if (!string.IsNullOrEmpty(jointNo)) + //{ + // if (char.IsDigit(jointNo[0])) + // { + // this.txtJointNo.Text = "D" + jointNo; + // } + // else + // { + // this.txtJointNo.Text = "D" + jointNo.Substring(1); + // } + //} + //else + //{ + // this.txtJointNo.Text = "D"; + //} + } + } + } + else + { + this.drpNDTR_ID.SelectedValue = BLL.Const._Null; + this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null; + } + } + else + { + this.drpNDTR_ID.SelectedValue = BLL.Const._Null; + this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null; + } + } + + /// + /// 焊工属性下拉选择事件 + /// + /// + /// + protected void ddlJointAttribute_SelectedIndexChanged(object sender, EventArgs e) + { + //if (this.ddlJointAttribute.SelectedValue == "固定") + //{ + //if (this.txtJointNo.Text.Trim().Last() != 'G') + //{ + // this.txtJointNo.Text = this.txtJointNo.Text.Trim() + "G"; + //} + //} + //else + //{ + //if (this.txtJointNo.Text.Trim().Last() == 'G') + //{ + // this.txtJointNo.Text = this.txtJointNo.Text.Trim().Replace("G", ""); + //} + //} + } + + /// + /// 根据寸经外径对照表,输入外径是自动得到寸径;焊口规格:Φ外径*壁厚 + /// + /// + /// + protected void txtText_TextChanged(object sender, EventArgs e) + { + //根据寸经外径对照表,输入外径是自动得到寸径 + if (!string.IsNullOrEmpty(this.txtDial.Text.Trim())) + { + decimal dia = Funs.GetNewDecimalOrZero(this.txtDial.Text.Trim()); + if (dia >= 500) + { + this.drpIsSpecial.SelectedValue = "1"; + } + var inch = HJGL_ControlService.GetSizeByDia(dia); + if (inch != null) + { + this.txtSize.Text = Convert.ToString(inch); + } + } + + //焊口规格:Φ外径*壁厚 + if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()) && !string.IsNullOrEmpty(this.txtSch.Text.Trim())) + { + this.txtJointDesc.Text = "Φ" + this.txtDial.Text.Trim() + "×" + this.txtSch.Text.Trim(); + } + } + + /// + /// 是否显示热处理类型 + /// + /// + /// + protected void drpIS_Proess_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.drpIS_Proess.SelectedValue == "1") + { + this.drpProessTypes.Hidden = false; + } + else + { + this.drpProessTypes.Hidden = true; + } + } + + /// + /// 热处理类型选择变化事件 + /// + /// + /// + protected void RadioButtonList1_SelectedIndexChanged(object sender, EventArgs e) + { + string jotIdStr = Request.Params["jotIdList"]; + var jotIdList = jotIdStr.Split(','); + //已委托的热处理类型 + var isTrustProessTypes = from x in BLL.Funs.DB.HJGL_CH_HotProessTrustItem where x.JOT_ID == jotIdList[0] select x.ProessTypes; + if (drpProessTypes.Values.Length > 0) + { + List strs = this.RadioButtonList1.SelectedValueArray.ToList(); + foreach (var isTrustProessType in isTrustProessTypes) //已委托的热处理类型不能去除 + { + if (!strs.Contains(isTrustProessType)) + { + strs.Add(isTrustProessType); + } + } + this.RadioButtonList1.SelectedValueArray = strs.ToArray(); + this.drpProessTypes.Values = strs.ToArray(); + string proessTypes = String.Join("|", drpProessTypes.Values); + this.drpProessTypes.Text = BLL.HJGL_PW_JointInfoService.ConvertProessTypes(proessTypes); + } + else + { + Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning); + return; + } + } + + protected void drpIsGold_SelectedIndexChanged(object sender, EventArgs e) + { + //var jotIdList = jotIdStr.Split(','); + //foreach (var item in jotIdList) + //{ + if (this.drpIsGold.SelectedValue == "1") + { + this.drpNDTR_ID.SelectedValue = "e2612188-fc99-492a-937c-74c7a0151656"; //黄金口检测比例100% + this.drpNDTR_ID.Enabled = false; + //this.txtJointNoPrix.Text =BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(item).JOT_JointNo + "H"; + } + else + { + this.drpNDTR_ID.SelectedValue = BLL.Const._Null; + this.drpNDTR_ID.Enabled = true; + //string jotNo= BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(item).JOT_JointNo; + //this.txtJointNo.Text = this.txtJointNo.Text.Trim().Substring(0, this.txtJointNo.Text.Trim().Length - 1); + } + //} + } + + /// + /// 外径输入事件 + /// + /// + /// + protected void txtDial_TextChanged(object sender, EventArgs e) + { + //根据寸经外径对照表,输入外径是自动得到寸径 + if (!string.IsNullOrEmpty(this.txtDial.Text.Trim())) + { + decimal dia = Funs.GetNewDecimalOrZero(this.txtDial.Text.Trim()); + if (dia >= 500) + { + this.drpIsSpecial.SelectedValue = "1"; + } + var inch = HJGL_ControlService.GetSizeByDia(dia); + if (inch != null) + { + this.txtSize.Text = Convert.ToString(inch); + } + } + + //焊口规格:Φ外径*壁厚 + if (!string.IsNullOrEmpty(this.txtDial.Text.Trim()) && !string.IsNullOrEmpty(this.txtSch.Text.Trim())) + { + this.txtJointDesc.Text = "Φ" + this.txtDial.Text.Trim() + "×" + this.txtSch.Text.Trim(); + } + } + + // 非常规焊缝 + protected void txtWeldL_TextChanged(object sender, EventArgs e) + { + if (!string.IsNullOrEmpty(this.txtWeldL.Text.Trim())) + { + this.txtJointDesc.Text = "L=" + this.txtWeldL.Text.Trim() + "×" + this.txtSch.Text.Trim(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx.designer.cs new file mode 100644 index 0000000..41166bb --- /dev/null +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoBatchModity.aspx.designer.cs @@ -0,0 +1,395 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.HJGL.WeldingManage +{ + + + public partial class JointInfoBatchModity + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtJointNoS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label txtJointNoS; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// drpInstallationId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpInstallationId; + + /// + /// ddlSTE1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlSTE1; + + /// + /// ddlSTE2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlSTE2; + + /// + /// ddlJOTY_ID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlJOTY_ID; + + /// + /// ddlJST_ID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlJST_ID; + + /// + /// ddlJointAttribute 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlJointAttribute; + + /// + /// ddlWME_ID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlWME_ID; + + /// + /// ddlWLO_CODE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlWLO_CODE; + + /// + /// txtJointDesc 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtJointDesc; + + /// + /// txtDial 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtDial; + + /// + /// txtSch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSch; + + /// + /// txtSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtSize; + + /// + /// ddlComponent1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlComponent1; + + /// + /// ddlComponent2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlComponent2; + + /// + /// txtLastTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtLastTemp; + + /// + /// txtCellTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtCellTemp; + + /// + /// txtPrepareTemp 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtPrepareTemp; + + /// + /// ddlWeldSilk 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlWeldSilk; + + /// + /// ddlWeldMat 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlWeldMat; + + /// + /// txtElectricity 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtElectricity; + + /// + /// txtVoltage 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtVoltage; + + /// + /// txtPressureTestPackageNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPressureTestPackageNo; + + /// + /// drpIS_Proess 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIS_Proess; + + /// + /// drpProessTypes 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownBox drpProessTypes; + + /// + /// SimpleForm3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.SimpleForm SimpleForm3; + + /// + /// Label10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label10; + + /// + /// RadioButtonList1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBoxList RadioButtonList1; + + /// + /// drpNDTR_ID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpNDTR_ID; + + /// + /// drpJOT_QualifiedLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpJOT_QualifiedLevel; + + /// + /// drpIsGold 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIsGold; + + /// + /// drpIsSpecial 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpIsSpecial; + + /// + /// txtHardQuaStandard 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHardQuaStandard; + + /// + /// txtWeldL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtWeldL; + + /// + /// lbDef 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbDef; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + } +} diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx index b97f68f..15fc47a 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx @@ -22,6 +22,9 @@ + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx.cs index 9c1cfdd..075b38d 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx.cs @@ -1,11 +1,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage { + using BLL; + using FastReport.DevComponents.DotNetBar; + using Model; + using NPOI.SS.UserModel; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; + using System.IO; + using System.Linq; using System.Text; - using BLL; using AspNet = System.Web.UI.WebControls; public partial class JointInfoOut : PageBase @@ -19,7 +24,7 @@ protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) - { + { this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 this.BindGrid(); @@ -43,14 +48,14 @@ // strSql += " AND COM_Code LIKE @COM_Code"; // listStr.Add(new SqlParameter("@COM_Code", "%" + this.txtCode.Text.Trim() + "%")); //} - + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); // 2.获取当前分页数据 //var table = this.GetPagedDataTable(Grid1, tb1); Grid1.RecordCount = tb.Rows.Count; - tb = GetFilteredTable(Grid1.FilteredData, tb); + //tb = GetFilteredTable(Grid1.FilteredData, tb); var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; @@ -168,6 +173,259 @@ return sb.ToString(); } - #endregion + #endregion + + #region 按导入模板导出 + /// + /// 按导入模板导出 + /// + /// + /// + protected void btnOut2_Click(object sender, EventArgs e) + { + string rootPath = Server.MapPath("~/"); + string initTemplatePath = Const.JointInTemplateUrl; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + uploadfilepath = rootPath + initTemplatePath; + + + string isoId = Request.QueryString["ISO_ID"] ?? string.Empty; + if (!string.IsNullOrEmpty(isoId)) + { + var lists = from x in Funs.DB.HJGL_View_JointInfo + where x.ISO_ID == isoId + select x; + + lists = lists.OrderBy(x => x.JOTY_Group).OrderBy(x => x.Sort1).OrderBy(x => x.Sort2).OrderBy(x => x.Sort3).OrderBy(x => x.Sort4).OrderBy(x => x.Sort5); + if (lists != null) + { + newUrl = uploadfilepath.Replace("焊口信息导入模板", "焊口信息"); + 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; + string proCode = string.Empty; + var pro = BLL.Base_ProjectService.GetProjectByProjectId(item.ProjectId); + if (pro != null) + { + proCode = pro.ProjectCode; + } + cell.SetCellValue(proCode); + //管线号 + cell = row.CreateCell(1); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.ISO_IsoNo); + //焊口号 + cell = row.CreateCell(2); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_JointNo); + //装置 + cell = row.CreateCell(3); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.InstallationName); + //材质一 + cell = row.CreateCell(4); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.STE_Name1); + //材质二 + cell = row.CreateCell(5); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.STE_Name2); + //焊缝类型 + cell = row.CreateCell(6); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOTY_Name); + //坡口类型 + cell = row.CreateCell(7); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JST_Name); + //焊口属性 + cell = row.CreateCell(8); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_JointAttribute); + //焊接方法 + cell = row.CreateCell(9); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.WME_Name); + //外径 + cell = row.CreateCell(10); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_Dia.HasValue ? item.JOT_Dia.ToString() : ""); + //壁厚 + cell = row.CreateCell(11); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_Sch); + //寸径 + cell = row.CreateCell(12); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_Size.HasValue?item.JOT_Size.ToString():""); + //焊接区域 + cell = row.CreateCell(13); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.WLO_Code == "F" ? "安装" : "预制"); + //组件一 + cell = row.CreateCell(14); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Component1); + //组件二 + cell = row.CreateCell(15); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.Component2); + //后热温度 + cell = row.CreateCell(16); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_LastTemp.HasValue ? item.JOT_LastTemp.ToString() : ""); + //层间温度 + cell = row.CreateCell(17); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_CellTemp.HasValue ? item.JOT_CellTemp.ToString() : ""); + //预热温度 + cell = row.CreateCell(18); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_PrepareTemp.HasValue ? item.JOT_PrepareTemp.ToString() : ""); + //焊丝 + cell = row.CreateCell(19); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.WeldSilk); + //焊条 + cell = row.CreateCell(20); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.WeldMat); + //焊接电流 + cell = row.CreateCell(21); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_Electricity); + //焊接电压 + cell = row.CreateCell(22); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_Voltage); + //是否热处理 + cell = row.CreateCell(23); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.IS_Proess == "1" ? "是" : "否"); + //热处理类型(是否热处理为‘是’时填写 分别为:预热, 消氢, 后热, 消应力热处理,稳定化处理 填写时请用英文逗号隔开) + cell = row.CreateCell(24); + cell.CellStyle = cellStyle; + string proessTypes = string.Empty; + if (!string.IsNullOrEmpty(item.ProessTypes)) + { + foreach (var t in item.ProessTypes.Split('|')) + { + if (t == "1") + { + proessTypes += "预热,"; + } + else if (t == "2") + { + proessTypes += "消氢,"; + } + else if (t == "3") + { + proessTypes += "后热,"; + } + else if (t == "4") + { + proessTypes += "消应力热处理,"; + } + else if (t == "5") + { + proessTypes += "稳定化处理,"; + } + } + if (!string.IsNullOrEmpty(proessTypes)) + { + proessTypes = proessTypes.Substring(0, proessTypes.LastIndexOf(",")); + } + } + cell.SetCellValue(proessTypes); + //是否特殊 + cell = row.CreateCell(25); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.IsSpecial == true ? "是" : "否"); + //探伤比例 + cell = row.CreateCell(26); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.NDTR_Name); + //合格等级 + cell = row.CreateCell(27); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_QualifiedLevel); + //硬度合格标准 + cell = row.CreateCell(28); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.HardQuaStandard); + //非常焊缝 + cell = row.CreateCell(29); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.WeldL.HasValue ? item.WeldL.ToString() : ""); + //黄金口(是 / 否) + cell = row.CreateCell(30); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.IsGold == true ? "是" : "否"); + //备注 + cell = row.CreateCell(31); + cell.CellStyle = cellStyle; + cell.SetCellValue(item.JOT_Remark); + 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/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx.designer.cs index c2731de..6ec5a8c 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoOut.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.WeldingManage { - - - public partial class JointInfoOut { - +namespace FineUIPro.Web.HJGL.WeldingManage +{ + + + public partial class JointInfoOut + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar3 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar3; - + /// /// ToolbarFill1 控件。 /// @@ -65,7 +67,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + + /// + /// btnOut2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut2; + /// /// btnOut 控件。 /// @@ -74,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// ToolbarSeparator1 控件。 /// @@ -83,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx index 49340de..95c5a7b 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx @@ -4,107 +4,109 @@ - 焊工焊接检测统计表 + 焊工焊接检测统计表
- - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx.cs index 3f55b62..b9139b8 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx.cs @@ -86,7 +86,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunProc("HJGL_sp_rpt_welderStatistics", parameter); this.Grid1.RecordCount = tb.Rows.Count; - tb = GetFilteredTable(Grid1.FilteredData, tb); + //tb = GetFilteredTable(Grid1.FilteredData, tb); var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; Grid1.DataBind(); @@ -151,6 +151,8 @@ namespace FineUIPro.Web.HJGL.WeldingReport Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("焊工焊接检测统计表" + filename, System.Text.Encoding.UTF8) + ".xls"); Response.ContentType = "application/excel"; Response.ContentEncoding = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 100000; + this.BindGrid(); Response.Write(GetGridTableHtml(Grid1)); Response.End(); } @@ -181,7 +183,12 @@ namespace FineUIPro.Web.HJGL.WeldingReport { html = (row.FindControl("labNumber") as AspNet.Label).Text; } - sb.AppendFormat("{0}", html); + if (column.ColumnID == "tfWelderCode") + { + html = (row.FindControl("lblWelderCode") as AspNet.Label).Text; + } + //sb.AppendFormat("{0}", html); + sb.AppendFormat("{0}", html); } sb.Append(""); diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx.designer.cs index 20c059a..28ed700 100644 --- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx.designer.cs +++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingReport/WelderCheckStatistic.aspx.designer.cs @@ -2,16 +2,18 @@ // <自动生成> // 此代码由工具生成。 // -// 对此文件的更改可能会导致不正确的行为,并且如果 -// 重新生成代码,这些更改将会丢失。 +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HJGL.WeldingReport { - - - public partial class WelderCheckStatistic { - +namespace FineUIPro.Web.HJGL.WeldingReport +{ + + + public partial class WelderCheckStatistic + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// RegionPanel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RegionPanel RegionPanel1; - + /// /// Region1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Region Region1; - + /// /// Form2 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form Form2; - + /// /// drpProject 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProject; - + /// /// drpUnit 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// drpWloName 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpWloName; - + /// /// BtnAnalyse 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button BtnAnalyse; - + /// /// btnOut 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// Region2 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Region Region2; - + /// /// Grid1 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// labNumber 控件。 /// @@ -128,7 +130,16 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label labNumber; - + + /// + /// lblWelderCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblWelderCode; + /// /// ToolbarSeparator1 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.HJGL.WeldingReport { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// diff --git a/HJGL_DS/Model/APIItem/WeldMethodItem.cs b/HJGL_DS/Model/APIItem/WeldMethodItem.cs new file mode 100644 index 0000000..59df335 --- /dev/null +++ b/HJGL_DS/Model/APIItem/WeldMethodItem.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Model +{ + public class WeldMethodItem + { + public string WME_ID { get; set; } + + /** + * id + */ + + + public string WME_Name { get; set; } + + /** + * 名称 + */ + } +} diff --git a/HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs b/HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs index 440189a..74f3fc1 100644 --- a/HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs +++ b/HJGL_DS/Model/HJGL/HJGL_SpRpWeldReportItem.cs @@ -27,6 +27,14 @@ namespace Model set; } /// + /// 项目id + /// + public string ProjectId + { + get; + set; + } + /// /// 索引 /// public int SortIndex diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs index 376f631..31e79bb 100644 --- a/HJGL_DS/Model/Model.cs +++ b/HJGL_DS/Model/Model.cs @@ -48941,6 +48941,8 @@ namespace Model private string _Y2; + private string _QRCodeAttachUrl; + private EntityRef _HJGL_BO_BatchDetail; private EntitySet _HJGL_BO_PreWeldReportMain; @@ -49201,6 +49203,8 @@ namespace Model partial void OnX2Changed(); partial void OnY2Changing(string value); partial void OnY2Changed(); + partial void OnQRCodeAttachUrlChanging(string value); + partial void OnQRCodeAttachUrlChanged(); #endregion public HJGL_PW_JointInfo() @@ -51303,6 +51307,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QRCodeAttachUrl", DbType="NVarChar(200)")] + public string QRCodeAttachUrl + { + get + { + return this._QRCodeAttachUrl; + } + set + { + if ((this._QRCodeAttachUrl != value)) + { + this.OnQRCodeAttachUrlChanging(value); + this.SendPropertyChanging(); + this._QRCodeAttachUrl = value; + this.SendPropertyChanged("QRCodeAttachUrl"); + this.OnQRCodeAttachUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_BO_BatchDetail_HJGL_PW_JointInfo", Storage="_HJGL_BO_BatchDetail", ThisKey="JOT_ID", OtherKey="JOT_ID", IsUnique=true, IsForeignKey=false, DeleteRule="NO ACTION")] public HJGL_BO_BatchDetail HJGL_BO_BatchDetail { @@ -66384,6 +66408,18 @@ namespace Model private string _JOTY_Group; + private string _JOT_Electricity; + + private string _JOT_Voltage; + + private System.Nullable _WeldL; + + private System.Nullable _IsGold; + + private string _JOT_QualifiedLevel; + + private string _HardQuaStandard; + public HJGL_View_JointInfo() { } @@ -67731,6 +67767,102 @@ namespace Model } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_Electricity", DbType="VarChar(40)")] + public string JOT_Electricity + { + get + { + return this._JOT_Electricity; + } + set + { + if ((this._JOT_Electricity != value)) + { + this._JOT_Electricity = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_Voltage", DbType="VarChar(40)")] + public string JOT_Voltage + { + get + { + return this._JOT_Voltage; + } + set + { + if ((this._JOT_Voltage != value)) + { + this._JOT_Voltage = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeldL", DbType="Int")] + public System.Nullable WeldL + { + get + { + return this._WeldL; + } + set + { + if ((this._WeldL != value)) + { + this._WeldL = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsGold", DbType="Bit")] + public System.Nullable IsGold + { + get + { + return this._IsGold; + } + set + { + if ((this._IsGold != value)) + { + this._IsGold = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JOT_QualifiedLevel", DbType="NVarChar(10)")] + public string JOT_QualifiedLevel + { + get + { + return this._JOT_QualifiedLevel; + } + set + { + if ((this._JOT_QualifiedLevel != value)) + { + this._JOT_QualifiedLevel = value; + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HardQuaStandard", DbType="NVarChar(50)")] + public string HardQuaStandard + { + get + { + return this._HardQuaStandard; + } + set + { + if ((this._HardQuaStandard != value)) + { + this._HardQuaStandard = value; + } + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HJGL_View_JointInfoAndIsoInfo")] diff --git a/HJGL_DS/Model/Model.csproj b/HJGL_DS/Model/Model.csproj index 30cda61..ff75728 100644 --- a/HJGL_DS/Model/Model.csproj +++ b/HJGL_DS/Model/Model.csproj @@ -72,6 +72,7 @@ + diff --git a/HJGL_DS/WebAPI/Controllers/BaseController.cs b/HJGL_DS/WebAPI/Controllers/BaseController.cs index 219ae31..558f254 100644 --- a/HJGL_DS/WebAPI/Controllers/BaseController.cs +++ b/HJGL_DS/WebAPI/Controllers/BaseController.cs @@ -201,6 +201,57 @@ namespace WebAPI.Controllers return respone; } + [HttpGet] + public Model.ResponeData weldMethodList() + { + Model.ResponeData respone = new ResponeData(); + try + { + + return APIBaseServices.weldMethodList(); + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } + + [HttpGet] + public Model.ResponeData weldSilkList() + { + Model.ResponeData respone = new ResponeData(); + try + { + + return APIBaseServices.weldSilkList(); + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } + + [HttpGet] + public Model.ResponeData weldMatList() + { + Model.ResponeData respone = new ResponeData(); + try + { + + return APIBaseServices.weldMatList(); + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } + [HttpGet] public Model.ResponeData getVersion() { diff --git a/HJGL_DS/WebAPI/Controllers/JointInfoController.cs b/HJGL_DS/WebAPI/Controllers/JointInfoController.cs index b9ca994..ca02e3a 100644 --- a/HJGL_DS/WebAPI/Controllers/JointInfoController.cs +++ b/HJGL_DS/WebAPI/Controllers/JointInfoController.cs @@ -431,5 +431,31 @@ namespace WebAPI.Controllers return isok; } #endregion + + #region 根据焊口ID获取焊口信息 + /// + /// 根据焊口ID获取焊口信息 + /// + /// + /// + [HttpGet] + public Model.ResponeData getJointInfoById(string jotId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = HJGL_PW_JointInfoService.GetJointItemByJotID(jotId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion + + } } \ No newline at end of file diff --git a/HJGL_DS/WebAPI/Controllers/WeldController.cs b/HJGL_DS/WebAPI/Controllers/WeldController.cs index 8e54900..6378b64 100644 --- a/HJGL_DS/WebAPI/Controllers/WeldController.cs +++ b/HJGL_DS/WebAPI/Controllers/WeldController.cs @@ -60,6 +60,22 @@ namespace WebAPI.Controllers return respone; } [HttpGet] + public Model.ResponeData getUsingPlanTempByUserId(string userId) + { + Model.ResponeData respone = new ResponeData(); + try + { + + return APIWeldServices.getUsingPlanTempByUserId(userId); + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } + [HttpGet] public Model.ResponeData welderQueIsPass(string welderId, string steelType, bool isSteelStru) { Model.ResponeData respone = new ResponeData(); @@ -168,6 +184,32 @@ namespace WebAPI.Controllers } } } + #region 添加到临时表,以供下次登录时加载当前登录人保存的记录数据 + BLL.UsingPlanTempService.DeleteUsingPlanTempByUserId(usingPlan.InPutMan); + Model.Weld_UsingPlan_Temp newTemp = new Model.Weld_UsingPlan_Temp(); + newTemp.UsingPlanTempId = BLL.SQLHelper.GetNewID(typeof(Model.Weld_UsingPlan_Temp)); + newTemp.UnitStoreId = usingPlan.UnitStoreId; + newTemp.WeldId = usingPlan.WeldId; + newTemp.ProjectId = usingPlan.ProjectId; + newTemp.UsePosition = usingPlan.UsePosition; + newTemp.UsingUnit = usingPlan.UsingUnit; + newTemp.STE_ID = usingPlan.STE_ID; + newTemp.STE_Name = usingPlan.STE_Name; + newTemp.Amount = usingPlan.Amount; + newTemp.UsingManOne = usingPlan.UsingManOne; + newTemp.InPutDate = DateTime.Now; + newTemp.OrderDate = DateTime.Now; + newTemp.OrderTime = usingPlan.OrderTime; + newTemp.TeamGroupId = usingPlan.TeamGroupId; + newTemp.CancelDate = BLL.Funs.GetNewDateTime(usingPlan.CancelDate); + newTemp.IsCancel = usingPlan.IsCancel; + newTemp.CancelResult = usingPlan.CancelResult; + newTemp.IsSubmit = usingPlan.IsSubmit; + newTemp.InPutMan = usingPlan.InPutMan; + newTemp.Type = "1"; + newTemp.IsSteelStru = usingPlan.IsSteelStru; + BLL.UsingPlanTempService.AddUsingPlan(newTemp); + #endregion return APIWeldServices.addUsingPlan(usingPlan); } catch (Exception e) @@ -229,5 +271,54 @@ namespace WebAPI.Controllers } return respone; } + + [HttpGet] + public Model.ResponeData getProjectWelderSelectList(string projectId, string str, int page, int pageSize) + { + Model.ResponeData respone = new ResponeData(); + try + { + + return APIWeldServices.getProjectWelderSelectList(projectId, str, page, pageSize); + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } + + [HttpGet] + public Model.ResponeData saveProjectWelderSelectList(string projectId, string wed_ids) + { + Model.ResponeData respone = new ResponeData(); + try + { + using (Model.SGGLDB db = new Model.SGGLDB(BLL.Funs.ConnString)) + { + string[] ids = wed_ids.Split(','); + List list = new List(); + foreach (string id in ids) + { + Model.Project_Welder newProjectWelder = new Model.Project_Welder(); + newProjectWelder.WED_ID = id; + newProjectWelder.ProjectId = projectId; + newProjectWelder.IsSelected = true; + newProjectWelder.IsApprove = true; + newProjectWelder.ProjectWelderId = BLL.SQLHelper.GetNewID(typeof(Model.Project_Welder)); + list.Add(newProjectWelder); + } + db.Project_Welder.InsertAllOnSubmit(list); + db.SubmitChanges(); + } + } + catch (Exception e) + { + respone.code = 0; + respone.message = e.Message; + } + return respone; + } } } \ No newline at end of file diff --git a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 67bbaa5..5411168 100644 --- a/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/HJGL_DS/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -72,20 +72,26 @@ 07/03/2024 11:01:07 + + 04/12/2024 09:54:20 + 09/10/2013 16:29:20 09/10/2013 16:29:20 + + 04/12/2024 09:54:20 + - 12/19/2025 10:46:46 + 08/07/2026 10:46:18 - 07/28/2025 20:15:00 + 12/31/2025 16:32:37 - 12/19/2025 10:46:46 + 08/07/2026 10:46:18 12/17/2020 21:32:28 @@ -115,13 +121,13 @@ 07/25/2012 11:48:56 - 12/19/2025 10:46:45 + 08/07/2026 10:46:10 - 12/19/2025 10:46:45 + 08/07/2026 10:46:10 - 03/17/2021 20:03:36 + 11/28/2018 02:07:34 11/27/2018 17:59:08 @@ -288,6 +294,15 @@ 05/24/2018 13:38:24 + + 08/07/2026 10:46:25 + + + 07/28/2025 11:00:31 + + + 08/07/2026 10:46:25 + 02/01/2018 12:17:18 @@ -319,10 +334,10 @@ 02/01/2018 12:20:56 - 12/19/2025 10:46:46 + 08/07/2026 10:46:32 - 12/19/2025 10:46:46 + 08/07/2026 10:46:32 01/23/2014 13:57:34 @@ -448,7 +463,7 @@ 07/03/2024 11:01:07 - 12/19/2025 10:47:09 + 08/07/2026 10:46:51 \ No newline at end of file