|
|
|
@ -16,13 +16,13 @@ import com.ruoyi.common.constant.Constants;
|
|
|
|
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
|
|
|
|
import com.ruoyi.common.exception.ServiceException;
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
|
import com.ruoyi.gysl.entity.GyslProjectHandbook;
|
|
|
|
|
import com.ruoyi.gysl.entity.*;
|
|
|
|
|
import com.ruoyi.gysl.entity.request.HandbookRequest;
|
|
|
|
|
import com.ruoyi.gysl.entity.request.ZwIdPageReq;
|
|
|
|
|
import com.ruoyi.gysl.entity.response.BasicInformationResponse;
|
|
|
|
|
import com.ruoyi.gysl.mapper.BasicInformationMapper;
|
|
|
|
|
import com.ruoyi.gysl.mapper.ProjectHandBookMapper;
|
|
|
|
|
import com.ruoyi.gysl.service.BasicInformationService;
|
|
|
|
|
import com.ruoyi.gysl.service.GyslProjectHandbookService;
|
|
|
|
|
import com.ruoyi.gysl.service.*;
|
|
|
|
|
import com.ruoyi.system.mapper.SysDictDataMapper;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
@ -47,9 +47,23 @@ public class GyslProjectHandbookServiceImpl extends ServiceImpl<ProjectHandBookM
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
private BasicInformationMapper basicInformationMapper;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 建筑信息
|
|
|
|
|
*/
|
|
|
|
|
@Resource
|
|
|
|
|
private BuildingInformationService buildingInformationService;
|
|
|
|
|
/**
|
|
|
|
|
* 企业入驻信息
|
|
|
|
|
*/
|
|
|
|
|
@Resource
|
|
|
|
|
private QyrzInformationService qyrzInformationService;
|
|
|
|
|
@Resource
|
|
|
|
|
private BasicInformationService basicInformationService;
|
|
|
|
|
/**
|
|
|
|
|
* 项目规划信息
|
|
|
|
|
*/
|
|
|
|
|
@Resource
|
|
|
|
|
private PlanInformationService planInformationService;
|
|
|
|
|
@Resource
|
|
|
|
|
private SysDictDataMapper sysDictDataMapper;
|
|
|
|
|
|
|
|
|
@ -68,8 +82,27 @@ public class GyslProjectHandbookServiceImpl extends ServiceImpl<ProjectHandBookM
|
|
|
|
|
public void generatePdfs(HttpServletResponse response, Integer id) throws IOException {
|
|
|
|
|
// 获取数据
|
|
|
|
|
GyslProjectHandbook handbook = getById(id);
|
|
|
|
|
List<BasicInformationResponse> basicInfoList = basicInformationMapper.idListToProject(
|
|
|
|
|
Arrays.asList(handbook.getXmId().split(",")));
|
|
|
|
|
// List<BasicInformationResponse> basicInfoList = basicInformationMapper.idListToProject(
|
|
|
|
|
// Arrays.asList(handbook.getXmId().split(",")));
|
|
|
|
|
String[] list = handbook.getXmId().split(",");
|
|
|
|
|
List<BasicInformationResponse> basicInfoList = new ArrayList<>();
|
|
|
|
|
for (String s : list) {
|
|
|
|
|
BasicInformationResponse bs = new BasicInformationResponse();
|
|
|
|
|
//项目基本信息
|
|
|
|
|
BasicInformation byId = basicInformationService.getById(s);
|
|
|
|
|
bs.setBasicInformation(byId == null ? new BasicInformation() : byId);
|
|
|
|
|
//项目规划信息
|
|
|
|
|
PlanInformation one = planInformationService.lambdaQuery().eq(PlanInformation::getXmId, s).one();
|
|
|
|
|
bs.setPlanInformation(one == null ? new PlanInformation() : one);
|
|
|
|
|
//项目建筑信息
|
|
|
|
|
bs.setBuildingInformation(buildingInformationService.lambdaQuery().eq(BuildingInformation::getXmId, s).list());
|
|
|
|
|
//企业入驻信息
|
|
|
|
|
ZwIdPageReq zwIdPageReq = new ZwIdPageReq();
|
|
|
|
|
zwIdPageReq.setXmId(Long.valueOf(s));
|
|
|
|
|
QyrzInformation qyrzInformation = qyrzInformationService.selectAll(zwIdPageReq);
|
|
|
|
|
bs.setQyrzInformation(qyrzInformation == null ? new QyrzInformation() : qyrzInformation);
|
|
|
|
|
basicInfoList.add(bs);
|
|
|
|
|
}
|
|
|
|
|
List<String> hbpdf = new ArrayList<>();
|
|
|
|
|
// 配置中文字体
|
|
|
|
|
String fontPath = RuoYiConfig.getProfile() + "/Alibaba-PuHuiTi-Regular.ttf";
|
|
|
|
|