TTaskMidMapper.xml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623
  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.goafanti.common.dao.TTaskMidMapper">
  4. <resultMap id="BaseResultMap" type="com.goafanti.common.model.TTaskMid">
  5. <id column="id" jdbcType="INTEGER" property="id" />
  6. <result column="tid" jdbcType="INTEGER" property="tid" />
  7. <result column="cost_amount" jdbcType="DECIMAL" property="costAmount" />
  8. <result column="party_amount" jdbcType="DECIMAL" property="partyAmount" />
  9. <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
  10. <result column="certificates_count" jdbcType="INTEGER" property="certificatesCount" />
  11. <result column="urgent_day" jdbcType="INTEGER" property="urgentDay" />
  12. <result column="if_material" jdbcType="INTEGER" property="ifMaterial" />
  13. <result column="reject_count" jdbcType="INTEGER" property="rejectCount" />
  14. <result column="accept_count" jdbcType="INTEGER" property="acceptCount" />
  15. <result column="end_count" jdbcType="INTEGER" property="endCount" />
  16. <result column="authorize_count" jdbcType="INTEGER" property="authorizeCount" />
  17. <result column="apply_count" jdbcType="INTEGER" property="applyCount" />
  18. <result column="high_new_retrial" jdbcType="INTEGER" property="highNewRetrial" />
  19. <result column="dispatch_count" jdbcType="INTEGER" property="dispatchCount" />
  20. <result column="stock_count" jdbcType="INTEGER" property="stockCount" />
  21. <result column="complete_count" jdbcType="INTEGER" property="completeCount" />
  22. <result column="promulgate_count" jdbcType="INTEGER" property="promulgateCount" />
  23. <result column="dispatch_province" jdbcType="INTEGER" property="dispatchProvince" />
  24. <result column="duty_dep" jdbcType="VARCHAR" property="dutyDep" />
  25. <result column="set_up_count" jdbcType="INTEGER" property="setUpCount" />
  26. <result column="spot_check_count" jdbcType="INTEGER" property="spotCheckCount" />
  27. <result column="fail_count" jdbcType="INTEGER" property="failCount" />
  28. <result column="last_year" jdbcType="VARCHAR" property="lastYear" />
  29. <result column="last_year_capital" jdbcType="DECIMAL" property="lastYearCapital" />
  30. <result column="last_year_income" jdbcType="DECIMAL" property="lastYearIncome" />
  31. <result column="cost_actual" jdbcType="DECIMAL" property="costActual" />
  32. <result column="patent_cost" jdbcType="DECIMAL" property="patentCost" />
  33. <result column="patent_cost_actual" jdbcType="DECIMAL" property="patentCostActual" />
  34. <result column="soft_cost" jdbcType="DECIMAL" property="softCost" />
  35. <result column="soft_cost_actual" jdbcType="DECIMAL" property="softCostActual" />
  36. <result column="audit_cost" jdbcType="DECIMAL" property="auditCost" />
  37. <result column="audit_cost_actual" jdbcType="DECIMAL" property="auditCostActual" />
  38. <result column="other_cost" jdbcType="DECIMAL" property="otherCost" />
  39. <result column="other_cost_actual" jdbcType="DECIMAL" property="otherCostActual" />
  40. <result column="expect_profit" jdbcType="DECIMAL" property="expectProfit" />
  41. <result column="actual_profit" jdbcType="DECIMAL" property="actualProfit" />
  42. <result column="stopStatus" jdbcType="INTEGER" property="stopstatus" />
  43. </resultMap>
  44. <sql id="Base_Column_List">
  45. id, tid, cost_amount, party_amount, create_time, certificates_count, urgent_day,
  46. if_material, reject_count, accept_count, end_count, authorize_count, apply_count,
  47. high_new_retrial, dispatch_count, stock_count, complete_count, promulgate_count,
  48. dispatch_province, duty_dep, set_up_count, spot_check_count, fail_count, last_year,
  49. last_year_capital, last_year_income, cost_actual, patent_cost, patent_cost_actual,
  50. soft_cost, soft_cost_actual, audit_cost, audit_cost_actual, other_cost, other_cost_actual,
  51. expect_profit, actual_profit, stopStatus
  52. </sql>
  53. <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
  54. select
  55. <include refid="Base_Column_List" />
  56. from t_task_mid
  57. where id = #{id,jdbcType=INTEGER}
  58. </select>
  59. <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
  60. delete from t_task_mid
  61. where id = #{id,jdbcType=INTEGER}
  62. </delete>
  63. <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskMid" useGeneratedKeys="true">
  64. insert into t_task_mid (tid, cost_amount, party_amount,
  65. create_time, certificates_count, urgent_day,
  66. if_material, reject_count, accept_count,
  67. end_count, authorize_count, apply_count,
  68. high_new_retrial, dispatch_count, stock_count,
  69. complete_count, promulgate_count, dispatch_province,
  70. duty_dep, set_up_count, spot_check_count,
  71. fail_count, last_year, last_year_capital,
  72. last_year_income, cost_actual, patent_cost,
  73. patent_cost_actual, soft_cost, soft_cost_actual,
  74. audit_cost, audit_cost_actual, other_cost,
  75. other_cost_actual, expect_profit, actual_profit,
  76. stopStatus)
  77. values (#{tid,jdbcType=INTEGER}, #{costAmount,jdbcType=DECIMAL}, #{partyAmount,jdbcType=DECIMAL},
  78. #{createTime,jdbcType=TIMESTAMP}, #{certificatesCount,jdbcType=INTEGER}, #{urgentDay,jdbcType=INTEGER},
  79. #{ifMaterial,jdbcType=INTEGER}, #{rejectCount,jdbcType=INTEGER}, #{acceptCount,jdbcType=INTEGER},
  80. #{endCount,jdbcType=INTEGER}, #{authorizeCount,jdbcType=INTEGER}, #{applyCount,jdbcType=INTEGER},
  81. #{highNewRetrial,jdbcType=INTEGER}, #{dispatchCount,jdbcType=INTEGER}, #{stockCount,jdbcType=INTEGER},
  82. #{completeCount,jdbcType=INTEGER}, #{promulgateCount,jdbcType=INTEGER}, #{dispatchProvince,jdbcType=INTEGER},
  83. #{dutyDep,jdbcType=VARCHAR}, #{setUpCount,jdbcType=INTEGER}, #{spotCheckCount,jdbcType=INTEGER},
  84. #{failCount,jdbcType=INTEGER}, #{lastYear,jdbcType=VARCHAR}, #{lastYearCapital,jdbcType=DECIMAL},
  85. #{lastYearIncome,jdbcType=DECIMAL}, #{costActual,jdbcType=DECIMAL}, #{patentCost,jdbcType=DECIMAL},
  86. #{patentCostActual,jdbcType=DECIMAL}, #{softCost,jdbcType=DECIMAL}, #{softCostActual,jdbcType=DECIMAL},
  87. #{auditCost,jdbcType=DECIMAL}, #{auditCostActual,jdbcType=DECIMAL}, #{otherCost,jdbcType=DECIMAL},
  88. #{otherCostActual,jdbcType=DECIMAL}, #{expectProfit,jdbcType=DECIMAL}, #{actualProfit,jdbcType=DECIMAL},
  89. #{stopstatus,jdbcType=INTEGER})
  90. </insert>
  91. <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.TTaskMid" useGeneratedKeys="true">
  92. insert into t_task_mid
  93. <trim prefix="(" suffix=")" suffixOverrides=",">
  94. <if test="tid != null">
  95. tid,
  96. </if>
  97. <if test="costAmount != null">
  98. cost_amount,
  99. </if>
  100. <if test="partyAmount != null">
  101. party_amount,
  102. </if>
  103. <if test="createTime != null">
  104. create_time,
  105. </if>
  106. <if test="certificatesCount != null">
  107. certificates_count,
  108. </if>
  109. <if test="urgentDay != null">
  110. urgent_day,
  111. </if>
  112. <if test="ifMaterial != null">
  113. if_material,
  114. </if>
  115. <if test="rejectCount != null">
  116. reject_count,
  117. </if>
  118. <if test="acceptCount != null">
  119. accept_count,
  120. </if>
  121. <if test="endCount != null">
  122. end_count,
  123. </if>
  124. <if test="authorizeCount != null">
  125. authorize_count,
  126. </if>
  127. <if test="applyCount != null">
  128. apply_count,
  129. </if>
  130. <if test="highNewRetrial != null">
  131. high_new_retrial,
  132. </if>
  133. <if test="dispatchCount != null">
  134. dispatch_count,
  135. </if>
  136. <if test="stockCount != null">
  137. stock_count,
  138. </if>
  139. <if test="completeCount != null">
  140. complete_count,
  141. </if>
  142. <if test="promulgateCount != null">
  143. promulgate_count,
  144. </if>
  145. <if test="dispatchProvince != null">
  146. dispatch_province,
  147. </if>
  148. <if test="dutyDep != null">
  149. duty_dep,
  150. </if>
  151. <if test="setUpCount != null">
  152. set_up_count,
  153. </if>
  154. <if test="spotCheckCount != null">
  155. spot_check_count,
  156. </if>
  157. <if test="failCount != null">
  158. fail_count,
  159. </if>
  160. <if test="lastYear != null">
  161. last_year,
  162. </if>
  163. <if test="lastYearCapital != null">
  164. last_year_capital,
  165. </if>
  166. <if test="lastYearIncome != null">
  167. last_year_income,
  168. </if>
  169. <if test="costActual != null">
  170. cost_actual,
  171. </if>
  172. <if test="patentCost != null">
  173. patent_cost,
  174. </if>
  175. <if test="patentCostActual != null">
  176. patent_cost_actual,
  177. </if>
  178. <if test="softCost != null">
  179. soft_cost,
  180. </if>
  181. <if test="softCostActual != null">
  182. soft_cost_actual,
  183. </if>
  184. <if test="auditCost != null">
  185. audit_cost,
  186. </if>
  187. <if test="auditCostActual != null">
  188. audit_cost_actual,
  189. </if>
  190. <if test="otherCost != null">
  191. other_cost,
  192. </if>
  193. <if test="otherCostActual != null">
  194. other_cost_actual,
  195. </if>
  196. <if test="expectProfit != null">
  197. expect_profit,
  198. </if>
  199. <if test="actualProfit != null">
  200. actual_profit,
  201. </if>
  202. <if test="stopstatus != null">
  203. stopStatus,
  204. </if>
  205. </trim>
  206. <trim prefix="values (" suffix=")" suffixOverrides=",">
  207. <if test="tid != null">
  208. #{tid,jdbcType=INTEGER},
  209. </if>
  210. <if test="costAmount != null">
  211. #{costAmount,jdbcType=DECIMAL},
  212. </if>
  213. <if test="partyAmount != null">
  214. #{partyAmount,jdbcType=DECIMAL},
  215. </if>
  216. <if test="createTime != null">
  217. #{createTime,jdbcType=TIMESTAMP},
  218. </if>
  219. <if test="certificatesCount != null">
  220. #{certificatesCount,jdbcType=INTEGER},
  221. </if>
  222. <if test="urgentDay != null">
  223. #{urgentDay,jdbcType=INTEGER},
  224. </if>
  225. <if test="ifMaterial != null">
  226. #{ifMaterial,jdbcType=INTEGER},
  227. </if>
  228. <if test="rejectCount != null">
  229. #{rejectCount,jdbcType=INTEGER},
  230. </if>
  231. <if test="acceptCount != null">
  232. #{acceptCount,jdbcType=INTEGER},
  233. </if>
  234. <if test="endCount != null">
  235. #{endCount,jdbcType=INTEGER},
  236. </if>
  237. <if test="authorizeCount != null">
  238. #{authorizeCount,jdbcType=INTEGER},
  239. </if>
  240. <if test="applyCount != null">
  241. #{applyCount,jdbcType=INTEGER},
  242. </if>
  243. <if test="highNewRetrial != null">
  244. #{highNewRetrial,jdbcType=INTEGER},
  245. </if>
  246. <if test="dispatchCount != null">
  247. #{dispatchCount,jdbcType=INTEGER},
  248. </if>
  249. <if test="stockCount != null">
  250. #{stockCount,jdbcType=INTEGER},
  251. </if>
  252. <if test="completeCount != null">
  253. #{completeCount,jdbcType=INTEGER},
  254. </if>
  255. <if test="promulgateCount != null">
  256. #{promulgateCount,jdbcType=INTEGER},
  257. </if>
  258. <if test="dispatchProvince != null">
  259. #{dispatchProvince,jdbcType=INTEGER},
  260. </if>
  261. <if test="dutyDep != null">
  262. #{dutyDep,jdbcType=VARCHAR},
  263. </if>
  264. <if test="setUpCount != null">
  265. #{setUpCount,jdbcType=INTEGER},
  266. </if>
  267. <if test="spotCheckCount != null">
  268. #{spotCheckCount,jdbcType=INTEGER},
  269. </if>
  270. <if test="failCount != null">
  271. #{failCount,jdbcType=INTEGER},
  272. </if>
  273. <if test="lastYear != null">
  274. #{lastYear,jdbcType=VARCHAR},
  275. </if>
  276. <if test="lastYearCapital != null">
  277. #{lastYearCapital,jdbcType=DECIMAL},
  278. </if>
  279. <if test="lastYearIncome != null">
  280. #{lastYearIncome,jdbcType=DECIMAL},
  281. </if>
  282. <if test="costActual != null">
  283. #{costActual,jdbcType=DECIMAL},
  284. </if>
  285. <if test="patentCost != null">
  286. #{patentCost,jdbcType=DECIMAL},
  287. </if>
  288. <if test="patentCostActual != null">
  289. #{patentCostActual,jdbcType=DECIMAL},
  290. </if>
  291. <if test="softCost != null">
  292. #{softCost,jdbcType=DECIMAL},
  293. </if>
  294. <if test="softCostActual != null">
  295. #{softCostActual,jdbcType=DECIMAL},
  296. </if>
  297. <if test="auditCost != null">
  298. #{auditCost,jdbcType=DECIMAL},
  299. </if>
  300. <if test="auditCostActual != null">
  301. #{auditCostActual,jdbcType=DECIMAL},
  302. </if>
  303. <if test="otherCost != null">
  304. #{otherCost,jdbcType=DECIMAL},
  305. </if>
  306. <if test="otherCostActual != null">
  307. #{otherCostActual,jdbcType=DECIMAL},
  308. </if>
  309. <if test="expectProfit != null">
  310. #{expectProfit,jdbcType=DECIMAL},
  311. </if>
  312. <if test="actualProfit != null">
  313. #{actualProfit,jdbcType=DECIMAL},
  314. </if>
  315. <if test="stopstatus != null">
  316. #{stopstatus,jdbcType=INTEGER},
  317. </if>
  318. </trim>
  319. </insert>
  320. <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.TTaskMid">
  321. update t_task_mid
  322. <set>
  323. <if test="tid != null">
  324. tid = #{tid,jdbcType=INTEGER},
  325. </if>
  326. <if test="costAmount != null">
  327. cost_amount = #{costAmount,jdbcType=DECIMAL},
  328. </if>
  329. <if test="partyAmount != null">
  330. party_amount = #{partyAmount,jdbcType=DECIMAL},
  331. </if>
  332. <if test="createTime != null">
  333. create_time = #{createTime,jdbcType=TIMESTAMP},
  334. </if>
  335. <if test="certificatesCount != null">
  336. certificates_count = #{certificatesCount,jdbcType=INTEGER},
  337. </if>
  338. <if test="urgentDay != null">
  339. urgent_day = #{urgentDay,jdbcType=INTEGER},
  340. </if>
  341. <if test="ifMaterial != null">
  342. if_material = #{ifMaterial,jdbcType=INTEGER},
  343. </if>
  344. <if test="rejectCount != null">
  345. reject_count = #{rejectCount,jdbcType=INTEGER},
  346. </if>
  347. <if test="acceptCount != null">
  348. accept_count = #{acceptCount,jdbcType=INTEGER},
  349. </if>
  350. <if test="endCount != null">
  351. end_count = #{endCount,jdbcType=INTEGER},
  352. </if>
  353. <if test="authorizeCount != null">
  354. authorize_count = #{authorizeCount,jdbcType=INTEGER},
  355. </if>
  356. <if test="applyCount != null">
  357. apply_count = #{applyCount,jdbcType=INTEGER},
  358. </if>
  359. <if test="highNewRetrial != null">
  360. high_new_retrial = #{highNewRetrial,jdbcType=INTEGER},
  361. </if>
  362. <if test="dispatchCount != null">
  363. dispatch_count = #{dispatchCount,jdbcType=INTEGER},
  364. </if>
  365. <if test="stockCount != null">
  366. stock_count = #{stockCount,jdbcType=INTEGER},
  367. </if>
  368. <if test="completeCount != null">
  369. complete_count = #{completeCount,jdbcType=INTEGER},
  370. </if>
  371. <if test="promulgateCount != null">
  372. promulgate_count = #{promulgateCount,jdbcType=INTEGER},
  373. </if>
  374. <if test="dispatchProvince != null">
  375. dispatch_province = #{dispatchProvince,jdbcType=INTEGER},
  376. </if>
  377. <if test="dutyDep != null">
  378. duty_dep = #{dutyDep,jdbcType=VARCHAR},
  379. </if>
  380. <if test="setUpCount != null">
  381. set_up_count = #{setUpCount,jdbcType=INTEGER},
  382. </if>
  383. <if test="spotCheckCount != null">
  384. spot_check_count = #{spotCheckCount,jdbcType=INTEGER},
  385. </if>
  386. <if test="failCount != null">
  387. fail_count = #{failCount,jdbcType=INTEGER},
  388. </if>
  389. <if test="lastYear != null">
  390. last_year = #{lastYear,jdbcType=VARCHAR},
  391. </if>
  392. <if test="lastYearCapital != null">
  393. last_year_capital = #{lastYearCapital,jdbcType=DECIMAL},
  394. </if>
  395. <if test="lastYearIncome != null">
  396. last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
  397. </if>
  398. <if test="costActual != null">
  399. cost_actual = #{costActual,jdbcType=DECIMAL},
  400. </if>
  401. <if test="patentCost != null">
  402. patent_cost = #{patentCost,jdbcType=DECIMAL},
  403. </if>
  404. <if test="patentCostActual != null">
  405. patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
  406. </if>
  407. <if test="softCost != null">
  408. soft_cost = #{softCost,jdbcType=DECIMAL},
  409. </if>
  410. <if test="softCostActual != null">
  411. soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
  412. </if>
  413. <if test="auditCost != null">
  414. audit_cost = #{auditCost,jdbcType=DECIMAL},
  415. </if>
  416. <if test="auditCostActual != null">
  417. audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
  418. </if>
  419. <if test="otherCost != null">
  420. other_cost = #{otherCost,jdbcType=DECIMAL},
  421. </if>
  422. <if test="otherCostActual != null">
  423. other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
  424. </if>
  425. <if test="expectProfit != null">
  426. expect_profit = #{expectProfit,jdbcType=DECIMAL},
  427. </if>
  428. <if test="actualProfit != null">
  429. actual_profit = #{actualProfit,jdbcType=DECIMAL},
  430. </if>
  431. <if test="stopstatus != null">
  432. stopStatus = #{stopstatus,jdbcType=INTEGER},
  433. </if>
  434. </set>
  435. where id = #{id,jdbcType=INTEGER}
  436. </update>
  437. <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.TTaskMid">
  438. update t_task_mid
  439. set tid = #{tid,jdbcType=INTEGER},
  440. cost_amount = #{costAmount,jdbcType=DECIMAL},
  441. party_amount = #{partyAmount,jdbcType=DECIMAL},
  442. create_time = #{createTime,jdbcType=TIMESTAMP},
  443. certificates_count = #{certificatesCount,jdbcType=INTEGER},
  444. urgent_day = #{urgentDay,jdbcType=INTEGER},
  445. if_material = #{ifMaterial,jdbcType=INTEGER},
  446. reject_count = #{rejectCount,jdbcType=INTEGER},
  447. accept_count = #{acceptCount,jdbcType=INTEGER},
  448. end_count = #{endCount,jdbcType=INTEGER},
  449. authorize_count = #{authorizeCount,jdbcType=INTEGER},
  450. apply_count = #{applyCount,jdbcType=INTEGER},
  451. high_new_retrial = #{highNewRetrial,jdbcType=INTEGER},
  452. dispatch_count = #{dispatchCount,jdbcType=INTEGER},
  453. stock_count = #{stockCount,jdbcType=INTEGER},
  454. complete_count = #{completeCount,jdbcType=INTEGER},
  455. promulgate_count = #{promulgateCount,jdbcType=INTEGER},
  456. dispatch_province = #{dispatchProvince,jdbcType=INTEGER},
  457. duty_dep = #{dutyDep,jdbcType=VARCHAR},
  458. set_up_count = #{setUpCount,jdbcType=INTEGER},
  459. spot_check_count = #{spotCheckCount,jdbcType=INTEGER},
  460. fail_count = #{failCount,jdbcType=INTEGER},
  461. last_year = #{lastYear,jdbcType=VARCHAR},
  462. last_year_capital = #{lastYearCapital,jdbcType=DECIMAL},
  463. last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
  464. cost_actual = #{costActual,jdbcType=DECIMAL},
  465. patent_cost = #{patentCost,jdbcType=DECIMAL},
  466. patent_cost_actual = #{patentCostActual,jdbcType=DECIMAL},
  467. soft_cost = #{softCost,jdbcType=DECIMAL},
  468. soft_cost_actual = #{softCostActual,jdbcType=DECIMAL},
  469. audit_cost = #{auditCost,jdbcType=DECIMAL},
  470. audit_cost_actual = #{auditCostActual,jdbcType=DECIMAL},
  471. other_cost = #{otherCost,jdbcType=DECIMAL},
  472. other_cost_actual = #{otherCostActual,jdbcType=DECIMAL},
  473. expect_profit = #{expectProfit,jdbcType=DECIMAL},
  474. actual_profit = #{actualProfit,jdbcType=DECIMAL},
  475. stopStatus = #{stopstatus,jdbcType=INTEGER}
  476. where id = #{id,jdbcType=INTEGER}
  477. </update>
  478. <update id="updatePaymentAmount">
  479. update t_task_mid
  480. set party_amount = party_amount
  481. <if test="type == 0">
  482. + #{paymentAmount,jdbcType=DECIMAL}
  483. </if>
  484. <if test="type == 1">
  485. - #{paymentAmount,jdbcType=DECIMAL}
  486. </if>
  487. where tid = #{tid,jdbcType=INTEGER}
  488. </update>
  489. <update id="updateCostAmount">
  490. update t_order_task a ,t_task_mid c
  491. set c.cost_amount=#{count},c.party_amount=#{party}
  492. where a.id=c.tid and a.id= #{tid}
  493. </update>
  494. <update id="updateCertificatesCountByTid">
  495. update t_task_mid
  496. set certificates_count= #{count}
  497. where tid= #{tid}
  498. </update>
  499. <update id="updateByTid" parameterType="com.goafanti.common.model.TTaskMid">
  500. update t_task_mid
  501. <set>
  502. <if test="costAmount != null">
  503. cost_amount = #{costAmount,jdbcType=DECIMAL},
  504. </if>
  505. <if test="partyAmount != null">
  506. party_amount = #{partyAmount,jdbcType=DECIMAL},
  507. </if>
  508. <if test="createTime != null">
  509. create_time = #{createTime,jdbcType=TIMESTAMP},
  510. </if>
  511. <if test="certificatesCount != null">
  512. certificates_count = #{certificatesCount,jdbcType=INTEGER},
  513. </if>
  514. <if test="urgentDay != null">
  515. urgent_day = #{urgentDay,jdbcType=INTEGER},
  516. </if>
  517. <if test="ifMaterial != null">
  518. if_material = #{ifMaterial,jdbcType=INTEGER},
  519. </if>
  520. <if test="rejectCount != null">
  521. reject_count = #{rejectCount,jdbcType=INTEGER},
  522. </if>
  523. <if test="acceptCount != null">
  524. accept_count = #{acceptCount,jdbcType=INTEGER},
  525. </if>
  526. <if test="endCount != null">
  527. end_count = #{endCount,jdbcType=INTEGER},
  528. </if>
  529. <if test="authorizeCount != null">
  530. authorize_count = #{authorizeCount,jdbcType=INTEGER},
  531. </if>
  532. <if test="applyCount != null">
  533. apply_count = #{applyCount,jdbcType=INTEGER},
  534. </if>
  535. <if test="highNewRetrial != null">
  536. high_new_retrial = #{highNewRetrial,jdbcType=INTEGER},
  537. </if>
  538. <if test="dispatchCount != null">
  539. dispatch_count = #{dispatchCount,jdbcType=INTEGER},
  540. </if>
  541. <if test="stockCount != null">
  542. stock_count = #{stockCount,jdbcType=INTEGER},
  543. </if>
  544. <if test="completeCount != null">
  545. complete_count = #{completeCount,jdbcType=INTEGER},
  546. </if>
  547. <if test="promulgateCount != null">
  548. promulgate_count = #{promulgateCount,jdbcType=INTEGER},
  549. </if>
  550. <if test="dispatchProvince != null">
  551. dispatch_province = #{dispatchProvince,jdbcType=INTEGER},
  552. </if>
  553. <if test="dutyDep != null">
  554. duty_dep = #{dutyDep,jdbcType=VARCHAR},
  555. </if>
  556. <if test="setUpCount != null">
  557. set_up_count = #{setUpCount,jdbcType=INTEGER},
  558. </if>
  559. <if test="spotCheckCount != null">
  560. spot_check_count = #{spotCheckCount,jdbcType=INTEGER},
  561. </if>
  562. <if test="failCount != null">
  563. fail_count = #{failCount,jdbcType=INTEGER},
  564. </if>
  565. <if test="lastYear != null">
  566. last_year = #{lastYear,jdbcType=VARCHAR},
  567. </if>
  568. <if test="lastYearCapital != null">
  569. last_year_capital = #{lastYearCapital,jdbcType=DECIMAL},
  570. </if>
  571. <if test="lastYearIncome != null">
  572. last_year_income = #{lastYearIncome,jdbcType=DECIMAL},
  573. </if>
  574. </set>
  575. where tid = #{tid,jdbcType=INTEGER}
  576. </update>
  577. <select id="selectCountBytid" resultType="com.goafanti.common.model.TTaskMid">
  578. select a.id,
  579. <if test="type ==0">
  580. ifnull(b.lic,0) certificatesCount
  581. </if>
  582. <if test="type ==1">
  583. ifnull(b.acc ,0)acceptCount, ifnull(b.lic ,0)authorizeCount,ifnull(b.lic ,0)certificatesCount,
  584. ifnull(b.tgc ,0)endCount,ifnull(b.bhc ,0)rejectCount
  585. </if>
  586. <if test="type ==2">
  587. ifnull(b.acc ,0)acceptCount,ifnull(b.lic ,0)certificatesCount,ifnull(b.sqc,0) applyCount,
  588. ifnull(b.bhc,0) rejectCount
  589. </if>
  590. from t_task_mid a left join (select task_id tid,
  591. <if test="type ==0">
  592. sum(if(licence_time is null,0,1))lic from task_progress where task_id= #{tid} GROUP by task_id)b
  593. </if>
  594. <if test="type ==1">
  595. <!-- 下证数与授权数一样,下证统计大于则用下证,小于或者等于用授权统计 -->
  596. sum(if(if(licence_time is null,0,1) &gt; if(authorize_time is null,0,1),
  597. if(licence_time is null,0,1),if(authorize_time is null,0,1)))lic ,ifnull(count(accept_time),0)acc,
  598. sum(if(status=1,1,0))tgc,sum(if(status=2 ,1,0))bhc from task_progress where task_id= #{tid} GROUP by task_id )b
  599. </if>
  600. <if test="type ==2">
  601. count(*)sqc, sum(if(licence_time is null,0,1))lic , sum(if(accept_time is null,0,1))acc,
  602. sum(if(status=2 ,1,0))bhc from task_progress where task_id= #{tid} GROUP by task_id )b
  603. </if>
  604. on a.tid =b.tid
  605. where a.tid= #{tid}
  606. </select>
  607. <select id="getDtails" resultType="com.goafanti.common.model.TTaskMid">
  608. select a.id tid,dg.id dispatchProvince,tr.department_id dutyDep
  609. from t_order_task a left join t_order_new b on a.order_no =b.order_no
  610. left join department c on b.order_dep =c.id left join admin tr on a.task_receiver =tr.id
  611. left join district_glossory dg on c.province =dg.id
  612. where a.id= #{id};
  613. </select>
  614. </mapper>