FrmPipePayIn.xml 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <queryMap desc="下线库钢管入库管理">
  3. <query id="FrmPipePayIn.queryStorage" desc="查询库存实绩">
  4. <![CDATA[
  5. select
  6. max(t.mat_no) as mat_no,
  7. T.judge_stove_no,
  8. T.batch_no,
  9. --T.batch_groud_no,
  10. max(t.MATERIAL_NAME) as MATERIAL_NAME,
  11. max(t.PRODUCNAME) as PRODUCNAME,
  12. max(t.STEELNAME) as STEELNAME,
  13. max(t.GRADENAME) as GRADENAME,
  14. max(t.SPEC_NAME) as SPEC_NAME,
  15. max(t.MODEL_DESC) as MODEL_DESC,
  16. max(t.STD_NAME) as STD_NAME,
  17. max(t.STD_STYLE_DESC) as STD_STYLE_DESC,
  18. max(t.PRO_ORDER_NO) as PRO_ORDER_NO,
  19. t.PLINE_CODE,
  20. max(t.PLINE_NAME) as PLINE_NAME,
  21. max(t.CREATE_NAME) as CREATE_NAME,
  22. max(t.CREATE_TIME) as CREATE_TIME,
  23. max(T.act_dimater) as act_dimater,
  24. max(T.act_height) as act_height,
  25. max(T.act_len_min) as act_len_min,
  26. max(T.act_len_max) as act_len_max,
  27. NVL(sum(T.act_count),0) as act_count,
  28. NVL(sum(t.ACT_WEIGHT),0) as ACT_WEIGHT,
  29. NVL(sum(t.ACT_THEORY_WEIGHT),0) as ACT_THEORY_WEIGHT
  30. from mat_zc_m T
  31. WHERE 1=1 and t.INSTOCK_FLAG='0'
  32. ]]>
  33. </query>
  34. <query id="FrmPipePayIn.queryStow" desc="查询当前料位信息">
  35. <![CDATA[
  36. SELECT max(t.storage_no) as storage_no, t.LOCATION_NO,sum(a.ACT_COUNT) as ACT_COUNT
  37. FROM ydm_zc_buttress t
  38. ,MAT_ZC_M a
  39. where
  40. t.mat_no=a.mat_no
  41. and t.storage_no=?
  42. and t.JUDGE_STOVE_NO=?
  43. and t.BATCH_NO=?
  44. and t.BATCH_GROUD_NO=?
  45. and t.location_no like '%'||?||'%'
  46. group by t.LOCATION_NO
  47. order by t.LOCATION_NO asc
  48. ]]>
  49. </query>
  50. <query id="FrmPipePayIn.queryLibrary" desc="查询材料表主键信息">
  51. <![CDATA[
  52. SELECT mat_no FROM MAT_ZC_M
  53. where JUDGE_STOVE_NO=?
  54. and BATCH_NO=?
  55. --and BATCH_GROUD_NO=?
  56. and PLINE_CODE=?
  57. and rownum<?
  58. order by mat_no asc
  59. ]]>
  60. </query>
  61. <query id="FrmPipePayIn.queryTager" desc="查询目标料位对应的层号,位置信息">
  62. <![CDATA[
  63. SELECT
  64. T.ROW_NO,T.COL_NO,B.STORAGE_ATTR,B.STORAGE_ATTR_NAME,B.STORAGE_TYPE_NO,
  65. B.STORAGE_TYPE_NAME,B.MANAGEMENT_NO,
  66. B.MANAGEMENT_NAME FROM YDM_BS_LOCATION T
  67. LEFT JOIN YDM_BS_STORAGE B ON
  68. T.STORAGE_NO=B.STORAGE_NO AND T.VALIDFLAG=B.VALIDFLAG
  69. WHERE B.STORAGE_NO=?
  70. AND T.LOCATION_NO=?
  71. AND T.VALIDFLAG='1'
  72. ]]>
  73. </query>
  74. <query id="FrmPipePayIn.QueryAdd" desc="查询要新增库的信息">
  75. <![CDATA[
  76. select T.MAT_NO,
  77. t.lot_no,
  78. t.stove_no,
  79. t.judge_stove_no,
  80. t.batch_no,
  81. t.batch_groud_no,
  82. t.material_no,
  83. t.material_name,
  84. t.produccode,
  85. t.producname,
  86. t.steelcode,
  87. t.steelname,
  88. t.gradecode,
  89. t.gradename,
  90. t.spec_code,
  91. t.spec_name,
  92. t.model_code,
  93. t.model_desc,
  94. t.std_code,
  95. t.std_name,
  96. t.std_style,
  97. t.std_style_desc,
  98. t.pro_order_no,
  99. t.pline_code,
  100. t.pline_name,
  101. t.act_dimater,
  102. t.act_height,
  103. t.act_len,
  104. t.act_len_min,
  105. t.act_len_max,
  106. t.act_count,
  107. t.act_weight,
  108. t.act_theory_weight,
  109. t.belong_code,
  110. t.belong_name,
  111. t.pro_bc,
  112. t.pro_bz,
  113. t.rpo_time
  114. from mat_zc_m t
  115. where t.mat_no=?
  116. ]]>
  117. </query>
  118. <query id="FrmPipePayIn.AddSInList" desc="新增入库信息">
  119. <![CDATA[
  120. insert into ydm_zc_inlist (
  121. instock_sqe, instock_doc, instock_type_code,
  122. instock_type_name, mat_no, lot_no, stove_no, judge_stove_no, batch_no,
  123. batch_groud_no, material_no, material_name, produccode, producname, std_code,
  124. std_name, gradecode, gradename, steelcode, steelname, std_style, std_style_desc,
  125. spec_code, spec_name, model_code, model_desc, pro_order_no, pline_code,
  126. pline_name, act_dimater, act_height, act_len, act_len_min, act_len_max,
  127. act_count, act_weight, act_theory_weight, belong_code, belong_name, storage_no,
  128. location_no, lary_no, loc_no, storage_attr, storage_attr_name, storage_type_no,
  129. storage_type_name, management_no, management_name, rpo_time, pro_bc, pro_bz,
  130. in_bc, in_bz, create_name, create_time, instock_time
  131. )
  132. values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
  133. ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
  134. ?, to_date(?,'YYYY/MM/DD HH24:MI:SS'), ?, ?, ?, ?, ?, SYSDATE, SYSDATE )
  135. ]]>
  136. </query>
  137. <query id="FrmPipePayIn.AddButtList" desc="新增库存信息">
  138. <![CDATA[
  139. insert into ydm_zc_buttress (
  140. mat_no, judge_stove_no, batch_no, batch_groud_no, storage_no,
  141. location_no, lary_no, loc_no, storage_attr, storage_attr_name,
  142. storage_type_no, storage_type_name, management_no, management_name,
  143. create_name, create_time )
  144. values
  145. (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, SYSDATE)
  146. ]]>
  147. </query>
  148. <query id="FrmPipePayIn.querySqeList" desc="查询入库流水号">
  149. <![CDATA[
  150. select t.INSTOCK_SQE from ydm_zc_INLIST t where t.MAT_NO=? order by t.INSTOCK_SQE desc
  151. ]]>
  152. </query>
  153. <query id="FrmPipePayIn.queryInList" desc="查询入库信息">
  154. <![CDATA[
  155. select
  156. t.judge_stove_no,
  157. t.batch_no,
  158. t.batch_groud_no,
  159. max(t.INSTOCK_TYPE_CODE) as INSTOCK_TYPE_CODE,
  160. max(t.INSTOCK_TYPE_NAME) as INSTOCK_TYPE_NAME,
  161. max(t.material_name) as material_name,
  162. max(t.producname) as producname,
  163. max(t.std_name) as std_name,
  164. max(t.gradename) as gradename,
  165. max(t.steelname) as steelname,
  166. max(t.std_style_desc) as std_style_desc,
  167. max(t.spec_name) as spec_name,
  168. max(t.model_desc) as model_desc,
  169. max(t.pro_order_no) as pro_order_no,
  170. max(t.pline_name) as pline_name,
  171. max(t.act_dimater) as act_dimater,
  172. max(t.act_height) as act_height,
  173. max(t.act_len_min) as act_len_min,
  174. max(t.act_len_max) as act_len_max,
  175. max(t.belong_name) as belong_name,
  176. t.storage_no ,
  177. t.location_no,
  178. max(c.storage_name) as storage_name,
  179. max(t.storage_attr_name) as storage_attr_name,
  180. max(t.storage_type_name) as storage_type_name,
  181. max(t.management_name) as management_name,
  182. max(t.rpo_time) as rpo_time,
  183. max(t.create_name) as create_name,
  184. max(t.create_time) as create_time,
  185. NVL(sum(t.act_len),0) as act_len,
  186. NVL(sum(t.act_count),0) as act_count,
  187. NVL(sum(t.act_weight),0) as act_weight,
  188. NVL(sum(t.act_theory_weight),0) as act_theory_weight
  189. from ydm_zc_inlist t
  190. LEFT JOIN YDM_BS_STORAGE C ON C.STORAGE_NO=t.STORAGE_NO
  191. where t.judge_stove_no LIKE '%' || ? || '%'
  192. --AND t.batch_no LIKE '%' || ? || '%'
  193. --AND t.batch_groud_no LIKE '%' || ? || '%'
  194. AND DECODE(?, NULL, '1', t.create_time) BETWEEN DECODE(?, NULL, '1', to_date(?, 'YYYY/MM/DD HH24:MI:SS'))
  195. AND DECODE(?, NULL, '1', to_date(?, 'YYYY/MM/DD HH24:MI:SS'))
  196. --AND DECODE(?, NULL, '1', t.rpo_time) BETWEEN DECODE(?, NULL, '1', to_date(?, 'YYYY/MM/DD HH24:MI:SS'))
  197. --AND DECODE(?, NULL, '1', to_date(?, 'YYYY/MM/DD HH24:MI:SS'))
  198. AND T.CREATE_NAME=?
  199. AND t.STORAGE_NO LIKE '%' || ? || '%'
  200. AND t.LOCATION_NO LIKE '%' || ? || '%'
  201. AND T.INSTOCK_TYPE_CODE=?
  202. AND T.VALIDFLAG='1'
  203. group by t.judge_stove_no,
  204. t.batch_no,
  205. t.batch_groud_no,
  206. t.storage_no,
  207. t.location_no
  208. order by t.judge_stove_no desc
  209. ]]>
  210. </query>
  211. <query id="FrmPipePayIn.queryInMat" desc="查询入库材料编码信息">
  212. <![CDATA[
  213. select INSTOCK_SQE,MAT_NO from ydm_zc_inlist
  214. where JUDGE_STOVE_NO=?
  215. and BATCH_NO=?
  216. and BATCH_GROUD_NO=?
  217. and instock_type_code=?
  218. and rownum <?
  219. and VALIDFLAG='1'
  220. order by mat_no asc
  221. ]]>
  222. </query>
  223. </queryMap>