40 lines
1.2 KiB
MySQL
40 lines
1.2 KiB
MySQL
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
ALTER VIEW [dbo].[View_CH_TrustSearch]
|
|||
|
/*ί<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD>б<EFBFBD>*/
|
|||
|
AS
|
|||
|
SELECT
|
|||
|
JointInfo.JOT_ID, --<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id
|
|||
|
JointInfo.JOT_JointNo, --<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
JointInfo.JOT_JointStatus,
|
|||
|
IsoInfo.ISO_ID, --<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id
|
|||
|
IsoInfo.ISO_IsoNo,
|
|||
|
IsoInfo.UnitId,
|
|||
|
WorkArea.WorkAreaId, --<EFBFBD><EFBFBD><EFBFBD><EFBFBD>id
|
|||
|
JointInfo.ProjectId,
|
|||
|
Point.PW_PointID, --<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
Point.PW_PointNo,
|
|||
|
Point.PW_PointType,
|
|||
|
JointInfo.JOT_JointDesc,--<EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
case when isoInfo.[Is_Standard] = 0 then
|
|||
|
(detectionRate.DetectionRate+'%') else (detectionRate1.DetectionRate+'%') end AS DetectionRate
|
|||
|
FROM dbo.PW_JointInfo AS JointInfo
|
|||
|
LEFT JOIN dbo.PW_IsoInfo AS IsoInfo ON IsoInfo.ISO_ID = JointInfo.ISO_ID
|
|||
|
LEFT JOIN dbo.ProjectData_WorkArea AS WorkArea ON WorkArea.WorkAreaId=IsoInfo.WorkAreaId
|
|||
|
LEFT JOIN dbo.BO_Point AS Point ON Point.PW_PointID =JointInfo.PW_PointID
|
|||
|
LEFT JOIN dbo.CH_TrustItem AS TrustItem ON TrustItem.JOT_ID =JointInfo.JOT_ID
|
|||
|
LEFT JOIN Base_DetectionRate AS detectionRate ON detectionRate.DetectionRateId = IsoInfo.DetectionRateId
|
|||
|
LEFT JOIN Base_DetectionRate AS detectionRate1 ON detectionRate1.DetectionRateId = JointInfo.DetectionRateId
|
|||
|
WHERE TrustItem.CH_TrustItemID IS NULL AND Point.PW_PointID IS NOT NULL
|
|||
|
AND JointInfo.JOT_JointStatus ='101'
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
GO
|
|||
|
|
|||
|
|