TTaskMidMapper.xml 25 KB

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