提交代码
This commit is contained in:
parent
ea6bbd39f8
commit
90f61fc20d
|
@ -0,0 +1,350 @@
|
||||||
|
|
||||||
|
--获取当前人待办事项
|
||||||
|
ALTER PROCEDURE [dbo].[Sp_Project_GetToDoItems]
|
||||||
|
@projectId NVARCHAR(50)=NULL,
|
||||||
|
@userId NVARCHAR(200)=NULL
|
||||||
|
AS
|
||||||
|
/*获取当前人待办事项*/
|
||||||
|
BEGIN
|
||||||
|
SELECT HazardRegisterId AS DataId
|
||||||
|
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
|
||||||
|
,'安全巡检待整改' AS MenuName
|
||||||
|
,register.RegisterDef AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,register.RegisterDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr
|
||||||
|
,'../HSSE/HiddenInspection/HiddenRectificationRectify.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl
|
||||||
|
FROM HSSE_Hazard_HazardRegister AS register
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE register.ProjectId=@projectId AND
|
||||||
|
((register.states = '1' AND (register.ResponsibleMan =@userId OR register.CCManIds LIKE ('%'+@userId+'%') ))
|
||||||
|
)
|
||||||
|
UNION ALL
|
||||||
|
|
||||||
|
SELECT HazardRegisterId AS DataId
|
||||||
|
,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId
|
||||||
|
,'安全巡检待确认' AS MenuName
|
||||||
|
,register.RegisterDef AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,register.RegisterDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr
|
||||||
|
,'../HSSE/HiddenInspection/HiddenRectificationConfirm.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl
|
||||||
|
FROM HSSE_Hazard_HazardRegister AS register
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE register.ProjectId=@projectId AND
|
||||||
|
register.states = '2' AND register.CheckManId =@userId
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
SELECT CheckControlCode AS DataId
|
||||||
|
,'B3E99BD9-FDC7-4F15-8C3C-A7821AC9E306' AS MenuId
|
||||||
|
,'质量巡检待处理' AS MenuName
|
||||||
|
,checkControl.QuestionDef AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,checkControl.CheckDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),checkControl.CheckDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Check/ChecklistEdit.aspx?ToDo=ToDo&CheckControlCode='+checkControl.CheckControlCode AS PCUrl
|
||||||
|
FROM Check_CheckControl AS checkControl
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE checkControl.ProjectId=@projectId AND
|
||||||
|
checkControl.State != '7' AND checkControl.CheckControlCode in (select CheckControlCode from Check_CheckControlApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
SELECT GJSXID AS DataId
|
||||||
|
,'0BEA2126-7A48-40EB-8E21-99148E91A22B' AS MenuId
|
||||||
|
,'关键事项待处理' AS MenuName
|
||||||
|
,GJSX.Detail AS Content
|
||||||
|
,users.UserId
|
||||||
|
,users.UserName
|
||||||
|
,GJSX.CreateDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),GJSX.CreateDate, 23) AS DataTimeStr
|
||||||
|
,'../PZHGL/GJSX/GJSXListEdit.aspx?ToDo=ToDo&EditType=Edit&ID='+GJSXID AS PCUrl
|
||||||
|
FROM GJSX
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE GJSX.ProjectId=@projectId AND
|
||||||
|
GJSX.State != 0 AND (((select count(*) from GJSX_detail detail where detail.Progress_user=@userId and detail.GJSXID=GJSX.GJSXID)=0
|
||||||
|
and (select count(*) from GJSX_Process process where process.UserId=@userId and process.GJSXID=GJSX.GJSXID)>0)
|
||||||
|
or (GJSX.User_Acceptance like '%'+@userId+'%' and (select count(*) from GJSX_detail detail where detail.GJSXID=GJSX.GJSXID)=(select count(*) from GJSX_Process process where process.GJSXID=GJSX.GJSXID))
|
||||||
|
)
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
SELECT InspectionEquipmentId AS DataId
|
||||||
|
,'6c2c1e5e-1812-4e1c-a683-7125518e28c7' AS MenuId
|
||||||
|
,'设备材料报验待确认' AS MenuName
|
||||||
|
,Equipment.InspectionName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,Equipment.InspectionDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),Equipment.InspectionDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Comprehensive/InspectionEquipmentEdit.aspx?ToDo=ToDo&InspectionEquipmentId='+Equipment.InspectionEquipmentId AS PCUrl
|
||||||
|
FROM Comprehensive_InspectionEquipment AS Equipment
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE Equipment.ProjectId=@projectId and
|
||||||
|
Equipment.Status!='3' AND Equipment.InspectionEquipmentId in (select InspectionEquipmentId from Comprehensive_InspectionEquipmentApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
|
||||||
|
UNION ALL
|
||||||
|
SELECT InspectionPersonId AS DataId
|
||||||
|
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
|
||||||
|
,'人员报验待确认' AS MenuName
|
||||||
|
,Person.PersonName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,Person.CompileDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
|
||||||
|
FROM Comprehensive_InspectionPerson AS Person
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE Person.ProjectId=@projectId and
|
||||||
|
Person.Status!='3' AND Person.InspectionPersonId in (select InspectionPersonId from Comprehensive_InspectionPersonApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
|
||||||
|
UNION ALL
|
||||||
|
SELECT InspectionMachineId AS DataId
|
||||||
|
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
|
||||||
|
,'机具报验待确认' AS MenuName
|
||||||
|
,Machine.InspectionMachineName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,Machine.CompileDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
|
||||||
|
FROM Comprehensive_InspectionMachine AS Machine
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE Machine.ProjectId=@projectId and
|
||||||
|
Machine.Status!='3' AND Machine.InspectionMachineId in (select InspectionMachineId from Comprehensive_InspectionMachineApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null )
|
||||||
|
UNION ALL
|
||||||
|
SELECT ConstructSolutionId AS DataId
|
||||||
|
,'91C4BFDB-0A51-4992-99CC-EB4EC185593D' AS MenuId
|
||||||
|
,'施工方案待处理' AS MenuName
|
||||||
|
,Solution.SolutionName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,Solution.CompileDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),Solution.CompileDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Solution/EditConstructSolution.aspx?ToDo=ToDo&ConstructSolutionId='+Solution.ConstructSolutionId AS PCUrl
|
||||||
|
FROM Solution_CQMSConstructSolution AS Solution
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE Solution.ProjectId=@projectId and
|
||||||
|
Solution.State!='3'
|
||||||
|
AND Solution.ConstructSolutionId in
|
||||||
|
(select top 1 ConstructSolutionId from (
|
||||||
|
SELECT Solution_CQMSConstructSolutionApprove.*
|
||||||
|
FROM Solution_CQMSConstructSolutionApprove,
|
||||||
|
(SELECT MIN([order]) AS [order],ConstructSolutionId FROM Solution_CQMSConstructSolutionApprove where ApproveType!='S' and ApproveDate is null GROUP BY ConstructSolutionId )b
|
||||||
|
WHERE Solution_CQMSConstructSolutionApprove.[order] = b.[order] and Solution_CQMSConstructSolutionApprove.ConstructSolutionId = b.ConstructSolutionId
|
||||||
|
) approve
|
||||||
|
where approve.ApproveMan=@userId )
|
||||||
|
|
||||||
|
UNION ALL
|
||||||
|
SELECT InspectionId AS DataId
|
||||||
|
,'4781f467-35bf-4cf2-aaa4-7960a175eb61' AS MenuId
|
||||||
|
,'共检通知单待处理' AS MenuName
|
||||||
|
,InspectionManagement.AcceptanceSite AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,InspectionManagement.CompileDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),InspectionManagement.CompileDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/ProcessControl/InspectionNoticeEdit.aspx?View=View&InspectionId='+InspectionManagement.InspectionId AS PCUrl
|
||||||
|
FROM ProcessControl_InspectionManagement AS InspectionManagement
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE InspectionManagement.ProjectId=@projectId and
|
||||||
|
dateadd(day,3,InspectionManagement.CompileDate)>getdate() and InspectionManagement.AcceptanceCheckMan like '%'+@userId+'%'
|
||||||
|
UNION ALL
|
||||||
|
SELECT CheckSpecialId AS DataId
|
||||||
|
,'1B08048F-93ED-4E84-AE65-DB7917EA2DFB' AS MenuId
|
||||||
|
,'专项检查' AS MenuName
|
||||||
|
,CheckItemSet.CheckItemName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,CheckSpecial.CheckTime AS DataTime
|
||||||
|
,CONVERT(varchar(100),CheckSpecial.CheckTime, 23) AS DataTimeStr
|
||||||
|
,'../HSSE/Check/CheckSpecialView.aspx?CheckSpecialId='+CheckSpecial.CheckSpecialId AS PCUrl
|
||||||
|
FROM Check_CheckSpecial AS CheckSpecial
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
LEFT JOIN Technique_CheckItemSet AS CheckItemSet ON CheckItemSet.CheckItemSetId =CheckSpecial.CheckItemSetId
|
||||||
|
WHERE CheckSpecial.ProjectId=@projectId and
|
||||||
|
dateadd(day,3,CheckSpecial.CheckTime)>getdate() and CheckSpecial.PartInPersonIds like '%'+@userId+'%'
|
||||||
|
UNION ALL
|
||||||
|
SELECT CheckColligationId AS DataId
|
||||||
|
,'C198EBA8-9E23-4654-92E1-09C61105C522' AS MenuId
|
||||||
|
,'综合检查待处理' AS MenuName
|
||||||
|
,case CheckType when '0' then '周检' when '1' then '月检' else '其它' end AS Content
|
||||||
|
,users.UserId
|
||||||
|
,users.UserName
|
||||||
|
,CheckColligation.CheckTime AS DataTime
|
||||||
|
,CONVERT(varchar(100),CheckColligation.CheckTime, 23) AS DataTimeStr
|
||||||
|
,'../HSSE/Check/CheckColligationEdit.aspx?CheckColligationId='+CheckColligation.CheckColligationId AS PCUrl
|
||||||
|
FROM Check_CheckColligation AS CheckColligation
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
LEFT JOIN Sys_FlowOperate AS FlowOperate ON CheckColligation.CheckColligationId=FlowOperate.DataId
|
||||||
|
LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId
|
||||||
|
WHERE CheckColligation.ProjectId=@projectId and FlowOperate.IsClosed <> 1 and FlowOperate.OperaterId=@userId
|
||||||
|
UNION ALL
|
||||||
|
SELECT PatrolPlanId AS DataId
|
||||||
|
,'D256E5C8-DC76-4F4D-BABE-A253418823F4' AS MenuId
|
||||||
|
,'风险巡检待处理' AS MenuName
|
||||||
|
,HazardListItem.HazardItems AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,PatrolPlan.LimitCheckDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),PatrolPlan.LimitCheckDate, 23) AS DataTimeStr
|
||||||
|
,'../HSSE/Hazard/RoutingInspectionEdit.aspx?PatrolPlanId='+PatrolPlan.PatrolPlanId AS PCUrl
|
||||||
|
FROM Hazard_PatrolPlan AS PatrolPlan
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
LEFT JOIN Hazard_HazardSelectedItem AS HazardListItem on HazardListItem.HazardSelectedItemId=PatrolPlan.HazardSelectedItemId
|
||||||
|
WHERE HazardListItem.ProjectId=@projectId and
|
||||||
|
dateadd(day,-3,PatrolPlan.LimitCheckDate)<getdate() and PatrolPlan.DutyPerson=@userId
|
||||||
|
and (select COUNT(*) from Hazard_RoutingInspection ri where ri.PatrolPlanId=PatrolPlan.PatrolPlanId)=0
|
||||||
|
UNION ALL
|
||||||
|
SELECT PersonQuality.PersonId AS DataId
|
||||||
|
,'EBEA762D-1F46-47C5-9EAD-759E13D9B41C' AS MenuId
|
||||||
|
,'特种作业人员资质还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),PersonQuality.LimitDate))+'天过期' AS MenuName
|
||||||
|
,Person.PersonName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,PersonQuality.LimitDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),PersonQuality.LimitDate, 23) AS DataTimeStr
|
||||||
|
,'../HSSE/QualityAudit/PersonQualityEdit.aspx?PersonId='+PersonQuality.PersonId AS PCUrl
|
||||||
|
FROM QualityAudit_PersonQuality AS PersonQuality
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
LEFT JOIN SitePerson_Person AS Person on Person.PersonId=PersonQuality.PersonId
|
||||||
|
WHERE Person.ProjectId=@projectId and Person.IsUsed=1 and Person.InTime<getdate() and (Person.OutTime is null or Person.OutTime >getdate() ) and
|
||||||
|
dateadd(day,-15,PersonQuality.LimitDate)<getdate() and getdate()<PersonQuality.LimitDate
|
||||||
|
UNION ALL
|
||||||
|
SELECT PersonQuality.PersonId AS DataId
|
||||||
|
,'EBEA762D-1F46-47C5-9EAD-759E13D9B41C' AS MenuId
|
||||||
|
,'特种作业人员资质已过期'+convert(nvarchar(6),DATEDIFF(day,PersonQuality.LimitDate,getdate()))+'天' AS MenuName
|
||||||
|
,Person.PersonName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,PersonQuality.LimitDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),PersonQuality.LimitDate, 23) AS DataTimeStr
|
||||||
|
,'../HSSE/QualityAudit/PersonQualityEdit.aspx?PersonId='+PersonQuality.PersonId AS PCUrl
|
||||||
|
FROM QualityAudit_PersonQuality AS PersonQuality
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
LEFT JOIN SitePerson_Person AS Person on Person.PersonId=PersonQuality.PersonId
|
||||||
|
WHERE Person.ProjectId=@projectId and Person.IsUsed=1 and Person.InTime<getdate() and (Person.OutTime is null or Person.OutTime >getdate() ) and
|
||||||
|
PersonQuality.LimitDate<getdate()
|
||||||
|
UNION ALL
|
||||||
|
SELECT InspectionPersonId AS DataId
|
||||||
|
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
|
||||||
|
,'人员报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Person.ValidityDate))+'天过期' AS MenuName
|
||||||
|
,Person.PersonName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,Person.CompileDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
|
||||||
|
FROM Comprehensive_InspectionPerson AS Person
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE Person.ProjectId=@projectId and Person.IsOnSite=1 and
|
||||||
|
dateadd(day,-15,Person.ValidityDate)<getdate() and getdate()<Person.ValidityDate
|
||||||
|
UNION ALL
|
||||||
|
SELECT InspectionPersonId AS DataId
|
||||||
|
,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId
|
||||||
|
,'人员报验已过期'+convert(nvarchar(6),DATEDIFF(day,Person.ValidityDate,getdate()))+'天' AS MenuName
|
||||||
|
,Person.PersonName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,Person.CompileDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl
|
||||||
|
FROM Comprehensive_InspectionPerson AS Person
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE Person.ProjectId=@projectId and Person.IsOnSite=1 and
|
||||||
|
Person.ValidityDate<getdate()
|
||||||
|
UNION ALL
|
||||||
|
SELECT InspectionMachineId AS DataId
|
||||||
|
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
|
||||||
|
,'机具报验还有'+convert(nvarchar(6),DATEDIFF(day,getdate(),Machine.NextTestDate))+'天过期' AS MenuName
|
||||||
|
,Machine.InspectionMachineName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,Machine.CompileDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
|
||||||
|
FROM Comprehensive_InspectionMachine AS Machine
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE Machine.ProjectId=@projectId and Machine.IsOnSite=1 and
|
||||||
|
dateadd(day,-15,Machine.NextTestDate)<getdate() and getdate()<Machine.NextTestDate
|
||||||
|
UNION ALL
|
||||||
|
SELECT InspectionMachineId AS DataId
|
||||||
|
,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId
|
||||||
|
,'机具报验已过期'+convert(nvarchar(6),DATEDIFF(day,Machine.NextTestDate,getdate()))+'天' AS MenuName
|
||||||
|
,Machine.InspectionMachineName AS Content
|
||||||
|
,UserId
|
||||||
|
,users.UserName
|
||||||
|
,Machine.CompileDate AS DataTime
|
||||||
|
,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr
|
||||||
|
,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl
|
||||||
|
FROM Comprehensive_InspectionMachine AS Machine
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
WHERE Machine.ProjectId=@projectId and Machine.IsOnSite=1 and
|
||||||
|
Machine.NextTestDate<getdate()
|
||||||
|
UNION ALL
|
||||||
|
SELECT Project.ProjectId AS DataId
|
||||||
|
,'2AE9D982-A499-497F-8F54-ADDA5856887E' AS MenuId
|
||||||
|
,'本月工程量完成情况尚未填报' AS MenuName
|
||||||
|
,'' AS Content
|
||||||
|
,users.UserId
|
||||||
|
,users.UserName
|
||||||
|
,GETDATE() AS DataTime
|
||||||
|
,CONVERT(varchar(100),GETDATE(), 23) AS DataTimeStr
|
||||||
|
,'../JDGL/Check/QuantityCompletion.aspx?ToDo=ToDo' AS PCUrl
|
||||||
|
FROM Base_Project AS Project
|
||||||
|
LEFT JOIN Sys_User AS users ON users.UserId =@userId
|
||||||
|
LEFT JOIN Project_ProjectUser as pu on pu.UserId=@userId
|
||||||
|
WHERE Project.ProjectId=@projectId
|
||||||
|
and (pu.RoleId like '%22F78A47-F59C-4FE8-9C43-2DD304CB2108%' or pu.RoleId like '%GCB64EF3-AB0A-40BC-824D-CC314598D5DC%') and ((DATENAME(DAY,GETDATE())>=22 and (select COUNT(*) from JDGL_QuantityCompletion WHERE ProjectId=@projectId and DATENAME(year,GETDATE())=DATENAME(year,EndDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,EndDate))=0)
|
||||||
|
or (DATEADD(day,60,(select top 1 EndDate from JDGL_QuantityCompletion WHERE ProjectId=@projectId order by EndDate desc))<GETDATE()))
|
||||||
|
|
||||||
|
ORDER BY DataTime DESC
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
update [dbo].[JDGL_QuantityCompletion] set Months=cast(DATENAME(YEAR,EndDate) as nvarchar(10))+'-'+cast(DATENAME(MONTH,EndDate) as nvarchar(10))+'-01'
|
||||||
|
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 Months<=getdate())) as TotalPlanNum,
|
||||||
|
CONVERT(FLOAT,(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and Months<=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 Months<=getdate()) WHEN 0 THEN 0
|
||||||
|
ELSE 100*(select sum(ISNULL(RealNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and Months<=getdate()) / (1.0 *(select sum(ISNULL(PlanNum,0)) from JDGL_QuantityCompletion where ProjectId=ql.ProjectId and QuantityListId=qc.QuantityListId and Months<=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 Months<=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.Months desc)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="工程量清单设置" EnableCollapse="true"
|
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="工程量清单设置" EnableCollapse="true"
|
||||||
runat="server" BoxFlex="1" DataKeyNames="QuantityCompletionId,QuantityListId" AllowCellEditing="true" ForceFit="true"
|
runat="server" BoxFlex="1" DataKeyNames="QuantityCompletionId,QuantityListId" AllowCellEditing="true" ForceFit="true"
|
||||||
ClicksToEdit="1" DataIDField="QuantityCompletionId" AllowSorting="true" SortField="SortIndex,Name"
|
ClicksToEdit="1" DataIDField="QuantityCompletionId" AllowSorting="true" SortField="SortIndex,Name"
|
||||||
SortDirection="ASC" EnableColumnLines="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
SortDirection="ASC" EnableColumnLines="true"
|
||||||
AllowPaging="true" IsDatabasePaging="true" PageSize="1000"
|
AllowPaging="true" IsDatabasePaging="true" PageSize="1000"
|
||||||
AllowFilters="true" EnableTextSelection="True">
|
AllowFilters="true" EnableTextSelection="True">
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
|
@ -33,6 +33,9 @@
|
||||||
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
|
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
|
||||||
Hidden="true">
|
Hidden="true">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
<f:Button ID="btnModify" ToolTip="修改" Icon="Pencil" OnClick="btnModify_Click" runat="server"
|
||||||
|
Hidden="true">
|
||||||
|
</f:Button>
|
||||||
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" runat="server"
|
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" runat="server"
|
||||||
OnClick="btnImport_Click">
|
OnClick="btnImport_Click">
|
||||||
</f:Button>
|
</f:Button>
|
||||||
|
@ -124,13 +127,10 @@
|
||||||
</f:Panel>
|
</f:Panel>
|
||||||
<f:Window ID="Window1" Title="导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
<f:Window ID="Window1" Title="导入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||||
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="false"
|
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="false"
|
||||||
CloseAction="HidePostBack" Width="1200px" Height="600px">
|
CloseAction="HidePostBack" Width="1200px" Height="700px">
|
||||||
</f:Window>
|
</f:Window>
|
||||||
<f:Menu ID="Menu1" runat="server">
|
<f:Menu ID="Menu1" runat="server">
|
||||||
<Items>
|
<Items>
|
||||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Hidden="true" Text="修改" Icon="Pencil"
|
|
||||||
OnClick="btnMenuModify_Click">
|
|
||||||
</f:MenuButton>
|
|
||||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
|
||||||
OnClick="btnMenuDel_Click">
|
OnClick="btnMenuDel_Click">
|
||||||
</f:MenuButton>
|
</f:MenuButton>
|
||||||
|
|
|
@ -42,33 +42,16 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||||
{
|
{
|
||||||
this.btnNew.Hidden = false;
|
this.btnNew.Hidden = false;
|
||||||
this.btnMenuModify.Hidden = false;
|
this.btnModify.Hidden = false;
|
||||||
this.btnMenuDel.Hidden = false;
|
this.btnMenuDel.Hidden = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Grid双击事件
|
protected void btnModify_Click(object sender, EventArgs e)
|
||||||
/// <summary>
|
|
||||||
/// Grid行双击事件
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="sender"></param>
|
|
||||||
/// <param name="e"></param>
|
|
||||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
|
||||||
{
|
{
|
||||||
btnMenuModify_Click(null, null);
|
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QuantityCompletionEdit.aspx?Months={0}", this.txtMonths.Text, "编辑 - ")));
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
|
||||||
{
|
|
||||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("QuantityCompletionEdit.aspx?QuantityCompletionId={0}", Grid1.SelectedRowID, "编辑 - ")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -105,35 +88,37 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
private void BindGrid()
|
private void BindGrid()
|
||||||
{
|
{
|
||||||
//GetQuantityCompletion();
|
//GetQuantityCompletion();
|
||||||
string strSql = @"select qc.*,ql.DesignNum,ql.Name,ql.Unit,ql.SortIndex,
|
string strSql = @"select qc.QuantityCompletionId,(select PlanNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as PlanNum,
|
||||||
CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and EndDate <= @month)) as TotalPlanNum,
|
(select RealNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as RealNum,
|
||||||
CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and EndDate <= @month)) as TotalRealNum,
|
(select NextNum from JDGL_QuantityCompletion where QuantityListId=ql.QuantityListId and Months=@month) as NextNum,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 Months <= @month)) as TotalPlanNum,
|
||||||
|
CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalRealNum,
|
||||||
CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(qc.PlanNum, 0) WHEN 0 THEN 0
|
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))))) + '%'
|
ELSE 100 * ISNULL(qc.RealNum, 0) / (1.0 * qc.PlanNum) END AS DECIMAL(9, 2))))) + '%'
|
||||||
|
|
||||||
AS Rate,
|
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 <= @month) WHEN 0 THEN 0
|
CONVERT(NVARCHAR(10), ((CAST(CASE(select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) WHEN 0 THEN 0
|
||||||
|
|
||||||
ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and EndDate <= @month) / (1.0 * (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and EndDate <= @month)) END AS DECIMAL(9, 2)))))+'%'
|
ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * (select sum(ISNULL(PlanNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) END AS DECIMAL(9, 2)))))+'%'
|
||||||
|
|
||||||
AS TotalRate,
|
AS TotalRate,
|
||||||
CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(ql.DesignNum, 0) WHEN 0 THEN 0
|
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 <= @month) / (1.0 * ql.DesignNum) END AS DECIMAL(9, 2)))))+'%'
|
ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_QuantityCompletion where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * ql.DesignNum) END AS DECIMAL(9, 2)))))+'%'
|
||||||
|
|
||||||
AS SumRate,
|
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(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
|
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
|
from[dbo].JDGL_QuantityList ql
|
||||||
left join dbo.[JDGL_QuantityCompletion] qc on ql.QuantityListId=qc.QuantityListId
|
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 and q.EndDate<=@month order by q.EndDate desc) and qc.ProjectId=@ProjectId order by ql.SortIndex, ql.Name";
|
where qc.QuantityCompletionId=(select top 1 QuantityCompletionId from[JDGL_QuantityCompletion] q where q.QuantityListId=qc.QuantityListId and q.Months<=@month order by q.Months desc) and qc.ProjectId=@ProjectId order by ql.SortIndex, ql.Name";
|
||||||
//string strSql = @"select *
|
//string strSql = @"select *
|
||||||
// from dbo.View_JDGL_QuantityCompletion qc
|
// from dbo.View_JDGL_QuantityCompletion qc
|
||||||
// where qc.ProjectId=@ProjectId order by qc.SortIndex, qc.Name";
|
// where qc.ProjectId=@ProjectId order by qc.SortIndex, qc.Name";
|
||||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||||
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
|
||||||
listStr.Add(new SqlParameter("@month", string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtMonths.Text.Trim() + "-01").AddMonths(1))));
|
listStr.Add(new SqlParameter("@month", string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtMonths.Text.Trim() + "-01"))));
|
||||||
SqlParameter[] parameter = listStr.ToArray();
|
SqlParameter[] parameter = listStr.ToArray();
|
||||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||||
Grid1.RecordCount = tb.Rows.Count;
|
Grid1.RecordCount = tb.Rows.Count;
|
||||||
|
|
|
@ -84,6 +84,15 @@ namespace FineUIPro.Web.JDGL.Check {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnNew;
|
protected global::FineUIPro.Button btnNew;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnModify 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnModify;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnImport 控件。
|
/// btnImport 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -120,15 +129,6 @@ namespace FineUIPro.Web.JDGL.Check {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Menu Menu1;
|
protected global::FineUIPro.Menu Menu1;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnMenuModify 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnMenuDel 控件。
|
/// btnMenuDel 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -4,21 +4,103 @@
|
||||||
|
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||||
<head runat="server">
|
<head runat="server">
|
||||||
<title></title>
|
<title></title>
|
||||||
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<form id="form1" runat="server">
|
<form id="form1" runat="server">
|
||||||
<f:PageManager ID="PageManager1" runat="server" />
|
<f:PageManager ID="PageManager1" runat="server" />
|
||||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
<f:Panel ID="Panel17" IsFluid="true" Title="工程量完成情况" runat="server" EnableCollapse="false"
|
||||||
|
ShowHeader="true">
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar5" Position="top" ToolbarAlign="Right" runat="server" CssClass="Toolbar2">
|
||||||
|
<Items>
|
||||||
|
<f:DatePicker ID="txtMonth" runat="server" ShowRedStar="true" Required="true" Label="月份" LabelAlign="Right" LabelWidth="80px"
|
||||||
|
EnableEdit="true" DateFormatString="yyyy-MM" AutoPostBack="true" DisplayType="Month" OnTextChanged="txtMonths_TextChanged">
|
||||||
|
</f:DatePicker>
|
||||||
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
|
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" OnClick="btnSave_Click">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
<Items>
|
||||||
|
<f:Form ID="Form15" runat="server" ShowBorder="true" BodyPadding="5px" ShowHeader="false" Title="工程量完成情况">
|
||||||
|
<Rows>
|
||||||
|
<f:FormRow>
|
||||||
|
<Items>
|
||||||
|
<f:Grid ID="Grid1" IsFluid="true" CssClass="blockpanel" ShowBorder="true" ShowHeader="false" runat="server" EnableCollapse="false" OnRowCommand="Grid1_RowCommand"
|
||||||
|
DataKeyNames="QuantityListId" DataIDField="QuantityListId" EnableColumnLines="true" ForceFit="true" AllowCellEditing="true" ClicksToEdit="1">
|
||||||
|
<Toolbars>
|
||||||
|
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
||||||
|
<Items>
|
||||||
|
<f:Button ID="btnNew" ToolTip="新增" Text="" Icon="Add" EnablePostBack="true"
|
||||||
|
runat="server" OnClick="btnNew_Click">
|
||||||
|
</f:Button>
|
||||||
|
</Items>
|
||||||
|
</f:Toolbar>
|
||||||
|
</Toolbars>
|
||||||
|
<Columns>
|
||||||
|
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
|
||||||
|
EnableLock="true" Locked="False">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="Label1" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</f:TemplateField>
|
||||||
|
<f:RenderField Width="120px" ColumnID="Name" DataField="Name"
|
||||||
|
FieldType="String" HeaderText="类型" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
<Editor>
|
||||||
|
<f:TextBox ID="txtName" runat="server" Text='<%# Bind("Name") %>'>
|
||||||
|
</f:TextBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="Unit" DataField="Unit"
|
||||||
|
FieldType="String" HeaderText="单位" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
<Editor>
|
||||||
|
<f:TextBox ID="txtUnit" runat="server" Text='<%# Bind("Unit") %>'>
|
||||||
|
</f:TextBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="DesignNum" DataField="DesignNum"
|
||||||
|
FieldType="Float" HeaderText="设计数量" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox runat="server" ID="txtDesignNum" NoDecimal="false" NoNegative="true" Text='<%# Bind("DesignNum") %>'></f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="PlanNum" DataField="PlanNum"
|
||||||
|
FieldType="Float" HeaderText="计划完成" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox runat="server" ID="txtPlanNum" NoDecimal="false" NoNegative="true" Text='<%# Bind("PlanNum") %>'></f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="RealNum" DataField="RealNum"
|
||||||
|
FieldType="Float" HeaderText="实际完成" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox runat="server" ID="txtRealNum" NoDecimal="false" NoNegative="true" Text='<%# Bind("RealNum") %>'></f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="NextNum" DataField="NextNum"
|
||||||
|
FieldType="Float" HeaderText="下月计划" TextAlign="Center" HeaderTextAlign="Center">
|
||||||
|
<Editor>
|
||||||
|
<f:NumberBox runat="server" ID="txtNextNum" NoDecimal="false" NoNegative="true" Text='<%# Bind("NextNum") %>'></f:NumberBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
|
<f:LinkButtonField Width="30px" TextAlign="Center" HeaderText="删除" ToolTip="删除" CommandName="del"
|
||||||
|
Icon="Delete" />
|
||||||
|
</Columns>
|
||||||
|
</f:Grid>
|
||||||
|
</Items>
|
||||||
|
</f:FormRow>
|
||||||
|
</Rows>
|
||||||
|
</f:Form>
|
||||||
|
</Items>
|
||||||
|
</f:Panel>
|
||||||
|
<%--<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||||
<Rows>
|
<Rows>
|
||||||
<f:FormRow>
|
<f:FormRow>
|
||||||
<Items>
|
<Items>
|
||||||
<f:DatePicker ID="txtStartDate" runat="server" ShowRedStar="true" Required="true" Label="开始日期" LabelAlign="Right" LabelWidth="150px"
|
<f:DatePicker ID="txtMonth" runat="server" ShowRedStar="true" Required="true" Label="月份" LabelAlign="Right" LabelWidth="150px"
|
||||||
EnableEdit="true" >
|
|
||||||
</f:DatePicker>
|
|
||||||
<f:DatePicker ID="txtEndDate" runat="server" ShowRedStar="true" Required="true" Label="结束日期" LabelAlign="Right"
|
|
||||||
EnableEdit="true" >
|
EnableEdit="true" >
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
</Items>
|
</Items>
|
||||||
|
@ -67,7 +149,7 @@
|
||||||
</Items>
|
</Items>
|
||||||
</f:Toolbar>
|
</f:Toolbar>
|
||||||
</Toolbars>
|
</Toolbars>
|
||||||
</f:Form>
|
</f:Form>--%>
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
using BLL;
|
using BLL;
|
||||||
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
@ -10,20 +11,6 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
{
|
{
|
||||||
public partial class QuantityCompletionEdit : PageBase
|
public partial class QuantityCompletionEdit : PageBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// id
|
|
||||||
/// </summary>
|
|
||||||
public string QuantityCompletionId
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (string)ViewState["QuantityCompletionId"];
|
|
||||||
}
|
|
||||||
set
|
|
||||||
{
|
|
||||||
ViewState["QuantityCompletionId"] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 项目id
|
/// 项目id
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -42,110 +29,171 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
|
DateTime months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01");
|
||||||
this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
if (!string.IsNullOrEmpty(Request.Params["Months"]))
|
||||||
QuantityCompletionId = Request.Params["QuantityCompletionId"];
|
|
||||||
if (!string.IsNullOrEmpty(QuantityCompletionId))
|
|
||||||
{
|
{
|
||||||
|
months = Convert.ToDateTime(Request.Params["Months"] + "-01");
|
||||||
Model.JDGL_QuantityCompletion QuantityCompletion = BLL.QuantityCompletionService.GetQuantityCompletionById(QuantityCompletionId);
|
|
||||||
if (QuantityCompletion != null)
|
|
||||||
{
|
|
||||||
this.ProjectId = QuantityCompletion.ProjectId;
|
|
||||||
if (QuantityCompletion.StartDate != null)
|
|
||||||
{
|
|
||||||
this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", QuantityCompletion.StartDate);
|
|
||||||
}
|
|
||||||
if (QuantityCompletion.EndDate != null)
|
|
||||||
{
|
|
||||||
this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", QuantityCompletion.EndDate);
|
|
||||||
}
|
|
||||||
Model.JDGL_QuantityList list = BLL.QuantityListService.GetQuantityListById(QuantityCompletion.QuantityListId);
|
|
||||||
if (list != null)
|
|
||||||
{
|
|
||||||
this.txtName.Text = list.Name;
|
|
||||||
this.txtUnit.Text = list.Unit;
|
|
||||||
if (list.DesignNum != null)
|
|
||||||
{
|
|
||||||
this.txtDesignNum.Text = list.DesignNum.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (QuantityCompletion.PlanNum != null)
|
|
||||||
{
|
|
||||||
this.txtPlanNum.Text = QuantityCompletion.PlanNum.ToString();
|
|
||||||
}
|
|
||||||
if (QuantityCompletion.RealNum != null)
|
|
||||||
{
|
|
||||||
this.txtRealNum.Text = QuantityCompletion.RealNum.ToString();
|
|
||||||
}
|
|
||||||
if (QuantityCompletion.NextNum != null)
|
|
||||||
{
|
|
||||||
this.txtNextNum.Text = QuantityCompletion.NextNum.ToString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
this.txtMonth.Text = string.Format("{0:yyyy-MM}", months);
|
||||||
|
BindGrid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加载Grid
|
||||||
|
/// </summary>
|
||||||
|
private void BindGrid()
|
||||||
|
{
|
||||||
|
DateTime months = Convert.ToDateTime(this.txtMonth.Text + "-01");
|
||||||
|
Model.SGGLDB db = Funs.DB;
|
||||||
|
Grid1.DataSource = from x in db.JDGL_QuantityList
|
||||||
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
|
orderby x.SortIndex, x.Name
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
x.QuantityListId,
|
||||||
|
x.Name,
|
||||||
|
x.Unit,
|
||||||
|
x.DesignNum,
|
||||||
|
PlanNum = (from y in db.JDGL_QuantityCompletion where y.ProjectId == this.CurrUser.LoginProjectId && y.Months == months && y.QuantityListId == x.QuantityListId select y.PlanNum).First(),
|
||||||
|
RealNum = (from y in db.JDGL_QuantityCompletion where y.ProjectId == this.CurrUser.LoginProjectId && y.Months == months && y.QuantityListId == x.QuantityListId select y.RealNum).First(),
|
||||||
|
NextNum = (from y in db.JDGL_QuantityCompletion where y.ProjectId == this.CurrUser.LoginProjectId && y.Months == months && y.QuantityListId == x.QuantityListId select y.NextNum).First(),
|
||||||
|
};
|
||||||
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 月份选择事件
|
||||||
|
/// <summary>
|
||||||
|
/// 月份选择事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void txtMonths_TextChanged(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
BindGrid();
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
protected void btnSave_Click(object sender, EventArgs e)
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrEmpty(this.txtMonth.Text))
|
||||||
|
{
|
||||||
|
ShowNotify("请选择月份!", MessageBoxIcon.Warning);
|
||||||
|
}
|
||||||
SaveData(true);
|
SaveData(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SaveData(bool bl)
|
private void SaveData(bool bl)
|
||||||
{
|
{
|
||||||
string QuantityCompletionId = Request.Params["QuantityCompletionId"];
|
DateTime months = Convert.ToDateTime(this.txtMonth.Text + "-01");
|
||||||
string quantityListId = string.Empty;
|
var list = GetDetails();
|
||||||
var oldQuantityList = Funs.DB.JDGL_QuantityList.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.Name == this.txtName.Text.Trim());
|
Model.SGGLDB db = Funs.DB;
|
||||||
if (oldQuantityList == null)
|
foreach (var item in list)
|
||||||
{
|
{
|
||||||
Model.JDGL_QuantityList newQuantityList = new Model.JDGL_QuantityList();
|
string quantityListId = string.Empty;
|
||||||
quantityListId = SQLHelper.GetNewID(typeof(Model.JDGL_QuantityList));
|
var oldQuantityList = db.JDGL_QuantityList.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.Name == item.Name);
|
||||||
newQuantityList.QuantityListId = quantityListId;
|
if (oldQuantityList == null)
|
||||||
newQuantityList.ProjectId = this.CurrUser.LoginProjectId;
|
{
|
||||||
newQuantityList.Name = this.txtName.Text.Trim();
|
Model.JDGL_QuantityList newQuantityList = new Model.JDGL_QuantityList();
|
||||||
newQuantityList.Unit = this.txtUnit.Text.Trim();
|
quantityListId = SQLHelper.GetNewID(typeof(Model.JDGL_QuantityList));
|
||||||
newQuantityList.DesignNum = Convert.ToDecimal(this.txtDesignNum.Text.Trim());
|
newQuantityList.QuantityListId = quantityListId;
|
||||||
BLL.QuantityListService.AddQuantityList(newQuantityList);
|
newQuantityList.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
}
|
newQuantityList.Name = item.Name;
|
||||||
else
|
newQuantityList.Unit = item.Unit;
|
||||||
{
|
newQuantityList.DesignNum = item.DesignNum;
|
||||||
quantityListId = oldQuantityList.QuantityListId;
|
BLL.QuantityListService.AddQuantityList(newQuantityList);
|
||||||
oldQuantityList.Unit = this.txtUnit.Text.Trim();
|
}
|
||||||
oldQuantityList.DesignNum = Convert.ToDecimal(this.txtDesignNum.Text.Trim());
|
else
|
||||||
BLL.QuantityListService.UpdateQuantityList(oldQuantityList);
|
{
|
||||||
}
|
quantityListId = oldQuantityList.QuantityListId;
|
||||||
Model.JDGL_QuantityCompletion QuantityCompletion = new Model.JDGL_QuantityCompletion();
|
oldQuantityList.Unit = item.Unit;
|
||||||
if (!string.IsNullOrEmpty(this.txtPlanNum.Text.Trim()))
|
oldQuantityList.DesignNum = item.DesignNum;
|
||||||
{
|
BLL.QuantityListService.UpdateQuantityList(oldQuantityList);
|
||||||
QuantityCompletion.PlanNum = Convert.ToDecimal(this.txtPlanNum.Text.Trim());
|
}
|
||||||
}
|
var oldQuantityCompletion = db.JDGL_QuantityCompletion.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.QuantityListId == quantityListId && x.Months == months);
|
||||||
if (!string.IsNullOrEmpty(this.txtRealNum.Text.Trim()))
|
if (oldQuantityCompletion==null)
|
||||||
{
|
{
|
||||||
QuantityCompletion.RealNum = Convert.ToDecimal(this.txtRealNum.Text.Trim());
|
Model.JDGL_QuantityCompletion QuantityCompletion = new Model.JDGL_QuantityCompletion();
|
||||||
}
|
QuantityCompletion.QuantityCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_QuantityCompletion));
|
||||||
if (!string.IsNullOrEmpty(this.txtNextNum.Text.Trim()))
|
QuantityCompletion.PlanNum = item.PlanNum;
|
||||||
{
|
QuantityCompletion.RealNum = item.RealNum;
|
||||||
QuantityCompletion.NextNum = Convert.ToDecimal(this.txtNextNum.Text.Trim());
|
QuantityCompletion.NextNum = item.NextNum;
|
||||||
}
|
QuantityCompletion.Months = months;
|
||||||
QuantityCompletion.QuantityListId = quantityListId;
|
QuantityCompletion.QuantityListId = quantityListId;
|
||||||
QuantityCompletion.CompileMan = this.CurrUser.UserId;
|
QuantityCompletion.CompileMan = this.CurrUser.UserId;
|
||||||
QuantityCompletion.CompileDate = DateTime.Now;
|
QuantityCompletion.CompileDate = DateTime.Now;
|
||||||
QuantityCompletion.StartDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
QuantityCompletion.ProjectId = this.CurrUser.LoginProjectId;
|
||||||
QuantityCompletion.EndDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
BLL.QuantityCompletionService.AddQuantityCompletion(QuantityCompletion);
|
||||||
if (!string.IsNullOrEmpty(QuantityCompletionId))
|
}
|
||||||
{
|
else
|
||||||
QuantityCompletion.QuantityCompletionId = QuantityCompletionId;
|
{
|
||||||
BLL.QuantityCompletionService.UpdateQuantityCompletion(QuantityCompletion);
|
oldQuantityCompletion.PlanNum = item.PlanNum;
|
||||||
}
|
oldQuantityCompletion.RealNum = item.RealNum;
|
||||||
else
|
oldQuantityCompletion.NextNum = item.NextNum;
|
||||||
{
|
BLL.QuantityCompletionService.UpdateQuantityCompletion(oldQuantityCompletion);
|
||||||
QuantityCompletion.QuantityCompletionId = SQLHelper.GetNewID(typeof(Model.JDGL_QuantityCompletion));
|
}
|
||||||
QuantityCompletion.ProjectId = this.CurrUser.LoginProjectId;
|
|
||||||
BLL.QuantityCompletionService.AddQuantityCompletion(QuantityCompletion);
|
|
||||||
}
|
}
|
||||||
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
ShowNotify("保存成功!", MessageBoxIcon.Success);
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 增加按钮事件
|
||||||
|
/// <summary>
|
||||||
|
/// 增加按钮事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void btnNew_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
var list = GetDetails();
|
||||||
|
Model.View_JDGL_QuantityCompletion ql = new Model.View_JDGL_QuantityCompletion();
|
||||||
|
ql.QuantityListId = SQLHelper.GetNewID();
|
||||||
|
list.Add(ql);
|
||||||
|
Grid1.DataSource = list;
|
||||||
|
Grid1.DataBind();
|
||||||
|
}
|
||||||
|
private List<Model.View_JDGL_QuantityCompletion> GetDetails()
|
||||||
|
{
|
||||||
|
List<Model.View_JDGL_QuantityCompletion> list = new List<Model.View_JDGL_QuantityCompletion>();
|
||||||
|
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||||
|
{
|
||||||
|
JObject values = mergedRow.Value<JObject>("values");
|
||||||
|
int i = mergedRow.Value<int>("index");
|
||||||
|
Model.View_JDGL_QuantityCompletion ql = new Model.View_JDGL_QuantityCompletion();
|
||||||
|
ql.QuantityListId = Grid1.Rows[i].RowID;
|
||||||
|
ql.Name = values.Value<string>("Name");
|
||||||
|
ql.Unit = values.Value<string>("Unit");
|
||||||
|
ql.DesignNum = Funs.GetNewDecimal(values.Value<string>("DesignNum"));
|
||||||
|
ql.PlanNum = Funs.GetNewDecimal(values.Value<string>("PlanNum"));
|
||||||
|
ql.RealNum = Funs.GetNewDecimal(values.Value<string>("RealNum"));
|
||||||
|
ql.NextNum = Funs.GetNewDecimal(values.Value<string>("NextNum"));
|
||||||
|
list.Add(ql);
|
||||||
|
}
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 行点击事件
|
||||||
|
/// <summary>
|
||||||
|
/// Grid行点击事件
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sender"></param>
|
||||||
|
/// <param name="e"></param>
|
||||||
|
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||||
|
{
|
||||||
|
string quantityListId = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||||
|
var list = GetDetails();
|
||||||
|
if (e.CommandName == "del")//删除
|
||||||
|
{
|
||||||
|
var Report = list.FirstOrDefault(x => x.QuantityListId == quantityListId);
|
||||||
|
if (Report != null)
|
||||||
|
{
|
||||||
|
list.Remove(Report);
|
||||||
|
}
|
||||||
|
this.Grid1.DataSource = list;
|
||||||
|
this.Grid1.DataBind();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -31,31 +31,85 @@ namespace FineUIPro.Web.JDGL.Check {
|
||||||
protected global::FineUIPro.PageManager PageManager1;
|
protected global::FineUIPro.PageManager PageManager1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// SimpleForm1 控件。
|
/// Panel17 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Form SimpleForm1;
|
protected global::FineUIPro.Panel Panel17;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtStartDate 控件。
|
/// Toolbar5 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DatePicker txtStartDate;
|
protected global::FineUIPro.Toolbar Toolbar5;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtEndDate 控件。
|
/// txtMonth 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DatePicker txtEndDate;
|
protected global::FineUIPro.DatePicker txtMonth;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnSave 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Form15 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Form Form15;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Grid1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Grid Grid1;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Toolbar3 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Toolbar Toolbar3;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// btnNew 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.Button btnNew;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Label1 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::System.Web.UI.WebControls.Label Label1;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtName 控件。
|
/// txtName 控件。
|
||||||
|
@ -110,41 +164,5 @@ namespace FineUIPro.Web.JDGL.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.NumberBox txtNextNum;
|
protected global::FineUIPro.NumberBox txtNextNum;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Toolbar1 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Toolbar Toolbar1;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// hdCheckerId 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.HiddenField hdCheckerId;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnSave 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnSave;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// btnClose 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.Button btnClose;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,10 +15,7 @@
|
||||||
<Toolbars>
|
<Toolbars>
|
||||||
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
|
||||||
<Items>
|
<Items>
|
||||||
<f:DatePicker ID="txtStartDate" runat="server" ShowRedStar="true" Required="true" Label="开始日期" LabelAlign="Right"
|
<f:DatePicker ID="txtMonth" runat="server" ShowRedStar="true" Required="true" Label="月份" LabelAlign="Right"
|
||||||
EnableEdit="true" >
|
|
||||||
</f:DatePicker>
|
|
||||||
<f:DatePicker ID="txtEndDate" runat="server" ShowRedStar="true" Required="true" Label="结束日期" LabelAlign="Right"
|
|
||||||
EnableEdit="true" >
|
EnableEdit="true" >
|
||||||
</f:DatePicker>
|
</f:DatePicker>
|
||||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||||
|
|
|
@ -436,9 +436,9 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
protected void btnSave_Click(object sender, EventArgs e)
|
protected void btnSave_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(this.txtStartDate.Text.Trim()) || string.IsNullOrEmpty(this.txtEndDate.Text.Trim()))
|
if (string.IsNullOrEmpty(this.txtMonth.Text.Trim()))
|
||||||
{
|
{
|
||||||
ShowNotify("请选择开始、结束日期!", MessageBoxIcon.Warning);
|
ShowNotify("请选择月份!", MessageBoxIcon.Warning);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (string.IsNullOrEmpty(errorInfos))
|
if (string.IsNullOrEmpty(errorInfos))
|
||||||
|
@ -447,8 +447,7 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
var quantityCompletionLists = from x in Funs.DB.JDGL_QuantityCompletion where x.ProjectId == this.ProjectId select x;
|
var quantityCompletionLists = from x in Funs.DB.JDGL_QuantityCompletion where x.ProjectId == this.ProjectId select x;
|
||||||
string quantityListId = string.Empty;
|
string quantityListId = string.Empty;
|
||||||
int a = quantityCompletions.Count();
|
int a = quantityCompletions.Count();
|
||||||
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
|
DateTime month = Convert.ToDateTime(this.txtMonth.Text.Trim());
|
||||||
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
|
|
||||||
for (int i = 0; i < a; i++)
|
for (int i = 0; i < a; i++)
|
||||||
{
|
{
|
||||||
var oldQuantityList = quantityLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.Name == quantityCompletions[i].Name);
|
var oldQuantityList = quantityLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.Name == quantityCompletions[i].Name);
|
||||||
|
@ -470,7 +469,7 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
oldQuantityList.DesignNum = quantityCompletions[i].DesignNum;
|
oldQuantityList.DesignNum = quantityCompletions[i].DesignNum;
|
||||||
BLL.QuantityListService.UpdateQuantityList(oldQuantityList);
|
BLL.QuantityListService.UpdateQuantityList(oldQuantityList);
|
||||||
}
|
}
|
||||||
var oldQuantityCompletion = quantityCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.QuantityListId == quantityListId && x.StartDate == startDate && x.EndDate == endDate);
|
var oldQuantityCompletion = quantityCompletionLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.QuantityListId == quantityListId && x.Months == month);
|
||||||
if (oldQuantityCompletion == null)
|
if (oldQuantityCompletion == null)
|
||||||
{
|
{
|
||||||
Model.JDGL_QuantityCompletion newQuantityCompletion = new Model.JDGL_QuantityCompletion();
|
Model.JDGL_QuantityCompletion newQuantityCompletion = new Model.JDGL_QuantityCompletion();
|
||||||
|
@ -482,8 +481,7 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
newQuantityCompletion.NextNum = quantityCompletions[i].NextNum;
|
newQuantityCompletion.NextNum = quantityCompletions[i].NextNum;
|
||||||
newQuantityCompletion.CompileMan = this.CurrUser.UserId;
|
newQuantityCompletion.CompileMan = this.CurrUser.UserId;
|
||||||
newQuantityCompletion.CompileDate = DateTime.Now;
|
newQuantityCompletion.CompileDate = DateTime.Now;
|
||||||
newQuantityCompletion.StartDate = startDate;
|
newQuantityCompletion.Months = month;
|
||||||
newQuantityCompletion.EndDate = endDate;
|
|
||||||
BLL.QuantityCompletionService.AddQuantityCompletion(newQuantityCompletion);
|
BLL.QuantityCompletionService.AddQuantityCompletion(newQuantityCompletion);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -49,22 +49,13 @@ namespace FineUIPro.Web.JDGL.Check {
|
||||||
protected global::FineUIPro.Toolbar Toolbar2;
|
protected global::FineUIPro.Toolbar Toolbar2;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// txtStartDate 控件。
|
/// txtMonth 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// 自动生成的字段。
|
/// 自动生成的字段。
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DatePicker txtStartDate;
|
protected global::FineUIPro.DatePicker txtMonth;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// txtEndDate 控件。
|
|
||||||
/// </summary>
|
|
||||||
/// <remarks>
|
|
||||||
/// 自动生成的字段。
|
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
|
||||||
/// </remarks>
|
|
||||||
protected global::FineUIPro.DatePicker txtEndDate;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// btnAudit 控件。
|
/// btnAudit 控件。
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
|
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
|
||||||
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
|
||||||
</httpHandlers>
|
</httpHandlers>
|
||||||
<compilation debug="false" targetFramework="4.6.1"/>
|
<compilation debug="true" targetFramework="4.6.1"/>
|
||||||
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
|
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
|
||||||
<authentication mode="Forms">
|
<authentication mode="Forms">
|
||||||
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>
|
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>
|
||||||
|
|
Loading…
Reference in New Issue