TRmCalpointMapper.xml 63 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.steerinfo.ems.trmcalpoint.mapper.TRmCalpointMapper">
  4. <resultMap id="BaseResultMap" type="com.steerinfo.ems.trmcalpoint.model.TRmCalpoint">
  5. <id column="ITEMID" jdbcType="VARCHAR" property="itemid" />
  6. <result column="ITEMNAME" jdbcType="VARCHAR" property="itemname" />
  7. <result column="ITEMDESC" jdbcType="VARCHAR" property="itemdesc" />
  8. <result column="LOCATEID" jdbcType="VARCHAR" property="locateid" />
  9. <result column="NETWORKID" jdbcType="VARCHAR" property="networkid" />
  10. <result column="ENERGYID" jdbcType="VARCHAR" property="energyid" />
  11. <result column="ENERGYTYPEID" jdbcType="VARCHAR" property="energytypeid" />
  12. <result column="UNITID" jdbcType="VARCHAR" property="unitid" />
  13. <result column="COSTID" jdbcType="VARCHAR" property="costid" />
  14. <result column="ITEMTYPE" jdbcType="VARCHAR" property="itemtype" />
  15. <result column="PROPERTYID" jdbcType="VARCHAR" property="propertyid" />
  16. <result column="TAGID" jdbcType="VARCHAR" property="tagid" />
  17. <result column="TAGNAME" jdbcType="VARCHAR" property="tagname" />
  18. <result column="TAG_ALIAS" jdbcType="VARCHAR" property="tagAlias" />
  19. <result column="USEFLAG" jdbcType="VARCHAR" property="useflag" />
  20. <result column="DEFAULTVALUE" jdbcType="VARCHAR" property="defaultvalue" />
  21. <result column="DIGITS" jdbcType="DECIMAL" property="digits" />
  22. <result column="SEQNO" jdbcType="DECIMAL" property="seqno" />
  23. <result column="SHOWNO" jdbcType="DECIMAL" property="showno" />
  24. <result column="STATUS" jdbcType="VARCHAR" property="status" />
  25. <result column="NODE" jdbcType="VARCHAR" property="node" />
  26. <result column="PARENTID" jdbcType="VARCHAR" property="parentid" />
  27. <result column="BCODE" jdbcType="VARCHAR" property="bcode" />
  28. <result column="BDESC1" jdbcType="VARCHAR" property="bdesc1" />
  29. <result column="BDESC2" jdbcType="VARCHAR" property="bdesc2" />
  30. <result column="BTYPE1" jdbcType="VARCHAR" property="btype1" />
  31. <result column="BTYPE2" jdbcType="VARCHAR" property="btype2" />
  32. <result column="RANGE_VAL" jdbcType="DECIMAL" property="rangeVal" />
  33. <result column="TAG_ID_MAP" jdbcType="VARCHAR" property="tagIdMap" />
  34. <result column="CALC_MOD" jdbcType="VARCHAR" property="calcMod" />
  35. <result column="DATA_TYPE" jdbcType="VARCHAR" property="dataType" />
  36. <result column="TAG_TABLE" jdbcType="VARCHAR" property="tagTable" />
  37. <result column="MAX_VAL" jdbcType="VARCHAR" property="maxVal" />
  38. <result column="MIN_VAL" jdbcType="VARCHAR" property="minVal" />
  39. <result column="AVG_VAL" jdbcType="VARCHAR" property="avgVal" />
  40. <result column="SUM_VAL" jdbcType="VARCHAR" property="sumVal" />
  41. <result column="TAG_MODULUS" jdbcType="DECIMAL" property="tagModulus" />
  42. <result column="METER_TYPE" jdbcType="VARCHAR" property="meterType" />
  43. <result column="METER_SCALE" jdbcType="DECIMAL" property="meterScale" />
  44. <result column="METER_LOC" jdbcType="VARCHAR" property="meterLoc" />
  45. <result column="TAG_BAD_SYMBOL" jdbcType="VARCHAR" property="tagBadSymbol" />
  46. <result column="SOURCE_TYPE" jdbcType="VARCHAR" property="sourceType" />
  47. <result column="REC_TIME" jdbcType="VARCHAR" property="recTime" />
  48. <result column="ISSETTLE" jdbcType="VARCHAR" property="issettle" />
  49. <result column="ISSCHEDULE" jdbcType="VARCHAR" property="isschedule" />
  50. <result column="TAG_COL" jdbcType="VARCHAR" property="tagCol" />
  51. <result column="REC_MAN" jdbcType="VARCHAR" property="recMan" />
  52. <result column="UPDATEMAN" jdbcType="VARCHAR" property="updateman" />
  53. <result column="UPDATETIME" jdbcType="TIMESTAMP" property="updatetime" />
  54. <result column="MINTIMEGRANID" jdbcType="VARCHAR" property="mintimegranid" />
  55. </resultMap>
  56. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  57. delete from T_RM_CALPOINT
  58. where ITEMID = #{itemid,jdbcType=VARCHAR}
  59. </delete>
  60. <delete id="deleteBySelectiveElement" parameterType="java.util.HashMap">
  61. delete from T_RM_CALPOINT
  62. where 1=1
  63. <if test="itemname != null and itemname != ''">
  64. and ITEMNAME = #{itemname}
  65. </if>
  66. <if test="itemdesc != null and itemdesc != ''">
  67. and ITEMDESC = #{itemdesc}
  68. </if>
  69. <if test="locateid != null and locateid != ''">
  70. and LOCATEID = #{locateid}
  71. </if>
  72. <if test="networkid != null and networkid != ''">
  73. and NETWORKID = #{networkid}
  74. </if>
  75. <if test="energyid != null and energyid != ''">
  76. and ENERGYID = #{energyid}
  77. </if>
  78. <if test="energytypeid != null and energytypeid != ''">
  79. and ENERGYTYPEID = #{energytypeid}
  80. </if>
  81. <if test="unitid != null and unitid != ''">
  82. and UNITID = #{unitid}
  83. </if>
  84. <if test="costid != null and costid != ''">
  85. and COSTID = #{costid}
  86. </if>
  87. <if test="itemtype != null and itemtype != ''">
  88. and ITEMTYPE = #{itemtype}
  89. </if>
  90. <if test="propertyid != null and propertyid != ''">
  91. and PROPERTYID = #{propertyid}
  92. </if>
  93. <if test="tagid != null and tagid != ''">
  94. and TAGID = #{tagid}
  95. </if>
  96. <if test="tagname != null and tagname != ''">
  97. and TAGNAME = #{tagname}
  98. </if>
  99. <if test="tagAlias != null and tagAlias != ''">
  100. and TAG_ALIAS = #{tagAlias}
  101. </if>
  102. <if test="useflag != null and useflag != ''">
  103. and USEFLAG = #{useflag}
  104. </if>
  105. <if test="defaultvalue != null and defaultvalue != ''">
  106. and DEFAULTVALUE = #{defaultvalue}
  107. </if>
  108. <if test="digits != null">
  109. and DIGITS = #{digits}
  110. </if>
  111. <if test="seqno != null">
  112. and SEQNO = #{seqno}
  113. </if>
  114. <if test="showno != null">
  115. and SHOWNO = #{showno}
  116. </if>
  117. <if test="status != null and status != ''">
  118. and STATUS = #{status}
  119. </if>
  120. <if test="node != null and node != ''">
  121. and NODE = #{node}
  122. </if>
  123. <if test="parentid != null and parentid != ''">
  124. and PARENTID = #{parentid}
  125. </if>
  126. <if test="bcode != null and bcode != ''">
  127. and BCODE = #{bcode}
  128. </if>
  129. <if test="bdesc1 != null and bdesc1 != ''">
  130. and BDESC1 = #{bdesc1}
  131. </if>
  132. <if test="bdesc2 != null and bdesc2 != ''">
  133. and BDESC2 = #{bdesc2}
  134. </if>
  135. <if test="btype1 != null and btype1 != ''">
  136. and BTYPE1 = #{btype1}
  137. </if>
  138. <if test="btype2 != null and btype2 != ''">
  139. and BTYPE2 = #{btype2}
  140. </if>
  141. <if test="rangeVal != null">
  142. and RANGE_VAL = #{rangeVal}
  143. </if>
  144. <if test="tagIdMap != null and tagIdMap != ''">
  145. and TAG_ID_MAP = #{tagIdMap}
  146. </if>
  147. <if test="calcMod != null and calcMod != ''">
  148. and CALC_MOD = #{calcMod}
  149. </if>
  150. <if test="dataType != null and dataType != ''">
  151. and DATA_TYPE = #{dataType}
  152. </if>
  153. <if test="tagTable != null and tagTable != ''">
  154. and TAG_TABLE = #{tagTable}
  155. </if>
  156. <if test="maxVal != null and maxVal != ''">
  157. and MAX_VAL = #{maxVal}
  158. </if>
  159. <if test="minVal != null and minVal != ''">
  160. and MIN_VAL = #{minVal}
  161. </if>
  162. <if test="avgVal != null and avgVal != ''">
  163. and AVG_VAL = #{avgVal}
  164. </if>
  165. <if test="sumVal != null and sumVal != ''">
  166. and SUM_VAL = #{sumVal}
  167. </if>
  168. <if test="tagModulus != null">
  169. and TAG_MODULUS = #{tagModulus}
  170. </if>
  171. <if test="meterType != null and meterType != ''">
  172. and METER_TYPE = #{meterType}
  173. </if>
  174. <if test="meterScale != null">
  175. and METER_SCALE = #{meterScale}
  176. </if>
  177. <if test="meterLoc != null and meterLoc != ''">
  178. and METER_LOC = #{meterLoc}
  179. </if>
  180. <if test="tagBadSymbol != null and tagBadSymbol != ''">
  181. and TAG_BAD_SYMBOL = #{tagBadSymbol}
  182. </if>
  183. <if test="sourceType != null and sourceType != ''">
  184. and SOURCE_TYPE = #{sourceType}
  185. </if>
  186. <if test="recTime != null and recTime != ''">
  187. and REC_TIME = #{recTime}
  188. </if>
  189. <if test="issettle != null and issettle != ''">
  190. and ISSETTLE = #{issettle}
  191. </if>
  192. <if test="isschedule != null and isschedule != ''">
  193. and ISSCHEDULE = #{isschedule}
  194. </if>
  195. <if test="tagCol != null and tagCol != ''">
  196. and TAG_COL = #{tagCol}
  197. </if>
  198. <if test="mintimegranid != null and mintimegranid != ''">
  199. and MINTIMEGRANID = #{mintimegranid}
  200. </if>
  201. </delete>
  202. <insert id="insert" parameterType="com.steerinfo.ems.trmcalpoint.model.TRmCalpoint">
  203. insert into T_RM_CALPOINT (ITEMID, ITEMNAME, ITEMDESC,
  204. LOCATEID, NETWORKID, ENERGYID, ENERGYTYPEID, UNITID, COSTID,
  205. ITEMTYPE, PROPERTYID, TAGID, TAGNAME, TAG_ALIAS,
  206. USEFLAG, DEFAULTVALUE, DIGITS, SEQNO, SHOWNO, STATUS, NODE,
  207. PARENTID, BCODE, BDESC1, BDESC2, BTYPE1, BTYPE2,
  208. RANGE_VAL, TAG_ID_MAP, CALC_MOD, DATA_TYPE, TAG_TABLE, MAX_VAL,
  209. MIN_VAL, AVG_VAL, SUM_VAL,
  210. TAG_MODULUS, METER_TYPE, METER_SCALE,
  211. METER_LOC, TAG_BAD_SYMBOL, SOURCE_TYPE,
  212. REC_TIME, ISSETTLE, ISSCHEDULE,
  213. TAG_COL,MINTIMEGRANID)
  214. values (#{itemid,jdbcType=VARCHAR}, #{itemname,jdbcType=VARCHAR}, #{itemdesc,jdbcType=VARCHAR},
  215. #{locateid,jdbcType=VARCHAR}, #{networkid,jdbcType=VARCHAR}, #{energyid,jdbcType=VARCHAR},
  216. #{energytypeid,jdbcType=VARCHAR}, #{unitid,jdbcType=VARCHAR}, #{costid,jdbcType=VARCHAR},
  217. #{itemtype,jdbcType=VARCHAR}, #{propertyid,jdbcType=VARCHAR},
  218. #{tagid,jdbcType=VARCHAR}, #{tagname,jdbcType=VARCHAR}, #{tagAlias,jdbcType=VARCHAR},
  219. #{useflag,jdbcType=VARCHAR}, #{defaultvalue,jdbcType=VARCHAR}, #{digits,jdbcType=DECIMAL},
  220. #{seqno,jdbcType=DECIMAL}, #{showno,jdbcType=DECIMAL}, #{status,jdbcType=VARCHAR}, #{node,jdbcType=VARCHAR},
  221. #{parentid,jdbcType=VARCHAR}, #{bcode,jdbcType=VARCHAR}, #{bdesc1,jdbcType=VARCHAR},
  222. #{bdesc2,jdbcType=VARCHAR}, #{btype1,jdbcType=VARCHAR}, #{btype2,jdbcType=VARCHAR},
  223. #{rangeVal,jdbcType=DECIMAL}, #{tagIdMap,jdbcType=VARCHAR}, #{calcMod,jdbcType=VARCHAR},
  224. #{dataType,jdbcType=VARCHAR}, #{tagTable,jdbcType=VARCHAR}, #{maxVal,jdbcType=VARCHAR},
  225. #{minVal,jdbcType=VARCHAR}, #{avgVal,jdbcType=VARCHAR}, #{sumVal,jdbcType=VARCHAR},
  226. #{tagModulus,jdbcType=DECIMAL}, #{meterType,jdbcType=VARCHAR}, #{meterScale,jdbcType=DECIMAL},
  227. #{meterLoc,jdbcType=VARCHAR}, #{tagBadSymbol,jdbcType=VARCHAR}, #{sourceType,jdbcType=VARCHAR},
  228. #{recTime,jdbcType=VARCHAR}, #{issettle,jdbcType=VARCHAR}, #{isschedule,jdbcType=VARCHAR},
  229. #{tagCol,jdbcType=VARCHAR},#{mintimegranid,jdbcType=VARCHAR})
  230. </insert>
  231. <insert id="insertSelective" parameterType="com.steerinfo.ems.trmcalpoint.model.TRmCalpoint">
  232. insert into T_RM_CALPOINT
  233. <trim prefix="(" suffix=")" suffixOverrides=",">
  234. <if test="itemid != null">
  235. ITEMID,
  236. </if>
  237. <if test="itemname != null">
  238. ITEMNAME,
  239. </if>
  240. <if test="itemdesc != null">
  241. ITEMDESC,
  242. </if>
  243. <if test="locateid != null">
  244. LOCATEID,
  245. </if>
  246. <if test="networkid != null">
  247. NETWORKID,
  248. </if>
  249. <if test="energyid != null">
  250. ENERGYID,
  251. </if>
  252. <if test="energytypeid != null">
  253. ENERGYTYPEID,
  254. </if>
  255. <if test="unitid != null">
  256. UNITID,
  257. </if>
  258. <if test="costid != null">
  259. COSTID,
  260. </if>
  261. <if test="itemtype != null">
  262. ITEMTYPE,
  263. </if>
  264. <if test="propertyid != null">
  265. PROPERTYID,
  266. </if>
  267. <if test="tagid != null">
  268. TAGID,
  269. </if>
  270. <if test="tagname != null">
  271. TAGNAME,
  272. </if>
  273. <if test="tagAlias != null">
  274. TAG_ALIAS,
  275. </if>
  276. <if test="useflag != null">
  277. USEFLAG,
  278. </if>
  279. <if test="defaultvalue != null">
  280. DEFAULTVALUE,
  281. </if>
  282. <if test="digits != null">
  283. DIGITS,
  284. </if>
  285. <if test="seqno != null">
  286. SEQNO,
  287. </if>
  288. <if test="showno != null">
  289. SHOWNO,
  290. </if>
  291. <if test="status != null">
  292. STATUS,
  293. </if>
  294. <if test="node != null">
  295. NODE,
  296. </if>
  297. <if test="parentid != null">
  298. PARENTID,
  299. </if>
  300. <if test="bcode != null">
  301. BCODE,
  302. </if>
  303. <if test="bdesc1 != null">
  304. BDESC1,
  305. </if>
  306. <if test="bdesc2 != null">
  307. BDESC2,
  308. </if>
  309. <if test="btype1 != null">
  310. BTYPE1,
  311. </if>
  312. <if test="btype2 != null">
  313. BTYPE2,
  314. </if>
  315. <if test="rangeVal != null">
  316. RANGE_VAL,
  317. </if>
  318. <if test="tagIdMap != null">
  319. TAG_ID_MAP,
  320. </if>
  321. <if test="calcMod != null">
  322. CALC_MOD,
  323. </if>
  324. <if test="dataType != null">
  325. DATA_TYPE,
  326. </if>
  327. <if test="tagTable != null">
  328. TAG_TABLE,
  329. </if>
  330. <if test="maxVal != null">
  331. MAX_VAL,
  332. </if>
  333. <if test="minVal != null">
  334. MIN_VAL,
  335. </if>
  336. <if test="avgVal != null">
  337. AVG_VAL,
  338. </if>
  339. <if test="sumVal != null">
  340. SUM_VAL,
  341. </if>
  342. <if test="tagModulus != null">
  343. TAG_MODULUS,
  344. </if>
  345. <if test="meterType != null">
  346. METER_TYPE,
  347. </if>
  348. <if test="meterScale != null">
  349. METER_SCALE,
  350. </if>
  351. <if test="meterLoc != null">
  352. METER_LOC,
  353. </if>
  354. <if test="tagBadSymbol != null">
  355. TAG_BAD_SYMBOL,
  356. </if>
  357. <if test="sourceType != null">
  358. SOURCE_TYPE,
  359. </if>
  360. <if test="recTime != null">
  361. REC_TIME,
  362. </if>
  363. <if test="issettle != null">
  364. ISSETTLE,
  365. </if>
  366. <if test="isschedule != null">
  367. ISSCHEDULE,
  368. </if>
  369. <if test="tagCol != null">
  370. TAG_COL,
  371. </if>
  372. <if test="mintimegranid != null">
  373. MINTIMEGRANID,
  374. </if>
  375. </trim>
  376. <trim prefix="values (" suffix=")" suffixOverrides=",">
  377. <if test="itemid != null">
  378. #{itemid,jdbcType=VARCHAR},
  379. </if>
  380. <if test="itemname != null">
  381. #{itemname,jdbcType=VARCHAR},
  382. </if>
  383. <if test="itemdesc != null">
  384. #{itemdesc,jdbcType=VARCHAR},
  385. </if>
  386. <if test="locateid != null">
  387. #{locateid,jdbcType=VARCHAR},
  388. </if>
  389. <if test="networkid != null">
  390. #{networkid,jdbcType=VARCHAR},
  391. </if>
  392. <if test="energyid != null">
  393. #{energyid,jdbcType=VARCHAR},
  394. </if>
  395. <if test="energytypeid != null">
  396. #{energytypeid,jdbcType=VARCHAR},
  397. </if>
  398. <if test="unitid != null">
  399. #{unitid,jdbcType=VARCHAR},
  400. </if>
  401. <if test="costid != null">
  402. #{costid,jdbcType=VARCHAR},
  403. </if>
  404. <if test="itemtype != null">
  405. #{itemtype,jdbcType=VARCHAR},
  406. </if>
  407. <if test="propertyid != null">
  408. #{propertyid,jdbcType=VARCHAR},
  409. </if>
  410. <if test="tagid != null">
  411. #{tagid,jdbcType=VARCHAR},
  412. </if>
  413. <if test="tagname != null">
  414. #{tagname,jdbcType=VARCHAR},
  415. </if>
  416. <if test="tagAlias != null">
  417. #{tagAlias,jdbcType=VARCHAR},
  418. </if>
  419. <if test="useflag != null">
  420. #{useflag,jdbcType=VARCHAR},
  421. </if>
  422. <if test="defaultvalue != null">
  423. #{defaultvalue,jdbcType=VARCHAR},
  424. </if>
  425. <if test="digits != null">
  426. #{digits,jdbcType=DECIMAL},
  427. </if>
  428. <if test="seqno != null">
  429. #{seqno,jdbcType=DECIMAL},
  430. </if>
  431. <if test="showno != null">
  432. #{showno,jdbcType=DECIMAL},
  433. </if>
  434. <if test="status != null">
  435. #{status,jdbcType=VARCHAR},
  436. </if>
  437. <if test="node != null">
  438. #{node,jdbcType=VARCHAR},
  439. </if>
  440. <if test="parentid != null">
  441. #{parentid,jdbcType=VARCHAR},
  442. </if>
  443. <if test="bcode != null">
  444. #{bcode,jdbcType=VARCHAR},
  445. </if>
  446. <if test="bdesc1 != null">
  447. #{bdesc1,jdbcType=VARCHAR},
  448. </if>
  449. <if test="bdesc2 != null">
  450. #{bdesc2,jdbcType=VARCHAR},
  451. </if>
  452. <if test="btype1 != null">
  453. #{btype1,jdbcType=VARCHAR},
  454. </if>
  455. <if test="btype2 != null">
  456. #{btype2,jdbcType=VARCHAR},
  457. </if>
  458. <if test="rangeVal != null">
  459. #{rangeVal,jdbcType=DECIMAL},
  460. </if>
  461. <if test="tagIdMap != null">
  462. #{tagIdMap,jdbcType=VARCHAR},
  463. </if>
  464. <if test="calcMod != null">
  465. #{calcMod,jdbcType=VARCHAR},
  466. </if>
  467. <if test="dataType != null">
  468. #{dataType,jdbcType=VARCHAR},
  469. </if>
  470. <if test="tagTable != null">
  471. #{tagTable,jdbcType=VARCHAR},
  472. </if>
  473. <if test="maxVal != null">
  474. #{maxVal,jdbcType=VARCHAR},
  475. </if>
  476. <if test="minVal != null">
  477. #{minVal,jdbcType=VARCHAR},
  478. </if>
  479. <if test="avgVal != null">
  480. #{avgVal,jdbcType=VARCHAR},
  481. </if>
  482. <if test="sumVal != null">
  483. #{sumVal,jdbcType=VARCHAR},
  484. </if>
  485. <if test="tagModulus != null">
  486. #{tagModulus,jdbcType=DECIMAL},
  487. </if>
  488. <if test="meterType != null">
  489. #{meterType,jdbcType=VARCHAR},
  490. </if>
  491. <if test="meterScale != null">
  492. #{meterScale,jdbcType=DECIMAL},
  493. </if>
  494. <if test="meterLoc != null">
  495. #{meterLoc,jdbcType=VARCHAR},
  496. </if>
  497. <if test="tagBadSymbol != null">
  498. #{tagBadSymbol,jdbcType=VARCHAR},
  499. </if>
  500. <if test="sourceType != null">
  501. #{sourceType,jdbcType=VARCHAR},
  502. </if>
  503. <if test="recTime != null">
  504. #{recTime,jdbcType=VARCHAR},
  505. </if>
  506. <if test="issettle != null">
  507. #{issettle,jdbcType=VARCHAR},
  508. </if>
  509. <if test="isschedule != null">
  510. #{isschedule,jdbcType=VARCHAR},
  511. </if>
  512. <if test="tagCol != null">
  513. #{tagCol,jdbcType=VARCHAR},
  514. </if>
  515. <if test="mintimegranid != null">
  516. #{mintimegranid,jdbcType=VARCHAR},
  517. </if>
  518. </trim>
  519. </insert>
  520. <update id="updateByPrimaryKey" parameterType="com.steerinfo.ems.trmcalpoint.model.TRmCalpoint">
  521. update T_RM_CALPOINT
  522. set ITEMNAME = #{itemname,jdbcType=VARCHAR},
  523. ITEMDESC = #{itemdesc,jdbcType=VARCHAR},
  524. LOCATEID = #{locateid,jdbcType=VARCHAR},
  525. NETWORKID = #{networkid,jdbcType=VARCHAR},
  526. ENERGYID = #{energyid,jdbcType=VARCHAR},
  527. ENERGYTYPEID = #{energytypeid,jdbcType=VARCHAR},
  528. UNITID = #{unitid,jdbcType=VARCHAR},
  529. COSTID = #{costid,jdbcType=VARCHAR},
  530. ITEMTYPE = #{itemtype,jdbcType=VARCHAR},
  531. PROPERTYID = #{propertyid,jdbcType=VARCHAR},
  532. TAGID = #{tagid,jdbcType=VARCHAR},
  533. TAGNAME = #{tagname,jdbcType=VARCHAR},
  534. TAG_ALIAS = #{tagAlias,jdbcType=VARCHAR},
  535. USEFLAG = #{useflag,jdbcType=VARCHAR},
  536. DEFAULTVALUE = #{defaultvalue,jdbcType=VARCHAR},
  537. DIGITS = #{digits,jdbcType=DECIMAL},
  538. SEQNO = #{seqno,jdbcType=DECIMAL},
  539. SHOWNO = #{showno,jdbcType=DECIMAL},
  540. STATUS = #{status,jdbcType=VARCHAR},
  541. NODE = #{node,jdbcType=VARCHAR},
  542. PARENTID = #{parentid,jdbcType=VARCHAR},
  543. BCODE = #{bcode,jdbcType=VARCHAR},
  544. BDESC1 = #{bdesc1,jdbcType=VARCHAR},
  545. BDESC2 = #{bdesc2,jdbcType=VARCHAR},
  546. BTYPE1 = #{btype1,jdbcType=VARCHAR},
  547. BTYPE2 = #{btype2,jdbcType=VARCHAR},
  548. RANGE_VAL = #{rangeVal,jdbcType=DECIMAL},
  549. TAG_ID_MAP = #{tagIdMap,jdbcType=VARCHAR},
  550. CALC_MOD = #{calcMod,jdbcType=VARCHAR},
  551. DATA_TYPE = #{dataType,jdbcType=VARCHAR},
  552. TAG_TABLE = #{tagTable,jdbcType=VARCHAR},
  553. MAX_VAL = #{maxVal,jdbcType=VARCHAR},
  554. MIN_VAL = #{minVal,jdbcType=VARCHAR},
  555. AVG_VAL = #{avgVal,jdbcType=VARCHAR},
  556. SUM_VAL = #{sumVal,jdbcType=VARCHAR},
  557. TAG_MODULUS = #{tagModulus,jdbcType=DECIMAL},
  558. METER_TYPE = #{meterType,jdbcType=VARCHAR},
  559. METER_SCALE = #{meterScale,jdbcType=DECIMAL},
  560. METER_LOC = #{meterLoc,jdbcType=VARCHAR},
  561. TAG_BAD_SYMBOL = #{tagBadSymbol,jdbcType=VARCHAR},
  562. SOURCE_TYPE = #{sourceType,jdbcType=VARCHAR},
  563. REC_TIME = #{recTime,jdbcType=VARCHAR},
  564. ISSETTLE = #{issettle,jdbcType=VARCHAR},
  565. ISSCHEDULE = #{isschedule,jdbcType=VARCHAR},
  566. TAG_COL = #{tagCol,jdbcType=VARCHAR},
  567. UPDATEMAN = #{updateman, jdbcType=VARCHAR},
  568. UPDATETIME = SYSDATE,
  569. MINTIMEGRANID = #{mintimegranid, jdbcType=VARCHAR}
  570. where ITEMID = #{itemid,jdbcType=VARCHAR}
  571. </update>
  572. <update id="updateByPrimaryKeySelective" parameterType="com.steerinfo.ems.trmcalpoint.model.TRmCalpoint">
  573. update T_RM_CALPOINT
  574. <set>
  575. <if test="itemname != null">
  576. ITEMNAME = #{itemname,jdbcType=VARCHAR},
  577. </if>
  578. <if test="itemdesc != null">
  579. ITEMDESC = #{itemdesc,jdbcType=VARCHAR},
  580. </if>
  581. <if test="locateid != null">
  582. LOCATEID = #{locateid,jdbcType=VARCHAR},
  583. </if>
  584. <if test="networkid != null">
  585. NETWORKID = #{networkid,jdbcType=VARCHAR},
  586. </if>
  587. <if test="energyid != null">
  588. ENERGYID = #{energyid,jdbcType=VARCHAR},
  589. </if>
  590. <if test="energytypeid != null">
  591. ENERGYTYPEID = #{energytypeid,jdbcType=VARCHAR},
  592. </if>
  593. <if test="unitid != null">
  594. UNITID = #{unitid,jdbcType=VARCHAR},
  595. </if>
  596. <if test="costid != null">
  597. COSTID = #{costid,jdbcType=VARCHAR},
  598. </if>
  599. <if test="itemtype != null">
  600. ITEMTYPE = #{itemtype,jdbcType=VARCHAR},
  601. </if>
  602. <if test="propertyid != null">
  603. PROPERTYID = #{propertyid,jdbcType=VARCHAR},
  604. </if>
  605. <if test="tagid != null">
  606. TAGID = #{tagid,jdbcType=VARCHAR},
  607. </if>
  608. <if test="tagname != null">
  609. TAGNAME = #{tagname,jdbcType=VARCHAR},
  610. </if>
  611. <if test="tagAlias != null">
  612. TAG_ALIAS = #{tagAlias,jdbcType=VARCHAR},
  613. </if>
  614. <if test="useflag != null">
  615. USEFLAG = #{useflag,jdbcType=VARCHAR},
  616. </if>
  617. <if test="defaultvalue != null">
  618. DEFAULTVALUE = #{defaultvalue,jdbcType=VARCHAR},
  619. </if>
  620. <if test="digits != null">
  621. DIGITS = #{digits,jdbcType=DECIMAL},
  622. </if>
  623. <if test="seqno != null">
  624. SEQNO = #{seqno,jdbcType=DECIMAL},
  625. </if>
  626. <if test="showno != null">
  627. SHOWNO = #{showno,jdbcType=DECIMAL},
  628. </if>
  629. <if test="status != null">
  630. STATUS = #{status,jdbcType=VARCHAR},
  631. </if>
  632. <if test="node != null">
  633. NODE = #{node,jdbcType=VARCHAR},
  634. </if>
  635. <if test="parentid != null">
  636. PARENTID = #{parentid,jdbcType=VARCHAR},
  637. </if>
  638. <if test="bcode != null">
  639. BCODE = #{bcode,jdbcType=VARCHAR},
  640. </if>
  641. <if test="bdesc1 != null">
  642. BDESC1 = #{bdesc1,jdbcType=VARCHAR},
  643. </if>
  644. <if test="bdesc2 != null">
  645. BDESC2 = #{bdesc2,jdbcType=VARCHAR},
  646. </if>
  647. <if test="btype1 != null">
  648. BTYPE1 = #{btype1,jdbcType=VARCHAR},
  649. </if>
  650. <if test="btype2 != null">
  651. BTYPE2 = #{btype2,jdbcType=VARCHAR},
  652. </if>
  653. <if test="rangeVal != null">
  654. RANGE_VAL = #{rangeVal,jdbcType=DECIMAL},
  655. </if>
  656. <if test="tagIdMap != null">
  657. TAG_ID_MAP = #{tagIdMap,jdbcType=VARCHAR},
  658. </if>
  659. <if test="calcMod != null">
  660. CALC_MOD = #{calcMod,jdbcType=VARCHAR},
  661. </if>
  662. <if test="dataType != null">
  663. DATA_TYPE = #{dataType,jdbcType=VARCHAR},
  664. </if>
  665. <if test="tagTable != null">
  666. TAG_TABLE = #{tagTable,jdbcType=VARCHAR},
  667. </if>
  668. <if test="maxVal != null">
  669. MAX_VAL = #{maxVal,jdbcType=VARCHAR},
  670. </if>
  671. <if test="minVal != null">
  672. MIN_VAL = #{minVal,jdbcType=VARCHAR},
  673. </if>
  674. <if test="avgVal != null">
  675. AVG_VAL = #{avgVal,jdbcType=VARCHAR},
  676. </if>
  677. <if test="sumVal != null">
  678. SUM_VAL = #{sumVal,jdbcType=VARCHAR},
  679. </if>
  680. <if test="tagModulus != null">
  681. TAG_MODULUS = #{tagModulus,jdbcType=DECIMAL},
  682. </if>
  683. <if test="meterType != null">
  684. METER_TYPE = #{meterType,jdbcType=VARCHAR},
  685. </if>
  686. <if test="meterScale != null">
  687. METER_SCALE = #{meterScale,jdbcType=DECIMAL},
  688. </if>
  689. <if test="meterLoc != null">
  690. METER_LOC = #{meterLoc,jdbcType=VARCHAR},
  691. </if>
  692. <if test="tagBadSymbol != null">
  693. TAG_BAD_SYMBOL = #{tagBadSymbol,jdbcType=VARCHAR},
  694. </if>
  695. <if test="sourceType != null">
  696. SOURCE_TYPE = #{sourceType,jdbcType=VARCHAR},
  697. </if>
  698. <if test="recTime != null">
  699. REC_TIME = #{recTime,jdbcType=VARCHAR},
  700. </if>
  701. <if test="issettle != null">
  702. ISSETTLE = #{issettle,jdbcType=VARCHAR},
  703. </if>
  704. <if test="isschedule != null">
  705. ISSCHEDULE = #{isschedule,jdbcType=VARCHAR},
  706. </if>
  707. <if test="tagCol != null">
  708. TAG_COL = #{tagCol,jdbcType=VARCHAR},
  709. </if>
  710. <if test="updateman != null">
  711. UPDATEMAN = #{updateman, jdbcType=VARCHAR},
  712. </if>
  713. <if test="mintimegranid != null">
  714. MINTIMEGRANID = #{mintimegranid, jdbcType=VARCHAR},
  715. </if>
  716. <if test="updatetime != null">
  717. UPDATETIME = SYSDATE,
  718. </if>
  719. </set>
  720. where ITEMID = #{itemid,jdbcType=VARCHAR}
  721. </update>
  722. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  723. select ITEMID, ITEMNAME, ITEMDESC, LOCATEID, NETWORKID, ENERGYID, ENERGYTYPEID, UNITID,
  724. COSTID, ITEMTYPE, PROPERTYID, TAGID, TAGNAME, TAG_ALIAS, USEFLAG, DEFAULTVALUE,
  725. DIGITS, SEQNO, SHOWNO, STATUS, NODE, PARENTID, BCODE, BDESC1, BDESC2, BTYPE1, BTYPE2, RANGE_VAL,
  726. TAG_ID_MAP, CALC_MOD, DATA_TYPE, TAG_TABLE, MAX_VAL, MIN_VAL, AVG_VAL, SUM_VAL, TAG_MODULUS,
  727. METER_TYPE, METER_SCALE, METER_LOC, TAG_BAD_SYMBOL, SOURCE_TYPE, REC_TIME, ISSETTLE,
  728. ISSCHEDULE, TAG_COL, UPDATEMAN, UPDATETIME, MINTIMEGRANID
  729. from T_RM_CALPOINT
  730. where ITEMID = #{itemid,jdbcType=VARCHAR}
  731. </select>
  732. <select id="selectByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  733. select ITEMID, ITEMNAME, ITEMDESC, LOCATEID, NETWORKID, ENERGYID, ENERGYTYPEID, UNITID,
  734. COSTID, ITEMTYPE, PROPERTYID, TAGID, TAGNAME, TAG_ALIAS, USEFLAG, DEFAULTVALUE,
  735. DIGITS, SEQNO, SHOWNO, STATUS, NODE, PARENTID, BCODE, BDESC1, BDESC2, BTYPE1, BTYPE2, RANGE_VAL,
  736. TAG_ID_MAP, CALC_MOD, DATA_TYPE, TAG_TABLE, MAX_VAL, MIN_VAL, AVG_VAL, SUM_VAL, TAG_MODULUS,
  737. METER_TYPE, METER_SCALE, METER_LOC, TAG_BAD_SYMBOL, SOURCE_TYPE, REC_TIME, ISSETTLE,
  738. ISSCHEDULE, TAG_COL, UPDATEMAN, UPDATETIME, MINTIMEGRANID
  739. from T_RM_CALPOINT
  740. <where>
  741. <if test="itemid != null and itemid != ''">
  742. and ITEMID in (${itemid})
  743. </if>
  744. <if test="itemname != null and itemname != ''">
  745. and ITEMNAME = #{itemname}
  746. </if>
  747. <if test="itemdesc != null and itemdesc != ''">
  748. and ITEMDESC = #{itemdesc}
  749. </if>
  750. <if test="locateid != null and locateid != ''">
  751. and LOCATEID = #{locateid}
  752. </if>
  753. <if test="networkid != null and networkid != ''">
  754. and NETWORKID = #{networkid}
  755. </if>
  756. <if test="energyid != null and energyid != ''">
  757. and ENERGYID = #{energyid}
  758. </if>
  759. <if test="energytypeid != null and energytypeid != ''">
  760. and ENERGYTYPEID = #{energytypeid}
  761. </if>
  762. <if test="itemtype != null and itemtype != ''">
  763. and ITEMTYPE = #{itemtype}
  764. </if>
  765. <if test="propertyid != null and propertyid != ''">
  766. and PROPERTYID = #{propertyid}
  767. </if>
  768. <if test="unitid != null and unitid != ''">
  769. and UNITID = #{unitid}
  770. </if>
  771. <if test="costid != null and costid != ''">
  772. and COSTID = #{costid}
  773. </if>
  774. <if test="tagid != null and tagid != ''">
  775. and TAGID = #{tagid}
  776. </if>
  777. <if test="tagname != null and tagname != ''">
  778. and TAGNAME = #{tagname}
  779. </if>
  780. <if test="tagAlias != null and tagAlias != ''">
  781. and TAG_ALIAS = #{tagAlias}
  782. </if>
  783. <if test="useflag != null and useflag != ''">
  784. and USEFLAG = #{useflag}
  785. </if>
  786. <if test="defaultvalue != null and defaultvalue != ''">
  787. and DEFAULTVALUE = #{defaultvalue}
  788. </if>
  789. <if test="digits != null">
  790. and DIGITS = #{digits}
  791. </if>
  792. <if test="seqno != null">
  793. and SEQNO = #{seqno}
  794. </if>
  795. <if test="showno != null">
  796. and SHOWNO = #{showno}
  797. </if>
  798. <if test="status != null and status != ''">
  799. and STATUS = #{status}
  800. </if>
  801. <if test="node != null and node != ''">
  802. and NODE = #{node}
  803. </if>
  804. <if test="parentid != null and parentid != ''">
  805. and PARENTID = #{parentid}
  806. </if>
  807. <if test="bcode != null and bcode != ''">
  808. and BCODE = #{bcode}
  809. </if>
  810. <if test="bdesc1 != null and bdesc1 != ''">
  811. and BDESC1 = #{bdesc1}
  812. </if>
  813. <if test="bdesc2 != null and bdesc2 != ''">
  814. and BDESC2 = #{bdesc2}
  815. </if>
  816. <if test="btype1 != null and btype1 != ''">
  817. and BTYPE1 = #{btype1}
  818. </if>
  819. <if test="btype2 != null and btype2 != ''">
  820. and BTYPE2 = #{btype2}
  821. </if>
  822. <if test="rangeVal != null">
  823. and RANGE_VAL = #{rangeVal}
  824. </if>
  825. <if test="tagIdMap != null and tagIdMap != ''">
  826. and TAG_ID_MAP = #{tagIdMap}
  827. </if>
  828. <if test="calcMod != null and calcMod != ''">
  829. and CALC_MOD = #{calcMod}
  830. </if>
  831. <if test="dataType != null and dataType != ''">
  832. and DATA_TYPE = #{dataType}
  833. </if>
  834. <if test="tagTable != null and tagTable != ''">
  835. and TAG_TABLE = #{tagTable}
  836. </if>
  837. <if test="maxVal != null and maxVal != ''">
  838. and MAX_VAL = #{maxVal}
  839. </if>
  840. <if test="minVal != null and minVal != ''">
  841. and MIN_VAL = #{minVal}
  842. </if>
  843. <if test="avgVal != null and avgVal != ''">
  844. and AVG_VAL = #{avgVal}
  845. </if>
  846. <if test="sumVal != null and sumVal != ''">
  847. and SUM_VAL = #{sumVal}
  848. </if>
  849. <if test="tagModulus != null">
  850. and TAG_MODULUS = #{tagModulus}
  851. </if>
  852. <if test="meterType != null and meterType != ''">
  853. and METER_TYPE = #{meterType}
  854. </if>
  855. <if test="meterScale != null">
  856. and METER_SCALE = #{meterScale}
  857. </if>
  858. <if test="meterLoc != null and meterLoc != ''">
  859. and METER_LOC = #{meterLoc}
  860. </if>
  861. <if test="tagBadSymbol != null and tagBadSymbol != ''">
  862. and TAG_BAD_SYMBOL = #{tagBadSymbol}
  863. </if>
  864. <if test="sourceType != null and sourceType != ''">
  865. and SOURCE_TYPE = #{sourceType}
  866. </if>
  867. <if test="recTime != null and recTime != ''">
  868. and REC_TIME = #{recTime}
  869. </if>
  870. <if test="issettle != null and issettle != ''">
  871. and ISSETTLE = #{issettle}
  872. </if>
  873. <if test="isschedule != null and isschedule != ''">
  874. and ISSCHEDULE = #{isschedule}
  875. </if>
  876. <if test="tagCol != null and tagCol != ''">
  877. and TAG_COL = #{tagCol}
  878. </if>
  879. <if test="mintimegranid != null and mintimegranid != ''">
  880. and MINTIMEGRANID = #{mintimegranid}
  881. </if>
  882. </where>
  883. order by SHOWNO
  884. </select>
  885. <select id="selectLikeByParameters" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  886. select ITEMID, ITEMNAME, ITEMDESC, LOCATEID, NETWORKID, ENERGYID, ENERGYTYPEID, UNITID,
  887. COSTID, ITEMTYPE, PROPERTYID, TAGID, TAGNAME, TAG_ALIAS, USEFLAG, DEFAULTVALUE,
  888. DIGITS, SEQNO, SHOWNO, STATUS, NODE, PARENTID, BCODE, BDESC1, BDESC2, BTYPE1, BTYPE2, RANGE_VAL,
  889. TAG_ID_MAP, CALC_MOD, DATA_TYPE, TAG_TABLE, MAX_VAL, MIN_VAL, AVG_VAL, SUM_VAL, TAG_MODULUS,
  890. METER_TYPE, METER_SCALE, METER_LOC, TAG_BAD_SYMBOL, SOURCE_TYPE, REC_TIME, ISSETTLE,
  891. ISSCHEDULE, TAG_COL, UPDATEMAN, UPDATETIME, MINTIMEGRANID
  892. from T_RM_CALPOINT
  893. <where>
  894. <if test="itemid != null and itemid != ''">
  895. and ITEMID in (${itemid})
  896. </if>
  897. <if test="itemname != null and itemname != ''">
  898. and ITEMNAME LIKE '%${itemname}%'
  899. </if>
  900. <if test="itemdesc != null and itemdesc != ''">
  901. and ITEMDESC LIKE '%${itemdesc}%'
  902. </if>
  903. <if test="locateid != null and locateid != ''">
  904. and locateid in (${locateid})
  905. </if>
  906. <if test="networkid != null and networkid != ''">
  907. and networkid in (${networkid})
  908. </if>
  909. <if test="energyid != null and energyid != ''">
  910. and energyid in (${energyid})
  911. </if>
  912. <if test="energytypeid != null and energytypeid != ''">
  913. and energytypeid in (${energytypeid})
  914. </if>
  915. <if test="itemtype != null and itemtype != ''">
  916. and ITEMTYPE = #{itemtype}
  917. </if>
  918. <if test="propertyid != null and propertyid != ''">
  919. and propertyid in (${propertyid})
  920. </if>
  921. <if test="unitid != null and unitid != ''">
  922. and UNITID LIKE '%${unitid}%'
  923. </if>
  924. <if test="costid != null and costid != ''">
  925. and COSTID LIKE '%${costid}%'
  926. </if>
  927. <if test="tagid != null and tagid != ''">
  928. and TAGID LIKE '%${tagid}%'
  929. </if>
  930. <if test="tagname != null and tagname != ''">
  931. and TAGNAME LIKE '%${tagname}%'
  932. </if>
  933. <if test="tagAlias != null and tagAlias != ''">
  934. and TAG_ALIAS LIKE '%${tagAlias}%'
  935. </if>
  936. <if test="useflag != null and useflag != ''">
  937. and USEFLAG = #{useflag}
  938. </if>
  939. <if test="defaultvalue != null and defaultvalue != ''">
  940. and DEFAULTVALUE = #{defaultvalue}
  941. </if>
  942. <if test="digits != null">
  943. and DIGITS = #{digits}
  944. </if>
  945. <if test="seqno != null">
  946. and SEQNO = #{seqno}
  947. </if>
  948. <if test="showno != null">
  949. and SHOWNO = #{showno}
  950. </if>
  951. <if test="status != null and status != ''">
  952. and STATUS LIKE '%${status}%'
  953. </if>
  954. <if test="node != null and node != ''">
  955. and NODE LIKE '%${node}%'
  956. </if>
  957. <if test="parentid != null and parentid != ''">
  958. and PARENTID LIKE '%${parentid}%'
  959. </if>
  960. <if test="bcode != null and bcode != ''">
  961. and BCODE LIKE '%${bcode}%'
  962. </if>
  963. <if test="bdesc1 != null and bdesc1 != ''">
  964. and BDESC1 LIKE '%${bdesc1}%'
  965. </if>
  966. <if test="bdesc2 != null and bdesc2 != ''">
  967. and BDESC2 LIKE '%${bdesc2}%'
  968. </if>
  969. <if test="btype1 != null and btype1 != ''">
  970. and BTYPE1 LIKE '%${btype1}%'
  971. </if>
  972. <if test="btype2 != null and btype2 != ''">
  973. and BTYPE2 LIKE '%${btype2}%'
  974. </if>
  975. <if test="rangeVal != null">
  976. and RANGE_VAL = #{rangeVal}
  977. </if>
  978. <if test="tagIdMap != null and tagIdMap != ''">
  979. and TAG_ID_MAP LIKE '%${tagIdMap}%'
  980. </if>
  981. <if test="calcMod != null and calcMod != ''">
  982. and CALC_MOD LIKE '%${calcMod}%'
  983. </if>
  984. <if test="dataType != null and dataType != ''">
  985. and DATA_TYPE LIKE '%${dataType}%'
  986. </if>
  987. <if test="tagTable != null and tagTable != ''">
  988. and TAG_TABLE LIKE '%${tagTable}%'
  989. </if>
  990. <if test="maxVal != null and maxVal != ''">
  991. and MAX_VAL LIKE '%${maxVal}%'
  992. </if>
  993. <if test="minVal != null and minVal != ''">
  994. and MIN_VAL LIKE '%${minVal}%'
  995. </if>
  996. <if test="avgVal != null and avgVal != ''">
  997. and AVG_VAL LIKE '%${avgVal}%'
  998. </if>
  999. <if test="sumVal != null and sumVal != ''">
  1000. and SUM_VAL LIKE '%${sumVal}%'
  1001. </if>
  1002. <if test="tagModulus != null">
  1003. and TAG_MODULUS = #{tagModulus}
  1004. </if>
  1005. <if test="meterType != null and meterType != ''">
  1006. and METER_TYPE LIKE '%${meterType}%'
  1007. </if>
  1008. <if test="meterScale != null">
  1009. and METER_SCALE = #{meterScale}
  1010. </if>
  1011. <if test="meterLoc != null and meterLoc != ''">
  1012. and METER_LOC LIKE '%${meterLoc}%'
  1013. </if>
  1014. <if test="tagBadSymbol != null and tagBadSymbol != ''">
  1015. and TAG_BAD_SYMBOL LIKE '%${tagBadSymbol}%'
  1016. </if>
  1017. <if test="sourceType != null and sourceType != ''">
  1018. and SOURCE_TYPE LIKE '%${sourceType}%'
  1019. </if>
  1020. <if test="recTime != null and recTime != ''">
  1021. and REC_TIME LIKE '%${recTime}%'
  1022. </if>
  1023. <if test="issettle != null and issettle != ''">
  1024. and ISSETTLE LIKE '%${issettle}%'
  1025. </if>
  1026. <if test="isschedule != null and isschedule != ''">
  1027. and ISSCHEDULE LIKE '%${isschedule}%'
  1028. </if>
  1029. <if test="tagCol != null and tagCol != ''">
  1030. and TAG_COL LIKE '%${tagCol}%'
  1031. </if>
  1032. <if test="mintimegranid != null and mintimegranid != ''">
  1033. and MINTIMEGRANID = #{mintimegranid}
  1034. </if>
  1035. </where>
  1036. </select>
  1037. <insert id="batchInsert" parameterType="java.util.List">
  1038. insert into T_RM_CALPOINT
  1039. (ITEMID,
  1040. ITEMNAME, ITEMDESC, LOCATEID,
  1041. NETWORKID, ENERGYID, ENERGYTYPEID,
  1042. UNITID, COSTID, ITEMTYPE,
  1043. PROPERTYID,TAGID,
  1044. TAGNAME, TAG_ALIAS, USEFLAG,
  1045. DEFAULTVALUE, DIGITS, SEQNO, SHOWNO,
  1046. STATUS, NODE, PARENTID,
  1047. BCODE, BDESC1, BDESC2,
  1048. BTYPE1, BTYPE2, RANGE_VAL,
  1049. TAG_ID_MAP, CALC_MOD, DATA_TYPE,
  1050. TAG_TABLE, MAX_VAL, MIN_VAL,
  1051. AVG_VAL, SUM_VAL, TAG_MODULUS,
  1052. METER_TYPE, METER_SCALE, METER_LOC,
  1053. TAG_BAD_SYMBOL, SOURCE_TYPE, REC_TIME,
  1054. ISSETTLE, ISSCHEDULE, TAG_COL, MINTIMEGRANID
  1055. )
  1056. ( <foreach collection="list" item="item" separator="union all">
  1057. select
  1058. #{item.itemid,jdbcType=VARCHAR},
  1059. #{item.itemname,jdbcType=VARCHAR}, #{item.itemdesc,jdbcType=VARCHAR}, #{item.locateid,jdbcType=VARCHAR},
  1060. #{item.networkid,jdbcType=VARCHAR}, #{item.energyid,jdbcType=VARCHAR}, #{item.energytypeid,jdbcType=VARCHAR},
  1061. #{item.unitid,jdbcType=VARCHAR}, #{item.costid,jdbcType=VARCHAR}, #{item.itemtype,jdbcType=VARCHAR},
  1062. #{item.propertyid,jdbcType=VARCHAR}, #{item.tagid,jdbcType=VARCHAR},
  1063. #{item.tagname,jdbcType=VARCHAR}, #{item.tagAlias,jdbcType=VARCHAR}, #{item.useflag,jdbcType=VARCHAR},
  1064. #{item.defaultvalue,jdbcType=VARCHAR}, #{item.digits,jdbcType=DECIMAL}, #{item.seqno,jdbcType=DECIMAL},#{item.showno,jdbcType=DECIMAL},
  1065. #{item.status,jdbcType=VARCHAR}, #{item.node,jdbcType=VARCHAR}, #{item.parentid,jdbcType=VARCHAR},
  1066. #{item.bcode,jdbcType=VARCHAR}, #{item.bdesc1,jdbcType=VARCHAR}, #{item.bdesc2,jdbcType=VARCHAR},
  1067. #{item.btype1,jdbcType=VARCHAR}, #{item.btype2,jdbcType=VARCHAR}, #{item.rangeVal,jdbcType=DECIMAL},
  1068. #{item.tagIdMap,jdbcType=VARCHAR}, #{item.calcMod,jdbcType=VARCHAR}, #{item.dataType,jdbcType=VARCHAR},
  1069. #{item.tagTable,jdbcType=VARCHAR}, #{item.maxVal,jdbcType=VARCHAR}, #{item.minVal,jdbcType=VARCHAR},
  1070. #{item.avgVal,jdbcType=VARCHAR}, #{item.sumVal,jdbcType=VARCHAR}, #{item.tagModulus,jdbcType=DECIMAL},
  1071. #{item.meterType,jdbcType=VARCHAR}, #{item.meterScale,jdbcType=DECIMAL}, #{item.meterLoc,jdbcType=VARCHAR},
  1072. #{item.tagBadSymbol,jdbcType=VARCHAR}, #{item.sourceType,jdbcType=VARCHAR}, #{item.recTime,jdbcType=VARCHAR},
  1073. #{item.issettle,jdbcType=VARCHAR}, #{item.isschedule,jdbcType=VARCHAR}, #{item.tagCol,jdbcType=VARCHAR}, #{item.mintimegranid,jdbcType=VARCHAR}
  1074. from dual
  1075. </foreach> )
  1076. </insert>
  1077. <update id="batchUpdate" parameterType="java.util.List">
  1078. update T_RM_CALPOINT
  1079. set
  1080. ITEMID=
  1081. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1082. when #{item.itemid,jdbcType=VARCHAR} then #{item.itemid,jdbcType=VARCHAR}
  1083. </foreach>
  1084. ,ITEMNAME=
  1085. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1086. when #{item.itemid,jdbcType=VARCHAR} then #{item.itemname,jdbcType=VARCHAR}
  1087. </foreach>
  1088. ,ITEMDESC=
  1089. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1090. when #{item.itemid,jdbcType=VARCHAR} then #{item.itemdesc,jdbcType=VARCHAR}
  1091. </foreach>
  1092. ,LOCATEID=
  1093. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1094. when #{item.itemid,jdbcType=VARCHAR} then #{item.locateid,jdbcType=VARCHAR}
  1095. </foreach>
  1096. ,NETWORKID=
  1097. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1098. when #{item.itemid,jdbcType=VARCHAR} then #{item.networkid,jdbcType=VARCHAR}
  1099. </foreach>
  1100. ,ENERGYID=
  1101. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1102. when #{item.itemid,jdbcType=VARCHAR} then #{item.energyid,jdbcType=VARCHAR}
  1103. </foreach>
  1104. ,ENERGYTYPEID=
  1105. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1106. when #{item.itemid,jdbcType=VARCHAR} then #{item.energytypeid,jdbcType=VARCHAR}
  1107. </foreach>
  1108. ,UNITID=
  1109. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1110. when #{item.itemid,jdbcType=VARCHAR} then #{item.unitid,jdbcType=VARCHAR}
  1111. </foreach>
  1112. ,COSTID=
  1113. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1114. when #{item.itemid,jdbcType=VARCHAR} then #{item.costid,jdbcType=VARCHAR}
  1115. </foreach>
  1116. ,ITEMTYPE=
  1117. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1118. when #{item.itemid,jdbcType=VARCHAR} then #{item.itemtype,jdbcType=VARCHAR}
  1119. </foreach>
  1120. ,PROPERTYID=
  1121. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1122. when #{item.itemid,jdbcType=VARCHAR} then #{item.propertyid,jdbcType=VARCHAR}
  1123. </foreach>
  1124. ,TAGID=
  1125. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1126. when #{item.itemid,jdbcType=VARCHAR} then #{item.tagid,jdbcType=VARCHAR}
  1127. </foreach>
  1128. ,TAGNAME=
  1129. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1130. when #{item.itemid,jdbcType=VARCHAR} then #{item.tagname,jdbcType=VARCHAR}
  1131. </foreach>
  1132. ,TAG_ALIAS=
  1133. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1134. when #{item.itemid,jdbcType=VARCHAR} then #{item.tagAlias,jdbcType=VARCHAR}
  1135. </foreach>
  1136. ,USEFLAG=
  1137. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1138. when #{item.itemid,jdbcType=VARCHAR} then #{item.useflag,jdbcType=VARCHAR}
  1139. </foreach>
  1140. ,DEFAULTVALUE=
  1141. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1142. when #{item.itemid,jdbcType=VARCHAR} then #{item.defaultvalue,jdbcType=VARCHAR}
  1143. </foreach>
  1144. ,DIGITS=
  1145. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1146. when #{item.itemid,jdbcType=VARCHAR} then #{item.digits,jdbcType=DECIMAL}
  1147. </foreach>
  1148. ,SEQNO=
  1149. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1150. when #{item.itemid,jdbcType=VARCHAR} then #{item.seqno,jdbcType=DECIMAL}
  1151. </foreach>
  1152. ,SHOWNO=
  1153. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1154. when #{item.itemid,jdbcType=VARCHAR} then #{item.showno,jdbcType=DECIMAL}
  1155. </foreach>
  1156. ,STATUS=
  1157. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1158. when #{item.itemid,jdbcType=VARCHAR} then #{item.status,jdbcType=VARCHAR}
  1159. </foreach>
  1160. ,NODE=
  1161. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1162. when #{item.itemid,jdbcType=VARCHAR} then #{item.node,jdbcType=VARCHAR}
  1163. </foreach>
  1164. ,PARENTID=
  1165. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1166. when #{item.itemid,jdbcType=VARCHAR} then #{item.parentid,jdbcType=VARCHAR}
  1167. </foreach>
  1168. ,BCODE=
  1169. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1170. when #{item.itemid,jdbcType=VARCHAR} then #{item.bcode,jdbcType=VARCHAR}
  1171. </foreach>
  1172. ,BDESC1=
  1173. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1174. when #{item.itemid,jdbcType=VARCHAR} then #{item.bdesc1,jdbcType=VARCHAR}
  1175. </foreach>
  1176. ,BDESC2=
  1177. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1178. when #{item.itemid,jdbcType=VARCHAR} then #{item.bdesc2,jdbcType=VARCHAR}
  1179. </foreach>
  1180. ,BTYPE1=
  1181. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1182. when #{item.itemid,jdbcType=VARCHAR} then #{item.btype1,jdbcType=VARCHAR}
  1183. </foreach>
  1184. ,BTYPE2=
  1185. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1186. when #{item.itemid,jdbcType=VARCHAR} then #{item.btype2,jdbcType=VARCHAR}
  1187. </foreach>
  1188. ,RANGE_VAL=
  1189. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1190. when #{item.itemid,jdbcType=VARCHAR} then #{item.rangeVal,jdbcType=DECIMAL}
  1191. </foreach>
  1192. ,TAG_ID_MAP=
  1193. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1194. when #{item.itemid,jdbcType=VARCHAR} then #{item.tagIdMap,jdbcType=VARCHAR}
  1195. </foreach>
  1196. ,CALC_MOD=
  1197. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1198. when #{item.itemid,jdbcType=VARCHAR} then #{item.calcMod,jdbcType=VARCHAR}
  1199. </foreach>
  1200. ,DATA_TYPE=
  1201. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1202. when #{item.itemid,jdbcType=VARCHAR} then #{item.dataType,jdbcType=VARCHAR}
  1203. </foreach>
  1204. ,TAG_TABLE=
  1205. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1206. when #{item.itemid,jdbcType=VARCHAR} then #{item.tagTable,jdbcType=VARCHAR}
  1207. </foreach>
  1208. ,MAX_VAL=
  1209. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1210. when #{item.itemid,jdbcType=VARCHAR} then #{item.maxVal,jdbcType=VARCHAR}
  1211. </foreach>
  1212. ,MIN_VAL=
  1213. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1214. when #{item.itemid,jdbcType=VARCHAR} then #{item.minVal,jdbcType=VARCHAR}
  1215. </foreach>
  1216. ,AVG_VAL=
  1217. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1218. when #{item.itemid,jdbcType=VARCHAR} then #{item.avgVal,jdbcType=VARCHAR}
  1219. </foreach>
  1220. ,SUM_VAL=
  1221. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1222. when #{item.itemid,jdbcType=VARCHAR} then #{item.sumVal,jdbcType=VARCHAR}
  1223. </foreach>
  1224. ,TAG_MODULUS=
  1225. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1226. when #{item.itemid,jdbcType=VARCHAR} then #{item.tagModulus,jdbcType=DECIMAL}
  1227. </foreach>
  1228. ,METER_TYPE=
  1229. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1230. when #{item.itemid,jdbcType=VARCHAR} then #{item.meterType,jdbcType=VARCHAR}
  1231. </foreach>
  1232. ,METER_SCALE=
  1233. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1234. when #{item.itemid,jdbcType=VARCHAR} then #{item.meterScale,jdbcType=DECIMAL}
  1235. </foreach>
  1236. ,METER_LOC=
  1237. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1238. when #{item.itemid,jdbcType=VARCHAR} then #{item.meterLoc,jdbcType=VARCHAR}
  1239. </foreach>
  1240. ,TAG_BAD_SYMBOL=
  1241. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1242. when #{item.itemid,jdbcType=VARCHAR} then #{item.tagBadSymbol,jdbcType=VARCHAR}
  1243. </foreach>
  1244. ,SOURCE_TYPE=
  1245. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1246. when #{item.itemid,jdbcType=VARCHAR} then #{item.sourceType,jdbcType=VARCHAR}
  1247. </foreach>
  1248. ,REC_TIME=
  1249. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1250. when #{item.itemid,jdbcType=VARCHAR} then #{item.recTime,jdbcType=VARCHAR}
  1251. </foreach>
  1252. ,ISSETTLE=
  1253. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1254. when #{item.itemid,jdbcType=VARCHAR} then #{item.issettle,jdbcType=VARCHAR}
  1255. </foreach>
  1256. ,ISSCHEDULE=
  1257. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1258. when #{item.itemid,jdbcType=VARCHAR} then #{item.isschedule,jdbcType=VARCHAR}
  1259. </foreach>
  1260. ,TAG_COL=
  1261. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1262. when #{item.itemid,jdbcType=VARCHAR} then #{item.tagCol,jdbcType=VARCHAR}
  1263. </foreach>
  1264. ,MINTIMEGRANID=
  1265. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1266. when #{item.itemid,jdbcType=VARCHAR} then #{item.mintimegranid,jdbcType=VARCHAR}
  1267. </foreach>
  1268. ,UPDATEMAN=
  1269. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1270. when #{item.itemid,jdbcType=VARCHAR} then #{item.updateman,jdbcType=VARCHAR}
  1271. </foreach>
  1272. ,UPDATETIME=
  1273. <foreach collection="list" item="item" index="index" separator=" " open="case ITEMID" close="end">
  1274. when #{item.itemid,jdbcType=VARCHAR} then SYSDATE
  1275. </foreach>
  1276. where ITEMID in
  1277. <foreach collection="list" index="index" item="item" separator="," open="(" close=")">
  1278. #{item.itemid,jdbcType=VARCHAR}
  1279. </foreach>
  1280. </update>
  1281. <delete id="batchDelete" parameterType="java.util.List">
  1282. delete from T_RM_CALPOINT
  1283. where ITEMID in
  1284. <foreach collection="list" item="id" open="(" close=")" separator=",">
  1285. #{id}
  1286. </foreach>
  1287. </delete>
  1288. <!-- 获得计量层级列表(计量点数据录入) -->
  1289. <select id="getRmCalpoint" resultType = "Map">
  1290. SELECT ITEMID AS ID,ITEMNAME AS NAME FROM
  1291. (SELECT DISTINCT PARENTID FROM T_RM_CALPOINT WHERE PARENTID IS NOT NULL AND PARENTID != ' ') B
  1292. LEFT JOIN T_RM_CALPOINT T ON B.PARENTID = T.ITEMID
  1293. ORDER BY ITEMID
  1294. </select>
  1295. <select id="getMaxId" parameterType="com.steerinfo.ems.trmcalpoint.model.TRmCalpoint" resultType="string">
  1296. SELECT MAX(SUBSTR(ITEMID, -4)) FROM T_RM_CALPOINT
  1297. where ITEMID like '${head}%'
  1298. </select>
  1299. <!-- 能源调度管理-计量点数据管理-计量点数据录入列表 -->
  1300. <select id="getDate312" parameterType="java.util.HashMap" resultType = "Map">
  1301. select timegranid,itemtype,clock,t.itemid,t.itemname,t.tag_alias,t.tag_modulus,t.unitid,t.propertyid,v.mintvalue,v.mendvalue,
  1302. v.actualvalue,v.correctvalue,v.apportvalue,v.sumvalue,v.bz,v.crman,v.rec_time,v.upman,v.uptime,
  1303. v.update_reason,e.name ename,nvl(l.name, '') lname
  1304. from T_RM_CALPOINT t
  1305. left join T_RM_CALPOINT_VALUE v on t.itemid = v.itemid
  1306. inner join T_RM_ENERGY e on t.ENERGYID = e.ID
  1307. left join T_RM_LOCATION l on t.LOCATEID = l.ID
  1308. where t.useflag = 1
  1309. <if test="itemid != null and itemid != ''">
  1310. and t.ITEMID in (${itemid})
  1311. </if>
  1312. <if test="timegranid != null and timegranid != ''">
  1313. and TIMEGRANID = #{timegranid}
  1314. </if>
  1315. <if test="clock != null and clock != ''">
  1316. and CLOCK &gt;= #{clock}
  1317. </if>
  1318. <if test="clocke != null and clocke != ''">
  1319. and CLOCK &lt;= #{clocke}
  1320. </if>
  1321. <if test="itemname != null and itemname != ''">
  1322. and t.ITEMNAME LIKE '%${itemname}%'
  1323. </if>
  1324. <if test="tagAlias != null and tagAlias != ''">
  1325. and t.TAG_ALIAS LIKE '%${tagAlias}%'
  1326. </if>
  1327. <if test="locateid != null and locateid != ''">
  1328. ${locateid}
  1329. </if>
  1330. <if test="energyid != null and energyid != ''">
  1331. ${energyid}
  1332. </if>
  1333. <if test="propertyid != null and propertyid != ''">
  1334. ${propertyid}
  1335. </if>
  1336. <if test="energytypeid != null and energytypeid != ''">
  1337. ${energytypeid}
  1338. </if>
  1339. <if test="networkid != null and networkid != ''">
  1340. and NETWORKID = #{networkid}
  1341. </if>
  1342. <if test="itemtype != null and itemtype != ''">
  1343. and ITEMTYPE = #{itemtype}
  1344. </if>
  1345. order by clock,t.itemid
  1346. </select>
  1347. <!-- 系统接口管理-能耗数据管理 -->
  1348. <select id="getInIdDate312" parameterType="java.util.HashMap" resultType = "Map">
  1349. select timegranid,itemtype,clock,t.itemid,t.itemname,t.tag_alias,t.tag_modulus,t.unitid,v.mintvalue,v.mendvalue,
  1350. v.actualvalue,v.correctvalue,v.apportvalue,v.sumvalue,v.bz,v.rec_time,v.upman,v.update_reason
  1351. from T_RM_CALPOINT t
  1352. left join T_RM_CALPOINT_VALUE v on t.itemid = v.itemid
  1353. where t.useflag = 1
  1354. <if test="itemid != null and itemid != ''">
  1355. and t.ITEMID in ('${itemid}')
  1356. </if>
  1357. <if test="timegranid != null and timegranid != ''">
  1358. and TIMEGRANID = #{timegranid}
  1359. </if>
  1360. <if test="clock != null and clock != ''">
  1361. and CLOCK = #{clock}
  1362. </if>
  1363. <if test="itemname != null and itemname != ''">
  1364. and t.ITEMNAME LIKE '%${itemname}%'
  1365. </if>
  1366. <if test="tagAlias != null and tagAlias != ''">
  1367. and t.TAG_ALIAS LIKE '%${tagAlias}%'
  1368. </if>
  1369. <if test="locateid != null and locateid != ''">
  1370. and LOCATEID = #{locateid}
  1371. </if>
  1372. <if test="energyid != null and energyid != ''">
  1373. and ENERGYID = #{energyid}
  1374. </if>
  1375. <if test="energytypeid != null and energytypeid != ''">
  1376. and ENERGYTYPEID = #{energytypeid}
  1377. </if>
  1378. <if test="networkid != null and networkid != ''">
  1379. and NETWORKID = #{networkid}
  1380. </if>
  1381. <if test="itemtype != null and itemtype != ''">
  1382. and ITEMTYPE = #{itemtype}
  1383. </if>
  1384. order by clock,t.itemid
  1385. </select>
  1386. <!-- 能源调度管理-计量点数据管理-计量点数据趋势图 -->
  1387. <select id="getDate312ForChart" parameterType="java.util.HashMap" resultType = "Map">
  1388. select clock,apportvalue from
  1389. (select clock,apportvalue,rownum r from T_RM_CALPOINT_VALUE
  1390. where itemid = #{itemid} and timegranid = #{timegranid}
  1391. and clock &lt;= #{clock} order by clock desc)
  1392. where r &lt;= #{size}
  1393. order by clock
  1394. </select>
  1395. <update id="updateNewItem" parameterType="java.util.HashMap">
  1396. update T_RM_CALPOINT
  1397. <set>
  1398. LOCATEID = #{locateid,jdbcType=VARCHAR},
  1399. ENERGYID = #{energyid,jdbcType=VARCHAR},
  1400. ENERGYTYPEID = #{energytypeid,jdbcType=VARCHAR},
  1401. PROPERTYID = #{propertyid,jdbcType=VARCHAR},
  1402. ITEMNAME = #{itemname,jdbcType=VARCHAR},
  1403. <if test="itemdesc != null">
  1404. ITEMDESC = #{itemdesc,jdbcType=VARCHAR},
  1405. </if>
  1406. <if test="networkid != null">
  1407. NETWORKID = #{networkid,jdbcType=VARCHAR},
  1408. </if>
  1409. <if test="unitid != null">
  1410. UNITID = #{unitid,jdbcType=VARCHAR},
  1411. </if>
  1412. <if test="itemtype != null">
  1413. ITEMTYPE = #{itemtype,jdbcType=VARCHAR},
  1414. </if>
  1415. <if test="tagid != null">
  1416. TAGID = #{tagid,jdbcType=VARCHAR},
  1417. </if>
  1418. <if test="tagname != null">
  1419. TAGNAME = #{tagname,jdbcType=VARCHAR},
  1420. </if>
  1421. <if test="tagAlias != null">
  1422. TAG_ALIAS = #{tagAlias,jdbcType=VARCHAR},
  1423. </if>
  1424. <if test="useflag != null">
  1425. USEFLAG = #{useflag,jdbcType=VARCHAR},
  1426. </if>
  1427. <if test="defaultvalue != null">
  1428. DEFAULTVALUE = #{defaultvalue,jdbcType=VARCHAR},
  1429. </if>
  1430. <if test="digits != null">
  1431. DIGITS = #{digits,jdbcType=DECIMAL},
  1432. </if>
  1433. <if test="seqno != null">
  1434. SEQNO = #{seqno,jdbcType=DECIMAL},
  1435. </if>
  1436. <if test="showno != null">
  1437. SHOWNO = #{showno,jdbcType=DECIMAL},
  1438. </if>
  1439. <if test="status != null">
  1440. STATUS = #{status,jdbcType=VARCHAR},
  1441. </if>
  1442. <if test="node != null">
  1443. NODE = #{node,jdbcType=VARCHAR},
  1444. </if>
  1445. <if test="parentid != null">
  1446. PARENTID = #{parentid,jdbcType=VARCHAR},
  1447. </if>
  1448. <if test="bcode != null">
  1449. BCODE = #{bcode,jdbcType=VARCHAR},
  1450. </if>
  1451. <if test="bdesc1 != null">
  1452. BDESC1 = #{bdesc1,jdbcType=VARCHAR},
  1453. </if>
  1454. <if test="bdesc2 != null">
  1455. BDESC2 = #{bdesc2,jdbcType=VARCHAR},
  1456. </if>
  1457. <if test="btype1 != null">
  1458. BTYPE1 = #{btype1,jdbcType=VARCHAR},
  1459. </if>
  1460. <if test="btype2 != null">
  1461. BTYPE2 = #{btype2,jdbcType=VARCHAR},
  1462. </if>
  1463. <if test="rangeVal != null">
  1464. RANGE_VAL = #{rangeVal,jdbcType=DECIMAL},
  1465. </if>
  1466. <if test="tagIdMap != null">
  1467. TAG_ID_MAP = #{tagIdMap,jdbcType=VARCHAR},
  1468. </if>
  1469. <if test="calcMod != null">
  1470. CALC_MOD = #{calcMod,jdbcType=VARCHAR},
  1471. </if>
  1472. <if test="dataType != null">
  1473. DATA_TYPE = #{dataType,jdbcType=VARCHAR},
  1474. </if>
  1475. <if test="tagTable != null">
  1476. TAG_TABLE = #{tagTable,jdbcType=VARCHAR},
  1477. </if>
  1478. <if test="maxVal != null">
  1479. MAX_VAL = #{maxVal,jdbcType=VARCHAR},
  1480. </if>
  1481. <if test="minVal != null">
  1482. MIN_VAL = #{minVal,jdbcType=VARCHAR},
  1483. </if>
  1484. <if test="avgVal != null">
  1485. AVG_VAL = #{avgVal,jdbcType=VARCHAR},
  1486. </if>
  1487. <if test="sumVal != null">
  1488. SUM_VAL = #{sumVal,jdbcType=VARCHAR},
  1489. </if>
  1490. <if test="tagModulus != null">
  1491. TAG_MODULUS = #{tagModulus,jdbcType=DECIMAL},
  1492. </if>
  1493. <if test="meterType != null">
  1494. METER_TYPE = #{meterType,jdbcType=VARCHAR},
  1495. </if>
  1496. <if test="meterScale != null">
  1497. METER_SCALE = #{meterScale,jdbcType=DECIMAL},
  1498. </if>
  1499. <if test="meterLoc != null">
  1500. METER_LOC = #{meterLoc,jdbcType=VARCHAR},
  1501. </if>
  1502. <if test="tagBadSymbol != null">
  1503. TAG_BAD_SYMBOL = #{tagBadSymbol,jdbcType=VARCHAR},
  1504. </if>
  1505. <if test="sourceType != null">
  1506. SOURCE_TYPE = #{sourceType,jdbcType=VARCHAR},
  1507. </if>
  1508. <if test="recTime != null">
  1509. REC_TIME = #{recTime,jdbcType=VARCHAR},
  1510. </if>
  1511. <if test="issettle != null">
  1512. ISSETTLE = #{issettle,jdbcType=VARCHAR},
  1513. </if>
  1514. <if test="isschedule != null">
  1515. ISSCHEDULE = #{isschedule,jdbcType=VARCHAR},
  1516. </if>
  1517. <if test="tagCol != null">
  1518. TAG_COL = #{tagCol,jdbcType=VARCHAR},
  1519. </if>
  1520. <if test="mintimegranid != null">
  1521. MINTIMEGRANID = #{mintimegranid,jdbcType=VARCHAR},
  1522. </if>
  1523. </set>
  1524. where ITEMID = #{itemid,jdbcType=VARCHAR}
  1525. </update>
  1526. <select id="selectCalpoints" parameterType="java.util.HashMap" resultMap="BaseResultMap">
  1527. select ITEMID, ITEMNAME, ITEMDESC, LOCATEID, NETWORKID, ENERGYID, ENERGYTYPEID, UNITID,
  1528. COSTID, ITEMTYPE, PROPERTYID, TAGID, TAGNAME, TAG_ALIAS, USEFLAG, DEFAULTVALUE,
  1529. DIGITS, SEQNO, SHOWNO, STATUS, NODE, PARENTID, BCODE, BDESC1, BDESC2, BTYPE1, BTYPE2, RANGE_VAL,
  1530. TAG_ID_MAP, CALC_MOD, DATA_TYPE, TAG_TABLE, MAX_VAL, MIN_VAL, AVG_VAL, SUM_VAL, TAG_MODULUS,
  1531. METER_TYPE, METER_SCALE, METER_LOC, TAG_BAD_SYMBOL, SOURCE_TYPE, REC_TIME, ISSETTLE,
  1532. ISSCHEDULE, TAG_COL, MINTIMEGRANID
  1533. from T_RM_CALPOINT
  1534. <where>
  1535. <if test="itemid != null and itemid != ''">
  1536. and ITEMID in (${itemid})
  1537. </if>
  1538. <if test="itemname != null and itemname != ''">
  1539. and ITEMNAME = #{itemname}
  1540. </if>
  1541. <if test="itemdesc != null and itemdesc != ''">
  1542. and ITEMDESC = #{itemdesc}
  1543. </if>
  1544. <if test="locateid != null and locateid != ''">
  1545. and LOCATEID = #{locateid}
  1546. </if>
  1547. <if test="networkid != null and networkid != ''">
  1548. and NETWORKID = #{networkid}
  1549. </if>
  1550. <if test="energyid != null and energyid != ''">
  1551. and ENERGYID = #{energyid}
  1552. </if>
  1553. <if test="energytypeid != null and energytypeid != ''">
  1554. and ENERGYTYPEID = #{energytypeid}
  1555. </if>
  1556. <if test="itemtype != null and itemtype != ''">
  1557. and ITEMTYPE = #{itemtype}
  1558. </if>
  1559. <if test="propertyid != null and propertyid != ''">
  1560. and PROPERTYID = #{propertyid}
  1561. </if>
  1562. <if test="unitid != null and unitid != ''">
  1563. and UNITID = #{unitid}
  1564. </if>
  1565. <if test="costid != null and costid != ''">
  1566. and COSTID = #{costid}
  1567. </if>
  1568. <if test="tagid != null and tagid != ''">
  1569. and TAGID = #{tagid}
  1570. </if>
  1571. <if test="tagname != null and tagname != ''">
  1572. and TAGNAME = #{tagname}
  1573. </if>
  1574. <if test="tagAlias != null and tagAlias != ''">
  1575. and TAG_ALIAS = #{tagAlias}
  1576. </if>
  1577. <if test="useflag != null and useflag != ''">
  1578. and USEFLAG = #{useflag}
  1579. </if>
  1580. <if test="defaultvalue != null and defaultvalue != ''">
  1581. and DEFAULTVALUE = #{defaultvalue}
  1582. </if>
  1583. <if test="digits != null">
  1584. and DIGITS = #{digits}
  1585. </if>
  1586. <if test="status != null and status != ''">
  1587. and STATUS = #{status}
  1588. </if>
  1589. <if test="rangeVal != null">
  1590. and RANGE_VAL = #{rangeVal}
  1591. </if>
  1592. <if test="tagIdMap != null and tagIdMap != ''">
  1593. and TAG_ID_MAP = #{tagIdMap}
  1594. </if>
  1595. <if test="calcMod != null and calcMod != ''">
  1596. and CALC_MOD = #{calcMod}
  1597. </if>
  1598. <if test="dataType != null and dataType != ''">
  1599. and DATA_TYPE = #{dataType}
  1600. </if>
  1601. <if test="tagTable != null and tagTable != ''">
  1602. and TAG_TABLE = #{tagTable}
  1603. </if>
  1604. <if test="maxVal != null and maxVal != ''">
  1605. and MAX_VAL = #{maxVal}
  1606. </if>
  1607. <if test="minVal != null and minVal != ''">
  1608. and MIN_VAL = #{minVal}
  1609. </if>
  1610. <if test="avgVal != null and avgVal != ''">
  1611. and AVG_VAL = #{avgVal}
  1612. </if>
  1613. <if test="sumVal != null and sumVal != ''">
  1614. and SUM_VAL = #{sumVal}
  1615. </if>
  1616. <if test="tagModulus != null">
  1617. and TAG_MODULUS = #{tagModulus}
  1618. </if>
  1619. <if test="sourceType != null and sourceType != ''">
  1620. and SOURCE_TYPE = #{sourceType}
  1621. </if>
  1622. <if test="tagCol != null and tagCol != ''">
  1623. and TAG_COL = #{tagCol}
  1624. </if>
  1625. <if test="mintimegranid != null and mintimegranid != ''">
  1626. and MINTIMEGRANID = #{mintimegranid}
  1627. </if>
  1628. </where>
  1629. order by itemtype, seqno
  1630. </select>
  1631. </mapper>