Commit fcd137e2 authored by 赵啸非's avatar 赵啸非

添加分辨率字典获取

parent 668ed6e7
......@@ -10,7 +10,7 @@ NProgress.configure({ showSpinner: false });
Vue.use(Router);
const originalPush = Router.prototype.push;
VueRouter.prototype.push = function push(location, onResolve, onReject) {
Router.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject)
return originalPush.call(this, location, onResolve, onReject);
return originalPush.call(this, location).catch((err) => err);
......
......@@ -275,6 +275,10 @@ export default {
},
methods: {
beforeSubmit(form) {
form.resolutionValue=this.dict.resolution[form.resolution]
return form;
},
changeProduct(val) {
this.form.productCode = this.dict.productCode[val];
},
......
......@@ -81,3 +81,4 @@ ALTER TABLE mortals_xhx_idgenerator ADD COLUMN `createTime` datetime(0) NULL DE
-- ----------------------------
ALTER TABLE mortals_xhx_device ADD COLUMN `resolution` varchar(64) DEFAULT '' COMMENT '设备分辨率' AFTER deviceInFloor;
ALTER TABLE mortals_xhx_device ADD COLUMN `resolutionValue` varchar(64) DEFAULT '' COMMENT '设备分辨率' AFTER resolution;
......@@ -221,6 +221,10 @@ public class DeviceEntity extends DeviceVo {
* 设备分辨率
*/
private String resolution;
/**
* 设备分辨率值
*/
private String resolutionValue;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -286,5 +290,6 @@ public class DeviceEntity extends DeviceVo {
this.showWechatQrCode = 1;
this.orgName = "";
this.resolution = "";
this.resolutionValue = "";
}
}
\ No newline at end of file
package com.mortals.xhx.module.device.model;
import java.util.Date;
import java.util.List;
import com.mortals.xhx.module.device.model.DeviceEntity;
/**
* 设备查询对象
*
......@@ -490,6 +488,11 @@ public class DeviceQuery extends DeviceEntity {
/** 设备分辨率排除列表 */
private List <String> resolutionNotList;
/** 设备分辨率值 */
private List<String> resolutionValueList;
/** 设备分辨率值排除列表 */
private List <String> resolutionValueNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<DeviceQuery> orConditionList;
......@@ -3223,6 +3226,38 @@ public class DeviceQuery extends DeviceEntity {
this.resolutionNotList = resolutionNotList;
}
/**
* 获取 设备分辨率值
* @return resolutionValueList
*/
public List<String> getResolutionValueList(){
return this.resolutionValueList;
}
/**
* 设置 设备分辨率值
* @param resolutionValueList
*/
public void setResolutionValueList(List<String> resolutionValueList){
this.resolutionValueList = resolutionValueList;
}
/**
* 获取 设备分辨率值
* @return resolutionValueNotList
*/
public List<String> getResolutionValueNotList(){
return this.resolutionValueNotList;
}
/**
* 设置 设备分辨率值
* @param resolutionValueNotList
*/
public void setResolutionValueNotList(List<String> resolutionValueNotList){
this.resolutionValueNotList = resolutionValueNotList;
}
/**
* 设置 主键ID,主键,自增长
* @param id
......@@ -4875,6 +4910,25 @@ public class DeviceQuery extends DeviceEntity {
return this;
}
/**
* 设置 设备分辨率值
* @param resolutionValue
*/
public DeviceQuery resolutionValue(String resolutionValue){
setResolutionValue(resolutionValue);
return this;
}
/**
* 设置 设备分辨率值
* @param resolutionValueList
*/
public DeviceQuery resolutionValueList(List<String> resolutionValueList){
this.resolutionValueList = resolutionValueList;
return this;
}
/**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList
......
......@@ -113,6 +113,9 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
Rest<Map<String, String>> restDict = skinBaseFeign.dict("SkinBase", "imageResolution");
if (restDict.getCode() == YesNoEnum.YES.getValue()) {
Map<String, String> dict = restDict.getData();
this.addDict(model, "resolution", dict);
}
//siteHallFeign.list(new SiteHallPdu().setSiteId(context.g);)
......
......@@ -58,6 +58,7 @@
<result property="showWechatQrCode" column="showWechatQrCode" />
<result property="orgName" column="orgName" />
<result property="resolution" column="resolution" />
<result property="resolutionValue" column="resolutionValue" />
</resultMap>
......@@ -224,23 +225,26 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('resolution') or colPickMode == 1 and data.containsKey('resolution')))">
a.resolution,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('resolutionValue') or colPickMode == 1 and data.containsKey('resolutionValue')))">
a.resolutionValue,
</if>
</trim>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="DeviceEntity" useGeneratedKeys="true" keyProperty="id">
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,showSms,showPrint,showWechatQrCode,orgName,resolution)
(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,orgName,resolution,resolutionValue)
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},#{showSms},#{showPrint},#{showWechatQrCode},#{orgName},#{resolution})
(#{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},#{orgName},#{resolution},#{resolutionValue})
</insert>
<!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto">
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,showSms,showPrint,showWechatQrCode,orgName,resolution)
(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,orgName,resolution,resolutionValue)
VALUES
<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.showSms},#{item.showPrint},#{item.showWechatQrCode},#{item.orgName},#{item.resolution})
(#{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},#{item.orgName},#{item.resolution},#{item.resolutionValue})
</foreach>
</insert>
......@@ -466,6 +470,9 @@
<if test="(colPickMode==0 and data.containsKey('resolution')) or (colPickMode==1 and !data.containsKey('resolution'))">
a.resolution=#{data.resolution},
</if>
<if test="(colPickMode==0 and data.containsKey('resolutionValue')) or (colPickMode==1 and !data.containsKey('resolutionValue'))">
a.resolutionValue=#{data.resolutionValue},
</if>
</trim>
<trim suffixOverrides="where" suffix="">
where
......@@ -942,6 +949,13 @@
</if>
</foreach>
</trim>
<trim prefix="resolutionValue=(case" suffix="ELSE resolutionValue end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('resolutionValue')) or (colPickMode==1 and !item.containsKey('resolutionValue'))">
when a.id=#{item.id} then #{item.resolutionValue}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -2267,6 +2281,27 @@
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('resolutionValue')">
<if test="conditionParamRef.resolutionValue != null and conditionParamRef.resolutionValue != ''">
${_conditionType_} a.resolutionValue like #{${_conditionParam_}.resolutionValue}
</if>
<if test="conditionParamRef.resolutionValue == null">
${_conditionType_} a.resolutionValue is null
</if>
</if>
<if test="conditionParamRef.containsKey('resolutionValueList') and conditionParamRef.resolutionValueList.size() > 0">
${_conditionType_} a.resolutionValue in
<foreach collection="conditionParamRef.resolutionValueList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('resolutionValueNotList') and conditionParamRef.resolutionValueNotList.size() > 0">
${_conditionType_} a.resolutionValue not in
<foreach collection="conditionParamRef.resolutionValueNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql>
<sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -2839,6 +2874,11 @@
<if test='orderCol.resolution != null and "DESC".equalsIgnoreCase(orderCol.resolution)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('resolutionValue')">
a.resolutionValue
<if test='orderCol.resolutionValue != null and "DESC".equalsIgnoreCase(orderCol.resolutionValue)'>DESC</if>
,
</if>
</trim>
</if>
......
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