联动控制箱解析\报警器修复\设备安装记录\设备浓度列表\部门\角色等权限修复\pdf下载
parent
5c9559de51
commit
24971d96a4
@ -0,0 +1,75 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.model.device;
|
||||
|
||||
|
||||
import cc.iotkit.model.Owned;
|
||||
import cc.iotkit.model.TenantModel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
|
||||
import lombok.*;
|
||||
import org.hibernate.annotations.Filter;
|
||||
import org.hibernate.annotations.FilterDef;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.ParamDef;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeviceDetectorInfo extends TenantModel implements Owned<String>,Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
private String deviceId;
|
||||
|
||||
private String productKey;
|
||||
|
||||
private String deviceName;
|
||||
|
||||
private String uid;
|
||||
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
private Long createAt;
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
|
||||
private Long tenantId;
|
||||
|
||||
private String node;
|
||||
private String gasTypeKey;
|
||||
private String dataDetectorValue;
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.model.device;
|
||||
|
||||
|
||||
import cc.iotkit.model.Owned;
|
||||
import cc.iotkit.model.TenantModel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeviceInstallInfo extends TenantModel implements Owned<String>,Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String id;
|
||||
|
||||
// @ApiModelProperty(value = "设备名称(报警器编号)")
|
||||
private String deviceName;
|
||||
// @ApiModelProperty(value = "公司名称")
|
||||
private String corporateName;
|
||||
// @ApiModelProperty(value = "申请时间")
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
private Date proposerTime;
|
||||
// @ApiModelProperty(value = "申请人")
|
||||
private String proposer;
|
||||
// @ApiModelProperty(value = "申请班组")
|
||||
private String proposerTeam;
|
||||
// @ApiModelProperty(value = "小区名称")
|
||||
private String communityName;
|
||||
// @ApiModelProperty(value = "用户名称")
|
||||
private String userName;
|
||||
// @ApiModelProperty(value = "用户电话")
|
||||
private String userIpone;
|
||||
// @ApiModelProperty(value = "楼栋单元号")
|
||||
private String buildingUnit;
|
||||
// @ApiModelProperty(value = "房间号")
|
||||
private String roomNo;
|
||||
// @ApiModelProperty(value = "切断阀编号")
|
||||
private String shutValueNumber;
|
||||
// @ApiModelProperty(value = "燃气表号")
|
||||
private String gasMeterNumber;
|
||||
// @ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
// @ApiModelProperty(value = "安装前图片")
|
||||
private String beforeInstallationImage;
|
||||
// @ApiModelProperty(value = "装完成探测器工作图片")
|
||||
private String workingOfTheDetectorImage;
|
||||
// @ApiModelProperty(value = "测漏图片")
|
||||
private String sideLeakageImage;
|
||||
// @ApiModelProperty(value = "点火图片")
|
||||
private String ignitionPictureImage;
|
||||
// @ApiModelProperty(value = "装完成全景图片")
|
||||
private String installThePanoramicImage;
|
||||
// @ApiModelProperty(value = "燃气表图片")
|
||||
private String ofGasMeterImage;
|
||||
//@ApiModelProperty(value = "工单图片")
|
||||
private String workOrderImage;
|
||||
//@ApiModelProperty(value = "打孔图片")
|
||||
private String punchingImage;
|
||||
// @ApiModelProperty(value = "用户id")
|
||||
private String uid;
|
||||
// @ApiModelProperty(value = "租户编号")
|
||||
private Long tenantId;
|
||||
// @ApiModelProperty(value = "装电源线照片")
|
||||
private String fiexImage;
|
||||
private Integer state;
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package cc.iotkit.model.device;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class InstallationRecord {
|
||||
|
||||
private String teamName; // 班组名称
|
||||
private String installer; // 安装人
|
||||
private String community; // 小区名称
|
||||
private String buildingNo; // 楼栋号
|
||||
private String unitNo; // 单元号
|
||||
private String roomNo; // 房号
|
||||
private String userName; // 用户姓名
|
||||
private String userPhone; // 用户电话
|
||||
private String stoveType; // 灶具类型
|
||||
private String installDate; // 安装时间
|
||||
// 材料使用相关字段
|
||||
private int ballValve; // 球阀
|
||||
private int drilling; // 打孔
|
||||
private String pipeType; // 管子使用类型及尺寸
|
||||
private int nonFixedPipe; // 非定尺管
|
||||
private int nut; // 螺母
|
||||
private int quickConnect; // 插入式快接
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.model.stats;
|
||||
|
||||
import cc.iotkit.common.api.BaseDto;
|
||||
import cc.iotkit.model.system.SysDept;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 部门业务对象 sys_dept
|
||||
*
|
||||
* @author Michelle.Chung
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class SysDeptDto {
|
||||
|
||||
|
||||
/**
|
||||
* 部门与区域(默认0是部门,1是区域)
|
||||
*/
|
||||
private Integer areaType;
|
||||
private Long normalCount;
|
||||
private Long faultCount;
|
||||
private Long alarmCount;
|
||||
private Long onlineCount;
|
||||
private Long expireCount;
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
package cc.iotkit.data.manager;
|
||||
|
||||
import cc.iotkit.data.ICommonData;
|
||||
import cc.iotkit.data.IOwnedData;
|
||||
import cc.iotkit.model.device.DeviceDetectorInfo;
|
||||
import cc.iotkit.model.iccid.DIccidRecordDO;
|
||||
|
||||
|
||||
public interface IDeviceDetectorInfoData extends IOwnedData<DeviceDetectorInfo, String> {
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
package cc.iotkit.data.manager;
|
||||
|
||||
import cc.iotkit.data.IOwnedData;
|
||||
import cc.iotkit.model.device.DeviceDetectorInfo;
|
||||
import cc.iotkit.model.device.DeviceInstallInfo;
|
||||
|
||||
|
||||
public interface IDeviceInstallInfoData extends IOwnedData<DeviceInstallInfo, String> {
|
||||
|
||||
|
||||
DeviceInstallInfo findByDeviceNameAndUid(String deviceName,String uid);
|
||||
DeviceInstallInfo findByDeviceNameAndUidAndState(String deviceName,String uid,Integer state);
|
||||
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.data.dao;
|
||||
|
||||
import cc.iotkit.data.model.TbDeviceDetectorInfo;
|
||||
import cc.iotkit.data.model.TbDeviceInfo;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DeviceIDetectornfoRepository extends JpaRepository<TbDeviceDetectorInfo, String>, QuerydslPredicateExecutor<TbDeviceDetectorInfo> {
|
||||
|
||||
/*TbDeviceInfo findByDeviceId(String deviceId);
|
||||
|
||||
List<TbDeviceInfo> findByParentId(String parentId);
|
||||
|
||||
TbDeviceInfo findByDeviceName(String deviceName);
|
||||
long countByUid(String uid);
|
||||
long countByUidAndState(String uid,String state);*/
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.data.dao;
|
||||
|
||||
import cc.iotkit.data.model.TbDeviceDetectorInfo;
|
||||
import cc.iotkit.data.model.TbDeviceInfo;
|
||||
import cc.iotkit.data.model.TbDeviceInstallInfo;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
public interface DeviceInstallInfoRepository extends JpaRepository<TbDeviceInstallInfo, String>, QuerydslPredicateExecutor<TbDeviceInstallInfo> {
|
||||
|
||||
/*TbDeviceInfo findByDeviceId(String deviceId);
|
||||
|
||||
List<TbDeviceInfo> findByParentId(String parentId);
|
||||
|
||||
TbDeviceInfo findByDeviceName(String deviceName);
|
||||
long countByUid(String uid);
|
||||
long countByUidAndState(String uid,String state);*/
|
||||
TbDeviceInstallInfo findByDeviceNameAndUid(String deviceName,String uid);
|
||||
TbDeviceInstallInfo findByDeviceNameAndUidAndState(String deviceName,String uid,Integer state);
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.data.model;
|
||||
|
||||
import cc.iotkit.common.tenant.dao.TenantAware;
|
||||
import cc.iotkit.common.tenant.listener.TenantListener;
|
||||
import cc.iotkit.model.device.DeviceDetectorInfo;
|
||||
import cc.iotkit.model.device.DeviceInfo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.github.linpeilie.annotations.AutoMapping;
|
||||
import io.github.linpeilie.annotations.ReverseAutoMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Filter;
|
||||
import org.hibernate.annotations.FilterDef;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.ParamDef;
|
||||
|
||||
import javax.persistence.*;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name = "device_detector_info")
|
||||
@ApiModel(value = "设备浓度信息")
|
||||
@AutoMapper(target = DeviceDetectorInfo.class)
|
||||
@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "long")})
|
||||
@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
|
||||
@EntityListeners(TenantListener.class)
|
||||
public class TbDeviceDetectorInfo extends BaseEntity implements TenantAware {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "SnowflakeIdGenerator")
|
||||
@GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
|
||||
private String id;
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private String deviceId;
|
||||
@ApiModelProperty(value = "产品key")
|
||||
private String productKey;
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String deviceName;
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String uid;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Long createAt;
|
||||
/**
|
||||
* 租户编号
|
||||
*/
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private Long tenantId;
|
||||
|
||||
private String node;
|
||||
private String gasTypeKey;
|
||||
private String dataDetectorValue;
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.data.model;
|
||||
|
||||
import cc.iotkit.common.tenant.dao.TenantAware;
|
||||
import cc.iotkit.common.tenant.listener.TenantListener;
|
||||
import cc.iotkit.model.device.DeviceDetectorInfo;
|
||||
import cc.iotkit.model.device.DeviceInstallInfo;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.annotations.Filter;
|
||||
import org.hibernate.annotations.FilterDef;
|
||||
import org.hibernate.annotations.GenericGenerator;
|
||||
import org.hibernate.annotations.ParamDef;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@Entity
|
||||
@Table(name = "device_install_info")
|
||||
@ApiModel(value = "设备安装信息")
|
||||
@AutoMapper(target = DeviceInstallInfo.class)
|
||||
@FilterDef(name = "tenantFilter", parameters = {@ParamDef(name = "tenantId", type = "long")})
|
||||
@Filter(name = "tenantFilter", condition = "tenant_id = :tenantId")
|
||||
@EntityListeners(TenantListener.class)
|
||||
public class TbDeviceInstallInfo extends BaseEntity implements TenantAware {
|
||||
|
||||
@Id
|
||||
@GeneratedValue(generator = "SnowflakeIdGenerator")
|
||||
@GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
|
||||
private String id;
|
||||
|
||||
@ApiModelProperty(value = "设备名称(报警器编号)")
|
||||
private String deviceName;
|
||||
@ApiModelProperty(value = "公司名称")
|
||||
private String corporateName;
|
||||
@ApiModelProperty(value = "申请时间")
|
||||
private Date proposerTime;
|
||||
@ApiModelProperty(value = "申请人")
|
||||
private String proposer;
|
||||
@ApiModelProperty(value = "申请班组")
|
||||
private String proposerTeam;
|
||||
@ApiModelProperty(value = "小区名称")
|
||||
private String communityName;
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
private String userName;
|
||||
@ApiModelProperty(value = "用户电话")
|
||||
private String userIpone;
|
||||
@ApiModelProperty(value = "楼栋单元号")
|
||||
private String buildingUnit;
|
||||
@ApiModelProperty(value = "房间号")
|
||||
private String roomNo;
|
||||
@ApiModelProperty(value = "切断阀编号")
|
||||
private String shutValueNumber;
|
||||
@ApiModelProperty(value = "燃气表号")
|
||||
private String gasMeterNumber;
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
@ApiModelProperty(value = "安装前图片")
|
||||
private String beforeInstallationImage;
|
||||
@ApiModelProperty(value = "装完成探测器工作图片")
|
||||
private String workingOfTheDetectorImage;
|
||||
@ApiModelProperty(value = "测漏图片")
|
||||
private String sideLeakageImage;
|
||||
@ApiModelProperty(value = "点火图片")
|
||||
private String ignitionPictureImage;
|
||||
@ApiModelProperty(value = "装完成全景图片")
|
||||
private String installThePanoramicImage;
|
||||
@ApiModelProperty(value = "燃气表图片")
|
||||
private String ofGasMeterImage;
|
||||
@ApiModelProperty(value = "工单图片")
|
||||
private String workOrderImage;
|
||||
@ApiModelProperty(value = "打孔图片")
|
||||
private String punchingImage;
|
||||
@ApiModelProperty(value = "装电源线照片")
|
||||
private String fiexImage;
|
||||
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private String uid;
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private Long tenantId;
|
||||
@ApiModelProperty(value = "0绑定1解绑")
|
||||
private Integer state;
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.data.service;
|
||||
|
||||
import cc.iotkit.data.dao.DeviceIDetectornfoRepository;
|
||||
import cc.iotkit.data.dao.IJPACommData;
|
||||
import cc.iotkit.data.manager.IDeviceDetectorInfoData;
|
||||
import cc.iotkit.data.model.TbDeviceDetectorInfo;
|
||||
import cc.iotkit.model.device.DeviceDetectorInfo;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Primary
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DeviceDetectorInfoDataImpl implements IDeviceDetectorInfoData, IJPACommData<DeviceDetectorInfo,String> {
|
||||
|
||||
@Autowired
|
||||
private DeviceIDetectornfoRepository homeRepository;
|
||||
|
||||
private final JPAQueryFactory jpaQueryFactory;
|
||||
|
||||
@Override
|
||||
public JpaRepository getBaseRepository() {
|
||||
return homeRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getJpaRepositoryClass() {
|
||||
return TbDeviceDetectorInfo.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getTClass() {
|
||||
return DeviceDetectorInfo.class;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.data.service;
|
||||
|
||||
import cc.iotkit.common.utils.MapstructUtils;
|
||||
import cc.iotkit.data.dao.DeviceIDetectornfoRepository;
|
||||
import cc.iotkit.data.dao.DeviceInstallInfoRepository;
|
||||
import cc.iotkit.data.dao.IJPACommData;
|
||||
import cc.iotkit.data.manager.IDeviceDetectorInfoData;
|
||||
import cc.iotkit.data.manager.IDeviceInstallInfoData;
|
||||
import cc.iotkit.data.model.TbDeviceDetectorInfo;
|
||||
import cc.iotkit.data.model.TbDeviceInstallInfo;
|
||||
import cc.iotkit.model.device.DeviceConfig;
|
||||
import cc.iotkit.model.device.DeviceDetectorInfo;
|
||||
import cc.iotkit.model.device.DeviceInstallInfo;
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Primary
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
public class DeviceInstallInfoDataImpl implements IDeviceInstallInfoData, IJPACommData<DeviceInstallInfo,String> {
|
||||
|
||||
@Autowired
|
||||
private DeviceInstallInfoRepository homeRepository;
|
||||
|
||||
private final JPAQueryFactory jpaQueryFactory;
|
||||
|
||||
@Override
|
||||
public JpaRepository getBaseRepository() {
|
||||
return homeRepository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getJpaRepositoryClass() {
|
||||
return TbDeviceInstallInfo.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class getTClass() {
|
||||
return DeviceInstallInfo.class;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public DeviceInstallInfo findByDeviceNameAndUid(String deviceName,String uid) {
|
||||
return MapstructUtils.convert(homeRepository.findByDeviceNameAndUid(deviceName,uid), DeviceInstallInfo.class);
|
||||
// return homeRepository.findByDeviceName(deviceName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeviceInstallInfo findByDeviceNameAndUidAndState(String deviceName, String uid, Integer state) {
|
||||
return MapstructUtils.convert(homeRepository.findByDeviceNameAndUidAndState(deviceName,uid,state), DeviceInstallInfo.class);
|
||||
}
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package cc.iotkit.manager.config;
|
||||
|
||||
|
||||
import org.apache.pdfbox.pdmodel.PDPageContentStream;
|
||||
import org.apache.pdfbox.pdmodel.font.PDType0Font;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PDFUtils {
|
||||
// 计算文本居中位置(水平+垂直)
|
||||
public static float[] calculateCenterPosition(
|
||||
PDType0Font font,
|
||||
float fontSize,
|
||||
String text,
|
||||
float rectX, float rectY,
|
||||
float rectWidth, float rectHeight
|
||||
) {
|
||||
try {
|
||||
// 计算文本宽度
|
||||
float textWidth = font.getStringWidth(text) / 1000 * fontSize;
|
||||
|
||||
// 计算垂直偏移(考虑字体基线)
|
||||
float ascent = font.getFontDescriptor().getAscent() / 1000 * fontSize;
|
||||
float descent = font.getFontDescriptor().getDescent() / 1000 * fontSize;
|
||||
float textHeight = ascent - descent;
|
||||
|
||||
return new float[]{
|
||||
rectX + (rectWidth - textWidth) / 2, // 水平居中X
|
||||
rectY + (rectHeight + textHeight) / 2 - descent // 垂直居中Y
|
||||
};
|
||||
} catch (IOException e) {
|
||||
return new float[]{rectX, rectY};
|
||||
}
|
||||
}
|
||||
|
||||
// 绘制对齐文本(封装方法)
|
||||
public static void drawAlignedText(
|
||||
PDPageContentStream cs,
|
||||
PDType0Font font,
|
||||
float fontSize,
|
||||
String text,
|
||||
float x, float y,
|
||||
float width, float height
|
||||
) throws IOException {
|
||||
float[] pos = calculateCenterPosition(font, fontSize, text, x, y, width, height);
|
||||
cs.setFont(font, fontSize);
|
||||
cs.beginText();
|
||||
cs.newLineAtOffset(pos[0], pos[1]);
|
||||
cs.showText(text);
|
||||
cs.endText();
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
package cc.iotkit.manager.controller;
|
||||
|
||||
import cc.iotkit.common.api.PageRequest;
|
||||
import cc.iotkit.common.api.Paging;
|
||||
import cc.iotkit.common.api.Request;
|
||||
import cc.iotkit.common.api.Response;
|
||||
import cc.iotkit.common.excel.utils.ExcelUtil;
|
||||
import cc.iotkit.common.thing.ThingModelMessage;
|
||||
import cc.iotkit.common.validate.QueryGroup;
|
||||
import cc.iotkit.data.service.DeviceDetectorInfoDataImpl;
|
||||
import cc.iotkit.manager.dto.bo.device.*;
|
||||
import cc.iotkit.manager.dto.bo.deviceconfig.DeviceConfigAddBo;
|
||||
import cc.iotkit.manager.dto.bo.devicegroup.DeviceAddGroupBo;
|
||||
import cc.iotkit.manager.dto.bo.devicegroup.DeviceGroupBo;
|
||||
import cc.iotkit.manager.dto.bo.thingmodel.ThingModelMessageBo;
|
||||
import cc.iotkit.manager.dto.vo.deviceconfig.DeviceConfigVo;
|
||||
import cc.iotkit.manager.dto.vo.devicegroup.DeviceGroupImportVo;
|
||||
import cc.iotkit.manager.dto.vo.devicegroup.DeviceGroupVo;
|
||||
import cc.iotkit.manager.dto.vo.deviceinfo.DeviceInfoImportVo;
|
||||
import cc.iotkit.manager.dto.vo.deviceinfo.DeviceInfoVo;
|
||||
import cc.iotkit.manager.dto.vo.deviceinfo.ParentDeviceVo;
|
||||
import cc.iotkit.manager.dto.vo.thingmodel.ThingModelVo;
|
||||
import cc.iotkit.manager.service.DeviceCtrlService;
|
||||
import cc.iotkit.manager.service.IDeviceDetectorInfoService;
|
||||
import cc.iotkit.manager.service.IDeviceManagerService;
|
||||
import cc.iotkit.manager.service.IProductService;
|
||||
import cc.iotkit.model.InvokeResult;
|
||||
import cc.iotkit.model.device.DeviceConfig;
|
||||
import cc.iotkit.model.device.DeviceDetectorInfo;
|
||||
import cc.iotkit.model.device.DeviceGroup;
|
||||
import cc.iotkit.model.device.DeviceInfo;
|
||||
import cc.iotkit.model.device.message.DeviceProperty;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.context.request.async.DeferredResult;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static cc.iotkit.common.web.core.BaseController.fail;
|
||||
|
||||
@Api(tags = {"设备浓度变化"})
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/deviceDetector")
|
||||
public class DeviceDetectorController {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private IDeviceDetectorInfoService deviceServiceImpl;
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value = "浓度列表", notes = "设备列表", httpMethod = "POST")
|
||||
//@SaCheckPermission("iot:device:query")
|
||||
@PostMapping("/page")
|
||||
public Paging<DeviceDetectorInfo> getDevices(@Validated @RequestBody PageRequest<DeviceDetectorQueryBo> pageRequest) {
|
||||
return deviceServiceImpl.getPage(pageRequest);
|
||||
}
|
||||
@ApiOperation(value = "浓度列表", notes = "设备列表", httpMethod = "POST")
|
||||
//@SaCheckPermission("iot:device:query")
|
||||
@PostMapping("/list")
|
||||
public List<DeviceDetectorInfo> getDevices1(@Validated @RequestBody PageRequest<DeviceDetectorQueryBo> pageRequest) {
|
||||
return deviceServiceImpl.getList(pageRequest);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,458 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
package cc.iotkit.manager.controller;
|
||||
|
||||
import cc.iotkit.common.api.PageRequest;
|
||||
import cc.iotkit.common.api.Paging;
|
||||
import cc.iotkit.common.api.Request;
|
||||
import cc.iotkit.common.constant.Constants;
|
||||
import cc.iotkit.common.enums.ErrCode;
|
||||
import cc.iotkit.common.exception.BizException;
|
||||
import cc.iotkit.common.satoken.utils.LoginHelper;
|
||||
import cc.iotkit.common.tenant.helper.TenantHelper;
|
||||
import cc.iotkit.data.manager.IDeviceInstallInfoData;
|
||||
import cc.iotkit.manager.config.GasInstallationPDFGenerator;
|
||||
import cc.iotkit.manager.config.PDFGenerator;
|
||||
import cc.iotkit.manager.dto.bo.device.DeviceDetectorQueryBo;
|
||||
import cc.iotkit.manager.dto.bo.device.DeviceInstallInfoQueryBo;
|
||||
import cc.iotkit.manager.service.IDeviceDetectorInfoService;
|
||||
import cc.iotkit.manager.service.IDeviceInstallInfoService;
|
||||
import cc.iotkit.model.UserInfo;
|
||||
import cc.iotkit.model.device.DeviceDetectorInfo;
|
||||
import cc.iotkit.model.device.DeviceInfo;
|
||||
import cc.iotkit.model.device.DeviceInstallInfo;
|
||||
import cc.iotkit.model.device.InstallationRecord;
|
||||
import cc.iotkit.model.space.Home;
|
||||
import cc.iotkit.model.space.Space;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.io.IoUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
|
||||
import com.itextpdf.io.font.PdfEncodings;
|
||||
import com.itextpdf.io.font.constants.StandardFonts;
|
||||
import com.itextpdf.io.image.ImageDataFactory;
|
||||
import com.itextpdf.kernel.colors.ColorConstants;
|
||||
import com.itextpdf.kernel.colors.DeviceRgb;
|
||||
|
||||
|
||||
import com.itextpdf.kernel.font.PdfFont;
|
||||
import com.itextpdf.kernel.font.PdfFontFactory;
|
||||
import com.itextpdf.kernel.geom.PageSize;
|
||||
import com.itextpdf.kernel.pdf.PdfDocument;
|
||||
import com.itextpdf.kernel.pdf.PdfWriter;
|
||||
import com.itextpdf.layout.Document;
|
||||
import com.itextpdf.layout.element.*;
|
||||
import com.itextpdf.io.image.ImageData;
|
||||
import com.itextpdf.io.image.ImageDataFactory;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.net.HttpURLConnection;
|
||||
import java.net.URISyntaxException;
|
||||
import java.net.URL;
|
||||
|
||||
import com.itextpdf.layout.properties.AreaBreakType;
|
||||
import com.itextpdf.layout.properties.HorizontalAlignment;
|
||||
import com.itextpdf.layout.properties.TextAlignment;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.TrustManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.IOException;
|
||||
import java.net.URLEncoder;
|
||||
import java.security.SecureRandom;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static cc.iotkit.data.model.QTbDeviceInstallInfo.tbDeviceInstallInfo;
|
||||
import static com.itextpdf.kernel.pdf.PdfName.*;
|
||||
|
||||
|
||||
@Api(tags = {"设备安装信息"})
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/deviceInstallInfo")
|
||||
public class DeviceInstallInfoController {
|
||||
|
||||
@Autowired
|
||||
private IDeviceInstallInfoService deviceServiceImpl;
|
||||
@Autowired
|
||||
private IDeviceInstallInfoData iDeviceInstallInfoData;
|
||||
|
||||
@ApiOperation(value = "安装列表", notes = "设备列表", httpMethod = "POST")
|
||||
//@SaCheckPermission("iot:device:query")
|
||||
@PostMapping("/page")
|
||||
public Paging<DeviceInstallInfo> getDevices(@Validated @RequestBody PageRequest<DeviceInstallInfoQueryBo> pageRequest) {
|
||||
|
||||
return deviceServiceImpl.getPage(pageRequest);
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@SaCheckPermission("device:install:add")
|
||||
public void addClientUser(@RequestBody Request<DeviceInstallInfo> deviceInstallInfo) throws Exception {
|
||||
/* user.getData().setType(UserInfo.USER_TYPE_CLIENT);
|
||||
user.getData().setRoles(Collections.singletonList(Constants.ROLE_CLIENT));
|
||||
user.getData().setSecret(null);*/
|
||||
TenantHelper.enableIgnore();
|
||||
if (ObjectUtil.isNull(deviceInstallInfo.getData()) || ObjectUtil.isNull(deviceInstallInfo.getData().getDeviceName())) {
|
||||
throw new BizException(ErrCode.PARAMS_EXCEPTION);
|
||||
}
|
||||
DeviceInstallInfo deviceRepetition = iDeviceInstallInfoData.findByDeviceNameAndUid(deviceInstallInfo.getData().getDeviceName(), deviceInstallInfo.getData().getUid());
|
||||
if (deviceRepetition != null) {
|
||||
throw new BizException(ErrCode.MODEL_DEVICE_ALREADY);
|
||||
}
|
||||
if (LoginHelper.isSuperAdmin() && TenantHelper.getTenantId() != 0) {
|
||||
deviceInstallInfo.getData().setTenantId(TenantHelper.getTenantId());
|
||||
// query.where(tbDeviceInstallInfo.tenantId.eq(TenantHelper.getTenantId()));
|
||||
}
|
||||
/* if(!LoginHelper.isSuperAdmin() && ObjectUtil.isNotNull(pageReqVO.getData().getTenantId())){
|
||||
query.where(tbDeviceInstallInfo.tenantId.eq(pageReqVO.getData().getTenantId()));
|
||||
}*/
|
||||
iDeviceInstallInfoData.save(deviceInstallInfo.getData());
|
||||
|
||||
/* if(LoginHelper.isSuperAdmin() && TenantHelper.getTenantId() != 0) {
|
||||
userInfoData.save(user.getData());
|
||||
}else{
|
||||
user.getData().setTenantId(null);
|
||||
userInfoData.save(user.getData());
|
||||
}*/
|
||||
}
|
||||
|
||||
@PostMapping("/edit")
|
||||
@SaCheckPermission("device:install:edit")
|
||||
public void editClientUser(@RequestBody Request<DeviceInstallInfo> deviceInstallInfo) throws Exception {
|
||||
|
||||
TenantHelper.enableIgnore();
|
||||
if (ObjectUtil.isNull(deviceInstallInfo.getData()) || ObjectUtil.isNull(deviceInstallInfo.getData().getDeviceName()) || ObjectUtil.isNull(deviceInstallInfo.getData().getId())) {
|
||||
throw new BizException(ErrCode.PARAMS_EXCEPTION);
|
||||
}
|
||||
if (LoginHelper.isSuperAdmin() && TenantHelper.getTenantId() != 0) {
|
||||
deviceInstallInfo.getData().setTenantId(TenantHelper.getTenantId());
|
||||
// query.where(tbDeviceInstallInfo.tenantId.eq(TenantHelper.getTenantId()));
|
||||
}
|
||||
iDeviceInstallInfoData.save(deviceInstallInfo.getData());
|
||||
|
||||
}
|
||||
|
||||
@PostMapping("/device/{id}/delete")
|
||||
@SaCheckPermission("device:install:delete")
|
||||
public void deleteClientUser(@PathVariable("id") String id) {
|
||||
DeviceInstallInfo user = iDeviceInstallInfoData.findById(id);
|
||||
if (user == null) {
|
||||
throw new BizException(ErrCode.RECORD_NOT_FOUND);
|
||||
}
|
||||
iDeviceInstallInfoData.deleteById(id);
|
||||
}
|
||||
|
||||
/* @PostMapping("/getDeviceInstallInfo")
|
||||
public DeviceInstallInfo getUserInfo() {
|
||||
return iDeviceInstallInfoData.findById(LoginHelper.getUserId());
|
||||
}*/
|
||||
@PostMapping("/getDetail")
|
||||
@SaCheckPermission("device:install:query")
|
||||
public DeviceInstallInfo getDetail(@Validated @RequestBody Request<String> request) {
|
||||
return iDeviceInstallInfoData.findById(request.getData());
|
||||
}
|
||||
@PostMapping("/getPdf")
|
||||
@SaCheckPermission("device:install:upload")
|
||||
public void getPdf(@Validated @RequestBody Request<String> request, HttpServletResponse response) throws Exception {
|
||||
DeviceInstallInfo data = iDeviceInstallInfoData.findById(request.getData());
|
||||
response.setContentType("application/pdf");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"installation_info.pdf\"");
|
||||
|
||||
// 生成PDF并写入响应流
|
||||
PDFGenerator.generateInstallationPDF(data, response.getOutputStream());
|
||||
|
||||
}
|
||||
// @PostMapping("/getPdf")
|
||||
@SaCheckPermission("device:install:upload")
|
||||
public void getPdf1(@Validated @RequestBody Request<String> request, HttpServletResponse response) throws Exception {
|
||||
DeviceInstallInfo data = iDeviceInstallInfoData.findById(request.getData());
|
||||
// 2. 创建PDF文档
|
||||
// 1. 准备数据(实际应从数据库获取)
|
||||
InstallationRecord record = new InstallationRecord();
|
||||
record.setTeamName("徐峰伟班组");
|
||||
record.setInstaller("梁立国");
|
||||
record.setCommunity("二七路");
|
||||
record.setBuildingNo("3");
|
||||
record.setUnitNo("1");
|
||||
record.setRoomNo("701");
|
||||
record.setUserName("陈明珍");
|
||||
record.setUserPhone("+86-13378574419");
|
||||
record.setStoveType("台式灶");
|
||||
record.setInstallDate("2025-07-07");
|
||||
record.setBallValve(1);
|
||||
record.setDrilling(0);
|
||||
record.setPipeType("包覆管2米");
|
||||
record.setNonFixedPipe(0);
|
||||
record.setNut(0);
|
||||
record.setQuickConnect(0);
|
||||
|
||||
// 2. 设置响应头
|
||||
response.setContentType("application/pdf");
|
||||
response.setHeader("Content-Disposition", "attachment; filename=\"installation_record.pdf\"");
|
||||
|
||||
// 3. 生成并输出PDF
|
||||
try (OutputStream out = response.getOutputStream()) {
|
||||
byte[] pdfBytes = generateInstallationPdf(record);
|
||||
out.write(pdfBytes);
|
||||
out.flush();
|
||||
}
|
||||
/* response.setContentType("application/pdf");
|
||||
response.setHeader("Cache-Control", "no-store");
|
||||
response.setHeader("Pragma", "no-cache");
|
||||
response.setHeader("Content-Disposition",
|
||||
"attachment;filename=" + URLEncoder.encode("贵阳户内燃气安装信息表.pdf", "UTF-8"));
|
||||
response.setDateHeader("Expires", 0);
|
||||
try (ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
OutputStream out = response.getOutputStream()) {
|
||||
|
||||
PdfDocument pdf = new PdfDocument(new PdfWriter(baos));
|
||||
Document document = new Document(pdf, PageSize.A4.rotate());
|
||||
|
||||
// PdfFont font = PdfFontFactory.createFont("STSong-Light", "UniGB-UCS2-H");
|
||||
PdfFont font = PdfFontFactory.createFont(StandardFonts.HELVETICA_BOLD);
|
||||
document.setFont(font);
|
||||
|
||||
// 3. 添加标题
|
||||
Paragraph title = new Paragraph("贵阳户内燃气安装信息表")
|
||||
.setFontSize(18)
|
||||
.setBold();
|
||||
// .setTextAlignment(TextAlignment.CENTER);
|
||||
document.add(title);*/
|
||||
|
||||
// 4. 创建信息表格
|
||||
/* float[] columnWidths = {2, 3, 2, 3};
|
||||
Table table = new Table(columnWidths);
|
||||
// 基本信息行
|
||||
table.addCell(createCell("安装班组", true));
|
||||
table.addCell(createCell(data.getProposerTeam(), false));
|
||||
table.addCell(createCell("安装人", true));
|
||||
table.addCell(createCell(data.getProposer(), false));
|
||||
// 用户信息行
|
||||
table.addCell(createCell("用户姓名", true));
|
||||
table.addCell(createCell(data.getUserName(), false));
|
||||
table.addCell(createCell("联系电话", true));
|
||||
table.addCell(createCell(data.getUserIpone(), false));
|
||||
// 地址信息行
|
||||
table.addCell(createCell("小区名称", true));
|
||||
table.addCell(createCell(data.getCommunityName(), false));
|
||||
table.addCell(createCell("详细地址", true));
|
||||
table.addCell(createCell(data.getBuildingUnit() + data.getRoomNo(), false));
|
||||
document.add(table);*/
|
||||
|
||||
/* document.close();
|
||||
// 4. 输出到响应流
|
||||
baos.writeTo(out);
|
||||
out.flush();*/
|
||||
|
||||
|
||||
// 5. 处理图片字段
|
||||
/* addImageSection(document, "安装前图片", data.getBeforeInstallationImage());
|
||||
addImageSection(document, "安装完成探测图片", data.getWorkingOfTheDetectorImage());
|
||||
addImageSection(document, "测漏图片", data.getSideLeakageImage());
|
||||
addImageSection(document, "点火图片", data.getIgnitionPictureImage());
|
||||
|
||||
IoUtil.write(response.getOutputStream(), false, content);*/
|
||||
//document.close();
|
||||
/*} catch (Exception e) {
|
||||
try {
|
||||
response.reset();
|
||||
response.setContentType("application/json");
|
||||
response.getWriter().write("{\"status\":500,\"message\":\"生成失败\"}");
|
||||
} catch (IOException ioException) {
|
||||
log.error("错误响应失败", ioException);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
public byte[] generateInstallationPdf(InstallationRecord record) throws IOException, URISyntaxException {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
PdfDocument pdf = new PdfDocument(new PdfWriter(baos));
|
||||
Document document = new Document(pdf);
|
||||
|
||||
// 加载字体文件
|
||||
//String fontPath = getClass().getClassLoader().getResource("fonts/STSong-Light.ttf").toURI().getPath();
|
||||
PdfFont font = PdfFontFactory.createFont(
|
||||
"D:/SimsunExtG.ttf",
|
||||
PdfEncodings.IDENTITY_H,
|
||||
PdfFontFactory.EmbeddingStrategy.FORCE_EMBEDDED
|
||||
);
|
||||
// 设置中文字体
|
||||
// PdfFont font = PdfFontFactory.createFont(StandardFonts.HELVETICA);
|
||||
document.setFont(font);
|
||||
System.out.println("Font embedded: " + font.isEmbedded());
|
||||
|
||||
// 添加标题
|
||||
document.add(new Paragraph("贵阳户内安装信息录入表")
|
||||
.setFontSize(18)
|
||||
.setBold()
|
||||
.setTextAlignment(TextAlignment.CENTER));
|
||||
|
||||
// 添加安装班组信息
|
||||
document.add(new Paragraph("安装班组").setBold());
|
||||
document.add(createInstallationInfoTable(record));
|
||||
|
||||
// 添加材料使用信息
|
||||
document.add(new Paragraph("材料使用").setBold());
|
||||
document.add(createMaterialUsageTable(record));
|
||||
|
||||
// 添加图片占位提示
|
||||
for (int i = 1; i <= 4; i++) {
|
||||
document.add(new Paragraph("第 " + i + " 页").setTextAlignment(TextAlignment.CENTER));
|
||||
document.add(new Paragraph("(图片占位区域)").setItalic().setTextAlignment(TextAlignment.CENTER));
|
||||
if (i < 4) {
|
||||
document.add(new AreaBreak(AreaBreakType.NEXT_PAGE));
|
||||
}
|
||||
}
|
||||
|
||||
document.close();
|
||||
return baos.toByteArray();
|
||||
}
|
||||
|
||||
private Table createInstallationInfoTable(InstallationRecord record) {
|
||||
float[] columnWidths = {1.5f, 1.5f, 1.5f, 1.5f, 1.5f, 1.5f, 2f, 1.5f};
|
||||
Table table = new Table(columnWidths);
|
||||
|
||||
// 表头
|
||||
table.addHeaderCell(createCell("安装人", true));
|
||||
table.addHeaderCell(createCell("小区名称", true));
|
||||
table.addHeaderCell(createCell("楼栋号", true));
|
||||
table.addHeaderCell(createCell("单元号", true));
|
||||
table.addHeaderCell(createCell("房号", true));
|
||||
table.addHeaderCell(createCell("用户姓名", true));
|
||||
table.addHeaderCell(createCell("用户电话", true));
|
||||
table.addHeaderCell(createCell("灶具类型", true));
|
||||
|
||||
// 数据行
|
||||
table.addCell(createCell(record.getInstaller(), false));
|
||||
table.addCell(createCell(record.getCommunity(), false));
|
||||
table.addCell(createCell(record.getBuildingNo(), false));
|
||||
table.addCell(createCell(record.getUnitNo(), false));
|
||||
table.addCell(createCell(record.getRoomNo(), false));
|
||||
table.addCell(createCell(record.getUserName(), false));
|
||||
table.addCell(createCell(record.getUserPhone(), false));
|
||||
table.addCell(createCell(record.getStoveType(), false));
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
private Table createMaterialUsageTable(InstallationRecord record) {
|
||||
float[] columnWidths = {1f, 1f, 2f, 1.5f, 1f, 1.5f};
|
||||
Table table = new Table(columnWidths);
|
||||
|
||||
// 表头
|
||||
table.addHeaderCell(createCell("序号", true));
|
||||
table.addHeaderCell(createCell("球阀", true));
|
||||
table.addHeaderCell(createCell("打孔", true));
|
||||
table.addHeaderCell(createCell("管子使用类型及尺寸", true));
|
||||
table.addHeaderCell(createCell("非定尺管", true));
|
||||
table.addHeaderCell(createCell("螺母", true));
|
||||
|
||||
// 数据行
|
||||
table.addCell(createCell("1", false));
|
||||
table.addCell(createCell(String.valueOf(record.getBallValve()), false));
|
||||
table.addCell(createCell(String.valueOf(record.getDrilling()), false));
|
||||
table.addCell(createCell(record.getPipeType(), false));
|
||||
table.addCell(createCell(String.valueOf(record.getNonFixedPipe()), false));
|
||||
table.addCell(createCell(String.valueOf(record.getNut()), false));
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
private Cell createCell(String text, boolean isHeader) {
|
||||
Paragraph p = new Paragraph(text);
|
||||
Cell cell = new Cell().add(p);
|
||||
if (isHeader) {
|
||||
p.setBold();
|
||||
cell.setBackgroundColor(new DeviceRgb(240, 240, 240));
|
||||
}
|
||||
cell.setPadding(5);
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*private Cell createCell(String text, boolean isHeader) {
|
||||
Paragraph p = new Paragraph(text);
|
||||
Cell cell = new Cell().add(p);
|
||||
if (isHeader) {
|
||||
p.setBold();
|
||||
cell.setBackgroundColor(new DeviceGray(0.9f));
|
||||
}
|
||||
cell.setPadding(5);
|
||||
return cell;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Cell createCell(String text, boolean isHeader) {
|
||||
Cell cell = new Cell().add(new Paragraph(text));
|
||||
if (isHeader) {
|
||||
cell.setBackgroundColor(new DeviceRgb(240, 240, 240));
|
||||
cell.setBold();
|
||||
}
|
||||
return cell;
|
||||
}
|
||||
|
||||
private void addImageSection(Document doc, String title, String imageUrl) throws IOException {
|
||||
if (imageUrl != null) {
|
||||
try {
|
||||
String im = imageUrl.replaceFirst("^https://", "http://");
|
||||
URL url = new URL(im);
|
||||
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
|
||||
conn.setConnectTimeout(5000);
|
||||
conn.setReadTimeout(5000);
|
||||
if (conn.getResponseCode() != 200) {
|
||||
throw new IOException("HTTP " + conn.getResponseCode());
|
||||
}
|
||||
ImageData imageData = ImageDataFactory.create(url.toString());
|
||||
Image image = new Image(imageData).setAutoScale(true).setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
doc.add(new Paragraph(title).setBold().setMarginTop(10));
|
||||
doc.add(image);
|
||||
*//* ImageData imageData = ImageDataFactory.create(new URL(imageUrl));
|
||||
Image image = new Image(imageData);
|
||||
image.setAutoScale(true);
|
||||
image.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
doc.add(new Paragraph(title).setBold().setMarginTop(10));
|
||||
doc.add(image);*//*
|
||||
} catch (Exception e) {
|
||||
doc.add(new Paragraph(title + "【图片加载失败】").setFontColor(ColorConstants.RED));
|
||||
}
|
||||
}
|
||||
}*/
|
||||
/* @ApiOperation(value = "浓度列表", notes = "设备列表", httpMethod = "POST")
|
||||
//@SaCheckPermission("iot:device:query")
|
||||
@PostMapping("/list")
|
||||
public List<DeviceDetectorInfo> getDevices1(@Validated @RequestBody PageRequest<DeviceDetectorQueryBo> pageRequest) {
|
||||
return deviceServiceImpl.getList(pageRequest);
|
||||
}*/
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
package cc.iotkit.manager.dto.bo.device;
|
||||
|
||||
import cc.iotkit.common.api.BaseDto;
|
||||
import io.github.linpeilie.annotations.AutoMapping;
|
||||
import io.github.linpeilie.annotations.ReverseAutoMapping;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel(value = "DeviceDetectorQueryBo")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeviceDetectorQueryBo extends BaseDto {
|
||||
|
||||
|
||||
/* @ApiModelProperty(value="关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty(value="分组")
|
||||
@AutoMapping(ignore = true)
|
||||
@ReverseAutoMapping(ignore = true)
|
||||
private String group;
|
||||
|
||||
@ApiModelProperty(value="设备id")
|
||||
@Size(max = 255, message = "设备id长度不正确")
|
||||
private String deviceId;
|
||||
|
||||
@ApiModelProperty(value="设备名称特殊编码")
|
||||
@Size(max = 255, message = "设备名称长度不正确")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value="设备类型")
|
||||
@Size(max = 255, message = "设备类型长度不正确")
|
||||
private String model;
|
||||
|
||||
@ApiModelProperty(value="父级id")
|
||||
@Size(max = 255, message = "父级id长度不正确")
|
||||
private String parentId;
|
||||
|
||||
@ApiModelProperty(value="产品key")
|
||||
@Size(max = 255, message = "产品key长度不正确")
|
||||
private String productKey;
|
||||
|
||||
|
||||
@ApiModelProperty(value="设备状态")
|
||||
@AutoMapping(ignore = true)
|
||||
@ReverseAutoMapping(ignore = true)
|
||||
private Boolean online;
|
||||
|
||||
@ApiModelProperty(value="用户id")
|
||||
@Size(max = 255, message = "用户id长度不正确")
|
||||
private String uid;
|
||||
private Long deptAreaId;
|
||||
private Long tenantId;
|
||||
@ApiModelProperty(value="设备名称")
|
||||
private String name;*/
|
||||
@ApiModelProperty(value="设备名称")
|
||||
private String startTime;
|
||||
@ApiModelProperty(value="设备名称")
|
||||
private String endTime;
|
||||
private String deviceId;
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
package cc.iotkit.manager.dto.bo.device;
|
||||
|
||||
import cc.iotkit.common.api.BaseDto;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@ApiModel(value = "DeviceInstallInfoQueryBo")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class DeviceInstallInfoQueryBo extends BaseDto {
|
||||
|
||||
|
||||
/* @ApiModelProperty(value="关键字")
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty(value="分组")
|
||||
@AutoMapping(ignore = true)
|
||||
@ReverseAutoMapping(ignore = true)
|
||||
private String group;
|
||||
|
||||
@ApiModelProperty(value="设备id")
|
||||
@Size(max = 255, message = "设备id长度不正确")
|
||||
private String deviceId;
|
||||
|
||||
@ApiModelProperty(value="设备名称特殊编码")
|
||||
@Size(max = 255, message = "设备名称长度不正确")
|
||||
private String deviceName;
|
||||
|
||||
@ApiModelProperty(value="设备类型")
|
||||
@Size(max = 255, message = "设备类型长度不正确")
|
||||
private String model;
|
||||
|
||||
@ApiModelProperty(value="父级id")
|
||||
@Size(max = 255, message = "父级id长度不正确")
|
||||
private String parentId;
|
||||
|
||||
@ApiModelProperty(value="产品key")
|
||||
@Size(max = 255, message = "产品key长度不正确")
|
||||
private String productKey;
|
||||
|
||||
|
||||
@ApiModelProperty(value="设备状态")
|
||||
@AutoMapping(ignore = true)
|
||||
@ReverseAutoMapping(ignore = true)
|
||||
private Boolean online;
|
||||
|
||||
@ApiModelProperty(value="用户id")
|
||||
@Size(max = 255, message = "用户id长度不正确")
|
||||
private String uid;
|
||||
private Long deptAreaId;
|
||||
private Long tenantId;
|
||||
@ApiModelProperty(value="设备名称")
|
||||
private String name;*/
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String startTime;
|
||||
@ApiModelProperty(value = "设备名称")
|
||||
private String endTime;
|
||||
private String deviceName;
|
||||
private String uid;
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
// @ApiModelProperty(value = "公司名称")
|
||||
private String corporateName;
|
||||
// @ApiModelProperty(value = "申请时间")
|
||||
|
||||
// @ApiModelProperty(value = "申请人")
|
||||
private String proposer;
|
||||
// @ApiModelProperty(value = "申请班组")
|
||||
private String proposerTeam;
|
||||
// @ApiModelProperty(value = "小区名称")
|
||||
private String communityName;
|
||||
// @ApiModelProperty(value = "用户名称")
|
||||
private String userName;
|
||||
// @ApiModelProperty(value = "用户电话")
|
||||
private String userIpone;
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
/*
|
||||
*
|
||||
* * | Licensed 未经许可不能去掉「OPENIITA」相关版权
|
||||
* * +----------------------------------------------------------------------
|
||||
* * | Author: xw2sy@163.com
|
||||
* * +----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright [2024] [OPENIITA]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* /
|
||||
*/
|
||||
|
||||
package cc.iotkit.manager.dto.vo.deviceinfo;
|
||||
|
||||
import cc.iotkit.model.device.DeviceInfo;
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.github.linpeilie.annotations.AutoMapper;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
||||
@Data
|
||||
@ExcelIgnoreUnannotated
|
||||
@AutoMapper(target = DeviceInfoVo.class,convertGenerate = false)
|
||||
public class DeviceInfoExpordVo implements Serializable {
|
||||
private static final long serialVersionUID = -1L;
|
||||
|
||||
@ExcelProperty(value = "IMEI(设备编号)")
|
||||
private String deviceName;
|
||||
|
||||
@ExcelProperty(value = "设备型号")
|
||||
private String model;
|
||||
|
||||
@ExcelProperty(value = "父级id")
|
||||
private String parentId;
|
||||
|
||||
@ExcelProperty(value = "产品key")
|
||||
private String productKey;
|
||||
|
||||
// @ExcelProperty(value = "设备分组")
|
||||
// private String deviceGroup;
|
||||
@ExcelProperty(value = "租户编号")
|
||||
private Long tenantId;
|
||||
@ExcelProperty(value = "设备区域")
|
||||
private Long deptAreaId;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue