This commit is contained in:
parent
3d00fd9831
commit
9930aa01d0
|
@ -138,3 +138,384 @@ WHERE
|
|||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER PROC [dbo].[HJGL_sp_rpt_welderStatistics]
|
||||
@unitcode varchar(50) = NULL,
|
||||
@WED_ID nvarchar(50) = NULL,
|
||||
@projectId NVARCHAR(50) = NULL
|
||||
AS
|
||||
/*焊工焊接检测统计表*/
|
||||
SELECT
|
||||
welder.ProjectId,
|
||||
project.ProjectCode,--施工号
|
||||
wld.wed_code,-- 焊工代码
|
||||
wld.wed_name,--焊工名称
|
||||
|
||||
ISNULL(totalJoint.totalJoint,0) AS totalJoint, --已焊焊缝数
|
||||
ISNULL(TrustJointNum.TrustJointNum,0) AS TrustJointNum, --已委托焊缝数
|
||||
CAST((CASE ISNULL(TrustJointNum.TrustJointNum,0) WHEN 0 THEN 0
|
||||
ELSE 1.0 * ISNULL(TrustJointNum.TrustJointNum,0)/(1.0 * totalJoint.totalJoint) END) AS DECIMAL(19,3))
|
||||
AS OneCheckRate , ---一次检测比例
|
||||
|
||||
ISNULL(FixedJoint.FixedJoint,0) AS FixedJoint, --已焊固定口数
|
||||
ISNULL(TrustFixedJoint.TrustFixedJoint,0) AS TrustFixedJoint, --已委托固定口数
|
||||
CAST((CASE ISNULL(TrustFixedJoint.TrustFixedJoint,0) WHEN 0 THEN 0
|
||||
ELSE 1.0 * ISNULL(TrustFixedJoint.TrustFixedJoint,0)/(1.0 * FixedJoint.FixedJoint) END) AS DECIMAL(19,3))
|
||||
AS FixedJointCheckRate , ---固定口检测比例
|
||||
|
||||
ISNULL(ButtJoint.ButtJoint,0) AS ButtJoint, --已焊对接焊缝数
|
||||
ISNULL(TrustButtJoint.TrustButtJoint,0) AS TrustButtJoint, --已委托对接焊缝数
|
||||
CAST((CASE ISNULL(TrustButtJoint.TrustButtJoint,0) WHEN 0 THEN 0
|
||||
ELSE 1.0 * ISNULL(TrustButtJoint.TrustButtJoint,0)/(1.0 * ButtJoint.ButtJoint) END) AS DECIMAL(19,3))
|
||||
AS ButtJointCheckRate , ---对接焊缝检测比例
|
||||
|
||||
ISNULL(FilletJoint.FilletJoint,0) AS FilletJoint, --已焊角焊缝数
|
||||
ISNULL(TrustFilletJoint.TrustFilletJoint,0) AS TrustFilletJoint, --已委托角焊缝数
|
||||
CAST((CASE ISNULL(TrustFilletJoint.TrustFilletJoint,0) WHEN 0 THEN 0
|
||||
ELSE 1.0 * ISNULL(TrustFilletJoint.TrustFilletJoint,0)/(1.0 * FilletJoint.FilletJoint) END) AS DECIMAL(19,3))
|
||||
AS FilletJointCheckRate
|
||||
|
||||
FROM dbo.Project_Welder AS welder
|
||||
LEFT JOIN Base_Project project on welder.ProjectId=project.ProjectId
|
||||
LEFT JOIN dbo.HJGL_BS_Welder wld on wld.WED_ID=welder.WED_ID
|
||||
--已焊焊口数
|
||||
LEFT JOIN (SELECT COUNT(*) AS totalJoint,HJGL_pw_jointinfo.JOT_CellWelder,ProjectId
|
||||
FROM HJGL_PW_JointInfo
|
||||
WHERE HJGL_pw_jointinfo.DReportID is not null
|
||||
GROUP BY HJGL_pw_jointinfo.JOT_CellWelder,ProjectId) AS totalJoint ON totalJoint.JOT_CellWelder = welder.WED_ID and totalJoint.ProjectId=welder.ProjectId
|
||||
|
||||
--已焊固定口数
|
||||
LEFT JOIN (SELECT COUNT(*) AS FixedJoint,JOT_CellWelder,ProjectId
|
||||
FROM HJGL_PW_JointInfo
|
||||
WHERE DReportID is not null AND JOT_JointAttribute='固定'
|
||||
GROUP BY HJGL_pw_jointinfo.JOT_CellWelder,ProjectId) AS FixedJoint ON FixedJoint.JOT_CellWelder = welder.WED_ID and FixedJoint.ProjectId=welder.ProjectId
|
||||
|
||||
|
||||
--已焊对接焊缝数
|
||||
LEFT JOIN (SELECT COUNT(*) AS ButtJoint,joint.JOT_CellWelder,ProjectId
|
||||
FROM HJGL_PW_JointInfo joint
|
||||
LEFT JOIN dbo.HJGL_BS_JointType jointType on jointType.JOTY_ID=joint.JOTY_ID
|
||||
WHERE DReportID is not null AND jointType.JOTY_Group='1'
|
||||
GROUP BY joint.JOT_CellWelder,ProjectId) AS ButtJoint ON ButtJoint.JOT_CellWelder = welder.WED_ID and ButtJoint.ProjectId=welder.ProjectId
|
||||
|
||||
|
||||
--已焊角焊缝数
|
||||
LEFT JOIN (SELECT COUNT(*) AS FilletJoint,joint.JOT_CellWelder,ProjectId
|
||||
FROM HJGL_PW_JointInfo joint
|
||||
LEFT JOIN dbo.HJGL_BS_JointType jointType on jointType.JOTY_ID=joint.JOTY_ID
|
||||
WHERE DReportID is not null AND jointType.JOTY_Group='2'
|
||||
GROUP BY joint.JOT_CellWelder,ProjectId) AS FilletJoint ON FilletJoint.JOT_CellWelder = welder.WED_ID and FilletJoint.ProjectId=welder.ProjectId
|
||||
|
||||
|
||||
--已委托焊口数
|
||||
LEFT JOIN (SELECT COUNT(*) AS TrustJointNum,joint.JOT_CellWelder,ProjectId
|
||||
FROM dbo.HJGL_BO_BatchDetail batchDetail
|
||||
LEFT JOIN HJGL_pw_jointinfo joint ON joint.jot_id=batchDetail.jot_id
|
||||
WHERE (batchDetail.NDT is not null OR batchDetail.NDT!='') and joint.JOT_JointNo not like '%A%' and joint.JOT_JointNo not like '%B%' and batchDetail.PointType!='2'
|
||||
GROUP BY joint.JOT_CellWelder,ProjectId) AS TrustJointNum ON TrustJointNum.JOT_CellWelder = welder.WED_ID and TrustJointNum.ProjectId=welder.ProjectId
|
||||
|
||||
|
||||
--已委托固定口数
|
||||
LEFT JOIN (SELECT COUNT(*) AS TrustFixedJoint,joint.JOT_CellWelder,ProjectId
|
||||
FROM dbo.HJGL_BO_BatchDetail batchDetail
|
||||
LEFT JOIN HJGL_pw_jointinfo joint ON joint.jot_id=batchDetail.jot_id
|
||||
WHERE (batchDetail.NDT is not null OR batchDetail.NDT!='')
|
||||
AND joint.JOT_JointAttribute='固定' and joint.JOT_JointNo not like '%A%' and joint.JOT_JointNo not like '%B%' and batchDetail.PointType!='2'
|
||||
GROUP BY joint.JOT_CellWelder,ProjectId) AS TrustFixedJoint ON TrustFixedJoint.JOT_CellWelder = welder.WED_ID and TrustFixedJoint.ProjectId=welder.ProjectId
|
||||
|
||||
|
||||
--已委托对接焊缝数
|
||||
LEFT JOIN (SELECT COUNT(*) AS TrustButtJoint,joint.JOT_CellWelder,ProjectId
|
||||
FROM dbo.HJGL_BO_BatchDetail batchDetail
|
||||
LEFT JOIN HJGL_pw_jointinfo joint ON joint.jot_id=batchDetail.jot_id
|
||||
LEFT JOIN dbo.HJGL_BS_JointType jointType on jointType.JOTY_ID=joint.JOTY_ID
|
||||
WHERE (batchDetail.NDT is not null OR batchDetail.NDT!='')
|
||||
AND jointType.JOTY_Group='1' and joint.JOT_JointNo not like '%A%' and joint.JOT_JointNo not like '%B%' and batchDetail.PointType!='2'
|
||||
GROUP BY joint.JOT_CellWelder,ProjectId) AS TrustButtJoint ON TrustButtJoint.JOT_CellWelder = welder.WED_ID and TrustButtJoint.ProjectId=welder.ProjectId
|
||||
|
||||
--已委托角焊缝数
|
||||
LEFT JOIN (SELECT COUNT(*) AS TrustFilletJoint,joint.JOT_CellWelder,ProjectId
|
||||
FROM dbo.HJGL_BO_BatchDetail batchDetail
|
||||
LEFT JOIN HJGL_pw_jointinfo joint ON joint.jot_id=batchDetail.jot_id
|
||||
LEFT JOIN dbo.HJGL_BS_JointType jointType on jointType.JOTY_ID=joint.JOTY_ID
|
||||
WHERE (batchDetail.NDT is not null OR batchDetail.NDT!='')
|
||||
AND jointType.JOTY_Group='2' and joint.JOT_JointNo not like '%A%' and joint.JOT_JointNo not like '%B%' and batchDetail.PointType!='2'
|
||||
GROUP BY joint.JOT_CellWelder,ProjectId) AS TrustFilletJoint ON TrustFilletJoint.JOT_CellWelder = welder.WED_ID and TrustFilletJoint.ProjectId=welder.ProjectId
|
||||
|
||||
|
||||
WHERE (welder.ProjectId = @projectId OR @projectId IS NULL)
|
||||
AND (wld.WED_Unit=@unitcode OR @unitcode IS NULL)
|
||||
AND (wld.WED_ID=@WED_ID OR @WED_ID is null)
|
||||
order BY wld.WED_Code
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER VIEW [dbo].[HJGL_View_JointInfo]
|
||||
AS
|
||||
/*管线焊口信息视图*/
|
||||
SELECT
|
||||
JointInfo.JOT_ID,
|
||||
JointInfo.ProjectId,
|
||||
JointInfo.PointType,
|
||||
JointInfo.RT1_RepairFilm,
|
||||
JointInfo.dreportid,
|
||||
IsoInfo.BSU_ID,
|
||||
JointInfo.STE_ID,
|
||||
JOT_JointNo,
|
||||
JOT_DailyReportNo, --日报告号
|
||||
(CASE WHEN JointInfo.Jot_WeldingDate IS NOT NULL THEN JointInfo.Jot_WeldingDate
|
||||
ELSE WeldReportMain.JOT_WeldDate END) AS JOT_WeldDate, --焊接日期
|
||||
JointInfo.ISO_ID,
|
||||
ISO_IsoNo, --管线号
|
||||
Unit.UnitCode,
|
||||
Unit.UnitName,
|
||||
Steel.STE_Code AS STE_Name1,--材质1
|
||||
Steel1.STE_Code AS STE_Name2,--材质2
|
||||
Welder.WED_Code AS WED_Code1, --盖面焊工代号
|
||||
Welder.WED_Name AS WED_Name1, --盖面焊工名称
|
||||
FloorWelder.WED_Code AS WED_Code2, --打底焊工代号
|
||||
FloorWelder.WED_Name AS WED_Name2, --打底焊工名称
|
||||
JointInfo.WLO_Code,
|
||||
(CASE WHEN JointInfo.WLO_Code='F' THEN '现场安装' ELSE '预制' END) AS WLO_Name,--焊接区域
|
||||
JOT_DoneDin,
|
||||
IS_Compute,
|
||||
com1.Com_Name AS Component1,--组件1号
|
||||
com1.COM_Code AS COM_Code1,--组件1号
|
||||
com2.COM_Name AS Component2,--组件2号
|
||||
com2.COM_Code AS COM_Code2,--组件1号
|
||||
m1.WMT_MatCode AS WeldMat,--焊条
|
||||
WeldMaterial.WMT_MatCode AS WeldSilk,--焊丝
|
||||
batchDetail.PointType AS JointStatus,---焊口状态
|
||||
JOT_Dia,
|
||||
JOT_Size,
|
||||
JOT_Sch,
|
||||
JOT_FactSch,
|
||||
JOT_JointFlag,
|
||||
JOT_TrustFlag,
|
||||
ProessTypes,
|
||||
JOT_JointDesc,
|
||||
JointInfo.JOTY_ID,
|
||||
JointType.JOTY_Name,--焊缝类型
|
||||
JointType.JOTY_Code,--焊缝类型
|
||||
JointInfo.WME_ID,
|
||||
WeldMethod.WME_Name AS WME_Name,--焊接方法
|
||||
WeldMethod.WME_Code,--焊接方法代码
|
||||
SlopeType.JST_Name, --坡口类型
|
||||
SlopeType.JST_Code, --坡口类型代码
|
||||
IS_Proess,
|
||||
(CASE WHEN IS_Proess=1 THEN '是' ELSE '否' END) AS IS_ProessName,
|
||||
JOT_PrepareTemp,
|
||||
JOT_CellTemp,
|
||||
JOT_LastTemp,
|
||||
JOT_JointAttribute,
|
||||
JOT_Location,
|
||||
batch.BatchCode AS BatchCode,--批次号
|
||||
batchDetail.PointDate AS PointDate,--点口日期
|
||||
NULL AS CH_TrustCode, NULL AS CH_TrustDate,
|
||||
--NDTType.NDT_Name as NDT_Name,--探伤类型
|
||||
JointInfo.JOT_Remark,
|
||||
JointInfo.RT_States,
|
||||
JointInfo.UT_States,
|
||||
JointInfo.MT_States,
|
||||
JointInfo.PT_States,
|
||||
JointInfo.PAUT_States,
|
||||
(case when (select top 1 IsOK from HJGL_CH_HotProessResult hr where hr.JOT_ID=JointInfo.JOT_ID)=1 then '合格'
|
||||
else '' end) as HotProessResult,
|
||||
Servicess.SER_Code,--介质代号
|
||||
--NDTRate.NDTR_Name as NDTR_Name, --探伤比例
|
||||
--NDTRate.NDTR_Code, --探伤比例
|
||||
isoInfo.ISO_TestPress,--试验压力
|
||||
isoInfo.ISO_DesignPress,--设计压力
|
||||
isoInfo.ISO_DesignTemperature,--设计温度
|
||||
IsoClass.ISC_IsoCode,--管线等级
|
||||
is_hj= CAST((CASE WHEN JointInfo.DReportID IS NULL THEN '0' ELSE '1' END ) AS BIT), --是否焊接
|
||||
if_dk=CAST((CASE WHEN batchDetail.NDT IS NULL THEN '0' ELSE '1' END) AS BIT), --是否点口
|
||||
JointInfo.InstallationId,
|
||||
JointInfo.NDTR_ID,
|
||||
JointInfo.IsSpecial,
|
||||
JointInfo.IsSpecial AS IsSpecialName, --是否特殊
|
||||
Installation.InstallationName,--装置
|
||||
NDTRate.NDTR_Name,
|
||||
JointInfo.Sort1,JointInfo.Sort2,JointInfo.Sort3,JointInfo.Sort4,JointInfo.Sort5
|
||||
,JointType.JOTY_Group
|
||||
FROM HJGL_PW_JointInfo AS JointInfo
|
||||
LEFT JOIN HJGL_PW_IsoInfo AS IsoInfo ON IsoInfo.ISO_ID=JointInfo.ISO_ID
|
||||
LEFT JOIN HJGL_BO_WeldReportMain AS WeldReportMain ON WeldReportMain.DReportID=JointInfo.DReportID
|
||||
LEFT JOIN HJGL_BS_Steel AS Steel ON Steel.STE_ID=JointInfo.STE_ID
|
||||
LEFT JOIN HJGL_BS_Steel AS Steel1 ON Steel1.STE_ID=JointInfo.STE_ID2
|
||||
LEFT JOIN HJGL_BS_Welder AS Welder ON Welder.WED_ID= JointInfo.JOT_CellWelder
|
||||
LEFT JOIN HJGL_BS_Welder AS FloorWelder ON FloorWelder.WED_ID=JointInfo.JOT_FloorWelder
|
||||
--LEFT JOIN HJGL_BS_WeldLocation AS WeldLocation ON WeldLocation.WLO_Code =JointInfo.WLO_Code
|
||||
LEFT JOIN HJGL_BS_Component AS com1 ON com1.COM_ID=JointInfo.JOT_Component1
|
||||
LEFT JOIN HJGL_BS_Component AS com2 ON com2.COM_ID=JointInfo.JOT_Component2
|
||||
LEFT JOIN HJGL_BS_WeldMaterial m1 ON m1.WMT_ID=JointInfo.JOT_WeldMat
|
||||
LEFT JOIN HJGL_BS_WeldMaterial AS WeldMaterial ON WeldMaterial.WMT_ID=JointInfo.JOT_WeldSilk
|
||||
LEFT JOIN HJGL_BS_JointType AS JointType ON JointType.JOTY_ID=JointInfo.JOTY_ID
|
||||
LEFT JOIN HJGL_BS_WeldMethod AS WeldMethod ON WeldMethod .WME_ID=JointInfo.WME_ID
|
||||
LEFT JOIN HJGL_BS_SlopeType AS SlopeType ON SlopeType.JST_ID=JointInfo.JST_ID
|
||||
LEFT JOIN dbo.HJGL_BO_BatchDetail AS batchDetail ON batchDetail.JOT_ID = JointInfo.JOT_ID
|
||||
LEFT JOIN dbo.HJGL_BO_Batch AS batch ON batch.BatchId = batchDetail.BatchId
|
||||
LEFT JOIN Base_Unit AS Unit ON Unit.UnitId=IsoInfo.BSU_ID
|
||||
--left join HJGL_BS_NDTRate AS NDTRate on NDTRate.NDTR_ID=IsoInfo.NDTR_ID
|
||||
LEFT JOIN HJGL_BS_Service AS Servicess ON Servicess.SER_ID=IsoInfo.SER_ID
|
||||
LEFT JOIN HJGL_BS_IsoClass AS IsoClass ON IsoClass.ISC_ID=IsoInfo.ISC_ID
|
||||
LEFT JOIN Project_Installation AS Installation ON Installation.InstallationId =JointInfo.InstallationId
|
||||
LEFT JOIN HJGL_BS_NDTRate AS NDTRate ON NDTRate.NDTR_ID =JointInfo.NDTR_ID
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
ALTER PROC [dbo].[HJGL_sp_rpt_welderPerformance]
|
||||
@unitcode VARCHAR(50) = NULL,
|
||||
@steel VARCHAR(50) = NULL,
|
||||
@WED_ID NVARCHAR(50) = NULL,
|
||||
@date1 DATETIME = NULL,
|
||||
@date2 DATETIME = NULL,
|
||||
@projectId NVARCHAR(500) = NULL,
|
||||
@installationId NVARCHAR(50)=NULL
|
||||
AS
|
||||
/*焊工业绩分析*/
|
||||
SELECT
|
||||
NEWID() AS Id,
|
||||
total.ProjectId,
|
||||
project.ProjectCode,--施工号
|
||||
total.Welder,
|
||||
wld.wed_code,-- 焊工代码
|
||||
wld.wed_name,--焊工名称
|
||||
wld.WED_Sex, --性别
|
||||
-------------本期start
|
||||
CAST(ISNULL(total.totalSize,0) AS DECIMAL(19,2)) AS totalSize, --总寸径
|
||||
ISNULL(total.totalJoint,0) AS totalJoint, --总焊口
|
||||
ISNULL(JointNum1.JointNum1,0) AS JointNum1, --一次拍片焊口数
|
||||
|
||||
ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0) AS JointPassNum1, --一次拍片合格焊口数
|
||||
ISNULL(JointNoPassNum1.JointNoPassNum1,0) AS RepairJoint1, --一次返修焊口数
|
||||
ISNULL(RepairJoint2.RepairJoint2,0) AS RepairJoint2, --二次返修焊口数
|
||||
ISNULL(RepairJoint3.RepairJoint3,0) AS RepairJoint3, --三次返修焊口数
|
||||
|
||||
CAST((CASE ISNULL((ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0)),0) WHEN 0 THEN 0
|
||||
ELSE (CASE(ISNULL(JointNum1.JointNum1,0)) WHEN 0 THEN 0
|
||||
ELSE 1.0 * ISNULL((ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0)),0)/(1.0 * JointNum1.JointNum1)
|
||||
END)END) AS DECIMAL(19,3)) AS JointPassRate , ---一次拍片焊口合格率
|
||||
|
||||
ISNULL(JointNum1.totalfilm,0) AS totalfilm, --一次拍片数
|
||||
(ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0)) AS totalPassfilm, --一次拍片合格数
|
||||
ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0) AS repairFilm1, --一次返修片子数
|
||||
|
||||
ISNULL(RepairJoint2.repairFilm2,0) AS repairFilm2, --二次返修片子数
|
||||
ISNULL(RepairJoint3.repairFilm3,0) AS repairFilm3, --三次返修片子数
|
||||
|
||||
CAST((CASE (ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0)) WHEN 0 THEN 0
|
||||
ELSE (CASE(ISNULL(JointNum1.totalfilm,0)) WHEN 0 THEN 0
|
||||
ELSE 1.0 * (ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0))/(1.0 * JointNum1.totalfilm)
|
||||
END) END) AS DECIMAL(19,3)) AS JointFilmPassRate ---一次拍片合格率
|
||||
|
||||
FROM
|
||||
--总达因值 --总焊口
|
||||
(SELECT SUM(joint.JOT_Size) AS totalSize,COUNT(*) AS totalJoint
|
||||
,joint.ProjectId,joint.InstallationId,joint.BSU_ID,joint.Welder
|
||||
FROM View_JointWelder joint
|
||||
LEFT JOIN HJGL_BO_WeldReportMain report ON joint.DReportID = report.DReportID
|
||||
WHERE joint.DReportID IS NOT NULL
|
||||
AND (report.JOT_WeldDate >= @date1 OR @date1 IS NULL) AND (report.JOT_WeldDate <= @date2 OR @date2 IS NULL)
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL)
|
||||
GROUP BY joint.ProjectId,joint.InstallationId,joint.BSU_ID, joint.Welder) AS total
|
||||
|
||||
|
||||
--一次拍片焊口数 , 一次拍片总数,一次拍片合格总数
|
||||
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS JointNum1, SUM(joint.RT_FilmNum) AS totalfilm,
|
||||
joint.ProjectId,joint.InstallationId,joint.BSU_ID,joint.Welder
|
||||
FROM dbo.View_JointWelder joint
|
||||
WHERE joint.PointType='点口' AND joint.RT_FilmNum IS NOT NULL and joint.RT_FilmNum>0 and (select COUNT(*) from dbo.HJGL_BO_QualityRating where JOT_ID=joint.JOT_ID and FilmNum is not null)>0
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_BO_QualityRating WHERE JOT_ID=joint.JOT_ID)>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_BO_QualityRating WHERE JOT_ID=joint.JOT_ID)<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY joint.ProjectId,joint.InstallationId,joint.BSU_ID, joint.Welder) AS JointNum1
|
||||
ON JointNum1.ProjectId=total.ProjectId AND JointNum1.InstallationId = total.InstallationId
|
||||
AND JointNum1.BSU_ID = total.BSU_ID AND JointNum1.Welder = total.Welder
|
||||
|
||||
--一次拍片不合格焊口数
|
||||
LEFT JOIN (SELECT COUNT(distinct joint.JOT_ID) AS JointNoPassNum1,
|
||||
joint.ProjectId,joint.InstallationId,joint.BSU_ID,rr.JOT_CellWelder as Welder
|
||||
FROM dbo.HJGL_CH_RepairItemRecord rr
|
||||
left join dbo.HJGL_View_JointInfo joint on rr.JOT_ID=joint.JOT_ID
|
||||
WHERE joint.PointType='点口' AND (joint.RT1_RepairFilm IS NOT NULL or (select top 1 CH_TrustItemID from dbo.HJGL_CH_TrustItem ti where ti.JOT_ID=joint.JOT_ID and ti.States='4') is not null)
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL and rr.RepairMark='R1'
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R1')>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R1')<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY joint.ProjectId,joint.InstallationId,joint.BSU_ID, rr.JOT_CellWelder) AS JointNoPassNum1
|
||||
ON JointNoPassNum1.ProjectId=total.ProjectId AND JointNoPassNum1.InstallationId = total.InstallationId
|
||||
AND JointNoPassNum1.BSU_ID = total.BSU_ID AND JointNoPassNum1.Welder = total.Welder
|
||||
--一次拍片不合格拍片数
|
||||
LEFT JOIN (SELECT count(rr.RepairItemRecordId) as JointNoPassFilmNum2,
|
||||
joint.ProjectId,joint.InstallationId,joint.BSU_ID,rr.JOT_CellWelder as Welder
|
||||
FROM dbo.HJGL_CH_RepairItemRecord rr
|
||||
left join dbo.HJGL_View_JointInfo joint on rr.JOT_ID=joint.JOT_ID
|
||||
WHERE joint.PointType='点口'
|
||||
--AND (joint.RT1_RepairFilm IS NOT NULL or (select top 1 CH_TrustItemID from dbo.HJGL_CH_TrustItem ti where ti.JOT_ID=joint.JOT_ID and ti.States='4') is not null)
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL and rr.RepairMark='R1'
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R1')>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R1')<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY joint.ProjectId,joint.InstallationId,joint.BSU_ID, rr.JOT_CellWelder) AS JointNoPassNum2
|
||||
ON JointNoPassNum2.ProjectId=total.ProjectId AND JointNoPassNum2.InstallationId = total.InstallationId
|
||||
AND JointNoPassNum2.BSU_ID = total.BSU_ID AND JointNoPassNum2.Welder = total.Welder
|
||||
--二次返修拍片焊口数,二次返修拍片总数
|
||||
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS RepairJoint2, SUM(ISNULL(joint.RT2_RepairFilmNum,0)) AS RepairFilm2,
|
||||
joint.ProjectId,joint.InstallationId,joint.BSU_ID,joint.Welder
|
||||
FROM dbo.View_JointWelder joint
|
||||
WHERE joint.PointType='点口' AND joint.RT2_RepairFilm IS NOT NULL
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R2')>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R2')<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY joint.ProjectId,joint.InstallationId,joint.BSU_ID, joint.Welder) AS RepairJoint2
|
||||
ON RepairJoint2.ProjectId=total.ProjectId AND RepairJoint2.InstallationId = total.InstallationId
|
||||
AND RepairJoint2.BSU_ID = total.BSU_ID AND RepairJoint2.Welder = total.Welder
|
||||
|
||||
|
||||
|
||||
--三次返修拍片焊口数,三次返修拍片总数
|
||||
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS RepairJoint3, SUM(ISNULL(joint.RT3_RepairFilmNum,0)) AS RepairFilm3,
|
||||
joint.ProjectId,joint.InstallationId,joint.BSU_ID,joint.Welder
|
||||
FROM dbo.View_JointWelder joint
|
||||
WHERE joint.PointType='点口' AND joint.RT3_RepairFilm IS NOT NULL
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R3')>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R3')<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY joint.ProjectId,joint.InstallationId,joint.BSU_ID, joint.Welder) AS RepairJoint3
|
||||
ON RepairJoint3.ProjectId=total.ProjectId AND RepairJoint3.InstallationId = total.InstallationId
|
||||
AND RepairJoint3.BSU_ID = total.BSU_ID AND RepairJoint3.Welder = total.Welder
|
||||
|
||||
LEFT JOIN Base_Project project ON total.ProjectId=project.ProjectId
|
||||
LEFT JOIN dbo.HJGL_BS_Welder wld ON wld.WED_ID=total.Welder
|
||||
|
||||
WHERE
|
||||
(CHARINDEX(total.ProjectId,@projectId)>0 OR @projectId IS NULL)
|
||||
AND (total.InstallationId = @installationId OR @installationId IS NULL)
|
||||
AND (wld.WED_Unit=@unitcode OR @unitcode IS NULL)
|
||||
AND (total.Welder = @WED_ID OR @WED_ID IS NULL)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,142 @@
|
|||
|
||||
CREATE PROC [dbo].[HJGL_sp_rpt_welderPerformance2]
|
||||
@unitcode VARCHAR(50) = NULL,
|
||||
@steel VARCHAR(50) = NULL,
|
||||
@WED_ID NVARCHAR(50) = NULL,
|
||||
@date1 DATETIME = NULL,
|
||||
@date2 DATETIME = NULL,
|
||||
@projectId NVARCHAR(500) = NULL,
|
||||
@installationId NVARCHAR(50)=NULL
|
||||
AS
|
||||
/*焊工业绩分析*/
|
||||
SELECT
|
||||
NEWID() AS Id,
|
||||
--total.ProjectId,
|
||||
--project.ProjectCode,--施工号
|
||||
'' as ProjectCode,
|
||||
total.Welder,
|
||||
wld.wed_code,-- 焊工代码
|
||||
wld.wed_name,--焊工名称
|
||||
wld.WED_Sex, --性别
|
||||
-------------本期start
|
||||
CAST(ISNULL(total.totalSize,0) AS DECIMAL(19,2)) AS totalSize, --总寸径
|
||||
ISNULL(total.totalJoint,0) AS totalJoint, --总焊口
|
||||
ISNULL(JointNum1.JointNum1,0) AS JointNum1, --一次拍片焊口数
|
||||
|
||||
ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0) AS JointPassNum1, --一次拍片合格焊口数
|
||||
ISNULL(JointNoPassNum1.JointNoPassNum1,0) AS RepairJoint1, --一次返修焊口数
|
||||
ISNULL(RepairJoint2.RepairJoint2,0) AS RepairJoint2, --二次返修焊口数
|
||||
ISNULL(RepairJoint3.RepairJoint3,0) AS RepairJoint3, --三次返修焊口数
|
||||
|
||||
CAST((CASE ISNULL((ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0)),0) WHEN 0 THEN 0
|
||||
ELSE (CASE(ISNULL(JointNum1.JointNum1,0)) WHEN 0 THEN 0
|
||||
ELSE 1.0 * ISNULL((ISNULL(JointNum1.JointNum1,0)-ISNULL(JointNoPassNum1.JointNoPassNum1,0)),0)/(1.0 * JointNum1.JointNum1)
|
||||
END)END) AS DECIMAL(19,3)) AS JointPassRate , ---一次拍片焊口合格率
|
||||
|
||||
ISNULL(JointNum1.totalfilm,0) AS totalfilm, --一次拍片数
|
||||
(ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0)) AS totalPassfilm, --一次拍片合格数
|
||||
ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0) AS repairFilm1, --一次返修片子数
|
||||
|
||||
ISNULL(RepairJoint2.repairFilm2,0) AS repairFilm2, --二次返修片子数
|
||||
ISNULL(RepairJoint3.repairFilm3,0) AS repairFilm3, --三次返修片子数
|
||||
|
||||
CAST((CASE (ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0)) WHEN 0 THEN 0
|
||||
ELSE (CASE(ISNULL(JointNum1.totalfilm,0)) WHEN 0 THEN 0
|
||||
ELSE 1.0 * (ISNULL(JointNum1.totalfilm,0)- ISNULL(JointNoPassNum2.JointNoPassFilmNum2,0))/(1.0 * JointNum1.totalfilm)
|
||||
END) END) AS DECIMAL(19,3)) AS JointFilmPassRate ---一次拍片合格率
|
||||
|
||||
FROM
|
||||
--总达因值 --总焊口
|
||||
(SELECT SUM(joint.JOT_Size) AS totalSize,COUNT(*) AS totalJoint
|
||||
,joint.Welder
|
||||
FROM View_JointWelder joint
|
||||
LEFT JOIN HJGL_BO_WeldReportMain report ON joint.DReportID = report.DReportID
|
||||
WHERE joint.DReportID IS NOT NULL
|
||||
AND (report.JOT_WeldDate >= @date1 OR @date1 IS NULL) AND (report.JOT_WeldDate <= @date2 OR @date2 IS NULL)
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL)
|
||||
GROUP BY joint.Welder) AS total
|
||||
|
||||
|
||||
--一次拍片焊口数 , 一次拍片总数,一次拍片合格总数
|
||||
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS JointNum1, SUM(joint.RT_FilmNum) AS totalfilm,
|
||||
joint.Welder
|
||||
FROM dbo.View_JointWelder joint
|
||||
WHERE joint.PointType='点口' AND joint.RT_FilmNum IS NOT NULL and joint.RT_FilmNum>0 and (select COUNT(*) from dbo.HJGL_BO_QualityRating where JOT_ID=joint.JOT_ID and FilmNum is not null)>0
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_BO_QualityRating WHERE JOT_ID=joint.JOT_ID)>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_BO_QualityRating WHERE JOT_ID=joint.JOT_ID)<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY joint.Welder) AS JointNum1
|
||||
ON JointNum1.Welder = total.Welder
|
||||
|
||||
--一次拍片不合格焊口数
|
||||
LEFT JOIN (SELECT COUNT(distinct joint.JOT_ID) AS JointNoPassNum1,
|
||||
rr.JOT_CellWelder as Welder
|
||||
FROM dbo.HJGL_CH_RepairItemRecord rr
|
||||
left join dbo.HJGL_View_JointInfo joint on rr.JOT_ID=joint.JOT_ID
|
||||
WHERE joint.PointType='点口' AND (joint.RT1_RepairFilm IS NOT NULL or (select top 1 CH_TrustItemID from dbo.HJGL_CH_TrustItem ti where ti.JOT_ID=joint.JOT_ID and ti.States='4') is not null)
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL and rr.RepairMark='R1'
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R1')>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R1')<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY rr.JOT_CellWelder) AS JointNoPassNum1
|
||||
ON JointNoPassNum1.Welder = total.Welder
|
||||
--一次拍片不合格拍片数
|
||||
LEFT JOIN (SELECT count(rr.RepairItemRecordId) as JointNoPassFilmNum2,
|
||||
rr.JOT_CellWelder as Welder
|
||||
FROM dbo.HJGL_CH_RepairItemRecord rr
|
||||
left join dbo.HJGL_View_JointInfo joint on rr.JOT_ID=joint.JOT_ID
|
||||
WHERE joint.PointType='点口'
|
||||
--AND (joint.RT1_RepairFilm IS NOT NULL or (select top 1 CH_TrustItemID from dbo.HJGL_CH_TrustItem ti where ti.JOT_ID=joint.JOT_ID and ti.States='4') is not null)
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL and rr.RepairMark='R1'
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R1')>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R1')<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY rr.JOT_CellWelder) AS JointNoPassNum2
|
||||
ON JointNoPassNum2.Welder = total.Welder
|
||||
--二次返修拍片焊口数,二次返修拍片总数
|
||||
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS RepairJoint2, SUM(ISNULL(joint.RT2_RepairFilmNum,0)) AS RepairFilm2,
|
||||
joint.Welder
|
||||
FROM dbo.View_JointWelder joint
|
||||
WHERE joint.PointType='点口' AND joint.RT2_RepairFilm IS NOT NULL
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R2')>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R2')<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY joint.Welder) AS RepairJoint2
|
||||
ON RepairJoint2.Welder = total.Welder
|
||||
|
||||
|
||||
|
||||
--三次返修拍片焊口数,三次返修拍片总数
|
||||
LEFT JOIN (SELECT COUNT(joint.JOT_ID) AS RepairJoint3, SUM(ISNULL(joint.RT3_RepairFilmNum,0)) AS RepairFilm3,
|
||||
joint.Welder
|
||||
FROM dbo.View_JointWelder joint
|
||||
WHERE joint.PointType='点口' AND joint.RT3_RepairFilm IS NOT NULL
|
||||
AND (joint.ste_id=@steel OR @steel IS NULL) AND joint.dreportid IS NOT NULL
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R3')>= @date1 OR @date1 IS NULL)
|
||||
AND ((SELECT TOP 1 SignDate FROM dbo.HJGL_CH_RepairItemRecord WHERE JOT_ID=joint.JOT_ID AND RepairMark='R3')<= @date2 OR @date2 IS NULL)
|
||||
GROUP BY joint.Welder) AS RepairJoint3
|
||||
ON RepairJoint3.Welder = total.Welder
|
||||
|
||||
--LEFT JOIN Base_Project project ON total.ProjectId=project.ProjectId
|
||||
LEFT JOIN dbo.HJGL_BS_Welder wld ON wld.WED_ID=total.Welder
|
||||
|
||||
WHERE
|
||||
-- (CHARINDEX(total.ProjectId,@projectId)>0 OR @projectId IS NULL)
|
||||
--AND (total.InstallationId = @installationId OR @installationId IS NULL)
|
||||
(wld.WED_Unit=@unitcode OR @unitcode IS NULL)
|
||||
AND (total.Welder = @WED_ID OR @WED_ID IS NULL)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
|
@ -102,6 +102,37 @@ namespace BLL
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改焊材入库
|
||||
/// </summary>
|
||||
/// <param name="stockIn"></param>
|
||||
public static void UpdateStockIn2(Model.Weld_StockIn stockIn)
|
||||
{
|
||||
Model.SGGLDB db = Funs.DB;
|
||||
Model.Weld_StockIn newStockIn = db.Weld_StockIn.FirstOrDefault(e => e.StockInId == stockIn.StockInId);
|
||||
if (newStockIn != null)
|
||||
{
|
||||
newStockIn.WeldId = stockIn.WeldId;
|
||||
newStockIn.Amount = stockIn.Amount;
|
||||
newStockIn.Weight = stockIn.Weight;
|
||||
//newStockIn.RecycleAmount = stockIn.RecycleAmount;
|
||||
//newStockIn.RecycleWeight = stockIn.RecycleWeight;
|
||||
//newStockIn.Materialman = stockIn.Materialman;
|
||||
//newStockIn.InStockDate = stockIn.InStockDate;
|
||||
newStockIn.IsReview = stockIn.IsReview;
|
||||
//newStockIn.ReviewMan = stockIn.ReviewMan;
|
||||
newStockIn.ReviewDate = stockIn.ReviewDate;
|
||||
//newStockIn.ReviewResult = stockIn.ReviewResult;
|
||||
newStockIn.AttachUrl = stockIn.AttachUrl;
|
||||
//newStockIn.UsingAmount = stockIn.UsingAmount;
|
||||
newStockIn.Warrantybook = stockIn.Warrantybook;
|
||||
newStockIn.HeartNo = stockIn.HeartNo;
|
||||
newStockIn.SupplierId = stockIn.SupplierId;
|
||||
newStockIn.UnitStoreId = stockIn.UnitStoreId;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新附件
|
||||
/// </summary>
|
||||
|
|
|
@ -1 +1,86 @@
|
|||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:SqlException
|
||||
错误信息:在与 SQL Server 建立连接时出现与网络相关的或特定于实例的错误。未找到或无法访问服务器。请验证实例名称是否正确并且 SQL Server 已配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - 定位指定的服务器/实例时出错)
|
||||
错误堆栈:
|
||||
在 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
|
||||
在 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
|
||||
在 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions)
|
||||
在 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
|
||||
在 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection)
|
||||
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
|
||||
在 System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection)
|
||||
在 System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
|
||||
在 System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
|
||||
在 System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
|
||||
在 System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
|
||||
在 System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
|
||||
在 System.Data.SqlClient.SqlConnection.Open()
|
||||
在 System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.get_IsSqlCe()
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.InitializeProviderMode()
|
||||
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
|
||||
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
|
||||
在 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
|
||||
在 BLL.Sys_UserService.UserLogOn(String account, String password, Boolean rememberMe, Page page) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\BLL\Common\SysManage\Sys_UserService.cs:行号 39
|
||||
在 FineUIPro.Web.Login.btnLogin_Click(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\Login.aspx.cs:行号 52
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:05/12/2025 16:45:20
|
||||
出错文件:http://localhost:64304/Login.aspx
|
||||
IP地址:::1
|
||||
|
||||
出错时间:05/12/2025 16:45:20
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:IndexOutOfRangeException
|
||||
错误信息:无法找到列 ProjectCode。
|
||||
错误堆栈:
|
||||
在 System.Data.DataTable.ParseSortString(String sortString)
|
||||
在 System.Data.DataView.CheckSort(String sort)
|
||||
在 System.Data.DataView.set_Sort(String value)
|
||||
在 FineUIPro.Web.PageBase.GetPagedDataTable(Grid Grid1, DataTable tb) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\common\PageBase.cs:行号 328
|
||||
在 FineUIPro.Web.HJGL.WeldingReport.WelderPerformance.BindGrid2() 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\WeldingReport\WelderPerformance.aspx.cs:行号 354
|
||||
在 FineUIPro.Web.HJGL.WeldingReport.WelderPerformance.BtnAnalyse2_Click(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\WeldingReport\WelderPerformance.aspx.cs:行号 414
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:05/16/2025 15:00:34
|
||||
出错文件:http://localhost:64304/HJGL/WeldingReport/WelderPerformance.aspx
|
||||
IP地址:::1
|
||||
操作人员:管理员
|
||||
|
||||
出错时间:05/16/2025 15:00:34
|
||||
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:IndexOutOfRangeException
|
||||
错误信息:无法找到列 ProjectCode。
|
||||
错误堆栈:
|
||||
在 System.Data.DataTable.ParseSortString(String sortString)
|
||||
在 System.Data.DataView.CheckSort(String sort)
|
||||
在 System.Data.DataView.set_Sort(String value)
|
||||
在 FineUIPro.Web.PageBase.GetPagedDataTable(Grid Grid1, DataTable tb) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\common\PageBase.cs:行号 328
|
||||
在 FineUIPro.Web.HJGL.WeldingReport.WelderPerformance.BindGrid2() 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\WeldingReport\WelderPerformance.aspx.cs:行号 354
|
||||
在 FineUIPro.Web.HJGL.WeldingReport.WelderPerformance.BtnAnalyse2_Click(Object sender, EventArgs e) 位置 D:\工作\鼎盛\HJGL_DS\HJGL_DS\FineUIPro.Web\HJGL\WeldingReport\WelderPerformance.aspx.cs:行号 414
|
||||
在 FineUIPro.Button.OnClick(EventArgs e)
|
||||
在 (Button , EventArgs )
|
||||
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:05/16/2025 15:00:37
|
||||
出错文件:http://localhost:64304/HJGL/WeldingReport/WelderPerformance.aspx
|
||||
IP地址:::1
|
||||
操作人员:管理员
|
||||
|
||||
出错时间:05/16/2025 15:00:37
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@
|
|||
</f:Label>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="BtnAnalyse2" Text="按焊工统计" Icon="ChartPie" runat="server" Hidden="true" OnClick="BtnAnalyse2_Click"></f:Button>
|
||||
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
|
||||
<f:Button ID="BtnAnalyse2" Text="按焊工统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse2_Click"></f:Button>
|
||||
<f:Button ID="BtnAnalyse" Text="按项目统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" Text="导出" Icon="TableGo"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
|
|
|
@ -398,6 +398,7 @@
|
|||
/// <param name="e"></param>
|
||||
protected void BtnAnalyse_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.Columns[1].Hidden = false;
|
||||
BindGrid();
|
||||
OutputSummaryData();
|
||||
}
|
||||
|
@ -409,8 +410,10 @@
|
|||
/// <param name="e"></param>
|
||||
protected void BtnAnalyse2_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Grid1.Columns[1].Hidden = true;
|
||||
BindGrid2();
|
||||
OutputSummaryData();
|
||||
this.Grid1.SummaryData = null;
|
||||
//OutputSummaryData();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<FineUIPro DebugMode="false" Theme="Cupertino"/>
|
||||
<appSettings>
|
||||
<!--连接字符串-->
|
||||
<add key="ConnectionString" value="Server=.\SQL2019;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
||||
<add key="ConnectionString" value="Server=.\MSSQLSERVER01;Database=HJGLDB_DS;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Max Pool Size = 1000;Connect Timeout=1200"/>
|
||||
<!--系统名称-->
|
||||
<add key="SystemName" value="诺必达焊接管理系统"/>
|
||||
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>
|
||||
|
|
|
@ -4,6 +4,12 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>编辑焊材入库录入</title>
|
||||
<style>
|
||||
.customlabel span {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
|
@ -49,10 +55,16 @@
|
|||
<Items>
|
||||
<f:NumberBox ID="txtWeight" runat="server" Label="重量(公斤)" LabelAlign="Right" NoNegative="true" AutoPostBack="true" OnTextChanged="txtWeight_TextChanged">
|
||||
</f:NumberBox>
|
||||
<f:NumberBox ID="txtAmount" runat="server" Label="数量(根)" LabelAlign="Right" NoNegative="true">
|
||||
<f:NumberBox ID="txtAmount" runat="server" Label="数量(根)" LabelAlign="Right" NoNegative="true" AutoPostBack="true" OnTextChanged="txtAmount_TextChanged">
|
||||
</f:NumberBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow Hidden="true" runat="server" ID="trRemainingAmount">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbRemainingAmount" Text="库存重量(公斤):" CssClass="customlabel"></f:Label>
|
||||
<f:Label runat="server" ID="lbReAmount" Label="库存数量(根)" CssClass="customlabel" LabelAlign="Right"></f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnitStore" runat="server" Label="单位仓库" LabelAlign="Right" EnableGroup="true" Required="true" ShowRedStar="true">
|
||||
|
|
|
@ -116,6 +116,20 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
{
|
||||
this.drpUnitStore.SelectedValue = stockIn.UnitStoreId;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(Request.Params["RemainingAmount"]))
|
||||
{
|
||||
this.trRemainingAmount.Hidden = false;
|
||||
decimal remainingAmount = (stockIn.Amount ?? 0) - (stockIn.UsingAmount ?? 0);
|
||||
this.lbReAmount.Text = remainingAmount.ToString("0.####");
|
||||
if (weld.ConvertValue > 0)
|
||||
{
|
||||
this.lbRemainingAmount.Text = "库存重量(公斤):" + (remainingAmount * weld.ConvertValue.Value).ToString("0.####");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lbRemainingAmount.Text = stockIn.Weight.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -191,8 +205,15 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
var mat = from x in Funs.DB.Weld_UsingMat where x.StockInId == this.StockInId select x;
|
||||
if (mat.Count() > 0)
|
||||
{
|
||||
// 焊材已有领用,不更新数量
|
||||
BLL.StockInService.UpdateStockIn1(stockIn);
|
||||
if (!string.IsNullOrEmpty(Request.Params["RemainingAmount"]))
|
||||
{
|
||||
BLL.StockInService.UpdateStockIn2(stockIn);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 焊材已有领用,不更新数量
|
||||
BLL.StockInService.UpdateStockIn1(stockIn);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -317,6 +338,37 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtAmount_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (this.trRemainingAmount.Hidden == false)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.hdWeldId.Text.Trim()))
|
||||
{
|
||||
var weld = BLL.WeldInfoService.GetWeldInfoById(this.hdWeldId.Text.Trim());
|
||||
if (weld != null)
|
||||
{
|
||||
Model.Weld_StockIn stockIn = BLL.StockInService.GetStockInById(this.StockInId);
|
||||
decimal remainingAmount = Funs.GetNewDecimalOrZero(this.txtAmount.Text.Trim()) - (stockIn.UsingAmount ?? 0);
|
||||
if (weld.ConvertValue > 0)
|
||||
{
|
||||
this.lbRemainingAmount.Text = "库存重量(公斤):" + (remainingAmount * weld.ConvertValue.Value).ToString("0.####");
|
||||
}
|
||||
this.lbReAmount.Text = remainingAmount.ToString("0.####");
|
||||
//if (weld.ConvertValue.HasValue)
|
||||
//{
|
||||
// decimal? amountCov = Funs.GetNewDecimal(this.txtWeight.Text.Trim()) / weld.ConvertValue;
|
||||
// int amount = Convert.ToInt32(Math.Floor(amountCov.Value));
|
||||
// this.txtAmount.Text = amount.ToString();
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// this.txtAmount.Text = this.txtWeight.Text.Trim();
|
||||
//}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//protected void rblIsReview_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
|
|
@ -129,6 +129,33 @@ namespace FineUIPro.Web.WeldMat.Stock {
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.NumberBox txtAmount;
|
||||
|
||||
/// <summary>
|
||||
/// trRemainingAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.FormRow trRemainingAmount;
|
||||
|
||||
/// <summary>
|
||||
/// lbRemainingAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbRemainingAmount;
|
||||
|
||||
/// <summary>
|
||||
/// lbReAmount 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbReAmount;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnitStore 控件。
|
||||
/// </summary>
|
||||
|
|
|
@ -71,13 +71,13 @@
|
|||
HeaderText="剩余数量(Kg)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="ReAmount" DataField="ReAmount" FieldType="Double"
|
||||
HeaderText="剩余数量(根/Kg)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
HeaderText="剩余数量(根)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="120px" ColumnID="RecycleAmount" DataField="RecycleAmount" FieldType="Double"
|
||||
HeaderText="回收数量(Kg)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="140px" ColumnID="RecAmount" DataField="RecAmount" FieldType="Double"
|
||||
HeaderText="回收数量(根/Kg)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
HeaderText="回收数量(根)" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="UnitStoreName" DataField="UnitStoreName" FieldType="String"
|
||||
HeaderText="单位仓库" HeaderTextAlign="Center" TextAlign="Center" ExpandUnusedSpace="true">
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = @" SELECT v.WeldId+v.UnitStoreId as WeldId, weld.WeldCode, weld.WeldName,weld.WeldSpec,wType.WeldTypeName,'Kg' as WeldUnit,(unit.UnitName+'('+store.UnitStoreName+')') AS UnitStoreName,
|
||||
string strSql = @" SELECT v.WeldId+','+v.UnitStoreId as WeldId, weld.WeldCode, weld.WeldName,weld.WeldSpec,wType.WeldTypeName,'Kg' as WeldUnit,(unit.UnitName+'('+store.UnitStoreName+')') AS UnitStoreName,
|
||||
v.RemainingAmount as ReAmount,
|
||||
(CASE WHEN weld.ConvertValue>0
|
||||
THEN v.RemainingAmount*weld.ConvertValue
|
||||
|
@ -172,7 +172,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
string id = Grid1.SelectedRowID.Split(',')[0];
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StockSelectDetail.aspx?WeldId={0}", id, "编辑 - ")));
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="库存明细" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="StockInId" AllowCellEditing="true" ClicksToEdit="2"
|
||||
DataIDField="StockInId" AllowSorting="true" SortField="WeldCode" SortDirection="ASC"
|
||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15"
|
||||
OnSort="Grid1_Sort" AllowPaging="true" IsDatabasePaging="true" PageSize="15" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange"
|
||||
EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
|
@ -75,8 +75,10 @@
|
|||
<f:RenderField Width="90px" ColumnID="InStockDate" DataField="InStockDate" FieldType="Date"
|
||||
Renderer="Date" HeaderText="入库时间" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
<PageItems>
|
||||
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
|
||||
</f:ToolbarSeparator>
|
||||
|
@ -92,6 +94,27 @@
|
|||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="编辑焊材入库录入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="true"
|
||||
Width="800px" Height="350px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
|
||||
runat="server" Text="修正库存" Icon="Pencil">
|
||||
</f:MenuButton>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
public partial class StockSelectDetail : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 焊材ID
|
||||
/// </summary>
|
||||
|
@ -81,12 +81,12 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
listStr.Add(new SqlParameter("@WeldId", this.WeldId));
|
||||
}
|
||||
|
||||
if (drpUnit.SelectedValue!=Const._Null && drpUnit.SelectedValue != null)
|
||||
if (drpUnit.SelectedValue != Const._Null && drpUnit.SelectedValue != null)
|
||||
{
|
||||
strSql += " AND unit.UnitId = @UnitId";
|
||||
listStr.Add(new SqlParameter("@UnitId", drpUnit.SelectedValue));
|
||||
}
|
||||
if (drpUnitStore.SelectedValue != Const._Null && drpUnitStore.SelectedValue!=null)
|
||||
if (drpUnitStore.SelectedValue != Const._Null && drpUnitStore.SelectedValue != null)
|
||||
{
|
||||
strSql += " AND StockIn.UnitStoreId = @UnitStoreId";
|
||||
listStr.Add(new SqlParameter("@UnitStoreId", drpUnitStore.SelectedValue));
|
||||
|
@ -96,7 +96,7 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
strSql += " AND WeldInfo.WeldName LIKE @WeldName";
|
||||
listStr.Add(new SqlParameter("@WeldName", "%" + this.txtWeldName.Text.Trim() + "%"));
|
||||
}
|
||||
|
||||
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
|
@ -175,5 +175,62 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 弹出编辑窗口关闭事件
|
||||
/// <summary>
|
||||
/// 弹出编辑窗体关闭事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 编辑
|
||||
/// <summary>
|
||||
/// 双击Grid事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 编辑数据方法
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length == 0)
|
||||
{
|
||||
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
string id = Grid1.SelectedRowID;
|
||||
if (!string.IsNullOrEmpty(id))
|
||||
{
|
||||
var q = BLL.StockInService.GetStockInById(id);
|
||||
if (q.UnitStoreId != null)
|
||||
{
|
||||
var s = BLL.UnitStoreService.GetUnitStoreById(q.UnitStoreId);
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("StockInEdit.aspx?StockInId={0}&RemainingAmount=RemainingAmount", id, "编辑 - ")));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -146,5 +146,32 @@ namespace FineUIPro.Web.WeldMat.Stock {
|
|||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlPageSize;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuEdit;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue