开班转入开课,自动产生考试数据,新增同步集团数据归属

培训记录、考试记录、课程/课程场景分析查询新增集团数据归属过滤
必选修查询表、讲师上课分析、学分查询、人证对照表
master
xiaochanghai 3 weeks ago
parent 2aa2423c3b
commit 02e5af37c7
  1. 32
      Model/Tiobon.Web.pdm
  2. 3
      Tiobon.Core.Api/Controllers/Ghre/Ghre_CourseController.cs
  3. 3
      Tiobon.Core.Model/View/Ghre/Ghre_ExamRecord.Dto.View.cs
  4. 2
      Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs
  5. 1
      Tiobon.Core.Services/Ghre/Ghre_CertificateServices.cs
  6. 2
      Tiobon.Core.Services/Ghre/Ghre_CourseServices.cs
  7. 1
      Tiobon.Core.Services/Ghre/Ghre_CreditPointServices.cs
  8. 4
      Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs
  9. 1
      Tiobon.Core.Services/Ghre/Ghre_RequiredCourseServices.cs
  10. 10
      Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<?PowerDesigner AppLocale="UTF16" ID="{C294868A-C3F3-41AD-98CC-78B6D4E0CC40}" Label="" LastModificationDate="1748509699" Name="Tiobon" Objects="4347" Symbols="150" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<?PowerDesigner AppLocale="UTF16" ID="{C294868A-C3F3-41AD-98CC-78B6D4E0CC40}" Label="" LastModificationDate="1748569065" Name="Tiobon" Objects="4334" Symbols="150" Target="Microsoft SQL Server 2008" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" signature="PDM_DATA_MODEL_XML" version="16.5.0.3982"?>
