10.22
This commit is contained in:
parent
ae9ee648c6
commit
219dfa5cb4
@ -213,7 +213,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import echarts from "echarts";
|
||||
import * as echarts from 'echarts';
|
||||
import {
|
||||
getAmount, getByMonth, getByYear,
|
||||
getConsumePoints,
|
||||
|
@ -75,8 +75,8 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" prop="machineCode" label="备注"></el-table-column>
|
||||
<el-table-column align="center" prop="machineCode" label="创建时间"></el-table-column>
|
||||
<el-table-column align="center" prop="remark" label="备注"></el-table-column>
|
||||
<el-table-column align="center" prop="createTime" label="创建时间"></el-table-column>
|
||||
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -145,19 +145,20 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属机构" prop="deptName">
|
||||
<el-form-item label="所属机构" prop="deptId">
|
||||
<el-select
|
||||
v-model="deptName"
|
||||
v-model="deviceInfo.deptId"
|
||||
clearable
|
||||
placeholder=""
|
||||
style="width: 300px"
|
||||
multiple
|
||||
collapse-tags
|
||||
>
|
||||
<el-option v-for="item in staffList" :key="item.id" :label="item.realName" :value="item.id+''">
|
||||
<span style="float: left">{{ item.realName }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.mobile }}</span>
|
||||
</el-option>
|
||||
<el-option
|
||||
v-for="item in deptListSelect"
|
||||
:key="item.deptId"
|
||||
:label="item.deptName"
|
||||
:value="item.deptId"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态" prop="isAcquiesce">
|
||||
@ -168,8 +169,8 @@
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" prop="appPublicKey">
|
||||
<el-input type="textarea" v-model="deviceInfo.appPublicKey" style="width: 300px"></el-input>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input type="textarea" v-model="deviceInfo.remark" style="width: 300px"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="" @click="handleCancel">取消</el-button>
|
||||
@ -186,6 +187,7 @@
|
||||
|
||||
import {addPrintDeviceApi, delPrintDeviceApi, editPrintDeviceApi, getListByPageApi} from "@/api/print";
|
||||
import {queryStaffs} from "@/api/order/staff";
|
||||
import {selectChildByDeptId} from "@/api/system/role";
|
||||
|
||||
export default {
|
||||
name: "printIndex",
|
||||
@ -195,7 +197,7 @@ export default {
|
||||
tableData: [],
|
||||
staffIds: '',
|
||||
staffList: [],
|
||||
|
||||
deptListSelect:[],
|
||||
deviceInfo: {
|
||||
id: null, // 自增id
|
||||
machineCode: '', // 设备终端号
|
||||
@ -217,7 +219,7 @@ export default {
|
||||
deviceName: [
|
||||
{required: true, message: '设备名称不能为空', trigger: 'blur'}
|
||||
],
|
||||
deptName: [
|
||||
deptId: [
|
||||
{required: true, message: '机构不能为空', trigger: 'blur'}
|
||||
],
|
||||
deviceSi: [
|
||||
@ -249,8 +251,15 @@ export default {
|
||||
created() {
|
||||
this.getList()
|
||||
this.getStaffList()
|
||||
this.selectChildByDeptIdApi()
|
||||
},
|
||||
methods: {
|
||||
// 查询
|
||||
selectChildByDeptIdApi() {
|
||||
selectChildByDeptId().then(res => {
|
||||
this.deptListSelect = res.data
|
||||
})
|
||||
},
|
||||
getList() {
|
||||
getListByPageApi(this.queryParams).then(res => {
|
||||
this.tableData = res.data.records;
|
||||
|
@ -56,7 +56,7 @@ public class CommissionRecordController extends BaseController {
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryList")
|
||||
public ResponseObject queryStaffCommission(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
public ResponseObject queryStaffCommission(@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
CommissionRecord commissionRecord) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
|
@ -39,6 +39,7 @@ import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Objects;
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
@ -143,6 +144,9 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper, Fleet
|
||||
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
|
||||
.eq(MtUser::getMobile, fleetMember.getMobile())
|
||||
.last("limit 1"));
|
||||
if (ObjectUtil.isEmpty(mtUser)){
|
||||
throw new RuntimeException("该手机号在会员列表中不存在");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(mtUser)) {
|
||||
//注册用户
|
||||
mtUser = new MtUser();
|
||||
@ -242,9 +246,16 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper, Fleet
|
||||
public int update(FleetMember fleetMember) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
FleetMember fleetMember1 = queryByMobile(fleetMember);
|
||||
if (ObjectUtil.isNotEmpty(fleetMember1) && fleetMember1.getId() != fleetMember.getId()) {
|
||||
if (ObjectUtil.isNotEmpty(fleetMember1) && !Objects.equals(fleetMember1.getId(), fleetMember.getId())) {
|
||||
return 0;
|
||||
}
|
||||
//判断当前车队成员否存在账号
|
||||
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
|
||||
.eq(MtUser::getMobile, fleetMember.getMobile())
|
||||
.last("limit 1"));
|
||||
if (ObjectUtil.isEmpty(mtUser)){
|
||||
throw new RuntimeException("该手机号在会员列表中不存在");
|
||||
}
|
||||
// 如果不限额的话将成员的余额信息改为车队的余额信息
|
||||
FleetInfo fleetInfo = fleetInfoService.queryById(fleetMember.getFleetId());
|
||||
if (fleetMember.getSecondaryCardType()==1){
|
||||
|
@ -40,7 +40,7 @@ public class PrintDeviceInfoController extends BaseController {
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("queryByPage")
|
||||
public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
public ResponseObject queryByPage(@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||
@Param("printDeviceInfo") PrintDeviceInfo printDeviceInfo) {
|
||||
Page page = new Page(pageNo, pageSize);
|
||||
|
@ -68,8 +68,13 @@ public class PrintDeviceInfo extends BaseEntity {
|
||||
* 店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
@TableField(exist = false)
|
||||
/**
|
||||
* 机构id
|
||||
*/
|
||||
private Integer deptId;
|
||||
/**
|
||||
* 机构名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String deptName;
|
||||
|
||||
@ -77,24 +82,14 @@ public class PrintDeviceInfo extends BaseEntity {
|
||||
private String staffIds; // 员工
|
||||
private String deviceAb; // 设备功能
|
||||
private String staffName; // 设备员工名字
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 设备状态 0启用 1 禁用
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
||||
|
@ -39,11 +39,14 @@
|
||||
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,
|
||||
update_by,store_id,dept_id,acquiesce,
|
||||
device_si,
|
||||
staff_ids,
|
||||
device_ab,
|
||||
staff_name
|
||||
staff_name,
|
||||
create_time,
|
||||
status,
|
||||
remark
|
||||
from print_device_info
|
||||
<where>
|
||||
<if test="printDeviceInfo.id != null">
|
||||
@ -136,16 +139,17 @@
|
||||
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,
|
||||
device_si,staff_ids,device_ab,staff_name
|
||||
create_by,update_by,store_id,dept_id,
|
||||
device_si,staff_ids,device_ab,staff_name,remark
|
||||
)
|
||||
values (#{acquiesce},#{machineCode},#{msign},#{deviceName},#{userId},
|
||||
#{appKey},#{appSecret},#{appPublicKey},#{platformPublicKey},#{accessToken},#{payment},
|
||||
#{createTime},#{updateTime},#{createBy},#{updateBy},#{storeId},
|
||||
#{createTime},#{updateTime},#{createBy},#{updateBy},#{storeId},#{deptId},
|
||||
#{deviceSi},
|
||||
#{staffIds},
|
||||
#{deviceAb},
|
||||
#{staffName}
|
||||
#{staffName},
|
||||
#{remark}
|
||||
)
|
||||
</insert>
|
||||
|
||||
@ -218,6 +222,9 @@ machine_code = values(machine_code)msign = values(msign)device_name = values(dev
|
||||
<if test="storeId != null">
|
||||
store_id = #{storeId},
|
||||
</if>
|
||||
<if test="deptId != null">
|
||||
dept_id = #{deptId},
|
||||
</if>
|
||||
<if test="acquiesce != null">
|
||||
acquiesce = #{acquiesce},
|
||||
</if>
|
||||
@ -233,6 +240,9 @@ machine_code = values(machine_code)msign = values(msign)device_name = values(dev
|
||||
<if test="staffName != null">
|
||||
staff_name = #{staffName},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.printer.service.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
@ -7,6 +8,9 @@ import com.fuint.business.printer.entity.PrintDeviceInfo;
|
||||
import com.fuint.business.printer.mapper.PrintDeviceInfoMapper;
|
||||
import com.fuint.business.printer.service.PrintDeviceInfoService;
|
||||
import com.fuint.framework.exception.BusinessCheckException;
|
||||
import com.fuint.system.dept.entity.SysDept;
|
||||
import com.fuint.system.dept.service.ISysDeptService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import io.lettuce.core.dynamic.annotation.Param;
|
||||
@ -25,6 +29,8 @@ import javax.annotation.Resource;
|
||||
public class PrintDeviceInfoServiceImpl implements PrintDeviceInfoService {
|
||||
@Resource
|
||||
private PrintDeviceInfoMapper printDeviceInfoMapper;
|
||||
@Autowired
|
||||
private ISysDeptService deptService;
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
@ -48,7 +54,14 @@ public class PrintDeviceInfoServiceImpl implements PrintDeviceInfoService {
|
||||
public IPage<PrintDeviceInfo> queryByPage(@Param("page") Page page, PrintDeviceInfo printDeviceInfo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
printDeviceInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||
return this.printDeviceInfoMapper.queryAllByLimit(page, printDeviceInfo);
|
||||
IPage<PrintDeviceInfo> printDeviceInfoIPage = this.printDeviceInfoMapper.queryAllByLimit(page, printDeviceInfo);
|
||||
for (PrintDeviceInfo record : printDeviceInfoIPage.getRecords()) {
|
||||
if (ObjectUtil.isNotEmpty(record.getDeptId())){
|
||||
SysDept sysDept = deptService.selectDeptById(Long.valueOf(record.getDeptId()));
|
||||
record.setDeptName(sysDept.getDeptName());
|
||||
}
|
||||
}
|
||||
return printDeviceInfoIPage;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.fleet.entity.FleetMember;
|
||||
import com.fuint.business.fleet.mapper.FleetMemberMapper;
|
||||
import com.fuint.business.fleet.service.FleetInfoService;
|
||||
import com.fuint.business.fleet.service.FleetMemberService;
|
||||
import com.fuint.business.fleet.vo.FleetInfoUniVo;
|
||||
import com.fuint.business.marketingActivity.cardValue.entity.CardValueRecord;
|
||||
import com.fuint.business.marketingActivity.cardValue.service.CardValueRecordService;
|
||||
@ -73,7 +74,8 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
@Autowired
|
||||
private FleetInfoService fleetInfoService;
|
||||
@Autowired
|
||||
private FleetMemberMapper fleetMemberMapper;
|
||||
@Lazy
|
||||
private FleetMemberService fleetMemberService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询会员信息
|
||||
@ -386,6 +388,8 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
||||
if (CollUtil.isNotEmpty(fleetInfoUniVos)) {
|
||||
it.setFleetInfoUniVos(fleetInfoUniVos);
|
||||
}
|
||||
FleetMember fleetMember = fleetMemberService.selectByUserId(it.getId());
|
||||
it.setFleetMember(fleetMember);
|
||||
});
|
||||
return ljUserVos;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.alibaba.excel.annotation.write.style.ColumnWidth;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fuint.business.fleet.entity.FleetMember;
|
||||
import com.fuint.business.fleet.vo.FleetInfoUniVo;
|
||||
import com.fuint.business.userManager.entity.MtUserFuel;
|
||||
import com.fuint.business.userManager.util.GenderConverter;
|
||||
@ -171,4 +172,8 @@ public class LJUserVo extends BaseEntity {
|
||||
* 车队信息
|
||||
*/
|
||||
List<FleetInfoUniVo> fleetInfoUniVos;
|
||||
/**
|
||||
* 车队成员信息
|
||||
*/
|
||||
FleetMember fleetMember;
|
||||
}
|
||||
|
@ -20,9 +20,9 @@
|
||||
囤油卡:¥{{item.fuelAmount}}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="chooseVipUser.fleetInfoUniVos">
|
||||
<div v-for="(item,index) in chooseVipUser.fleetInfoUniVos" :key="index">
|
||||
车队卡:¥{{ item.totalBalance }}
|
||||
<div v-if="chooseVipUser.fleetMember">
|
||||
<div>
|
||||
车队卡:¥{{ chooseVipUser.fleetMember.secondaryCardLimit }}
|
||||
</div>
|
||||
</div>
|
||||
<img slot="reference" src="./imgs/kbao.png" style="width: 24px;height: 24px;margin-right: 10px">
|
||||
@ -419,7 +419,7 @@
|
||||
width="542px"
|
||||
center
|
||||
>
|
||||
<accountPending :amount="oilGunClearing.amount" @changeAmount="changeAmount"></accountPending>
|
||||
<accountPending v-if="oilGunClearing.amount>0" :amount="oilGunClearing.amount" @changeAmount="changeAmount"></accountPending>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="accountPending = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addHangbill">确 定</el-button>
|
||||
|
Loading…
Reference in New Issue
Block a user