13693261870
2 天以前 542a030a93de7dbc39e185d4ce355c5894e3cd5b
se-system/src/main/java/com/terra/system/service/show/CadService.java
@@ -1,17 +1,16 @@
package com.terra.system.service.show;
import com.terra.system.entity.all.StaticData;
import com.terra.common.entity.all.StaticData;
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;
        }