<!-- do not edit this file -->
<Model xmlns:a="attribute" xmlns:c="collection" xmlns:o="object">
@ -9743,7 +9743,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o46">
<a:CreationDate>1717726229</a:CreationDate>
<a:ModificationDate>1719381754</a:ModificationDate>
<a:Rect>((-42337,11400), (-39337,18375))</a:Rect>
<a:Rect>((-42449,11400), (-39225,18375))</a:Rect>
<a:ListOfPoints>((-40837,11400),(-40837,18375))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -9966,7 +9966,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o79">
<a:CreationDate>1727337857</a:CreationDate>
<a:ModificationDate>1727337857</a:ModificationDate>
<a:Rect>((-54786,11250), (-48786,18150))</a:Rect>
<a:Rect>((-54898,11250), (-48674,18150))</a:Rect>
<a:ListOfPoints>((-51786,18150),(-51786,11250))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10010,7 +10010,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o85">
<a:CreationDate>1738913762</a:CreationDate>
<a:ModificationDate>1747275741</a:ModificationDate>
<a:Rect>((-45111,-30675), (-40611,-24525))</a:Rect>
<a:Rect>((-45223,-30675), (-40499,-24525))</a:Rect>
<a:ListOfPoints>((-44099,-30675),(-44099,-27375),(-41624,-27375),(-41624,-24525))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10056,7 +10056,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o92">
<a:CreationDate>1738915648</a:CreationDate>
<a:ModificationDate>1738915648</a:ModificationDate>
<a:Rect>((-43011,-23625), (-38511,-17925))</a:Rect>
<a:Rect>((-43123,-23625), (-38399,-17925))</a:Rect>
<a:ListOfPoints>((-40761,-17925),(-40761,-23625))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10078,7 +10078,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o95">
<a:CreationDate>1738916095</a:CreationDate>
<a:ModificationDate>1738916119</a:ModificationDate>
<a:Rect>((-53924,-23812), (-39449,-17325))</a:Rect>
<a:Rect>((-54036,-23812), (-39449,-17325))</a:Rect>
<a:ListOfPoints>((-51674,-17325),(-51674,-23400),(-39449,-23400))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10100,7 +10100,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o98">
<a:CreationDate>1738916098</a:CreationDate>
<a:ModificationDate>1738916104</a:ModificationDate>
<a:Rect>((-53999,-31050), (-42899,-24863))</a:Rect>
<a:Rect>((-54111,-31050), (-42899,-24863))</a:Rect>
<a:ListOfPoints>((-51749,-31050),(-51749,-25275),(-42899,-25275))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10122,7 +10122,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o101">
<a:CreationDate>1741251133</a:CreationDate>
<a:ModificationDate>1741253579</a:ModificationDate>
<a:Rect>((40058,-9675), (46058,-900))</a:Rect>
<a:Rect>((39946,-9675), (46170,-900))</a:Rect>
<a:ListOfPoints>((43058,-9675),(43058,-900))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10167,7 +10167,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o108">
<a:CreationDate>1741253476</a:CreationDate>
<a:ModificationDate>1741253575</a:ModificationDate>
<a:Rect>((40013,-2100), (46013,5325))</a:Rect>
<a:Rect>((39901,-2100), (46125,5325))</a:Rect>
<a:ListOfPoints>((43013,5325),(43013,-2100))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10189,7 +10189,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o111">
<a:CreationDate>1741253560</a:CreationDate>
<a:ModificationDate>1741253591</a:ModificationDate>
<a:Rect>((39309,5850), (46809,13800))</a:Rect>
<a:Rect>((39197,5850), (46921,13800))</a:Rect>
<a:ListOfPoints>((43059,13800),(43059,5850))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10211,7 +10211,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o114">
<a:CreationDate>1741255050</a:CreationDate>
<a:ModificationDate>1741255050</a:ModificationDate>
<a:Rect>((38401,14400), (47401,22350))</a:Rect>
<a:Rect>((38289,14400), (47513,22350))</a:Rect>
<a:ListOfPoints>((42901,22350),(42901,14400))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10233,7 +10233,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o117">
<a:CreationDate>1741255952</a:CreationDate>
<a:ModificationDate>1741255952</a:ModificationDate>
<a:Rect>((50010,-1950), (56010,5325))</a:Rect>
<a:Rect>((49898,-1950), (56122,5325))</a:Rect>
<a:ListOfPoints>((53010,-1950),(53010,5325))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10277,7 +10277,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o125">
<a:CreationDate>1747034447</a:CreationDate>
<a:ModificationDate>1747034447</a:ModificationDate>
<a:Rect>((-15206,-37275), (-7706,-30075))</a:Rect>
<a:Rect>((-15318,-37275), (-7594,-30075))</a:Rect>
<a:ListOfPoints>((-11456,-37275),(-11456,-30075))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -10299,7 +10299,7 @@ DESTINATION 0 新宋体,8,N</a:FontList>
<o:ReferenceSymbol Id="o128">
<a:CreationDate>1747035168</a:CreationDate>
<a:ModificationDate>1747035168</a:ModificationDate>
<a:Rect>((-14943,-44850), (-7443,-37125))</a:Rect>
<a:Rect>((-15055,-44850), (-7331,-37125))</a:Rect>
<a:ListOfPoints>((-11193,-44850),(-11193,-37125))</a:ListOfPoints>
<a:CornerStyle>2</a:CornerStyle>
<a:ArrowStyle>1</a:ArrowStyle>
@ -17629,7 +17629,7 @@ Shadow=0</a:DisplayPreferences>
<a:Code>Ghre_ExamRecord</a:Code>
<a:CreationDate>1714104130</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1744775173</a:ModificationDate>
<a:ModificationDate>1748569065</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier>
<a:Comment>考试记录</a:Comment>
<a:TotalSavingCurrency/>
@ -27100,7 +27100,7 @@ Shadow=0</a:DisplayPreferences>
<a:Code>Ghre_StudyRecord</a:Code>
<a:CreationDate>1721036281</a:CreationDate>
<a:Creator>Administrator</a:Creator>
<a:ModificationDate>1745895977</a:ModificationDate>
<a:ModificationDate>1748569054</a:ModificationDate>
<a:Modifier>Administrator</a:Modifier>
<a:Comment>培训记录</a:Comment>
<a:TotalSavingCurrency/>

@ -1,5 +1,4 @@
using StackExchange.Profiling.Data;
using Tiobon.Core.Model.ViewModels.Extend;
using Tiobon.Core.Model.ViewModels.Extend;
namespace Tiobon.Core.Api.Controllers;

@ -58,4 +58,7 @@ public class Ghre_ExamRecordDto : Ghre_ExamRecord
public decimal? TotalScore { get; set; } = 0;
public List<Ghre_Attachment> Attachments { get; set; }
public int? DataBelongID { get; set; }
public string DataBelongName { get; set; }
}

@ -175,4 +175,6 @@ public class Ghre_StudyRecordDto : Ghre_StudyRecord
public long? ExamRecordId { get; set; }
public string StudyFinishedRule { get; set; }
public int? DataBelongID { get; set; }
public string DataBelongName { get; set; }
}

@ -40,6 +40,7 @@ public class Ghre_CertificateServices : BaseServices<Ghre_Certificate, Ghre_Cert
if (!string.IsNullOrWhiteSpace(condition))
conditions += " AND " + condition;
conditions += $" AND dbo.FUserDataBelongPriv ({App.User.ID}, DataBelongID, NULL) = 1";
if (filter.jsonParam != null)
foreach (JProperty jProperty in filter.jsonParam.Properties())

