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']);
+ }