QueryBaseInfo.xml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367
  1. <?xml version="1.0" encoding='UTF-8'?>
  2. <queryMap desc="配置管理">
  3. <query id="frmSysdate.select" desc="获取服务器系统时间" fetchSize="10">
  4. <![CDATA[
  5. select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') vdate from dual
  6. ]]>
  7. </query>
  8. <query id="frmBaseInfo.select" desc="基础信息" fetchSize="10">
  9. <![CDATA[
  10. select t.basecode, t.sortcode pid, t.basename
  11. from COM_BASE_INFO t
  12. where t.flag = '1'
  13. and length(t.basecode) > 1
  14. $
  15. order by t.basecode
  16. ]]>
  17. </query>
  18. <query id="frmBaseInfo_Parent.select" desc=" 获取父节点信息" fetchSize="10">
  19. <![CDATA[
  20. SELECT BASECODE,
  21. BASENAME,
  22. SORTCODE,
  23. ISVISIBLE,
  24. MNEMONIC_CODE,
  25. SEQ,
  26. FLAG,
  27. CREATE_NAME,
  28. CREATE_TIME,
  29. UPDATE_NAME,
  30. UPDATE_TIME,
  31. DELETE_NAME,
  32. DELETE_TIME,
  33. VALIDFLAG,
  34. MEMO,
  35. COEFFICIENT
  36. FROM COM_BASE_INFO
  37. WHERE BASECODE = ?
  38. AND VALIDFLAG = '1'
  39. ]]>
  40. </query>
  41. <query id="frmBaseInfo_Children.select" desc=" 获取对应结点的子节点信息" fetchSize="10">
  42. <![CDATA[
  43. SELECT BASECODE,
  44. BASENAME,
  45. SORTCODE,
  46. ISVISIBLE,
  47. MNEMONIC_CODE,
  48. SEQ,
  49. FLAG,
  50. CREATE_NAME,
  51. CREATE_TIME,
  52. UPDATE_NAME,
  53. UPDATE_TIME,
  54. DELETE_NAME,
  55. DELETE_TIME,
  56. VALIDFLAG,
  57. MEMO,
  58. COEFFICIENT
  59. FROM COM_BASE_INFO
  60. WHERE SORTCODE = ?
  61. AND VALIDFLAG = '1'
  62. ]]>
  63. </query>
  64. <query id="frmJJBBase_Query.select" desc="交接班配置管理" fetchSize="10">
  65. <![CDATA[
  66. select a.itemcode,
  67. decode(a.itemtype, '0', '设备运行', '1', '耗材消耗') itemtype,
  68. a.itemname,
  69. a.stationcode,
  70. b.description
  71. from com_item_maintenance a, com_process_info b
  72. where a.stationcode = b.processname(+) $
  73. order by a.itemcode
  74. ]]>
  75. </query>
  76. <query id="frmJJBMgt.Query" desc="交接班配置类型查询" fetchSize="10">
  77. <![CDATA[
  78. select a.itemcode,
  79. decode(a.itemtype, '0', '设备运行', '1', '耗材消耗') itemtype,
  80. a.itemname,
  81. a.stationcode
  82. from com_item_maintenance a
  83. where a.itemtype = ?
  84. and a.stationcode = ?
  85. order by a.itemcode
  86. ]]>
  87. </query>
  88. <query id="frmGetJJBInfo.Query" desc="交接班信息查询" fetchSize="10">
  89. <![CDATA[
  90. select t.numid,
  91. t.stationcode,
  92. t.shiftcode,
  93. t.esdate,
  94. t.esname,
  95. t.affirmflag,
  96. t.esmemo,
  97. t.mastername,
  98. t.abnormityflag,
  99. t1.itemcode,
  100. t1.itemdatatype,
  101. t1.itemvalue,
  102. t2.itemtype,
  103. t2.itemname
  104. from stl_es_maininfo t, stl_es_detailinfo t1, com_Item_Maintenance t2
  105. where t1.itemcode = t2.itemcode
  106. and t.numid = t1.numid
  107. and t.stationcode = ?
  108. and to_char(t.esdate, 'yyyy-MM-dd') = ?
  109. and t.shiftcode = ?
  110. ]]>
  111. </query>
  112. <query id="frmJJBDetailInfo.select" desc="判断交接班项目信息是否存在" fetchSize="10">
  113. <![CDATA[
  114. select count(1)
  115. from STL_ES_DETAILINFO t
  116. where t.numid = ?
  117. and t.itemcode = ?
  118. and t.itemdatatype=?
  119. ]]>
  120. </query>
  121. <query id="frmJJBJudgeESState.select" desc="判断是否交接班" fetchSize="10">
  122. <![CDATA[
  123. select t.NUMID,t.AFFIRMFLAG
  124. from STL_ES_MAININFO t
  125. where t.stationcode = ?
  126. and t.shiftcode = ?
  127. and to_char(t.esdate, 'yyyy-MM-dd') = ?
  128. ]]>
  129. </query>
  130. <query id="frmJJBBase.select" desc="交接班配置管理-查询" fetchSize="10">
  131. <![CDATA[
  132. SELECT * FROM com_ITEM_MAINTENANCE T WHERE T.ITEMCODE=?
  133. ]]>
  134. </query>
  135. <query id="frmJJBBase_Add.select" desc="交接班配置管理-添加" fetchSize="10">
  136. <![CDATA[
  137. INSERT INTO com_item_maintenance
  138. (itemcode, itemtype, itemname, stationcode)
  139. VALUES
  140. (?,?,?,?)
  141. ]]>
  142. </query>
  143. <query id="frmJJBBase_Update.select" desc="交接班配置管理-修改" fetchSize="10">
  144. <![CDATA[
  145. UPDATE com_item_maintenance
  146. SET itemname = ?,
  147. itemtype = ?,
  148. stationcode = ?
  149. WHERE itemcode = ?
  150. ]]>
  151. </query>
  152. <query id="frmJJBBase_Del.select" desc="交接班配置管理-删除" fetchSize="10">
  153. <![CDATA[
  154. DELETE com_item_maintenance WHERE itemcode = ?
  155. ]]>
  156. </query>
  157. <query id="frmJJBDetailInfo.add" desc="新增交接班从表数据" fetchSize="10">
  158. <![CDATA[
  159. RES_LG_LFSMANAGE.savejjbdetail
  160. ]]>
  161. </query>
  162. <query id="frmStoresProject.select" desc="物料项目配置" fetchSize="10">
  163. <![CDATA[
  164. select MaterielCode,
  165. MaterielType,
  166. MaterielName,
  167. MaterielforShort,
  168. MaterielUnits,
  169. JmType
  170. from COM_MATERIEL t where MATERIELTYPE LIKE ? || '%'
  171. ]]>
  172. </query>
  173. <query id="frmStoresProject_Save.select" desc="物料项目配置-保存" fetchSize="10">
  174. <![CDATA[
  175. INSERT INTO COM_MATERIEL
  176. (MaterielCode, MaterielType, MaterielName, MaterielforShort,MaterielUnits,JmType)
  177. VALUES
  178. (?,?,?,?,?,?)
  179. ]]>
  180. </query>
  181. <query id="frmStoresProject_Update.select" desc="物料项目配置-修改" fetchSize="10">
  182. <![CDATA[
  183. UPDATE COM_MATERIEL
  184. SET MaterielType = ?,
  185. MaterielforShort = ?
  186. WHERE MaterielCode = ?
  187. ]]>
  188. </query>
  189. <query id="frmStoresProject_Del.select" desc="物料项目配置-删除" fetchSize="10">
  190. <![CDATA[
  191. DELETE COM_MATERIEL WHERE MaterielCode = ?
  192. ]]>
  193. </query>
  194. <query id="frmStationconMateriel.select" desc="岗位与物料配置-物料" fetchSize="10">
  195. <![CDATA[
  196. select craftposid,
  197. materielcode,
  198. materieltype,
  199. materielname,
  200. memo
  201. from COM_STATIONCONMATERIEL where CRAFTPOSID LIKE ? ||'%' and MATERIELTYPE LIKE ? ||'%'
  202. ]]>
  203. </query>
  204. <query id="frmSMateriel_AddPInfo.select" desc="岗位与物料配置-新增岗位" fetchSize="10">
  205. <![CDATA[
  206. INSERT INTO COM_STATIONCONMATERIEL( CRAFTPOSID,MATERIELCODE,MATERIELTYPE,MATERIELNAME,MATERIELFORSHORT) VALUES (?,?,?,?,?)
  207. ]]>
  208. </query>
  209. <query id="frmSMateriel_DelPInfo.select" desc="岗位与物料配置-删除岗位" fetchSize="10">
  210. <![CDATA[
  211. DELETE COM_STATIONCONMATERIEL WHERE craftposid = ? and materielcode= ?
  212. ]]>
  213. </query>
  214. <query id="frmAdditStat_Load.select" desc="物料消耗加载" fetchSize="10">
  215. <![CDATA[
  216. select distinct (a.materielcode) materielcode,
  217. a.MATERIELTYPE,
  218. b.materielforshort
  219. from STL_additives a, COM_MATERIEL b
  220. where a.materielcode = b.materielcode
  221. and b.MATERIELTYPE= ? and to_char(a.updatetime, 'yyyy-MM-dd')
  222. between ? and ?
  223. ]]>
  224. </query>
  225. <query id="frmAdditStat_Query.select" desc="物料消耗查询" fetchSize="10">
  226. <![CDATA[
  227. select v.heatprocessno,
  228. v.heatno,
  229. v.PLANSTEEL STEEL,
  230. v.STATIONCODE,
  231. substr(v.stationcode,3,1) ||'#'|| decode(substr(v.STATIONCODE, 1, 1),
  232. 'C','转炉',decode(substr(v.STATIONCODE, 1, 1),
  233. 'D','吹氩站',decode(substr(v.STATIONCODE, 1, 1),
  234. 'E','精炼炉',decode(substr(v.STATIONCODE, 1, 1),
  235. 'F','RH炉', decode(substr(v.STATIONCODE, 1, 1),'B','脱硫',''))))) wsid,
  236. v.SHIFTCODE,
  237. v.MATERIELCODE,
  238. d.materielname,
  239. v.MATERIELTYPE,
  240. round(v.JMWGT,2) JMWGT,
  241. v.optdate $
  242. from (select distinct a.heatprocessno,
  243. a.heatno,
  244. a.optdate,
  245. a.PLANSTEEL,
  246. b.STATIONCODE,
  247. a.wsid,
  248. a.SHIFTCODE,
  249. b.MATERIELCODE,
  250. b.MATERIELTYPE,
  251. round(sum(nvl(b.JMWGT,0)) over (partition by b.HEATNO, b.STATIONCODE, b.DISPOSALTIME, b.MATERIELTYPE, b.MATERIELCODE),2) JMWGT $
  252. from (select * from $ union select * from J#$ ) a, stl_additives b $ $)v
  253. left join (select * from COM_MATERIEL) d on d.materielcode = v.materielcode order by v.heatprocessno desc
  254. ]]>
  255. </query>
  256. <query id="frmLTemp_Del.select" desc="液相线温度标准-删除" fetchSize="10">
  257. <![CDATA[
  258. DELETE com_LIQUIDUS_TEMP WHERE ID_ = ?
  259. ]]>
  260. </query>
  261. <query id="frmLTemp_Save.select" desc="液相线温度标准-保存" fetchSize="10">
  262. <![CDATA[
  263. INSERT INTO com_LIQUIDUS_TEMP
  264. (ID_, STEELNAME, LIQUIDUSTEMP)
  265. VALUES
  266. (?,?,?)
  267. ]]>
  268. </query>
  269. <query id="frmLTemp_Update.select" desc="液相线温度标准-修改" fetchSize="10">
  270. <![CDATA[
  271. UPDATE com_LIQUIDUS_TEMP
  272. SET LIQUIDUSTEMP = ?
  273. WHERE ID_ = ?
  274. ]]>
  275. </query>
  276. <query id="frmLTemp.select" desc="液相线温度标准查询" fetchSize="10">
  277. <![CDATA[
  278. select ID_,
  279. STEELNAME,
  280. LIQUIDUSTEMP
  281. from com_LIQUIDUS_TEMP t where t.steelname=
  282. decode(?, null, steelname, ?) $ order by ID_
  283. ]]>
  284. </query>
  285. <query id="LTemp_MaxID.select" desc="获取液相线温度最大ID值" fetchSize="10">
  286. <![CDATA[
  287. select max(ID_) from com_LIQUIDUS_TEMP t
  288. ]]>
  289. </query>
  290. </queryMap>