diff --git a/DataBase/版本日志/SGGLDB_WH_2023-10-16.sql b/DataBase/版本日志/SGGLDB_WH_2023-10-16.sql index 70f2f296..87ccdd7c 100644 --- a/DataBase/版本日志/SGGLDB_WH_2023-10-16.sql +++ b/DataBase/版本日志/SGGLDB_WH_2023-10-16.sql @@ -9,4 +9,13 @@ truncate table PreRun_InspectTermApproveRecords alter table PreRun_SubInspectTermItem add SubcontractorRemark varchar(1000) NULL--ְ̱ע alter table PreRun_SubInspectTermItem add ContractorRemark varchar(1000) NULL--а̱ע alter table PreRun_SubInspectTermItem add SupervisionRemark varchar(1000) NULL--ע -alter table PreRun_SubInspectTermItem add OwnerRemark varchar(1000) NULL--ҵע \ No newline at end of file +alter table PreRun_SubInspectTermItem add OwnerRemark varchar(1000) NULL--ҵע +GO + + + + + +--ѵ¼Ӷά +alter table EduTrain_TrainRecord add QRCodeUrl nvarchar(2000) null +GO \ No newline at end of file diff --git a/SGGL/BLL/API/HSSE/APITestRecordService.cs b/SGGL/BLL/API/HSSE/APITestRecordService.cs index 2eaa488a..2a973ae5 100644 --- a/SGGL/BLL/API/HSSE/APITestRecordService.cs +++ b/SGGL/BLL/API/HSSE/APITestRecordService.cs @@ -616,5 +616,116 @@ namespace BLL } } #endregion + + #region 扫码获取培训记录 + /// + /// 培训记录主表实体类 + /// + public class EduTrainRecord { + public string TrainTitle { get; set; } + public string UnitsName { get; set; } + public string TrainType { get; set; } + public string TrainStartDate { get; set; } + public string TeachHour { get; set; } + public string TrainContent { get; set; } + public List ChildList { get; set; } + } + public class EduTrain_TrainRecordDetailDto { + public string PersonName { get; set; } + public string IdCard { get; set; } + public string CheckScore { get; set; } + public string CheckResult { get; set; } + } + + /// + /// 扫码获取培训记录 + /// + /// + /// + public static EduTrainRecord getTestRecordByTestRecordIdQrCode(string TrainingId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getDataLists = from x in db.EduTrain_TrainRecord + where x.TrainingId == TrainingId + select new EduTrainRecord + { + TrainTitle=x.TrainTitle, + UnitsName= getUnitNameByUnitids(x.UnitIds), + TrainType= getTrainTypeNameByTrainTypeId(x.TrainTypeId), + TrainStartDate = string.Format("{0:yyyy-MM-dd}", x.TrainStartDate), + TeachHour=x.TeachHour.ToString(), + TrainContent=x.TrainContent, + ChildList=getChildEduTrainChild(x.TrainingId) + }; + return getDataLists.FirstOrDefault(); + } + } + /// + /// 根据单位id获取单位名称 + /// + /// + /// + private static string getUnitNameByUnitids(string unitId) { + if (!string.IsNullOrEmpty(unitId)) + { + string unitNames = string.Empty; + string[] unitIds = unitId.Split(','); + foreach (var item in unitIds) + { + Model.Base_Unit unit = BLL.UnitService.GetUnitByUnitId(item); + if (unit != null) + { + unitNames += unit.UnitName + ","; + } + } + if (!string.IsNullOrEmpty(unitNames)) + { + unitNames = unitNames.Substring(0, unitNames.LastIndexOf(",")); + } + return unitNames; + } + else { + return ""; + } + } + + private static string getPerIdCardByPersonId(string personId) { + var pmodel = Funs.DB.SitePerson_Person.FirstOrDefault(x => x.PersonId == personId); + if (pmodel != null) + { + return pmodel.IdentityCard; + } + else { + return ""; + } + } + + private static string getTrainTypeNameByTrainTypeId(string TrainTypeId) { + if (!string.IsNullOrEmpty(TrainTypeId)) + { + return BLL.TrainTypeService.GetTrainTypeById(TrainTypeId).TrainTypeName; + } + else { + return ""; + } + } + private static List getChildEduTrainChild(string TrainingId) { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getDataLists = from x in db.View_EduTrain_TrainRecordDetail + where x.TrainingId == TrainingId + select new EduTrain_TrainRecordDetailDto + { + PersonName=x.PersonName, + IdCard= getPerIdCardByPersonId(x.PersonId), + CheckScore=x.CheckScore.ToString(), + CheckResult=x.CheckResult==true?"合格":"不合格" + + }; + return getDataLists.ToList(); + } + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx index efc7fda4..5a70c33f 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx @@ -46,11 +46,12 @@ - + - + + @@ -153,12 +154,12 @@ } function onGridDataLoad(event) { - this.mergeColumns(['CheckSpecialCode', 'CheckCount','CheckTime'], { depends: true }); -// this.mergeColumns(['CheckCount']); -// this.mergeColumns(['CheckPersonName']); -// this.mergeColumns(['CheckTime']); -// this.mergeColumns(['FlowOperateName']); - } + this.mergeColumns(['CheckSpecialCode', 'CheckCount', 'CheckTime'], { depends: true }); + // this.mergeColumns(['CheckCount']); + // this.mergeColumns(['CheckPersonName']); + // this.mergeColumns(['CheckTime']); + // this.mergeColumns(['FlowOperateName']); + } diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs index c178df09..9b77dffb 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.cs @@ -60,7 +60,7 @@ namespace FineUIPro.Web.HSSE.Check { string strSql = @"SELECT CheckSpecial.CheckSpecialId,CodeRecords.Code AS CheckSpecialCode," + @" CheckItemSet.CheckItemName,CheckSpecial.CheckTime,(CASE WHEN CheckSpecial.CheckType ='1' THEN '联合检查' ELSE '专项检查' END) AS CheckTypeName" - + @" ,(CASE WHEN CheckSpecial.States='2' THEN '已完成' WHEN CheckSpecial.States='1' THEN '待整改' ELSE '待提交' END) AS StatesName" + + @" ,(CASE WHEN CheckSpecial.States='2' THEN '待确认' WHEN CheckSpecial.States='3' THEN '已确认' WHEN CheckSpecial.States='1' THEN '待整改' ELSE '待提交' END) AS StatesName" + @" FROM Check_CheckSpecial AS CheckSpecial " + @" LEFT JOIN Sys_CodeRecords AS CodeRecords ON CheckSpecial.CheckSpecialId=CodeRecords.DataId " + @" LEFT JOIN Technique_CheckItemSet AS CheckItemSet ON CheckItemSet.CheckItemSetId = CheckSpecial.CheckItemSetId where 1=1"; @@ -68,9 +68,9 @@ namespace FineUIPro.Web.HSSE.Check strSql += " AND CheckSpecial.ProjectId = @ProjectId"; listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); - if (this.rbStates.SelectedValue!="-1") + if (this.rbStates.SelectedValue != "-1") { - strSql += " AND CheckSpecial.States = @States"; + strSql += " AND CheckSpecial.States = @States"; listStr.Add(new SqlParameter("@States", this.rbStates.SelectedValue)); } if (this.rbType.SelectedValue != "-1") @@ -86,10 +86,10 @@ namespace FineUIPro.Web.HSSE.Check listStr.Add(new SqlParameter("@CheckType", this.rbType.SelectedValue)); } } - if (this.drpSupCheckItemSet.SelectedValue!=BLL.Const._Null) + if (this.drpSupCheckItemSet.SelectedValue != BLL.Const._Null) { strSql += " AND CheckSpecial.CheckItemSetId = @CheckItemSetId"; - listStr.Add(new SqlParameter("@CheckItemSetId", this.drpSupCheckItemSet.SelectedValue )); + listStr.Add(new SqlParameter("@CheckItemSetId", this.drpSupCheckItemSet.SelectedValue)); } if (!string.IsNullOrEmpty(this.txtStartTime.Text.Trim())) { @@ -269,8 +269,8 @@ namespace FineUIPro.Web.HSSE.Check } } } - #endregion - + #endregion + #region 导出按钮 /// 导出按钮 /// @@ -289,7 +289,7 @@ namespace FineUIPro.Web.HSSE.Check Response.End(); } #endregion - + /// /// /// @@ -361,7 +361,8 @@ namespace FineUIPro.Web.HSSE.Check uploadfilepath = rootPath + initTemplatePath; newUrl = uploadfilepath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".doc"); //filePath = initTemplatePath.Replace(".doc", string.Format("{0:yyyy-MM}", DateTime.Now) + ".pdf"); - if (File.Exists(newUrl)) { + if (File.Exists(newUrl)) + { File.Delete(newUrl); } File.Copy(uploadfilepath, newUrl); @@ -398,10 +399,11 @@ namespace FineUIPro.Web.HSSE.Check { if (checkSpecial != null) { - if (!string.IsNullOrEmpty(checkSpecial.CheckItemSetId)) { + if (!string.IsNullOrEmpty(checkSpecial.CheckItemSetId)) + { bookmarkSupCheckItemSet.Text = Technique_CheckItemSetService.GetCheckItemSetNameById(checkSpecial.CheckItemSetId); } - + } } @@ -410,10 +412,11 @@ namespace FineUIPro.Web.HSSE.Check { if (checkSpecial != null) { - if (checkSpecial.CheckTime.HasValue) { + if (checkSpecial.CheckTime.HasValue) + { bookmarkCheckDate.Text = string.Format("{0:yyyy-MM-dd}", checkSpecial.CheckTime); } - + } } @@ -598,7 +601,7 @@ namespace FineUIPro.Web.HSSE.Check builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐 builder.CellFormat.Width = 250; builder.CellFormat.WrapText = true; - builder.Write(string.IsNullOrEmpty(detail.CheckItemSetContent)?"": detail.CheckItemSetContent); + builder.Write(string.IsNullOrEmpty(detail.CheckItemSetContent) ? "" : detail.CheckItemSetContent); ////处理结果 //builder.InsertCell(); @@ -615,7 +618,7 @@ namespace FineUIPro.Web.HSSE.Check builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.CellFormat.Width = 60; - builder.Write(string.Format("{0:yyyy-MM-dd}", detail.Rectification_Date)); + builder.Write(string.Format("{0:yyyy-MM-dd}", detail.Rectification_Date)); //隐患类别 builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; diff --git a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.designer.cs index 82f82f65..7b0d4f2c 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/CheckSpecial.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.Check { - - - public partial class CheckSpecial { - +namespace FineUIPro.Web.HSSE.Check +{ + + + public partial class CheckSpecial + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// rbStates 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbStates; - + /// /// rbType 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbType; - + /// /// drpSupCheckItemSet 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpSupCheckItemSet; - + /// /// txtStartTime 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStartTime; - + /// /// txtEndTime 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndTime; - + /// /// ToolbarFill1 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnOut 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// labNumber 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label labNumber; - + /// /// ToolbarSeparator1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnPrinter 控件。 /// @@ -200,7 +202,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnPrinter; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/Plan.aspx b/SGGL/FineUIPro.Web/HSSE/EduTrain/Plan.aspx index 45ecaa32..d5b689b9 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/Plan.aspx +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/Plan.aspx @@ -88,7 +88,7 @@ runat="server" Text="查看" Icon="Find"> + runat="server" Text="二维码" Hidden="true" Icon="Shading"> + + diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs index b2ed5240..07e64c76 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.cs @@ -661,5 +661,21 @@ namespace FineUIPro.Web.HSSE.EduTrain } } } + + /// + /// 查看二维码 + /// + /// + /// + protected void btnQR_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请选择一条记录!", MessageBoxIcon.Warning); + return; + } + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/Controls/SeeQRImage.aspx?TrainingId={0}&strCode={1}", Grid1.SelectedRowID, "trainRecord$" + Grid1.SelectedRowID), "二维码查看", 400, 400)); + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.designer.cs index c00b7651..764a3460 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/TrainRecord.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.EduTrain { - - - public partial class TrainRecord { - +namespace FineUIPro.Web.HSSE.EduTrain +{ + + + public partial class TrainRecord + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// drpUnitId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitId; - + /// /// drpTrainType 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpTrainType; - + /// /// drpTrainLevel 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpTrainLevel; - + /// /// txtStartDate 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStartDate; - + /// /// lblTo 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label lblTo; - + /// /// txtEndDate 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndDate; - + /// /// ToolbarFill1 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnNew 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnOut 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// btnRefresh 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnRefresh; - + /// /// lblNumber 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblNumber; - + /// /// lblTrainingCode 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblTrainingCode; - + /// /// lblUnitId 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblUnitId; - + /// /// Label1 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label1; - + /// /// ToolbarSeparator1 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -200,7 +202,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -209,7 +211,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -218,7 +220,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -227,7 +229,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Menu1 控件。 /// @@ -236,7 +238,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuView 控件。 /// @@ -245,7 +247,16 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuView; - + + /// + /// btnQR 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnQR; + /// /// btnMenuEdit 控件。 /// @@ -254,7 +265,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnPrint 控件。 /// @@ -263,7 +274,7 @@ namespace FineUIPro.Web.HSSE.EduTrain { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnPrint; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index a1aa9e81..834d18e0 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -128299,6 +128299,8 @@ namespace Model private string _UnitWorkIds; + private string _QRCodeUrl; + private EntitySet _EduTrain_TrainRecordDetail; private EntityRef _Base_Project; @@ -128359,6 +128361,8 @@ namespace Model partial void OnCNProfessionalIdChanged(); partial void OnUnitWorkIdsChanging(string value); partial void OnUnitWorkIdsChanged(); + partial void OnQRCodeUrlChanging(string value); + partial void OnQRCodeUrlChanged(); #endregion public EduTrain_TrainRecord() @@ -128843,6 +128847,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QRCodeUrl", DbType="NVarChar(2000)")] + public string QRCodeUrl + { + get + { + return this._QRCodeUrl; + } + set + { + if ((this._QRCodeUrl != value)) + { + this.OnQRCodeUrlChanging(value); + this.SendPropertyChanging(); + this._QRCodeUrl = value; + this.SendPropertyChanged("QRCodeUrl"); + this.OnQRCodeUrlChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_EduTrain_TrainDetail_EduTrain_Training", Storage="_EduTrain_TrainRecordDetail", ThisKey="TrainingId", OtherKey="TrainingId", DeleteRule="NO ACTION")] public EntitySet EduTrain_TrainRecordDetail { diff --git a/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs b/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs index 303ca136..1580f762 100644 --- a/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs +++ b/SGGL/WebAPI/Controllers/HSSE/TestRecordController.cs @@ -400,6 +400,28 @@ namespace WebAPI.Controllers return responeData; } - #endregion + #endregion + + #region 扫码获取培训记录详情 + /// + /// 扫码获取培训记录详情 + /// + /// + /// + public Model.ResponeData getTestRecordByTestRecordIdQrCode(string TrainingId) + { + var responeData = new Model.ResponeData(); + try + { + responeData.data = APITestRecordService.getTestRecordByTestRecordIdQrCode(TrainingId); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + #endregion } }