Browse Source

update

yangzhenli
V26772074 1 year ago
parent
commit
8caafbd49d
  1. 3
      jnpf-tendering-biz/src/main/java/jnpf/mapper/LotteryReviewMapper.java
  2. 3
      jnpf-tendering-biz/src/main/java/jnpf/service/ExpertService.java
  3. 24
      jnpf-tendering-biz/src/main/java/jnpf/service/ILotteryProjectService.java
  4. 2
      jnpf-tendering-biz/src/main/java/jnpf/service/ILotteryReviewService.java
  5. 15
      jnpf-tendering-biz/src/main/java/jnpf/service/impl/BiddingProjectSubscribeServiceImpl.java
  6. 117
      jnpf-tendering-biz/src/main/java/jnpf/service/impl/ExpertServiceImpl.java
  7. 713
      jnpf-tendering-biz/src/main/java/jnpf/service/impl/LotteryProjectServiceImpl.java
  8. 31
      jnpf-tendering-biz/src/main/java/jnpf/service/impl/LotteryReviewServiceImpl.java
  9. 6
      jnpf-tendering-biz/src/main/java/jnpf/service/impl/RedisSerialNumberGenerator.java
  10. 13
      jnpf-tendering-biz/src/main/resources/mapper/ExpertMapper.xml
  11. 29
      jnpf-tendering-biz/src/main/resources/mapper/LotteryProjectMapper.xml
  12. 18
      jnpf-tendering-biz/src/main/resources/mapper/LotteryReviewMapper.xml
  13. 6
      jnpf-tendering-controller/src/main/java/jnpf/controller/BiddingProjectSubscribeController.java
  14. 11
      jnpf-tendering-controller/src/main/java/jnpf/controller/ExpertController.java
  15. 84
      jnpf-tendering-controller/src/main/java/jnpf/controller/LotteryProjectController.java
  16. 10
      jnpf-tendering-entity/src/main/java/jnpf/entity/Expert.java
  17. 17
      jnpf-tendering-entity/src/main/java/jnpf/entity/LotteryProject.java
  18. 21
      jnpf-tendering-entity/src/main/java/jnpf/entity/LotteryReview.java
  19. 62
      jnpf-tendering-entity/src/main/java/jnpf/model/ContactInformationTypeHandler.java
  20. 63
      jnpf-tendering-entity/src/main/java/jnpf/model/ExpertGroupInfoTypeHandler.java
  21. 64
      jnpf-tendering-entity/src/main/java/jnpf/model/ExtractExpertsInfoTypeHandler.java
  22. 62
      jnpf-tendering-entity/src/main/java/jnpf/model/JsonArrayTypeHandler.java
  23. 69
      jnpf-tendering-entity/src/main/java/jnpf/model/dto/ExpertDto.java
  24. 188
      jnpf-tendering-entity/src/main/java/jnpf/model/dto/LotteryProjectDto.java
  25. BIN
      jnpf-tendering-server/src/main/resources/jnpf/templete/招投标公司打印.docx
  26. BIN
      jnpf-tendering-server/src/main/resources/jnpf/templete/浙江出版传媒股份有限公司ERP系统建设项目.docx
  27. 28
      pom.xml

3
jnpf-tendering-biz/src/main/java/jnpf/mapper/LotteryReviewMapper.java

@ -2,6 +2,8 @@ package jnpf.mapper;
import jnpf.entity.LotteryReview; import jnpf.entity.LotteryReview;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import jnpf.model.dto.LotteryProjectDto;
import org.apache.ibatis.annotations.Param;
/** /**
* <p> * <p>
@ -13,4 +15,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/ */
public interface LotteryReviewMapper extends BaseMapper<LotteryReview> { public interface LotteryReviewMapper extends BaseMapper<LotteryReview> {
LotteryProjectDto.QueryReviewResponse queryReviewInfo(@Param("id") String id);
} }

3
jnpf-tendering-biz/src/main/java/jnpf/service/ExpertService.java

@ -6,6 +6,7 @@ import jnpf.entity.Expert;
import jnpf.model.dto.ExpertDto; import jnpf.model.dto.ExpertDto;
import jnpf.permission.model.organize.OrganizeListVO; import jnpf.permission.model.organize.OrganizeListVO;
import jnpf.permission.model.organize.PaginationOrganize; import jnpf.permission.model.organize.PaginationOrganize;
import org.springframework.web.multipart.MultipartFile;
import java.util.List; import java.util.List;
@ -22,4 +23,6 @@ public interface ExpertService extends IService<Expert> {
Page<ExpertDto.ListResponse> queryList(ExpertDto.ListParam param); Page<ExpertDto.ListResponse> queryList(ExpertDto.ListParam param);
ExpertDto.ListResponse queryInfo(String id); ExpertDto.ListResponse queryInfo(String id);
void expertImport(MultipartFile file);
} }

24
jnpf-tendering-biz/src/main/java/jnpf/service/ILotteryProjectService.java

@ -1,10 +1,14 @@
package jnpf.service; package jnpf.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import jnpf.base.vo.DownloadVO;
import jnpf.entity.Expert;
import jnpf.entity.LotteryProject; import jnpf.entity.LotteryProject;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.model.dto.LotteryProjectDto; import jnpf.model.dto.LotteryProjectDto;
import java.util.List;
/** /**
* <p> * <p>
* 抽签项目表 服务类 * 抽签项目表 服务类
@ -24,4 +28,24 @@ public interface ILotteryProjectService extends IService<LotteryProject> {
Page<LotteryProjectDto.QueryResponse> queryList(LotteryProjectDto.QueryListParam param); Page<LotteryProjectDto.QueryResponse> queryList(LotteryProjectDto.QueryListParam param);
LotteryProjectDto.QueryResponse queryInfo(String id); LotteryProjectDto.QueryResponse queryInfo(String id);
void addReview(LotteryProjectDto.AddReviewParam param);
void editReview(LotteryProjectDto.EditReviewParam param);
void participateInConfirmation(LotteryProjectDto.ParticipateInConfirmationParam param);
LotteryProjectDto.QueryReviewResponse queryReviewInfo(String id);
void deleteReview(LotteryProjectDto.DeleteReviewParam param);
void saveExtractionResults(LotteryProjectDto.SaveExtractionResultsParam param);
List<Expert> getExpertsByType(String reviewId, String expertGroup);
DownloadVO resultPrinting(String reviewId);
void uploadExtractionResults(LotteryProjectDto.UploadExtractionResults param);
List<Expert> getCompanyByReview(String reviewId);
} }

2
jnpf-tendering-biz/src/main/java/jnpf/service/ILotteryReviewService.java

@ -2,6 +2,7 @@ package jnpf.service;
import jnpf.entity.LotteryReview; import jnpf.entity.LotteryReview;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.model.dto.LotteryProjectDto;
/** /**
* <p> * <p>
@ -13,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/ */
public interface ILotteryReviewService extends IService<LotteryReview> { public interface ILotteryReviewService extends IService<LotteryReview> {
LotteryProjectDto.QueryReviewResponse queryReviewInfo(String id);
} }

15
jnpf-tendering-biz/src/main/java/jnpf/service/impl/BiddingProjectSubscribeServiceImpl.java

@ -878,6 +878,15 @@ public class BiddingProjectSubscribeServiceImpl extends ServiceImpl<BiddingProje
if (null == biddingProjectSubscribeEntity) { if (null == biddingProjectSubscribeEntity) {
throw new DataException("参数错误[3]"); throw new DataException("参数错误[3]");
} }
//校验是否具有待提交状态,有的话不能审核
if (iBiddingProjectSubscribeChildService.lambdaQuery()
.eq(BiddingProjectSubscribeChild::getMainId, param.getId())
.eq(BiddingProjectSubscribeChild::getChildStatus, BiddingProjectEnum.ChildStatusEnum.TO_BE_SUBMITTED.getCode())
.exists()){
throw new DataException("存在未提交的子项,不能审核");
}
switch (param.getAct()) { switch (param.getAct()) {
//同意 //同意
case "1": case "1":
@ -1194,6 +1203,8 @@ public class BiddingProjectSubscribeServiceImpl extends ServiceImpl<BiddingProje
} }
private void baArchivist(BiddingProjectDto.AuditingParam param, BiddingProjectSubscribeEntity biddingProjectSubscribeEntity, UserInfo userInfo, OrganizeEntity organizeEntity, BiddingProjectSubscribeChild selfChild, boolean querySuperior) { private void baArchivist(BiddingProjectDto.AuditingParam param, BiddingProjectSubscribeEntity biddingProjectSubscribeEntity, UserInfo userInfo, OrganizeEntity organizeEntity, BiddingProjectSubscribeChild selfChild, boolean querySuperior) {
//修改主状态 //修改主状态
this.lambdaUpdate() this.lambdaUpdate()
.set(BiddingProjectSubscribeEntity::getMainStatus, BiddingProjectEnum.MainStatusEnum.ARCHIVIST.getCode()) .set(BiddingProjectSubscribeEntity::getMainStatus, BiddingProjectEnum.MainStatusEnum.ARCHIVIST.getCode())
@ -1379,6 +1390,10 @@ public class BiddingProjectSubscribeServiceImpl extends ServiceImpl<BiddingProje
lotteryProject.setStatusName(LotteryProjectDto.StatusEnum.TO_BE_EXTRACTED.getDescribe()); lotteryProject.setStatusName(LotteryProjectDto.StatusEnum.TO_BE_EXTRACTED.getDescribe());
lotteryProject.setAgency(biddingProjectSubscribeEntity.getAgencyOne()); lotteryProject.setAgency(biddingProjectSubscribeEntity.getAgencyOne());
lotteryProject.setType(LotteryProjectDto.TypeEnum.SYSTEM.getCode()); lotteryProject.setType(LotteryProjectDto.TypeEnum.SYSTEM.getCode());
lotteryProject.setLotteryType("1");
iLotteryProjectService.save(lotteryProject);
lotteryProject.setId(null);
lotteryProject.setLotteryType("2");
iLotteryProjectService.save(lotteryProject); iLotteryProjectService.save(lotteryProject);
} }

117
jnpf-tendering-biz/src/main/java/jnpf/service/impl/ExpertServiceImpl.java

