设备管理

This commit is contained in:
DESKTOP-369JRHT\12997 2024-08-06 11:28:10 +08:00
parent b85f8766a5
commit 9c09b83fc0
12 changed files with 311 additions and 119 deletions

View File

@ -69,7 +69,7 @@ const user = {
if (res.data.ownerId == "3") {
setToken(res.data.token)
commit('SET_TOKEN', res.data.token)
}if (res.data.dutyRoleCode == "2"){
}else if (res.data.dutyRoleCode == "2"){
// 收银台跳转
Cookies.set("IS_CA_LOGIN", JSON.stringify(res.data));
}else {

View File

@ -1,6 +1,5 @@
<template>
<div class="app-container">
<div class="bor-bai" v-for="(item,index) in gunList" :key="index">
<div class="box-top">
<div class="title_">{{item.oilType}} {{item.oilName}}</div>
@ -40,57 +39,9 @@
<div >{{item.oilMachineGunNumber}}</div>
</div>
</template>
</div>
</div>
</div>
<!-- <el-card class="box-card">-->
<!-- <div slot="header" class="clearfix">-->
<!-- <span>油枪管理</span>-->
<!-- </div>-->
<!-- <div class="conten-box" v-for="(item,index) in gunList" :key="index">-->
<!-- <div class="conten-top" style="display: flex; justify-content: space-between;">-->
<!-- <div>{{item.oilType}} {{item.oilName}}</div>-->
<!-- <div>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- @click="gunAdd(item.numberId)"-->
<!-- >新增油枪</el-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="conten-bottom">-->
<!-- <div class="cardbox" :class="{ 'act-cardbox': item.status == '启用' }" v-for="(item,index) in item.oilGunList" :key="index">-->
<!-- <div class="cardbox-top" :class="{ 'actcolor':item.status == '启用' }">-->
<!-- <div>{{item.tankName}}</div>-->
<!-- <div style="cursor: pointer" ><i class="el-icon-edit" @click="gunEdit(item)"></i> <i class="el-icon-delete" @click="delGun(item.id)"></i></div>-->
<!-- </div>-->
<!-- <img class="cardbox-rd" src="./imgs/r-img.png" alt="">-->
<!-- <div class="cardbox-title">-->
<!-- <div>{{item.gunName}}</div>-->
<!-- </div>-->
<!-- <div class="cardbox-bottom" :class="{ 'actcolor':item.status == '启用' }">-->
<!--&lt;!&ndash; <div>ID:{{ item.id }}</div>&ndash;&gt;-->
<!-- </div>-->
<!-- <div class="cardboxb" v-if="item.oilMachineGunNumber != null ">-->
<!-- <div>{{item.oilMachineGunNumber}}</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- </el-card>-->
<el-dialog
:title="title"
:visible.sync="dialogVisible"

View File

@ -390,7 +390,7 @@ import {
} from "@/api/oilPrice";
export default {
name: 'index',
name: 'oilPrice',
dicts: ['jobState','oil_type','zhzt'],
data() {
var valiNumberPass = (rule, value, callback) => {//

View File

@ -0,0 +1,70 @@
<script >
import OilPrice from "@/views/oilConfig/oilPrice/index.vue";
import Oilqiang from "@/views/oilConfig/oilGun/list.vue";
import OilTank from "@/views/oilConfig/oilTank/list.vue";
export default {
components: {OilTank, Oilqiang, OilPrice},
data(){
return{
activeindex:0,
tablist:[
{
name:'油价配置',
},
{
name:'油罐参数',
},
{
name:'油枪管理',
},
]
}
}
}
</script>
<template>
<div class="container">
<div class="tab-box">
<div class="f-box" v-for="(item,index) in tablist" :key="index" @click="activeindex=index" :class="{ 'active' :activeindex==index}">{{item.name}}</div>
</div>
<oil-price v-if="activeindex == 0"></oil-price>
<oilqiang v-if="activeindex == 2"></oilqiang>
<oil-tank v-if="activeindex == 1"></oil-tank>
</div>
</template>
<style scoped lang="scss">
.tab-box{
width: 100%;
background: #fff;
display: flex;
box-sizing: border-box;
padding: 0px 50px;
}
.f-box{
height: 40px;
color: #999999;
margin-right: 50px;
display: flex;
align-items: center;
}
.active{
color: #FF9655 !important;
border-bottom: 2px solid #FF9655 !important;
}
.container{
background: #F4F5F9;
box-sizing: border-box;
//padding: 20px;
}
.tabder-box{
width: 85%;
}
</style>

View File

@ -1,7 +1,7 @@
<template>
<div class="app-container">
<!-- 搜索框-->
<el-card >
<div class="card-change" >
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="" prop="tankName">
<el-input
@ -13,23 +13,24 @@
/>
</el-form-item>
<el-form-item style="float: right">
<el-form-item style="float: right;margin-right: 0px ">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<!-- 列表-->
<el-card style="margin-top: 20px" >
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
icon="el-icon-plus"
@click="tankAdd"
v-hasPermi="['oilConfig:oilTank:list:add']"
>新增油罐</el-button>
</el-form-item>
</el-form>
<!-- </div>-->
<!-- 列表-->
<!-- <el-card style="margin-top: 20px" >-->
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
</el-col>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row>
@ -38,18 +39,32 @@
v-loading="loading"
:data="tankList"
:default-sort="defaultSort">
<el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column label="油罐名称" align="center" prop="tankName"/>
<el-table-column label="油品名称" align="center" prop="oilNumber" />
<el-table-column label="当前数据" align="center">
<el-table-column label="油品-油号" align="center" prop="oilNumber" />
<!-- <el-table-column label="当前数据" align="center">-->
<el-table-column label="油罐容量" align="center" prop="tankVolume"/>
<el-table-column label="下限预警" align="center" prop="lowerWarning"/>
<el-table-column label="油品密度" align="center" prop="oilDensity"/>
</el-table-column>
<!-- </el-table-column>-->
<el-table-column label="存油数量" align="center" prop="storedQuantity"/>
<el-table-column label="存油总价(元)" align="center" prop="totalPrice"/>
<el-table-column label="折后单价(元/升)" align="center" prop="discountedPrice"/>
<el-table-column label="成本价(元/升)" align="center" prop="discountedPrice"/>
<el-table-column label="成本价(元/升)" align="center" prop="discountedPrice">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-value="qy"
inactive-value="jy"
active-color="#13ce66"
inactive-color="#ff4949">
</el-switch>
<el-table-column label="更新时间" align="center" prop="updateTime" width="200">
</template>
</el-table-column>
<el-table-column label="操作人" align="center" prop="totalPrice"/>
<el-table-column label="操作时间" align="center" prop="updateTime" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime) }}</span>
</template>
@ -83,7 +98,7 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-card>
</div>
<!-- 新增/修改-->
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body :close-on-click-modal="false">
@ -211,6 +226,7 @@ import { BigNumber } from 'bignumber.js';
export default {
name:'oilTank',
dicts: ['zhzt'],
data() {

View File

@ -23,6 +23,21 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="">
<el-date-picker
v-model="beginTime"
style="width: 140px"
type="date"
placeholder="交易开始日期">
</el-date-picker>
<el-date-picker
v-model="endTime"
style="width: 140px"
type="date"
placeholder="交易结束日期">
</el-date-picker>
</el-form-item>
<el-form-item style="float: right;margin-right: 0px">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
@ -40,7 +55,7 @@
<el-table-column align="center" prop="deviceType" label="设备类型"></el-table-column>
<el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
<el-table-column align="center" prop="deviceId" label="设备id"></el-table-column>
<el-table-column align="center" prop="createByName" label="创建人"></el-table-column>
<el-table-column align="center" prop="createName" 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">
@ -130,6 +145,11 @@ export default {
"DD",
],
//
dateRange: [],
beginTime:"",
endTime:"",
deviceInfo: {
id: null, // id
deviceType: 'BY',
@ -138,13 +158,9 @@ export default {
},
rule: {
orgId: [{required: true, message: '请选择机构名称', trigger: 'blur'},],
unifiedSocialCreditCode: [{required: true, message: '请填写统一社会信用代码', trigger: 'blur'},],
appId: [{required: true, message: '请填写小程序appID', trigger: 'blur'},],
appKey: [{required: true, message: '请填写密钥', trigger: 'blur'},],
legalRepresentativeName: [{required: true, message: '请填写法人姓名', trigger: 'blur'},],
legalRepresentativeWechat: [{required: true, message: '请填写法人微信号', trigger: 'blur'},],
legalRepresentativeContact: [{required: true, message: '请填写法人联系方式', trigger: 'blur'},],
deviceType: [{required: true, message: '请选择设备类型', trigger: 'blur'},],
deviceName: [{required: true, message: '请填写设备名称', trigger: 'blur'},],
deviceId: [{required: true, message: '请填写设备ID', trigger: 'blur'},],
},
//
open: false,
@ -168,7 +184,12 @@ export default {
methods: {
getList(){
getListByPageApi(this.queryParams).then(res=>{
let dateRange = []
if (this.beginTime && this.endTime) {
dateRange.push(this.beginTime.toLocaleDateString())
dateRange.push(this.endTime.toLocaleDateString())
}
getListByPageApi(this.addDateRange(this.queryParams, dateRange)).then(res=>{
this.tableData = res.data.records;
this.total = res.data.total
})

View File

@ -12,34 +12,29 @@
/>
</el-form-item>
<el-form-item style="float: right">
<el-form-item style="float: right; margin-right: 0px">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-search" @click="handleAdd">新增设备</el-button>
</el-form-item>
</el-form>
<!-- </el-card>-->
<!-- &lt;!&ndash; 列表信息&ndash;&gt;-->
<!-- <el-card style="margin-top: 20px" >-->
<el-row :gutter="10" class="mb8">
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- @click="handleAdd"-->
<!-- >新增设备</el-button>-->
<!-- </el-col>-->
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row>
<el-table :data="tableData" style="width: 100%" border>
<el-table-column align="center" type="index" label="序号"></el-table-column>
<el-table-column align="center" prop="machineCode" label="设备终端号"></el-table-column>
<el-table-column align="center" prop="msign" label="设备密钥"></el-table-column>
<el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
<el-table-column align="center" prop="userId" label="用户id"></el-table-column>
<el-table-column align="center" prop="deviceName" label="设备名称"></el-table-column>
<el-table-column align="center" prop="deviceSi" label="品牌"></el-table-column>
<el-table-column align="center" prop="deviceAb" label="设备功能"></el-table-column>
<el-table-column align="center" prop="deptName" label="所属机构"></el-table-column>
<el-table-column align="center" prop="staffIds" label="关联员工">
<template slot-scope="scope">
{{jsonChange(scope.row.staffIds)}}
</template>
</el-table-column>
<el-table-column align="center" prop="machineCode" label="设备终端号"></el-table-column>
<el-table-column align="center" prop="msign" label="设备密钥"></el-table-column>
<!-- <el-table-column align="center" prop="userId" label="用户id"></el-table-column>-->
<!-- <el-table-column prop="appKey" label="应用id(APP_KEY)"></el-table-column>-->
<!-- <el-table-column prop="appSecret" label="应用密钥(APP_SECRET)"></el-table-column>-->
<!-- <el-table-column prop="appPublicKey" label="应用公钥(key)"></el-table-column>-->
@ -54,7 +49,6 @@
<!-- inactive-color="#ff4949">-->
<!-- </el-switch>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -83,30 +77,54 @@
</el-card>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="50%" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="30%" append-to-body>
<el-form ref="form" :model="deviceInfo" label-width="80px">
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px">
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="deviceInfo.deviceName" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="设备品牌" prop="deviceSi">
<el-input v-model="deviceInfo.deviceSi" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="设备功能" prop="deviceAb">
<el-radio-group v-model="deviceInfo.deviceAb">
<el-radio label="打印小票"></el-radio>
<el-radio label="语音播报"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="设备终端号" prop="machineCode">
<el-input v-model="deviceInfo.machineCode" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="设备密钥" prop="msign">
<el-input v-model="deviceInfo.msign"></el-input>
<el-input v-model="deviceInfo.msign" style="width: 300px"></el-input>
</el-form-item>
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="deviceInfo.deviceName"></el-input>
</el-form-item>
<el-form-item label="用户id" prop="userId">
<el-input v-model="deviceInfo.userId"></el-input>
</el-form-item>
<el-form-item label="应用id" prop="appKey">
<el-input v-model="deviceInfo.appKey"></el-input>
</el-form-item>
<el-form-item label="应用密钥" prop="appSecret">
<el-input v-model="deviceInfo.appSecret"></el-input>
</el-form-item>
<el-form-item label="应用公钥" prop="appPublicKey">
<el-input v-model="deviceInfo.appPublicKey"></el-input>
<el-form-item label="选择员工" prop="staffId">
<el-select
v-model="staffIds"
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-select>
</el-form-item>
<!-- <el-form-item label="用户id" prop="userId">-->
<!-- <el-input v-model="deviceInfo.userId"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="应用id" prop="appKey">-->
<!-- <el-input v-model="deviceInfo.appKey"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="应用密钥" prop="appSecret">-->
<!-- <el-input v-model="deviceInfo.appSecret"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="应用公钥" prop="appPublicKey">-->
<!-- <el-input v-model="deviceInfo.appPublicKey"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="平台公钥" prop="platformPublicKey">-->
<!-- <el-input v-model="deviceInfo.platformPublicKey"></el-input>-->
<!-- </el-form-item>-->
@ -120,7 +138,12 @@
inactive-color="#ff4949">
</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>
<el-form-item>
<el-button type="" @click="open = false">取消</el-button>
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
</el-form-item>
</el-form>
@ -133,6 +156,7 @@
<script>
import {addPrintDeviceApi, delPrintDeviceApi, editPrintDeviceApi, getListByPageApi} from "@/api/print";
import {queryStaffs} from "@/api/order/staff";
export default {
name: "printIndex",
@ -140,6 +164,9 @@ export default {
data() {
return {
tableData: [],
staffIds: '',
staffList:[],
deviceInfo: {
id: null, // id
machineCode: '', //
@ -151,6 +178,10 @@ export default {
appPublicKey: '', // (key)
platformPublicKey: '', // (publicKey)
accessToken: '', // token
deviceSi: '', //
staffIds: '', //
deviceAb: '', //
staffName: '', //
acquiesce: false // token
},
//
@ -167,6 +198,7 @@ export default {
},
created() {
this.getList()
this.getStaffList()
},
methods: {
getList(){
@ -175,8 +207,11 @@ export default {
this.total = res.data.total
})
},
getsSubmitDeviceInfo(){},
getStaffList(){
queryStaffs().then( response => {
this.staffList = response.data;
})
},
submitForm(formName) {
this.$refs[formName].validate(valid => {
if (valid) {
@ -190,6 +225,18 @@ export default {
});
},
submitDeviceInfo() {
let staff = [];
this.staffIds.forEach(id => {
let matchingStaff = this.staffList.find(staff => staff.id === Number(id));
let names = {
id: id,
realName: matchingStaff ? matchingStaff.realName : id
}
staff.push(names)
});
this.deviceInfo.staffIds = JSON.stringify(staff)
//
console.log('提交设备信息数据:', this.deviceInfo);
if (this.deviceInfo.id) {
@ -198,9 +245,9 @@ export default {
this.getList()
this.open = false
}
})
}else {
console.log("staffIds",this.staffIds)
addPrintDeviceApi(this.deviceInfo).then(res=>{
if(res.code === 200) {
this.getList()
@ -209,6 +256,18 @@ export default {
})
}
},
jsonChange(data) {
if (data) {
let a = JSON.parse(data);
let b = a.map(res => res.realName).join(',');
return b
}else {
return '--'
}
},
handleQuery(){
this.getList()
},
@ -229,6 +288,11 @@ export default {
this.clean()
this.open = true;
this.title = "编辑设备"
console.log("eeeeeeee",e)
if (e.staffIds) {
let a = JSON.parse(e.staffIds)
this.staffIds = a.map(res => res.id)
}
this.deviceInfo = e
console.log('提交设备信息数据:', this.deviceInfo);
@ -261,6 +325,7 @@ export default {
},
clean() {
this.staffIds = []
this.deviceInfo= {
id: null, // id
machineCode: '', //

View File

@ -57,6 +57,8 @@ public class OilEngineConfig extends BaseEntity implements Serializable {
*/
private String updateBy;
private String createName;
private Integer storeId;
}

View File

@ -5,12 +5,14 @@
<select id="queryPage" resultType="com.fuint.business.deviceManage.entity.OilEngineConfig">
SELECT * FROM oil_engine_config
<where>
store_id = #{entity.storeId}
<if test="entity.deviceType != null and entity.deviceType != ''">
and device_type = #{entity.deviceType}
</if>
<if test="entity.deviceName != null and entity.deviceName != ''">
and device_name like concat('%', #{entity.deviceName}, '%')
</if>
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
and date_format(create_time,'%y%m%d') &gt;= date_format(#{entity.params.beginTime},'%y%m%d')
</if>

View File

@ -10,6 +10,8 @@ import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
import java.security.SecureRandom;
/**
* 油机汽机配置(OilEngineConfig)表服务实现类
*
@ -21,6 +23,8 @@ public class OilEngineConfigServiceImpl extends ServiceImpl<OilEngineConfigMappe
@Override
public IPage<OilEngineConfig> queryPage(Page page, OilEngineConfig oilEngineConfig) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
oilEngineConfig.setStoreId(nowAccountInfo.getStoreId());
return baseMapper.queryPage(page,oilEngineConfig);
}
@ -45,12 +49,28 @@ public class OilEngineConfigServiceImpl extends ServiceImpl<OilEngineConfigMappe
public int insert(OilEngineConfig oilEngineConfig) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
oilEngineConfig.setStoreId(nowAccountInfo.getStoreId());
oilEngineConfig.setCreateName(nowAccountInfo.getRealName());
oilEngineConfig.setCreateBy(nowAccountInfo.getStaffId().toString());
if ("BY".equals(oilEngineConfig.getDeviceType())) {
String s = generateRandomCode();
oilEngineConfig.setDeviceId(s);
}
return baseMapper.insert(oilEngineConfig);
}
private static final String CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
private static final int CODE_LENGTH = 15;
private static SecureRandom random = new SecureRandom();
public static String generateRandomCode() {
StringBuilder code = new StringBuilder(CODE_LENGTH);
for (int i = 0; i < CODE_LENGTH; i++) {
int index = random.nextInt(CHARACTERS.length());
code.append(CHARACTERS.charAt(index));
}
return code.toString();
}
/**
* 修改数据
*

View File

@ -62,6 +62,15 @@ public class PrintDeviceInfo extends BaseEntity {
*/
private Integer storeId;
private Integer deptId;
private String deptName;
private String deviceSi; // 设备品牌
private String staffIds; // 员工
private String deviceAb; // 设备功能
private String staffName; // 设备员工名字

View File

@ -19,6 +19,10 @@
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
<result property="updateBy" column="update_by" jdbcType="VARCHAR"/>
<result property="acquiesce" column="acquiesce" jdbcType="VARCHAR"/>
<result property="deviceSi" column="device_si" jdbcType="VARCHAR"/>
<result property="staffIds" column="staff_ids" jdbcType="VARCHAR"/>
<result property="deviceAb" column="device_ab" jdbcType="VARCHAR"/>
<result property="staffName" column="staff_name" jdbcType="VARCHAR"/>
<result property="storeId" column="store_id" jdbcType="INTEGER"/>
</resultMap>
@ -32,7 +36,15 @@
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="PrintDeviceInfoMap">
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,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,
device_si,
staff_ids,
device_ab,
staff_name
from print_device_info
<where>
<if test="printDeviceInfo.id != null">
and id = #{printDeviceInfo.id}
@ -119,10 +131,22 @@
<!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
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 )
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,
device_si,staff_ids,device_ab,staff_name
)
values (#{acquiesce},#{machineCode},#{msign},#{deviceName},#{userId},
#{appKey},#{appSecret},#{appPublicKey},#{platformPublicKey},#{accessToken},#{payment},
#{createTime},#{updateTime},#{createBy},#{updateBy},#{storeId})
#{createTime},#{updateTime},#{createBy},#{updateBy},#{storeId},
#{deviceSi},
#{staffIds},
#{deviceAb},
#{staffName}
)
</insert>
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
@ -197,6 +221,18 @@ machine_code = values(machine_code)msign = values(msign)device_name = values(dev
<if test="acquiesce != null">
acquiesce = #{acquiesce},
</if>
<if test="deviceSi != null">
device_si = #{deviceSi},
</if>
<if test="staffIds != null">
staff_ids = #{staffIds},
</if>
<if test="deviceAb != null">
device_ab = #{deviceAb},
</if>
<if test="staffName != null">
staff_name = #{staffName},
</if>
</set>
where id = #{id}
</update>