Commit 668ed6e7 authored by 赵啸非's avatar 赵啸非

添加分辨率字典获取

parent 4ec84e3e
...@@ -135,4 +135,9 @@ public class DeviceReq implements Serializable { ...@@ -135,4 +135,9 @@ public class DeviceReq implements Serializable {
*/ */
private String deviceVersion; private String deviceVersion;
/**
* 设备分辨率
*/
private String resolution;
} }
...@@ -11,8 +11,11 @@ import org.springframework.stereotype.Component; ...@@ -11,8 +11,11 @@ import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 系统基础皮肤 Feign接口 * 系统基础皮肤 Feign接口
*
* @author zxfei * @author zxfei
* @date 2022-08-01 * @date 2022-08-01
*/ */
...@@ -46,7 +49,7 @@ public interface ISkinBaseFeign extends IFeign { ...@@ -46,7 +49,7 @@ public interface ISkinBaseFeign extends IFeign {
* @return * @return
*/ */
@GetMapping(value = "/skin/base/delete") @GetMapping(value = "/skin/base/delete")
Rest<Void> delete(Long[] ids,@RequestHeader("Authorization") String authorization); Rest<Void> delete(Long[] ids, @RequestHeader("Authorization") String authorization);
/** /**
...@@ -56,9 +59,18 @@ public interface ISkinBaseFeign extends IFeign { ...@@ -56,9 +59,18 @@ public interface ISkinBaseFeign extends IFeign {
* @return * @return
*/ */
@PostMapping(value = "/skin/base/save") @PostMapping(value = "/skin/base/save")
Rest<RespData<SkinBasePdu>> save(@RequestBody SkinBasePdu skinBasePdu,@RequestHeader("Authorization") String authorization); Rest<RespData<SkinBasePdu>> save(@RequestBody SkinBasePdu skinBasePdu, @RequestHeader("Authorization") String authorization);
/**
* 获取字典
*
* @param
* @return
*/
@GetMapping(value = "/param/dict")
Rest<Map<String, String>> dict(@RequestParam(value = "first") String first, @RequestParam(value = "second") String second);
} }
...@@ -70,12 +82,12 @@ class SkinBaseFeignFallbackFactory implements FallbackFactory<ISkinBaseFeign> { ...@@ -70,12 +82,12 @@ class SkinBaseFeignFallbackFactory implements FallbackFactory<ISkinBaseFeign> {
return new ISkinBaseFeign() { return new ISkinBaseFeign() {
@Override @Override
public Rest<RespData<List<SkinBasePdu>>> list(SkinBasePdu skinBasePdu) { public Rest<RespData<List<SkinBasePdu>>> list(SkinBasePdu skinBasePdu) {
return Rest.fail("暂时无法获取系统基础皮肤列表,请稍后再试!"); return Rest.fail("暂时无法获取系统基础皮肤列表,请稍后再试!");
} }
@Override @Override
public Rest<SkinBasePdu> info(Long id) { public Rest<SkinBasePdu> info(Long id) {
return Rest.fail("暂时无法获取系统基础皮肤详细,请稍后再试!"); return Rest.fail("暂时无法获取系统基础皮肤详细,请稍后再试!");
} }
@Override @Override
...@@ -87,6 +99,11 @@ class SkinBaseFeignFallbackFactory implements FallbackFactory<ISkinBaseFeign> { ...@@ -87,6 +99,11 @@ class SkinBaseFeignFallbackFactory implements FallbackFactory<ISkinBaseFeign> {
public Rest<RespData<SkinBasePdu>> save(SkinBasePdu skinBasePdu, String authorization) { public Rest<RespData<SkinBasePdu>> save(SkinBasePdu skinBasePdu, String authorization) {
return Rest.fail("暂时无法保存系统基础皮肤,请稍后再试!"); return Rest.fail("暂时无法保存系统基础皮肤,请稍后再试!");
} }
@Override
public Rest<Map<String, String>> dict(String first, String second) {
return Rest.fail("暂时无法获取字典参数,请稍后再试!");
}
}; };
} }
} }
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" /> <meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>sbgl.ico" /> <link rel="icon" href="<%= BASE_URL %>sbgl.ico" />
<title></title> <title>设备管理系统</title>
<link <!-- <link
rel="stylesheet" rel="stylesheet"
href="https://unpkg.zhimg.com/element-ui@2.15.5/lib/theme-chalk/index.css" href="https://unpkg.zhimg.com/element-ui@2.15.5/lib/theme-chalk/index.css"
/> />-->
<style> <style>
@font-face { @font-face {
font-family: "PangMenZhengDao"; font-family: "PangMenZhengDao";
...@@ -26,10 +26,10 @@ ...@@ -26,10 +26,10 @@
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
<script src="https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js"></script> <!-- <script src="https://unpkg.zhimg.com/vue@2.6.14/dist/vue.runtime.min.js"></script>
<script src="https://unpkg.zhimg.com/vuex@3.6.0/dist/vuex.min.js"></script> <script src="https://unpkg.zhimg.com/vuex@3.6.0/dist/vuex.min.js"></script>
<script src="https://unpkg.zhimg.com/vue-router@3.4.9/dist/vue-router.min.js"></script> <script src="https://unpkg.zhimg.com/vue-router@3.4.9/dist/vue-router.min.js"></script>
<script src="https://unpkg.zhimg.com/element-ui@2.15.5/lib/index.js"></script> <script src="https://unpkg.zhimg.com/element-ui@2.15.5/lib/index.js"></script>
<script src="https://unpkg.zhimg.com/vue-amap/dist/index.js"></script> <script src="https://unpkg.zhimg.com/vue-amap/dist/index.js"></script>-->
</body> </body>
</html> </html>
...@@ -9,7 +9,7 @@ NProgress.configure({ showSpinner: false }); ...@@ -9,7 +9,7 @@ NProgress.configure({ showSpinner: false });
Vue.use(Router); Vue.use(Router);
const originalPush = VueRouter.prototype.push; const originalPush = Router.prototype.push;
VueRouter.prototype.push = function push(location, onResolve, onReject) { VueRouter.prototype.push = function push(location, onResolve, onReject) {
if (onResolve || onReject) if (onResolve || onReject)
return originalPush.call(this, location, onResolve, onReject); return originalPush.call(this, location, onResolve, onReject);
......
...@@ -152,6 +152,15 @@ ...@@ -152,6 +152,15 @@
placeholder="请选择启用状态 " placeholder="请选择启用状态 "
/> />
<Field
label="设备分辨率"
prop="resolution"
v-model="form.resolution"
type="select"
:enumData="dict.resolution"
placeholder="请选择设备分辨率"
/>
<Field <Field
label="显示短信" label="显示短信"
prop="showSms" prop="showSms"
......
module.exports = { module.exports = {
productionSourceMap: false, productionSourceMap: false,
assetsDir: "s", assetsDir: "s",
configureWebpack: {
externals: {
vue: "Vue",
vuex: "Vuex",
"vue-router": "VueRouter",
"element-ui": "ELEMENT",
},
},
lintOnSave: false, lintOnSave: false,
devServer: { devServer: {
inline: true, inline: true,
......
...@@ -76,5 +76,8 @@ ALTER TABLE mortals_xhx_role_user ADD COLUMN `createTime` datetime(0) NULL DEFA ...@@ -76,5 +76,8 @@ ALTER TABLE mortals_xhx_role_user ADD COLUMN `createTime` datetime(0) NULL DEFA
ALTER TABLE mortals_xhx_idgenerator ADD COLUMN `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间'; ALTER TABLE mortals_xhx_idgenerator ADD COLUMN `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间';
-- ----------------------------
2024-02-28
-- ----------------------------
ALTER TABLE mortals_xhx_device ADD COLUMN `resolution` varchar(64) DEFAULT '' COMMENT '设备分辨率' AFTER deviceInFloor;
...@@ -682,7 +682,6 @@ public class DeviceApiController { ...@@ -682,7 +682,6 @@ public class DeviceApiController {
});*/ });*/
/* DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService, messageProducer); /* DownMsgTask downMsgTask = new DownMsgTask(list, platformService, productService, deviceService, deviceLogService, messageProducer);
sendTaskThreadPool.execute(downMsgTask);*/ sendTaskThreadPool.execute(downMsgTask);*/
deviceService.downMsg(list); deviceService.downMsg(list);
} catch (AppException e) { } catch (AppException e) {
...@@ -895,6 +894,9 @@ public class DeviceApiController { ...@@ -895,6 +894,9 @@ public class DeviceApiController {
deviceEntity.setCreateUserId(1L); deviceEntity.setCreateUserId(1L);
deviceEntity.setCreateTime(new Date()); deviceEntity.setCreateTime(new Date());
deviceEntity.setSwitchSend(false); deviceEntity.setSwitchSend(false);
if(!ObjectUtils.isEmpty(req.getResolution())){
deviceEntity.setResolution(req.getResolution());
}
deviceService.save(deviceEntity); deviceService.save(deviceEntity);
} }
...@@ -939,9 +941,10 @@ public class DeviceApiController { ...@@ -939,9 +941,10 @@ public class DeviceApiController {
deviceEntity.setLeadingOfficial(req.getLeadingOfficial()); deviceEntity.setLeadingOfficial(req.getLeadingOfficial());
deviceEntity.setDeviceInFloor(req.getDeviceInFloor()); deviceEntity.setDeviceInFloor(req.getDeviceInFloor());
deviceEntity.setDeviceInBuilding(req.getDeviceInBuilding()); deviceEntity.setDeviceInBuilding(req.getDeviceInBuilding());
if(!ObjectUtils.isEmpty(req.getResolution())){
deviceEntity.setResolution(req.getResolution());
}
deviceService.update(deviceEntity); deviceService.update(deviceEntity);
} }
private void deviceDel(DeviceReq req) throws AppException { private void deviceDel(DeviceReq req) throws AppException {
......
...@@ -9,7 +9,7 @@ import java.util.Date; ...@@ -9,7 +9,7 @@ import java.util.Date;
* 设备实体对象 * 设备实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-11 * @date 2024-02-28
*/ */
@Data @Data
public class DeviceEntity extends DeviceVo { public class DeviceEntity extends DeviceVo {
...@@ -23,7 +23,7 @@ public class DeviceEntity extends DeviceVo { ...@@ -23,7 +23,7 @@ public class DeviceEntity extends DeviceVo {
/** /**
* 设备编码,SN码等,默认为MAC地址 * 设备编码,SN码等,默认为MAC地址
*/ */
@Excel(name = "设备编码") @Excel(name = "设备编码,SN码等,默认为MAC地址")
private String deviceCode; private String deviceCode;
/** /**
* 设备的MAC地址 * 设备的MAC地址
...@@ -128,6 +128,7 @@ public class DeviceEntity extends DeviceVo { ...@@ -128,6 +128,7 @@ public class DeviceEntity extends DeviceVo {
/** /**
* 设备图片 * 设备图片
*/ */
@Excel(name = "设备图片")
private String devicePhotoPath; private String devicePhotoPath;
/** /**
* 设备访问ip * 设备访问ip
...@@ -181,6 +182,7 @@ public class DeviceEntity extends DeviceVo { ...@@ -181,6 +182,7 @@ public class DeviceEntity extends DeviceVo {
/** /**
* 设备SN码 * 设备SN码
*/ */
@Excel(name = "设备SN码")
private String deviceSN; private String deviceSN;
/** /**
* 设备版本 * 设备版本
...@@ -189,7 +191,6 @@ public class DeviceEntity extends DeviceVo { ...@@ -189,7 +191,6 @@ public class DeviceEntity extends DeviceVo {
/** /**
* 产品编码 * 产品编码
*/ */
@Excel(name = "产品类型")
private String productCode; private String productCode;
/** /**
* 大厅Id * 大厅Id
...@@ -212,12 +213,14 @@ public class DeviceEntity extends DeviceVo { ...@@ -212,12 +213,14 @@ public class DeviceEntity extends DeviceVo {
* 是否显示小程序二维码(0.否,1.是) * 是否显示小程序二维码(0.否,1.是)
*/ */
private Integer showWechatQrCode; private Integer showWechatQrCode;
/** /**
* 所属机构 * 所属机构
*/ */
private String orgName; private String orgName;
/**
* 设备分辨率
*/
private String resolution;
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -235,99 +238,53 @@ public class DeviceEntity extends DeviceVo { ...@@ -235,99 +238,53 @@ public class DeviceEntity extends DeviceVo {
} }
public void initAttrValue(){ public void initAttrValue(){
this.deviceName = ""; this.deviceName = "";
this.deviceCode = ""; this.deviceCode = "";
this.deviceMac = ""; this.deviceMac = "";
this.siteId = null;
this.siteId = 0L;
this.siteCode = ""; this.siteCode = "";
this.siteName = ""; this.siteName = "";
this.platformId = null;
this.platformId = 0L;
this.platformName = ""; this.platformName = "";
this.productId = null;
this.productId = 0L;
this.productName = ""; this.productName = "";
this.skinId = null;
this.skinId = 0L;
this.skinName = ""; this.skinName = "";
this.homeUrl = ""; this.homeUrl = "";
this.deviceFirmId = null;
this.deviceFirmId = 0L;
this.deviceFirmname = ""; this.deviceFirmname = "";
this.deviceSrc = 2; this.deviceSrc = 2;
this.deviceDataSourceWay = 0; this.deviceDataSourceWay = 0;
this.lon = ""; this.lon = "";
this.lati = ""; this.lati = "";
this.deviceInBuilding = 0;
this.deviceInBuilding = 1; this.deviceInFloor = 0;
this.defectsLiabilityPeriod = new Date();
this.deviceInFloor = 1;
this.defectsLiabilityPeriod = null;
this.leadingOfficial = ""; this.leadingOfficial = "";
this.leadingOfficialTelephone = ""; this.leadingOfficialTelephone = "";
this.isReceiveMess = 0; this.isReceiveMess = 0;
this.devicePhotoPath = ""; this.devicePhotoPath = "";
this.ip = ""; this.ip = "";
this.centernum = ""; this.centernum = "";
this.port = ""; this.port = "";
this.deviceTopic = ""; this.deviceTopic = "";
this.deviceStatus = 0; this.deviceStatus = 0;
this.enabled = 0; this.enabled = 0;
this.deviceAuthCode = ""; this.deviceAuthCode = "";
this.deviceRemark = ""; this.deviceRemark = "";
this.onlineTime = new Date();
this.onlineTime = null; this.offlineTime = new Date();
this.offlineTime = null;
this.deleted = 0; this.deleted = 0;
this.source = 1; this.source = 1;
this.deviceSN = ""; this.deviceSN = "";
this.deviceVersion = ""; this.deviceVersion = "";
this.productCode = ""; this.productCode = "";
this.hallId = null;
this.hallId = 0L;
this.hallName = ""; this.hallName = "";
this.showSms = 1; this.showSms = 1;
this.showPrint = 1; this.showPrint = 1;
this.showWechatQrCode = 1; this.showWechatQrCode = 1;
this.orgName = "";
this.orgName=""; this.resolution = "";
} }
} }
\ 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-07-13 * @date 2024-02-28
*/ */
public class DeviceQuery extends DeviceEntity { public class DeviceQuery extends DeviceEntity {
/** 开始 主键ID,主键,自增长 */ /** 开始 主键ID,主键,自增长 */
...@@ -485,6 +485,11 @@ public class DeviceQuery extends DeviceEntity { ...@@ -485,6 +485,11 @@ public class DeviceQuery extends DeviceEntity {
/** 所属机构排除列表 */ /** 所属机构排除列表 */
private List <String> orgNameNotList; private List <String> orgNameNotList;
/** 设备分辨率 */
private List<String> resolutionList;
/** 设备分辨率排除列表 */
private List <String> resolutionNotList;
/** 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;
...@@ -3186,6 +3191,38 @@ public class DeviceQuery extends DeviceEntity { ...@@ -3186,6 +3191,38 @@ public class DeviceQuery extends DeviceEntity {
this.orgNameNotList = orgNameNotList; this.orgNameNotList = orgNameNotList;
} }
/**
* 获取 设备分辨率
* @return resolutionList
*/
public List<String> getResolutionList(){
return this.resolutionList;
}
/**
* 设置 设备分辨率
* @param resolutionList
*/
public void setResolutionList(List<String> resolutionList){
this.resolutionList = resolutionList;
}
/**
* 获取 设备分辨率
* @return resolutionNotList
*/
public List<String> getResolutionNotList(){
return this.resolutionNotList;
}
/**
* 设置 设备分辨率
* @param resolutionNotList
*/
public void setResolutionNotList(List<String> resolutionNotList){
this.resolutionNotList = resolutionNotList;
}
/** /**
* 设置 主键ID,主键,自增长 * 设置 主键ID,主键,自增长
* @param id * @param id
...@@ -4819,6 +4856,25 @@ public class DeviceQuery extends DeviceEntity { ...@@ -4819,6 +4856,25 @@ public class DeviceQuery extends DeviceEntity {
return this; return this;
} }
/**
* 设置 设备分辨率
* @param resolution
*/
public DeviceQuery resolution(String resolution){
setResolution(resolution);
return this;
}
/**
* 设置 设备分辨率
* @param resolutionList
*/
public DeviceQuery resolutionList(List<String> resolutionList){
this.resolutionList = resolutionList;
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
......
...@@ -79,6 +79,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe ...@@ -79,6 +79,7 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
public ISiteHallFeign siteHallFeign; public ISiteHallFeign siteHallFeign;
public DeviceController() { public DeviceController() {
super.setModuleDesc("设备"); super.setModuleDesc("设备");
} }
...@@ -108,6 +109,12 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe ...@@ -108,6 +109,12 @@ public class DeviceController extends BaseCRUDJsonBodyMappingController<DeviceSe
this.addDict(model, "skinProductCodeMap", skinProductCodeMap); this.addDict(model, "skinProductCodeMap", skinProductCodeMap);
} }
} }
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);) //siteHallFeign.list(new SiteHallPdu().setSiteId(context.g);)
super.init(model, context); super.init(model, context);
} }
......
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