|
@@ -1,12 +1,9 @@
|
|
|
package com.sooka.sponest.data.housingconstruction.service.impl;
|
|
|
|
|
|
import com.ruoyi.common.core.utils.DateUtils;
|
|
|
-import com.ruoyi.common.core.utils.SpringUtils;
|
|
|
import com.ruoyi.common.core.utils.StringUtils;
|
|
|
import com.ruoyi.common.core.utils.uuid.IdUtils;
|
|
|
import com.ruoyi.common.security.utils.SecurityUtils;
|
|
|
-import com.ruoyi.system.api.RemoteConfigService;
|
|
|
-import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionAttach;
|
|
|
import com.sooka.sponest.data.housingconstruction.domain.CenterdataTHousingconstructionEnterpriseproductionreport;
|
|
|
import com.sooka.sponest.data.housingconstruction.mapper.CenterdataTHousingconstructionEnterpriseproductionreportMapper;
|
|
|
import com.sooka.sponest.data.housingconstruction.service.ICenterdataTHousingconstructionAttachService;
|
|
@@ -15,9 +12,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-
|
|
|
-import static com.sooka.sponest.data.utils.DataConstants.DOWNLOAD_URL;
|
|
|
|
|
|
/**
|
|
|
* 企业生产报告Service业务层处理
|
|
@@ -42,23 +36,6 @@ public class CenterdataTHousingconstructionEnterpriseproductionreportServiceImpl
|
|
|
@Override
|
|
|
public CenterdataTHousingconstructionEnterpriseproductionreport selectCenterdataTHousingconstructionEnterpriseproductionreportById(String id) {
|
|
|
CenterdataTHousingconstructionEnterpriseproductionreport report = centerdataTHousingconstructionEnterpriseproductionreportMapper.selectCenterdataTHousingconstructionEnterpriseproductionreportById(id);
|
|
|
-
|
|
|
- /*List<CenterdataTHousingconstructionAttach> attachList = attachService.getAttachPathToEntityArray(id);
|
|
|
- StringBuilder newDiles = new StringBuilder();
|
|
|
-
|
|
|
- String fileurl = SpringUtils.getBean(RemoteConfigService.class).remotegetConfigKey(DOWNLOAD_URL).getData();
|
|
|
-
|
|
|
- attachList.forEach(attach->{
|
|
|
- if(report.getReportType().equals(attach.getDictValue())){
|
|
|
- String filename = attach.getFileName(); //新建 Microsoft Excel 工作表 (2).xlsx
|
|
|
- String url = attach.getAttachPath().substring(attach.getAttachPath().indexOf("group1"),attach.getAttachPath().length()); //group1/M00/00/84/wKgKEGawNfGAW7bwAAAxRySSUAM25.xlsx
|
|
|
- String group = url.substring(0, url.indexOf('/')); //group1
|
|
|
- newDiles.append(fileurl + "Download?fileName=" + filename + "&&group=" + group + "&&path=" + url.substring(url.indexOf('/') + 1) + "+" + filename + ",");
|
|
|
- }
|
|
|
- });
|
|
|
- if(newDiles.length() > 0){
|
|
|
- newDiles.deleteCharAt(newDiles.length() - 1);
|
|
|
- }*/
|
|
|
report.setFileUrl(attachService.replasePathToFile(id,null));
|
|
|
return report;
|
|
|
}
|