no message

This commit is contained in:
DESKTOP-369JRHT\12997 2024-05-31 18:15:41 +08:00
parent e622f88454
commit b0d060edf0
9 changed files with 57 additions and 35 deletions

View File

@ -114,7 +114,7 @@
<!-- </el-form-item>--> <!-- </el-form-item>-->
<el-form-item label="isAcquiesce" prop="isAcquiesce"> <el-form-item label="isAcquiesce" prop="isAcquiesce">
<el-switch <el-switch
v-model="deviceInfo.isAcquiesce" v-model="deviceInfo.acquiesce"
active-color="#13ce66" active-color="#13ce66"
inactive-color="#ff4949"> inactive-color="#ff4949">
</el-switch> </el-switch>
@ -150,7 +150,7 @@ export default {
appPublicKey: '', // (key) appPublicKey: '', // (key)
platformPublicKey: '', // (publicKey) platformPublicKey: '', // (publicKey)
accessToken: '', // token accessToken: '', // token
isAcquiesce: false // token acquiesce: false // token
}, },
// //
open: false, open: false,
@ -271,7 +271,7 @@ export default {
appPublicKey: '', // (key) appPublicKey: '', // (key)
platformPublicKey: '', // (publicKey) platformPublicKey: '', // (publicKey)
accessToken: '' , // token accessToken: '' , // token
isAcquiesce: false // token acquiesce: false // token
} }
}, },
} }

View File

@ -227,14 +227,17 @@ public class IntegralGiftServiceImpl implements IntegralGiftService {
String lockKey = "integralGift-"+id; String lockKey = "integralGift-"+id;
Boolean isLock = redisLock.tryLock(lockKey,500,5000, TimeUnit.MILLISECONDS); Boolean isLock = redisLock.tryLock(lockKey,500,5000, TimeUnit.MILLISECONDS);
if (isLock) { if (isLock) {
redisLock.unlock(lockKey); try {
IntegralGift integralGift = integralGiftDao.queryById(id);
IntegralGift integralGift = integralGiftDao.queryById(id); if (editInventory.compareTo(integralGift.getRemainingInventory())>0) {
if (editInventory.compareTo(integralGift.getRemainingInventory())>0) { throw new RuntimeException("该积分商品库存不足!");
throw new RuntimeException("该积分商品库存不足!"); }else {
}else { integralGiftDao.updateInventoryByLock(id, editInventory);
integralGiftDao.updateInventoryByLock(id, editInventory); }
}finally {
redisLock.unlock(lockKey);
} }
} }
return true; return true;
} }

View File