@ -1336,7 +1336,7 @@ public class Ghre_CourseServices : BaseServices<Ghre_Course, Ghre_CourseDto, Ins
string conditions = " WHERE 1=1";
conditions += $"AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1";
if (filter.jsonParam != null)
foreach (JProperty jProperty in filter.jsonParam.Properties())

@ -118,6 +118,7 @@ public class Ghre_CreditPointServices : BaseServices<Ghre_CreditPoint, Ghre_Cred
// conditions += $" AND Id IN({string.Join(",", ids)})";
if (!condition.IsNull())
conditions += " AND " + condition;
conditions += $" AND dbo.FUserDataBelongPriv ({App.User.ID}, DataBelongID, NULL) = 1";
if (await Db.Queryable<Ghrs_Menu>().Where(x => x.DataPrivType == "Priv" && x.MenuNo == filter.menuName).AnyAsync())
{

@ -35,11 +35,12 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
if (filter.pageSize == 0)
filter.pageSize = 10000;
var countSql = @$" SELECT COUNT(1) FROM Ghre_ExamRecord_V";
var countSql = @$" SELECT COUNT(1) FROM Ghre_ExamRecord_V A";
var sql = @$" SELECT *
FROM Ghre_ExamRecord_V";
string conditions = " WHERE IsEnable = 1";
conditions += $"AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1";
if (!string.IsNullOrEmpty(condition)) conditions += " AND " + condition;
if (filter.jsonParam != null)
@ -138,6 +139,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
// x.DueDate1 = x.DueDate.Value.ToString("yyyy-MM-dd");
//if (x.ExamDate != null)
// x.ExamDate1 = x.ExamDate.Value.ToString("yyyy-MM-dd");
x.DataBelongName = await GetDataBelongName(x.DataBelongID);
});

@ -26,6 +26,7 @@ public class Ghre_RequiredCourseServices : BaseServices<Ghre_RequiredCourse, Ghr
FROM Ghre_RequiredCourse_V";
string conditions = " WHERE IsEnable = 1";
conditions += $"AND dbo.FUserDataBelongPriv ({App.User.ID}, DataBelongID, NULL) = 1";
if (await Db.Queryable<Ghrs_Menu>().Where(x => x.DataPrivType == "Priv" && x.MenuNo == filter.menuName).AnyAsync())
{
var staffIds = await GetUserStaffPrivIds((int)App.User.ID);

@ -35,7 +35,7 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud
if (filter.pageSize == 0)
filter.pageSize = 10000;
var countSql = @$" SELECT COUNT(1) FROM Ghre_StudyRecord_V";
var countSql = @$" SELECT COUNT(1) FROM Ghre_StudyRecord_V A";
var sql = @$" SELECT *
FROM Ghre_StudyRecord_V A";
@ -55,6 +55,8 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud
if (!string.IsNullOrWhiteSpace(condition))
conditions += " AND " + condition;
conditions += $"AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1";
if (filter.jsonParam != null)
foreach (JProperty jProperty in filter.jsonParam.Properties())
{
@ -124,6 +126,7 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud
if (entity.ValidBeginTime != null && entity.ValidEndTime != null)
entity.ResultValidPeriod = DateTimeHelper.ConvertToDayString(entity.ValidBeginTime) + "~" + DateTimeHelper.ConvertToDayString(entity.ValidEndTime);
else entity.ResultValidPeriod = "长期";
entity.DataBelongName = await GetDataBelongName(entity.DataBelongID);
entitys[i] = entity;
}
@ -2142,12 +2145,13 @@ FROM (SELECT ISNULL
E.TeacherLevel,
B.CourseName,
B.StandardHour
FROM Ghre_StudyRecord A
FROM Ghre_StudyRecord_V A
LEFT JOIN Ghre_Course B ON A.CourseId = B.Id
LEFT JOIN Ghro_Dept C ON B.TeacherDeptId = C.DeptID
LEFT JOIN Ghre_School D ON B.SchoolId = D.Id
LEFT JOIN Ghre_Teacher E ON B.SchoolTeacherId = E.Id
WHERE A.BeginTime IS NOT NULL AND A.CourseId IS NOT NULL {conditions}) A
WHERE A.BeginTime IS NOT NULL AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1
AND A.CourseId IS NOT NULL {conditions}) A WHERE TeacherName is not null
GROUP BY DeptName,
TeacherName,
TeacherLevel,

Loading…
Cancel
Save