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

添加分辨率字典获取

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