|
SELECT t_memcard_cash.cashno AS cashno,
t_memcard_cash.memcardno AS memcardno,
t_memcard_cash.busno AS busno,
t_memcard_cash.cardlevel AS cardlevel,
t_memcard_cash.integrala AS integrala,
t_memcard_cash.integral AS integral,
t_memcard_cash.status AS status,
t_memcard_cash.execdate AS execdate,
t_memcard_cash.createuser AS createuser,
t_memcard_cash.createtime AS createtime,
t_memcard_cash.notes AS notes,
t_memcard_cash.maxsaleno AS maxsaleno,
t_memcard_cash.pstid AS pstid,
t_memcard_cash.pstname AS pstname,
t_memcard_cash.integral_pst AS integral_pst,
t_memcard_cash.pstqty AS pstqty,
t_memcard_cash.lastmodify AS lastmodify,
t_memcard_cash.lasttime AS lasttime,
t_memcard_cash.pstcode AS pstcode,
t_memcard_cash.makeno AS makeno,
t_memcard_cash.stallno AS stallno,
t_memcard_cash.pstbatno AS pstbatno,
t.cardholder AS cardholder,
t.mobile AS mobile,
t.tel AS tel,
t.cardaddress AS cardaddress,
(case
when t_ware.lastpurprice is null then
0
else
t_ware.lastpurprice
end) AS lastpurprice,
t_memcard_cash.compid,
t_memcard_cash.ware_pst,
t_memcard_cash.smsverify,
t_memcard_cash.smsverify_flag,
t_memcard_cash.isreset,
t_ware.wareid,
t_memcard_cash.checkbit1,
t_memcard_cash.checker1,
t_memcard_cash.checkbit2,
t_memcard_cash.checker2,
t_memcard_cash.checkbit3,
t_memcard_cash.checker3,
t_memcard_cash.checkbit4,
t_memcard_cash.checker4,
t_memcard_cash.checkbit5,
t_memcard_cash.checker5,
t_memcard_cash.checkdate1,
t_memcard_cash.checkdate2,
t_memcard_cash.checkdate3,
t_memcard_cash.checkdate4,
t_memcard_cash.checkdate5,
t_memcard_cash.returnno,
nvl(t_memcard_cash.handmade,0) as handmade,
t_memcard_cash.INTEGRAL_DPPST
FROM t_memcard_cash
INNER JOIN t_memcard_reg t
ON t_memcard_cash.memcardno = t.memcardno
LEFT JOIN t_ware
ON t_memcard_cash.ware_pst = 1
AND t_ware.compid = t_memcard_cash.compid
AND t_ware.wareid = t_memcard_cash.pstid
WHERE t_memcard_cash.compid=2 and ( t_memcard_cash.execdate >= to_date('2025-01-28', 'yyyy-MM-dd') and t_memcard_cash.execdate < to_date('2025-01-29', 'yyyy-MM-dd') )
|
|