|
|
@@ -656,34 +656,34 @@
|
|
|
LEFT JOIN user_identity ui on a.owner_id = ui.uid
|
|
|
where deleted_sign = 0 and owner_type = 0
|
|
|
<if test="ownerId != null">
|
|
|
- and owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
+ and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="serialNumber != null">
|
|
|
- and serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
+ and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="auditStatus != null">
|
|
|
- and audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
+ and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
- and name = #{name,jdbcType=VARCHAR}
|
|
|
+ and a.name = #{name,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="keyword != null">
|
|
|
- and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
</if>
|
|
|
<if test="category != null">
|
|
|
- and category = #{category,jdbcType=INTEGER}
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- and status = #{status,jdbcType=INTEGER}
|
|
|
+ and a.status = #{status,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="rStart != null">
|
|
|
- and release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="rEnd != null">
|
|
|
- and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="releaseStatus != null">
|
|
|
- and release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
+ and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
order by serial_number desc
|
|
|
<if test="page_sql!=null">
|
|
|
@@ -741,34 +741,34 @@
|
|
|
LEFT JOIN organization_identity oi on a.owner_id = oi.uid
|
|
|
where deleted_sign = 0 and owner_type = 1
|
|
|
<if test="ownerId != null">
|
|
|
- and owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
+ and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="serialNumber != null">
|
|
|
- and serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
+ and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="auditStatus != null">
|
|
|
- and audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
+ and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
- and name = #{name,jdbcType=VARCHAR}
|
|
|
+ and a.name = #{name,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="keyword != null">
|
|
|
- and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
</if>
|
|
|
<if test="category != null">
|
|
|
- and category = #{category,jdbcType=INTEGER}
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- and status = #{status,jdbcType=INTEGER}
|
|
|
+ and a.status = #{status,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="rStart != null">
|
|
|
- and release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="rEnd != null">
|
|
|
- and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="releaseStatus != null">
|
|
|
- and release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
+ and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
order by serial_number desc
|
|
|
<if test="page_sql!=null">
|
|
|
@@ -779,37 +779,37 @@
|
|
|
<select id="findOrgOwnerAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
select
|
|
|
count(1)
|
|
|
- from achievement
|
|
|
- where deleted_sign = 0 and owner_type = 1
|
|
|
+ from achievement a
|
|
|
+ where a.deleted_sign = 0 and a.owner_type = 1
|
|
|
<if test="ownerId != null">
|
|
|
- and owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
+ and a.owner_id = #{ownerId,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="serialNumber != null">
|
|
|
- and serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
+ and a.serial_number = #{serialNumber,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="auditStatus != null">
|
|
|
- and audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
+ and a.audit_status = #{auditStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="name != null">
|
|
|
- and name = #{name,jdbcType=VARCHAR}
|
|
|
+ and a.name = #{name,jdbcType=VARCHAR}
|
|
|
</if>
|
|
|
<if test="keyword != null">
|
|
|
- and keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
</if>
|
|
|
<if test="category != null">
|
|
|
- and category = #{category,jdbcType=INTEGER}
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
- and status = #{status,jdbcType=INTEGER}
|
|
|
+ and a.status = #{status,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
<if test="rStart != null">
|
|
|
- and release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ > ]]> #{rStart,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="rEnd != null">
|
|
|
- and release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
+ and a.release_date <![CDATA[ < ]]> #{rEnd,jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
<if test="releaseStatus != null">
|
|
|
- and release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
+ and a.release_status = #{releaseStatus,jdbcType=INTEGER}
|
|
|
</if>
|
|
|
</select>
|
|
|
|
|
|
@@ -980,4 +980,84 @@
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
|
+ <select id="findSearchAchievementListByPage" parameterType="String" resultType="com.goafanti.portal.bo.AchievementSearchListBo">
|
|
|
+ select
|
|
|
+ a.id, a.name, a.keyword,
|
|
|
+ a.serial_number as serialNumber, a.data_category as dataCategory, a.category,
|
|
|
+ a.release_date as releaseDate, a.owner_type as ownerType, ui.username,
|
|
|
+ oi.unit_name as unitName, a.field_a as fieldA, a.field_b as fieldB,
|
|
|
+ a.transfer_price as transferPrice, a.maturity, a.transfer_mode as transferMode
|
|
|
+ from achievement a
|
|
|
+ left join user_identity ui on ui.uid = a.owner_id
|
|
|
+ left join organization_identity oi on oi.uid = a.owner_id
|
|
|
+ where a.deleted_sign = 0
|
|
|
+ <if test="keyword != null">
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="category != null">
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="maturity != maturity">
|
|
|
+ and a.maturity = #{maturity,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="transferPriceLower != null">
|
|
|
+ and a.transfer_price <![CDATA[ > ]]> #{transferPriceLower,jdbcType=DECIMAL}
|
|
|
+ </if>
|
|
|
+ <if test="transferPriceUpper != null">
|
|
|
+ and a.transfer_price <![CDATA[ < ]]> #{transferPriceUpper,jdbcType=DECIMAL}
|
|
|
+ </if>
|
|
|
+ <if test="transferMode != null">
|
|
|
+ and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="fieldA != null">
|
|
|
+ and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="fieldB != null">
|
|
|
+ and a.field_b = #{fieldB,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ and a.deleted_sign = 0
|
|
|
+ and a.release_status = 1
|
|
|
+ and a.audit_status = 4
|
|
|
+ order by a.release_date desc
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findSearchAchievementCount" parameterType="String" resultType="java.lang.Integer">
|
|
|
+ select
|
|
|
+ count(1)
|
|
|
+ from achievement a
|
|
|
+ where a.deleted_sign = 0
|
|
|
+ <if test="keyword != null">
|
|
|
+ and a.keyword like "%"#{keyword,jdbcType=VARCHAR}"%"
|
|
|
+ </if>
|
|
|
+ <if test="category != null">
|
|
|
+ and a.category = #{category,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ <if test="maturity != maturity">
|
|
|
+ and a.maturity = #{maturity,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="transferPriceLower != null">
|
|
|
+ and a.transfer_price <![CDATA[ > ]]> #{transferPriceLower,jdbcType=DECIMAL}
|
|
|
+ </if>
|
|
|
+ <if test="transferPriceUpper != null">
|
|
|
+ and a.transfer_price <![CDATA[ < ]]> #{transferPriceUpper,jdbcType=DECIMAL}
|
|
|
+ </if>
|
|
|
+ <if test="transferMode != null">
|
|
|
+ and a.transfer_mode = #{transferMode,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="fieldA != null">
|
|
|
+ and a.field_a = #{fieldA,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="fieldB != null">
|
|
|
+ and a.field_b = #{fieldB,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ and a.deleted_sign = 0
|
|
|
+ and a.release_status = 1
|
|
|
+ and a.audit_status = 4
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|