@ -1,6 +1,7 @@
package jnpf.service.impl; package jnpf.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil; import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
@ -9,7 +10,9 @@ import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.Feature; import com.alibaba.fastjson.parser.Feature;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.base.DictionaryDataApi;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.base.entity.DictionaryDataEntity;
import jnpf.constant.PermissionConst; import jnpf.constant.PermissionConst;
import jnpf.entity.Expert; import jnpf.entity.Expert;
import jnpf.exception.DataException; import jnpf.exception.DataException;
@ -27,20 +30,34 @@ import jnpf.util.UserProvider;
import jnpf.util.treeutil.SumTree; import jnpf.util.treeutil.SumTree;
import jnpf.util.treeutil.newtreeutil.TreeDotUtils; import jnpf.util.treeutil.newtreeutil.TreeDotUtils;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.ss.usermodel.WorkbookFactory;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
@Service @Service
@AllArgsConstructor @AllArgsConstructor
public class ExpertServiceImpl extends ServiceImpl<ExpertMapper, Expert> implements ExpertService { public class ExpertServiceImpl extends ServiceImpl<ExpertMapper, Expert> implements ExpertService {
private final OrganizeService organizeService; private final OrganizeService organizeService;
private final UserProvider userProvider; private final UserProvider userProvider;
private final DictionaryDataApi dictionaryDataApi;
private final RedisSerialNumberGenerator redisSerialNumberGenerator; private final RedisSerialNumberGenerator redisSerialNumberGenerator;
private static final String EXPERTS_KEY = "experts:"; private static final String EXPERTS_KEY = "experts:";
private static final String PREFIX = "EXPERT"; private static final String PREFIX = "EXPERT";
private static final String COMPANY_KEY = "company:";
private static final String COM_PREFIX = "COMPANY";
@Override @Override
public List<OrganizeListVO> getOrganizationList(PaginationOrganize pagination) { public List<OrganizeListVO> getOrganizationList(PaginationOrganize pagination) {
// 获取所有组织 // 获取所有组织
@ -92,18 +109,50 @@ public class ExpertServiceImpl extends ServiceImpl<ExpertMapper, Expert> impleme
expert.setDelFlag("0"); expert.setDelFlag("0");
expert.setCreateTime(LocalDateTime.now()); expert.setCreateTime(LocalDateTime.now());
expert.setUpdateTime(LocalDateTime.now()); expert.setUpdateTime(LocalDateTime.now());
expert.setCreateId(userInfo.getId()); expert.setCreateId(userInfo.getUserId());
expert.setCreateName(userInfo.getUserName()); expert.setCreateName(userInfo.getUserName());
expert.setUpdateName(userInfo.getUserName()); expert.setUpdateName(userInfo.getUserName());
expert.setUpdateId(userInfo.getId()); expert.setUpdateId(userInfo.getUserId());
long number = redisSerialNumberGenerator.generateSerialNumber(EXPERTS_KEY); long number = 0;
switch (param.getDataType()) {
case "2":
number = redisSerialNumberGenerator.generateSerialNumber(COMPANY_KEY);
expert.setId(String.format("%s%05d", COM_PREFIX, number));
break;
case "1":
default:
number = redisSerialNumberGenerator.generateSerialNumber(EXPERTS_KEY);
expert.setId(String.format("%s%05d", PREFIX, number)); expert.setId(String.format("%s%05d", PREFIX, number));
}
if (this.lambdaQuery().eq(Expert::getId, expert.getId()).exists()) { if (this.lambdaQuery().eq(Expert::getId, expert.getId()).exists()) {
throw new DataException("编号生成异常,请稍后再试!"); throw new DataException("编号生成异常,请稍后再试!");
} }
this.save(expert); this.save(expert);
} }
public static void main(String[] args) throws Exception {
String path = "/Users/yangzhenli/Documents/项目/jnpf/专家导入.xlsx";
try (InputStream inputStream = new FileInputStream(path);
Workbook workbook = WorkbookFactory.create(inputStream)) {
Sheet sheet = workbook.getSheetAt(0);
for (Row row : sheet) {
if (row.getRowNum() <= 1) {
// 跳过表头
continue;
}
String name = row.getCell(0).getStringCellValue();
Integer age = (int) row.getCell(1).getNumericCellValue();
}
}
}
@Override @Override
public void edit(ExpertDto.EditParam param) { public void edit(ExpertDto.EditParam param) {
if (StrUtil.isBlank(param.getId())) { if (StrUtil.isBlank(param.getId())) {
@ -169,15 +218,13 @@ public class ExpertServiceImpl extends ServiceImpl<ExpertMapper, Expert> impleme
} }
break; break;
case "2": case "2":
if (StrUtil.isBlank(param.getExpertName())) { if (CollectionUtil.isEmpty(param.getContactInformation())) {
throw new DataException("联系人不能为空"); throw new DataException("联系人信息不能为空");
}
if (StrUtil.isBlank(param.getPhoneNumber())) {
throw new DataException("联系电话不能为空");
} }
if (StrUtil.isBlank(param.getCompanyName())) { if (StrUtil.isBlank(param.getCompanyName())) {
throw new DataException("公司名称不能为空"); throw new DataException("公司名称不能为空");
} }
param.setStatus("0");
break; break;
default: default:
throw new DataException("新增类型错误"); throw new DataException("新增类型错误");
@ -222,4 +269,58 @@ public class ExpertServiceImpl extends ServiceImpl<ExpertMapper, Expert> impleme
} }
return this.getBaseMapper().queryInfo(id); return this.getBaseMapper().queryInfo(id);
} }
@Override
public void expertImport(MultipartFile file) {
List<ExpertDto.AddParam> addParamList=new ArrayList<>();
try (InputStream inputStream = file.getInputStream();
Workbook workbook = WorkbookFactory.create(inputStream)) {
Sheet sheet = workbook.getSheetAt(0);
List<DictionaryDataEntity> groupNameList = dictionaryDataApi.getDicList("539395626211742999");
for (Row row : sheet) {
if (row.getRowNum() <= 1) {
// 跳过表头
continue;
}
ExpertDto.AddParam addParam=new ExpertDto.AddParam();
addParam.setDataType("1");
String stringCellValue = row.getCell(0).getStringCellValue();
if (StrUtil.equals(stringCellValue,"姓名示例")){
throw new DataException("请删除示例数据行");
}
addParam.setExpertName(stringCellValue);
String groupName = row.getCell(1).getStringCellValue();
Optional<DictionaryDataEntity> first = groupNameList.stream().filter(d -> d.getFullName().contains(groupName)).findFirst();
if (!first.isPresent()){
throw new DataException("第"+(row.getRowNum()+1)+"行数据,专家组别信息不正确,请检查");
}
first.ifPresent(dictionaryDataEntity -> addParam.setExpertGroup(dictionaryDataEntity.getId()));
addParam.setPhoneNumber(row.getCell(2).getStringCellValue());
String birthday = row.getCell(3).getStringCellValue();
if (StrUtil.isNotBlank(birthday)){
addParam.setBirthday(LocalDateTimeUtil.format(LocalDateTimeUtil.parse(birthday,"yyyyMMdd"),"yyyy-MM-dd"));
}
addParam.setExpertSources(row.getCell(4).getStringCellValue());
addParam.setWorkUnit(row.getCell(5).getStringCellValue());
addParam.setPost(row.getCell(6).getStringCellValue());
addParam.setTechnicalPosition(row.getCell(7).getStringCellValue());
addParam.setProfessionalExpertise(row.getCell(8).getStringCellValue());
addParam.setSex(StrUtil.equals(row.getCell(9).getStringCellValue(),"男")?"1" : "2");
if (StrUtil.isNotBlank(row.getCell(10).getStringCellValue())){
addParam.setWorkingYears(row.getCell(10).getStringCellValue());
}
addParam.setStatus("1");
addParamList.add(addParam);
}
for (ExpertDto.AddParam addParam : addParamList) {
this.add(addParam);
}
}catch (Exception e){
e.printStackTrace();
throw new DataException(e.getMessage());
}
}
} }

713
jnpf-tendering-biz/src/main/java/jnpf/service/impl/LotteryProjectServiceImpl.java

