| | |
| | | </if> |
| | | |
| | | <if test = "auditStatus != null and auditStatus > 0"> |
| | | AND audit_status = ${auditStatus} |
| | | AND audit_status = #{auditStatus} |
| | | </if> |
| | | |
| | | <if test = "operateDateStart != null and operateDateStop != null"> |
| | |
| | | <!--根据指定条件获取总账记录--> |
| | | <select id="getGenerals" resultType="com.dy.pipIrrGlobal.voSe.VoGeneral"> |
| | | SELECT |
| | | CAST(id AS char) AS generalId, |
| | | CAST(cashier_id AS char) AS cashierId, |
| | | id AS generalId, |
| | | cashier_id AS cashierId, |
| | | cashier_name AS cashierName, |
| | | trade_amount AS tradeAmount, |
| | | gift, |
| | | refund_amount AS refundAmount, |
| | | (trade_amount + gift + refund_amount) AS totalAmount, |
| | | Date(operate_date) AS operateDate, |
| | | (CASE |
| | | WHEN audit_status = 1 THEN "未审核" |
| | | WHEN audit_status = 2 THEN "同意" |
| | | WHEN audit_status = 3 THEN "驳回" |
| | | WHEN audit_status = 1 THEN '未审核' |
| | | WHEN audit_status = 2 THEN '同意' |
| | | WHEN audit_status = 3 THEN '驳回' |
| | | END) AS auditStatus |
| | | FROM se_general |
| | | <where> |
| | |
| | | </if> |
| | | |
| | | <if test = "auditStatus != null and auditStatus > 0"> |
| | | AND audit_status = ${auditStatus} |
| | | AND audit_status = #{auditStatus} |
| | | </if> |
| | | |
| | | <if test = "operateDateStart != null and operateDateStop != null"> |
| | |
| | | </if> |
| | | |
| | | <if test = "paymentId != null and paymentId >0"> |
| | | AND ope.payment_id = ${paymentId} |
| | | AND ope.payment_id = #{paymentId} |
| | | </if> |
| | | |
| | | <if test = "cashierId != null and cashierId >0"> |
| | | AND ope.operator = ${cashierId} |
| | | AND ope.operator = #{cashierId} |
| | | </if> |
| | | </where> |
| | | GROUP BY ope.payment_id, Date(ope.operate_dt) |
| | |
| | | SELECT * FROM v_trade_summary |
| | | <where> |
| | | <if test = "cashierId != null and cashierId > 0"> |
| | | AND cashierId = ${cashierId} |
| | | AND cashierId = #{cashierId} |
| | | </if> |
| | | |
| | | <if test = "timeStart != null and timeStop != null"> |
| | |
| | | FROM v_trade_details |
| | | <where> |
| | | <if test = "cashierId != null and cashierId > 0"> |
| | | AND cashierId = ${cashierId} |
| | | AND cashierId = #{cashierId} |
| | | </if> |
| | | |
| | | <if test = "tradeDate != null"> |
| | |
| | | SELECT * FROM v_trade_details |
| | | <where> |
| | | <if test = "cashierId != null and cashierId > 0"> |
| | | AND cashierId = ${cashierId} |
| | | AND cashierId = #{cashierId} |
| | | </if> |
| | | |
| | | <if test = "tradeDate != null"> |