|
|
@ -12,6 +12,7 @@
|
|
|
|
<result property="materialCategories" column="material_categories"/>
|
|
|
|
<result property="materialCategories" column="material_categories"/>
|
|
|
|
<result property="materialSubclass" column="material_subclass"/>
|
|
|
|
<result property="materialSubclass" column="material_subclass"/>
|
|
|
|
<result property="stationCode" column="station_code"/>
|
|
|
|
<result property="stationCode" column="station_code"/>
|
|
|
|
|
|
|
|
<result property="stationName" column="station_name"/>
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
<result property="remark" column="remark"/>
|
|
|
|
<result property="isFlag" column="is_flag"/>
|
|
|
|
<result property="isFlag" column="is_flag"/>
|
|
|
|
<result property="createdBy" column="created_by"/>
|
|
|
|
<result property="createdBy" column="created_by"/>
|
|
|
@ -21,45 +22,47 @@
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectBaseQualityInspectionItemVo">
|
|
|
|
<sql id="selectBaseQualityInspectionItemVo">
|
|
|
|
select obj_id,
|
|
|
|
select qi.obj_id,
|
|
|
|
quality_defect_code,
|
|
|
|
qi.quality_defect_code,
|
|
|
|
quality_defect_name,
|
|
|
|
qi.quality_defect_name,
|
|
|
|
parent_id,
|
|
|
|
qi.parent_id,
|
|
|
|
material_categories,
|
|
|
|
qi.material_categories,
|
|
|
|
material_subclass,
|
|
|
|
qi.material_subclass,
|
|
|
|
station_code,
|
|
|
|
qi.station_code,
|
|
|
|
remark,
|
|
|
|
pl.PRODUCT_LINE_NAME station_name,
|
|
|
|
is_flag,
|
|
|
|
qi.remark,
|
|
|
|
created_by,
|
|
|
|
qi.is_flag,
|
|
|
|
created_time,
|
|
|
|
qi.created_by,
|
|
|
|
updated_by,
|
|
|
|
qi.created_time,
|
|
|
|
updated_time
|
|
|
|
qi.updated_by,
|
|
|
|
from base_quality_inspection_item
|
|
|
|
qi.updated_time
|
|
|
|
|
|
|
|
from base_quality_inspection_item qi
|
|
|
|
|
|
|
|
left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = qi.STATION_CODE
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectBaseQualityInspectionItemList" parameterType="BaseQualityInspectionItem"
|
|
|
|
<select id="selectBaseQualityInspectionItemList" parameterType="BaseQualityInspectionItem"
|
|
|
|
resultMap="BaseQualityInspectionItemResult">
|
|
|
|
resultMap="BaseQualityInspectionItemResult">
|
|
|
|
<include refid="selectBaseQualityInspectionItemVo"/>
|
|
|
|
<include refid="selectBaseQualityInspectionItemVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="qualityDefectCode != null and qualityDefectCode != ''">and quality_defect_code =
|
|
|
|
<if test="qualityDefectCode != null and qualityDefectCode != ''">and qi.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 qi.quality_defect_name like
|
|
|
|
concat(concat('%', #{qualityDefectName}), '%')
|
|
|
|
concat(concat('%', #{qualityDefectName}), '%')
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="parentId != null and parentId != ''">and parent_id = #{parentId}</if>
|
|
|
|
<if test="parentId != null and parentId != ''">and qi.parent_id = #{parentId}</if>
|
|
|
|
<if test="materialCategories != null and materialCategories != ''">and material_categories =
|
|
|
|
<if test="materialCategories != null and materialCategories != ''">and qi.material_categories =
|
|
|
|
#{materialCategories}
|
|
|
|
#{materialCategories}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="materialSubclass != null and materialSubclass != ''">and material_subclass =
|
|
|
|
<if test="materialSubclass != null and materialSubclass != ''">and qi.material_subclass =
|
|
|
|
#{materialSubclass}
|
|
|
|
#{materialSubclass}
|
|
|
|
</if>
|
|
|
|
</if>
|
|
|
|
<if test="stationCode != null and stationCode != ''">and station_code = #{stationCode}</if>
|
|
|
|
<if test="stationCode != null and stationCode != ''">and qi.station_code = #{stationCode}</if>
|
|
|
|
<if test="isFlag != null ">and is_flag = #{isFlag}</if>
|
|
|
|
<if test="isFlag != null ">and qi.is_flag = #{isFlag}</if>
|
|
|
|
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
|
|
|
|
<if test="createdBy != null and createdBy != ''">and qi.created_by = #{createdBy}</if>
|
|
|
|
<if test="createdTime != null ">and created_time = #{createdTime}</if>
|
|
|
|
<if test="createdTime != null ">and qi.created_time = #{createdTime}</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
|
|
|
|
<if test="updatedBy != null and updatedBy != ''">and qi.updated_by = #{updatedBy}</if>
|
|
|
|
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
|
|
|
|
<if test="updatedTime != null ">and qi.updated_time = #{updatedTime}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
order by quality_defect_code
|
|
|
|
order by quality_defect_code
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
@ -67,12 +70,12 @@
|
|
|
|
<select id="selectBaseQualityInspectionItemByObjId" parameterType="Long"
|
|
|
|
<select id="selectBaseQualityInspectionItemByObjId" parameterType="Long"
|
|
|
|
resultMap="BaseQualityInspectionItemResult">
|
|
|
|
resultMap="BaseQualityInspectionItemResult">
|
|
|
|
<include refid="selectBaseQualityInspectionItemVo"/>
|
|
|
|
<include refid="selectBaseQualityInspectionItemVo"/>
|
|
|
|
where obj_id = #{objId}
|
|
|
|
where qi.obj_id = #{objId}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="selectBaseQualityInspectionItemParent" resultMap="BaseQualityInspectionItemResult">
|
|
|
|
<select id="selectBaseQualityInspectionItemParent" resultMap="BaseQualityInspectionItemResult">
|
|
|
|
<include refid="selectBaseQualityInspectionItemVo"/>
|
|
|
|
<include refid="selectBaseQualityInspectionItemVo"/>
|
|
|
|
where PARENT_ID = 0
|
|
|
|
where qi.PARENT_ID = 0
|
|
|
|
order by quality_defect_code
|
|
|
|
order by qi.quality_defect_code
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="getQualityDefects" parameterType="String" resultMap="BaseQualityInspectionItemResult">
|
|
|
|
<select id="getQualityDefects" parameterType="String" resultMap="BaseQualityInspectionItemResult">
|
|
|
|
select bq2.obj_id,
|
|
|
|
select bq2.obj_id,
|
|
|
|