TTaskMidMapper.xml 25 KB

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