feat(system): 增加资产类型名称和类型字段
- 在 AssetsRespVO 和 AssetsDO 中添加 typeName 和 type 字段 - 在 AssetsServiceImpl 中实现资产类型名称和类型的查询 - 在 FactoryForkliftRespVO 和 FactoryForkliftSaveReqVO 中添加设备代码和出厂编号字段 - 在 FactoryForkliftDO 中添加设备代码和出厂编号字段
This commit is contained in:
parent
8f22c87451
commit
31a2b4acd1
@ -46,6 +46,10 @@ public class AssetsRespVO {
|
||||
@ExcelProperty("资产类型id")
|
||||
private Long typeId;
|
||||
|
||||
@Schema(description = "资产类型名称", example = "5169")
|
||||
@ExcelProperty("资产类型名称")
|
||||
private String typeName;
|
||||
|
||||
@Schema(description = "其余信息(json)")
|
||||
@ExcelProperty("其余信息(json)")
|
||||
private String itemJson;
|
||||
@ -56,4 +60,4 @@ public class AssetsRespVO {
|
||||
|
||||
@Schema(description = "资产类型 0按量 1按单件")
|
||||
private Integer type;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.system.dal.dataobject.assets;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
@ -66,4 +68,9 @@ public class AssetsDO extends BaseDO {
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer type;
|
||||
}
|
||||
/**
|
||||
* 资产类型名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String typeName;
|
||||
}
|
||||
|
@ -19,7 +19,6 @@ import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -70,7 +69,11 @@ public class AssetsServiceImpl implements AssetsService {
|
||||
|
||||
@Override
|
||||
public AssetsDO getAssets(Long id) {
|
||||
return assetsMapper.selectById(id);
|
||||
AssetsDO assetsDO = assetsMapper.selectById(id);
|
||||
AssetsTypeDO assetsTypeDO = assetsTypeMapper.selectById(assetsDO.getTypeId());
|
||||
assetsDO.setTypeName(assetsTypeDO.getName());
|
||||
assetsDO.setType(assetsTypeDO.getType());
|
||||
return assetsDO;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -50,6 +50,12 @@ public class FactoryForkliftRespVO {
|
||||
@ExcelProperty("厂商")
|
||||
private String manufacturer;
|
||||
|
||||
@Schema(description = "设备代码")
|
||||
private String equipmentCode;
|
||||
|
||||
@Schema(description = "出厂编号")
|
||||
private String serialNo;
|
||||
|
||||
@Schema(description = "型号")
|
||||
@ExcelProperty("型号")
|
||||
private String modelNo;
|
||||
|
@ -30,6 +30,12 @@ public class FactoryForkliftSaveReqVO {
|
||||
@Schema(description = "厂商")
|
||||
private String manufacturer;
|
||||
|
||||
@Schema(description = "设备代码")
|
||||
private String equipmentCode;
|
||||
|
||||
@Schema(description = "出厂编号")
|
||||
private String serialNo;
|
||||
|
||||
@Schema(description = "型号")
|
||||
private String modelNo;
|
||||
|
||||
@ -42,4 +48,4 @@ public class FactoryForkliftSaveReqVO {
|
||||
@Schema(description = "用途类型 根据字典值来匹配", example = "1")
|
||||
private Integer useType;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.smartfactory.dal.dataobject.factoryforklift;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
@ -47,6 +48,14 @@ public class FactoryForkliftDO extends BaseDO {
|
||||
* 厂商
|
||||
*/
|
||||
private String manufacturer;
|
||||
/**
|
||||
* 设备代码
|
||||
*/
|
||||
private String equipmentCode;
|
||||
/**
|
||||
* 出厂编号
|
||||
*/
|
||||
private String serialNo;
|
||||
/**
|
||||
* 型号
|
||||
*/
|
||||
@ -64,4 +73,4 @@ public class FactoryForkliftDO extends BaseDO {
|
||||
*/
|
||||
private Integer useType;
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user