diff --git a/fuintAdmin/src/api/favourable/favourable.js b/fuintAdmin/src/api/favourable/favourable.js new file mode 100644 index 000000000..1a0312be7 --- /dev/null +++ b/fuintAdmin/src/api/favourable/favourable.js @@ -0,0 +1,11 @@ +import request from '@/utils/request' + +// 分页查询 +export function getFavourableList(query) { + return request({ + url: 'business/allOrderInfo/getPageList', + method: 'get', + params: query + + }) +} diff --git a/fuintAdmin/src/views/financialStatement/reconciliation/list.vue b/fuintAdmin/src/views/financialStatement/reconciliation/list.vue index d23ca2530..fd8941631 100644 --- a/fuintAdmin/src/views/financialStatement/reconciliation/list.vue +++ b/fuintAdmin/src/views/financialStatement/reconciliation/list.vue @@ -5,6 +5,7 @@ + @@ -14,6 +15,7 @@ + @@ -23,6 +25,7 @@ import ReconciliationTrading from "@/views/financialStatement/reconciliation/tab import ReconciliationRef from "@/views/financialStatement/reconciliation/tab/ref.vue"; import ReconciliationTime from "@/views/financialStatement/reconciliation/tab/time.vue"; import ReconciliationStore from "@/views/financialStatement/reconciliation/tab/store.vue"; +import ReconciliationFavourable from "@/views/financialStatement/reconciliation/tab/favourable.vue"; export default { name: "reconciliation-list", @@ -32,6 +35,7 @@ export default { } }, components:{ + ReconciliationFavourable, ReconciliationStore, ReconciliationTime, ReconciliationRef, diff --git a/fuintAdmin/src/views/financialStatement/reconciliation/tab/favourable.vue b/fuintAdmin/src/views/financialStatement/reconciliation/tab/favourable.vue new file mode 100644 index 000000000..a2dea9f56 --- /dev/null +++ b/fuintAdmin/src/views/financialStatement/reconciliation/tab/favourable.vue @@ -0,0 +1,201 @@ + + + + + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/favorableRecords/service/impl/FavorableRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/favorableRecords/service/impl/FavorableRecordsServiceImpl.java index ca55807e5..01acf5ae1 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/favorableRecords/service/impl/FavorableRecordsServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/favorableRecords/service/impl/FavorableRecordsServiceImpl.java @@ -16,9 +16,11 @@ import org.apache.commons.lang3.ObjectUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.stream.Collectors; + /** * 优惠记录表(FavorableRecords)表服务实现类 @@ -68,17 +70,18 @@ public class FavorableRecordsServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(FavorableRecords::getStoreId, nowAccountInfo.getStoreId()); - queryWrapper.eq(FavorableRecords::getChainStoreId, nowAccountInfo.getChainStoreId()); - if (ObjectUtils.isNotEmpty(favorableRecords.getFavFrom())){ - queryWrapper.eq(FavorableRecords::getFavFrom, favorableRecords.getFavFrom()); - } - if (ObjectUtils.isNotEmpty(favorableRecords.getFavType())){ - queryWrapper.eq(FavorableRecords::getFavType, favorableRecords.getFavType()); - } - if (ObjectUtils.isNotEmpty(favorableRecords.getFavConsumptionType())){ - queryWrapper.eq(FavorableRecords::getFavConsumptionType, favorableRecords.getFavConsumptionType()); + List list = list(queryWrapper); + //优惠次数 + objectObjectHashMap.put("count", list.size()); + + double allTotalCount = 0.0; + + for (FavorableRecords records : list) { + allTotalCount += records.getFavMoney(); } + objectObjectHashMap.put("allMoney",allTotalCount); return objectObjectHashMap; } + } diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AccountInfo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AccountInfo.java index 90f6dd580..dc0eb8e03 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AccountInfo.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AccountInfo.java @@ -30,6 +30,7 @@ public class AccountInfo implements Serializable { private Integer merchantId; private String merchantName; private Integer storeId; + private Integer chainStoreId; private String storeName; private Integer staffId; diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/ShiroConfig.java b/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/ShiroConfig.java index 5580e803b..a3eb1a2b4 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/ShiroConfig.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/common/shiroConfig/ShiroConfig.java @@ -32,6 +32,7 @@ public class ShiroConfig { LinkedHashMap filterMap=new LinkedHashMap<>(); filterMap.put("/backendApi/login/doLogin","anon"); filterMap.put("/backendApi/login/doLogins","anon"); + filterMap.put("/backendApi/login/doLoginApp","anon"); filterMap.put("/backendApi/login/sendMsg","anon"); filterMap.put("/clientApi/captcha/getCode","anon"); filterMap.put("/clientApi/sign/**","anon"); diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendLoginController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendLoginController.java index ae1c87ba1..74b8150ba 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendLoginController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendLoginController.java @@ -164,6 +164,73 @@ public class BackendLoginController extends BaseController { } } + + /** + * 后台登录 + * */ + @ApiOperation(value = "pos登录") + @RequestMapping(value="/doLoginApp", method = RequestMethod.POST) + @OperationServiceLog(description = "登录后台系统") + public ResponseObject doLoginApp(HttpServletRequest request, @RequestBody LoginRequest loginRequest) { + String userAgent = request.getHeader("user-agent"); + String accountName = loginRequest.getUsername(); + String password = loginRequest.getPassword(); + String uuid = loginRequest.getUuid(); + + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(TAccount::getAccountName, accountName); + TAccount one = accountService.getOne(queryWrapper); + if (ObjectUtil.isEmpty(one)){ + return getSuccessResult("用户不存在!"); + } + if (ObjectUtils.isNotEmpty(one) && ObjectUtils.isNotEmpty(one.getOwnerId()) && one.getOwnerId().toString().equals("2") + ||ObjectUtils.isNotEmpty(one) && ObjectUtils.isNotEmpty(one.getOwnerId()) && one.getOwnerId().toString().equals("1") ){ + return getSuccessResult("请登录终台端!"); + } + + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(SysDept::getDeptId,one.getDeptId()); + SysDept one1 = iSysDeptService.getOne(queryWrapper1); + if (ObjectUtils.isNotEmpty(one1) && ObjectUtils.isNotEmpty(one1.getTurnoverType()) && one1.getTurnoverType().equals("2")){ + if (ObjectUtils.isNotEmpty(one1.getTurnoverEndTime())){ + Date date = new Date(); + Date turnoverEndTime = one1.getTurnoverEndTime(); + if (date.compareTo(turnoverEndTime)>0){ + return getSuccessResult("请付费后再登录!"); + } + } + } + + + if (StringUtil.isEmpty(accountName)|| StringUtil.isEmpty(password)) { + return getFailureResult(Constants.HTTP_RESPONSE_CODE_PARAM_ERROR); + } else { + AccountInfo accountInfo = accountService.getAccountByName(loginRequest.getUsername()); + if (accountInfo == null) { + return getFailureResult(Constants.HTTP_RESPONSE_CODE_USER_LOGIN_ERROR); + } + TAccount tAccount = accountService.getAccountInfoById(accountInfo.getId()); + String myPassword = tAccount.getPassword(); + String inputPassword = accountService.getEntryptPassword(password, tAccount.getSalt()); + if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) { + return getSuccessResult("账号或密码有误"); + } + Subject subject = SecurityUtils.getSubject(); + UsernamePasswordToken info = new UsernamePasswordToken(accountInfo.getAccountName(), tAccount.getPassword()); + subject.login(info); + String token = TokenUtil.generateToken(userAgent, accountInfo.getId()); + accountInfo.setToken(token); + TokenUtil.saveAccountToken(accountInfo); + LoginResponse response = new LoginResponse(); + response.setLogin(true); + response.setToken(token); + response.setTokenCreatedTime(new Date()); + response.setStoreId(accountInfo.getStoreId()); + response.setAccountId(accountInfo.getId()); + return getSuccessResult(response); + } + } + /** * 后台登录 * */ diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/response/LoginResponse.java b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/response/LoginResponse.java index 9b2653b94..8416ccea3 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/response/LoginResponse.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/response/LoginResponse.java @@ -17,5 +17,7 @@ public class LoginResponse implements Serializable { private Date tokenExpiryTime; private String token; private Integer chainStoreId; + private Integer storeId; + private Integer accountId; private String phone; } diff --git a/gasStation-uni/config.js b/gasStation-uni/config.js index 94ba034d0..84307d3a0 100644 --- a/gasStation-uni/config.js +++ b/gasStation-uni/config.js @@ -1,16 +1,12 @@ // 应用全局配置 module.exports = { // baseUrl: 'https://vue.ruoyi.vip/prod-api', - // baseUrl: 'http://192.168.0.196:8081/', - // baseUrl: 'http://www.nuoyunr.com/lananRsc/', - - // baseUrl: 'http://192.168.0.121:8080/', - baseUrl: 'http://192.168.0.196:8081/', - imagesUrl: 'http://192.168.0.196:8081', - + // baseUrl: 'https://www.tuofeng.cc/oilAdmin/', + // baseUrl: 'https://8q4f124343.yicp.fun/', + baseUrl: 'http://192.168.31.96:8080/', // baseUrl: 'http://192.168.1.5:8002/cdJdc', - // imagesUrl: 'http://www.nuoyunr.com/lananRsc', + imagesUrl: 'http://www.nuoyunr.com/lananRsc', // 应用信息 appInfo: { // 应用名称 diff --git a/gasStation-uni/manifest.json b/gasStation-uni/manifest.json index c13c2d96e..ed45a7d37 100644 --- a/gasStation-uni/manifest.json +++ b/gasStation-uni/manifest.json @@ -40,9 +40,13 @@ ] }, /* ios打包配置 */ - "ios" : {}, + "ios" : { + "dSYMs" : false + }, /* SDK配置 */ - "sdkConfigs" : {} + "sdkConfigs" : { + "ad" : {} + } } }, /* 快应用特有相关 */ diff --git a/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue b/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue index 0a8cd8a41..8ec5fa5ed 100644 --- a/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue +++ b/gasStation-uni/pagesHome/oilRecharge/oilRecharge.vue @@ -18,9 +18,9 @@ - - + + {{item.discountActiveDescribe || ''}} @@ -89,26 +89,42 @@ - - + + {{item.discountActiveDescribe || ''}} - - {{item.oilType}} + + {{item.oilType}} - 国标油价{{item.gbPrice}}¥/L - 本站油价{{item.oilPrice}}¥/L - 锁价{{item.lockupPrice}}¥/L - 总升数{{item.incomeLitres || 0}}L - 总价¥{{item.rechargeBalance}} + + 国标油价 + {{item.gbPrice}}¥/L + + + 本站油价 + {{item.oilPrice}}¥/L + + + 锁价活动价 + {{item.lockPrice}}¥/L + + + 锁价满足金额 + {{item.rechargeBalance}}¥ + + + @@ -282,15 +298,16 @@ this.getStaffList() }, methods: { - changeBalance(){ - if (this.cardValueList.length>0) { - this.cardValueList.forEach((item,index) => { - console.log(this.balance>=item.rechargeBalance,111); - if (this.balance>=item.rechargeBalance){ - this.xzindex(index,this.balance,item.fringeBenefit,item.giftBalance,item.points,item.growthValue,item.count,item.id); + changeBalance() { + if (this.cardValueList.length > 0) { + this.cardValueList.forEach((item, index) => { + console.log(this.balance >= item.rechargeBalance, 111); + if (this.balance >= item.rechargeBalance) { + this.xzindex(index, this.balance, item.fringeBenefit, item.giftBalance, item.points, + item.growthValue, item.count, item.id); } }) - if (this.balance { if (res.code == 200) { - console.log(res,111); + console.log(res, 111); this.actList = res.data } }) @@ -349,14 +367,14 @@ if (res.code == 200) { console.log(res, _this.appltType) if (_this.appltType == "WECHAT") { - if(!res.data.reservedPayInfo){ + if (!res.data.reservedPayInfo) { uni.showToast({ - title:'支付失败,请联系商家', - icon:"none" + title: '支付失败,请联系商家', + icon: "none" }) return; } - + let payProvider = "wxpay" _this.orderInfo = JSON.parse(res.data.reservedPayInfo); uni.requestPayment({ @@ -393,10 +411,10 @@ } if (_this.appltType == "ALIPAY") { - if(!res.data.reservedTransactionId){ + if (!res.data.reservedTransactionId) { uni.showToast({ - title:'支付失败,请联系商家', - icon:"none" + title: '支付失败,请联系商家', + icon: "none" }) return; } @@ -433,7 +451,7 @@ }, //储值卡充值 addValueCarRecords() { - if (this.types==0){ + if (this.types == 0) { if (this.carValueId == '') { uni.showToast({ title: "当前店铺暂未设置电子囤油卡储值优惠,请先联系商家", @@ -441,8 +459,8 @@ }) return } - }else{ - if (!this.balance || this.balance<=0) { + } else { + if (!this.balance || this.balance <= 0) { uni.showToast({ title: "请填写充值金额,并确保充值金额大于0", icon: "error" @@ -450,8 +468,8 @@ return } } - - + + let _this = this request({ @@ -473,10 +491,10 @@ if (res.code === 200) { if (_this.appltType == "WECHAT") { - if(!res.data.reservedPayInfo){ + if (!res.data.reservedPayInfo) { uni.showToast({ - title:'支付失败,请联系商家', - icon:"none" + title: '支付失败,请联系商家', + icon: "none" }) return; } @@ -505,20 +523,20 @@ "status": "payFail" }, }).then((res) => {}) - uni.showToast({ - title: "支付失败!", - icon: "error" - }) + uni.showToast({ + title: "支付失败!", + icon: "error" + }) // console.log('fail:', err); } }); } } if (_this.appltType == "ALIPAY") { - if(!res.data.reservedTransactionId){ + if (!res.data.reservedTransactionId) { uni.showToast({ - title:'支付失败,请联系商家', - icon:"none" + title: '支付失败,请联系商家', + icon: "none" }) return; } @@ -605,8 +623,10 @@ this.types = index if (index == 0) { // this.getValueCars(); - if (this.cardValueList.length>0) - this.xzindex(0,this.cardValueList[0].rechargeBalance,this.cardValueList[0].fringeBenefit,this.cardValueList[0].giftBalance,this.cardValueList[0].points,this.cardValueList[0].growthValue,this.cardValueList[0].count,this.cardValueList[0].id) + if (this.cardValueList.length > 0) + this.xzindex(0, this.cardValueList[0].rechargeBalance, this.cardValueList[0].fringeBenefit, this + .cardValueList[0].giftBalance, this.cardValueList[0].points, this.cardValueList[0].growthValue, + this.cardValueList[0].count, this.cardValueList[0].id) } if (index == 1) { // this.getFuelCars(); @@ -637,7 +657,7 @@ // .growthValue, res.data.records[0] // .count, res.data.records[0].id) this.cardValueList = res.data - console.log(res.data,22); + console.log(res.data, 22); this.xzindex(0, res.data[0].rechargeBalance, res.data[0].fringeBenefit, res.data[0].giftBalance, res.data[0].points, res.data[0] .growthValue, res.data[0] @@ -666,11 +686,12 @@ //囤油卡 getFuelCarList() { request({ - url: 'business/marketingActivity/cardFuelDiesel/appletList?storeId='+uni.getStorageSync("storeId"), + url: 'business/marketingActivity/cardFuelDiesel/appletList?storeId=' + uni.getStorageSync( + "storeId"), method: 'get', }).then(res => { if (res.code == 200) { - console.log(res,111); + console.log(res, 111); this.cardList = res.data } }) @@ -678,7 +699,7 @@ //礼品卡兑换 exchangeGift() { request({ - url: '/business/marketingActivity/cardGift/exchange?number=' + this.number + "&cardPassword=" + + url: '/business/marketingActivity/cardGift/exchange?number=' + this.number + "&cardPassword=" + this.cardPassword + "&storeId=" + uni.getStorageSync("storeId"), method: 'get', }).then(res => { @@ -689,7 +710,7 @@ } else { this.shows = true this.message = '兑换成功!', - this.money = res.data.cardAmount + '元' + this.money = res.data.cardAmount + '元' this.number = "" this.cardPassword = "" } @@ -706,7 +727,7 @@ }, goRechargeRecords(val) { uni.navigateTo({ - url: '/pagesMy/Recharge/Recharge?index='+val + url: '/pagesMy/Recharge/Recharge?index=' + val }) }, //获取本店员工列表 @@ -872,6 +893,7 @@ //color: #e2e2e2; text-align: center; } + .min-size1 { font-size: 12px; //color: #e2e2e2; @@ -937,4 +959,4 @@ border-radius: 6px; background: #f4f5f6; } - \ No newline at end of file + diff --git a/out/production/oilSystem/pom.xml b/out/production/oilSystem/pom.xml deleted file mode 100644 index 364791d65..000000000 --- a/out/production/oilSystem/pom.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - 4.0.0 - - com.fuint - fuint - pom - 1.0.0 - fuint project root - - fuint-utils - fuint-repository - fuint-application - fuint-framework - fuint-quartz - fuint-payment - - - - org.springframework.boot - spring-boot-dependencies - 2.5.12 - - - - - UTF-8 - 1.8 - 2.9.0 - 4.0.2 - 8.0.25 - 3.1.0 - - - - - - - - - - - - - - net.java.dev.jna - jna - 5.10.0 - - - - - cn.hutool - hutool-all - 5.8.16 - - - org.springframework.boot - spring-boot-starter - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.boot - spring-boot-starter-tomcat - - - - - org.springframework.boot - spring-boot-starter-jetty - - - org.springframework.boot - spring-boot-actuator - - - com.zaxxer - HikariCP - - - - com.baomidou - mybatis-plus-boot-starter - ${mybatis-plus.version} - - - - com.baomidou - mybatis-plus - ${mybatis-plus.version} - - - - com.baomidou - mybatis-plus-generator - 3.1.0 - - - - - io.swagger - swagger-annotations - 1.5.21 - - - - - org.redisson - redisson-spring-boot-starter - 3.16.2 - - - - io.swagger - swagger-models - 1.5.21 - - - - com.github.pagehelper - pagehelper-spring-boot-starter - 1.2.5 - - - org.mybatis - mybatis - - - - - - org.springframework - spring-context-support - - - - net.sf.ehcache - ehcache - 2.10.2 - - - - com.esotericsoftware - kryo - ${kryo.version} - - - - org.springframework - spring-aop - - - org.aspectj - aspectjweaver - - - - mysql - mysql-connector-java - ${mysql.version} - - - org.springframework.boot - spring-boot-starter-data-redis - - - org.springframework.session - spring-session-data-redis - - - - com.github.liyiorg - weixin-popular - 2.8.0 - - - org.tuckey - urlrewritefilter - 4.0.3 - - - - org.projectlombok - lombok - provided - - - - com.squareup.okhttp3 - okhttp - 3.8.1 - - - - com.aliyun - aliyun-java-sdk-core - 4.4.6 - - - - org.apache.rocketmq - rocketmq-spring-boot-starter - 2.2.1 - - - - - - - - - - - com.github.wxpay - wxpay-sdk - 0.0.3 - - - - com.thoughtworks.xstream - xstream - 1.4.19 - - - diff --git a/pos-uni/api/login.js b/pos-uni/api/login.js new file mode 100644 index 000000000..ef9d46b0c --- /dev/null +++ b/pos-uni/api/login.js @@ -0,0 +1,47 @@ +import request from '@/utils/request' + +// 登录方法 +export function login(username, password, code, uuid) { + const data = { + username, + password, + code, + uuid + } + return request({ + 'url': '/login', + headers: { + isToken: false + }, + 'method': 'post', + 'data': data + }) +} + +// 获取用户详细信息 +export function getInfo() { + return request({ + 'url': '/getInfo', + 'method': 'get' + }) +} + +// 退出方法 +export function logout() { + return request({ + 'url': '/logout', + 'method': 'post' + }) +} + +// 获取验证码 +export function getCodeImg() { + return request({ + 'url': '/captchaImage', + headers: { + isToken: false + }, + method: 'get', + timeout: 20000 + }) +} diff --git a/pos-uni/api/system/user.js b/pos-uni/api/system/user.js new file mode 100644 index 000000000..d9614079b --- /dev/null +++ b/pos-uni/api/system/user.js @@ -0,0 +1,41 @@ +import upload from '@/utils/upload' +import request from '@/utils/request' + +// 用户密码重置 +export function updateUserPwd(oldPassword, newPassword) { + const data = { + oldPassword, + newPassword + } + return request({ + url: '/system/user/profile/updatePwd', + method: 'put', + params: data + }) +} + +// 查询用户个人信息 +export function getUserProfile() { + return request({ + url: '/system/user/profile', + method: 'get' + }) +} + +// 修改用户个人信息 +export function updateUserProfile(data) { + return request({ + url: '/system/user/profile', + method: 'put', + data: data + }) +} + +// 用户头像上传 +export function uploadAvatar(data) { + return upload({ + url: '/system/user/profile/avatar', + name: data.name, + filePath: data.filePath + }) +} diff --git a/pos-uni/components/header/headers.vue b/pos-uni/components/header/headers.vue index 134f75eb0..929dbfcea 100644 --- a/pos-uni/components/header/headers.vue +++ b/pos-uni/components/header/headers.vue @@ -1,7 +1,7 @@