|
@@ -1414,68 +1414,6 @@
|
|
|
|
|
|
<!-- 积分包结算(分页) -->
|
|
<!-- 积分包结算(分页) -->
|
|
<select id="listPackageSettleList" resultType="com.qunzhixinxi.hnqz.admin.entity.input.WmScorePackageSettleOutput">
|
|
<select id="listPackageSettleList" resultType="com.qunzhixinxi.hnqz.admin.entity.input.WmScorePackageSettleOutput">
|
|
- SELECT p.id,
|
|
|
|
- d.name packageEntName,
|
|
|
|
- p.score_package_name,
|
|
|
|
- p.create_time,
|
|
|
|
- p.package_status,
|
|
|
|
- p.package_finish_status,
|
|
|
|
- p.settle_status,
|
|
|
|
- p.invoice_category,
|
|
|
|
- p.settle_amount ,
|
|
|
|
- p.package_type1,
|
|
|
|
- p.score,
|
|
|
|
- p.package_type2,
|
|
|
|
- p.sub_type,
|
|
|
|
- p.source_type,
|
|
|
|
- p.oms_order_sn
|
|
|
|
- FROM wm_score_package p, sys_dept d
|
|
|
|
- WHERE
|
|
|
|
- p.send_package_dept_id = d.dept_id
|
|
|
|
- <if test="query.mahSettleDeptId != null">
|
|
|
|
- AND p.mah_settle_dept_id = #{query.mahSettleDeptId}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.mahSettleStep != null">
|
|
|
|
- AND p.mah_settle_step = #{query.mahSettleStep.type}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.sendPackageDeptId != null and query.sendPackageDeptId != ''">
|
|
|
|
- AND p.send_package_dept_id= #{query.sendPackageDeptId}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.scorePackageName != null and query.scorePackageName != ''">
|
|
|
|
- AND p.score_package_name like CONCAT('%',#{query.scorePackageName},'%')
|
|
|
|
- </if>
|
|
|
|
- <if test="query.belongDate != null and query.belongDate != ''">
|
|
|
|
- AND p.belong_date= #{query.belongDate}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.typeid != null and query.typeid != ''">
|
|
|
|
- AND p.typeid in (${query.typeid})
|
|
|
|
- </if>
|
|
|
|
- <if test="query.packageType1 != null and query.packageType1 != ''">
|
|
|
|
- AND p.package_type1= #{query.packageType1}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.packageFinishStatus != null and query.packageFinishStatus != ''">
|
|
|
|
- AND p.package_finish_status= #{query.packageFinishStatus}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.packageType2 != null and query.packageType2 != ''">
|
|
|
|
- AND p.package_type2= #{query.packageType2}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.settleFlag != null and query.settleFlag != ''">
|
|
|
|
- AND p.settle_flag= #{query.settleFlag}
|
|
|
|
- </if>
|
|
|
|
- <if test="query.subType != null and query.subType != ''">
|
|
|
|
- AND p.sub_type= #{query.subType}
|
|
|
|
- </if>
|
|
|
|
- ORDER BY
|
|
|
|
- <if test="query.mahSettleStep != null">
|
|
|
|
- p.mah_settle_time DESC
|
|
|
|
- </if>
|
|
|
|
- <if test="query.mahSettleStep == null">
|
|
|
|
- p.create_time DESC
|
|
|
|
- </if>
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
- <!-- 积分包结算(分页) -->
|
|
|
|
- <select id="listPackageSettleList2" resultType="com.qunzhixinxi.hnqz.admin.entity.input.WmScorePackageSettleOutput">
|
|
|
|
SELECT distinct
|
|
SELECT distinct
|
|
p.id,
|
|
p.id,
|
|
d.name packageEntName,
|
|
d.name packageEntName,
|
|
@@ -1493,8 +1431,10 @@
|
|
p.source_type,
|
|
p.source_type,
|
|
p.oms_order_sn
|
|
p.oms_order_sn
|
|
FROM wm_score_package p left join sys_dept d on p.send_package_dept_id = d.dept_id
|
|
FROM wm_score_package p left join sys_dept d on p.send_package_dept_id = d.dept_id
|
|
- left join wm_score_package_status ps on p.id = ps.package_id
|
|
|
|
- left join sys_user su on ps.user_id = su.user_id
|
|
|
|
|
|
+ <if test="query.userNames != null">
|
|
|
|
+ left join wm_score_package_status ps on p.id = ps.package_id
|
|
|
|
+ left join sys_user su on ps.user_id = su.user_id
|
|
|
|
+ </if>
|
|
<where>
|
|
<where>
|
|
<if test="query.mahSettleDeptId != null">
|
|
<if test="query.mahSettleDeptId != null">
|
|
AND p.mah_settle_dept_id = #{query.mahSettleDeptId}
|
|
AND p.mah_settle_dept_id = #{query.mahSettleDeptId}
|
|
@@ -1502,6 +1442,9 @@
|
|
<if test="query.mahSettleStep != null">
|
|
<if test="query.mahSettleStep != null">
|
|
AND p.mah_settle_step = #{query.mahSettleStep.type}
|
|
AND p.mah_settle_step = #{query.mahSettleStep.type}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="query.packageEntName != null and query.packageEntName != ''">
|
|
|
|
+ AND d.name like CONCAT('%',#{query.packageEntName},'%')
|
|
|
|
+ </if>
|
|
<if test="query.sendPackageDeptId != null and query.sendPackageDeptId != ''">
|
|
<if test="query.sendPackageDeptId != null and query.sendPackageDeptId != ''">
|
|
AND p.send_package_dept_id= #{query.sendPackageDeptId}
|
|
AND p.send_package_dept_id= #{query.sendPackageDeptId}
|
|
</if>
|
|
</if>
|
|
@@ -1529,9 +1472,15 @@
|
|
<if test="query.subType != null and query.subType != ''">
|
|
<if test="query.subType != null and query.subType != ''">
|
|
AND p.sub_type= #{query.subType}
|
|
AND p.sub_type= #{query.subType}
|
|
</if>
|
|
</if>
|
|
- <if test="query.subjectLocation != null and query.subjectLocation != ''">
|
|
|
|
|
|
+ <if test="query.subjectLocation != null and query.subjectLocation != ''">
|
|
AND p.sub_location = #{query.subjectLocation}
|
|
AND p.sub_location = #{query.subjectLocation}
|
|
- </if>
|
|
|
|
|
|
+ </if>
|
|
|
|
+ <if test="query.invoiceCategory != null">
|
|
|
|
+ AND p.invoice_category = #{query.invoiceCategory}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="query.settleStatus != null">
|
|
|
|
+ AND p.settle_status = #{query.settleStatus}
|
|
|
|
+ </if>
|
|
<if test="query.userNames != null">
|
|
<if test="query.userNames != null">
|
|
AND su.realname like CONCAT('%',#{query.userNames},'%')
|
|
AND su.realname like CONCAT('%',#{query.userNames},'%')
|
|
</if>
|
|
</if>
|