diff --git a/fuintAdmin/src/views/oilConfig/oilTank/list.vue b/fuintAdmin/src/views/oilConfig/oilTank/list.vue
index 0ded9a5ca..a9970e64f 100644
--- a/fuintAdmin/src/views/oilConfig/oilTank/list.vue
+++ b/fuintAdmin/src/views/oilConfig/oilTank/list.vue
@@ -6,12 +6,37 @@
+
+
+
+
+
+
+
+
+ 至
+
+
+
搜索
@@ -243,6 +268,8 @@ export default {
page:null,
pageSize:null
},
+ beginTime: "",
+ endTime: "",
unit: 'L',
// 查询全部油品
selectOilTypeByPrice: [],
@@ -298,6 +325,7 @@ export default {
async created() {
let this_ = this
await this_.getList()
+ this.getOilNameList() // 查询全部油品
},
methods: {
handleIsopenSelect() {
@@ -305,7 +333,12 @@ export default {
},
getList() {
this.loading = true;
- getTankApi(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
+ let dateRange = []
+ if (this.beginTime && this.endTime) {
+ dateRange.push(this.beginTime.toLocaleDateString())
+ dateRange.push(this.endTime.toLocaleDateString())
+ }
+ getTankApi(this.addDateRange(this.queryParams, dateRange)).then(response => {
this.tankList = response.data.records;
this.total = response.data.total;
})
@@ -393,6 +426,8 @@ export default {
page:null,
pageSize:null
};
+ this.beginTime = ''
+ this.endTime = ''
this.getList();
},
// 新增油罐
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
index 7fba649c5..c418cca6f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/api/fuyou/service/impl/FyPayServiceImpl.java
@@ -234,7 +234,6 @@ public class FyPayServiceImpl implements FyPayService {
// 油品订单
oilOrder.setOrderStatus("paid");
oilOrder.setPayTime(date);
- oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getId());
oilOrderService.insertFavorable(oilOrder, Double.valueOf(map1.get("oilCardAmount")));
// 修改油罐容量
oilOrderService.addOilTracks(oilOrder, oilOrder.getStoreId());
@@ -414,6 +413,9 @@ public class FyPayServiceImpl implements FyPayService {
allOrderInfo = allOrderInfoService.selectAllOrderInfoByOrderNo(orderNo);
// 添加提成记录信息
staffCommissionService.countStaffCommission(null,null, null, null, null, orderNo);
+
+ // 消费有礼
+ oilOrderService.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getId());
//修改优惠券使用状态
//新表
CardCouponUser cardCouponUser = cardCouponUserMapper.selectOne(new LambdaQueryWrapper()
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
index 628ce994b..759f76397 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/order/service/impl/OilOrderServiceImpl.java
@@ -656,9 +656,6 @@ public class OilOrderServiceImpl extends ServiceImpl i
}
baseMapper.insert(order);
- if (order.getOrderStatus().equals("paid")) {
- this.updateCardAndActiveById(storeId, userId, order.getId());
- }
}
// 添加收银台订单信息
@@ -739,6 +736,9 @@ public class OilOrderServiceImpl extends ServiceImpl i
insertFavorable(oilOrder2, Double.valueOf(oilCardAmount));
}
cashierOrder.setOilOrderId(oilOrder2.getId());
+ if (oilOrder2.getOrderStatus().equals("paid")) {
+ this.updateCardAndActiveById(storeId, userId, oilOrder2.getId());
+ }
}
if (!ObjectUtil.isEmpty(goodsOrder1)) {
orders.put("goodsOrder", goodsOrder1);
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilTankMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilTankMapper.xml
index 0532eefa1..027535221 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilTankMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/petrolStationManagement/mapper/xml/OilTankMapper.xml
@@ -92,6 +92,12 @@
and inventory_statistics = #{oilTank.inventoryStatistics}
+
+ and date_format(update_time,'%y%m%d') >= date_format(#{oilTank.params.beginTime},'%y%m%d')
+
+
+ and date_format(update_time,'%y%m%d') <= date_format(#{oilTank.params.endTime},'%y%m%d')
+
ORDER BY update_time DESC