@ -1,17 +1,28 @@
package jnpf.service.impl; package jnpf.service.impl;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.date.LocalDateTimeUtil;
import cn.hutool.core.io.resource.ResourceUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.xuyanwu.spring.file.storage.FileInfo;
import cn.xuyanwu.spring.file.storage.MockMultipartFile;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.google.protobuf.ServiceException; import com.google.protobuf.ServiceException;
import jnpf.base.UserInfo; import jnpf.base.UserInfo;
import jnpf.base.vo.DownloadVO;
import jnpf.constant.FileTypeConstant;
import jnpf.entity.Expert;
import jnpf.entity.LotteryProject; import jnpf.entity.LotteryProject;
import jnpf.entity.LotteryReview;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import jnpf.file.FileApi;
import jnpf.file.FileUploadApi;
import jnpf.mapper.LotteryProjectMapper; import jnpf.mapper.LotteryProjectMapper;
import jnpf.model.dto.ExpertDto;
import jnpf.model.dto.IndicatorStatisticsDto; import jnpf.model.dto.IndicatorStatisticsDto;
import jnpf.model.dto.LotteryProjectDto; import jnpf.model.dto.LotteryProjectDto;
import jnpf.permission.OrganizeApi; import jnpf.permission.OrganizeApi;
@ -19,16 +30,28 @@ import jnpf.permission.entity.OrganizeEntity;
import jnpf.permission.model.authorize.AuthorizeConditionModel; import jnpf.permission.model.authorize.AuthorizeConditionModel;
import jnpf.permission.service.OrganizeService; import jnpf.permission.service.OrganizeService;
import jnpf.service.CustomAuthService; import jnpf.service.CustomAuthService;
import jnpf.service.ExpertService;
import jnpf.service.ILotteryProjectService; import jnpf.service.ILotteryProjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.service.ILotteryReviewService;
import jnpf.util.UploaderUtil;
import jnpf.util.UserProvider; import jnpf.util.UserProvider;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
import org.apache.poi.xwpf.usermodel.*;
import org.openxmlformats.schemas.wordprocessingml.x2006.main.STMerge;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.io.*;
import java.math.BigInteger;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/** /**
* <p> * <p>
@ -45,6 +68,12 @@ public class LotteryProjectServiceImpl extends ServiceImpl<LotteryProjectMapper,
private final UserProvider userProvider; private final UserProvider userProvider;
private final OrganizeApi organizeService; private final OrganizeApi organizeService;
private final ILotteryReviewService iLotteryReviewService;
private final RedisSerialNumberGenerator redisSerialNumberGenerator;
private final ExpertService expertService;
private static final String ROUND_KEY = "roundKey:";
private final FileUploadApi fileUploadApi;
private final FileApi fileApi;
@Override @Override
public void add(LotteryProjectDto.AddParam param) { public void add(LotteryProjectDto.AddParam param) {
@ -74,7 +103,8 @@ public class LotteryProjectServiceImpl extends ServiceImpl<LotteryProjectMapper,
} }
LotteryProject lotteryProject = BeanUtil.copyProperties(param, LotteryProject.class); LotteryProject lotteryProject = BeanUtil.copyProperties(param, LotteryProject.class);
lotteryProject.setBidOpeningTime(LocalDate.parse(LocalDateTimeUtil.format(param.getBidEvaluationTime(), "yyyy-MM-dd"))); lotteryProject.setBidOpeningTime(LocalDate.parse(LocalDateTimeUtil.format(param.getBidEvaluationTime(), "yyyy-MM-dd")));
UserInfo userInfo = userProvider.get();; UserInfo userInfo = userProvider.get();
;
lotteryProject.setUpdateId(userInfo.getUserId()); lotteryProject.setUpdateId(userInfo.getUserId());
lotteryProject.setUpdateName(userInfo.getUserName()); lotteryProject.setUpdateName(userInfo.getUserName());
lotteryProject.setUpdateTime(LocalDateTime.now()); lotteryProject.setUpdateTime(LocalDateTime.now());
@ -95,7 +125,6 @@ public class LotteryProjectServiceImpl extends ServiceImpl<LotteryProjectMapper,
} }
private final CustomAuthService customAuthService; private final CustomAuthService customAuthService;
private QueryWrapper<T> getAuthWrapper(String menuId) { private QueryWrapper<T> getAuthWrapper(String menuId) {
@ -107,6 +136,7 @@ public class LotteryProjectServiceImpl extends ServiceImpl<LotteryProjectMapper,
} }
return null; return null;
} }
@Override @Override
public Page<LotteryProjectDto.QueryResponse> queryList(LotteryProjectDto.QueryListParam param) { public Page<LotteryProjectDto.QueryResponse> queryList(LotteryProjectDto.QueryListParam param) {
if (param.getPageNum() == null) { if (param.getPageNum() == null) {
@ -131,4 +161,683 @@ public class LotteryProjectServiceImpl extends ServiceImpl<LotteryProjectMapper,
} }
return this.getBaseMapper().queryInfo(id); return this.getBaseMapper().queryInfo(id);
} }
@Override
public void addReview(LotteryProjectDto.AddReviewParam param) {
if (StrUtil.isBlank(param.getId())) {
throw new DataException("抽签项目不能为空");
}
if (!this.lambdaQuery()
.eq(LotteryProject::getId, param.getId())
.exists()) {
throw new DataException("抽签项目不存在");
}
LotteryReview lotteryReview = new LotteryReview();
lotteryReview.setExpertGroupInfo(param.getExpertGroupInfo());
lotteryReview.setCreateTime(LocalDateTime.now());
lotteryReview.setRelationId(param.getId());
lotteryReview.setDelFlag("0");
//查询评审次数
Long count = iLotteryReviewService.lambdaQuery()
.eq(LotteryReview::getRelationId, param.getId())
.eq(LotteryReview::getDelFlag, "0")
.count();
lotteryReview.setCount((count + 1) + "");
iLotteryReviewService.save(lotteryReview);
}
@Override
public void editReview(LotteryProjectDto.EditReviewParam param) {
if (StrUtil.isBlank(param.getId())) {
throw new DataException("评审id不能为空");
}
LotteryReview lotteryReview = iLotteryReviewService.getById(param.getId());
lotteryReview.setExpertGroupInfo(param.getExpertGroupInfo());
iLotteryReviewService.saveOrUpdate(lotteryReview);
}
@Override
public void participateInConfirmation(LotteryProjectDto.ParticipateInConfirmationParam param) {
if (StrUtil.isBlank(param.getStatus())) {
throw new DataException("状态不能为空");
}
if (StrUtil.isBlank(param.getId())) {
throw new DataException("评审id不能为空");
}
LotteryReview lotteryReview = iLotteryReviewService.getById(param.getId());
if (null == lotteryReview) {
throw new DataException("评审不存在");
}
if (StrUtil.isBlank(param.getExpertId())) {
throw new DataException("评审专家id不能为空");
}
List<LotteryProjectDto.ExtractExpertsInfo> extractExpertsInfo = lotteryReview.getExtractExpertsInfo();
if (null == extractExpertsInfo) {
throw new DataException("请先保存评审信息");
}
Optional<LotteryProjectDto.ExtractExpertsInfo> expertsInfo = extractExpertsInfo.stream().filter(e -> e.getId().equals(param.getExpertId())).findFirst();
if (!expertsInfo.isPresent()) {
throw new DataException("评审专家未被抽取");
}
UserInfo userInfo = userProvider.get();
LotteryProjectDto.ExtractExpertsInfo extractExpertsInfoComfirm = expertsInfo.get();
String status = param.getStatus();
//确认参加修改组别确认人数
if (StrUtil.equals(status, "1") && null != lotteryReview.getExpertGroupInfo()) {
List<LotteryProjectDto.ExpertGroupInfo> expertGroupInfo = lotteryReview.getExpertGroupInfo();
for (LotteryProjectDto.ExpertGroupInfo groupInfo : expertGroupInfo) {
if (!groupInfo.getGroupCode().equals(extractExpertsInfoComfirm.getExpertGroup())) {
continue;
}
groupInfo.setNumberOfParticipants((Integer.parseInt(groupInfo.getNumberOfParticipants()) + 1) + "");
}
}
extractExpertsInfoComfirm.setStatus(status);
extractExpertsInfoComfirm.setRemark(param.getRemark());
extractExpertsInfoComfirm.setConfirmTime(LocalDateTime.now());
extractExpertsInfoComfirm.setConfirmId(userInfo.getUserId());
extractExpertsInfoComfirm.setConfirmName(userInfo.getUserName());
extractExpertsInfoComfirm.setShowJoinButton(false);
iLotteryReviewService.updateById(lotteryReview);
}
@Override
public LotteryProjectDto.QueryReviewResponse queryReviewInfo(String id) {
if (StrUtil.isBlank(id)) {
throw new DataException("评审信息id不能为空");
}
return iLotteryReviewService.queryReviewInfo(id);
}
@Override
public void deleteReview(LotteryProjectDto.DeleteReviewParam param) {
if (StrUtil.isBlank(param.getId())) {
throw new DataException("评审信息id不能为空");
}
iLotteryReviewService.lambdaUpdate()
.set(LotteryReview::getDelFlag, "1")
.eq(LotteryReview::getId, param.getId())
.update();
}
@Override
public void saveExtractionResults(LotteryProjectDto.SaveExtractionResultsParam param) {
if (StrUtil.isBlank(param.getId())) {
throw new DataException("评审信息id不能为空");
}
LotteryReview lotteryReview = iLotteryReviewService.getById(param.getId());
//获取抽取轮次
long round = redisSerialNumberGenerator.generateSerialNumber(ROUND_KEY + lotteryReview.getId(), 1L);
//组别删除按钮不再展示
if (round >= 1L && null != lotteryReview.getExpertGroupInfo()) {
for (LotteryProjectDto.ExpertGroupInfo expertGroupInfo : lotteryReview.getExpertGroupInfo()) {
expertGroupInfo.setShowDelButton(false);
}
}
List<String> oldExpertIdList = null;
if (null != lotteryReview.getExtractExpertsInfo()) {
oldExpertIdList = lotteryReview.getExtractExpertsInfo().stream().map(LotteryProjectDto.ExtractExpertsInfo::getId).collect(Collectors.toList());
}
//配置抽取轮次
for (LotteryProjectDto.ExtractExpertsInfo extractExpertsInfo : param.getExtractExpertsInfo()) {
if (CollectionUtil.isNotEmpty(oldExpertIdList)) {
if (oldExpertIdList.contains(extractExpertsInfo.getId())) {
continue;
}
}
if (StrUtil.isBlank(extractExpertsInfo.getExtractionRounds())) {
extractExpertsInfo.setExtractionRounds(round + "");
}
if (null == lotteryReview.getExtractExpertsInfo()) {
lotteryReview.setExtractExpertsInfo(new ArrayList<>());
}
lotteryReview.getExtractExpertsInfo().add(extractExpertsInfo);
}
iLotteryReviewService.updateById(lotteryReview);
}
@Override
public List<Expert> getExpertsByType(String reviewId, String expertGroup) {
if (StrUtil.isBlank(reviewId) || StrUtil.isBlank(expertGroup)) {
throw new DataException("评审信息id和抽取类型不能为空");
}
//获取评审信息
LotteryReview lotteryReview = iLotteryReviewService.getById(reviewId);
//获取已专家编号列表抽取
List<String> expertIdList = null;
if (null != lotteryReview.getExtractExpertsInfo()) {
expertIdList = lotteryReview.getExtractExpertsInfo().stream().map(LotteryProjectDto.ExtractExpertsInfo::getId).collect(Collectors.toList());
}
return expertService.lambdaQuery()
.eq(Expert::getStatus, "0")
.eq(Expert::getDelFlag, "0")
.eq(Expert::getDataType, "1")
.eq(Expert::getExpertGroup, expertGroup)
.notIn(CollectionUtil.isNotEmpty(expertIdList), Expert::getId, expertIdList)
.list();
}
@Override
public DownloadVO resultPrinting(String reviewId) {
if (StrUtil.isBlank(reviewId)) {
throw new DataException("评审信息id不能为空");
}
LotteryReview lotteryReview = iLotteryReviewService.getById(reviewId);
if (null == lotteryReview.getExtractExpertsInfo()) {
throw new DataException("未抽取专家,无法打印");
}
//校验打印类型
LotteryProject lotteryProject = this.getById(lotteryReview.getRelationId());
if (null==lotteryReview.getExtractExpertsInfo()){
throw new DataException("未抽取专家,无法打印[2]");
}
List<LotteryProjectDto.ExtractExpertsInfo> extractExpertsInfo = lotteryReview.getExtractExpertsInfo().stream().filter(e->e.getStatus().equals(LotteryProjectDto.ConfirmEnum.JOIN.getCode())).collect(Collectors.toList());
DownloadVO vo = DownloadVO.builder().build();
switch (lotteryProject.getLotteryType()){
case "1":
if (CollectionUtil.isEmpty(extractExpertsInfo)){
throw new DataException("暂未有确认专家,无法打印");
}
try {
MockMultipartFile mockMultipartFile = expertPrinting("专家抽取结果打印.docx", extractExpertsInfo);
String temporaryFilePath = fileApi.getPath(FileTypeConstant.TEMPORARY);
FileInfo fileInfo = fileUploadApi.uploadFile(mockMultipartFile, temporaryFilePath, "专家抽取结果打印.docx");
vo.setName(fileInfo.getFilename());
vo.setUrl(UploaderUtil.uploaderFile(fileInfo.getFilename() + "#" + "Temporary") + "&name=" + "专家抽取结果打印.docx");
} catch (Exception e) {
log.error("专家抽取结果打印异常", e);
}
break;
case "2":
try {
if (CollectionUtil.isEmpty(extractExpertsInfo)){
throw new DataException("暂未有确认公司,无法打印");
}
MockMultipartFile mockMultipartFile = companyPrinting("招投标公司抽取结果打印.docx", extractExpertsInfo);
String temporaryFilePath = fileApi.getPath(FileTypeConstant.TEMPORARY);
FileInfo fileInfo = fileUploadApi.uploadFile(mockMultipartFile, temporaryFilePath, "招投标公司抽取结果打印.docx");
vo.setName(fileInfo.getFilename());
vo.setUrl(UploaderUtil.uploaderFile(fileInfo.getFilename() + "#" + "Temporary") + "&name=" + "招投标公司抽取结果打印.docx");
} catch (Exception e) {
log.error("专家抽取结果打印异常", e);
}
break;
}
return vo;
}
private MockMultipartFile expertPrinting(String fileName, List<LotteryProjectDto.ExtractExpertsInfo> data) throws Exception {
try (InputStream inputStream = ResourceUtil.getStream("jnpf/templete/浙江出版传媒股份有限公司ERP系统建设项目.docx");
XWPFDocument doc = new XWPFDocument(inputStream)) {
// 找到标记位置的段落
XWPFParagraph placeholderParagraph = null;
for (XWPFParagraph paragraph : doc.getParagraphs()) {
if (paragraph.getText().contains("{{table_here}}")) {
placeholderParagraph = paragraph;
break;
}
}
if (placeholderParagraph == null) {
throw new IllegalStateException("Cannot find placeholder in the document.");
}
// 删除包含占位符的段落
XWPFRun run = placeholderParagraph.getRuns().get(0);
run.setText(run.getText(0).replace("{{table_here}}", ""), 0);
// 在占位符位置插入表格
// 插入表格到占位符位置后
// XWPFTable table = doc.createTable();
XWPFTable table = doc.insertNewTbl(placeholderParagraph.getCTP().newCursor());
table.setWidth("100%");
// 创建表头
XWPFTableRow headerRow = table.getRow(0);
headerRow.getCell(0).setText("专家编号");
headerRow.addNewTableCell().setText("专家姓名");
headerRow.addNewTableCell().setText("出版集团");
headerRow.addNewTableCell().setText("联系方式");
headerRow.addNewTableCell().setText("备注");
// 填充表格数据
for (LotteryProjectDto.ExtractExpertsInfo datum : data) {
XWPFTableRow row = table.createRow();
row.getCell(0).setText(datum.getId());
row.getCell(1).setText(datum.getExpertName());
row.getCell(2).setText(datum.getWorkUnit());
row.getCell(3).setText(datum.getPhoneNumber());
row.getCell(4).setText(datum.getRemark());
}
XWPFTableRow rowEnd = table.createRow();
rowEnd.getCell(3).setText("总人数:" + data.size());
for (XWPFTableRow row : table.getRows()) {
for (XWPFTableCell tableCell : row.getTableCells()) {
List<XWPFParagraph> paragraphs = tableCell.getParagraphs();
for (XWPFParagraph paragraph : paragraphs) {
List<XWPFRun> runs = paragraph.getRuns();
for (XWPFRun xwpfRun : runs) {
xwpfRun.setFontFamily("仿宋");
xwpfRun.setFontSize(10);
}
}
}
}
// 保存Word文档
// try (FileOutputStream fos = new FileOutputStream("/Users/yangzhenli/Documents/项目/jnpf/结果打印_out.docx")) {
// doc.write(fos);
// }
// 将XWPFDocument写入ByteArrayOutputStream
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
MockMultipartFile mockMultipartFile = null;
try {
doc.write(byteArrayOutputStream);
// 将ByteArrayOutputStream转换为MockMultipartFile
mockMultipartFile = new MockMultipartFile(
fileName, // 文件名
fileName, // 原始文件名
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", // ContentType
byteArrayOutputStream.toByteArray() // 文件内容
);
} finally {
if (null != byteArrayOutputStream) {
byteArrayOutputStream.close();
}
} }
return mockMultipartFile;
}
}
private MockMultipartFile companyPrinting(String fileName, List<LotteryProjectDto.ExtractExpertsInfo> data) throws Exception {
try (InputStream inputStream = ResourceUtil.getStream("jnpf/templete/招投标公司打印.docx");
XWPFDocument doc = new XWPFDocument(inputStream)) {
// 找到标记位置的段落
XWPFParagraph placeholderParagraph = null;
for (XWPFParagraph paragraph : doc.getParagraphs()) {
if (paragraph.getText().contains("{{table_here}}")) {
placeholderParagraph = paragraph;
break;
}
}
if (placeholderParagraph == null) {
throw new IllegalStateException("Cannot find placeholder in the document.");
}
// 删除包含占位符的段落
XWPFRun run = placeholderParagraph.getRuns().get(0);
run.setText(run.getText(0).replace("{{table_here}}", ""), 0);
// 在占位符位置插入表格
// 插入表格到占位符位置后
// XWPFTable table = doc.createTable();
XWPFTable table = doc.insertNewTbl(placeholderParagraph.getCTP().newCursor());
table.setWidth("100%");
XWPFTableRow headerRow = table.getRow(0);
headerRow.getCell(0).setText("公司编号");
headerRow.addNewTableCell().setText("招投标公司");
headerRow.addNewTableCell().setText("联系人");
headerRow.addNewTableCell().setText("联系方式");
headerRow.addNewTableCell().setText("备注");
// // 填充表格数据
for (LotteryProjectDto.ExtractExpertsInfo datum : data) {
int i = 0;
int startRowNum=1;
for (ExpertDto.ContactInformation contactInformation : datum.getContactInformation()) {
XWPFTableRow row = table.createRow();
row.getCell(0).setText(datum.getId());
row.getCell(1).setText(datum.getCompanyName());
row.getCell(2).setText(contactInformation.getContactName());
row.getCell(3).setText(contactInformation.getContactPhone());
row.getCell(4).setText(datum.getRemark());
if (i == 0) {
startRowNum=table.getRows().indexOf(row);
datum.setId("");
datum.setCompanyName("");
}
i++;
}
mergeCellsVertically(table,0,startRowNum,(datum.getContactInformation().size()-1)+startRowNum);
mergeCellsVertically(table,1,startRowNum,(datum.getContactInformation().size()-1)+startRowNum);
mergeCellsVertically(table,4,startRowNum,(datum.getContactInformation().size()-1)+startRowNum);
}
// 保存Word文档
// try (FileOutputStream fos = new FileOutputStream("/Users/yangzhenli/Documents/项目/jnpf/结果打印_out.docx")) {
// doc.write(fos);
// }
// 将XWPFDocument写入ByteArrayOutputStream
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
MockMultipartFile mockMultipartFile = null;
try {
doc.write(byteArrayOutputStream);
// 将ByteArrayOutputStream转换为MockMultipartFile
mockMultipartFile = new MockMultipartFile(
fileName, // 文件名
fileName, // 原始文件名
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", // ContentType
byteArrayOutputStream.toByteArray() // 文件内容
);
} finally {
byteArrayOutputStream.close();
}
return mockMultipartFile;
}
}
@Override
public void uploadExtractionResults(LotteryProjectDto.UploadExtractionResults param) {
if (StrUtil.isBlank(param.getId())) {
throw new DataException("id不能为空");
}
LotteryProject lotteryProject = this.getById(param.getId());
lotteryProject.setUploadResultsInfo(param.getUploaderVO());
lotteryProject.setStatus(LotteryProjectDto.StatusEnum.ALREADY_EXTRACTED.getCode());
lotteryProject.setStatusName(LotteryProjectDto.StatusEnum.ALREADY_EXTRACTED.getDescribe());
this.saveOrUpdate(lotteryProject);
}
@Override
public List<Expert> getCompanyByReview(String reviewId) {
if (StrUtil.isBlank(reviewId)) {
throw new DataException("评审ID不能为空");
}
//获取评审信息
LotteryReview lotteryReview = iLotteryReviewService.getById(reviewId);
//获取已专家编号列表抽取
List<String> expertIdList = null;
if (null != lotteryReview.getExtractExpertsInfo()) {
expertIdList = lotteryReview.getExtractExpertsInfo().stream().map(LotteryProjectDto.ExtractExpertsInfo::getId).collect(Collectors.toList());
}
return expertService.lambdaQuery()
.eq(Expert::getStatus, "0")
.eq(Expert::getDelFlag, "0")
.eq(Expert::getDataType, "2")
.notIn(CollectionUtil.isNotEmpty(expertIdList), Expert::getId, expertIdList)
.list();
}
public static void main(String[] args) throws IOException {
String s = "[\n" +
" {\n" +
" \"id\": \"EXPERT00010\",\n" +
" \"expertName\": \"测试专家\",\n" +
" \"expertGroup\": \"\",\n" +
" \"phoneNumber\": \"13467167538\",\n" +
" \"workUnit\": \"工作单位\",\n" +
" \"confirmTime\": \"2024-09-03 15:09:50\",\n" +
" \"confirmName\": \"一级\",\n" +
" \"confirmId\": \"568797187002084037\",\n" +
" \"status\": \"1\",\n" +
" \"remark\": \"同意\",\n" +
" \"showJoinButton\": false,\n" +
" \"extractionRounds\": \"4\"\n" +
" },\n" +
" {\n" +
" \"id\": \"EXPERT00011\",\n" +
" \"expertName\": \"测试专家2\",\n" +
" \"expertGroup\": \"\",\n" +
" \"phoneNumber\": \"13467167539\",\n" +
" \"workUnit\": \"工作单位2\",\n" +
" \"confirmTime\": \"2024-09-03 15:10:38\",\n" +
" \"confirmName\": \"一级\",\n" +
" \"confirmId\": \"568797187002084037\",\n" +
" \"status\": \"1\",\n" +
" \"remark\": \"同意\",\n" +
" \"showJoinButton\": false,\n" +
" \"extractionRounds\": \"5\"\n" +
" }\n" +
" ]";
String s2 = "[\n" +
" {\n" +
" \"id\": \"COMPANY00002\",\n" +
" \"expertName\": null,\n" +
" \"expertGroup\": null,\n" +
" \"phoneNumber\": null,\n" +
" \"workUnit\": null,\n" +
" \"confirmTime\": \"2024-09-04 11:08:31\",\n" +
" \"confirmName\": \"一级\",\n" +
" \"confirmId\": \"568797187002084037\",\n" +
" \"status\": \"1\",\n" +
" \"remark\": \"通过\",\n" +
" \"showJoinButton\": false,\n" +
" \"contactInformation\":\n" +
" [\n" +
" {\n" +
" \"contactName\": \"杨振立\",\n" +
" \"contactPhone\": \"18177857446\"\n" +
" }\n" +
" ],\n" +
" \"companyName\": \"测试公司名称\",\n" +
" \"extractionRounds\": \"1\"\n" +
" },\n" +
" {\n" +
" \"id\": \"COMPANY00002\",\n" +
" \"expertName\": null,\n" +
" \"expertGroup\": null,\n" +
" \"phoneNumber\": null,\n" +
" \"workUnit\": null,\n" +
" \"confirmTime\": \"2024-09-04 11:08:31\",\n" +
" \"confirmName\": \"一级\",\n" +
" \"confirmId\": \"568797187002084037\",\n" +
" \"status\": \"1\",\n" +
" \"remark\": \"通过\",\n" +
" \"showJoinButton\": false,\n" +
" \"contactInformation\":\n" +
" [\n" +
" {\n" +
" \"contactName\": \"杨振立\",\n" +
" \"contactPhone\": \"18177857446\"\n" +
" },\n" +
" {\n" +
" \"contactName\": \"联系姓名1\",\n" +
" \"contactPhone\": \"18104627731\"\n" +
" }\n" +
" ],\n" +
" \"companyName\": \"测试公司名称\",\n" +
" \"extractionRounds\": \"1\"\n" +
" }\n" +
"]";
// List<LotteryProjectDto.ExtractExpertsInfo> data = JSON.parseArray(s, LotteryProjectDto.ExtractExpertsInfo.class);
List<LotteryProjectDto.ExtractExpertsInfo> data = JSON.parseArray(s2, LotteryProjectDto.ExtractExpertsInfo.class);
try (InputStream inputStream = new FileInputStream(new File("/Users/yangzhenli/Documents/项目/jnpf/浙江出版传媒股份有限公司ERP系统建设项目.docx"));
XWPFDocument doc = new XWPFDocument(inputStream)) {
// 找到标记位置的段落
XWPFParagraph placeholderParagraph = null;
for (XWPFParagraph paragraph : doc.getParagraphs()) {
if (paragraph.getText().contains("{{table_here}}")) {
placeholderParagraph = paragraph;
break;
}
}
if (placeholderParagraph == null) {
throw new IllegalStateException("Cannot find placeholder in the document.");
}
// 删除包含占位符的段落
XWPFRun run = placeholderParagraph.getRuns().get(0);
run.setText(run.getText(0).replace("{{table_here}}", ""), 0);
// 在占位符位置插入表格
// 插入表格到占位符位置后
// XWPFTable table = doc.createTable();
XWPFTable table = doc.insertNewTbl(placeholderParagraph.getCTP().newCursor());
table.setWidth("100%");
XWPFTableRow headerRow = table.getRow(0);
headerRow.getCell(0).setText("公司编号");
headerRow.addNewTableCell().setText("招投标公司");
headerRow.addNewTableCell().setText("联系人");
headerRow.addNewTableCell().setText("联系方式");
headerRow.addNewTableCell().setText("备注");
// // 填充表格数据
for (LotteryProjectDto.ExtractExpertsInfo datum : data) {
int i = 0;
int startRowNum=1;
for (ExpertDto.ContactInformation contactInformation : datum.getContactInformation()) {
XWPFTableRow row = table.createRow();
row.getCell(0).setText(datum.getId());
row.getCell(1).setText(datum.getCompanyName());
row.getCell(2).setText(contactInformation.getContactName());
row.getCell(3).setText(contactInformation.getContactPhone());
row.getCell(4).setText(datum.getRemark());
if (i == 0) {
startRowNum=table.getRows().indexOf(row);
datum.setId("");
datum.setCompanyName("");
}
i++;
}
mergeCellsVertically(table,0,startRowNum,(datum.getContactInformation().size()-1)+startRowNum);
mergeCellsVertically(table,1,startRowNum,(datum.getContactInformation().size()-1)+startRowNum);
mergeCellsVertically(table,4,startRowNum,(datum.getContactInformation().size()-1)+startRowNum);
}
// // 在该行中添加三个单元格
// row.createCell();
// row.createCell();
//
// // 假设我们要拆分第一个单元格
// int cellIndexToSplit = 0;
//
// // 获取要拆分的单元格
// XWPFTableCell cellToSplit = row.getCell(cellIndexToSplit);
//
// // 获取原始单元格的内容
// String originalText = cellToSplit.getText();
//
// // 移除第一个单元格
// row.removeCell(cellIndexToSplit);
//
// // 创建两个新单元格
// XWPFTableCell newCell1 = row.createCell();
// XWPFTableCell newCell2 = row.createCell();
//
// // 设置新单元格的内容
// newCell1.setText("First part of split");
// newCell2.setText("Second part of split");
//
// // 将新的单元格移到正确的位置
// // POI中不能直接在特定位置插入新单元格,只能依次添加。
// // 因此,我们需要重新调整所有单元格的顺序。
//
// // 调整现有单元格的顺序,确保表格结构正确
// XWPFTableCell thirdCell = row.getCell(2); // 获取原始的第三个单元格
// row.removeCell(2); // 移除第三个单元格
// row.addNewTableCell(); // 重新创建第二个单元格(此时是新创建的空单元格)
// row.addNewTableCell(); // 创建第三个单元格(空)
// 将原始第三个单元格的内容移动到最后
// row.getCell(2).setText(thirdCell.getText());
// // 创建表头
// XWPFTableRow headerRow = table.getRow(0);
// headerRow.getCell(0).setText("专家编号");
// headerRow.addNewTableCell().setText("专家姓名");
// headerRow.addNewTableCell().setText("出版集团");
// headerRow.addNewTableCell().setText("联系方式");
// headerRow.addNewTableCell().setText("备注");
//
// // 填充表格数据
// for (LotteryProjectDto.ExtractExpertsInfo datum : data) {
//
// XWPFTableRow row = table.createRow();
// row.getCell(0).setText(datum.getId());
// row.getCell(1).setText(datum.getExpertName());
// row.getCell(2).setText(datum.getWorkUnit());
// row.getCell(3).setText(datum.getPhoneNumber());
// row.getCell(4).setText(datum.getRemark());
// }
// XWPFTableRow rowEnd = table.createRow();
// XWPFTableCell cell = rowEnd.getCell(0);
// // 设置单元格的文本
// // 获取或创建 TcPr(单元格属性)
// if (cell.getCTTc().getTcPr() == null) {
// cell.getCTTc().addNewTcPr();
// }
// cell.setText("总人数: "+data.size()+" ");
// // 合并第一行的单元格,从第一个单元格到第5个单元格
// for (int colIndex = 0; colIndex <= 4; colIndex++) {
// XWPFTableCell cell1 = rowEnd.getCell(colIndex);
// if (cell1.getCTTc().getTcPr() == null) {
// cell1.getCTTc().addNewTcPr();
// }
// if (colIndex == 0) {
// // 设置起始单元格跨越的列数
// cell1.getCTTc().getTcPr().addNewHMerge().setVal(STMerge.RESTART);
// } else {
// // 其他单元格设为继续合并
// cell1.getCTTc().getTcPr().addNewHMerge().setVal(STMerge.CONTINUE);
// }
// }
//
// // 设置单元格文本向右对齐
// cell.getParagraphs().get(0).setAlignment(ParagraphAlignment.RIGHT);
//
// for (XWPFTableRow row : table.getRows()) {
// for (XWPFTableCell tableCell : row.getTableCells()) {
// List<XWPFParagraph> paragraphs = tableCell.getParagraphs();
// for (XWPFParagraph paragraph : paragraphs) {
// List<XWPFRun> runs = paragraph.getRuns();
// for (XWPFRun xwpfRun : runs) {
// xwpfRun.setFontFamily("仿宋");
// xwpfRun.setFontSize(10);
// }
// }
// }
// }
// 保存Word文档
try (FileOutputStream fos = new FileOutputStream("/Users/yangzhenli/Documents/项目/jnpf/结果打印_out.docx")) {
doc.write(fos);
}
}
}
private static void mergeCellsVertically(XWPFTable table, int col, int fromRow, int toRow) {
for (int rowIndex = fromRow; rowIndex <= toRow; rowIndex++) {
XWPFTableCell cell = table.getRow(rowIndex).getCell(col);
if (rowIndex == fromRow) {
// 设置合并的起始单元格的属性
cell.getCTTc().addNewTcPr().addNewVMerge().setVal(STMerge.Enum.forString("restart"));
} else {
// 设置被合并的单元格的属性
cell.getCTTc().addNewTcPr().addNewVMerge().setVal(STMerge.Enum.forString("continue"));
}
}
}
}

31
jnpf-tendering-biz/src/main/java/jnpf/service/impl/LotteryReviewServiceImpl.java

@ -1,11 +1,16 @@
package jnpf.service.impl; package jnpf.service.impl;
import cn.hutool.core.util.StrUtil;
import jnpf.entity.LotteryReview; import jnpf.entity.LotteryReview;
import jnpf.exception.DataException;
import jnpf.mapper.LotteryReviewMapper; import jnpf.mapper.LotteryReviewMapper;
import jnpf.model.dto.LotteryProjectDto;
import jnpf.service.ILotteryReviewService; import jnpf.service.ILotteryReviewService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* <p> * <p>
* 评审次数 服务实现类 * 评审次数 服务实现类
@ -16,5 +21,31 @@ import org.springframework.stereotype.Service;
*/ */
@Service @Service
public class LotteryReviewServiceImpl extends ServiceImpl<LotteryReviewMapper, LotteryReview> implements ILotteryReviewService { public class LotteryReviewServiceImpl extends ServiceImpl<LotteryReviewMapper, LotteryReview> implements ILotteryReviewService {
@Override
public LotteryProjectDto.QueryReviewResponse queryReviewInfo(String id) {
LotteryProjectDto.QueryReviewResponse queryReviewResponse = this.getBaseMapper().queryReviewInfo(id);
if (null==queryReviewResponse){
throw new DataException("未找到评审次数信息");
}
int extractExperts = 0;
if (null != queryReviewResponse.getExpertGroupInfo()) {
//抽取专家计算
List<LotteryProjectDto.ExpertGroupInfo> expertGroupInfo = queryReviewResponse.getExpertGroupInfo();
for (LotteryProjectDto.ExpertGroupInfo groupInfo : expertGroupInfo) {
String numberOfExtract = groupInfo.getNumberOfExtract();
if (StrUtil.isBlank(numberOfExtract)) {
continue;
}
extractExperts += Integer.parseInt(numberOfExtract);
}
queryReviewResponse.setExtractExperts(extractExperts);
}
//确认参加计算
if (null != queryReviewResponse.getExtractExpertsInfo()) {
// queryReviewResponse.setExtractExperts(queryReviewResponse.getExtractExpertsInfo().size());
queryReviewResponse.setConfirmParticipation(Integer.parseInt(queryReviewResponse.getExtractExpertsInfo().stream().filter(item -> StrUtil.equals(item.getStatus(), LotteryProjectDto.ConfirmEnum.JOIN.getCode())).count()+""));
}
return queryReviewResponse;
}
} }

