Commit 4c9f495f authored by 赵啸非's avatar 赵啸非

添加显示控制

parent be143af3
<template> <template>
<!-- 弹出框表单 --> <!-- 弹出框表单 -->
<el-drawer <el-drawer
:title="title" :title="title"
:visible.sync="open" :visible.sync="open"
:direction="direction" :direction="direction"
size="70%" size="70%"
> >
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row> <el-row>
<Field <Field
label="设备名称" label="设备名称"
prop="deviceName" prop="deviceName"
v-model="form.deviceName" v-model="form.deviceName"
placeholder="请输入设备名称" placeholder="请输入设备名称"
/> />
<!-- <Field <!-- <Field
label="设备编码" label="设备编码"
...@@ -21,44 +21,44 @@ ...@@ -21,44 +21,44 @@
placeholder="请输入设备编码码" placeholder="请输入设备编码码"
/> --> /> -->
<Field <Field
label="MAC地址" label="MAC地址"
prop="deviceCode" prop="deviceCode"
v-model="form.deviceCode" v-model="form.deviceCode"
placeholder="请输入设备的MAC地址" placeholder="请输入设备的MAC地址"
/> />
<!-- <Field label="平台类型" prop="platformId" v-model="form.platformId" type="select" :enumData="dict.platformId" placeholder="请选择平台类型"/> --> <!-- <Field label="平台类型" prop="platformId" v-model="form.platformId" type="select" :enumData="dict.platformId" placeholder="请选择平台类型"/> -->
<Field <Field
label="产品类型" label="产品类型"
prop="productId" prop="productId"
v-model="form.productId" v-model="form.productId"
type="select" type="select"
:enumData="dict.productId" :enumData="dict.productId"
@change="changeProduct" @change="changeProduct"
placeholder="请选择产品类型" placeholder="请选择产品类型"
/> />
<Field <Field
label="设备生产商" label="设备生产商"
placeholder="请选择设备生产商" placeholder="请选择设备生产商"
prop="deviceFirmId" prop="deviceFirmId"
v-model="form.deviceFirmId" v-model="form.deviceFirmId"
type="select" type="select"
:enumData="dict.deviceFirmId" :enumData="dict.deviceFirmId"
/> />
<Field <Field
label="设备来源" label="设备来源"
prop="deviceSrc" prop="deviceSrc"
v-model="form.deviceSrc" v-model="form.deviceSrc"
type="select" type="select"
:enumData="dict.deviceSrc" :enumData="dict.deviceSrc"
placeholder="请选择设备来源" placeholder="请选择设备来源"
/> />
<Field <Field
label="数据获取方式" label="数据获取方式"
prop="deviceDataSourceWay" prop="deviceDataSourceWay"
v-model="form.deviceDataSourceWay" v-model="form.deviceDataSourceWay"
type="select" type="select"
:enumData="dict.deviceDataSourceWay" :enumData="dict.deviceDataSourceWay"
placeholder="请选择数据获取方式" placeholder="请选择数据获取方式"
/> />
<!-- <Field <!-- <Field
label="经度" label="经度"
...@@ -73,99 +73,107 @@ ...@@ -73,99 +73,107 @@
placeholder="请输入纬度" placeholder="请输入纬度"
/> --> /> -->
<Field <Field
label="默认首页" label="默认首页"
prop="skinId" prop="skinId"
v-model="form.skinId" v-model="form.skinId"
@change="skinSelect" @change="skinSelect"
:enumData=" :enumData="
!form.productCode !form.productCode
? { 0: '无' } ? { 0: '无' }
: dict.skinProductCodeMap[form.productCode] : dict.skinProductCodeMap[form.productCode]
" "
type="select" type="select"
placeholder="选择首页" placeholder="选择首页"
/> />
<Field <Field
label="所属楼栋" label="所属楼栋"
prop="deviceInBuilding" prop="deviceInBuilding"
v-model="form.deviceInBuilding" v-model="form.deviceInBuilding"
type="num" type="num"
placeholder="请选择所属楼栋" placeholder="请选择所属楼栋"
></Field> ></Field>
<Field <Field
label="所属楼层" label="所属楼层"
prop="deviceInFloor" prop="deviceInFloor"
v-model="form.deviceInFloor" v-model="form.deviceInFloor"
type="num" type="num"
placeholder="请选择所属楼层" placeholder="请选择所属楼层"
/> />
<Field <Field
label="保修期至" label="保修期至"
prop="defectsLiabilityPeriod" prop="defectsLiabilityPeriod"
v-model="form.defectsLiabilityPeriod" v-model="form.defectsLiabilityPeriod"
type="datetime" type="datetime"
/> />
<Field <Field
label="负责人" label="负责人"
prop="leadingOfficial" prop="leadingOfficial"
v-model="form.leadingOfficial" v-model="form.leadingOfficial"
placeholder="请输入负责人" placeholder="请输入负责人"
/> />
<Field <Field
label="联系电话" label="联系电话"
prop="leadingOfficialTelephone" prop="leadingOfficialTelephone"
v-model="form.leadingOfficialTelephone" v-model="form.leadingOfficialTelephone"
placeholder="请输入联系电话" placeholder="请输入联系电话"
/> />
<Field <Field
label="接收异常短信" label="接收异常短信"
prop="isReceiveMess" prop="isReceiveMess"
v-model="form.isReceiveMess" v-model="form.isReceiveMess"
type="select" type="select"
:enumData="dict.isReceiveMess" :enumData="dict.isReceiveMess"
placeholder="请选择是否接收异常短信" placeholder="请选择是否接收异常短信"
/> />
<Field <Field
label="利旧设备" label="利旧设备"
prop="source" prop="source"
v-model="form.source" v-model="form.source"
type="select" type="select"
:enumData="dict.source" :enumData="dict.source"
placeholder="请选择状态 " placeholder="请选择状态 "
/> />
<Field <Field
label="启用状态" label="启用状态"
prop="enabled" prop="enabled"
v-model="form.enabled" v-model="form.enabled"
type="select" type="select"
:enumData="dict.enabled" :enumData="dict.enabled"
placeholder="请选择启用状态 " placeholder="请选择启用状态 "
/> />
<Field label="显示短信" prop="showSms" v-model="form.showSms" type="radio" :enumData="dict.showSms" placeholder="请选择是否显示短信"/>
<Field label="显示打印机" prop="showPrint" v-model="form.showPrint" type="radio" :enumData="dict.showPrint" placeholder="请选择是否显示打印机"/>
<Field label="显示小程序二维码" prop="showWechatQrCode" v-model="form.showWechatQrCode" type="radio" :enumData="dict.showWechatQrCode" placeholder="请选择是否显示小程序二维码"/>
<Field :span="24" label="上传图片" <Field :span="24" label="上传图片"
><ImageUpload v-model="form.devicePhotoPath" prePath="/file/preview" >
/></Field> <ImageUpload v-model="form.devicePhotoPath" prePath="/file/preview"
/>
</Field>
<Field <Field
label="授权码" label="授权码"
:span="24" :span="24"
prop="deviceAuthCode" prop="deviceAuthCode"
v-model="form.deviceAuthCode" v-model="form.deviceAuthCode"
type="textarea" type="textarea"
placeholder="请输入授权码" placeholder="请输入授权码"
/> />
<Field <Field
label="备注" label="备注"
:span="24" :span="24"
prop="deviceRemark" prop="deviceRemark"
v-model="form.deviceRemark" v-model="form.deviceRemark"
type="textarea" type="textarea"
placeholder="请输入备注" placeholder="请输入备注"
/> />
</el-row> </el-row>
<form-buttons @submit="submitForm" noCancelBtn /> <form-buttons @submit="submitForm" noCancelBtn/>
</el-form> </el-form>
</el-drawer> </el-drawer>
</template> </template>
...@@ -173,6 +181,7 @@ ...@@ -173,6 +181,7 @@
<script> <script>
import form from "@/assets/mixins/formdialog"; import form from "@/assets/mixins/formdialog";
import ImageUpload from "@/components/ImageUpload"; import ImageUpload from "@/components/ImageUpload";
export default { export default {
mixins: [form], mixins: [form],
components: { components: {
...@@ -203,6 +212,9 @@ export default { ...@@ -203,6 +212,9 @@ export default {
"enabled", "enabled",
"deviceFirmId", "deviceFirmId",
"source", "source",
"showSms",
"showPrint",
"showWechatQrCode",
"skinId", "skinId",
], ],
toDate: ["defectsLiabilityPeriod"], toDate: ["defectsLiabilityPeriod"],
...@@ -210,20 +222,20 @@ export default { ...@@ -210,20 +222,20 @@ export default {
// 表单校验 // 表单校验
rules: { rules: {
deviceName: [ deviceName: [
{ required: true, message: "请输入设备名称", trigger: "blur" }, {required: true, message: "请输入设备名称", trigger: "blur"},
{ max: 20, message: "最多只能录入20个字符", trigger: "blur" }, {max: 20, message: "最多只能录入20个字符", trigger: "blur"},
], ],
deviceCode: [ deviceCode: [
{ required: true, message: "请输入设备编码", trigger: "blur" }, {required: true, message: "请输入设备编码", trigger: "blur"},
], ],
deviceMac: [ deviceMac: [
{ required: true, message: "请输入Mac地址", trigger: "blur" }, {required: true, message: "请输入Mac地址", trigger: "blur"},
], ],
platformId: [ platformId: [
{ required: true, message: "请选择平台", trigger: "blur" }, {required: true, message: "请选择平台", trigger: "blur"},
], ],
productId: [{ required: true, message: "请选择产品", trigger: "blur" }], productId: [{required: true, message: "请选择产品", trigger: "blur"}],
}, },
}; };
}, },
...@@ -234,12 +246,12 @@ export default { ...@@ -234,12 +246,12 @@ export default {
}, },
skinSelect(val) { skinSelect(val) {
this.form.skinName = this.form.skinName =
this.dict.skinProductCodeMap[this.form.productCode][val]; this.dict.skinProductCodeMap[this.form.productCode][val];
}, },
/** 编辑 */ /** 编辑 */
edit(row) { edit(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = {id: row.id};
this.urls.currUrl = "/device/edit"; this.urls.currUrl = "/device/edit";
this.siteName = row.siteName; this.siteName = row.siteName;
this.siteCode = row.siteCode; this.siteCode = row.siteCode;
...@@ -261,7 +273,7 @@ export default { ...@@ -261,7 +273,7 @@ export default {
/** 查看*/ /** 查看*/
view(row) { view(row) {
this.reset(); this.reset();
this.query = { id: row.id }; this.query = {id: row.id};
this.urls.currUrl = "/device/view"; this.urls.currUrl = "/device/view";
this.getData(); this.getData();
this.pageInfo.type = "view"; this.pageInfo.type = "view";
...@@ -295,7 +307,8 @@ export default { ...@@ -295,7 +307,8 @@ export default {
this.$refs[refName].resetFields(); this.$refs[refName].resetFields();
} }
}, },
handleClose() {}, handleClose() {
},
}, },
}; };
</script> </script>
...@@ -30,3 +30,11 @@ ALTER TABLE mortals_xhx_device ADD COLUMN `hallName` varchar(256) default '' ...@@ -30,3 +30,11 @@ ALTER TABLE mortals_xhx_device ADD COLUMN `hallName` varchar(256) default ''
ALTER TABLE mortals_xhx_device_alarm_info ADD COLUMN `deviceCode` varchar(256) default '' COMMENT '设备编码' AFTER alarmDevice; ALTER TABLE mortals_xhx_device_alarm_info ADD COLUMN `deviceCode` varchar(256) default '' COMMENT '设备编码' AFTER alarmDevice;
ALTER TABLE mortals_xhx_device_alarm_info ADD COLUMN `deviceName` varchar(256) default '' COMMENT '设备名称' AFTER deviceCode; ALTER TABLE mortals_xhx_device_alarm_info ADD COLUMN `deviceName` varchar(256) default '' COMMENT '设备名称' AFTER deviceCode;
-- ----------------------------
2023-05-11
-- ----------------------------
ALTER TABLE mortals_xhx_device ADD COLUMN `showSms` tinyint(2) DEFAULT '1' COMMENT '是否显示短信(0.否,1.是)' AFTER hallName;
ALTER TABLE mortals_xhx_device ADD COLUMN `showPrint` tinyint(2) DEFAULT '1' COMMENT '是否显示打印机(0.否,1.是)' AFTER showSms;
ALTER TABLE mortals_xhx_device ADD COLUMN `showWechatQrCode` tinyint(2) DEFAULT '1' COMMENT '是否显示小程序二维码(0.否,1.是)' AFTER showPrint;
...@@ -8,7 +8,7 @@ import java.util.Date; ...@@ -8,7 +8,7 @@ import java.util.Date;
* 设备实体对象 * 设备实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-26 * @date 2023-05-11
*/ */
@Data @Data
public class DeviceEntity extends DeviceVo { public class DeviceEntity extends DeviceVo {
...@@ -186,6 +186,18 @@ public class DeviceEntity extends DeviceVo { ...@@ -186,6 +186,18 @@ public class DeviceEntity extends DeviceVo {
* 大厅名称 * 大厅名称
*/ */
private String hallName; private String hallName;
/**
* 是否显示短信(0.否,1.是)
*/
private Integer showSms;
/**
* 是否显示打印机(0.否,1.是)
*/
private Integer showPrint;
/**
* 是否显示小程序二维码(0.否,1.是)
*/
private Integer showWechatQrCode;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -230,7 +242,7 @@ public class DeviceEntity extends DeviceVo { ...@@ -230,7 +242,7 @@ public class DeviceEntity extends DeviceVo {
this.homeUrl = ""; this.homeUrl = "";
this.deviceFirmId = 1L; this.deviceFirmId = null;
this.deviceFirmname = ""; this.deviceFirmname = "";
...@@ -289,5 +301,11 @@ public class DeviceEntity extends DeviceVo { ...@@ -289,5 +301,11 @@ public class DeviceEntity extends DeviceVo {
this.hallId = null; this.hallId = null;
this.hallName = ""; this.hallName = "";
this.showSms = 1;
this.showPrint = 1;
this.showWechatQrCode = 1;
} }
} }
\ No newline at end of file
...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity; ...@@ -7,7 +7,7 @@ import com.mortals.xhx.module.device.model.DeviceEntity;
* 设备查询对象 * 设备查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-04-26 * @date 2023-05-11
*/ */
public class DeviceQuery extends DeviceEntity { public class DeviceQuery extends DeviceEntity {
/** 开始 主键ID,主键,自增长 */ /** 开始 主键ID,主键,自增长 */
...@@ -435,6 +435,51 @@ public class DeviceQuery extends DeviceEntity { ...@@ -435,6 +435,51 @@ public class DeviceQuery extends DeviceEntity {
/** 大厅名称排除列表 */ /** 大厅名称排除列表 */
private List <String> hallNameNotList; private List <String> hallNameNotList;
/** 开始 是否显示短信(0.否,1.是) */
private Integer showSmsStart;
/** 结束 是否显示短信(0.否,1.是) */
private Integer showSmsEnd;
/** 增加 是否显示短信(0.否,1.是) */
private Integer showSmsIncrement;
/** 是否显示短信(0.否,1.是)列表 */
private List <Integer> showSmsList;
/** 是否显示短信(0.否,1.是)排除列表 */
private List <Integer> showSmsNotList;
/** 开始 是否显示打印机(0.否,1.是) */
private Integer showPrintStart;
/** 结束 是否显示打印机(0.否,1.是) */
private Integer showPrintEnd;
/** 增加 是否显示打印机(0.否,1.是) */
private Integer showPrintIncrement;
/** 是否显示打印机(0.否,1.是)列表 */
private List <Integer> showPrintList;
/** 是否显示打印机(0.否,1.是)排除列表 */
private List <Integer> showPrintNotList;
/** 开始 是否显示小程序二维码(0.否,1.是) */
private Integer showWechatQrCodeStart;
/** 结束 是否显示小程序二维码(0.否,1.是) */
private Integer showWechatQrCodeEnd;
/** 增加 是否显示小程序二维码(0.否,1.是) */
private Integer showWechatQrCodeIncrement;
/** 是否显示小程序二维码(0.否,1.是)列表 */
private List <Integer> showWechatQrCodeList;
/** 是否显示小程序二维码(0.否,1.是)排除列表 */
private List <Integer> showWechatQrCodeNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<DeviceQuery> orConditionList; private List<DeviceQuery> orConditionList;
...@@ -2861,6 +2906,249 @@ public class DeviceQuery extends DeviceEntity { ...@@ -2861,6 +2906,249 @@ public class DeviceQuery extends DeviceEntity {
this.hallNameNotList = hallNameNotList; this.hallNameNotList = hallNameNotList;
} }
/**
* 获取 开始 是否显示短信(0.否,1.是)
* @return showSmsStart
*/
public Integer getShowSmsStart(){
return this.showSmsStart;
}
/**
* 设置 开始 是否显示短信(0.否,1.是)
* @param showSmsStart
*/
public void setShowSmsStart(Integer showSmsStart){
this.showSmsStart = showSmsStart;
}
/**
* 获取 结束 是否显示短信(0.否,1.是)
* @return $showSmsEnd
*/
public Integer getShowSmsEnd(){
return this.showSmsEnd;
}
/**
* 设置 结束 是否显示短信(0.否,1.是)
* @param showSmsEnd
*/
public void setShowSmsEnd(Integer showSmsEnd){
this.showSmsEnd = showSmsEnd;
}
/**
* 获取 增加 是否显示短信(0.否,1.是)
* @return showSmsIncrement
*/
public Integer getShowSmsIncrement(){
return this.showSmsIncrement;
}
/**
* 设置 增加 是否显示短信(0.否,1.是)
* @param showSmsIncrement
*/
public void setShowSmsIncrement(Integer showSmsIncrement){
this.showSmsIncrement = showSmsIncrement;
}
/**
* 获取 是否显示短信(0.否,1.是)
* @return showSmsList
*/
public List<Integer> getShowSmsList(){
return this.showSmsList;
}
/**
* 设置 是否显示短信(0.否,1.是)
* @param showSmsList
*/
public void setShowSmsList(List<Integer> showSmsList){
this.showSmsList = showSmsList;
}
/**
* 获取 是否显示短信(0.否,1.是)
* @return showSmsNotList
*/
public List<Integer> getShowSmsNotList(){
return this.showSmsNotList;
}
/**
* 设置 是否显示短信(0.否,1.是)
* @param showSmsNotList
*/
public void setShowSmsNotList(List<Integer> showSmsNotList){
this.showSmsNotList = showSmsNotList;
}
/**
* 获取 开始 是否显示打印机(0.否,1.是)
* @return showPrintStart
*/
public Integer getShowPrintStart(){
return this.showPrintStart;
}
/**
* 设置 开始 是否显示打印机(0.否,1.是)
* @param showPrintStart
*/
public void setShowPrintStart(Integer showPrintStart){
this.showPrintStart = showPrintStart;
}
/**
* 获取 结束 是否显示打印机(0.否,1.是)
* @return $showPrintEnd
*/
public Integer getShowPrintEnd(){
return this.showPrintEnd;
}
/**
* 设置 结束 是否显示打印机(0.否,1.是)
* @param showPrintEnd
*/
public void setShowPrintEnd(Integer showPrintEnd){
this.showPrintEnd = showPrintEnd;
}
/**
* 获取 增加 是否显示打印机(0.否,1.是)
* @return showPrintIncrement
*/
public Integer getShowPrintIncrement(){
return this.showPrintIncrement;
}
/**
* 设置 增加 是否显示打印机(0.否,1.是)
* @param showPrintIncrement
*/
public void setShowPrintIncrement(Integer showPrintIncrement){
this.showPrintIncrement = showPrintIncrement;
}
/**
* 获取 是否显示打印机(0.否,1.是)
* @return showPrintList
*/
public List<Integer> getShowPrintList(){
return this.showPrintList;
}
/**
* 设置 是否显示打印机(0.否,1.是)
* @param showPrintList
*/
public void setShowPrintList(List<Integer> showPrintList){
this.showPrintList = showPrintList;
}
/**
* 获取 是否显示打印机(0.否,1.是)
* @return showPrintNotList
*/
public List<Integer> getShowPrintNotList(){
return this.showPrintNotList;
}
/**
* 设置 是否显示打印机(0.否,1.是)
* @param showPrintNotList
*/
public void setShowPrintNotList(List<Integer> showPrintNotList){
this.showPrintNotList = showPrintNotList;
}
/**
* 获取 开始 是否显示小程序二维码(0.否,1.是)
* @return showWechatQrCodeStart
*/
public Integer getShowWechatQrCodeStart(){
return this.showWechatQrCodeStart;
}
/**
* 设置 开始 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeStart
*/
public void setShowWechatQrCodeStart(Integer showWechatQrCodeStart){
this.showWechatQrCodeStart = showWechatQrCodeStart;
}
/**
* 获取 结束 是否显示小程序二维码(0.否,1.是)
* @return $showWechatQrCodeEnd
*/
public Integer getShowWechatQrCodeEnd(){
return this.showWechatQrCodeEnd;
}
/**
* 设置 结束 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeEnd
*/
public void setShowWechatQrCodeEnd(Integer showWechatQrCodeEnd){
this.showWechatQrCodeEnd = showWechatQrCodeEnd;
}
/**
* 获取 增加 是否显示小程序二维码(0.否,1.是)
* @return showWechatQrCodeIncrement
*/
public Integer getShowWechatQrCodeIncrement(){
return this.showWechatQrCodeIncrement;
}
/**
* 设置 增加 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeIncrement
*/
public void setShowWechatQrCodeIncrement(Integer showWechatQrCodeIncrement){
this.showWechatQrCodeIncrement = showWechatQrCodeIncrement;
}
/**
* 获取 是否显示小程序二维码(0.否,1.是)
* @return showWechatQrCodeList
*/
public List<Integer> getShowWechatQrCodeList(){
return this.showWechatQrCodeList;
}
/**
* 设置 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeList
*/
public void setShowWechatQrCodeList(List<Integer> showWechatQrCodeList){
this.showWechatQrCodeList = showWechatQrCodeList;
}
/**
* 获取 是否显示小程序二维码(0.否,1.是)
* @return showWechatQrCodeNotList
*/
public List<Integer> getShowWechatQrCodeNotList(){
return this.showWechatQrCodeNotList;
}
/**
* 设置 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeNotList
*/
public void setShowWechatQrCodeNotList(List<Integer> showWechatQrCodeNotList){
this.showWechatQrCodeNotList = showWechatQrCodeNotList;
}
/** /**
* 设置 主键ID,主键,自增长 * 设置 主键ID,主键,自增长
* @param id * @param id
...@@ -4313,6 +4601,168 @@ public class DeviceQuery extends DeviceEntity { ...@@ -4313,6 +4601,168 @@ public class DeviceQuery extends DeviceEntity {
return this; return this;
} }
/**
* 设置 是否显示短信(0.否,1.是)
* @param showSms
*/
public DeviceQuery showSms(Integer showSms){
setShowSms(showSms);
return this;
}
/**
* 设置 开始 是否显示短信(0.否,1.是)
* @param showSmsStart
*/
public DeviceQuery showSmsStart(Integer showSmsStart){
this.showSmsStart = showSmsStart;
return this;
}
/**
* 设置 结束 是否显示短信(0.否,1.是)
* @param showSmsEnd
*/
public DeviceQuery showSmsEnd(Integer showSmsEnd){
this.showSmsEnd = showSmsEnd;
return this;
}
/**
* 设置 增加 是否显示短信(0.否,1.是)
* @param showSmsIncrement
*/
public DeviceQuery showSmsIncrement(Integer showSmsIncrement){
this.showSmsIncrement = showSmsIncrement;
return this;
}
/**
* 设置 是否显示短信(0.否,1.是)
* @param showSmsList
*/
public DeviceQuery showSmsList(List<Integer> showSmsList){
this.showSmsList = showSmsList;
return this;
}
/**
* 设置 是否显示短信(0.否,1.是)
* @param showSmsNotList
*/
public DeviceQuery showSmsNotList(List<Integer> showSmsNotList){
this.showSmsNotList = showSmsNotList;
return this;
}
/**
* 设置 是否显示打印机(0.否,1.是)
* @param showPrint
*/
public DeviceQuery showPrint(Integer showPrint){
setShowPrint(showPrint);
return this;
}
/**
* 设置 开始 是否显示打印机(0.否,1.是)
* @param showPrintStart
*/
public DeviceQuery showPrintStart(Integer showPrintStart){
this.showPrintStart = showPrintStart;
return this;
}
/**
* 设置 结束 是否显示打印机(0.否,1.是)
* @param showPrintEnd
*/
public DeviceQuery showPrintEnd(Integer showPrintEnd){
this.showPrintEnd = showPrintEnd;
return this;
}
/**
* 设置 增加 是否显示打印机(0.否,1.是)
* @param showPrintIncrement
*/
public DeviceQuery showPrintIncrement(Integer showPrintIncrement){
this.showPrintIncrement = showPrintIncrement;
return this;
}
/**
* 设置 是否显示打印机(0.否,1.是)
* @param showPrintList
*/
public DeviceQuery showPrintList(List<Integer> showPrintList){
this.showPrintList = showPrintList;
return this;
}
/**
* 设置 是否显示打印机(0.否,1.是)
* @param showPrintNotList
*/
public DeviceQuery showPrintNotList(List<Integer> showPrintNotList){
this.showPrintNotList = showPrintNotList;
return this;
}
/**
* 设置 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCode
*/
public DeviceQuery showWechatQrCode(Integer showWechatQrCode){
setShowWechatQrCode(showWechatQrCode);
return this;
}
/**
* 设置 开始 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeStart
*/
public DeviceQuery showWechatQrCodeStart(Integer showWechatQrCodeStart){
this.showWechatQrCodeStart = showWechatQrCodeStart;
return this;
}
/**
* 设置 结束 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeEnd
*/
public DeviceQuery showWechatQrCodeEnd(Integer showWechatQrCodeEnd){
this.showWechatQrCodeEnd = showWechatQrCodeEnd;
return this;
}
/**
* 设置 增加 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeIncrement
*/
public DeviceQuery showWechatQrCodeIncrement(Integer showWechatQrCodeIncrement){
this.showWechatQrCodeIncrement = showWechatQrCodeIncrement;
return this;
}
/**
* 设置 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeList
*/
public DeviceQuery showWechatQrCodeList(List<Integer> showWechatQrCodeList){
this.showWechatQrCodeList = showWechatQrCodeList;
return this;
}
/**
* 设置 是否显示小程序二维码(0.否,1.是)
* @param showWechatQrCodeNotList
*/
public DeviceQuery showWechatQrCodeNotList(List<Integer> showWechatQrCodeNotList){
this.showWechatQrCodeNotList = showWechatQrCodeNotList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
...@@ -95,6 +95,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe ...@@ -95,6 +95,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
this.addDict(model, "deviceStatus", DeviceStatusEnum.getEnumMap()); this.addDict(model, "deviceStatus", DeviceStatusEnum.getEnumMap());
this.addDict(model, "enabled", EnabledEnum.getEnumMap()); this.addDict(model, "enabled", EnabledEnum.getEnumMap());
this.addDict(model, "source", DeviceSourceEnum.getEnumMap()); this.addDict(model, "source", DeviceSourceEnum.getEnumMap());
this.addDict(model, "showSms", YesNoEnum.getEnumMap());
this.addDict(model, "showPrint", YesNoEnum.getEnumMap());
this.addDict(model, "source", YesNoEnum.getEnumMap());
//返回产品列表及其样式 //返回产品列表及其样式
//productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())). //productService.find(new ProductEntity()).stream().collect(Collectors.toMap(x -> x.getId().toString(), y -> y.getProductName())).
if (platFormType.equalsIgnoreCase(PlatformTypeEnum.CLOUD.getValue())) { if (platFormType.equalsIgnoreCase(PlatformTypeEnum.CLOUD.getValue())) {
......
...@@ -53,6 +53,9 @@ ...@@ -53,6 +53,9 @@
<result property="productCode" column="productCode" /> <result property="productCode" column="productCode" />
<result property="hallId" column="hallId" /> <result property="hallId" column="hallId" />
<result property="hallName" column="hallName" /> <result property="hallName" column="hallName" />
<result property="showSms" column="showSms" />
<result property="showPrint" column="showPrint" />
<result property="showWechatQrCode" column="showWechatQrCode" />
</resultMap> </resultMap>
...@@ -204,23 +207,32 @@ ...@@ -204,23 +207,32 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallName') or colPickMode == 1 and data.containsKey('hallName')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('hallName') or colPickMode == 1 and data.containsKey('hallName')))">
a.hallName, a.hallName,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('showSms') or colPickMode == 1 and data.containsKey('showSms')))">
a.showSms,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('showPrint') or colPickMode == 1 and data.containsKey('showPrint')))">
a.showPrint,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('showWechatQrCode') or colPickMode == 1 and data.containsKey('showWechatQrCode')))">
a.showWechatQrCode,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="DeviceEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="DeviceEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_device insert into mortals_xhx_device
(deviceName,deviceCode,deviceMac,siteId,siteCode,siteName,platformId,platformName,productId,productName,skinId,skinName,homeUrl,deviceFirmId,deviceFirmname,deviceSrc,deviceDataSourceWay,lon,lati,deviceInBuilding,deviceInFloor,defectsLiabilityPeriod,leadingOfficial,leadingOfficialTelephone,isReceiveMess,devicePhotoPath,ip,centernum,port,deviceTopic,deviceStatus,enabled,deviceAuthCode,deviceRemark,onlineTime,offlineTime,deleted,source,createUserId,createTime,updateUserId,updateTime,deviceSN,deviceVersion,productCode,hallId,hallName) (deviceName,deviceCode,deviceMac,siteId,siteCode,siteName,platformId,platformName,productId,productName,skinId,skinName,homeUrl,deviceFirmId,deviceFirmname,deviceSrc,deviceDataSourceWay,lon,lati,deviceInBuilding,deviceInFloor,defectsLiabilityPeriod,leadingOfficial,leadingOfficialTelephone,isReceiveMess,devicePhotoPath,ip,centernum,port,deviceTopic,deviceStatus,enabled,deviceAuthCode,deviceRemark,onlineTime,offlineTime,deleted,source,createUserId,createTime,updateUserId,updateTime,deviceSN,deviceVersion,productCode,hallId,hallName,showSms,showPrint,showWechatQrCode)
VALUES VALUES
(#{deviceName},#{deviceCode},#{deviceMac},#{siteId},#{siteCode},#{siteName},#{platformId},#{platformName},#{productId},#{productName},#{skinId},#{skinName},#{homeUrl},#{deviceFirmId},#{deviceFirmname},#{deviceSrc},#{deviceDataSourceWay},#{lon},#{lati},#{deviceInBuilding},#{deviceInFloor},#{defectsLiabilityPeriod},#{leadingOfficial},#{leadingOfficialTelephone},#{isReceiveMess},#{devicePhotoPath},#{ip},#{centernum},#{port},#{deviceTopic},#{deviceStatus},#{enabled},#{deviceAuthCode},#{deviceRemark},#{onlineTime},#{offlineTime},#{deleted},#{source},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{deviceSN},#{deviceVersion},#{productCode},#{hallId},#{hallName}) (#{deviceName},#{deviceCode},#{deviceMac},#{siteId},#{siteCode},#{siteName},#{platformId},#{platformName},#{productId},#{productName},#{skinId},#{skinName},#{homeUrl},#{deviceFirmId},#{deviceFirmname},#{deviceSrc},#{deviceDataSourceWay},#{lon},#{lati},#{deviceInBuilding},#{deviceInFloor},#{defectsLiabilityPeriod},#{leadingOfficial},#{leadingOfficialTelephone},#{isReceiveMess},#{devicePhotoPath},#{ip},#{centernum},#{port},#{deviceTopic},#{deviceStatus},#{enabled},#{deviceAuthCode},#{deviceRemark},#{onlineTime},#{offlineTime},#{deleted},#{source},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{deviceSN},#{deviceVersion},#{productCode},#{hallId},#{hallName},#{showSms},#{showPrint},#{showWechatQrCode})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_device insert into mortals_xhx_device
(deviceName,deviceCode,deviceMac,siteId,siteCode,siteName,platformId,platformName,productId,productName,skinId,skinName,homeUrl,deviceFirmId,deviceFirmname,deviceSrc,deviceDataSourceWay,lon,lati,deviceInBuilding,deviceInFloor,defectsLiabilityPeriod,leadingOfficial,leadingOfficialTelephone,isReceiveMess,devicePhotoPath,ip,centernum,port,deviceTopic,deviceStatus,enabled,deviceAuthCode,deviceRemark,onlineTime,offlineTime,deleted,source,createUserId,createTime,updateUserId,updateTime,deviceSN,deviceVersion,productCode,hallId,hallName) (deviceName,deviceCode,deviceMac,siteId,siteCode,siteName,platformId,platformName,productId,productName,skinId,skinName,homeUrl,deviceFirmId,deviceFirmname,deviceSrc,deviceDataSourceWay,lon,lati,deviceInBuilding,deviceInFloor,defectsLiabilityPeriod,leadingOfficial,leadingOfficialTelephone,isReceiveMess,devicePhotoPath,ip,centernum,port,deviceTopic,deviceStatus,enabled,deviceAuthCode,deviceRemark,onlineTime,offlineTime,deleted,source,createUserId,createTime,updateUserId,updateTime,deviceSN,deviceVersion,productCode,hallId,hallName,showSms,showPrint,showWechatQrCode)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.deviceName},#{item.deviceCode},#{item.deviceMac},#{item.siteId},#{item.siteCode},#{item.siteName},#{item.platformId},#{item.platformName},#{item.productId},#{item.productName},#{item.skinId},#{item.skinName},#{item.homeUrl},#{item.deviceFirmId},#{item.deviceFirmname},#{item.deviceSrc},#{item.deviceDataSourceWay},#{item.lon},#{item.lati},#{item.deviceInBuilding},#{item.deviceInFloor},#{item.defectsLiabilityPeriod},#{item.leadingOfficial},#{item.leadingOfficialTelephone},#{item.isReceiveMess},#{item.devicePhotoPath},#{item.ip},#{item.centernum},#{item.port},#{item.deviceTopic},#{item.deviceStatus},#{item.enabled},#{item.deviceAuthCode},#{item.deviceRemark},#{item.onlineTime},#{item.offlineTime},#{item.deleted},#{item.source},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.deviceSN},#{item.deviceVersion},#{item.productCode},#{item.hallId},#{item.hallName}) (#{item.deviceName},#{item.deviceCode},#{item.deviceMac},#{item.siteId},#{item.siteCode},#{item.siteName},#{item.platformId},#{item.platformName},#{item.productId},#{item.productName},#{item.skinId},#{item.skinName},#{item.homeUrl},#{item.deviceFirmId},#{item.deviceFirmname},#{item.deviceSrc},#{item.deviceDataSourceWay},#{item.lon},#{item.lati},#{item.deviceInBuilding},#{item.deviceInFloor},#{item.defectsLiabilityPeriod},#{item.leadingOfficial},#{item.leadingOfficialTelephone},#{item.isReceiveMess},#{item.devicePhotoPath},#{item.ip},#{item.centernum},#{item.port},#{item.deviceTopic},#{item.deviceStatus},#{item.enabled},#{item.deviceAuthCode},#{item.deviceRemark},#{item.onlineTime},#{item.offlineTime},#{item.deleted},#{item.source},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.deviceSN},#{item.deviceVersion},#{item.productCode},#{item.hallId},#{item.hallName},#{item.showSms},#{item.showPrint},#{item.showWechatQrCode})
</foreach> </foreach>
</insert> </insert>
...@@ -422,6 +434,24 @@ ...@@ -422,6 +434,24 @@
<if test="(colPickMode==0 and data.containsKey('hallName')) or (colPickMode==1 and !data.containsKey('hallName'))"> <if test="(colPickMode==0 and data.containsKey('hallName')) or (colPickMode==1 and !data.containsKey('hallName'))">
a.hallName=#{data.hallName}, a.hallName=#{data.hallName},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('showSms')) or (colPickMode==1 and !data.containsKey('showSms'))">
a.showSms=#{data.showSms},
</if>
<if test="(colPickMode==0 and data.containsKey('showSmsIncrement')) or (colPickMode==1 and !data.containsKey('showSmsIncrement'))">
a.showSms=ifnull(a.showSms,0) + #{data.showSmsIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('showPrint')) or (colPickMode==1 and !data.containsKey('showPrint'))">
a.showPrint=#{data.showPrint},
</if>
<if test="(colPickMode==0 and data.containsKey('showPrintIncrement')) or (colPickMode==1 and !data.containsKey('showPrintIncrement'))">
a.showPrint=ifnull(a.showPrint,0) + #{data.showPrintIncrement},
</if>
<if test="(colPickMode==0 and data.containsKey('showWechatQrCode')) or (colPickMode==1 and !data.containsKey('showWechatQrCode'))">
a.showWechatQrCode=#{data.showWechatQrCode},
</if>
<if test="(colPickMode==0 and data.containsKey('showWechatQrCodeIncrement')) or (colPickMode==1 and !data.containsKey('showWechatQrCodeIncrement'))">
a.showWechatQrCode=ifnull(a.showWechatQrCode,0) + #{data.showWechatQrCodeIncrement},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -848,6 +878,42 @@ ...@@ -848,6 +878,42 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="showSms=(case" suffix="ELSE showSms end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('showSms')) or (colPickMode==1 and !item.containsKey('showSms'))">
when a.id=#{item.id} then #{item.showSms}
</when>
<when test="(colPickMode==0 and item.containsKey('showSmsIncrement')) or (colPickMode==1 and !item.containsKey('showSmsIncrement'))">
when a.id=#{item.id} then ifnull(a.showSms,0) + #{item.showSmsIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="showPrint=(case" suffix="ELSE showPrint end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('showPrint')) or (colPickMode==1 and !item.containsKey('showPrint'))">
when a.id=#{item.id} then #{item.showPrint}
</when>
<when test="(colPickMode==0 and item.containsKey('showPrintIncrement')) or (colPickMode==1 and !item.containsKey('showPrintIncrement'))">
when a.id=#{item.id} then ifnull(a.showPrint,0) + #{item.showPrintIncrement}
</when>
</choose>
</foreach>
</trim>
<trim prefix="showWechatQrCode=(case" suffix="ELSE showWechatQrCode end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<choose>
<when test="(colPickMode==0 and item.containsKey('showWechatQrCode')) or (colPickMode==1 and !item.containsKey('showWechatQrCode'))">
when a.id=#{item.id} then #{item.showWechatQrCode}
</when>
<when test="(colPickMode==0 and item.containsKey('showWechatQrCodeIncrement')) or (colPickMode==1 and !item.containsKey('showWechatQrCodeIncrement'))">
when a.id=#{item.id} then ifnull(a.showWechatQrCode,0) + #{item.showWechatQrCodeIncrement}
</when>
</choose>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -2050,6 +2116,87 @@ ...@@ -2050,6 +2116,87 @@
#{item} #{item}
</foreach> </foreach>
</if> </if>
<if test="conditionParamRef.containsKey('showSms')">
<if test="conditionParamRef.showSms != null ">
${_conditionType_} a.showSms = #{${_conditionParam_}.showSms}
</if>
<if test="conditionParamRef.showSms == null">
${_conditionType_} a.showSms is null
</if>
</if>
<if test="conditionParamRef.containsKey('showSmsList') and conditionParamRef.showSmsList.size() > 0">
${_conditionType_} a.showSms in
<foreach collection="conditionParamRef.showSmsList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('showSmsNotList') and conditionParamRef.showSmsNotList.size() > 0">
${_conditionType_} a.showSms not in
<foreach collection="conditionParamRef.showSmsNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('showSmsStart') and conditionParamRef.showSmsStart != null">
${_conditionType_} a.showSms <![CDATA[ >= ]]> #{${_conditionParam_}.showSmsStart}
</if>
<if test="conditionParamRef.containsKey('showSmsEnd') and conditionParamRef.showSmsEnd != null">
${_conditionType_} a.showSms <![CDATA[ <= ]]> #{${_conditionParam_}.showSmsEnd}
</if>
<if test="conditionParamRef.containsKey('showPrint')">
<if test="conditionParamRef.showPrint != null ">
${_conditionType_} a.showPrint = #{${_conditionParam_}.showPrint}
</if>
<if test="conditionParamRef.showPrint == null">
${_conditionType_} a.showPrint is null
</if>
</if>
<if test="conditionParamRef.containsKey('showPrintList') and conditionParamRef.showPrintList.size() > 0">
${_conditionType_} a.showPrint in
<foreach collection="conditionParamRef.showPrintList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('showPrintNotList') and conditionParamRef.showPrintNotList.size() > 0">
${_conditionType_} a.showPrint not in
<foreach collection="conditionParamRef.showPrintNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('showPrintStart') and conditionParamRef.showPrintStart != null">
${_conditionType_} a.showPrint <![CDATA[ >= ]]> #{${_conditionParam_}.showPrintStart}
</if>
<if test="conditionParamRef.containsKey('showPrintEnd') and conditionParamRef.showPrintEnd != null">
${_conditionType_} a.showPrint <![CDATA[ <= ]]> #{${_conditionParam_}.showPrintEnd}
</if>
<if test="conditionParamRef.containsKey('showWechatQrCode')">
<if test="conditionParamRef.showWechatQrCode != null ">
${_conditionType_} a.showWechatQrCode = #{${_conditionParam_}.showWechatQrCode}
</if>
<if test="conditionParamRef.showWechatQrCode == null">
${_conditionType_} a.showWechatQrCode is null
</if>
</if>
<if test="conditionParamRef.containsKey('showWechatQrCodeList') and conditionParamRef.showWechatQrCodeList.size() > 0">
${_conditionType_} a.showWechatQrCode in
<foreach collection="conditionParamRef.showWechatQrCodeList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('showWechatQrCodeNotList') and conditionParamRef.showWechatQrCodeNotList.size() > 0">
${_conditionType_} a.showWechatQrCode not in
<foreach collection="conditionParamRef.showWechatQrCodeNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('showWechatQrCodeStart') and conditionParamRef.showWechatQrCodeStart != null">
${_conditionType_} a.showWechatQrCode <![CDATA[ >= ]]> #{${_conditionParam_}.showWechatQrCodeStart}
</if>
<if test="conditionParamRef.containsKey('showWechatQrCodeEnd') and conditionParamRef.showWechatQrCodeEnd != null">
${_conditionType_} a.showWechatQrCode <![CDATA[ <= ]]> #{${_conditionParam_}.showWechatQrCodeEnd}
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -2303,6 +2450,21 @@ ...@@ -2303,6 +2450,21 @@
<if test='orderCol.hallName != null and "DESC".equalsIgnoreCase(orderCol.hallName)'>DESC</if> <if test='orderCol.hallName != null and "DESC".equalsIgnoreCase(orderCol.hallName)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('showSms')">
a.showSms
<if test='orderCol.showSms != null and "DESC".equalsIgnoreCase(orderCol.showSms)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('showPrint')">
a.showPrint
<if test='orderCol.showPrint != null and "DESC".equalsIgnoreCase(orderCol.showPrint)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('showWechatQrCode')">
a.showWechatQrCode
<if test='orderCol.showWechatQrCode != null and "DESC".equalsIgnoreCase(orderCol.showWechatQrCode)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -14,6 +14,251 @@ BigDecimal|小数类型|545.256 ...@@ -14,6 +14,251 @@ BigDecimal|小数类型|545.256
object|对象类型|{"name":"zhang3"} object|对象类型|{"name":"zhang3"}
arrays|数组类型|[{"name":"zhang3"},{"name":"zhang2"}] arrays|数组类型|[{"name":"zhang3"},{"name":"zhang2"}]
## 设备
### 查询设备列表
**请求URL:** m/device/list
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查询设备
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
page|Integer|否|当前页
size|Integer|否|每页条数,值为-1,查询所有记录
deviceCode|String|否|设备编码查询设备
**请求样例:**
```
{
"deviceCode":"a1-b1-c1",
"page":1,
"size":10
}
```
**响应参数:**
参数名称|参数类型|描述
:---|:---|:------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;per_page|Integer|每页条数
&emsp;total|Integer|总条数
&emsp;last_page|Integer|总页数
&emsp;current_page|Integer|当前页
&emsp;data|array|结果集列表|数组
&emsp;&emsp;id|Long|主键ID,主键,自增长
&emsp;&emsp;deviceName|String|设备名称
&emsp;&emsp;deviceCode|String|设备编码,SN码等,默认为MAC地址
&emsp;&emsp;deviceMac|String|设备的MAC地址
&emsp;&emsp;siteId|Long|站点Id,来源基础服务平台
&emsp;&emsp;siteCode|String|站点编号,来源基础服务平台
&emsp;&emsp;siteName|String|站点名称
&emsp;&emsp;platformId|Long|平台系统Id
&emsp;&emsp;platformName|String|平台系统名称
&emsp;&emsp;productId|Long|产品Id
&emsp;&emsp;productName|String|产品名称
&emsp;&emsp;skinId|Long|皮肤id
&emsp;&emsp;skinName|String|皮肤名称
&emsp;&emsp;homeUrl|String|首页地址
&emsp;&emsp;deviceFirmId|Long|设备生产厂商ID
&emsp;&emsp;deviceFirmname|String|设备生产厂商名称
&emsp;&emsp;deviceSrc|Integer|设备来源(0.子设备,1.网关设备,2.直连设备)
&emsp;&emsp;deviceDataSourceWay|Integer|数据获取方式(0.主动上报,1.被动拉取)
&emsp;&emsp;lon|String|经度
&emsp;&emsp;lati|String|经度
&emsp;&emsp;deviceInBuilding|Integer|所属楼栋
&emsp;&emsp;deviceInFloor|Integer|所属楼层
&emsp;&emsp;defectsLiabilityPeriod|Date|保修期至
&emsp;&emsp;leadingOfficial|String|负责人
&emsp;&emsp;leadingOfficialTelephone|String|联系电话
&emsp;&emsp;isReceiveMess|Integer|是否接收异常短(0.否,1.是)
&emsp;&emsp;devicePhotoPath|String|设备图片
&emsp;&emsp;ip|String|设备访问ip
&emsp;&emsp;centernum|String|中心设备编码
&emsp;&emsp;port|String|端口
&emsp;&emsp;deviceTopic|String|设备topic信息
&emsp;&emsp;deviceStatus|Integer|设备状态 (0.未激活,1.离线,2.在线)
&emsp;&emsp;enabled|Integer|启用状态 (0.停止,1.启用)
&emsp;&emsp;deviceAuthCode|String|设备授权码
&emsp;&emsp;deviceRemark|String|备注
&emsp;&emsp;onlineTime|Date|最近上线时间
&emsp;&emsp;offlineTime|Date|最近离线时间
&emsp;&emsp;deleted|Integer|是否删除(0.否,1.是)
&emsp;&emsp;source|Integer|设备来源(0.旧设备,1.新设备)
&emsp;&emsp;createUserId|Long|创建用户
&emsp;&emsp;createTime|Date|创建时间
&emsp;&emsp;updateUserId|Long|更新用户
&emsp;&emsp;updateTime|Date|更新时间
&emsp;&emsp;deviceSN|String|设备SN码
&emsp;&emsp;deviceVersion|String|设备版本
&emsp;&emsp;productCode|String|产品编码
&emsp;&emsp;hallId|Long|大厅Id
&emsp;&emsp;hallName|String|大厅名称
&emsp;&emsp;showSms|Integer|是否显示短信(0.否,1.是)
&emsp;&emsp;showPrint|Integer|是否显示打印机(0.否,1.是)
&emsp;&emsp;showWechatQrCode|Integer|是否显示小程序二维码(0.否,1.是)
**响应消息样例:**
```
{
"code":1,
"data":{
}
}
```
### 查看设备
**请求URL:** m/device/info
**请求方式:** GET
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看设备,返回实例详细信息
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
id|Long|是|ID
**请求样例:**
```
http://localhost/device/info?id=549
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|object|数据对象
&emsp;id|Long|主键ID,主键,自增长
&emsp;deviceName|String|设备名称
&emsp;deviceCode|String|设备编码,SN码等,默认为MAC地址
&emsp;deviceMac|String|设备的MAC地址
&emsp;siteId|Long|站点Id,来源基础服务平台
&emsp;siteCode|String|站点编号,来源基础服务平台
&emsp;siteName|String|站点名称
&emsp;platformId|Long|平台系统Id
&emsp;platformName|String|平台系统名称
&emsp;productId|Long|产品Id
&emsp;productName|String|产品名称
&emsp;skinId|Long|皮肤id
&emsp;skinName|String|皮肤名称
&emsp;homeUrl|String|首页地址
&emsp;deviceFirmId|Long|设备生产厂商ID
&emsp;deviceFirmname|String|设备生产厂商名称
&emsp;deviceSrc|Integer|设备来源(0.子设备,1.网关设备,2.直连设备)
&emsp;deviceDataSourceWay|Integer|数据获取方式(0.主动上报,1.被动拉取)
&emsp;lon|String|经度
&emsp;lati|String|经度
&emsp;deviceInBuilding|Integer|所属楼栋
&emsp;deviceInFloor|Integer|所属楼层
&emsp;defectsLiabilityPeriod|Date|保修期至
&emsp;leadingOfficial|String|负责人
&emsp;leadingOfficialTelephone|String|联系电话
&emsp;isReceiveMess|Integer|是否接收异常短(0.否,1.是)
&emsp;devicePhotoPath|String|设备图片
&emsp;ip|String|设备访问ip
&emsp;centernum|String|中心设备编码
&emsp;port|String|端口
&emsp;deviceTopic|String|设备topic信息
&emsp;deviceStatus|Integer|设备状态 (0.未激活,1.离线,2.在线)
&emsp;enabled|Integer|启用状态 (0.停止,1.启用)
&emsp;deviceAuthCode|String|设备授权码
&emsp;deviceRemark|String|备注
&emsp;onlineTime|Date|最近上线时间
&emsp;offlineTime|Date|最近离线时间
&emsp;deleted|Integer|是否删除(0.否,1.是)
&emsp;source|Integer|设备来源(0.旧设备,1.新设备)
&emsp;createUserId|Long|创建用户
&emsp;createTime|Date|创建时间
&emsp;updateUserId|Long|更新用户
&emsp;updateTime|Date|更新时间
&emsp;deviceSN|String|设备SN码
&emsp;deviceVersion|String|设备版本
&emsp;productCode|String|产品编码
&emsp;hallId|Long|大厅Id
&emsp;hallName|String|大厅名称
&emsp;showSms|Integer|是否显示短信(0.否,1.是)
&emsp;showPrint|Integer|是否显示打印机(0.否,1.是)
&emsp;showWechatQrCode|Integer|是否显示小程序二维码(0.否,1.是)
**响应消息样例:**
```
{
"code": 1,
"data": {
"id":7358,
"deviceName":"erph19",
"deviceCode":"ntgta3",
"deviceMac":"znt3id",
"siteId":9517,
"siteCode":"4559rn",
"siteName":"7ao5ir",
"platformId":2690,
"platformName":"munkr2",
"productId":4970,
"productName":"s74o2p",
"skinId":3594,
"skinName":"mfzk6x",
"homeUrl":"smt540",
"deviceFirmId":4500,
"deviceFirmname":"gu43rw",
"deviceSrc":4826,
"deviceDataSourceWay":1120,
"lon":"yrgkye",
"lati":"qoexqr",
"deviceInBuilding":7864,
"deviceInFloor":5044,
"defectsLiabilityPeriod":"2023-05-11",
"leadingOfficial":"2rde5a",
"leadingOfficialTelephone":"myuu2u",
"isReceiveMess":3164,
"devicePhotoPath":"0tys3c",
"ip":"3gzlpg",
"centernum":"kdxfpx",
"port":"immaf4",
"deviceTopic":"kum049",
"deviceStatus":4767,
"enabled":6533,
"deviceAuthCode":"ynopdq",
"deviceRemark":"l6ak87",
"onlineTime":"2023-05-11",
"offlineTime":"2023-05-11",
"deleted":8884,
"source":4089,
"createUserId":1410,
"createTime":"2023-05-11",
"updateUserId":846,
"updateTime":"2023-05-11",
"deviceSN":"jsbvj4",
"deviceVersion":"9mgt52",
"productCode":"iah2ld",
"hallId":6781,
"hallName":"gfi3zw",
"showSms":1994,
"showPrint":2841,
"showWechatQrCode":9531
}
}
```
## 设备终端接口服务 ## 设备终端接口服务
### 服务端地址获取 ### 服务端地址获取
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment