| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156 |
- <?xml version="1.0" encoding="UTF-8"?>
- <queryMap desc="表面检验管理">
- <update id="QCM030510_UpdateSurfaceFlaw" desc ="修改、取消修复缺陷">
- update QCM_JUDGE_SURFACE_FLAW t
- set t.IS_REPAIR = :3
- where t.SURFACE_ID = :1
- and t.FLAW_SEQ = :2
- </update>
- <select id="QCM030510_findNameByMN" desc="质量判定-根据产品序号获得缺陷信息">
- select
- case when IS_REPAIR = '0' then '待修复' else '已修复' end IS_REPAIR,
- case when PRIMARY_FLAG = '0' then '否' else '是' end PRIMARY_FLAG,
- t.SURFACE_ID,
- t.FLAW_SEQ,
- t.FLAW_DESC,
- FLAW_TYPE_DESC,
- case when FLAW_AREA = 'U' THEN '上表面' FLAW_AREA = 'D' THEN '下表面' else '边部' end FLAW_AREA,
- t.FLAW_POS_DESC,
- t.FLAW_DIR_DESC,
- t.FLAW_SIZE_DESC,
- FLAW_LV_DESC
- FLAW_QUANTITY,
- memo,
- CREATE_NAME
- from QCM_JUDGE_SURFACE_FLAW t
- where t.PRIMARY_FLAG='1'
- and
- t.SURFACE_ID in (
- select max(t2.SURFACE_ID) from QCM_JUDGE_SURFACE t2
- where t2.MATERIAL_NO=#{param1}
- )
- </select>
- <insert id="InsertSurface" desc="插入表面检验实绩表">
- insert into QCM_JUDGE_SURFACE
- (surface_id,
- heat_no,
- batch_no,
- board_no,
- inspection_lot,
- material_no,
- sf_result_code,
- sf_result_desc,
- level_code,
- level_desc,
- sf_memo,
- sf_type,
- roughness_val1,
- roughness_val2,
- roughness_val3,
- cop_section_code,
- cop_section_desc,
- respon_section_code,
- respon_section_name,
- reason_code,
- reason_desc,
- sfu_is_lock,
- sfd_is_lock,
- sfe_is_lock,
- design_key,
- order_no,
- psc,
- psc_desc,
- pline_code,
- pline_name,
- wrk_ord,
- wrk_grp,
- judge_name,
- judge_time)
- values
- (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,sysdate)
- </insert>
- <insert id= "InsertSurfaceFLaw" desc="插入表面缺陷实绩表">
- insert into QCM_JUDGE_SURFACE_FLAW
- (SURFACE_ID,
- PRIMARY_FLAG,
- IS_REPAIR,
- FLAW_SEQ,
- FLAW_CODE,
- FLAW_DESC,
- FLAW_AREA,
- FLAW_TYPE_CODE,
- FLAW_TYPE_DESC,
- FLAW_POS_CODE,
- FLAW_POS_DESC,
- FLAW_DIR_CODE,
- FLAW_DIR_DESC,
- FLAW_SIZE_CODE,
- FLAW_SIZE_DESC,
- FLAW_LV_CODE,
- FLAW_LV_DESC,
- FLAW_QUANTITY,
- MEMO,
- CREATE_NAME,
- CREATE_TIME)
- values
- (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,sysdate)
- </insert>
- <insert id="QCM030510_insertlock" desc="插入封锁表">
- insert into QCM_JUDGE_LOCKING
- (material_no,
- lock_seq,
- lock_type_code,
- lock_type_desc,
- lock_memo,
- unlock_type_code,
- unlock_type_desc,
- unlock_memo,
- target_design_key,
- target_psc,
- heat_no,
- batch_no,
- board_no,
- plan_no,
- ht_no,
- design_key,
- psc,
- pline_code,
- pline_name,
- cic_locking,
- fic_locking,
- sic_locking,
- pic_locking,
- dic_locking)
- values
- (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
- </insert>
- <select id= "QuerySurfaceFlaw" desc="查询缺陷信息">
- select a.surface_id,
- a.primary_flag,
- a.is_repair,
- a.flaw_seq,
- a.flaw_code,
- a.flaw_desc,
- a.flaw_area,
- a.flaw_type_code,
- a.flaw_type_desc,
- a.flaw_pos_code,
- a.flaw_pos_desc,
- a.flaw_dir_code,
- a.flaw_dir_desc,
- a.flaw_size_code,
- a.flaw_size_desc,
- a.flaw_lv_code,
- a.flaw_lv_desc,
- a.flaw_weight,
- a.flaw_quantity,
- a.memo,
- a.create_name,
- a.create_time,
- a.update_name,
- a.update_time from QCM_JUDGE_SURFACE_FLAW a
- where surface_id = #{param1}
- </select>
- </queryMap>
|