6
jnpf-tendering-biz/src/main/java/jnpf/service/impl/RedisSerialNumberGenerator.java

@ -24,4 +24,10 @@ public class RedisSerialNumberGenerator {
// 使用Redis的INCR命令原子递增 // 使用Redis的INCR命令原子递增
return redisTemplate.opsForValue().increment(redisKey); return redisTemplate.opsForValue().increment(redisKey);
} }
public long generateSerialNumber(String key,long defaultValue){
String redisKey = SERIAL_KEY_PREFIX + key;
// 使用Redis的INCR命令原子递增
return redisTemplate.opsForValue().increment(redisKey,defaultValue);
}
} }

13
jnpf-tendering-biz/src/main/resources/mapper/ExpertMapper.xml

@ -25,11 +25,12 @@
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
<result property="updateId" column="update_id"/> <result property="updateId" column="update_id"/>
<result property="updateName" column="update_name"/> <result property="updateName" column="update_name"/>
<result property="contactInformation" column="contact_information" typeHandler="jnpf.model.ContactInformationTypeHandler"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id id
,expert_name ,expert_group ,company_name ,phone_number ,birthday ,expert_sources ,work_unit ,post ,technical_position ,professional_expertise ,sex ,working_years ,del_flag ,status ,data_type ,create_time ,create_id ,create_name ,update_time ,update_id ,update_name ,expert_name ,expert_group ,company_name ,phone_number ,birthday ,expert_sources ,work_unit ,post ,technical_position ,professional_expertise ,sex ,working_years ,del_flag ,status ,data_type ,create_time ,create_id ,create_name ,update_time ,update_id ,update_name,contact_information
</sql> </sql>
<select id="queryList" resultMap="resultMap"> <select id="queryList" resultMap="resultMap">
select select
@ -48,6 +49,16 @@
<if test="param.workUnit !=null and param.workUnit !=''"> <if test="param.workUnit !=null and param.workUnit !=''">
and work_unit like '%' #{param.workUnit} '%' and work_unit like '%' #{param.workUnit} '%'
</if> </if>
<if test="param.concatPerson !=null and param.concatPerson !=''">
and contact_information like '%' #{param.concatPerson} '%'
</if>
<if test="param.dataType !=null and param.dataType !=''">
and data_type = #{param.dataType}
</if>
<if test="param.expertGroup !=null and param.expertGroup !=''">
and expert_group = #{param.expertGroup}
</if>
order by create_time desc order by create_time desc
</select> </select>
<select id="queryInfo" resultMap="resultMap"> <select id="queryInfo" resultMap="resultMap">

