1b3515724d0bf918b04df04972330250650156b4.svn-base 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <queryMap desc="表面检验管理">
  3. <update id="QCM030510_UpdateSurfaceFlaw" desc ="修改、取消修复缺陷">
  4. update QCM_JUDGE_SURFACE_FLAW t
  5. set t.IS_REPAIR = :3
  6. where t.SURFACE_ID = :1
  7. and t.FLAW_SEQ = :2
  8. </update>
  9. <select id="QCM030510_findNameByMN" desc="质量判定-根据产品序号获得缺陷信息">
  10. select
  11. case when IS_REPAIR = '0' then '待修复' else '已修复' end IS_REPAIR,
  12. case when PRIMARY_FLAG = '0' then '否' else '是' end PRIMARY_FLAG,
  13. t.SURFACE_ID,
  14. t.FLAW_SEQ,
  15. t.FLAW_DESC,
  16. FLAW_TYPE_DESC,
  17. case when FLAW_AREA = 'U' THEN '上表面' FLAW_AREA = 'D' THEN '下表面' else '边部' end FLAW_AREA,
  18. t.FLAW_POS_DESC,
  19. t.FLAW_DIR_DESC,
  20. t.FLAW_SIZE_DESC,
  21. FLAW_LV_DESC
  22. FLAW_QUANTITY,
  23. memo,
  24. CREATE_NAME
  25. from QCM_JUDGE_SURFACE_FLAW t
  26. where t.PRIMARY_FLAG='1'
  27. and
  28. t.SURFACE_ID in (
  29. select max(t2.SURFACE_ID) from QCM_JUDGE_SURFACE t2
  30. where t2.MATERIAL_NO=#{param1}
  31. )
  32. </select>
  33. <insert id="InsertSurface" desc="插入表面检验实绩表">
  34. insert into QCM_JUDGE_SURFACE
  35. (surface_id,
  36. heat_no,
  37. batch_no,
  38. board_no,
  39. inspection_lot,
  40. material_no,
  41. sf_result_code,
  42. sf_result_desc,
  43. level_code,
  44. level_desc,
  45. sf_memo,
  46. sf_type,
  47. roughness_val1,
  48. roughness_val2,
  49. roughness_val3,
  50. cop_section_code,
  51. cop_section_desc,
  52. respon_section_code,
  53. respon_section_name,
  54. reason_code,
  55. reason_desc,
  56. sfu_is_lock,
  57. sfd_is_lock,
  58. sfe_is_lock,
  59. design_key,
  60. order_no,
  61. psc,
  62. psc_desc,
  63. pline_code,
  64. pline_name,
  65. wrk_ord,
  66. wrk_grp,
  67. judge_name,
  68. judge_time)
  69. values
  70. (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,sysdate)
  71. </insert>
  72. <insert id= "InsertSurfaceFLaw" desc="插入表面缺陷实绩表">
  73. insert into QCM_JUDGE_SURFACE_FLAW
  74. (SURFACE_ID,
  75. PRIMARY_FLAG,
  76. IS_REPAIR,
  77. FLAW_SEQ,
  78. FLAW_CODE,
  79. FLAW_DESC,
  80. FLAW_AREA,
  81. FLAW_TYPE_CODE,
  82. FLAW_TYPE_DESC,
  83. FLAW_POS_CODE,
  84. FLAW_POS_DESC,
  85. FLAW_DIR_CODE,
  86. FLAW_DIR_DESC,
  87. FLAW_SIZE_CODE,
  88. FLAW_SIZE_DESC,
  89. FLAW_LV_CODE,
  90. FLAW_LV_DESC,
  91. FLAW_QUANTITY,
  92. MEMO,
  93. CREATE_NAME,
  94. CREATE_TIME)
  95. values
  96. (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,sysdate)
  97. </insert>
  98. <insert id="QCM030510_insertlock" desc="插入封锁表">
  99. insert into QCM_JUDGE_LOCKING
  100. (material_no,
  101. lock_seq,
  102. lock_type_code,
  103. lock_type_desc,
  104. lock_memo,
  105. unlock_type_code,
  106. unlock_type_desc,
  107. unlock_memo,
  108. target_design_key,
  109. target_psc,
  110. heat_no,
  111. batch_no,
  112. board_no,
  113. plan_no,
  114. ht_no,
  115. design_key,
  116. psc,
  117. pline_code,
  118. pline_name,
  119. cic_locking,
  120. fic_locking,
  121. sic_locking,
  122. pic_locking,
  123. dic_locking)
  124. values
  125. (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
  126. </insert>
  127. <select id= "QuerySurfaceFlaw" desc="查询缺陷信息">
  128. select a.surface_id,
  129. a.primary_flag,
  130. a.is_repair,
  131. a.flaw_seq,
  132. a.flaw_code,
  133. a.flaw_desc,
  134. a.flaw_area,
  135. a.flaw_type_code,
  136. a.flaw_type_desc,
  137. a.flaw_pos_code,
  138. a.flaw_pos_desc,
  139. a.flaw_dir_code,
  140. a.flaw_dir_desc,
  141. a.flaw_size_code,
  142. a.flaw_size_desc,
  143. a.flaw_lv_code,
  144. a.flaw_lv_desc,
  145. a.flaw_weight,
  146. a.flaw_quantity,
  147. a.memo,
  148. a.create_name,
  149. a.create_time,
  150. a.update_name,
  151. a.update_time from QCM_JUDGE_SURFACE_FLAW a
  152. where surface_id = #{param1}
  153. </select>
  154. </queryMap>