二楼使用导出、导入设备功能
This commit is contained in:
@@ -53,6 +53,12 @@ public class DictDataParam {
|
||||
@ApiModelProperty("字典值")
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 是否开启使用Value值:0-关闭;1-开启(默认为0)
|
||||
*/
|
||||
@ApiModelProperty("是否开启使用Value值")
|
||||
private Integer openValue;
|
||||
|
||||
|
||||
/**
|
||||
* 更新操作实体
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.njcn.gather.system.dictionary.pojo.po;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.njcn.db.mybatisplus.bo.BaseEntity;
|
||||
import lombok.Data;
|
||||
@@ -55,8 +57,14 @@ public class DictData extends BaseEntity {
|
||||
/**
|
||||
* 目前只用于表示电压等级数值
|
||||
*/
|
||||
@TableField(fill = FieldFill.UPDATE)
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 是否开启使用Value值:0-关闭;1-开启(默认为0)
|
||||
*/
|
||||
private Integer openValue;
|
||||
|
||||
/**
|
||||
* 状态:0-删除 1-正常
|
||||
*/
|
||||
|
||||
@@ -26,6 +26,13 @@ public interface IDictDataService extends IService<DictData> {
|
||||
*/
|
||||
Page<DictData> getDictDataByTypeId(DictDataParam.QueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 根据字典类型id查询字典信息
|
||||
* @param typeId 字典类型id
|
||||
* @return 操作结果
|
||||
*/
|
||||
List<DictData> getDictDataByTypeId(String typeId);
|
||||
|
||||
/**
|
||||
* 新增数据字典
|
||||
* @param dictDataParam 字典数据
|
||||
|
||||
@@ -47,5 +47,13 @@ public interface IDictTypeService extends IService<DictType> {
|
||||
* 导出字典类型数据
|
||||
* @param queryParam 查询参数
|
||||
*/
|
||||
public void exportDictType(DictTypeParam.QueryParam queryParam);
|
||||
void exportDictType(DictTypeParam.QueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 根据code获取字典类型数据
|
||||
*
|
||||
* @param code 字典类型code
|
||||
* @return
|
||||
*/
|
||||
DictType getByCode(String code);
|
||||
}
|
||||
|
||||
@@ -64,6 +64,10 @@ public class DictDataServiceImpl extends ServiceImpl<DictDataMapper, DictData> i
|
||||
return this.baseMapper.selectPage(new Page<>(PageFactory.getPageNum(queryParam), PageFactory.getPageSize(queryParam)), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictData> getDictDataByTypeId(String typeId) {
|
||||
return this.lambdaQuery().eq(DictData::getTypeId, typeId).eq(DictData::getState, DataStateEnum.ENABLE.getCode()).list();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
|
||||
@@ -104,6 +104,10 @@ public class DictTypeServiceImpl extends ServiceImpl<DictTypeMapper, DictType> i
|
||||
ExcelUtil.exportExcel("字典类型导出数据.xlsx", "字典类型", DictTypeExcel.class, dictTypeVOS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DictType getByCode(String code) {
|
||||
return this.lambdaQuery().eq(DictType::getCode, code).eq(DictType::getState, DataStateEnum.ENABLE.getCode()).one();
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验参数,检查是否存在相同名称的字典类型
|
||||
|
||||
Reference in New Issue
Block a user