@ -223,7 +223,7 @@ public class AllOrderInfoController extends BaseController {
@GetMapping("getIndexData4Pos") @GetMapping("getIndexData4Pos")
public ResponseObject getIndexData4Pos(){ public ResponseObject getIndexData4Pos(){
AllOrderInfoVo indexData4Pos = allOrderInfoService.getIndexData4Pos(); // AllOrderInfoVo indexData4Pos = allOrderInfoService.getIndexData4Pos();
return getSuccessResult(allOrderInfoService.getIndexData4Pos()); return getSuccessResult(allOrderInfoService.getIndexData4Pos());
} }
@GetMapping("getOperatingDataPos") @GetMapping("getOperatingDataPos")

View File

@ -321,10 +321,10 @@
SUM(CASE WHEN aoi.content = '油品充值' THEN pay_money ELSE 0 END) AS oilBalance, SUM(CASE WHEN aoi.content = '油品充值' THEN pay_money ELSE 0 END) AS oilBalance,
COUNT(CASE WHEN aoi.content = '油品充值' THEN 0 END) AS oilBalanceCount, COUNT(CASE WHEN aoi.content = '油品充值' THEN 0 END) AS oilBalanceCount,
SUM(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'WECHAT' THEN pay_money ELSE 0 END) AS userBalanceByWechat, SUM(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'WECHAT' THEN pay_money ELSE 0 END) AS userBalanceByWechat,
COUNT(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'WECHAT' THEN 0 END) AS userBalanceCountByWechat, COUNT(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'WECHAT' and pay_type = 'WECHAT' THEN 0 END) AS userBalanceCountByWechat,
SUM(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'ALIPAY' THEN pay_money ELSE 0 END) AS userBalanceByAli, SUM(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'ALIPAY' THEN pay_money ELSE 0 END) AS userBalanceByAli,
COUNT(CASE WHEN aoi.content = '储值卡订单' and pay_type = 'ALIPAY' THEN 0 END) AS userBalanceCountByali COUNT(CASE WHEN (aoi.content = '储值卡订单' or aoi.content = '油品充值') and pay_type = 'ALIPAY' THEN 0 END) AS userBalanceCountByali
@ -373,7 +373,7 @@
FROM FROM
all_order_info all_order_info
where store_id = #{allOrderInfo.storeId} where store_id = #{allOrderInfo.storeId}
AND pay_time = CURDATE() AND DATE(pay_time) = CURDATE()
</select> </select>
<select id="getHandOverList" resultType="com.fuint.business.order.vo.AllOrderInfoVo"> <select id="getHandOverList" resultType="com.fuint.business.order.vo.AllOrderInfoVo">
SELECT SELECT

View File

@ -55,7 +55,7 @@ public class PrintDeviceInfo extends BaseEntity {
* 付款二维码域名+storeId * 付款二维码域名+storeId
*/ */
private String payment; private String payment;
private Boolean isAcquiesce; private Boolean acquiesce;
/** /**
* 店铺id * 店铺id

View File

@ -18,21 +18,21 @@
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="createBy" column="create_by" jdbcType="VARCHAR"/> <result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/> <result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="isAcquiesce" column="is_acquiesce" jdbcType="VARCHAR"/> <result property="acquiesce" column="acquiesce" jdbcType="VARCHAR"/>
<result property="storeId" column="store_id" jdbcType="INTEGER"/> <result property="storeId" column="store_id" jdbcType="INTEGER"/>
</resultMap> </resultMap>
<!--查询单个--> <!--查询单个-->
<select id="queryById" resultMap="PrintDeviceInfoMap"> <select id="queryById" resultMap="PrintDeviceInfoMap">
select select
id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ,is_acquiesce from print_device_info id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ,acquiesce from print_device_info
where id = #{id} where id = #{id}
</select> </select>
<!--查询指定行数据--> <!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="PrintDeviceInfoMap"> <select id="queryAllByLimit" resultMap="PrintDeviceInfoMap">
select select
id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id,is_acquiesce from print_device_info id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id,acquiesce from print_device_info
<where> <where>
<if test="printDeviceInfo.id != null"> <if test="printDeviceInfo.id != null">
and id = #{printDeviceInfo.id} and id = #{printDeviceInfo.id}
@ -113,14 +113,14 @@
</select> </select>
<select id="getInfoByStoreId" resultType="com.fuint.business.printer.entity.PrintDeviceInfo"> <select id="getInfoByStoreId" resultType="com.fuint.business.printer.entity.PrintDeviceInfo">
select select
id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ,is_acquiesce from print_device_info id,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ,acquiesce from print_device_info
where store_id = #{storeId} and is_acquiesce = true limit 1 where store_id = #{storeId} and acquiesce = true limit 1
</select> </select>
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true"> <insert id="insert" keyProperty="id" useGeneratedKeys="true">
insert into print_device_info(is_acquiesce,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id ) insert into print_device_info(acquiesce,machine_code,msign,device_name,user_id,app_key,app_secret,app_public_key,platform_public_key,access_token,payment,create_time,update_time,create_by,update_by,store_id )
values (#{is_acquiesce},#{machineCode},#{msign},#{deviceName},#{userId}, values (#{acquiesce},#{machineCode},#{msign},#{deviceName},#{userId},
#{appKey},#{appSecret},#{appPublicKey},#{platformPublicKey},#{accessToken},#{payment}, #{appKey},#{appSecret},#{appPublicKey},#{platformPublicKey},#{accessToken},#{payment},
#{createTime},#{updateTime},#{createBy},#{updateBy},#{storeId}) #{createTime},#{updateTime},#{createBy},#{updateBy},#{storeId})
</insert> </insert>
@ -194,8 +194,8 @@ machine_code = values(machine_code)msign = values(msign)device_name = values(dev
<if test="storeId != null"> <if test="storeId != null">
store_id = #{storeId}, store_id = #{storeId},
</if> </if>
<if test="isAcquiesce != null"> <if test="acquiesce != null">
is_acquiesce = #{isAcquiesce}, acquiesce = #{acquiesce},
</if> </if>
</set> </set>
where id = #{id} where id = #{id}
@ -205,11 +205,11 @@ machine_code = values(machine_code)msign = values(msign)device_name = values(dev
<delete id="deleteById"> <delete id="deleteById">
delete from print_device_info where id = #{id} delete from print_device_info where id = #{id}
</delete> </delete>
<update id="updateIsAcquiesce"> <update id="updateacquiesce">
update print_device_info set is_acquiesce = false where store_id = #{storeId} update print_device_info set acquiesce = false where store_id = #{storeId}
</update> </update>
<select id="getIsAcquiesceByStoreId" resultType="java.lang.Integer"> <select id="getacquiesceByStoreId" resultType="java.lang.Integer">
</select> </select>

View File

@ -60,7 +60,7 @@ public class PrintDeviceInfoServiceImpl implements PrintDeviceInfoService {
public PrintDeviceInfo insert(PrintDeviceInfo printDeviceInfo) { public PrintDeviceInfo insert(PrintDeviceInfo printDeviceInfo) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
printDeviceInfo.setStoreId(nowAccountInfo.getStoreId()); printDeviceInfo.setStoreId(nowAccountInfo.getStoreId());
if (printDeviceInfo.getIsAcquiesce()) { if (printDeviceInfo.getAcquiesce()) {
printDeviceInfoMapper.updateIsAcquiesce(nowAccountInfo.getStoreId()); printDeviceInfoMapper.updateIsAcquiesce(nowAccountInfo.getStoreId());
} }
this.printDeviceInfoMapper.insert(printDeviceInfo); this.printDeviceInfoMapper.insert(printDeviceInfo);
@ -75,7 +75,7 @@ public class PrintDeviceInfoServiceImpl implements PrintDeviceInfoService {
*/ */
@Override @Override
public PrintDeviceInfo update(PrintDeviceInfo printDeviceInfo) { public PrintDeviceInfo update(PrintDeviceInfo printDeviceInfo) {
if (printDeviceInfo.getIsAcquiesce()) { if (printDeviceInfo.getAcquiesce()) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
printDeviceInfoMapper.updateIsAcquiesce(nowAccountInfo.getStoreId()); printDeviceInfoMapper.updateIsAcquiesce(nowAccountInfo.getStoreId());
} }

View File

@ -28,7 +28,9 @@
</view> </view>
<view class=""> <view class="">
<view class="hui-">会员充值/笔数</view> <view class="hui-">会员充值/笔数</view>
<view class="lan-">{{dataForm.userBalance}}/{{dataForm.userBalanceCount}}</view> <view class="lan-">
{{ (Number) (dataForm.userBalance)+(Number)(dataForm.oilBalance) }}/{{(Number)(dataForm.userBalanceCount)+(Number)(dataForm.oilBalanceCount)}}
</view>
</view> </view>
</view> </view>
<view class="b-bs"> <view class="b-bs">
@ -36,7 +38,6 @@
<view class="hui-">退款金额/笔数</view> <view class="hui-">退款金额/笔数</view>
<view class="lan-">{{dataForm.refBalance}}/{{dataForm.refBalanceCount}}</view> <view class="lan-">{{dataForm.refBalance}}/{{dataForm.refBalanceCount}}</view>
</view> </view>
</view> </view>
</view> </view>
<view class="hm-box"> <view class="hm-box">
@ -128,6 +129,8 @@
alipaycount: '0', alipaycount: '0',
userBalanceByAli: '0', userBalanceByAli: '0',
userBalanceCountByali: '0', userBalanceCountByali: '0',
oilBalance: '0',
oilBalanceCount: '0',
}, },
form: { form: {

View File

@ -43,11 +43,14 @@
</view> </view>
</view> </view>
<view style="width: 100%; height: 78px; "></view> <view style="width: 100%; height: 78px; "></view>
<view class="bottom-d" @click="shift"> <view class="bottom-d" @click="showModal = true">
<view class="anniu"> <view class="anniu">
交班 交班
</view> </view>
</view> </view>
<u-modal :show="showModal" showCancelButton content='是否确定交班' @confirm="shift()"
@cancel="showModal = false"></u-modal>
<u-loading-page :loading="showLoading"></u-loading-page>
</view> </view>
</view> </view>
@ -62,6 +65,8 @@
data() { data() {
return { return {
titles: "交接班", titles: "交接班",
showModal: false,
showLoading: false,
handoverList: "", handoverList: "",
indexData: { indexData: {
totalPayMoney: '0', totalPayMoney: '0',
@ -134,6 +139,8 @@
}, },
// //
shift() { shift() {
this.showModal = false
this.showLoading = true
let recordData = this.handoverList let recordData = this.handoverList
let handoverRecord = { let handoverRecord = {
@ -141,7 +148,6 @@
recordData: JSON.stringify(recordData), recordData: JSON.stringify(recordData),
type: 0, type: 0,
status: this.handoverList.baseInfo.handoverType, status: this.handoverList.baseInfo.handoverType,
staffId: this.staff.staffId
} }
request({ request({
url: 'business/handoverRecord/addByPos', url: 'business/handoverRecord/addByPos',
@ -150,12 +156,22 @@
}).then((res) => { }).then((res) => {
if (res.code == 200) { if (res.code == 200) {
this.indexData = res.data this.indexData = res.data
this.handoverByPos()
this.showLoading = false
//
uni.showToast({
title: "交班成功!",
icon: "none"
})
} else { } else {
uni.showToast({ uni.showToast({
title: res.data, title: res.data,
icon: "none" icon: "none"
}) })
} }
this.showLoading = false
}) })
} }
} }