|
@@ -29,7 +29,6 @@
|
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
|
|
<select id="getInsPlySettleReport" resultMap="SettleReportDataMap">
|
|
<select id="getInsPlySettleReport" resultMap="SettleReportDataMap">
|
|
|
-
|
|
|
|
|
SELECT
|
|
SELECT
|
|
|
''company_name,
|
|
''company_name,
|
|
|
''settle_month,
|
|
''settle_month,
|
|
@@ -42,7 +41,19 @@
|
|
|
<if test="reportReqVo.companyId != null and reportReqVo.companyId != ''">
|
|
<if test="reportReqVo.companyId != null and reportReqVo.companyId != ''">
|
|
|
and p.company_id = #{reportReqVo.companyId}
|
|
and p.company_id = #{reportReqVo.companyId}
|
|
|
</if>
|
|
</if>
|
|
|
- GROUP BY p.`company_id`
|
|
|
|
|
|
|
+ <if test="reportReqVo.status != null and reportReqVo.status != ''">
|
|
|
|
|
+ and p.status = #{reportReqVo.status}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="reportReqVo.quoteStartDate != null and reportReqVo.quoteEndDate != null">
|
|
|
|
|
+ and p.create_time between #{reportReqVo.quoteStartDate} AND #{reportReqVo.quoteEndDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ GROUP BY p.`settle_month`
|
|
|
|
|
+ <if test="reportReqVo.companyId != null and reportReqVo.companyId != ''">
|
|
|
|
|
+ ,p.company_id
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="reportReqVo.status != null and reportReqVo.status != ''">
|
|
|
|
|
+ ,p.status
|
|
|
|
|
+ </if>
|
|
|
</select>
|
|
</select>
|
|
|
<select id="getInsPlySettleReportCount" resultType="Long">
|
|
<select id="getInsPlySettleReportCount" resultType="Long">
|
|
|
select
|
|
select
|
|
@@ -60,7 +71,45 @@
|
|
|
<if test="reportReqVo.companyId != null and reportReqVo.companyId != ''">
|
|
<if test="reportReqVo.companyId != null and reportReqVo.companyId != ''">
|
|
|
and p.company_id = #{reportReqVo.companyId}
|
|
and p.company_id = #{reportReqVo.companyId}
|
|
|
</if>
|
|
</if>
|
|
|
- GROUP BY p.`company_id`
|
|
|
|
|
|
|
+ <if test="reportReqVo.status != null and reportReqVo.status != ''">
|
|
|
|
|
+ and p.status = #{reportReqVo.status}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="reportReqVo.quoteStartDate != null and reportReqVo.quoteEndDate != null">
|
|
|
|
|
+ and p.create_time between #{reportReqVo.quoteStartDate} AND #{reportReqVo.quoteEndDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ GROUP BY p.`settle_month`
|
|
|
|
|
+ <if test="reportReqVo.companyId != null and reportReqVo.companyId != ''">
|
|
|
|
|
+ ,p.company_id
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="reportReqVo.status != null and reportReqVo.status != ''">
|
|
|
|
|
+ ,p.status
|
|
|
|
|
+ </if>
|
|
|
) as s
|
|
) as s
|
|
|
</select>
|
|
</select>
|
|
|
|
|
+ <select id="getInsPlySettleReportList" resultType="BaseResultMap">
|
|
|
|
|
+ SELECT
|
|
|
|
|
+ p.settleno,
|
|
|
|
|
+ p.company_id,
|
|
|
|
|
+ (select name from esm_ins_company where id = p.company_id)company_name,
|
|
|
|
|
+ p.settle_month,
|
|
|
|
|
+ p.settle_batch,
|
|
|
|
|
+ p.status,
|
|
|
|
|
+ p.`commission_feevalue`,
|
|
|
|
|
+ p.`other_feevalue`,
|
|
|
|
|
+ p.`all_fee_value`,
|
|
|
|
|
+ p.create_time,
|
|
|
|
|
+ p.dept_id,
|
|
|
|
|
+ p.operator
|
|
|
|
|
+ FROM
|
|
|
|
|
+ ins_ply_settle p WHERE 1=1
|
|
|
|
|
+ <if test="reportReqVo.companyId != null and reportReqVo.companyId != ''">
|
|
|
|
|
+ and p.company_id = #{reportReqVo.companyId}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="reportReqVo.status != null and reportReqVo.status != ''">
|
|
|
|
|
+ and p.status = #{reportReqVo.status}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ <if test="reportReqVo.quoteStartDate != null and reportReqVo.quoteEndDate != null">
|
|
|
|
|
+ and p.create_time between #{reportReqVo.quoteStartDate} AND #{reportReqVo.quoteEndDate}
|
|
|
|
|
+ </if>
|
|
|
|
|
+ </select>
|
|
|
</mapper>
|
|
</mapper>
|