修改
This commit is contained in:
parent
d8b123cb97
commit
246155e176
@ -158,16 +158,27 @@
|
|||||||
<select id="cashRegisterList" resultType="com.fuint.business.petrolStationManagement.vo.OilCashRegisterVo">
|
<select id="cashRegisterList" resultType="com.fuint.business.petrolStationManagement.vo.OilCashRegisterVo">
|
||||||
|
|
||||||
|
|
||||||
select zong.*, o2.oil_name
|
SELECT
|
||||||
FROM (SELECT o1.*,
|
o1.*,
|
||||||
o2.oil_name as oilNameId,
|
-- 油罐id
|
||||||
o2.oil_type as oilType,
|
o3.id AS oilTankId,
|
||||||
o2.oil_price as oilPrice
|
-- 油号 id
|
||||||
FROM oil_gun o1
|
o2.oil_name AS oilNameId,
|
||||||
LEFT JOIN oil_number o2 ON o1.number_id = o2.number_id
|
o2.oil_type AS oilType,
|
||||||
WHERE o1.store_id = #{storeId} and o1.status = '启用' ) as zong
|
o2.oil_price AS oilPrice,
|
||||||
LEFT JOIN oil_name as o2 on zong.oilNameId = o2.id
|
o3.tank_name
|
||||||
|
FROM
|
||||||
|
oil_gun o1
|
||||||
|
-- 通过 油枪 找 油价
|
||||||
|
LEFT JOIN oil_number o2 ON o1.number_id = o2.number_id
|
||||||
|
-- 通过 油枪 找 油罐
|
||||||
|
LEFT JOIN oil_tank o3 on o1.tank_id = o3.id
|
||||||
|
-- 通过 油价 找 油号
|
||||||
|
LEFT JOIN oil_name o4 on o4.id = o2.oil_name
|
||||||
|
|
||||||
|
WHERE
|
||||||
|
o1.store_id = #{storeId}
|
||||||
|
AND o1.STATUS = '启用'
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
<!-- -- and tank_id = #{oilGun.tankId}-->
|
<!-- -- and tank_id = #{oilGun.tankId}-->
|
||||||
|
@ -20,6 +20,8 @@ public class OilCashRegisterVo extends OilGun {
|
|||||||
* 关联表 挂牌价
|
* 关联表 挂牌价
|
||||||
*/
|
*/
|
||||||
private BigDecimal oilPrice;
|
private BigDecimal oilPrice;
|
||||||
|
// 油号 id
|
||||||
private Integer oilNameId;
|
private Integer oilNameId;
|
||||||
|
// 油罐id
|
||||||
|
private Integer oilTankId;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user