diff --git a/zlpt-common/zlpt-common-core/src/main/java/com/bonus/zlpt/common/core/domain/system/SysFile.java b/zlpt-common/zlpt-common-core/src/main/java/com/bonus/zlpt/common/core/domain/system/SysFile.java index e445d2f..85e684d 100644 --- a/zlpt-common/zlpt-common-core/src/main/java/com/bonus/zlpt/common/core/domain/system/SysFile.java +++ b/zlpt-common/zlpt-common-core/src/main/java/com/bonus/zlpt/common/core/domain/system/SysFile.java @@ -1,5 +1,7 @@ package com.bonus.zlpt.common.core.domain.system; +import lombok.Data; +import lombok.ToString; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -8,8 +10,15 @@ import org.apache.commons.lang3.builder.ToStringStyle; * * @author ruoyi */ +@Data +@ToString public class SysFile { + /** + * 字典序号 + */ + private Integer dicId; + /** * 文件名称 */ @@ -19,32 +28,4 @@ public class SysFile * 文件地址 */ private String url; - - public String getName() - { - return name; - } - - public void setName(String name) - { - this.name = name; - } - - public String getUrl() - { - return url; - } - - public void setUrl(String url) - { - this.url = url; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("name", getName()) - .append("url", getUrl()) - .toString(); - } } diff --git a/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java b/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java index bd73749..e205a80 100644 --- a/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java +++ b/zlpt-modules/zlpt-equip/src/main/java/com/bonus/zlpt/equip/service/impl/DevInfoServiceImpl.java @@ -23,9 +23,9 @@ import javax.annotation.Resource; @Service public class DevInfoServiceImpl implements IDevInfoService { - private final String ASPECT_PICTURE = "ASPECT_PICTURE"; - private final String EXAMINATION_PDF = "EXAMINATION_PDF"; - private final String INSURANCE_PDF = "INSURANCE_PDF"; + private final Integer ASPECT_PICTURE = 20; + private final Integer EXAMINATION_PDF = 28; + private final Integer INSURANCE_PDF = 29; @Resource private DevInfoMapper devInfoMapper; @@ -46,13 +46,13 @@ public class DevInfoServiceImpl implements IDevInfoService if (!CollectionUtils.isEmpty(files) && files.get(0) != null) { List picList = new ArrayList(); for (SysFile file : files) { - if (ASPECT_PICTURE.equals(file.getName())) { + if (file.getDicId() == ASPECT_PICTURE) { picList.add(file.getUrl()); } - if (EXAMINATION_PDF.equals(file.getName())) { + if (file.getDicId() == EXAMINATION_PDF) { devInfoVo.setExaminationPdf(file.getUrl()); } - if (INSURANCE_PDF.equals(file.getName())) { + if (file.getDicId() == INSURANCE_PDF) { devInfoVo.setInsurancePdf(file.getUrl()); } } diff --git a/zlpt-modules/zlpt-equip/src/main/resources/mapper/DevInfoMapper.xml b/zlpt-modules/zlpt-equip/src/main/resources/mapper/DevInfoMapper.xml index 5cc4bbf..e426b6b 100644 --- a/zlpt-modules/zlpt-equip/src/main/resources/mapper/DevInfoMapper.xml +++ b/zlpt-modules/zlpt-equip/src/main/resources/mapper/DevInfoMapper.xml @@ -108,7 +108,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"