WindPowerStationTestingPointMapper.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461
  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.gyee.frame.mapper.auto.WindPowerStationTestingPointMapper">
  4. <resultMap id="BaseResultMap" type="com.gyee.frame.model.auto.WindPowerStationTestingPoint">
  5. <!--
  6. WARNING - @mbg.generated
  7. This element is automatically generated by MyBatis Generator, do not modify.
  8. -->
  9. <id column="CODE" jdbcType="VARCHAR" property="code" />
  10. <result column="NAME" jdbcType="VARCHAR" property="name" />
  11. <result column="MODEL" jdbcType="VARCHAR" property="model" />
  12. <result column="VALUEUNIT" jdbcType="VARCHAR" property="valueunit" />
  13. <result column="ENGLISHNAME" jdbcType="VARCHAR" property="englishname" />
  14. <result column="TYPEID" jdbcType="VARCHAR" property="typeid" />
  15. <result column="MODELID" jdbcType="VARCHAR" property="modelid" />
  16. <result column="MAXVAL" jdbcType="DECIMAL" property="maxval" />
  17. <result column="MINVAL" jdbcType="DECIMAL" property="minval" />
  18. <result column="REASONABLEMAXVAL" jdbcType="DECIMAL" property="reasonablemaxval" />
  19. <result column="REASONABLEMINVAL" jdbcType="DECIMAL" property="reasonableminval" />
  20. <result column="UNIFORMCODE" jdbcType="VARCHAR" property="uniformcode" />
  21. <result column="SHORTID" jdbcType="VARCHAR" property="shortid" />
  22. <result column="LONGID" jdbcType="VARCHAR" property="longid" />
  23. <result column="WINDPOWERSTATIONID" jdbcType="VARCHAR" property="windpowerstationid" />
  24. <result column="REALTIMEID" jdbcType="VARCHAR" property="realtimeid" />
  25. </resultMap>
  26. <sql id="Example_Where_Clause">
  27. <!--
  28. WARNING - @mbg.generated
  29. This element is automatically generated by MyBatis Generator, do not modify.
  30. -->
  31. <where>
  32. <foreach collection="oredCriteria" item="criteria" separator="or">
  33. <if test="criteria.valid">
  34. <trim prefix="(" prefixOverrides="and" suffix=")">
  35. <foreach collection="criteria.criteria" item="criterion">
  36. <choose>
  37. <when test="criterion.noValue">
  38. and ${criterion.condition}
  39. </when>
  40. <when test="criterion.singleValue">
  41. and ${criterion.condition} #{criterion.value}
  42. </when>
  43. <when test="criterion.betweenValue">
  44. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  45. </when>
  46. <when test="criterion.listValue">
  47. and ${criterion.condition}
  48. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  49. #{listItem}
  50. </foreach>
  51. </when>
  52. </choose>
  53. </foreach>
  54. </trim>
  55. </if>
  56. </foreach>
  57. </where>
  58. </sql>
  59. <sql id="Update_By_Example_Where_Clause">
  60. <!--
  61. WARNING - @mbg.generated
  62. This element is automatically generated by MyBatis Generator, do not modify.
  63. -->
  64. <where>
  65. <foreach collection="example.oredCriteria" item="criteria" separator="or">
  66. <if test="criteria.valid">
  67. <trim prefix="(" prefixOverrides="and" suffix=")">
  68. <foreach collection="criteria.criteria" item="criterion">
  69. <choose>
  70. <when test="criterion.noValue">
  71. and ${criterion.condition}
  72. </when>
  73. <when test="criterion.singleValue">
  74. and ${criterion.condition} #{criterion.value}
  75. </when>
  76. <when test="criterion.betweenValue">
  77. and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
  78. </when>
  79. <when test="criterion.listValue">
  80. and ${criterion.condition}
  81. <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
  82. #{listItem}
  83. </foreach>
  84. </when>
  85. </choose>
  86. </foreach>
  87. </trim>
  88. </if>
  89. </foreach>
  90. </where>
  91. </sql>
  92. <sql id="Base_Column_List">
  93. <!--
  94. WARNING - @mbg.generated
  95. This element is automatically generated by MyBatis Generator, do not modify.
  96. -->
  97. CODE, NAME, MODEL, VALUEUNIT, ENGLISHNAME, TYPEID, MODELID, MAXVAL, MINVAL, REASONABLEMAXVAL,
  98. REASONABLEMINVAL, UNIFORMCODE, SHORTID, LONGID, WINDPOWERSTATIONID, REALTIMEID
  99. </sql>
  100. <select id="selectByExample" parameterType="com.gyee.frame.model.auto.WindPowerStationTestingPointExample" resultMap="BaseResultMap">
  101. <!--
  102. WARNING - @mbg.generated
  103. This element is automatically generated by MyBatis Generator, do not modify.
  104. -->
  105. select
  106. <if test="distinct">
  107. distinct
  108. </if>
  109. <include refid="Base_Column_List" />
  110. from WINDPOWERSTATIONTESTINGPOINT
  111. <if test="_parameter != null">
  112. <include refid="Example_Where_Clause" />
  113. </if>
  114. <if test="orderByClause != null">
  115. order by ${orderByClause}
  116. </if>
  117. </select>
  118. <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
  119. <!--
  120. WARNING - @mbg.generated
  121. This element is automatically generated by MyBatis Generator, do not modify.
  122. -->
  123. select
  124. <include refid="Base_Column_List" />
  125. from WINDPOWERSTATIONTESTINGPOINT
  126. where CODE = #{code,jdbcType=VARCHAR}
  127. </select>
  128. <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
  129. <!--
  130. WARNING - @mbg.generated
  131. This element is automatically generated by MyBatis Generator, do not modify.
  132. -->
  133. delete from WINDPOWERSTATIONTESTINGPOINT
  134. where CODE = #{code,jdbcType=VARCHAR}
  135. </delete>
  136. <delete id="deleteByExample" parameterType="com.gyee.frame.model.auto.WindPowerStationTestingPointExample">
  137. <!--
  138. WARNING - @mbg.generated
  139. This element is automatically generated by MyBatis Generator, do not modify.
  140. -->
  141. delete from WINDPOWERSTATIONTESTINGPOINT
  142. <if test="_parameter != null">
  143. <include refid="Example_Where_Clause" />
  144. </if>
  145. </delete>
  146. <insert id="insert" parameterType="com.gyee.frame.model.auto.WindPowerStationTestingPoint">
  147. <!--
  148. WARNING - @mbg.generated
  149. This element is automatically generated by MyBatis Generator, do not modify.
  150. -->
  151. insert into WINDPOWERSTATIONTESTINGPOINT (CODE, NAME, MODEL,
  152. VALUEUNIT, ENGLISHNAME, TYPEID,
  153. MODELID, MAXVAL, MINVAL,
  154. REASONABLEMAXVAL, REASONABLEMINVAL, UNIFORMCODE,
  155. SHORTID, LONGID, WINDPOWERSTATIONID,
  156. REALTIMEID)
  157. values (#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{model,jdbcType=VARCHAR},
  158. #{valueunit,jdbcType=VARCHAR}, #{englishname,jdbcType=VARCHAR}, #{typeid,jdbcType=VARCHAR},
  159. #{modelid,jdbcType=VARCHAR}, #{maxval,jdbcType=DECIMAL}, #{minval,jdbcType=DECIMAL},
  160. #{reasonablemaxval,jdbcType=DECIMAL}, #{reasonableminval,jdbcType=DECIMAL}, #{uniformcode,jdbcType=VARCHAR},
  161. #{shortid,jdbcType=VARCHAR}, #{longid,jdbcType=VARCHAR}, #{windpowerstationid,jdbcType=VARCHAR},
  162. #{realtimeid,jdbcType=VARCHAR})
  163. </insert>
  164. <insert id="insertSelective" parameterType="com.gyee.frame.model.auto.WindPowerStationTestingPoint">
  165. <!--
  166. WARNING - @mbg.generated
  167. This element is automatically generated by MyBatis Generator, do not modify.
  168. -->
  169. insert into WINDPOWERSTATIONTESTINGPOINT
  170. <trim prefix="(" suffix=")" suffixOverrides=",">
  171. <if test="code != null">
  172. CODE,
  173. </if>
  174. <if test="name != null">
  175. NAME,
  176. </if>
  177. <if test="model != null">
  178. MODEL,
  179. </if>
  180. <if test="valueunit != null">
  181. VALUEUNIT,
  182. </if>
  183. <if test="englishname != null">
  184. ENGLISHNAME,
  185. </if>
  186. <if test="typeid != null">
  187. TYPEID,
  188. </if>
  189. <if test="modelid != null">
  190. MODELID,
  191. </if>
  192. <if test="maxval != null">
  193. MAXVAL,
  194. </if>
  195. <if test="minval != null">
  196. MINVAL,
  197. </if>
  198. <if test="reasonablemaxval != null">
  199. REASONABLEMAXVAL,
  200. </if>
  201. <if test="reasonableminval != null">
  202. REASONABLEMINVAL,
  203. </if>
  204. <if test="uniformcode != null">
  205. UNIFORMCODE,
  206. </if>
  207. <if test="shortid != null">
  208. SHORTID,
  209. </if>
  210. <if test="longid != null">
  211. LONGID,
  212. </if>
  213. <if test="windpowerstationid != null">
  214. WINDPOWERSTATIONID,
  215. </if>
  216. <if test="realtimeid != null">
  217. REALTIMEID,
  218. </if>
  219. </trim>
  220. <trim prefix="values (" suffix=")" suffixOverrides=",">
  221. <if test="code != null">
  222. #{code,jdbcType=VARCHAR},
  223. </if>
  224. <if test="name != null">
  225. #{name,jdbcType=VARCHAR},
  226. </if>
  227. <if test="model != null">
  228. #{model,jdbcType=VARCHAR},
  229. </if>
  230. <if test="valueunit != null">
  231. #{valueunit,jdbcType=VARCHAR},
  232. </if>
  233. <if test="englishname != null">
  234. #{englishname,jdbcType=VARCHAR},
  235. </if>
  236. <if test="typeid != null">
  237. #{typeid,jdbcType=VARCHAR},
  238. </if>
  239. <if test="modelid != null">
  240. #{modelid,jdbcType=VARCHAR},
  241. </if>
  242. <if test="maxval != null">
  243. #{maxval,jdbcType=DECIMAL},
  244. </if>
  245. <if test="minval != null">
  246. #{minval,jdbcType=DECIMAL},
  247. </if>
  248. <if test="reasonablemaxval != null">
  249. #{reasonablemaxval,jdbcType=DECIMAL},
  250. </if>
  251. <if test="reasonableminval != null">
  252. #{reasonableminval,jdbcType=DECIMAL},
  253. </if>
  254. <if test="uniformcode != null">
  255. #{uniformcode,jdbcType=VARCHAR},
  256. </if>
  257. <if test="shortid != null">
  258. #{shortid,jdbcType=VARCHAR},
  259. </if>
  260. <if test="longid != null">
  261. #{longid,jdbcType=VARCHAR},
  262. </if>
  263. <if test="windpowerstationid != null">
  264. #{windpowerstationid,jdbcType=VARCHAR},
  265. </if>
  266. <if test="realtimeid != null">
  267. #{realtimeid,jdbcType=VARCHAR},
  268. </if>
  269. </trim>
  270. </insert>
  271. <select id="countByExample" parameterType="com.gyee.frame.model.auto.WindPowerStationTestingPointExample" resultType="java.lang.Long">
  272. <!--
  273. WARNING - @mbg.generated
  274. This element is automatically generated by MyBatis Generator, do not modify.
  275. -->
  276. select count(*) from WINDPOWERSTATIONTESTINGPOINT
  277. <if test="_parameter != null">
  278. <include refid="Example_Where_Clause" />
  279. </if>
  280. </select>
  281. <update id="updateByExampleSelective" parameterType="map">
  282. <!--
  283. WARNING - @mbg.generated
  284. This element is automatically generated by MyBatis Generator, do not modify.
  285. -->
  286. update WINDPOWERSTATIONTESTINGPOINT
  287. <set>
  288. <if test="record.code != null">
  289. CODE = #{record.code,jdbcType=VARCHAR},
  290. </if>
  291. <if test="record.name != null">
  292. NAME = #{record.name,jdbcType=VARCHAR},
  293. </if>
  294. <if test="record.model != null">
  295. MODEL = #{record.model,jdbcType=VARCHAR},
  296. </if>
  297. <if test="record.valueunit != null">
  298. VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
  299. </if>
  300. <if test="record.englishname != null">
  301. ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
  302. </if>
  303. <if test="record.typeid != null">
  304. TYPEID = #{record.typeid,jdbcType=VARCHAR},
  305. </if>
  306. <if test="record.modelid != null">
  307. MODELID = #{record.modelid,jdbcType=VARCHAR},
  308. </if>
  309. <if test="record.maxval != null">
  310. MAXVAL = #{record.maxval,jdbcType=DECIMAL},
  311. </if>
  312. <if test="record.minval != null">
  313. MINVAL = #{record.minval,jdbcType=DECIMAL},
  314. </if>
  315. <if test="record.reasonablemaxval != null">
  316. REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
  317. </if>
  318. <if test="record.reasonableminval != null">
  319. REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
  320. </if>
  321. <if test="record.uniformcode != null">
  322. UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
  323. </if>
  324. <if test="record.shortid != null">
  325. SHORTID = #{record.shortid,jdbcType=VARCHAR},
  326. </if>
  327. <if test="record.longid != null">
  328. LONGID = #{record.longid,jdbcType=VARCHAR},
  329. </if>
  330. <if test="record.windpowerstationid != null">
  331. WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
  332. </if>
  333. <if test="record.realtimeid != null">
  334. REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR},
  335. </if>
  336. </set>
  337. <if test="_parameter != null">
  338. <include refid="Update_By_Example_Where_Clause" />
  339. </if>
  340. </update>
  341. <update id="updateByExample" parameterType="map">
  342. <!--
  343. WARNING - @mbg.generated
  344. This element is automatically generated by MyBatis Generator, do not modify.
  345. -->
  346. update WINDPOWERSTATIONTESTINGPOINT
  347. set CODE = #{record.code,jdbcType=VARCHAR},
  348. NAME = #{record.name,jdbcType=VARCHAR},
  349. MODEL = #{record.model,jdbcType=VARCHAR},
  350. VALUEUNIT = #{record.valueunit,jdbcType=VARCHAR},
  351. ENGLISHNAME = #{record.englishname,jdbcType=VARCHAR},
  352. TYPEID = #{record.typeid,jdbcType=VARCHAR},
  353. MODELID = #{record.modelid,jdbcType=VARCHAR},
  354. MAXVAL = #{record.maxval,jdbcType=DECIMAL},
  355. MINVAL = #{record.minval,jdbcType=DECIMAL},
  356. REASONABLEMAXVAL = #{record.reasonablemaxval,jdbcType=DECIMAL},
  357. REASONABLEMINVAL = #{record.reasonableminval,jdbcType=DECIMAL},
  358. UNIFORMCODE = #{record.uniformcode,jdbcType=VARCHAR},
  359. SHORTID = #{record.shortid,jdbcType=VARCHAR},
  360. LONGID = #{record.longid,jdbcType=VARCHAR},
  361. WINDPOWERSTATIONID = #{record.windpowerstationid,jdbcType=VARCHAR},
  362. REALTIMEID = #{record.realtimeid,jdbcType=VARCHAR}
  363. <if test="_parameter != null">
  364. <include refid="Update_By_Example_Where_Clause" />
  365. </if>
  366. </update>
  367. <update id="updateByPrimaryKeySelective" parameterType="com.gyee.frame.model.auto.WindPowerStationTestingPoint">
  368. <!--
  369. WARNING - @mbg.generated
  370. This element is automatically generated by MyBatis Generator, do not modify.
  371. -->
  372. update WINDPOWERSTATIONTESTINGPOINT
  373. <set>
  374. <if test="name != null">
  375. NAME = #{name,jdbcType=VARCHAR},
  376. </if>
  377. <if test="model != null">
  378. MODEL = #{model,jdbcType=VARCHAR},
  379. </if>
  380. <if test="valueunit != null">
  381. VALUEUNIT = #{valueunit,jdbcType=VARCHAR},
  382. </if>
  383. <if test="englishname != null">
  384. ENGLISHNAME = #{englishname,jdbcType=VARCHAR},
  385. </if>
  386. <if test="typeid != null">
  387. TYPEID = #{typeid,jdbcType=VARCHAR},
  388. </if>
  389. <if test="modelid != null">
  390. MODELID = #{modelid,jdbcType=VARCHAR},
  391. </if>
  392. <if test="maxval != null">
  393. MAXVAL = #{maxval,jdbcType=DECIMAL},
  394. </if>
  395. <if test="minval != null">
  396. MINVAL = #{minval,jdbcType=DECIMAL},
  397. </if>
  398. <if test="reasonablemaxval != null">
  399. REASONABLEMAXVAL = #{reasonablemaxval,jdbcType=DECIMAL},
  400. </if>
  401. <if test="reasonableminval != null">
  402. REASONABLEMINVAL = #{reasonableminval,jdbcType=DECIMAL},
  403. </if>
  404. <if test="uniformcode != null">
  405. UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
  406. </if>
  407. <if test="shortid != null">
  408. SHORTID = #{shortid,jdbcType=VARCHAR},
  409. </if>
  410. <if test="longid != null">
  411. LONGID = #{longid,jdbcType=VARCHAR},
  412. </if>
  413. <if test="windpowerstationid != null">
  414. WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
  415. </if>
  416. <if test="realtimeid != null">
  417. REALTIMEID = #{realtimeid,jdbcType=VARCHAR},
  418. </if>
  419. </set>
  420. where CODE = #{code,jdbcType=VARCHAR}
  421. </update>
  422. <update id="updateByPrimaryKey" parameterType="com.gyee.frame.model.auto.WindPowerStationTestingPoint">
  423. <!--
  424. WARNING - @mbg.generated
  425. This element is automatically generated by MyBatis Generator, do not modify.
  426. -->
  427. update WINDPOWERSTATIONTESTINGPOINT
  428. set NAME = #{name,jdbcType=VARCHAR},
  429. MODEL = #{model,jdbcType=VARCHAR},
  430. VALUEUNIT = #{valueunit,jdbcType=VARCHAR},
  431. ENGLISHNAME = #{englishname,jdbcType=VARCHAR},
  432. TYPEID = #{typeid,jdbcType=VARCHAR},
  433. MODELID = #{modelid,jdbcType=VARCHAR},
  434. MAXVAL = #{maxval,jdbcType=DECIMAL},
  435. MINVAL = #{minval,jdbcType=DECIMAL},
  436. REASONABLEMAXVAL = #{reasonablemaxval,jdbcType=DECIMAL},
  437. REASONABLEMINVAL = #{reasonableminval,jdbcType=DECIMAL},
  438. UNIFORMCODE = #{uniformcode,jdbcType=VARCHAR},
  439. SHORTID = #{shortid,jdbcType=VARCHAR},
  440. LONGID = #{longid,jdbcType=VARCHAR},
  441. WINDPOWERSTATIONID = #{windpowerstationid,jdbcType=VARCHAR},
  442. REALTIMEID = #{realtimeid,jdbcType=VARCHAR}
  443. where CODE = #{code,jdbcType=VARCHAR}
  444. </update>
  445. <select id="getWpPointTotal" resultType="com.gyee.frame.model.custom.SimpleVo" >
  446. select count(*) value
  447. from view_tspoint where
  448. <if test="wpId != null">
  449. ID LIKE '%${wpId}%' and
  450. </if>
  451. <if test="type != null">
  452. id like '%JSFW%'
  453. </if>
  454. <if test="type == null">
  455. id not like '%JSFW%'
  456. </if>
  457. </select>
  458. </mapper>