Commit 97d807c4 by jianan

续年佣金计算-来佣比对检核年月8

parent 25fb738d
...@@ -152,15 +152,17 @@ public class LifeCommissionServiceImpl implements LifeCommissionService { ...@@ -152,15 +152,17 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
// 获取批次号(如2020-11的字符串) // 获取批次号(如2020-11的字符串)
Long checkBatchId = this.getOrderCommissionCheckBatch(checkBatch, loginId); Long checkBatchId = this.getOrderCommissionCheckBatch(checkBatch, loginId);
for (String commissionNo: commissionNos) {
AgPoOrderCommission orderCommission = new AgPoOrderCommission(); AgPoOrderCommission orderCommission = new AgPoOrderCommission();
orderCommission.setCommissionNo(commissionNo);
orderCommission.setCommissionCheckId(checkBatchId); orderCommission.setCommissionCheckId(checkBatchId);
orderCommission.setCommissionStatus(status); orderCommission.setCommissionStatus(status);
orderCommission.setCommissionTime(checkBatch); orderCommission.setCommissionTime(checkBatch);
orderCommission.setUpdatedBy(Long.valueOf(loginId)); orderCommission.setUpdatedBy(Long.valueOf(loginId));
orderCommission.setUpdatedAt(new Date()); orderCommission.setUpdatedAt(new Date());
orderCommissionMapper.updateBatchBycommissionNo(commissionNos, orderCommission); orderCommissionMapper.updateBycommissionNo(orderCommission);
}
} }
@Override @Override
......
...@@ -18,5 +18,5 @@ public interface AgPoOrderCommissionMapper { ...@@ -18,5 +18,5 @@ public interface AgPoOrderCommissionMapper {
int updateByPrimaryKey(AgPoOrderCommission record); int updateByPrimaryKey(AgPoOrderCommission record);
void updateBatchBycommissionNo(@Param("list")List<String> commissionNos, @Param("orderCommission")AgPoOrderCommission orderCommission); void updateBycommissionNo(AgPoOrderCommission orderCommission);
} }
\ No newline at end of file
...@@ -322,28 +322,25 @@ ...@@ -322,28 +322,25 @@
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<update id="updateBatchBycommissionNo" > <update id="updateBycommissionNo" parameterType="com.yd.dal.entity.commission.AgPoOrderCommission">
update ag_po_order_commission update ag_po_order_commission
<set> <set>
<if test="orderCommission.commissionStatus != null"> <if test="commissionStatus != null">
commission_status = #{orderCommission.commissionStatus,jdbcType=BIGINT}, commission_status = #{commissionStatus,jdbcType=BIGINT},
</if> </if>
<if test="orderCommission.commissionTime != null"> <if test="commissionTime != null">
commission_time = #{orderCommission.commissionTime,jdbcType=VARCHAR}, commission_time = #{commissionTime,jdbcType=VARCHAR},
</if> </if>
<if test="orderCommission.commissionCheckId != null"> <if test="commissionCheckId != null">
commission_check_id = #{orderCommission.commissionCheckId,jdbcType=VARCHAR}, commission_check_id = #{commissionCheckId,jdbcType=VARCHAR},
</if> </if>
<if test="orderCommission.updatedBy != null"> <if test="updatedBy != null">
updated_by = #{orderCommission.updatedBy,jdbcType=TIMESTAMP}, updated_by = #{updatedBy,jdbcType=TIMESTAMP},
</if> </if>
<if test="orderCommission.updatedAt != null"> <if test="updatedAt != null">
updated_at = #{orderCommission.updatedAt,jdbcType=TIMESTAMP}, updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if> </if>
</set> </set>
where commission_no in where commission_no = #{commissionNo,jdbcType=VARCHAR}
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</update> </update>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment