OverheadLineMapper.xml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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.jeeplus.modules.sg.overheadline.mapper.OverheadLineMapper">
  4. <select id="getList" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
  5. SELECT
  6. a.simple_describe as 'describe',
  7. a.short_id as wbsCode,
  8. a.parent_node as parentNode,
  9. a.fee_type as feeType,
  10. b.id,
  11. b.original_total_cost as originalTotalCost,
  12. b.original_rg_cost as originalRgCost,
  13. b.original_cbr_cost as originalCbrCost,
  14. b.original_fbr_cost as originalFbrCost,
  15. b.original_jx_cost as originalJxCost,
  16. b.rg_cost as rgCost,
  17. b.cbr_cost as cbrCost,
  18. b.fbr_cost as fbrCost,
  19. b.jx_cost as jxCost,
  20. b.measures_fee1 as measuresFee1,
  21. b.measures_fee2 as measuresFee2,
  22. b.other_cost as otherCost,
  23. b.tex as tex,
  24. b.fees as fees,
  25. b.zjgc_fee as zjgcFee,
  26. b.total_fee as totalFee,
  27. b.original_rate as originalRate,
  28. b.rg_fee_ft as rgFtFee,
  29. b.cbr_fee_ft as cbrFtFee,
  30. b.fbr_fee_ft as fbrFtFee,
  31. b.jx_fee_ft as jxFtFee,
  32. b.gx_fee as gxFee
  33. FROM sg_wbs_elements a LEFT JOIN sg_fee_detail_jkxl b on a.short_id = b.wbs_code
  34. and b.id = #{id}
  35. <where>
  36. a.state = '1' and project_type = #{type}
  37. </where>
  38. </select>
  39. <select id="getData" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
  40. SELECT
  41. a.simple_describe as 'describe',
  42. a.short_id as wbsCode,
  43. a.parent_node as parentNode,
  44. a.fee_type as feeType,
  45. b.id,
  46. b.original_total_cost as originalTotalCost,
  47. b.original_rg_cost as originalRgCost,
  48. b.original_cbr_cost as originalCbrCost,
  49. b.original_fbr_cost as originalFbrCost,
  50. b.original_jx_cost as originalJxCost,
  51. b.rg_cost as rgCost,
  52. b.cbr_cost as cbrCost,
  53. b.fbr_cost as fbrCost,
  54. b.jx_cost as jxCost,
  55. b.measures_fee1 as measuresFee1,
  56. b.measures_fee2 as measuresFee2,
  57. b.measures_fee3 as measuresFee3,
  58. b.other_cost as otherCost,
  59. b.tex as tex,
  60. b.fees as fees,
  61. b.zjgc_fee as zjgcFee,
  62. b.total_fee as totalFee,
  63. b.original_rate as originalRate,
  64. b.rg_fee_ft as rgFtFee,
  65. b.cbr_fee_ft as cbrFtFee,
  66. b.fbr_fee_ft as fbrFtFee,
  67. b.jx_fee_ft as jxFtFee
  68. FROM sg_wbs_elements a LEFT JOIN sg_fee_detail_jkxl b on a.short_id = b.wbs_code
  69. <where>
  70. b.id = #{id} and a.short_id = #{wbsCode}
  71. </where>
  72. </select>
  73. <select id="findList" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
  74. SELECT
  75. a.id as wbsId,
  76. a.project_id as projectId,
  77. a.describe,
  78. a.short_id as wbsCode,
  79. a.subject_allocate as subjectAllocate,
  80. a.mount_matter as mountMatter,
  81. a.mount_server as mountServer,
  82. b.original_total_cost as originalTotalCost,
  83. b.original_rg_cost as originalRgCost,
  84. b.original_cbr_cost as originalCbrCost,
  85. b.original_fbr_cost as originalFbrCost,
  86. b.original_jx_cost as originalJxCost,
  87. b.rg_cost as rgCost,
  88. b.cbr_cost as cbrCost,
  89. b.fbr_cost as fbrCost,
  90. b.jx_cost as jxCost,
  91. b.measures_fee1 as measuresFee1,
  92. b.measures_fee2 as measuresFee2,
  93. b.measures_fee3 as measuresFee3,
  94. b.other_cost as otherCost,
  95. b.tex as tex,
  96. b.fees as fees,
  97. b.zjgc_fee as zjgcFee,
  98. b.total_fee as totalFee
  99. FROM sg_wbs_elements a LEFT JOIN sg_fee_detail_jkxl b on a.short_id = b.wbs_code
  100. and b.id = #{id}
  101. <where>
  102. <if test="type != ''">
  103. project_type = #{type}
  104. </if>
  105. </where>
  106. order by a.id
  107. </select>
  108. <select id="getAdjust" parameterType="String" resultType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
  109. select
  110. a.simple_describe as 'describe',
  111. a.short_id as wbsCode
  112. FROM sg_wbs_elements a LEFT JOIN sg_fee_detail_jkxl b on a.short_id = b.wbs_code
  113. <where>
  114. b.id = #{id} and b.original_total_cost is not null
  115. </where>
  116. </select>
  117. <insert id="save" parameterType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
  118. insert into sg_fee_detail_jkxl
  119. (id,
  120. wbs_code,
  121. original_total_cost,
  122. original_rate,
  123. original_rg_cost,
  124. original_cbr_cost,
  125. original_fbr_cost,
  126. original_jx_cost,
  127. rg_cost,
  128. cbr_cost,
  129. fbr_cost,
  130. jx_cost,
  131. measures_fee1,
  132. measures_fee2,
  133. measures_fee3,
  134. other_cost,
  135. fees,
  136. tex,
  137. total_fee,
  138. zjgc_fee,
  139. rg_fee_ft,
  140. cbr_fee_ft,
  141. fbr_fee_ft,
  142. jx_fee_ft,
  143. gx_fee
  144. ) values (
  145. #{id},
  146. #{wbsCode},
  147. #{originalTotalCost},
  148. #{originalRate},
  149. #{originalRgCost},
  150. #{originalCbrCost},
  151. #{originalFbrCost},
  152. #{originalJxCost},
  153. #{rgCost},
  154. #{cbrCost},
  155. #{fbrCost},
  156. #{jxCost},
  157. #{measuresFee1},
  158. #{measuresFee2},
  159. #{measuresFee3},
  160. #{otherCost},
  161. #{fees},
  162. #{tex},
  163. #{totalFee},
  164. #{zjgcFee},
  165. #{rgFtFee},
  166. #{cbrFtFee},
  167. #{fbrFtFee},
  168. #{jxFtFee},
  169. #{gxFee}
  170. )
  171. </insert>
  172. <update id="updateDate" parameterType="com.jeeplus.modules.sg.overheadline.entity.JkxlDetailFee">
  173. update sg_fee_detail_jkxl set
  174. <if test="rgFtFee != null and rgFtFee != ''">
  175. rg_fee_ft = #{rgFtFee},
  176. </if>
  177. <if test="cbrFtFee != null and cbrFtFee != ''">
  178. cbr_fee_ft = #{cbrFtFee},
  179. </if>
  180. <if test="fbrFtFee != null and fbrFtFee != ''">
  181. fbr_fee_ft = #{fbrFtFee},
  182. </if>
  183. <if test="jxFtFee != null and jxFtFee != ''">
  184. jx_fee_ft = #{jxFtFee},
  185. </if>
  186. <if test="measuresFee1 != null and measuresFee1 != ''">
  187. measures_fee1 = #{measuresFee1},
  188. </if>
  189. <if test="measuresFee2 != null and measuresFee2 != ''">
  190. measures_fee2 = #{measuresFee2},
  191. </if>
  192. <if test="measuresFee3 != null and measuresFee3 != ''">
  193. measures_fee3 = #{measuresFee3},
  194. </if>
  195. <if test="otherCost != null and otherCost != ''">
  196. other_cost = #{otherCost},
  197. </if>
  198. <if test="fees != null and fees != ''">
  199. fees = #{fees},
  200. </if>
  201. <if test="tex != null and tex != ''">
  202. tex = #{tex},
  203. </if>
  204. <if test="totalFee != null and totalFee != ''">
  205. total_fee = #{totalFee},
  206. </if>
  207. id = #{id}
  208. <where>
  209. id = #{id} and wbs_code = #{wbsCode}
  210. </where>
  211. </update>
  212. <delete id="delete" parameterType="String">
  213. delete from sg_fee_detail_jkxl
  214. <where>
  215. id = #{id}
  216. </where>
  217. </delete>
  218. </mapper>