29
jnpf-tendering-biz/src/main/resources/mapper/LotteryProjectMapper.xml

@ -23,10 +23,11 @@
<result property="updateId" column="update_id"/> <result property="updateId" column="update_id"/>
<result property="updateName" column="update_name"/> <result property="updateName" column="update_name"/>
<result property="type" column="type"/> <result property="type" column="type"/>
<result property="lotteryType" column="lottery_type"/>
</resultMap> </resultMap>
<sql id="baseQuery"> <sql id="baseQuery">
id ,status ,relation_id ,project_number ,project_name ,bid_opening_time ,bid_evaluation_time ,bid_evaluation_location ,agency ,status_name ,remake ,user_dept_name ,user_dept_id ,create_id ,create_time ,create_name ,update_id ,update_time ,update_name ,type ,del_flag id ,status ,relation_id ,project_number ,project_name ,bid_opening_time ,bid_evaluation_time ,bid_evaluation_location ,agency ,status_name ,remake ,user_dept_name ,user_dept_id ,create_id ,create_time ,create_name ,update_id ,update_time ,update_name ,type ,del_flag,upload_results_info,lottery_type
</sql> </sql>
<select id="queryList" resultMap="resultMap"> <select id="queryList" resultMap="resultMap">
select <include refid="baseQuery"/> select <include refid="baseQuery"/>
@ -38,9 +39,13 @@
<if test="query.projectNumber != null and query.projectNumber != ''"> <if test="query.projectNumber != null and query.projectNumber != ''">
AND project_number like '%' #{query.projectNumber} '%' AND project_number like '%' #{query.projectNumber} '%'
</if> </if>
<if test="query.lotteryType != null and query.lotteryType != ''">
AND lottery_type = #{query.lotteryType}
</if>
<if test="sql != null and sql !=''"> <if test="sql != null and sql !=''">
and ${sql} and ${sql}
</if> </if>
order by create_time desc
</select> </select>
<resultMap id="infoMap" type="jnpf.model.dto.LotteryProjectDto$QueryResponse"> <resultMap id="infoMap" type="jnpf.model.dto.LotteryProjectDto$QueryResponse">
@ -64,7 +69,29 @@
<result property="updateId" column="update_id"/> <result property="updateId" column="update_id"/>
<result property="updateName" column="update_name"/> <result property="updateName" column="update_name"/>
<result property="type" column="type"/> <result property="type" column="type"/>
<result property="lotteryType" column="lottery_type"/>
<result property="uploadResultsInfo" column="upload_results_info" typeHandler="jnpf.model.JsonTypeHandler"/>
<collection property="lotteryReviewList" select="queryLotteryReviewList" column="id" javaType="list"/>
</resultMap>
<resultMap id="lotteryReviewMap" type="jnpf.model.dto.LotteryProjectDto$QueryReviewResponse">
<id property="id" column="id"/>
<result property="count" column="count"/>
<result property="relationId" column="relation_id"/>
<result property="expertGroupInfo" column="expert_group_info" typeHandler="jnpf.model.ExpertGroupInfoTypeHandler"/>
<result property="extractExpertsInfo" column="extract_experts_info" typeHandler="jnpf.model.ExtractExpertsInfoTypeHandler"/>
<result property="createTime" column="create_time"/>
<result property="delFlag" column="del_flag"/>
</resultMap> </resultMap>
<sql id="lotteryReviewFields">
id ,count ,relation_id ,expert_group_info ,extract_experts_info ,create_time ,del_flag
</sql>
<select id="queryLotteryReviewList" resultMap="lotteryReviewMap">
select <include refid="lotteryReviewFields"></include>
from t_lottery_review where relation_id=#{id} and del_flag='0' order by create_time desc
</select>
<select id="queryInfo" resultMap="infoMap"> <select id="queryInfo" resultMap="infoMap">
select <include refid="baseQuery"/> select <include refid="baseQuery"/>
from t_lottery_project from t_lottery_project

