20220505 考勤导入功能优化,新增版本号显示。 考试计划详细页新增单独获取考生姓名接口。优化接口请求方法,请求超时时间设置5秒,防止长期占有程序池连接。

This commit is contained in:
2022-05-07 15:12:59 +08:00
parent 93df6c189c
commit fce7d98592
18 changed files with 1725 additions and 42 deletions
@@ -0,0 +1,31 @@
alter table [dbo].[JDGL_QuantityList] add SortIndex int null
GO
ALTER VIEW [dbo].[View_JDGL_QuantityCompletion]
AS
select qc.*,ql.DesignNum,ql.Name,ql.Unit,ql.SortIndex,
CONVERT(FLOAT,(select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and EndDate<=getdate())) as TotalPlanNum,
CONVERT(FLOAT,(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and EndDate<=getdate())) as TotalRealNum,
CONVERT(NVARCHAR(10),((CAST(CASE ISNULL(qc.PlanNum,0) WHEN 0 THEN 0
ELSE 100*ISNULL(qc.RealNum,0) / (1.0 *qc.PlanNum) END AS DECIMAL(9,2)))))+'%'
AS Rate,
CONVERT(NVARCHAR(10),((CAST(CASE (select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and EndDate<=getdate()) WHEN 0 THEN 0
ELSE 100*(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and EndDate<=getdate()) / (1.0 *(select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and EndDate<=getdate())) END AS DECIMAL(9,2)))))+'%'
AS TotalRate,
CONVERT(NVARCHAR(10),((CAST(CASE ISNULL(ql.DesignNum,0) WHEN 0 THEN 0
ELSE 100*(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and EndDate<=getdate()) / (1.0 *ql.DesignNum) END AS DECIMAL(9,2)))))+'%'
AS SumRate,
CONVERT(FLOAT,(select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and Months<qc.Months)) as LastTotalPlanNum,
CONVERT(FLOAT,(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and Months<qc.Months)) as LastTotalRealNum
from [dbo].JDGL_QuantityList ql
left join dbo.[JDGL_QuantityCompletion] qc on ql.QuantityListId=qc.QuantityListId
where qc.QuantityCompletionId=(select top 1 QuantityCompletionId from [JDGL_QuantityCompletion] q where q.QuantityListId=qc.QuantityListId order by q.EndDate desc)
GO
@@ -0,0 +1,29 @@
/****** Object: Index [NonClusteredIndex-20220422-165000] Script Date: 2022/4/22 16:50:59 ******/
CREATE NONCLUSTERED INDEX [NonClusteredIndex-20220422-165000] ON [dbo].[Training_TestPlan]
(
[TestPlanId] ASC,
[TestStartTime] ASC,
[States] ASC,
[TestEndTime] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [NonClusteredIndex-20220422-165128] Script Date: 2022/4/22 16:52:09 ******/
CREATE NONCLUSTERED INDEX [NonClusteredIndex-20220422-165128] ON [dbo].[Training_TestRecord]
(
[TestPlanId] ASC,
[TestManId] ASC,
[TestEndTime] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: Index [NonClusteredIndex-20220424-164842] Script Date: 2022/4/24 16:49:20 ******/
CREATE NONCLUSTERED INDEX [NonClusteredIndex-20220424-164842] ON [dbo].[Training_TestRecordItem]
(
[TestRecordId] ASC,
[TestType] ASC,
[TrainingItemCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO