|
|
|
@ -3004,6 +3004,89 @@ |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="eamCheckRecordSearch2" parameterType="com.xujie.sys.modules.pms.data.EamWorkOrderInData" resultType="com.xujie.sys.modules.pms.data.EamWorkOrderInData"> |
|
|
|
SELECT |
|
|
|
B.ObjectDesc, |
|
|
|
a.Site, |
|
|
|
a.bu_no, |
|
|
|
dbo.get_bu_desc(a.site, a.bu_no) as buDesc, |
|
|
|
a.OrderNo, |
|
|
|
a.PlanID, |
|
|
|
a.PlanDesc, |
|
|
|
a.PropertiesCode, |
|
|
|
a.ObjectID, |
|
|
|
a.Status, |
|
|
|
a.PlanOperator, |
|
|
|
a.checker, |
|
|
|
a.ActualOperator, |
|
|
|
a.PlanDate, |
|
|
|
a.ActualDate, |
|
|
|
a.FunctionType, |
|
|
|
a.CreateDate, |
|
|
|
a.Remark, |
|
|
|
a.StartTime, |
|
|
|
a.EndTime, |
|
|
|
a.WorkTime, |
|
|
|
a.PlanOperatorName, |
|
|
|
a.checkerName, |
|
|
|
dbo.eam_Get_eamAdminName(a.Site, a.ActualOperator) as ActualOperatorName, |
|
|
|
dbo.eam_Get_eam_properties_CodeDesc(a.site, a.bu_no, a.FunctionType, a.PropertiesCode) as codeDesc, |
|
|
|
a.result, |
|
|
|
a.checkResult, |
|
|
|
a.disposal_measures, |
|
|
|
a.check_work_plan_id, |
|
|
|
a.check_item_no, |
|
|
|
a.reach_date, |
|
|
|
a.reach_operator, |
|
|
|
a.reach_operator_name, |
|
|
|
dbo.joint_id(a.Site, a.bu_no, a.OrderNo, a.FunctionType) as adminID, |
|
|
|
dbo.joint_name(a.Site, a.bu_no, a.OrderNo, a.FunctionType) as operator, |
|
|
|
a.check_remark, |
|
|
|
a.document_source |
|
|
|
FROM eam_workOrder a |
|
|
|
INNER JOIN eam_object B ON A.SITE = B.SITE AND A.bu_no = B.bu_no AND A.ObjectID = B.ObjectID |
|
|
|
<where> |
|
|
|
A.site = #{query.site} AND dbo.get_bu_desc ( a.site, a.bu_no ) = #{query.buDesc} and a.PlanOperatorName like '%网格员%' |
|
|
|
<if test="query.orderNo != null and query.orderNo != ''"> |
|
|
|
AND a.OrderNo like '%' + #{query.orderNo} +'%' |
|
|
|
</if> |
|
|
|
<if test="query.planID != null and query.planID != ''"> |
|
|
|
AND a.PlanID like '%' + #{query.planID} +'%' |
|
|
|
</if> |
|
|
|
<if test="query.planDesc != null and query.planDesc != ''"> |
|
|
|
AND a.PlanDesc like '%' + #{query.planDesc} +'%' |
|
|
|
</if> |
|
|
|
<if test="query.objectID != null and query.objectID != ''"> |
|
|
|
AND a.ObjectID like '%' + #{query.objectID} +'%' |
|
|
|
</if> |
|
|
|
<if test="query.planOperatorName != null and query.planOperatorName != ''"> |
|
|
|
AND a.PlanOperatorName like '%' + #{query.planOperatorName} +'%' |
|
|
|
</if> |
|
|
|
<if test='query.documentSource != null and query.documentSource != "" and query.functionType == "C" and query.searchType == "reportDefect" '> |
|
|
|
AND a.document_source = #{query.documentSource} |
|
|
|
</if> |
|
|
|
<if test="query.planDate != null"> |
|
|
|
AND a.PlanDate = #{query.planDate} |
|
|
|
</if> |
|
|
|
<if test="query.startDate != null "> |
|
|
|
AND a.PlanDate >= #{query.startDate} |
|
|
|
</if> |
|
|
|
<if test="query.endDate != null "> |
|
|
|
AND #{query.endDate} >= a.PlanDate |
|
|
|
</if> |
|
|
|
<if test="query.endDate == null "> |
|
|
|
AND getDate() >= a.PlanDate |
|
|
|
</if> |
|
|
|
<if test="query.reachDate != null "> |
|
|
|
AND a.reach_date >= #{query.reachDate} |
|
|
|
</if> |
|
|
|
<if test="query.actualDate != null "> |
|
|
|
AND #{query.actualDate} >= a.ActualDate |
|
|
|
</if> |
|
|
|
AND a.FunctionType = #{query.functionType} |
|
|
|
</where> |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="eamDefectRecordSearch" parameterType="com.xujie.sys.modules.pms.data.EamWorkOrderInData" resultType="com.xujie.sys.modules.pms.data.EamWorkOrderInData"> |
|
|
|
SELECT |
|
|
|
a.Site, |
|
|
|
|