18
jnpf-tendering-biz/src/main/resources/mapper/LotteryReviewMapper.xml

@ -2,4 +2,22 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.LotteryReviewMapper"> <mapper namespace="jnpf.mapper.LotteryReviewMapper">
<resultMap id="resultMap" type="jnpf.model.dto.LotteryProjectDto$QueryReviewResponse">
<id property="id" column="id"/>
<result property="count" column="count"/>
<result property="relationId" column="relation_id"/>
<result property="expertGroupInfo" column="expert_group_info" typeHandler="jnpf.model.ExpertGroupInfoTypeHandler"/>
<result property="extractExpertsInfo" column="extract_experts_info" typeHandler="jnpf.model.ExtractExpertsInfoTypeHandler"/>
<result property="createTime" column="create_time"/>
<result property="delFlag" column="del_flag"/>
</resultMap>
<sql id="baseFields">
id ,count ,relation_id ,expert_group_info ,extract_experts_info ,create_time ,del_flag
</sql>
<select id="queryReviewInfo" resultMap="resultMap">
select <include refid="baseFields"></include>
from t_lottery_review
where del_flag = '0' and id = #{id}
</select>
</mapper> </mapper>

6
jnpf-tendering-controller/src/main/java/jnpf/controller/BiddingProjectSubscribeController.java

