Merge branch 'master' of https://gitee.com/nny_1/oilSystem
This commit is contained in:
commit
6830a50945
@ -65,6 +65,16 @@ public class LJStaffController extends BaseController {
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询当前店铺所有加油员信息
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/queryList1/{storeId}")
|
||||
public ResponseObject queryStaffs1(@PathVariable Integer storeId){
|
||||
List<LJStaff> list = mtStaffService.queryStaffLists1(storeId);
|
||||
return getSuccessResult(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
* @param id
|
||||
|
@ -36,6 +36,12 @@ public interface ILJStaffService extends IService<LJStaff> {
|
||||
*/
|
||||
public List<LJStaff> queryStaffLists(Integer storeId);
|
||||
|
||||
/**
|
||||
* 查询当前店铺所有加油员信息
|
||||
* @return
|
||||
*/
|
||||
public List<LJStaff> queryStaffLists1(Integer storeId);
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
* @param id
|
||||
|
@ -93,6 +93,17 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LJStaff> queryStaffLists1(Integer storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
queryWrapper.eq("status","qy");
|
||||
queryWrapper.eq("role_id","15");
|
||||
queryWrapper.eq("if_delete","0");
|
||||
List list = baseMapper.selectList(queryWrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询员工信息
|
||||
* @param id
|
||||
|
@ -189,42 +189,44 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
List<OilOrderVo> oilOrderVos = baseMapper.selectOilOrderByOrderNo(orderNo,nowAccountInfo.getStoreId());
|
||||
Double deductionAmount = 0.0;
|
||||
for (OilOrderVo oilOrderVo : oilOrderVos) {
|
||||
if (ObjectUtil.isNotEmpty(oilOrderVo.getActiveId()) && ObjectUtil.isNotEmpty(oilOrderVo.getActiveType())){
|
||||
if (oilOrderVos.size()>0) {
|
||||
for (OilOrderVo oilOrderVo : oilOrderVos) {
|
||||
if (ObjectUtil.isNotEmpty(oilOrderVo.getActiveId()) && ObjectUtil.isNotEmpty(oilOrderVo.getActiveType())) {
|
||||
// 满减
|
||||
if (oilOrderVo.getActiveType().equals("1")){
|
||||
ActiveFullminusVO oneById = activeFullminusService.getOneById(oilOrderVo.getActiveId());
|
||||
List<ActiveDiscountChild> activeDiscountChildList = oneById.getActiveDiscountChildList();
|
||||
for (ActiveDiscountChild activeDiscountChild : activeDiscountChildList) {
|
||||
if (activeDiscountChild.getAmount()<=oilOrderVo.getOrderAmount()){
|
||||
if (oilOrderVo.getActiveType().equals("1")) {
|
||||
ActiveFullminusVO oneById = activeFullminusService.getOneById(oilOrderVo.getActiveId());
|
||||
List<ActiveDiscountChild> activeDiscountChildList = oneById.getActiveDiscountChildList();
|
||||
for (ActiveDiscountChild activeDiscountChild : activeDiscountChildList) {
|
||||
if (activeDiscountChild.getAmount() <= oilOrderVo.getOrderAmount()) {
|
||||
// oilOrderVo.setDeductionAmount(activeDiscountChild.getDeductionAmount());
|
||||
deductionAmount += activeDiscountChild.getDeductionAmount();
|
||||
break;
|
||||
deductionAmount += activeDiscountChild.getDeductionAmount();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 折扣
|
||||
if (oilOrderVo.getActiveType().equals("2")){
|
||||
ActiveDiscountVO oneById = activeDiscountService.getOneById(oilOrderVo.getActiveId());
|
||||
List<ActiveDiscountChild> activeDiscountChildList = oneById.getActiveDiscountChildList();
|
||||
for (ActiveDiscountChild activeDiscountChild : activeDiscountChildList) {
|
||||
if (activeDiscountChild.getAmount()<=oilOrderVo.getOrderAmount()){
|
||||
if (oilOrderVo.getActiveType().equals("2")) {
|
||||
ActiveDiscountVO oneById = activeDiscountService.getOneById(oilOrderVo.getActiveId());
|
||||
List<ActiveDiscountChild> activeDiscountChildList = oneById.getActiveDiscountChildList();
|
||||
for (ActiveDiscountChild activeDiscountChild : activeDiscountChildList) {
|
||||
if (activeDiscountChild.getAmount() <= oilOrderVo.getOrderAmount()) {
|
||||
// oilOrderVo.setDeductionAmount(oilOrderVo.getOrderAmount() - (oilOrderVo.getOrderAmount()*activeDiscountChild.getDiscount()));
|
||||
deductionAmount += oilOrderVo.getOrderAmount() - (oilOrderVo.getOrderAmount()*activeDiscountChild.getDiscount());
|
||||
break;
|
||||
deductionAmount += oilOrderVo.getOrderAmount() - (oilOrderVo.getOrderAmount() * activeDiscountChild.getDiscount());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 优惠券
|
||||
if (ObjectUtil.isNotEmpty(oilOrderVo.getCouponId())){
|
||||
CardFavorableVO cardFavorableVO = cardFavorableService.selectOneById(oilOrderVo.getCouponId());
|
||||
oilOrderVo.setCouponAmount(cardFavorableVO.getDiscountAmount());
|
||||
}else {
|
||||
oilOrderVo.setCouponAmount(0.0);
|
||||
if (ObjectUtil.isNotEmpty(oilOrderVo.getCouponId())) {
|
||||
CardFavorableVO cardFavorableVO = cardFavorableService.selectOneById(oilOrderVo.getCouponId());
|
||||
oilOrderVo.setCouponAmount(cardFavorableVO.getDiscountAmount());
|
||||
} else {
|
||||
oilOrderVo.setCouponAmount(0.0);
|
||||
}
|
||||
}
|
||||
oilOrderVos.get(0).setDeductionAmount(deductionAmount);
|
||||
}
|
||||
oilOrderVos.get(0).setDeductionAmount(deductionAmount);
|
||||
return oilOrderVos;
|
||||
}
|
||||
|
||||
@ -1016,7 +1018,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
|
||||
@Override
|
||||
public String addOilOrder(OilOrder oilOrder) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo1();
|
||||
// 根据日期生成订单信息
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String timestamp = dateFormat.format(new Date());
|
||||
@ -1068,6 +1071,8 @@ public class OilOrderServiceImpl extends ServiceImpl<OilOrderMapper, OilOrder> i
|
||||
String balanceAmountSale = map.get("balanceAmountSale");
|
||||
String oilCardAmountSale = map.get("oilCardAmountSale");
|
||||
Integer tankId = Integer.valueOf(map.get("tankId"));
|
||||
// 是否登录
|
||||
String ifLogin = map.get("ifLogin");
|
||||
|
||||
Map<String, Object> applet = new HashMap<>();
|
||||
applet.put("success","");
|
||||
|
@ -67,6 +67,16 @@ public class ShiroConfig {
|
||||
filterMap.put("/business/petrolStationManagement/oilGun/queryGunList/**","anon"); // 获取油枪列表信息
|
||||
filterMap.put("/business/petrolStationManagement/oilTank/**","anon"); // 获取油罐信息
|
||||
filterMap.put("/business/oilOrder/addOilOrder","anon"); // 添加油品订单信息
|
||||
filterMap.put("/business/member/staff/queryList1/**","anon"); // 获取店铺员工信息列表
|
||||
filterMap.put("/clientApi/sign/mpWxLogin2","anon"); // 获取微信openid
|
||||
//加油页面免登录配置
|
||||
filterMap.put("/business/oilOrder/appletPay","anon"); // 调起支付接口
|
||||
filterMap.put("/business/allOrderInfo/orderStatus","anon"); // 修改订单状态信息
|
||||
filterMap.put("/business/userManager/userGrade/isUse","anon"); // 查看是否有可使用的会员等级优惠
|
||||
filterMap.put("/business/userManager/user/storeUser","anon"); // 根据店铺id查询用户信息
|
||||
filterMap.put("/business/marketingActivity/activeExchange/getPaymentActive","anon"); // 查询用户油品订单的优惠信息
|
||||
filterMap.put("/business/oilOrder/oilOrderNo","anon"); // 获取油品订单
|
||||
filterMap.put("/business/petrolStationManagement/oilNumber/getOilNumberName/**","anon"); // 获取店铺油号信息
|
||||
|
||||
|
||||
|
||||
|
@ -192,9 +192,9 @@ public class ClientSignController extends BaseController {
|
||||
return getSuccessResult(true);
|
||||
}
|
||||
|
||||
// if ((Boolean) param.get("isRefuel") == true){
|
||||
// return getSuccessResult(true);
|
||||
// }
|
||||
if ((Boolean) param.get("isRefuel") == true){
|
||||
return getSuccessResult(true);
|
||||
}
|
||||
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
if (ObjectUtil.isEmpty(nowAccountInfo)) return getSuccessResult(true);
|
||||
|
@ -248,10 +248,12 @@
|
||||
this.storeId = uni.getStorageSync("storeId")
|
||||
this.staffId = uni.getStorageSync("inviteStaffId")
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
this.getStaffList(uni.getStorageSync("storeId"));
|
||||
}
|
||||
} else {
|
||||
if (uni.getStorageSync("storeId")) {
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
this.getStaffList(uni.getStorageSync("storeId"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -261,6 +263,7 @@
|
||||
onShow() {
|
||||
// this.isExistStoreId();
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
this.getStaffList(uni.getStorageSync("storeId"));
|
||||
// this.getStore(0);
|
||||
this.getTheJudgmentIsTheSame()
|
||||
|
||||
@ -274,6 +277,7 @@
|
||||
isExistStoreId() {
|
||||
if (uni.getStorageSync("storeId") != "") {
|
||||
this.getStore(uni.getStorageSync("storeId"));
|
||||
this.getStaffList(uni.getStorageSync("storeId"));
|
||||
} else {
|
||||
this.getAddress();
|
||||
}
|
||||
@ -292,7 +296,7 @@
|
||||
},
|
||||
}).then((res) => {
|
||||
_this.getOilNumber(id);
|
||||
_this.getStaffList(id)
|
||||
// _this.getStaffList(id)
|
||||
_this.store = res.data
|
||||
_this.storeId = res.data.id;
|
||||
uni.setStorageSync("storeId", _this.store.id)
|
||||
@ -332,7 +336,7 @@
|
||||
_this.store = response.data.store;
|
||||
_this.storeId = response.data.store.id;
|
||||
_this.getOilNumber(_this.storeId);
|
||||
_this.getStaffList(_this.storeId)
|
||||
// _this.getStaffList(_this.storeId)
|
||||
let welfare = response.data.store.welfare;
|
||||
if (welfare != undefined && welfare != null && welfare != "") {
|
||||
if (welfare.includes(",")) {
|
||||
@ -385,9 +389,8 @@
|
||||
getStaffList(storeId) {
|
||||
let _this = this;
|
||||
request({
|
||||
url: "business/member/staff/queryList",
|
||||
method: 'post',
|
||||
data:{storeId:storeId}
|
||||
url: "business/member/staff/queryList1/"+storeId,
|
||||
method: 'get',
|
||||
}).then((res) => {
|
||||
_this.staffList = res.data
|
||||
})
|
||||
@ -545,22 +548,23 @@
|
||||
// if (!this.AppToken) {
|
||||
// return;
|
||||
// }
|
||||
await request({
|
||||
url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
method: 'get',
|
||||
data: {
|
||||
"chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
}
|
||||
}).then(res => {
|
||||
if (!res.data) {
|
||||
uni.removeStorageSync("App-Token");
|
||||
}
|
||||
})
|
||||
// await request({
|
||||
// url: 'chainStoreInfo/theJudgmentIsTheSame',
|
||||
// method: 'get',
|
||||
// data: {
|
||||
// "chainStoreId": uni.getStorageSync("chainStoreId")
|
||||
// }
|
||||
// }).then(res => {
|
||||
// if (!res.data) {
|
||||
// uni.removeStorageSync("App-Token");
|
||||
// }
|
||||
// })
|
||||
|
||||
if (uni.getStorageSync("appltType")== "WECHAT") {
|
||||
// 判断当前登录的code是否相同
|
||||
wx.login({
|
||||
success(res) {
|
||||
console.log(res);
|
||||
if (res.code) {
|
||||
//发起网络请求
|
||||
request({
|
||||
|
Loading…
Reference in New Issue
Block a user