13693261870
昨天 32eb942e25aa366563b7f40b05a382c0c462213c
se-system/src/main/java/com/terra/system/service/show/CadService.java
@@ -4,14 +4,13 @@
import com.terra.system.entity.data.MetaEntity;
import com.terra.system.entity.sys.AttachEntity;
import com.terra.system.helper.PathHelper;
import com.terra.system.helper.StringHelper;
import com.terra.common.helper.StringHelper;
import com.terra.system.service.data.MetaService;
import com.terra.system.service.sys.AttachService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import javax.annotation.Resource;
import java.io.*;
@@ -74,7 +73,7 @@
    private String getFilePath(int id, Boolean isAttach) {
        if (null == isAttach || !isAttach) {
            MetaEntity me = metaService.selectById(id);
            if (null == me || StringUtils.isEmpty(me.getPath()) || !StaticData.DWG.equals(me.getType())) {
            if (null == me || StringHelper.isEmpty(me.getPath()) || !StaticData.DWG.equals(me.getType())) {
                return null;
            }
@@ -82,7 +81,7 @@
        }
        AttachEntity ae = attachService.selectById(id);
        if (null == ae || StringUtils.isEmpty(ae.getPath()) || !ae.getPath().toLowerCase().contains(StaticData.DWG)) {
        if (null == ae || StringHelper.isEmpty(ae.getPath()) || !ae.getPath().toLowerCase().contains(StaticData.DWG)) {
            return null;
        }