diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-05-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-05-gaofei.sql new file mode 100644 index 00000000..812d5821 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-05-05-gaofei.sql @@ -0,0 +1,32 @@ +alter table [dbo].[JDGL_QuantityCompletion] add NextNum decimal(9,2) 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 e.QuantityCompletionId == quantityCompletion.QuantityCompletionId); if (newQuantityCompletion != null) { + newQuantityCompletion.QuantityListId = quantityCompletion.QuantityListId; newQuantityCompletion.PlanNum = quantityCompletion.PlanNum; newQuantityCompletion.RealNum = quantityCompletion.RealNum; + newQuantityCompletion.NextNum = quantityCompletion.NextNum; newQuantityCompletion.CompileMan = quantityCompletion.CompileMan; newQuantityCompletion.CompileDate = quantityCompletion.CompileDate; + newQuantityCompletion.StartDate = quantityCompletion.StartDate; + newQuantityCompletion.EndDate = quantityCompletion.EndDate; + db.SubmitChanges(); + } + } + + /// + /// 根据主键删除工程量完成情况 + /// + /// + public static void DeleteQuantityCompletionByQuantityCompletionId(string QuantityCompletionId) + { + Model.SGGLDB db = Funs.DB; + var q = (from x in db.JDGL_QuantityCompletion where x.QuantityCompletionId == QuantityCompletionId select x).FirstOrDefault(); + if (q != null) + { + db.JDGL_QuantityCompletion.DeleteOnSubmit(q); db.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/项目进度完成情况导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/项目进度完成情况导入模板.xls index 9f71b163..865b5692 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/项目进度完成情况导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/项目进度完成情况导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index 9e91deff..63ca13cc 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU true false diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx index eaeb9804..a6098651 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx @@ -17,19 +17,22 @@ -