领导人员功能开发
This commit is contained in:
parent
d9eb7a0193
commit
833d0bda57
|
|
@ -8,6 +8,7 @@ import com.bonus.canteen.core.reportforms.mapper.OrgConsumeMapper;
|
|||
import com.bonus.canteen.core.reportforms.mapper.PlaceMapper;
|
||||
import com.bonus.canteen.core.reportforms.service.reportformsService;
|
||||
import com.bonus.common.houqin.utils.SM4EncryptUtils;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -332,6 +333,10 @@ public class reportformsServiceImpl implements reportformsService {
|
|||
@Override
|
||||
public List<ReportOrderInfoVo> placeexportExcel(ReportOrderInfoVo orgConsume) {
|
||||
checkCommonOrg(orgConsume);
|
||||
// 导出前,清分页参数
|
||||
orgConsume.setPageNum(null);
|
||||
orgConsume.setPageSize(null);
|
||||
|
||||
List<ReportOrderInfoVo> reportOrderInfoVos = placemapper.placeexportExcel(orgConsume)
|
||||
.stream()
|
||||
.peek(c -> {
|
||||
|
|
|
|||
|
|
@ -536,16 +536,27 @@
|
|||
f.ord_time,
|
||||
f.pay_time,
|
||||
f.cust_id,
|
||||
atwd.wallet_id AS walletId, -- 加上别名
|
||||
wd.wallet_id AS walletId,
|
||||
f.remark
|
||||
FROM report_account_flow f
|
||||
LEFT JOIN acc_trade_wallet_detail atwd ON atwd.trade_id = f.flow_id
|
||||
LEFT JOIN (
|
||||
SELECT d.trade_id, MIN(d.wallet_id) AS wallet_id
|
||||
FROM acc_trade_wallet_detail d
|
||||
WHERE d.trade_id IN (
|
||||
SELECT flow_id
|
||||
FROM report_account_flow
|
||||
WHERE pay_time >= #{startPayTime}
|
||||
AND pay_time < #{endPayTime}
|
||||
AND flow_type = 110
|
||||
AND status = 1
|
||||
)
|
||||
GROUP BY d.trade_id
|
||||
) wd ON wd.trade_id = f.flow_id
|
||||
LEFT JOIN device_info di ON f.mch_sn = di.device_sn
|
||||
LEFT JOIN device_bind bd ON di.device_id = bd.device_id
|
||||
LEFT JOIN alloc_canteen aa ON aa.canteen_id = bd.canteen_id
|
||||
LEFT JOIN alloc_area aac ON aac.area_id = aa.area_id
|
||||
WHERE
|
||||
f.pay_time >= #{startPayTime}
|
||||
WHERE f.pay_time >= #{startPayTime}
|
||||
AND f.pay_time < #{endPayTime}
|
||||
AND f.flow_type = 110
|
||||
AND f.status = 1
|
||||
|
|
@ -554,43 +565,52 @@
|
|||
|
||||
UNION ALL
|
||||
|
||||
/* =============== 退款 =============== */
|
||||
SELECT
|
||||
aa.canteen_name,
|
||||
aac.area_name,
|
||||
f.flow_id AS flow_id,
|
||||
f.flow_id,
|
||||
130 AS flow_type,
|
||||
at.actual_amount AS amount,
|
||||
f.ord_time,
|
||||
at.trade_time AS pay_time,
|
||||
at.cust_id,
|
||||
atwd_refund.wallet_id AS walletId, -- 加上别名
|
||||
wd.wallet_id AS walletId,
|
||||
CONCAT('退款-', f.remark) AS remark
|
||||
FROM acc_trade at
|
||||
INNER JOIN report_account_flow f
|
||||
ON at.origin_trade_id = f.flow_id
|
||||
AND f.flow_type = 110
|
||||
LEFT JOIN acc_trade_wallet_detail atwd_refund
|
||||
ON atwd_refund.trade_id = at.id
|
||||
LEFT JOIN (
|
||||
SELECT d.trade_id, MIN(d.wallet_id) AS wallet_id
|
||||
FROM acc_trade_wallet_detail d
|
||||
WHERE d.trade_id IN (
|
||||
SELECT id
|
||||
FROM acc_trade
|
||||
WHERE trade_time >= #{startPayTime}
|
||||
AND trade_time < #{endPayTime}
|
||||
AND trade_type = 130
|
||||
AND trade_state = 2
|
||||
)
|
||||
GROUP BY d.trade_id
|
||||
) wd ON wd.trade_id = at.id
|
||||
LEFT JOIN device_info di ON f.mch_sn = di.device_sn
|
||||
LEFT JOIN device_bind bd ON di.device_id = bd.device_id
|
||||
LEFT JOIN alloc_canteen aa ON aa.canteen_id = bd.canteen_id
|
||||
LEFT JOIN alloc_area aac ON aac.area_id = aa.area_id
|
||||
WHERE
|
||||
at.trade_time >= #{startPayTime}
|
||||
AND at.trade_time < #{endPayTime}
|
||||
WHERE at.trade_time >= #{startPayTime}
|
||||
AND at.trade_time <#{endPayTime}
|
||||
AND at.trade_type = 130
|
||||
AND at.trade_state = 2
|
||||
AND (at.machine_sn IS NULL OR at.machine_sn = '')
|
||||
AND f.status = 1
|
||||
AND (f.source_type IS NULL OR f.source_type = 0 OR f.source_type = '')
|
||||
AND f.remark LIKE '%支付%'
|
||||
|
||||
) t
|
||||
LEFT JOIN cust_info u ON t.cust_id = u.cust_id
|
||||
LEFT JOIN cust_org co ON u.org_id = co.org_id
|
||||
WHERE t.area_name LIKE CONCAT('%', #{orgName}, '%')
|
||||
ORDER BY t.pay_time DESC;
|
||||
|
||||
ORDER BY t.pay_time DESC
|
||||
|
||||
</select>
|
||||
<select id="getlistConsmerlist" resultType="com.bonus.canteen.core.reportforms.beans.OrgConsume">
|
||||
|
|
|
|||
|
|
@ -128,6 +128,9 @@
|
|||
</foreach>
|
||||
</if>
|
||||
ORDER BY a.pay_time DESC
|
||||
<if test="pageNum != null and pageSize != null">
|
||||
LIMIT #{offset}, #{pageSize}
|
||||
</if>
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue