提交 ce787799 authored 作者: zjm's avatar zjm

fix(装备模块): 在setname的添加了库房id转库房名称

在setname的添加了库房id转库房名称
上级 edcc4126
...@@ -5,6 +5,7 @@ import com.tykj.dev.device.library.subject.vo.DeviceExcel; ...@@ -5,6 +5,7 @@ import com.tykj.dev.device.library.subject.vo.DeviceExcel;
import com.tykj.dev.device.library.subject.vo.DeviceExcelVo; import com.tykj.dev.device.library.subject.vo.DeviceExcelVo;
import com.tykj.dev.device.library.subject.vo.DeviceVo; import com.tykj.dev.device.library.subject.vo.DeviceVo;
import com.tykj.dev.device.library.subject.vo.WorkUseVo; import com.tykj.dev.device.library.subject.vo.WorkUseVo;
import com.tykj.dev.device.user.cache.StoreCache;
import com.tykj.dev.misc.base.BeanHelper; import com.tykj.dev.misc.base.BeanHelper;
import com.tykj.dev.misc.utils.SpringUtils; import com.tykj.dev.misc.utils.SpringUtils;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -13,6 +14,7 @@ import lombok.Data; ...@@ -13,6 +14,7 @@ import lombok.Data;
import org.hibernate.annotations.SQLDelete; import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.Where; import org.hibernate.annotations.Where;
import org.modelmapper.ModelMapper; import org.modelmapper.ModelMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedBy;
...@@ -321,6 +323,9 @@ public class DeviceLibrary implements Serializable { ...@@ -321,6 +323,9 @@ public class DeviceLibrary implements Serializable {
return mapper.map(this, DeviceExcel.class); return mapper.map(this, DeviceExcel.class);
} }
@Autowired
StoreCache storeCache;
public DeviceLibrary setConfigName(){ public DeviceLibrary setConfigName(){
ConfigCache configCache = SpringUtils.getBean("initConfigCache"); ConfigCache configCache = SpringUtils.getBean("initConfigCache");
if (configCache != null) { if (configCache != null) {
...@@ -332,6 +337,7 @@ public class DeviceLibrary implements Serializable { ...@@ -332,6 +337,7 @@ public class DeviceLibrary implements Serializable {
setStorageTypeName(configCache.getStorageTypeMap().get(this.storageType)==null?"-":configCache.getStorageTypeMap().get(this.storageType)); setStorageTypeName(configCache.getStorageTypeMap().get(this.storageType)==null?"-":configCache.getStorageTypeMap().get(this.storageType));
setAllotTypeName(configCache.getAllotTypeMap().get(this.allotType)==null?"-":configCache.getAllotTypeMap().get(this.allotType)); setAllotTypeName(configCache.getAllotTypeMap().get(this.allotType)==null?"-":configCache.getAllotTypeMap().get(this.allotType));
// childs.clear(); // childs.clear();
setStorageLocation(storeCache.idToName(this.storageLocationId));
} }
return this; return this;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论