@ -137,7 +137,9 @@ public class BiddingProjectSubscribeController {
entity.setIsApproval(true); entity.setIsApproval(true);
} }
entity.setFlowtaskid(mainId); entity.setFlowtaskid(mainId);
if (StrUtil.isNotBlank(oldBidOpeningTime)) {
entity.setBidOpeningTime(new Date(Long.parseLong(oldBidOpeningTime))); entity.setBidOpeningTime(new Date(Long.parseLong(oldBidOpeningTime)));
}
entity.setCreateTime(LocalDateTime.now()); entity.setCreateTime(LocalDateTime.now());
entity.setUpdateTime(LocalDateTime.now()); entity.setUpdateTime(LocalDateTime.now());
checkProjectAmount(entity); checkProjectAmount(entity);
@ -245,7 +247,9 @@ public class BiddingProjectSubscribeController {
bidding_project_subscribeForm = JsonUtil.getJsonToBean( bidding_project_subscribeForm = JsonUtil.getJsonToBean(
generaterSwapUtil.swapDatetime(BiddingProjectSubscribeConstant.getFormData(), bidding_project_subscribeForm), BiddingProjectSubscribeForm.class); generaterSwapUtil.swapDatetime(BiddingProjectSubscribeConstant.getFormData(), bidding_project_subscribeForm), BiddingProjectSubscribeForm.class);
BiddingProjectSubscribeEntity subentity = JsonUtil.getJsonToBean(bidding_project_subscribeForm, BiddingProjectSubscribeEntity.class); BiddingProjectSubscribeEntity subentity = JsonUtil.getJsonToBean(bidding_project_subscribeForm, BiddingProjectSubscribeEntity.class);
subentity.setBidOpeningTime(new Date(oldBidOpeningTime)); if (StrUtil.isNotBlank(oldBidOpeningTime)) {
entity.setBidOpeningTime(new Date(Long.parseLong(oldBidOpeningTime)));
}
subentity.setUpdateTime(LocalDateTime.now()); subentity.setUpdateTime(LocalDateTime.now());
subentity.setCreateTime(entity.getCreateTime()); subentity.setCreateTime(entity.getCreateTime());
checkProjectAmount(subentity); checkProjectAmount(subentity);

11
jnpf-tendering-controller/src/main/java/jnpf/controller/ExpertController.java

@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.alibaba.fastjson.parser.Feature; import com.alibaba.fastjson.parser.Feature;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult; import jnpf.base.ActionResult;
@ -27,11 +28,12 @@ import jnpf.util.treeutil.SumTree;
import jnpf.util.treeutil.newtreeutil.TreeDotUtils; import jnpf.util.treeutil.newtreeutil.TreeDotUtils;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import java.util.*; import java.util.*;
@RestController @RestController
@Tag(name = "专家抽取相关接口", description = "example") @Api("专家管理相关接口")
@RequestMapping("/expert") @RequestMapping("/expert")
@AllArgsConstructor @AllArgsConstructor
public class ExpertController { public class ExpertController {
@ -54,6 +56,13 @@ public class ExpertController {
return ActionResult.success(); return ActionResult.success();
} }
@Operation(summary = "专家导入")
@PostMapping("/expertImport")
public ActionResult<Void> expertImport(@RequestParam(name = "file") MultipartFile file) {
expertService.expertImport(file);
return ActionResult.success();
}
@Operation(summary = "修改专家/公司") @Operation(summary = "修改专家/公司")
@PostMapping("/edit") @PostMapping("/edit")
public ActionResult<Void> update(@RequestBody ExpertDto.EditParam param) { public ActionResult<Void> update(@RequestBody ExpertDto.EditParam param) {

84
jnpf-tendering-controller/src/main/java/jnpf/controller/LotteryProjectController.java

@ -2,9 +2,12 @@ package jnpf.controller;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult; import jnpf.base.ActionResult;
import jnpf.base.vo.DownloadVO;
import jnpf.entity.Expert;
import jnpf.entity.LotteryProject; import jnpf.entity.LotteryProject;
import jnpf.model.dto.ExpertDto; import jnpf.model.dto.ExpertDto;
import jnpf.model.dto.LotteryProjectDto; import jnpf.model.dto.LotteryProjectDto;
@ -14,9 +17,11 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import java.util.List;
@RestController @RestController
@Tag(name = "项目抽签相关接口", description = "example") @Api("项目抽签相关接口")
@RequestMapping("/lottery-project") @RequestMapping("/lottery-project")
@AllArgsConstructor @AllArgsConstructor
public class LotteryProjectController { public class LotteryProjectController {
@ -59,10 +64,75 @@ public class LotteryProjectController {
} }
// @Operation(summary = "添加评审") @Operation(summary = "添加评审")
// @PostMapping("/addReview") @PostMapping("/addReview")
// public ActionResult<Void> addReview(@RequestBody LotteryProjectDto.AddReviewParam param) { public ActionResult<Void> addReview(@RequestBody LotteryProjectDto.AddReviewParam param) {
// iLotteryProjectService.addReview(param); iLotteryProjectService.addReview(param);
// return ActionResult.success(); return ActionResult.success();
// } }
@Operation(summary = "修改专家组别评审")
@PostMapping("/editReview")
public ActionResult<Void> editReview(@RequestBody LotteryProjectDto.EditReviewParam param) {
iLotteryProjectService.editReview(param);
return ActionResult.success();
}
@Operation(summary = "删除评审")
@PostMapping("/deleteReview")
public ActionResult<Void> deleteReview(@RequestBody LotteryProjectDto.DeleteReviewParam param) {
iLotteryProjectService.deleteReview(param);
return ActionResult.success();
}
@Operation(summary = "评审详情查询")
@GetMapping("/queryReviewInfo")
public ActionResult<LotteryProjectDto.QueryReviewResponse> queryReviewInfo(@RequestParam String id) {
return ActionResult.success(iLotteryProjectService.queryReviewInfo(id));
}
@Operation(summary = "抽取结果保存")
@PostMapping("/saveExtractionResults")
public ActionResult<Void> saveExtractionResults(@RequestBody LotteryProjectDto.SaveExtractionResultsParam param) {
iLotteryProjectService.saveExtractionResults(param);
return ActionResult.success();
}
@Operation(summary = "抽取结果参加确认")
@PostMapping("/participateInConfirmation")
public ActionResult<Void> participateInConfirmation(@RequestBody LotteryProjectDto.ParticipateInConfirmationParam param) {
iLotteryProjectService.participateInConfirmation(param);
return ActionResult.success();
}
@Operation(summary = "根据类型获取某评审下专家列表")
@GetMapping("/getExpertsByExpertGroup")
public ActionResult<List<Expert>> getExpertsByType(@RequestParam String reviewId, @RequestParam String expertGroup){
return ActionResult.success(iLotteryProjectService.getExpertsByType(reviewId,expertGroup));
}
@Operation(summary = "根据评审查询招标公司列表")
@GetMapping("/getCompanyByReview")
public ActionResult<List<Expert>> getCompanyByReview(@RequestParam String reviewId){
return ActionResult.success(iLotteryProjectService.getCompanyByReview(reviewId));
}
@Operation(summary = "结果打印")
@GetMapping("/resultPrinting")
public ActionResult<DownloadVO> resultPrinting(@RequestParam String reviewId){
return ActionResult.success(iLotteryProjectService.resultPrinting(reviewId));
}
@Operation(summary = "上传抽取结果")
@PostMapping("/uploadExtractionResults")
public ActionResult<Void> uploadExtractionResults(@RequestBody LotteryProjectDto.UploadExtractionResults param){
iLotteryProjectService.uploadExtractionResults(param);
return ActionResult.success();
}
} }

10
jnpf-tendering-entity/src/main/java/jnpf/entity/Expert.java

@ -4,8 +4,11 @@ import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import jnpf.model.ContactInformationTypeHandler;
import jnpf.model.dto.ExpertDto;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -19,7 +22,7 @@ import lombok.Setter;
*/ */
@Getter @Getter
@Setter @Setter
@TableName("t_expert") @TableName(value = "t_expert",autoResultMap = true)
//@ApiModel(value = "Expert对象", description = "") //@ApiModel(value = "Expert对象", description = "")
public class Expert implements Serializable { public class Expert implements Serializable {
@ -45,6 +48,11 @@ public class Expert implements Serializable {
@TableField(value = "phone_number") @TableField(value = "phone_number")
private String phoneNumber; private String phoneNumber;
// @ApiModelProperty("联系人信息(json)")
@TableField(value = "contact_information",typeHandler = ContactInformationTypeHandler.class)
private List<ExpertDto.ContactInformation> contactInformation;
// @ApiModelProperty("出生日期") // @ApiModelProperty("出生日期")
@TableField(value = "birthday") @TableField(value = "birthday")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

17
jnpf-tendering-entity/src/main/java/jnpf/entity/LotteryProject.java

@ -7,8 +7,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import jnpf.model.JsonTypeHandler;
import jnpf.model.dto.LotteryProjectDto;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -22,7 +26,7 @@ import lombok.Setter;
*/ */
@Getter @Getter
@Setter @Setter
@TableName("t_lottery_project") @TableName(value = "t_lottery_project",autoResultMap = true)
@ApiModel(value = "LotteryProject对象", description = "抽签项目表") @ApiModel(value = "LotteryProject对象", description = "抽签项目表")
public class LotteryProject implements Serializable { public class LotteryProject implements Serializable {
@ -40,6 +44,10 @@ public class LotteryProject implements Serializable {
@TableField(value = "relation_id") @TableField(value = "relation_id")
private String relationId; private String relationId;
@ApiModelProperty("抽签类型 1-专家(默认) 2-公司")
@TableField(value = "lottery_type")
private String lotteryType;
@ApiModelProperty("项目编号") @ApiModelProperty("项目编号")
@TableField(value = "project_number") @TableField(value = "project_number")
private String projectNumber; private String projectNumber;
@ -54,6 +62,7 @@ public class LotteryProject implements Serializable {
@ApiModelProperty("评标时间") @ApiModelProperty("评标时间")
@TableField(value = "bid_evaluation_time") @TableField(value = "bid_evaluation_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime bidEvaluationTime; private LocalDateTime bidEvaluationTime;
@ApiModelProperty("评标地点") @ApiModelProperty("评标地点")
@ -86,6 +95,7 @@ public class LotteryProject implements Serializable {
@ApiModelProperty("创建时间") @ApiModelProperty("创建时间")
@TableField(value = "create_time") @TableField(value = "create_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime; private LocalDateTime createTime;
@ApiModelProperty("创建人姓名") @ApiModelProperty("创建人姓名")
@ -98,6 +108,7 @@ public class LotteryProject implements Serializable {
@ApiModelProperty("更新时间") @ApiModelProperty("更新时间")
@TableField(value = "update_time") @TableField(value = "update_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime; private LocalDateTime updateTime;
@ApiModelProperty("更新人名称") @ApiModelProperty("更新人名称")
@ -112,5 +123,9 @@ public class LotteryProject implements Serializable {
@TableField(value = "del_flag") @TableField(value = "del_flag")
private String delFlag; private String delFlag;
@ApiModelProperty("结果信息")
@TableField(value ="upload_results_info",typeHandler = JsonTypeHandler.class)
private LotteryProjectDto.FileInfo uploadResultsInfo;
} }

21
jnpf-tendering-entity/src/main/java/jnpf/entity/LotteryReview.java

@ -4,9 +4,12 @@ import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import jnpf.model.JsonTypeHandler; import jnpf.model.*;
import jnpf.model.dto.LotteryProjectDto; import jnpf.model.dto.LotteryProjectDto;
import lombok.Getter; import lombok.Getter;
import lombok.Setter; import lombok.Setter;
@ -40,19 +43,21 @@ public class LotteryReview implements Serializable {
private String relationId; private String relationId;
@ApiModelProperty("专家组别信息json") @ApiModelProperty("专家组别信息json")
@TableField(value = "expert_group_info",typeHandler = JsonTypeHandler.class) @TableField(value = "expert_group_info",typeHandler = ExpertGroupInfoTypeHandler.class)
private LotteryProjectDto.ExpertGroupInfo expertGroupInfo; private List<LotteryProjectDto.ExpertGroupInfo> expertGroupInfo;
@ApiModelProperty("抽取专家信息json") @ApiModelProperty("抽取专家信息json")
@TableField(value = "extract_experts_info",typeHandler = JsonTypeHandler.class) @TableField(value = "extract_experts_info",typeHandler = ExtractExpertsInfoTypeHandler.class)
private String extractExpertsInfo; private List<LotteryProjectDto.ExtractExpertsInfo> extractExpertsInfo;
@TableField(value ="create_time") @TableField(value ="create_time")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime; private LocalDateTime createTime;
@ApiModelProperty("结果信息") @TableField(value ="del_flag")
@TableField(value ="upload_results_info",typeHandler = JsonTypeHandler.class) private String delFlag;
private String uploadResultsInfo;
} }

62
jnpf-tendering-entity/src/main/java/jnpf/model/ContactInformationTypeHandler.java

@ -0,0 +1,62 @@
package jnpf.model;
import com.alibaba.fastjson.JSON;
import jnpf.model.dto.ExpertDto;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
public class ContactInformationTypeHandler extends BaseTypeHandler<List<ExpertDto.ContactInformation>> {
private final Class<ExpertDto.ContactInformation> type;
public ContactInformationTypeHandler(Class<ExpertDto.ContactInformation> type) {
if (type == null) throw new IllegalArgumentException("Type argument cannot be null");
this.type = type;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, List<ExpertDto.ContactInformation> parameter, JdbcType jdbcType) throws SQLException {
ps.setString(i, toJson(parameter));
}
@Override
public List<ExpertDto.ContactInformation> getNullableResult(ResultSet rs, String columnName) throws SQLException {
return toObject(rs.getString(columnName));
}
@Override
public List<ExpertDto.ContactInformation> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return toObject(rs.getString(columnIndex));
}
@Override
public List<ExpertDto.ContactInformation> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return toObject(cs.getString(columnIndex));
}
private String toJson(List<ExpertDto.ContactInformation> object) {
try {
return JSON.toJSONString(object);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private List<ExpertDto.ContactInformation> toObject(String content) {
if (content == null || content.isEmpty()) {
return null;
}
try {
return JSON.parseArray(content,ExpertDto.ContactInformation.class);
// return objectMapper.readValue(content, new TypeReference<List<ExpertDto.ContactInformation>>() {});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

63
jnpf-tendering-entity/src/main/java/jnpf/model/ExpertGroupInfoTypeHandler.java

@ -0,0 +1,63 @@
package jnpf.model;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import jnpf.model.dto.LotteryProjectDto;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import org.apache.poi.ss.formula.functions.T;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
public class ExpertGroupInfoTypeHandler extends BaseTypeHandler<List<LotteryProjectDto.ExpertGroupInfo>> {
private final Class<LotteryProjectDto.ExpertGroupInfo> type;
public ExpertGroupInfoTypeHandler(Class<LotteryProjectDto.ExpertGroupInfo> type) {
if (type == null) throw new IllegalArgumentException("Type argument cannot be null");
this.type = type;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, List<LotteryProjectDto.ExpertGroupInfo> parameter, JdbcType jdbcType) throws SQLException {
ps.setString(i, toJson(parameter));
}
@Override
public List<LotteryProjectDto.ExpertGroupInfo> getNullableResult(ResultSet rs, String columnName) throws SQLException {
return toObject(rs.getString(columnName));
}
@Override
public List<LotteryProjectDto.ExpertGroupInfo> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return toObject(rs.getString(columnIndex));
}
@Override
public List<LotteryProjectDto.ExpertGroupInfo> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return toObject(cs.getString(columnIndex));
}
private String toJson(List<LotteryProjectDto.ExpertGroupInfo> object) {
try {
return JSON.toJSONString(object);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private List<LotteryProjectDto.ExpertGroupInfo> toObject(String content) {
if (content == null || content.isEmpty()) {
return null;
}
try {
return JSON.parseArray(content,LotteryProjectDto.ExpertGroupInfo.class);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

64
jnpf-tendering-entity/src/main/java/jnpf/model/ExtractExpertsInfoTypeHandler.java

@ -0,0 +1,64 @@
package jnpf.model;
import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import jnpf.model.dto.LotteryProjectDto;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
public class ExtractExpertsInfoTypeHandler extends BaseTypeHandler<List<LotteryProjectDto.ExtractExpertsInfo>> {
private final Class<LotteryProjectDto.ExtractExpertsInfo> type;
public ExtractExpertsInfoTypeHandler(Class<LotteryProjectDto.ExtractExpertsInfo> type) {
if (type == null) throw new IllegalArgumentException("Type argument cannot be null");
this.type = type;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, List<LotteryProjectDto.ExtractExpertsInfo> parameter, JdbcType jdbcType) throws SQLException {
ps.setString(i, toJson(parameter));
}
@Override
public List<LotteryProjectDto.ExtractExpertsInfo> getNullableResult(ResultSet rs, String columnName) throws SQLException {
return toObject(rs.getString(columnName));
}
@Override
public List<LotteryProjectDto.ExtractExpertsInfo> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return toObject(rs.getString(columnIndex));
}
@Override
public List<LotteryProjectDto.ExtractExpertsInfo> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return toObject(cs.getString(columnIndex));
}
private String toJson(List<LotteryProjectDto.ExtractExpertsInfo> object) {
try {
return JSON.toJSONString(object);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private List<LotteryProjectDto.ExtractExpertsInfo> toObject(String content) {
if (content == null || content.isEmpty()) {
return null;
}
try {
return JSON.parseArray(content,LotteryProjectDto.ExtractExpertsInfo.class);
// return objectMapper.readValue(content, new TypeReference<List<LotteryProjectDto.ExtractExpertsInfo>>() {});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

62
jnpf-tendering-entity/src/main/java/jnpf/model/JsonArrayTypeHandler.java

@ -0,0 +1,62 @@
package jnpf.model;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.apache.ibatis.type.BaseTypeHandler;
import org.apache.ibatis.type.JdbcType;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
public class JsonArrayTypeHandler<T> extends BaseTypeHandler<List<T>> {
private static final ObjectMapper objectMapper = new ObjectMapper();
private final Class<T> type;
public JsonArrayTypeHandler(Class<T> type) {
if (type == null) throw new IllegalArgumentException("Type argument cannot be null");
this.type = type;
}
@Override
public void setNonNullParameter(PreparedStatement ps, int i, List<T> parameter, JdbcType jdbcType) throws SQLException {
ps.setString(i, toJson(parameter));
}
@Override
public List<T> getNullableResult(ResultSet rs, String columnName) throws SQLException {
return toObject(rs.getString(columnName));
}
@Override
public List<T> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
return toObject(rs.getString(columnIndex));
}
@Override
public List<T> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
return toObject(cs.getString(columnIndex));
}
private String toJson(List<T> object) {
try {
return objectMapper.writeValueAsString(object);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private List<T> toObject(String content) {
if (content == null || content.isEmpty()) {
return null;
}
try {
return objectMapper.readValue(content, new TypeReference<List<T>>() {});
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}

69
jnpf-tendering-entity/src/main/java/jnpf/model/dto/ExpertDto.java

@ -2,6 +2,7 @@ package jnpf.model.dto;
import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.date.LocalDateTimeUtil;
import com.github.pagehelper.PageParam; import com.github.pagehelper.PageParam;
import io.swagger.v3.oas.annotations.media.Schema;
import jnpf.entity.Expert; import jnpf.entity.Expert;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import lombok.Data; import lombok.Data;
@ -15,61 +16,62 @@ import java.util.List;
public class ExpertDto { public class ExpertDto {
@Data @Data
public static class BaseParam { public static class BaseParam {
/** @Schema(description = "新增类型 1-专家 2-公司 默认专家")
* 新增类型 1-专家 2-公司
*/
private String dataType = "1"; private String dataType = "1";
/** @Schema(description = "专家姓名")
* 专家姓名
*/
private String expertName; private String expertName;
@Schema(description = "专家组别(字典表id)")
/**
* @ApiModelProperty("专家组别(字典表id)")
*/
private String expertGroup; private String expertGroup;
// @ApiModelProperty("公司名称(招投标类型)") @Schema(description = "公司名称(招投标类型)")
private String companyName; private String companyName;
// @ApiModelProperty("联系方式") @Schema(description = "联系信息(招投标类型)")
private List<ExpertDto.ContactInformation> contactInformation;
@Schema(description = "联系方式")
private String phoneNumber; private String phoneNumber;
// @ApiModelProperty("出生日期")
private String birthdayString;
// @ApiModelProperty("出生日期")
// @Schema(description = "出生日期")
// private String birthdayString;
@Schema(description = "出生日期")
private LocalDateTime birthday; private LocalDateTime birthday;
// @ApiModelProperty("专家来源 1-内部专家 2-外部专家")
@Schema(description = "专家来源 1-内部专家 2-外部专家")
private String expertSources; private String expertSources;
// @ApiModelProperty("工作单位名称") @Schema(description = "工作单位名称")
private String workUnit; private String workUnit;
// @ApiModelProperty("职务")
@Schema(description = "职务")
private String post; private String post;
// @ApiModelProperty("专业技术职称") @Schema(description = "专业技术职称")
private String technicalPosition; private String technicalPosition;
// @ApiModelProperty("专业专长") @Schema(description = "专业专长")
private String professionalExpertise; private String professionalExpertise;
// @ApiModelProperty("性别 1-男 2-女") @Schema(description = "性别 1-男 2-女")
private String sex; private String sex;
// @ApiModelProperty("工龄") @Schema(description = "工龄")
private String workingYears; private String workingYears;
// @ApiModelProperty("状态0-有效 1-无效") @Schema(description = "状态0-有效 1-无效")
private String status; private String status;
public void setBirthday(String birthdayString) { public void setBirthday(String birthdayString) {
try { try {
this.birthday = LocalDateTimeUtil.parse(birthdayString, "yyyy-MM-dd HH:mm:ss"); this.birthday = LocalDateTimeUtil.parse(birthdayString, "yyyy-MM-dd");
} catch (Exception e) { } catch (Exception e) {
throw new DataException("日期格式错误,请使用yyyy-MM-dd HH:mm:ss格式"); throw new DataException("日期格式错误,请使用yyyy-MM-dd格式");
} }
} }
} }
@ -84,6 +86,16 @@ public class ExpertDto {
private String id; private String id;
} }
@Data
public static class ContactInformation {
//联系人姓名
private String contactName;
//联系人手机号
private String contactPhone;
}
@Data @Data
public static class DeleteParam { public static class DeleteParam {
//主键ID //主键ID
@ -106,6 +118,13 @@ public class ExpertDto {
// @ApiModelProperty("联系方式") // @ApiModelProperty("联系方式")
private String phoneNumber; private String phoneNumber;
private String concatPerson;
private String expertGroup;
@Schema(description = "新增类型 1-专家 2-公司 默认专家")
private String dataType = "1";
} }
@Data @Data

188
jnpf-tendering-entity/src/main/java/jnpf/model/dto/LotteryProjectDto.java

@ -2,9 +2,16 @@ package jnpf.model.dto;
import cn.hutool.core.date.LocalDateTimeUtil; import cn.hutool.core.date.LocalDateTimeUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.pagehelper.PageParam; import com.github.pagehelper.PageParam;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import jnpf.entity.Expert;
import jnpf.entity.LotteryProject; import jnpf.entity.LotteryProject;
import jnpf.entity.LotteryReview;
import jnpf.exception.DataException; import jnpf.exception.DataException;
import lombok.Data; import lombok.Data;
@ -80,7 +87,6 @@ public class LotteryProjectDto {
} }
@Data @Data
public static class BaseParam { public static class BaseParam {
@ApiModelProperty("项目编号") @ApiModelProperty("项目编号")
@ -97,6 +103,8 @@ public class LotteryProjectDto {
@ApiModelProperty("代理机构") @ApiModelProperty("代理机构")
private String agency; private String agency;
@ApiModelProperty("抽签类型 1-专家 2-公司(默认专家)")
private String lotteryType = "1";
public void setBidEvaluationTime(String bidEvaluationTime) { public void setBidEvaluationTime(String bidEvaluationTime) {
@ -134,6 +142,9 @@ public class LotteryProjectDto {
@ApiModelProperty("项目名称") @ApiModelProperty("项目名称")
private String projectName; private String projectName;
@ApiModelProperty("抽签类型 1-专家 2-公司(默认专家)")
private String lotteryType = "1";
/** /**
* 权限控制 * 权限控制
*/ */
@ -143,6 +154,8 @@ public class LotteryProjectDto {
@Data @Data
public static class QueryResponse extends LotteryProject { public static class QueryResponse extends LotteryProject {
@ApiModelProperty("评审列表")
private List<LotteryReview> lotteryReviewList;
} }
@ -151,11 +164,124 @@ public class LotteryProjectDto {
@ApiModelProperty("抽签项目id") @ApiModelProperty("抽签项目id")
private String id; private String id;
@ApiModelProperty("专家组别信息Json,该字段仅用于专家抽签")
private List<ExpertGroupInfo> expertGroupInfo;
// @ApiModelProperty("抽取专家信息json")
// private List<ExtractExpertsInfo> extractExpertsInfo;
}
@Data
public static class QueryReviewResponse extends LotteryReview {
@ApiModelProperty("抽取专家数")
private Integer extractExperts;
@ApiModelProperty("确认参加数")
private Integer confirmParticipation;
}
@Data
public static class EditReviewParam {
@ApiModelProperty("评审id")
private String id;
@ApiModelProperty("专家组别信息Json") @ApiModelProperty("专家组别信息Json")
private List<ExpertGroupInfo> expertGroupInfo; private List<ExpertGroupInfo> expertGroupInfo;
// @ApiModelProperty("抽取专家信息json")
// private List<ExtractExpertsInfo> extractExpertsInfo;
} }
@Data
public static class DeleteReviewParam {
@ApiModelProperty("评审id")
private String id;
}
public enum ConfirmEnum {
//发布类型
JOIN("1", "参加"),
NOT_JOIN("2", "不参加"),
TO_BE_CONFIRMED("0", "待确认"),
;
private String code;
private String describe;
ConfirmEnum(String code, String describe) {
this.code = code;
this.describe = describe;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getDescribe() {
return describe;
}
public void setDescribe(String describe) {
this.describe = describe;
}
}
@Data
public static class ExtractExpertsInfo {
@ApiModelProperty("专家编号/公司编号")
private String id;
@ApiModelProperty("专家姓名")
private String expertName;
@ApiModelProperty("专家组别")
private String expertGroup;
@ApiModelProperty("联系方式")
private String phoneNumber;
@ApiModelProperty("工作单位名称")
private String workUnit;
//公共字段
@ApiModelProperty("确认时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime confirmTime;
@ApiModelProperty("确认人姓名")
private String confirmName;
@ApiModelProperty("确认人id")
private String confirmId;
@ApiModelProperty("抽取轮次")
private String ExtractionRounds;
@ApiModelProperty("确认状态")
private String status = ConfirmEnum.TO_BE_CONFIRMED.getCode();
@ApiModelProperty("备注")
private String remark;
@ApiModelProperty("参加确认按钮展示")
private Boolean showJoinButton = true;
//招标公司相关字段
@ApiModelProperty("联系人信息")
private List<ExpertDto.ContactInformation> contactInformation;
@ApiModelProperty("公司名称")
private String companyName;
}
@Data @Data
public static class ExpertGroupInfo { public static class ExpertGroupInfo {
@ApiModelProperty("组别code") @ApiModelProperty("组别code")
@ -170,7 +296,65 @@ public class LotteryProjectDto {
private String numberOfExtract; private String numberOfExtract;
@ApiModelProperty("确认参加人数") @ApiModelProperty("确认参加人数")
private String numberOfParticipants; private String numberOfParticipants = "0";
@ApiModelProperty("删除按钮展示")
private Boolean showDelButton = true;
}
@Data
public static class ParticipateInConfirmationParam {
@ApiModelProperty("评审id")
private String id;
@ApiModelProperty("专家编码")
private String expertId;
@ApiModelProperty("确认状态 1-参加 2-不参加")
private String status;
@ApiModelProperty("备注")
private String remark;
}
@Data
public static class SaveExtractionResultsParam {
@ApiModelProperty("评审id")
private String id;
@ApiModelProperty("抽取专家信息json")
private List<ExtractExpertsInfo> extractExpertsInfo;
} }
@Data
public static class UploadExtractionResults {
@ApiModelProperty("抽签项目id")
private String id;
@ApiModelProperty("抽取结果")
private FileInfo uploaderVO;
}
@Data
public static class FileInfo {
@Schema(description = "名称")
private String name;
@Schema(description = "请求接口")
private String url;
@Schema(description = "预览文件id")
private String fileVersionId;
@Schema(description = "文件大小")
private Long fileSize;
@Schema(description = "文件后缀")
private String fileExtension;
@Schema(description = "缩略图")
private String thumbUrl;
}
} }

BIN
jnpf-tendering-server/src/main/resources/jnpf/templete/招投标公司打印.docx

Binary file not shown.

BIN
jnpf-tendering-server/src/main/resources/jnpf/templete/浙江出版传媒股份有限公司ERP系统建设项目.docx

Binary file not shown.

28
pom.xml

@ -24,6 +24,34 @@
</description> </description>
<dependencies> <dependencies>
<!-- Apache POI核心库 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>5.2.3</version>
</dependency>
<!-- Apache POI 对 Excel 的支持 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>5.2.3</version>
</dependency>
<!-- Apache POI 对 Word 的支持 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>4.1.2</version>
</dependency>
<!-- Apache POI 对图片的支持 -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>5.2.3</version>
</dependency>
<dependency> <dependency>
<groupId>io.springfox</groupId> <groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId> <artifactId>springfox-swagger2</artifactId>

Loading…
Cancel
Save