|
|
@ -98,6 +98,8 @@ public class HighGasServiceImpl implements HighGasService { |
|
|
|
store.setUpdateTime(new Date()); |
|
|
|
store.setUpdateTime(new Date()); |
|
|
|
highMerchantStoreService.updateMerchantStoreDetail(store); |
|
|
|
highMerchantStoreService.updateMerchantStoreDetail(store); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gasOilGunNoService.cleanGunNo(store.getId()); |
|
|
|
|
|
|
|
|
|
|
|
JSONArray oilPriceList = station.getJSONArray("oilPriceList"); |
|
|
|
JSONArray oilPriceList = station.getJSONArray("oilPriceList"); |
|
|
|
for (Object oilPrice : oilPriceList) { |
|
|
|
for (Object oilPrice : oilPriceList) { |
|
|
|
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); |
|
|
|
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); |
|
|
@ -112,7 +114,7 @@ public class HighGasServiceImpl implements HighGasService { |
|
|
|
highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount")); |
|
|
|
|
|
|
|
highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); |
|
|
|
// 油品类型 1:汽油:2:柴油;3:天然气
|
|
|
|
// 油品类型 1:汽油:2:柴油;3:天然气
|
|
|
|
if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { |
|
|
|
if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { |
|
|
|
highGasOilPrice.setOilType(1); |
|
|
|
highGasOilPrice.setOilType(1); |
|
|
@ -144,11 +146,12 @@ public class HighGasServiceImpl implements HighGasService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
highGasOilPrice.setPreferentialMargin(highGasOilPrice.getPreferentialMargin()!=null?highGasOilPrice.getPreferentialMargin():new BigDecimal("0")); |
|
|
|
highGasOilPrice.setMerchantStoreId(store.getId()); |
|
|
|
highGasOilPrice.setMerchantStoreId(store.getId()); |
|
|
|
highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); |
|
|
|
highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); |
|
|
|
highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); |
|
|
|
highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); |
|
|
|
highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); |
|
|
|
highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); |
|
|
|
highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount").subtract(highGasOilPrice.getPreferentialMargin())); |
|
|
|
highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount")); |
|
|
|
highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount")); |
|
|
|
|
|
|
|
|
|
|
@ -297,6 +300,8 @@ public class HighGasServiceImpl implements HighGasService { |
|
|
|
store.setUpdateTime(new Date()); |
|
|
|
store.setUpdateTime(new Date()); |
|
|
|
highMerchantStoreService.updateMerchantStoreDetail(store); |
|
|
|
highMerchantStoreService.updateMerchantStoreDetail(store); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gasOilGunNoService.cleanGunNo(store.getId()); |
|
|
|
|
|
|
|
|
|
|
|
JSONArray oilPriceList = station.getJSONArray("oilPriceList"); |
|
|
|
JSONArray oilPriceList = station.getJSONArray("oilPriceList"); |
|
|
|
for (Object oilPrice : oilPriceList) { |
|
|
|
for (Object oilPrice : oilPriceList) { |
|
|
|
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); |
|
|
|
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); |
|
|
@ -657,6 +662,8 @@ public class HighGasServiceImpl implements HighGasService { |
|
|
|
store.setUpdateTime(new Date()); |
|
|
|
store.setUpdateTime(new Date()); |
|
|
|
highMerchantStoreService.updateMerchantStoreDetail(store); |
|
|
|
highMerchantStoreService.updateMerchantStoreDetail(store); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
gasOilGunNoService.cleanGunNo(store.getId()); |
|
|
|
|
|
|
|
|
|
|
|
JSONArray oilPriceList = station.getJSONArray("oils"); |
|
|
|
JSONArray oilPriceList = station.getJSONArray("oils"); |
|
|
|
for (Object oilPrice : oilPriceList) { |
|
|
|
for (Object oilPrice : oilPriceList) { |
|
|
|
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); |
|
|
|
JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); |
|
|
|