|
|
@ -26,65 +26,76 @@
|
|
|
|
<result property="stationCode" column="STATION_CODE"/>
|
|
|
|
<result property="stationCode" column="STATION_CODE"/>
|
|
|
|
<result property="submitQualtyId" column="SUBMINT_QUALTY_ID"/>
|
|
|
|
<result property="submitQualtyId" column="SUBMINT_QUALTY_ID"/>
|
|
|
|
<result property="productLineName" column="PRODUCT_LINE_NAME"/>
|
|
|
|
<result property="productLineName" column="PRODUCT_LINE_NAME"/>
|
|
|
|
|
|
|
|
<result property="processName" column="processName"/>
|
|
|
|
|
|
|
|
<result property="groupName" column="groupName"/>
|
|
|
|
|
|
|
|
<result property="inspectorName" column="inspectorName"/>
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectReportQualityInspectionVo">
|
|
|
|
<sql id="selectReportQualityInspectionVo">
|
|
|
|
select obj_id,
|
|
|
|
select rqi.obj_id,
|
|
|
|
bar_code,
|
|
|
|
rqi.bar_code,
|
|
|
|
material_name,
|
|
|
|
rqi.material_name,
|
|
|
|
process_code,
|
|
|
|
rqi.process_code,
|
|
|
|
test_item_code,
|
|
|
|
bps.PROCESS_NAME processName,
|
|
|
|
quality_defect_code,
|
|
|
|
rqi.test_item_code,
|
|
|
|
quality_defect_name,
|
|
|
|
pl.PRODUCT_LINE_NAME PRODUCT_LINE_NAME,
|
|
|
|
treatment_measure,
|
|
|
|
rqi.quality_defect_code,
|
|
|
|
process_result,
|
|
|
|
rqi.quality_defect_name,
|
|
|
|
is_lower_line,
|
|
|
|
rqi.treatment_measure,
|
|
|
|
group_code,
|
|
|
|
rqi.process_result,
|
|
|
|
inspector_code,
|
|
|
|
rqi.is_lower_line,
|
|
|
|
inspector_time,
|
|
|
|
rqi.group_code,
|
|
|
|
rework_number,
|
|
|
|
btm.TEAM_NAME groupName,
|
|
|
|
finish_time,
|
|
|
|
rqi.inspector_code,
|
|
|
|
is_flag,
|
|
|
|
su.NICK_NAME inspectorName,
|
|
|
|
updated_by,
|
|
|
|
rqi.inspector_time,
|
|
|
|
updated_time
|
|
|
|
rqi.rework_number,
|
|
|
|
from report_quality_inspection
|
|
|
|
rqi.finish_time,
|
|
|
|
|
|
|
|
rqi.is_flag,
|
|
|
|
|
|
|
|
rqi.updated_by,
|
|
|
|
|
|
|
|
rqi.updated_time
|
|
|
|
|
|
|
|
from report_quality_inspection rqi
|
|
|
|
|
|
|
|
left join BASE_PROCESS_STATION bps on bps.PROCESS_CODE = rqi.PROCESS_CODE
|
|
|
|
|
|
|
|
left join BASE_TEAMMEMBERS btm on btm.TEAM_CODE = rqi.group_code
|
|
|
|
|
|
|
|
left join SYS_USER su on su.USER_NAME = rqi.inspector_code
|
|
|
|
|
|
|
|
left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = rqi.STATION_CODE
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectReportQualityInspectionList" parameterType="ReportQualityInspection"
|
|
|
|
<select id="selectReportQualityInspectionList" parameterType="ReportQualityInspection"
|
|
|
|
resultMap="ReportQualityInspectionResult">
|
|
|
|
resultMap="ReportQualityInspectionResult">
|
|
|
|
<include refid="selectReportQualityInspectionVo"/>
|
|
|
|
<include refid="selectReportQualityInspectionVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="barCode != null and barCode != ''">and bar_code = #{barCode}</if>
|
|
|
|
<if test="barCode != null and barCode != ''">and rqi.bar_code = #{barCode}</if>
|
|
|
|
<if test="materialName != null and materialName != ''">and material_name like concat(concat('%',
|
|
|
|
<if test="materialName != null and materialName != ''">and rqi.material_name like concat(concat('%',
|
|
|
|
#{materialName}), '%')
|
|
|
|
#{materialName}), '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="processCode != null and processCode != ''">and process_code = #{processCode}</if>
|
|
|
|
<if test="processCode != null and processCode != ''">and rqi.process_code = #{processCode}</if>
|
|
|
|
<if test="testItemCode != null and testItemCode != ''">and test_item_code = #{testItemCode}</if>
|
|
|
|
<if test="testItemCode != null and testItemCode != ''">and rqi.test_item_code = #{testItemCode}</if>
|
|
|
|
<if test="qualityDefectCode != null and qualityDefectCode != ''">and quality_defect_code =
|
|
|
|
<if test="qualityDefectCode != null and qualityDefectCode != ''">and rqi.quality_defect_code =
|
|
|
|
#{qualityDefectCode}
|
|
|
|
#{qualityDefectCode}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="qualityDefectName != null and qualityDefectName != ''">and quality_defect_name like
|
|
|
|
<if test="qualityDefectName != null and qualityDefectName != ''">and rqi.quality_defect_name like
|
|
|
|
concat(concat('%', #{qualityDefectName}), '%')
|
|
|
|
concat(concat('%', #{qualityDefectName}), '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="treatmentMeasure != null and treatmentMeasure != ''">and treatment_measure =
|
|
|
|
<if test="treatmentMeasure != null and treatmentMeasure != ''">and rqi.treatment_measure =
|
|
|
|
#{treatmentMeasure}
|
|
|
|
#{treatmentMeasure}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="processResult != null and processResult != ''">and process_result = #{processResult}</if>
|
|
|
|
<if test="processResult != null and processResult != ''">and rqi.process_result = #{processResult}</if>
|
|
|
|
<if test="isLowerLine != null and isLowerLine != ''">and is_lower_line = #{isLowerLine}</if>
|
|
|
|
<if test="isLowerLine != null and isLowerLine != ''">and rqi.is_lower_line = #{isLowerLine}</if>
|
|
|
|
<if test="groupCode != null and groupCode != ''">and group_code = #{groupCode}</if>
|
|
|
|
<if test="groupCode != null and groupCode != ''">and rqi.group_code = #{groupCode}</if>
|
|
|
|
<if test="inspectorCode != null and inspectorCode != ''">and inspector_code = #{inspectorCode}</if>
|
|
|
|
<if test="inspectorCode != null and inspectorCode != ''">and rqi.inspector_code = #{inspectorCode}</if>
|
|
|
|
<if test="inspectorTime != null ">and inspector_time = #{inspectorTime}</if>
|
|
|
|
<if test="inspectorTime != null ">and rqi.inspector_time = #{inspectorTime}</if>
|
|
|
|
<if test="reworkNumber != null ">and rework_number = #{reworkNumber}</if>
|
|
|
|
<if test="reworkNumber != null ">and rqi.rework_number = #{reworkNumber}</if>
|
|
|
|
<if test="finishTime != null ">and finish_time = #{finishTime}</if>
|
|
|
|
<if test="finishTime != null ">and rqi.finish_time = #{finishTime}</if>
|
|
|
|
<if test="isFlag != null ">and is_flag = #{isFlag}</if>
|
|
|
|
<if test="isFlag != null ">and rqi.is_flag = #{isFlag}</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">and rqi.updated_by = #{updatedBy}</if>
|
|
|
|
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
|
|
|
|
<if test="updatedTime != null ">and rqi.updated_time = #{updatedTime}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectReportQualityInspectionByObjId" parameterType="Long" resultMap="ReportQualityInspectionResult">
|
|
|
|
<select id="selectReportQualityInspectionByObjId" parameterType="Long" resultMap="ReportQualityInspectionResult">
|
|
|
|
<include refid="selectReportQualityInspectionVo"/>
|
|
|
|
<include refid="selectReportQualityInspectionVo"/>
|
|
|
|
where obj_id = #{objId}
|
|
|
|
where rqi.obj_id = #{objId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertReportQualityInspection" parameterType="ReportQualityInspection">
|
|
|
|
<insert id="insertReportQualityInspection" parameterType="ReportQualityInspection">
|
|
|
|