diff --git a/fuintAdmin/src/App.vue b/fuintAdmin/src/App.vue index 60c976733..326251846 100644 --- a/fuintAdmin/src/App.vue +++ b/fuintAdmin/src/App.vue @@ -20,7 +20,7 @@ diff --git a/fuintAdmin/src/api/EventMarketing/activeConsumption.js b/fuintAdmin/src/api/EventMarketing/activeConsumption.js index e6f22c120..9d8f1ae2d 100644 --- a/fuintAdmin/src/api/EventMarketing/activeConsumption.js +++ b/fuintAdmin/src/api/EventMarketing/activeConsumption.js @@ -78,7 +78,7 @@ export function updateActiveConsumption(data) { // 删除消费有礼活动 export function delActiveConsumption(id) { return request({ - url: '/business/marketingActivity/activeConsumption/' + id, + url: 'business/marketingActivity/activeConsumption/delById/' + id, method: 'delete' }) } diff --git a/fuintAdmin/src/api/staff/user/usergrade.js b/fuintAdmin/src/api/staff/user/usergrade.js index 391d73108..0229fd380 100644 --- a/fuintAdmin/src/api/staff/user/usergrade.js +++ b/fuintAdmin/src/api/staff/user/usergrade.js @@ -1,11 +1,11 @@ import request from '@/utils/request' // 查询会员等级列表 -export function listUserGrade(query) { +export function listUserGrade() { return request({ url: '/business/userManager/userGrade/list', method: 'get', - params: query + }) } diff --git a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue index b05405ac8..f478f9c63 100644 --- a/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue +++ b/fuintAdmin/src/views/EventMarketing/activeConsumption/index.vue @@ -52,23 +52,50 @@ + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -113,6 +163,18 @@ + + + + + + + + @@ -523,6 +585,10 @@ export default { name: "ActiveConsumption", data() { return { + moneyList:[ + {name:'订单金额',id:'1'}, + {name:'实付金额',id:'2'} + ], labelPosition:'left', userGradeList:[], pdidlist:[],//判断优惠券id @@ -625,6 +691,9 @@ export default { adaptOil: [ { required: true, message: '必填项不能为空', trigger: 'blur' }, ], + moneyType:[ + { required: true, message: '必填项不能为空', trigger: 'blur' }, + ], name: [ { required: true, message: '必填项不能为空', trigger: 'blur' }, ], @@ -966,9 +1035,13 @@ export default { const id = row.id || this.ids getActiveConsumption(id).then(response => { this.form = response.data; - this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1') - this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2') - this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4') + if(response.data.activeConsumptionChildList&&response.data.activeConsumptionChildList.length >1){ + this.form.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '1') + this.tableDatas = response.data.activeConsumptionChildList.filter(item => item.activeGift == '2') + this.form.shiwudata = response.data.activeConsumptionChildList.filter(item => item.activeGift == '4') + } + + this.open = true; this.title = "修改消费有礼活动"; }); @@ -1044,16 +1117,19 @@ export default { } }); }, - /** 删除按钮操作 */ - handleDelete(row) { - const ids = row.id || this.ids; - this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() { - return delActiveConsumption(ids); - }).then(() => { - this.getList(); - this.$modal.msgSuccess("删除成功"); - }).catch(() => {}); + Deleteshan(row){ + + const ids = row.id || this.ids; + this.$modal.confirm('是否确认删除消费有礼活动编号为"' + ids + '"的数据项?').then(function() { + return delActiveConsumption(ids); + }).then(() => { + this.getList(); + this.$modal.msgSuccess("删除成功"); + }).catch(() => {}); + }, + /** 删除按钮操作 */ + /** 导出按钮操作 */ handleExport() { this.download('business/marketingActivity/activeConsumption/export', { diff --git a/fuintAdmin/src/views/EventMarketing/activeDiscount/index.vue b/fuintAdmin/src/views/EventMarketing/activeDiscount/index.vue index 1ea62d12a..5a52b9369 100644 --- a/fuintAdmin/src/views/EventMarketing/activeDiscount/index.vue +++ b/fuintAdmin/src/views/EventMarketing/activeDiscount/index.vue @@ -51,11 +51,32 @@ - + + + + + + + + + + + + + + + + @@ -65,6 +86,22 @@ + + + + + + + + + + + + + + + + + + + @@ -106,24 +130,23 @@ + -
+
- +
- +
-
- -
- + + +
-
- 新增 -
- + + + @@ -204,6 +227,10 @@ export default { name: "ActiveFullminus", data() { return { + activeDiscountChildList:[ + {amount:'',deductionAmount:''}, + + ], labelPosition:'left', oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#'], userGradeList: [], @@ -444,6 +471,7 @@ export default { }, /** 提交按钮 */ submitForm() { + this.form.activeDiscountChildList = this.activeDiscountChildList this.$refs["form"].validate(valid => { if (valid) { if (this.form.id != null) { diff --git a/fuintAdmin/src/views/EventMarketing/activeNewlyweds/index.vue b/fuintAdmin/src/views/EventMarketing/activeNewlyweds/index.vue index 3c08d97d7..5834fabb6 100644 --- a/fuintAdmin/src/views/EventMarketing/activeNewlyweds/index.vue +++ b/fuintAdmin/src/views/EventMarketing/activeNewlyweds/index.vue @@ -180,270 +180,71 @@
+ + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -661,6 +462,7 @@ export default { points: null, growthValue: null, }, + activeFullminusList: [], // 表单参数 form: { id:1, @@ -695,11 +497,19 @@ export default { }; }, created() { - this.handleUpdate(); + this.getList() + // this.handleUpdate(); }, methods: { /** 查询新人有礼活动列表 */ getList() { + this.loading = true; + getActiveNewlyweds(1).then(res=>{ + this.activeFullminusList = res.data; + this.total = res.data.total; + console.log(res) + this.loading = false; + }) // this.loading = true; // listActiveNewlyweds(this.queryParams).then(response => { // this.activeNewlywedsList = response.data.records; diff --git a/fuintAdmin/src/views/convenienceStore/goodsFile.vue b/fuintAdmin/src/views/convenienceStore/goodsFile.vue index 80926eebf..a92177301 100644 --- a/fuintAdmin/src/views/convenienceStore/goodsFile.vue +++ b/fuintAdmin/src/views/convenienceStore/goodsFile.vue @@ -91,7 +91,7 @@ -
+
+ 统一交班 + 个人交班 + + + + @@ -43,8 +49,6 @@ - - { + this.staffList = response.data.records; + + } + ); + }, resetQuery(){ this.queryParams = { giftName: '', @@ -187,6 +201,7 @@ export default { pageSize:10 }, this.dateRange = [] + this.getList(); }, printLocally(data) { printLocallyApi(data).then(res=>{ diff --git a/fuintAdmin/src/views/handover/HandoverOnly.vue b/fuintAdmin/src/views/handover/HandoverOnly.vue index 6682084ac..79bfb911d 100644 --- a/fuintAdmin/src/views/handover/HandoverOnly.vue +++ b/fuintAdmin/src/views/handover/HandoverOnly.vue @@ -58,11 +58,11 @@
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilPaid : '0' }}
-
-
油品优惠(实收)
-
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.oilDiacount : '0' }}
+ + + -
+ @@ -75,11 +75,11 @@
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardOrder : '0' }}
-
-
会员储值(退款)
-
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardRefund : '0' }}
+ + + -
+
会员储值(实收)
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardPaid : '0' }}
@@ -90,11 +90,11 @@
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftOrder : '0' }}
-
-
储值赠送(退款)
-
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftRefund : '0' }}
+ + + -
+
储值赠送(实际)
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.cardGiftPaid : '0' }}
@@ -107,11 +107,11 @@
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelOrder : '0' }}
-
-
存油储值(退款)
-
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelRefund : '0' }}
+ + + -
+
存油储值(实收)
¥{{ handoverList && handoverList.orderSummary ? handoverList.orderSummary.fuelPaid : '0' }}
diff --git a/fuintAdmin/src/views/integral/order/pointsCashier.vue b/fuintAdmin/src/views/integral/order/pointsCashier.vue index 02f19dbf6..f20a4efb3 100644 --- a/fuintAdmin/src/views/integral/order/pointsCashier.vue +++ b/fuintAdmin/src/views/integral/order/pointsCashier.vue @@ -16,7 +16,7 @@ 未支付 付款成功 付款失败 - + - + { + getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{ this.statisticsForm = res.data }) }, @@ -206,6 +205,7 @@ export default { handleUpdate(){}, handleQuery(){ this.getList(); + this.getStatistics(); }, resetQuery(){ @@ -218,7 +218,9 @@ export default { pageSize:10 }, this.dateRange = [] - this.getList(); + this.getList() + this.getStatistics(); + }, handleDetail(data){ this.openDetail = true diff --git a/fuintAdmin/src/views/member/index.vue b/fuintAdmin/src/views/member/index.vue index 247776ff0..57ef64c26 100644 --- a/fuintAdmin/src/views/member/index.vue +++ b/fuintAdmin/src/views/member/index.vue @@ -254,7 +254,7 @@ - + @@ -268,31 +268,31 @@ 批量导入会员
-
- - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - -
+ + + + + + + diff --git a/fuintAdmin_zt/src/main.js b/fuintAdmin_zt/src/main.js index 9f64dc225..ddfaf92e8 100644 --- a/fuintAdmin_zt/src/main.js +++ b/fuintAdmin_zt/src/main.js @@ -48,7 +48,7 @@ Vue.prototype.getName = getName Vue.prototype.download = download Vue.prototype.handleTree = handleTree // Vue.prototype.pcUrl = 'http://192.168.0.121:82/' -Vue.prototype.pcUrl = 'http://192.168.0.121:82/' +Vue.prototype.pcUrl = 'http://192.168.0.178:81/' // Vue.prototype.pcUrl = 'http://47.95.206.185:85/' // 全局组件挂载 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 96ffdcdac..4429da76e 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 @@ -13,6 +13,7 @@ import com.fuint.api.fuyou.util.Utils; import com.fuint.business.commission.service.StaffCommissionService; import com.fuint.business.integral.entity.IntegralOrders; import com.fuint.business.integral.service.IntegralOrdersService; +import com.fuint.business.integral.service.IntegralSettingsService; import com.fuint.business.marketingActivity.cardFavorable.entity.CardFavorableRecord; import com.fuint.business.marketingActivity.cardFavorable.service.CardFavorableRecordService; import com.fuint.business.marketingActivity.cardFule.entity.CardFuelRecord; @@ -51,6 +52,8 @@ public class FyPayServiceImpl implements FyPayService { private StaffCommissionService staffCommissionService; @Autowired private MerchantConfigRecordService merchantConfigRecordService; + @Resource + private IntegralSettingsService integralSettingsService; /** * 条码支付 @@ -194,14 +197,16 @@ public class FyPayServiceImpl implements FyPayService { oilOrder.setTankId(tankId); oilOrderService.addOilTracks(oilOrder, oilOrder.getStoreId()); } + + if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder); // 修改优惠券使用状态 - if (oilOrder.getCouponId()!=null){ - CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrder.getCouponId()); - if (!ObjectUtil.isEmpty(byId)){ - byId.setStatus("1"); - cardFavorableRecordService.updateById(byId); - } - } +// if (oilOrder.getCouponId()!=null){ +// CardFavorableRecord byId = cardFavorableRecordService.getById(oilOrder.getCouponId()); +// if (!ObjectUtil.isEmpty(byId)){ +// byId.setStatus("1"); +// cardFavorableRecordService.updateById(byId); +// } +// } } if (!ObjectUtil.isEmpty(goodsOrder)){ // 商品订单 diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralOrdersMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralOrdersMapper.xml index 6f000fcde..13ccb8ece 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralOrdersMapper.xml +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/mapper/xml/IntegralOrdersMapper.xml @@ -40,6 +40,8 @@ + + @@ -73,6 +75,9 @@ io.update_time, io.courier_companies, io.the_tracking_number, + io.actual_payment, + io.make_change, + io.payment_type, mu.mobile, mu.user_no, mu.name, diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/IntegralSettingsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/IntegralSettingsService.java index d36e7cd1b..bb070f50e 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/IntegralSettingsService.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/IntegralSettingsService.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.fuint.business.integral.entity.IntegralGift; import com.fuint.business.integral.entity.IntegralSettings; +import com.fuint.business.order.entity.OilOrder; import io.lettuce.core.dynamic.annotation.Param; @@ -69,4 +70,9 @@ public interface IntegralSettingsService { IntegralSettings signInFunction(IntegralSettings integralSettings); + /** + * 加油赠送积分 + * @param order + */ + void refuelPoints(OilOrder order); } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java index 7a8316e54..a78786162 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralOrdersServiceImpl.java @@ -447,7 +447,7 @@ public class IntegralOrdersServiceImpl implements IntegralOrdersService { // 首先判断是否足够积分 LJUserVo ljUserVos = ljUserMapper.selectAllInfoById2(nowAccountInfo.getId(), integralOrdersList.getChainStoreId()); - if (ljUserVos.getPoints() <= integralOrdersList.getAllPoints()) { + if (Double.valueOf(ljUserVos.getPoints()).compareTo(integralOrdersList.getAllPoints()) <0 ) { integralOrdersList.getIntegralOrdersList().get(0).setStatus("un"); applet.put("code", "error"); applet.put("msg", "积分不足"); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java index edbd67eb8..7debd205d 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/integral/service/impl/IntegralSettingsServiceImpl.java @@ -15,6 +15,7 @@ import com.fuint.business.integral.mapper.IntegralDetailMapper; import com.fuint.business.integral.mapper.IntegralSettingsMapper; import com.fuint.business.integral.service.IntegralDetailService; import com.fuint.business.integral.service.IntegralSettingsService; +import com.fuint.business.order.entity.OilOrder; import com.fuint.business.petrolStationManagement.entity.OilNumber; import com.fuint.business.petrolStationManagement.mapper.OilNumberMapper; import com.fuint.business.storeInformation.entity.LJStore; @@ -107,6 +108,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService { refuelConsumptionAmountMap.put("oilName", oilNumber.getOilName() + oilNumber.getOilType()); refuelConsumptionAmountMap.put("amount", 0); refuelConsumptionAmountMap.put("integral", 0); + refuelConsumptionAmountMap.put("oilNameId", oilNumber.getId()); refuelConsumptionAmountList.add(refuelConsumptionAmountMap); } String refuelConsumptionAmount = JSON.toJSONString(refuelConsumptionAmountList); @@ -126,6 +128,7 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService { refuelConsumptionAmountMap.put("oilName", oilNumber.getOilName() + oilNumber.getOilType()); refuelConsumptionAmountMap.put("amount", 0); refuelConsumptionAmountMap.put("integral", 0); + refuelConsumptionAmountMap.put("oilNameId",oilNumber.getId()); refuelConsumptionAmountList.add(refuelConsumptionAmountMap); } String refuelConsumptionAmount = JSON.toJSONString(refuelConsumptionAmountList); @@ -298,6 +301,69 @@ public class IntegralSettingsServiceImpl implements IntegralSettingsService { return null; } + @Override + public void refuelPoints(OilOrder order) { + IntegralSettings integralSettings = integralSettingsMapper.getByStoreId(order.getStoreId()); + if (ObjectUtil.isNotEmpty(integralSettings) && integralSettings.getRefuelPointsRules()==0 + && integralSettings.getRefuelPointsFunction() ==0){ + if (integralSettings.getRefuelSceneType()==0){ +// 按金额 + if (integralSettings.getRefuelAmountType()==0){ +// 按订单金额 + countPoints(integralSettings,order.getOils(),order.getOrderAmount(),order.getUserId()); + }else { +// 按实付金额 + if (integralSettings.getRefuelValueParticipation()==0){ +// 储值金额不参与 + countPoints(integralSettings,order.getOils(),order.getPayAmount(),order.getUserId()); + }else { +// 储值金额参与 + countPoints(integralSettings,order.getOils(),order.getPayAmount()+order.getBalanceAmount(),order.getUserId()); + } + } + }else if (integralSettings.getRefuelSceneType()==1){ +// 按实付金额 + countPoints(integralSettings,order.getOils(),order.getPayAmount()+order.getBalanceAmount(),order.getUserId()); + } + } + } + + /** + * 计算赠送积分 + * @param integralSettings + * @param oilId 油品id + * @param amount 消费金额 + * @param userId 用户id + */ + private void countPoints(IntegralSettings integralSettings,String oilId,Double amount,Integer userId){ + LJStore store = iljStoreService.selectStoreByStoreId(integralSettings.getStoreId()); + UserBalance balance = userBalanceService.selectUserBalance(userId, store.getChainStoreId()); + if (ObjectUtil.isNotEmpty(balance)) { + if (integralSettings.getRefuelSceneRules()==0) { +// 通用规则 + if (integralSettings.getRefuelFuelAmount() <= amount) { + Integer points = balance.getPoints(); + balance.setPoints(points+integralSettings.getRefuelPoints()); + } + } else { +// 油品区分 + JSONArray jsonArray = JSONArray.parseArray(integralSettings.getRefuelConsumptionAmount()); + for (int i = 0;i - + + @@ -63,6 +64,10 @@ and staff_id = #{staffId} + and status = '个人交班' + + + and status = '统一交班' and record_data = #{recordData} @@ -379,6 +384,14 @@ limit 1 a.staffId AS staffId, sum( a.numberOfDeals ) AS numberOfDeals, SUM( a.paidAmount) AS paidAmount, + SUM(IF(a.flag ='oil', a.numberOfDeals,0)) oilN, + SUM(IF(a.flag ='oil', a.paidAmount,0)) oilP, + SUM(IF(a.flag ='card', a.numberOfDeals,0)) cardN, + SUM(IF(a.flag ='card', a.paidAmount,0)) cardP, + SUM(IF(a.flag ='fuel', a.numberOfDeals,0)) fuelN, + SUM(IF(a.flag ='fuel', a.paidAmount,0)) fuelP, + SUM(IF(a.flag ='goods', a.numberOfDeals,0)) goodsN, + SUM(IF(a.flag ='goods', a.paidAmount,0)) goodsP, ms.real_name name from (SELECT @@ -424,26 +437,26 @@ limit 1 where store_id = #{storeId} and create_time BETWEEN #{startTime} AND #{endTime} GROUP BY - staff_id UNION ALL - - SELECT - 'point' AS flag, - staff_id staffId, - count( STATUS = 'paid' ) numberOfDeals, - SUM(IF(status='status', amount, 0)) AS paidAmount - FROM - integral_orders - where store_id = #{storeId} - and create_time BETWEEN #{startTime} AND #{endTime} - GROUP BY payment_type - having staff_id is not null + staff_id ) AS a left join mt_staff ms ON a.staffId = ms.id GROUP BY a.staffId HAVING a.staffId is not null + + + + + + + + + + + + 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 2afe2deb1..b5e5041b8 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 @@ -18,6 +18,7 @@ import com.fuint.business.convenienceSore.entity.LJGoods; import com.fuint.business.convenienceSore.entity.SaleDetail; import com.fuint.business.convenienceSore.service.LJGoodsService; import com.fuint.business.convenienceSore.service.SaleDetailService; +import com.fuint.business.integral.service.IntegralSettingsService; import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild; import com.fuint.business.marketingActivity.activeDiscount.service.ActiveDiscountService; import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO; @@ -114,6 +115,8 @@ public class OilOrderServiceImpl extends ServiceImpl i private ActiveFullminusService activeFullminusService; @Resource private ActiveDiscountService activeDiscountService; + @Resource + private IntegralSettingsService integralSettingsService; @Override public IPage selectOilOrderList(Page page, OilOrder order) { @@ -487,6 +490,7 @@ public class OilOrderServiceImpl extends ServiceImpl i cashierOrder.setOilDiscountAmount(oilDiscount); cashierOrder.setTerminal(terminal); cashierOrder.setPayType(payType); + cashierOrder.setAfterDiscountAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount); // 如果金额不等于0调用第三方支付接口 if (!map.get("allAmount").equals("0") && !map.get("payType").equals("CASH")){ @@ -521,7 +525,6 @@ public class OilOrderServiceImpl extends ServiceImpl i // throw new RuntimeException("支付失败"); } }else { - cashierOrder.setPayAmount(oilAmount+goodsAmount-oilDiscount-goodsDiscount); this.insertAllOrderInfo(orderNo,storeId,oilAmount+goodsAmount,Double.valueOf(map.get("allAmount")),payType,userId,"PC","6","paid"); } @@ -531,6 +534,7 @@ public class OilOrderServiceImpl extends ServiceImpl i orders.put("oilOrder",oilOrder2); if (oilOrder2.getOrderStatus().equals("paid")){ cashierOrder.setPayTime(new Date()); + if (ObjectUtil.isNotEmpty(oilOrder2.getUserId())) integralSettingsService.refuelPoints(oilOrder2); } cashierOrder.setOilOrderId(oilOrder2.getId()); } @@ -1221,6 +1225,7 @@ public class OilOrderServiceImpl extends ServiceImpl i } this.updateOilOrder(oilOrder); if (oilOrder.getOrderStatus().equals("paid")) { + if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder); this.updateCardAndActiveById(oilOrder.getStoreId(), oilOrder.getUserId(), oilOrder.getActiveId(), oilOrder.getCouponId(), oilOrder.getActiveType(), oilOrder.getOrderAmount(), Integer.valueOf(oilOrder.getOils())); } @@ -1268,6 +1273,7 @@ public class OilOrderServiceImpl extends ServiceImpl i // oilOrder.setPayAmount(oilOrder.getOrderAmount()-oilOrder.getDiscountAmount()); oilOrder.setOrderStatus(status); if (status.equals("paid")){ + if (ObjectUtil.isNotEmpty(oilOrder.getUserId())) integralSettingsService.refuelPoints(oilOrder); oilOrder.setPayTime(new Date()); CardValueChildOrder cardValueChildOrder = cardValueChildOrderService.selectCardValueChildOrderByOrderNo(orderNo); if (ObjectUtil.isNotEmpty(cardValueChildOrder)){ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java index 84e64ab67..f9a74a4b2 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java @@ -12,6 +12,7 @@ import com.fuint.business.storeInformation.service.ILJStoreService; import com.fuint.business.userManager.entity.*; import com.fuint.business.userManager.mapper.LJUserMapper; import com.fuint.business.userManager.mapper.MtInvitationMapper; +import com.fuint.business.userManager.mapper.UserBalanceMapper; import com.fuint.business.userManager.service.*; import com.fuint.business.userManager.vo.LJUserVo; import com.fuint.common.dto.AccountInfo; @@ -34,6 +35,8 @@ public class LJUserServiceImpl extends ServiceImpl impleme @Autowired private UserBalanceService balanceService; @Autowired + private UserBalanceMapper userBalanceMapper; + @Autowired private ILJStoreService storeService; @Resource private LJUserMapper ljUserMapper; @@ -145,12 +148,14 @@ public class LJUserServiceImpl extends ServiceImpl impleme QueryWrapper queryWrapper = new QueryWrapper<>(); queryWrapper.apply(true, "TO_DAYS(NOW())-TO_DAYS(create_time) = 0"); - Integer addNum = baseMapper.selectCount(queryWrapper); +// Integer addNum = baseMapper.selectCount(queryWrapper); + Integer addNum = userBalanceMapper.selectCount(queryWrapper); QueryWrapper queryWrapper1 = new QueryWrapper<>(); queryWrapper1.apply(true, "TO_DAYS(NOW())-TO_DAYS(create_time) = 1"); - Integer yesterdayAddNum = baseMapper.selectCount(queryWrapper1); +// Integer yesterdayAddNum = baseMapper.selectCount(queryWrapper1); + Integer yesterdayAddNum = userBalanceMapper.selectCount(queryWrapper1); map.put("balance",balance); map.put("point",point); diff --git a/fuintCashierWeb/src/api/cashier/balancecardrecord.js b/fuintCashierWeb/src/api/cashier/balancecardrecord.js index 3ae0e1d11..6763fd7b8 100644 --- a/fuintCashierWeb/src/api/cashier/balancecardrecord.js +++ b/fuintCashierWeb/src/api/cashier/balancecardrecord.js @@ -19,10 +19,11 @@ export function listCardOilRecord(query) { } // 查询优惠券信息列表 -export function cardBalanceCount() { +export function cardBalanceCount(query) { return request({ url: '/business/CardBalanceChange/getBalanceStoreCount', method: 'get', + params: query }) } diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/Handover.vue b/fuintCashierWeb/src/views/cashier/NewComponents/Handover.vue index e05b2b649..6e3498556 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/Handover.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/Handover.vue @@ -315,13 +315,18 @@
员工统计
员工姓名
-
笔数
-
金额
+ +
充值(笔数/金额)
+
加油(笔数/金额)
+
商品(笔数/金额)
+
总笔数/总金额
{{item.name}}
-
{{item.numberOfDeals}}
-
¥{{item.paidAmount}}
+
{{item.cardN+item.fuelN}}/¥{{item.cardP+item.fuelP}}
+
{{item.oilN}}/¥{{item.oilP}}
+
{{item.goodsN}}/¥{{item.goodsP}}
+
{{item.numberOfDeals}}/¥{{item.paidAmount}}
@@ -428,6 +433,7 @@ import SelectStaff from "@/components/local/selectStaff.vue"; staffId:'', staffName:null } + this.getHandover() }, // 选择员工 chooseStaff() { @@ -437,7 +443,7 @@ import SelectStaff from "@/components/local/selectStaff.vue"; this.openStaff = false this.staff.staffId = data.mtStaffId, - this.staff.staffName = data.realName + this.staff.staffName = data.realName console.log("realName",this.staff.staffName) this.getHandover(); }, diff --git a/fuintCashierWeb/src/views/cashier/NewComponents/HandoverDetails.vue b/fuintCashierWeb/src/views/cashier/NewComponents/HandoverDetails.vue index 409a77f32..092345765 100644 --- a/fuintCashierWeb/src/views/cashier/NewComponents/HandoverDetails.vue +++ b/fuintCashierWeb/src/views/cashier/NewComponents/HandoverDetails.vue @@ -14,7 +14,7 @@ - + +