ProcessInfoMapper.xml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.opt.mapper.ProcessInfoMapper">
  6. <resultMap type="ProcessInfo" id="ProcessInfoResult">
  7. <result property="pId" column="p_id" />
  8. <result property="processId" column="process_id" />
  9. <result property="processStsCd" column="process_sts_cd" />
  10. <result property="premiumAmt" column="premium_amt" />
  11. <result property="policyNo" column="policy_no" />
  12. <result property="loanAmt" column="loan_amt" />
  13. <result property="policySignUrl" column="policy_sign_url" />
  14. <result property="policyDlUrl" column="policy_dl_url" />
  15. <result property="eInvoiceUrl" column="e_invoice_url" />
  16. <result property="projectId" column="project_id" />
  17. <result property="companyId" column="company_id" />
  18. <result property="expireTime" column="expire_time" />
  19. <result property="approvedTime" column="approved_time" />
  20. <result property="postscript" column="postscript" />
  21. <result property="rejectReason" column="reject_reason" />
  22. <result property="applyTime" column="apply_time" />
  23. <result property="createBy" column="create_by" />
  24. <result property="updateBy" column="update_by" />
  25. <result property="updateTime" column="update_time" />
  26. <result property="projectNm" column="project_nm" />
  27. <result property="tenderNo" column="tender_no" />
  28. <result property="bidOpenTime" column="bid_open_time" />
  29. <result property="companyNm" column="company_nm" />
  30. <result property="applyNm" column="apply_nm" />
  31. <result property="applyTel" column="apply_tel" />
  32. </resultMap>
  33. <sql id="selectProcessInfoVo">
  34. select t.p_id, t.process_id, t.process_sts_cd, t.premium_amt, t.policy_no, t.loan_amt, t.policy_sign_url, t.policy_dl_url, t.e_invoice_url, t.project_id, t.company_id, t.expire_time, t.approved_time, t.postscript, t.reject_reason, t.apply_time, t.create_by, t.update_by, t.update_time,
  35. p.project_nm, p.tender_no, p.bid_open_time, c.company_nm, c.apply_nm, c.apply_tel
  36. from t_process_info t INNER JOIN t_project_info p ON p.project_id = t.project_id INNER JOIN t_company_info c ON c.company_id = t.company_id
  37. </sql>
  38. <select id="selectProcessInfoList" parameterType="ProcessInfo" resultMap="ProcessInfoResult">
  39. <include refid="selectProcessInfoVo"/>
  40. <where>
  41. <if test="processId != null and processId != ''"> and t.process_id like concat('%', #{processId}, '%')</if>
  42. <if test="processStsCd != null and processStsCd != ''"> and t.process_sts_cd = #{processStsCd}</if>
  43. <if test="projectId != null "> and t.project_id like concat('%', #{projectId}, '%')</if>
  44. <if test="companyNm != null "> and c.company_nm like concat('%', #{companyNm}, '%')</if>
  45. <if test="params.beginApplyTime != null and params.beginApplyTime != '' and params.endApplyTime != null and params.endApplyTime != ''"> and t.apply_time between #{params.beginApplyTime} and #{params.endApplyTime}</if>
  46. </where>
  47. </select>
  48. <select id="selectProcessInfoByPId" parameterType="Long" resultMap="ProcessInfoResult">
  49. <include refid="selectProcessInfoVo"/>
  50. where t.p_id = #{pId}
  51. </select>
  52. <insert id="insertProcessInfo" parameterType="ProcessInfo">
  53. insert into t_process_info
  54. <trim prefix="(" suffix=")" suffixOverrides=",">
  55. <if test="pId != null">p_id,</if>
  56. <if test="processId != null">process_id,</if>
  57. <if test="processStsCd != null">process_sts_cd,</if>
  58. <if test="premiumAmt != null">premium_amt,</if>
  59. <if test="loanAmt != null">loan_amt,</if>
  60. <if test="policySignUrl != null">policy_sign_url,</if>
  61. <if test="policyDlUrl != null">policy_dl_url,</if>
  62. <if test="eInvoiceUrl != null">e_invoice_url,</if>
  63. <if test="projectId != null">project_id,</if>
  64. <if test="companyId != null">company_id,</if>
  65. <if test="expireTime != null">expire_time,</if>
  66. <if test="approvedTime != null">approved_time,</if>
  67. <if test="postscript != null">postscript,</if>
  68. <if test="rejectReason != null">reject_reason,</if>
  69. <if test="applyTime != null">apply_time,</if>
  70. <if test="createBy != null">create_by,</if>
  71. <if test="updateBy != null">update_by,</if>
  72. <if test="updateTime != null">update_time,</if>
  73. </trim>
  74. <trim prefix="values (" suffix=")" suffixOverrides=",">
  75. <if test="pId != null">#{pId},</if>
  76. <if test="processId != null">#{processId},</if>
  77. <if test="processStsCd != null">#{processStsCd},</if>
  78. <if test="premiumAmt != null">#{premiumAmt},</if>
  79. <if test="loanAmt != null">#{loanAmt},</if>
  80. <if test="policySignUrl != null">#{policySignUrl},</if>
  81. <if test="policyDlUrl != null">#{policyDlUrl},</if>
  82. <if test="eInvoiceUrl != null">#{eInvoiceUrl},</if>
  83. <if test="projectId != null">#{projectId},</if>
  84. <if test="companyId != null">#{companyId},</if>
  85. <if test="expireTime != null">#{expireTime},</if>
  86. <if test="approvedTime != null">#{approvedTime},</if>
  87. <if test="postscript != null">#{postscript},</if>
  88. <if test="rejectReason != null">#{rejectReason},</if>
  89. <if test="applyTime != null">#{applyTime},</if>
  90. <if test="createBy != null">#{createBy},</if>
  91. <if test="updateBy != null">#{updateBy},</if>
  92. <if test="updateTime != null">#{updateTime},</if>
  93. </trim>
  94. </insert>
  95. <update id="updateProcessInfo" parameterType="ProcessInfo">
  96. update t_process_info
  97. <trim prefix="SET" suffixOverrides=",">
  98. <if test="processId != null">process_id = #{processId},</if>
  99. <if test="processStsCd != null">process_sts_cd = #{processStsCd},</if>
  100. <if test="premiumAmt != null">premium_amt = #{premiumAmt},</if>
  101. <if test="loanAmt != null">loan_amt = #{loanAmt},</if>
  102. <if test="policySignUrl != null">policy_sign_url = #{policySignUrl},</if>
  103. <if test="policyDlUrl != null">policy_dl_url = #{policyDlUrl},</if>
  104. <if test="eInvoiceUrl != null">e_invoice_url = #{eInvoiceUrl},</if>
  105. <if test="projectId != null">project_id = #{projectId},</if>
  106. <if test="companyId != null">company_id = #{companyId},</if>
  107. <if test="expireTime != null">expire_time = #{expireTime},</if>
  108. <if test="approvedTime != null">approved_time = #{approvedTime},</if>
  109. <if test="postscript != null">postscript = #{postscript},</if>
  110. <if test="rejectReason != null">reject_reason = #{rejectReason},</if>
  111. <if test="applyTime != null">apply_time = #{applyTime},</if>
  112. <if test="createBy != null">create_by = #{createBy},</if>
  113. <if test="updateBy != null">update_by = #{updateBy},</if>
  114. <if test="updateTime != null">update_time = #{updateTime},</if>
  115. </trim>
  116. where p_id = #{pId}
  117. </update>
  118. <delete id="deleteProcessInfoByPId" parameterType="Long">
  119. delete from t_process_info where p_id = #{pId}
  120. </delete>
  121. <delete id="deleteProcessInfoByPIds" parameterType="String">
  122. delete from t_process_info where p_id in
  123. <foreach item="pId" collection="array" open="(" separator="," close=")">
  124. #{pId}
  125. </foreach>
  126. </delete>
  127. </mapper>