28 changed files with 1530 additions and 6 deletions
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import jnpf.entity.Expert; |
||||
import jnpf.model.dto.ExpertDto; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
/** |
||||
* <p> |
||||
* Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-26 |
||||
*/ |
||||
public interface ExpertMapper extends BaseMapper<Expert> { |
||||
|
||||
Page<ExpertDto.ListResponse> queryList(@Param("page") Page<Object> objectPage,@Param("param") ExpertDto.ListParam param); |
||||
|
||||
ExpertDto.ListResponse queryInfo(@Param("id") String id); |
||||
} |
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import jnpf.entity.LotteryProject; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.model.dto.IndicatorStatisticsDto; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* <p> |
||||
* 抽签项目表 Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
public interface LotteryProjectMapper extends BaseMapper<LotteryProject> { |
||||
|
||||
Page<LotteryProjectDto.QueryResponse> queryList(@Param("page")Page<LotteryProject> page, @Param("query")LotteryProjectDto.QueryListParam param, @Param("ew") Map<String, Object> paramNameValuePairs, @Param("sql")String replace); |
||||
|
||||
LotteryProjectDto.QueryResponse queryInfo(@Param("id") String id); |
||||
} |
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import jnpf.entity.LotteryReview; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
||||
/** |
||||
* <p> |
||||
* 评审次数 Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
public interface LotteryReviewMapper extends BaseMapper<LotteryReview> { |
||||
|
||||
} |
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.entity.Expert; |
||||
import jnpf.model.dto.ExpertDto; |
||||
import jnpf.permission.model.organize.OrganizeListVO; |
||||
import jnpf.permission.model.organize.PaginationOrganize; |
||||
|
||||
import java.util.List; |
||||
|
||||
public interface ExpertService extends IService<Expert> { |
||||
|
||||
void add(ExpertDto.AddParam param); |
||||
|
||||
List<OrganizeListVO> getOrganizationList(PaginationOrganize pagination); |
||||
|
||||
void edit(ExpertDto.EditParam param); |
||||
|
||||
void delete(ExpertDto.DeleteParam param); |
||||
|
||||
Page<ExpertDto.ListResponse> queryList(ExpertDto.ListParam param); |
||||
|
||||
ExpertDto.ListResponse queryInfo(String id); |
||||
} |
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import jnpf.entity.LotteryProject; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
|
||||
/** |
||||
* <p> |
||||
* 抽签项目表 服务类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
public interface ILotteryProjectService extends IService<LotteryProject> { |
||||
|
||||
void add(LotteryProjectDto.AddParam param); |
||||
|
||||
void edit(LotteryProjectDto.EditParam param); |
||||
|
||||
void delete(LotteryProjectDto.DeleteParam param); |
||||
|
||||
Page<LotteryProjectDto.QueryResponse> queryList(LotteryProjectDto.QueryListParam param); |
||||
|
||||
LotteryProjectDto.QueryResponse queryInfo(String id); |
||||
} |
||||
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
package jnpf.service; |
||||
|
||||
import jnpf.entity.LotteryReview; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
||||
/** |
||||
* <p> |
||||
* 评审次数 服务类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
public interface ILotteryReviewService extends IService<LotteryReview> { |
||||
|
||||
} |
||||
@ -0,0 +1,225 @@
@@ -0,0 +1,225 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.core.date.DateUtil; |
||||
import cn.hutool.core.date.LocalDateTimeUtil; |
||||
import cn.hutool.core.util.StrUtil; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.alibaba.fastjson.TypeReference; |
||||
import com.alibaba.fastjson.parser.Feature; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.constant.PermissionConst; |
||||
import jnpf.entity.Expert; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.mapper.ExpertMapper; |
||||
import jnpf.model.dto.ExpertDto; |
||||
import jnpf.permission.entity.OrganizeEntity; |
||||
import jnpf.permission.model.organize.OrganizeListVO; |
||||
import jnpf.permission.model.organize.OrganizeModel; |
||||
import jnpf.permission.model.organize.PaginationOrganize; |
||||
import jnpf.permission.service.OrganizeService; |
||||
import jnpf.service.ExpertService; |
||||
import jnpf.util.JsonUtil; |
||||
import jnpf.util.StringUtil; |
||||
import jnpf.util.UserProvider; |
||||
import jnpf.util.treeutil.SumTree; |
||||
import jnpf.util.treeutil.newtreeutil.TreeDotUtils; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.*; |
||||
|
||||
@Service |
||||
@AllArgsConstructor |
||||
public class ExpertServiceImpl extends ServiceImpl<ExpertMapper, Expert> implements ExpertService { |
||||
private final OrganizeService organizeService; |
||||
private final UserProvider userProvider; |
||||
private final RedisSerialNumberGenerator redisSerialNumberGenerator; |
||||
private static final String EXPERTS_KEY = "experts:"; |
||||
private static final String PREFIX = "EXPERT"; |
||||
|
||||
@Override |
||||
public List<OrganizeListVO> getOrganizationList(PaginationOrganize pagination) { |
||||
// 获取所有组织
|
||||
Map<String, OrganizeEntity> orgMaps = organizeService.getOrgMaps(pagination.getKeyword(), Objects.equals(pagination.getEnabledMark(), 1), pagination.getType()); |
||||
Map<String, OrganizeModel> orgMapsModel = JSONObject.parseObject(JSONObject.toJSONString(orgMaps), new TypeReference<LinkedHashMap<String, OrganizeModel>>() { |
||||
}, new Feature[0]); |
||||
; |
||||
|
||||
Map<String, String> orgIdNameMaps = organizeService.getInfoList(); |
||||
orgMapsModel.values().forEach(t -> { |
||||
if (PermissionConst.COMPANY.equals(t.getType())) { |
||||
t.setIcon("icon-ym icon-ym-tree-organization3"); |
||||
} else { |
||||
t.setIcon("icon-ym icon-ym-tree-department1"); |
||||
} |
||||
// 处理断层
|
||||
if (StringUtil.isNotEmpty(t.getOrganizeIdTree())) { |
||||
String[] split = t.getOrganizeIdTree().split(","); |
||||
List<String> list1 = Arrays.asList(split); |
||||
Collections.reverse(list1); |
||||
for (String orgId : list1) { |
||||
if (!orgId.equals(t.getId())) { |
||||
OrganizeModel organizeEntity1 = orgMapsModel.get(orgId); |
||||
if (organizeEntity1 != null) { |
||||
t.setParentId(organizeEntity1.getId()); |
||||
String[] split1 = t.getOrganizeIdTree().split(organizeEntity1.getId()); |
||||
if (split1.length > 1) { |
||||
t.setFullName(organizeService.getFullNameByOrgIdTree(orgIdNameMaps, split1[1], "/")); |
||||
} |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}); |
||||
List<SumTree<OrganizeModel>> trees = TreeDotUtils.convertMapsToTreeDot(orgMapsModel); |
||||
List<OrganizeListVO> listVO = JsonUtil.getJsonToList(trees, OrganizeListVO.class); |
||||
listVO.forEach(t -> { |
||||
t.setFullName(organizeService.getFullNameByOrgIdTree(orgIdNameMaps, t.getOrganizeIdTree(), "/")); |
||||
}); |
||||
return listVO; |
||||
} |
||||
|
||||
@Override |
||||
public void add(ExpertDto.AddParam param) { |
||||
UserInfo userInfo = userProvider.get(); |
||||
checkAddParam(param); |
||||
Expert expert = BeanUtil.copyProperties(param, Expert.class); |
||||
expert.setDelFlag("0"); |
||||
expert.setCreateTime(LocalDateTime.now()); |
||||
expert.setUpdateTime(LocalDateTime.now()); |
||||
expert.setCreateId(userInfo.getId()); |
||||
expert.setCreateName(userInfo.getUserName()); |
||||
expert.setUpdateName(userInfo.getUserName()); |
||||
expert.setUpdateId(userInfo.getId()); |
||||
long number = redisSerialNumberGenerator.generateSerialNumber(EXPERTS_KEY); |
||||
expert.setId(String.format("%s%05d", PREFIX, number)); |
||||
if(this.lambdaQuery().eq(Expert::getId, expert.getId()).exists()){ |
||||
throw new DataException("编号生成异常,请稍后再试!"); |
||||
} |
||||
this.save(expert); |
||||
} |
||||
|
||||
@Override |
||||
public void edit(ExpertDto.EditParam param) { |
||||
if (StrUtil.isBlank(param.getId())) { |
||||
throw new DataException("id不能为空"); |
||||
} |
||||
Expert expert = this.lambdaQuery() |
||||
.eq(Expert::getId, param.getId()) |
||||
.eq(Expert::getDelFlag, "0") |
||||
.one(); |
||||
if (null == expert) { |
||||
throw new DataException("请重新选择数据"); |
||||
} |
||||
checkAddParam(param); |
||||
BeanUtil.copyProperties(param, expert); |
||||
UserInfo userInfo = userProvider.get(); |
||||
expert.setDelFlag("0"); |
||||
expert.setUpdateTime(LocalDateTime.now()); |
||||
expert.setUpdateName(userInfo.getUserName()); |
||||
expert.setUpdateId(userInfo.getId()); |
||||
this.saveOrUpdate(expert); |
||||
} |
||||
|
||||
private void checkAddParam(ExpertDto.BaseParam param) { |
||||
//1-专家 2-公司
|
||||
switch (param.getDataType()) { |
||||
case "1": |
||||
// if (StrUtil.isNotBlank(param.getBirthdayString())) {
|
||||
// try {
|
||||
// param.setBirthday(LocalDateTimeUtil.parse(param.getBirthdayString(), "yyyy-MM-dd HH:mm:ss"));
|
||||
// } catch (Exception e) {
|
||||
// throw new DataException("出生日期格式不正确 yyyy-MM-dd HH:mm:ss");
|
||||
// }
|
||||
// }
|
||||
if (StrUtil.isBlank(param.getExpertName())) { |
||||
throw new DataException("专家名称不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getExpertGroup())) { |
||||
throw new DataException("专家组别不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getSex())) { |
||||
throw new DataException("专家性别不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getPhoneNumber())) { |
||||
throw new DataException("专家电话不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getExpertSources())) { |
||||
throw new DataException("专家来源不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getWorkUnit())) { |
||||
throw new DataException("工作单位不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getPost())) { |
||||
throw new DataException("职务不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getTechnicalPosition())) { |
||||
throw new DataException("专业技术职称不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getProfessionalExpertise())) { |
||||
throw new DataException("专业特长不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getStatus())) { |
||||
throw new DataException("专家状态不能为空"); |
||||
} |
||||
break; |
||||
case "2": |
||||
if (StrUtil.isBlank(param.getExpertName())) { |
||||
throw new DataException("联系人不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getPhoneNumber())) { |
||||
throw new DataException("联系电话不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getCompanyName())) { |
||||
throw new DataException("公司名称不能为空"); |
||||
} |
||||
break; |
||||
default: |
||||
throw new DataException("新增类型错误"); |
||||
} |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public void delete(ExpertDto.DeleteParam param) { |
||||
if (StrUtil.isBlank(param.getId())) { |
||||
throw new DataException("id不能为空"); |
||||
} |
||||
UserInfo userInfo = userProvider.get(); |
||||
this.lambdaUpdate() |
||||
.set(Expert::getDelFlag, "1") |
||||
.set(Expert::getUpdateTime, LocalDateTime.now()) |
||||
.set(Expert::getUpdateId, userInfo.getUserId()) |
||||
.set(Expert::getUpdateName, userInfo.getUserName()) |
||||
.eq(Expert::getId, param.getId()) |
||||
.update(); |
||||
} |
||||
|
||||
@Override |
||||
public Page<ExpertDto.ListResponse> queryList(ExpertDto.ListParam param) { |
||||
checkParam(param); |
||||
return this.getBaseMapper().queryList(new Page<>(param.getPageNum(),param.getPageSize()),param); |
||||
} |
||||
|
||||
private void checkParam(ExpertDto.ListParam param) { |
||||
if (param.getPageNum() == null) { |
||||
param.setPageNum(1); |
||||
} |
||||
if (param.getPageSize() == null) { |
||||
param.setPageSize(10); |
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public ExpertDto.ListResponse queryInfo(String id) { |
||||
if (StrUtil.isBlank(id)) { |
||||
throw new DataException("id不能为空"); |
||||
} |
||||
return this.getBaseMapper().queryInfo(id); |
||||
} |
||||
} |
||||
@ -0,0 +1,134 @@
@@ -0,0 +1,134 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.core.date.LocalDateTimeUtil; |
||||
import cn.hutool.core.util.ObjectUtil; |
||||
import cn.hutool.core.util.StrUtil; |
||||
import com.alibaba.fastjson.JSON; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.google.protobuf.ServiceException; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.entity.LotteryProject; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.mapper.LotteryProjectMapper; |
||||
import jnpf.model.dto.IndicatorStatisticsDto; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
import jnpf.permission.OrganizeApi; |
||||
import jnpf.permission.entity.OrganizeEntity; |
||||
import jnpf.permission.model.authorize.AuthorizeConditionModel; |
||||
import jnpf.permission.service.OrganizeService; |
||||
import jnpf.service.CustomAuthService; |
||||
import jnpf.service.ILotteryProjectService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.util.UserProvider; |
||||
import lombok.AllArgsConstructor; |
||||
import org.apache.poi.ss.formula.functions.T; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.time.LocalDate; |
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <p> |
||||
* 抽签项目表 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class LotteryProjectServiceImpl extends ServiceImpl<LotteryProjectMapper, LotteryProject> implements ILotteryProjectService { |
||||
|
||||
|
||||
private final UserProvider userProvider; |
||||
private final OrganizeApi organizeService; |
||||
|
||||
@Override |
||||
public void add(LotteryProjectDto.AddParam param) { |
||||
LotteryProject lotteryProject = BeanUtil.copyProperties(param, LotteryProject.class); |
||||
lotteryProject.setType(LotteryProjectDto.TypeEnum.ONESELF.getCode()); |
||||
lotteryProject.setStatus(LotteryProjectDto.StatusEnum.TO_BE_EXTRACTED.getCode()); |
||||
lotteryProject.setStatusName(LotteryProjectDto.StatusEnum.TO_BE_EXTRACTED.getDescribe()); |
||||
lotteryProject.setBidOpeningTime(LocalDate.parse(LocalDateTimeUtil.format(param.getBidEvaluationTime(),"yyyy-MM-dd"))); |
||||
UserInfo userInfo = userProvider.get(); |
||||
lotteryProject.setUserDeptId(userInfo.getOrganizeId()); |
||||
//添加根子单数据
|
||||
OrganizeEntity organization = organizeService.getInfoById(userInfo.getOrganizeId()); |
||||
lotteryProject.setUserDeptName(organization.getFullName()); |
||||
lotteryProject.setCreateId(userInfo.getUserId()); |
||||
lotteryProject.setCreateName(userInfo.getUserName()); |
||||
lotteryProject.setCreateTime(LocalDateTime.now()); |
||||
lotteryProject.setUpdateId(userInfo.getUserId()); |
||||
lotteryProject.setUpdateName(userInfo.getUserName()); |
||||
lotteryProject.setUpdateTime(LocalDateTime.now()); |
||||
this.save(lotteryProject); |
||||
} |
||||
|
||||
@Override |
||||
public void edit(LotteryProjectDto.EditParam param) { |
||||
if (null==param.getId()){ |
||||
throw new DataException("id不能为空"); |
||||
} |
||||
LotteryProject lotteryProject = BeanUtil.copyProperties(param, LotteryProject.class); |
||||
lotteryProject.setBidOpeningTime(LocalDate.parse(LocalDateTimeUtil.format(param.getBidEvaluationTime(),"yyyy-MM-dd"))); |
||||
UserInfo userInfo = userProvider.get();; |
||||
lotteryProject.setUpdateId(userInfo.getUserId()); |
||||
lotteryProject.setUpdateName(userInfo.getUserName()); |
||||
lotteryProject.setUpdateTime(LocalDateTime.now()); |
||||
lotteryProject.setId(param.getId()); |
||||
this.saveOrUpdate(lotteryProject); |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public void delete(LotteryProjectDto.DeleteParam param) { |
||||
if (null==param.getId()){ |
||||
throw new DataException("id不能为空"); |
||||
} |
||||
this.lambdaUpdate() |
||||
.set(LotteryProject::getDelFlag,"1") |
||||
.eq(LotteryProject::getId,param.getId()) |
||||
.update(); |
||||
} |
||||
|
||||
|
||||
|
||||
private final CustomAuthService customAuthService; |
||||
|
||||
private QueryWrapper<T> getAuthWrapper(String menuId) { |
||||
if (!userProvider.get().getIsAdministrator()) { |
||||
QueryWrapper<T> queryWhere = new QueryWrapper<>(); |
||||
Object bidding_project_statisticsObj = customAuthService.getCondition(new AuthorizeConditionModel(queryWhere, menuId, "bidding_project_subscribe")); |
||||
System.out.println("---------------" + JSON.toJSONString(bidding_project_statisticsObj)); |
||||
return (QueryWrapper<T>) bidding_project_statisticsObj; |
||||
} |
||||
return null; |
||||
} |
||||
@Override |
||||
public Page<LotteryProjectDto.QueryResponse> queryList(LotteryProjectDto.QueryListParam param) { |
||||
if (param.getPageNum() == null) { |
||||
param.setPageNum(1); |
||||
} |
||||
if (param.getPageSize() == null) { |
||||
param.setPageSize(10); |
||||
} |
||||
//查询权限
|
||||
QueryWrapper<T> queryWhere = getAuthWrapper(param.getMenuId()); |
||||
if (ObjectUtil.isEmpty(queryWhere)) { |
||||
return new Page<>(); |
||||
} |
||||
assert queryWhere != null; |
||||
return this.getBaseMapper().queryList(new Page<>(param.getPageNum(),param.getPageSize()),param, queryWhere.getParamNameValuePairs(),queryWhere.getSqlSegment().replace("paramNameValuePairs.", "")); |
||||
} |
||||
|
||||
@Override |
||||
public LotteryProjectDto.QueryResponse queryInfo(String id) { |
||||
if (StrUtil.isBlank(id)){ |
||||
throw new DataException("id不能为空"); |
||||
} |
||||
return this.getBaseMapper().queryInfo(id); |
||||
} |
||||
} |
||||
@ -0,0 +1,20 @@
@@ -0,0 +1,20 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import jnpf.entity.LotteryReview; |
||||
import jnpf.mapper.LotteryReviewMapper; |
||||
import jnpf.service.ILotteryReviewService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* <p> |
||||
* 评审次数 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
@Service |
||||
public class LotteryReviewServiceImpl extends ServiceImpl<LotteryReviewMapper, LotteryReview> implements ILotteryReviewService { |
||||
|
||||
} |
||||
@ -0,0 +1,27 @@
@@ -0,0 +1,27 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.data.redis.core.RedisTemplate; |
||||
import org.springframework.data.redis.core.StringRedisTemplate; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
@Component |
||||
public class RedisSerialNumberGenerator { |
||||
|
||||
@Autowired |
||||
private RedisTemplate redisTemplate; |
||||
|
||||
private static final String SERIAL_KEY_PREFIX = "serial_number:"; |
||||
|
||||
/** |
||||
* 生成分布式流水号 |
||||
* |
||||
* @param key 业务相关的唯一标识符,用于区分不同业务的流水号 |
||||
* @return 生成的流水号 |
||||
*/ |
||||
public long generateSerialNumber(String key) { |
||||
String redisKey = SERIAL_KEY_PREFIX + key; |
||||
// 使用Redis的INCR命令原子递增
|
||||
return redisTemplate.opsForValue().increment(redisKey); |
||||
} |
||||
} |
||||
@ -0,0 +1,59 @@
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="jnpf.mapper.ExpertMapper"> |
||||
|
||||
<resultMap id="resultMap" type="jnpf.model.dto.ExpertDto$ListResponse"> |
||||
<id property="id" column="id"/> |
||||
<result property="expertName" column="expert_name"/> |
||||
<result property="expertGroup" column="expert_group"/> |
||||
<result property="companyName" column="company_name"/> |
||||
<result property="phoneNumber" column="phone_number"/> |
||||
<result property="birthday" column="birthday"/> |
||||
<result property="expertSources" column="expert_sources"/> |
||||
<result property="workUnit" column="work_unit"/> |
||||
<result property="post" column="post"/> |
||||
<result property="technicalPosition" column="technical_position"/> |
||||
<result property="professionalExpertise" column="professional_expertise"/> |
||||
<result property="sex" column="sex"/> |
||||
<result property="workingYears" column="working_years"/> |
||||
<result property="delFlag" column="del_flag"/> |
||||
<result property="status" column="status"/> |
||||
<result property="dataType" column="data_type"/> |
||||
<result property="createTime" column="create_time"/> |
||||
<result property="createId" column="create_id"/> |
||||
<result property="createName" column="create_name"/> |
||||
<result property="updateTime" column="update_time"/> |
||||
<result property="updateId" column="update_id"/> |
||||
<result property="updateName" column="update_name"/> |
||||
</resultMap> |
||||
|
||||
<sql id="Base_Column_List"> |
||||
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 |
||||
</sql> |
||||
<select id="queryList" resultMap="resultMap"> |
||||
select |
||||
<include refid="Base_Column_List"/> |
||||
from t_expert |
||||
where del_flag ='0' |
||||
<if test="param.expertName !=null and param.expertName !=''"> |
||||
and expert_name like '%' #{param.expertName} '%' |
||||
</if> |
||||
<if test="param.companyName !=null and param.companyName !=''"> |
||||
and company_name like '%' #{param.companyName} '%' |
||||
</if> |
||||
<if test="param.phoneNumber !=null and param.phoneNumber !=''"> |
||||
and phone_number like '%' #{param.phoneNumber} '%' |
||||
</if> |
||||
<if test="param.workUnit !=null and param.workUnit !=''"> |
||||
and work_unit like '%' #{param.workUnit} '%' |
||||
</if> |
||||
order by create_time desc |
||||
</select> |
||||
<select id="queryInfo" resultMap="resultMap"> |
||||
select |
||||
<include refid="Base_Column_List"/> |
||||
from t_expert |
||||
where del_flag ='0' and id=#{id} |
||||
</select> |
||||
</mapper> |
||||
@ -0,0 +1,74 @@
@@ -0,0 +1,74 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="jnpf.mapper.LotteryProjectMapper"> |
||||
|
||||
<resultMap id="resultMap" type="jnpf.model.dto.LotteryProjectDto$QueryResponse"> |
||||
<id property="id" column="id"/> |
||||
<result property="status" column="status"/> |
||||
<result property="projectNumber" column="project_number"/> |
||||
<result property="projectName" column="project_name"/> |
||||
<result property="bidOpeningTime" column="bid_opening_time"/> |
||||
<result property="bidEvaluationTime" column="bid_evaluation_time"/> |
||||
<result property="bidEvaluationLocation" column="bid_evaluation_location"/> |
||||
<result property="agency" column="agency"/> |
||||
<result property="statusName" column="status_name"/> |
||||
<result property="remake" column="remake"/> |
||||
<result property="userDeptName" column="user_dept_name"/> |
||||
<result property="userDeptId" column="user_dept_id"/> |
||||
<result property="delFlag" column="del_flag"/> |
||||
<result property="createTime" column="create_time"/> |
||||
<result property="createId" column="create_id"/> |
||||
<result property="createName" column="create_name"/> |
||||
<result property="updateTime" column="update_time"/> |
||||
<result property="updateId" column="update_id"/> |
||||
<result property="updateName" column="update_name"/> |
||||
<result property="type" column="type"/> |
||||
</resultMap> |
||||
|
||||
<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 |
||||
</sql> |
||||
<select id="queryList" resultMap="resultMap"> |
||||
select <include refid="baseQuery"/> |
||||
from t_lottery_project child |
||||
where del_flag = '0' |
||||
<if test="query.projectName != null and query.projectName != ''"> |
||||
AND project_name like '%' #{query.projectName} '%' |
||||
</if> |
||||
<if test="query.projectNumber != null and query.projectNumber != ''"> |
||||
AND project_number like '%' #{query.projectNumber} '%' |
||||
</if> |
||||
<if test="sql != null and sql !=''"> |
||||
and ${sql} |
||||
</if> |
||||
</select> |
||||
|
||||
<resultMap id="infoMap" type="jnpf.model.dto.LotteryProjectDto$QueryResponse"> |
||||
<id property="id" column="id"/> |
||||
<result property="status" column="status"/> |
||||
<result property="projectNumber" column="project_number"/> |
||||
<result property="projectName" column="project_name"/> |
||||
<result property="bidOpeningTime" column="bid_opening_time"/> |
||||
<result property="bidEvaluationTime" column="bid_evaluation_time"/> |
||||
<result property="bidEvaluationLocation" column="bid_evaluation_location"/> |
||||
<result property="agency" column="agency"/> |
||||
<result property="statusName" column="status_name"/> |
||||
<result property="remake" column="remake"/> |
||||
<result property="userDeptName" column="user_dept_name"/> |
||||
<result property="userDeptId" column="user_dept_id"/> |
||||
<result property="delFlag" column="del_flag"/> |
||||
<result property="createTime" column="create_time"/> |
||||
<result property="createId" column="create_id"/> |
||||
<result property="createName" column="create_name"/> |
||||
<result property="updateTime" column="update_time"/> |
||||
<result property="updateId" column="update_id"/> |
||||
<result property="updateName" column="update_name"/> |
||||
<result property="type" column="type"/> |
||||
</resultMap> |
||||
<select id="queryInfo" resultMap="infoMap"> |
||||
select <include refid="baseQuery"/> |
||||
from t_lottery_project |
||||
where del_flag = '0' |
||||
and id=#{id} |
||||
</select> |
||||
</mapper> |
||||
@ -0,0 +1,5 @@
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="jnpf.mapper.LotteryReviewMapper"> |
||||
|
||||
</mapper> |
||||
@ -0,0 +1,84 @@
@@ -0,0 +1,84 @@
|
||||
package jnpf.controller; |
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission; |
||||
import cn.dev33.satoken.annotation.SaMode; |
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.alibaba.fastjson.TypeReference; |
||||
import com.alibaba.fastjson.parser.Feature; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.base.vo.ListVO; |
||||
import jnpf.constant.PermissionConst; |
||||
import jnpf.model.dto.ExpertDto; |
||||
import jnpf.model.dto.IndicatorStatisticsDto; |
||||
import jnpf.permission.entity.OrganizeAdministratorEntity; |
||||
import jnpf.permission.entity.OrganizeEntity; |
||||
import jnpf.permission.model.organize.OrganizeListVO; |
||||
import jnpf.permission.model.organize.OrganizeModel; |
||||
import jnpf.permission.model.organize.PaginationOrganize; |
||||
import jnpf.service.ExpertService; |
||||
import jnpf.service.IndicatorStatisticsService; |
||||
import jnpf.util.JsonUtil; |
||||
import jnpf.util.StringUtil; |
||||
import jnpf.util.treeutil.SumTree; |
||||
import jnpf.util.treeutil.newtreeutil.TreeDotUtils; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import java.util.*; |
||||
|
||||
@RestController |
||||
@Tag(name = "专家抽取相关接口", description = "example") |
||||
@RequestMapping("/expert") |
||||
@AllArgsConstructor |
||||
public class ExpertController { |
||||
private final ExpertService expertService; |
||||
|
||||
|
||||
@Operation(summary = "获取组织列表") |
||||
@GetMapping("getOrganizationList") |
||||
public ActionResult<ListVO<OrganizeListVO>> getOrganizationList(PaginationOrganize pagination) { |
||||
List<OrganizeListVO> listVO = expertService.getOrganizationList(pagination); |
||||
ListVO<OrganizeListVO> vo = new ListVO<>(); |
||||
vo.setList(listVO); |
||||
return ActionResult.success(vo); |
||||
} |
||||
|
||||
@Operation(summary = "新增专家/公司") |
||||
@PostMapping("/add") |
||||
public ActionResult<Void> add(@RequestBody ExpertDto.AddParam param) { |
||||
expertService.add(param); |
||||
return ActionResult.success(); |
||||
} |
||||
|
||||
@Operation(summary = "修改专家/公司") |
||||
@PostMapping("/edit") |
||||
public ActionResult<Void> update(@RequestBody ExpertDto.EditParam param) { |
||||
expertService.edit(param); |
||||
return ActionResult.success(); |
||||
} |
||||
|
||||
@Operation(summary = "删除专家/公司") |
||||
@PostMapping("/delete") |
||||
public ActionResult<Void> delete(@RequestBody ExpertDto.DeleteParam param) { |
||||
expertService.delete(param); |
||||
return ActionResult.success(); |
||||
} |
||||
|
||||
@Operation(summary = "查询专家/公司列表") |
||||
@PostMapping("/list") |
||||
public ActionResult<Page<ExpertDto.ListResponse>> List(@RequestBody ExpertDto.ListParam param) { |
||||
return ActionResult.success(expertService.queryList(param)); |
||||
} |
||||
|
||||
|
||||
@Operation(summary = "查询详情") |
||||
@GetMapping("/queryInfo") |
||||
public ActionResult<ExpertDto.ListResponse> queryInfo(@RequestParam String id) { |
||||
return ActionResult.success(expertService.queryInfo(id)); |
||||
} |
||||
|
||||
} |
||||
@ -0,0 +1,68 @@
@@ -0,0 +1,68 @@
|
||||
package jnpf.controller; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.entity.LotteryProject; |
||||
import jnpf.model.dto.ExpertDto; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
import jnpf.service.ILotteryProjectService; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import org.springframework.stereotype.Controller; |
||||
|
||||
|
||||
@RestController |
||||
@Tag(name = "项目抽签相关接口", description = "example") |
||||
@RequestMapping("/lottery-project") |
||||
@AllArgsConstructor |
||||
public class LotteryProjectController { |
||||
|
||||
private final ILotteryProjectService iLotteryProjectService; |
||||
|
||||
@Operation(summary = "新增抽签项目") |
||||
@PostMapping("/add") |
||||
public ActionResult<Void> add(@RequestBody LotteryProjectDto.AddParam param) { |
||||
iLotteryProjectService.add(param); |
||||
return ActionResult.success(); |
||||
} |
||||
|
||||
@Operation(summary = "修改抽签项目信息") |
||||
@PostMapping("/edit") |
||||
public ActionResult<Void> edit(@RequestBody LotteryProjectDto.EditParam param) { |
||||
iLotteryProjectService.edit(param); |
||||
return ActionResult.success(); |
||||
} |
||||
|
||||
|
||||
@Operation(summary = "删除抽签项目信息") |
||||
@PostMapping("/delete") |
||||
public ActionResult<Void> delete(@RequestBody LotteryProjectDto.DeleteParam param) { |
||||
iLotteryProjectService.delete(param); |
||||
return ActionResult.success(); |
||||
} |
||||
|
||||
@Operation(summary = "查询抽签项目信息") |
||||
@PostMapping("/queryList") |
||||
public ActionResult<Page<LotteryProjectDto.QueryResponse>> queryList(@RequestBody LotteryProjectDto.QueryListParam param) { |
||||
return ActionResult.success(iLotteryProjectService.queryList(param)); |
||||
} |
||||
|
||||
|
||||
@Operation(summary = "详情查询") |
||||
@GetMapping("/queryInfo") |
||||
public ActionResult<LotteryProjectDto.QueryResponse> queryInfo(@RequestParam String id) { |
||||
return ActionResult.success(iLotteryProjectService.queryInfo(id)); |
||||
} |
||||
|
||||
|
||||
// @Operation(summary = "添加评审")
|
||||
// @PostMapping("/addReview")
|
||||
// public ActionResult<Void> addReview(@RequestBody LotteryProjectDto.AddReviewParam param) {
|
||||
// iLotteryProjectService.addReview(param);
|
||||
// return ActionResult.success();
|
||||
// }
|
||||
} |
||||
@ -0,0 +1,121 @@
@@ -0,0 +1,121 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.*; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
/** |
||||
* <p> |
||||
* |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-26 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@TableName("t_expert") |
||||
//@ApiModel(value = "Expert对象", description = "")
|
||||
public class Expert implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
// @ApiModelProperty("主键id")
|
||||
@TableId(value = "id", type = IdType.INPUT) |
||||
private String id; |
||||
|
||||
// @ApiModelProperty("专家姓名")
|
||||
@TableField(value = "expert_name") |
||||
private String expertName; |
||||
|
||||
// @ApiModelProperty("专家组别(字典表id)")
|
||||
@TableField(value = "expert_group") |
||||
private String expertGroup; |
||||
|
||||
// @ApiModelProperty("公司名称(招投标类型)")
|
||||
@TableField(value = "company_name") |
||||
private String companyName; |
||||
|
||||
// @ApiModelProperty("联系方式")
|
||||
@TableField(value = "phone_number") |
||||
private String phoneNumber; |
||||
|
||||
// @ApiModelProperty("出生日期")
|
||||
@TableField(value = "birthday") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime birthday; |
||||
|
||||
// @ApiModelProperty("专家来源 1-内部专家 2-外部专家")
|
||||
@TableField(value = "expert_sources") |
||||
private String expertSources; |
||||
|
||||
// @ApiModelProperty("工作单位名称")
|
||||
@TableField(value = "work_unit") |
||||
private String workUnit; |
||||
|
||||
// @ApiModelProperty("职务")
|
||||
@TableField(value = "post") |
||||
private String post; |
||||
|
||||
// @ApiModelProperty("专业技术职称")
|
||||
@TableField(value = "technical_position") |
||||
private String technicalPosition; |
||||
|
||||
// @ApiModelProperty("专业专长")
|
||||
@TableField(value = "professional_expertise") |
||||
private String professionalExpertise; |
||||
|
||||
// @ApiModelProperty("性别 1-男 2-女")
|
||||
@TableField(value = "sex") |
||||
private String sex; |
||||
|
||||
// @ApiModelProperty("工龄")
|
||||
@TableField(value = "working_years") |
||||
private String workingYears; |
||||
|
||||
// @ApiModelProperty("删除标记 0-正常 1-删除")
|
||||
@TableField(value = "del_flag") |
||||
private String delFlag; |
||||
|
||||
// @ApiModelProperty("状态0-有效 1-无效")
|
||||
@TableField(value = "status") |
||||
private String status; |
||||
|
||||
// @ApiModelProperty("数据类型 1-专家 2-公司")
|
||||
@TableField(value = "data_type") |
||||
private String dataType; |
||||
|
||||
|
||||
// @ApiModelProperty("创建时间")
|
||||
@TableField(value = "create_time") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime createTime; |
||||
|
||||
// @ApiModelProperty("创建人id")
|
||||
@TableField(value = "create_id") |
||||
private String createId; |
||||
|
||||
// @ApiModelProperty("创建人名称")
|
||||
@TableField(value = "create_name") |
||||
private String createName; |
||||
|
||||
// @ApiModelProperty("更新时间")
|
||||
@TableField(value = "update_time") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime updateTime; |
||||
|
||||
// @ApiModelProperty("更新人id")
|
||||
@TableField(value = "update_id") |
||||
private String updateId; |
||||
|
||||
// @ApiModelProperty("更新人名称")
|
||||
@TableField(value = "update_name") |
||||
private String updateName; |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,116 @@
@@ -0,0 +1,116 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import java.io.Serializable; |
||||
import java.time.LocalDate; |
||||
import java.time.LocalDateTime; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
/** |
||||
* <p> |
||||
* 抽签项目表 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@TableName("t_lottery_project") |
||||
@ApiModel(value = "LotteryProject对象", description = "抽签项目表") |
||||
public class LotteryProject implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty("唯一id") |
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
@ApiModelProperty("状态") |
||||
@TableField(value = "status") |
||||
private String status; |
||||
|
||||
@ApiModelProperty("关联id") |
||||
@TableField(value = "relation_id") |
||||
private String relationId; |
||||
|
||||
@ApiModelProperty("项目编号") |
||||
@TableField(value = "project_number") |
||||
private String projectNumber; |
||||
|
||||
@ApiModelProperty("项目名称") |
||||
@TableField(value = "project_name") |
||||
private String projectName; |
||||
|
||||
@ApiModelProperty("开标时间") |
||||
@TableField(value = "bid_opening_time") |
||||
private LocalDate bidOpeningTime; |
||||
|
||||
@ApiModelProperty("评标时间") |
||||
@TableField(value = "bid_evaluation_time") |
||||
private LocalDateTime bidEvaluationTime; |
||||
|
||||
@ApiModelProperty("评标地点") |
||||
@TableField(value ="bid_evaluation_location") |
||||
private String bidEvaluationLocation; |
||||
|
||||
@ApiModelProperty("代理机构") |
||||
@TableField(value = "agency") |
||||
private String agency; |
||||
|
||||
@ApiModelProperty("状态名称") |
||||
@TableField(value = "status_name") |
||||
private String statusName; |
||||
|
||||
@ApiModelProperty("描述") |
||||
@TableField(value = "remake") |
||||
private String remake; |
||||
|
||||
@ApiModelProperty("人员所属部门名称") |
||||
@TableField(value = "user_dept_name") |
||||
private String userDeptName; |
||||
|
||||
@ApiModelProperty("人员所属部门") |
||||
@TableField(value = "user_dept_id") |
||||
private String userDeptId; |
||||
|
||||
@ApiModelProperty("创建人id") |
||||
@TableField(value = "create_id") |
||||
private String createId; |
||||
|
||||
@ApiModelProperty("创建时间") |
||||
@TableField(value = "create_time") |
||||
private LocalDateTime createTime; |
||||
|
||||
@ApiModelProperty("创建人姓名") |
||||
@TableField(value = "create_name") |
||||
private String createName; |
||||
|
||||
@ApiModelProperty("更新人id") |
||||
@TableField(value = "update_id") |
||||
private String updateId; |
||||
|
||||
@ApiModelProperty("更新时间") |
||||
@TableField(value = "update_time") |
||||
private LocalDateTime updateTime; |
||||
|
||||
@ApiModelProperty("更新人名称") |
||||
@TableField(value = "update_name") |
||||
private String updateName; |
||||
|
||||
@ApiModelProperty("类型 1-系统2-自建") |
||||
@TableField(value = "type") |
||||
private String type; |
||||
|
||||
@ApiModelProperty("删除标记 0-正常 1-删除") |
||||
@TableField(value = "del_flag") |
||||
private String delFlag; |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,58 @@
@@ -0,0 +1,58 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.*; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import jnpf.model.JsonTypeHandler; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
/** |
||||
* <p> |
||||
* 评审次数 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@TableName(value = "t_lottery_review",autoResultMap = true) |
||||
@ApiModel(value = "LotteryReview对象", description = "评审次数") |
||||
public class LotteryReview implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty("主键id") |
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
@ApiModelProperty("第几次评审数") |
||||
@TableField(value = "count") |
||||
private String count; |
||||
|
||||
@ApiModelProperty("抽签项目ID") |
||||
@TableField(value = "relation_id") |
||||
private String relationId; |
||||
|
||||
@ApiModelProperty("专家组别信息json") |
||||
@TableField(value = "expert_group_info",typeHandler = JsonTypeHandler.class) |
||||
private LotteryProjectDto.ExpertGroupInfo expertGroupInfo; |
||||
|
||||
@ApiModelProperty("抽取专家信息json") |
||||
@TableField(value = "extract_experts_info",typeHandler = JsonTypeHandler.class) |
||||
private String extractExpertsInfo; |
||||
|
||||
@TableField(value ="create_time") |
||||
private LocalDateTime createTime; |
||||
|
||||
@ApiModelProperty("结果信息") |
||||
@TableField(value ="upload_results_info",typeHandler = JsonTypeHandler.class) |
||||
private String uploadResultsInfo; |
||||
|
||||
|
||||
} |
||||
@ -0,0 +1,114 @@
@@ -0,0 +1,114 @@
|
||||
package jnpf.model.dto; |
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil; |
||||
import com.github.pagehelper.PageParam; |
||||
import jnpf.entity.Expert; |
||||
import jnpf.exception.DataException; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class ExpertDto { |
||||
@Data |
||||
public static class BaseParam { |
||||
/** |
||||
* 新增类型 1-专家 2-公司 |
||||
*/ |
||||
private String dataType = "1"; |
||||
/** |
||||
* 专家姓名 |
||||
*/ |
||||
private String expertName; |
||||
|
||||
/** |
||||
* @ApiModelProperty("专家组别(字典表id)") |
||||
*/ |
||||
private String expertGroup; |
||||
|
||||
// @ApiModelProperty("公司名称(招投标类型)")
|
||||
private String companyName; |
||||
|
||||
// @ApiModelProperty("联系方式")
|
||||
private String phoneNumber; |
||||
|
||||
// @ApiModelProperty("出生日期")
|
||||
private String birthdayString; |
||||
|
||||
// @ApiModelProperty("出生日期")
|
||||
private LocalDateTime birthday; |
||||
|
||||
// @ApiModelProperty("专家来源 1-内部专家 2-外部专家")
|
||||
private String expertSources; |
||||
|
||||
// @ApiModelProperty("工作单位名称")
|
||||
private String workUnit; |
||||
|
||||
// @ApiModelProperty("职务")
|
||||
private String post; |
||||
|
||||
// @ApiModelProperty("专业技术职称")
|
||||
private String technicalPosition; |
||||
|
||||
// @ApiModelProperty("专业专长")
|
||||
private String professionalExpertise; |
||||
|
||||
// @ApiModelProperty("性别 1-男 2-女")
|
||||
private String sex; |
||||
|
||||
// @ApiModelProperty("工龄")
|
||||
private String workingYears; |
||||
|
||||
// @ApiModelProperty("状态0-有效 1-无效")
|
||||
private String status; |
||||
|
||||
public void setBirthday(String birthdayString) { |
||||
try { |
||||
this.birthday = LocalDateTimeUtil.parse(birthdayString, "yyyy-MM-dd HH:mm:ss"); |
||||
}catch (Exception e){ |
||||
throw new DataException("日期格式错误,请使用yyyy-MM-dd HH:mm:ss格式"); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@Data |
||||
public static class AddParam extends BaseParam { |
||||
} |
||||
|
||||
@Data |
||||
public static class EditParam extends BaseParam { |
||||
//主键ID
|
||||
private String id; |
||||
} |
||||
|
||||
@Data |
||||
public static class DeleteParam { |
||||
//主键ID
|
||||
private String id; |
||||
} |
||||
|
||||
@Data |
||||
public static class ListParam extends PageParam { |
||||
/** |
||||
* 专家姓名 |
||||
*/ |
||||
private String expertName; |
||||
|
||||
|
||||
// @ApiModelProperty("公司名称(招投标类型)")
|
||||
private String companyName; |
||||
|
||||
// @ApiModelProperty("工作单位名称")
|
||||
private String workUnit; |
||||
|
||||
// @ApiModelProperty("联系方式")
|
||||
private String phoneNumber; |
||||
} |
||||
|
||||
@Data |
||||
public static class ListResponse extends Expert implements Serializable { |
||||
} |
||||
} |
||||
@ -0,0 +1,176 @@
@@ -0,0 +1,176 @@
|
||||
package jnpf.model.dto; |
||||
|
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil; |
||||
import com.github.pagehelper.PageParam; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import jnpf.entity.LotteryProject; |
||||
import jnpf.exception.DataException; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDate; |
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class LotteryProjectDto { |
||||
public enum StatusEnum { |
||||
//发布类型
|
||||
TO_BE_EXTRACTED("0", "待抽取"), |
||||
ALREADY_EXTRACTED("1", "已抽取"), |
||||
SUSPENSION("2", "中止"), |
||||
; |
||||
|
||||
private String code; |
||||
private String describe; |
||||
|
||||
StatusEnum(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; |
||||
} |
||||
} |
||||
|
||||
public enum TypeEnum { |
||||
//发布类型
|
||||
SYSTEM("0", "系统"), |
||||
ONESELF("1", "自建"), |
||||
; |
||||
|
||||
private String code; |
||||
private String describe; |
||||
|
||||
TypeEnum(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 BaseParam { |
||||
@ApiModelProperty("项目编号") |
||||
private String projectNumber; |
||||
|
||||
@ApiModelProperty("项目名称") |
||||
private String projectName; |
||||
|
||||
@ApiModelProperty("评标时间") |
||||
private LocalDateTime bidEvaluationTime; |
||||
|
||||
@ApiModelProperty("评标地点") |
||||
private String bidEvaluationLocation; |
||||
|
||||
@ApiModelProperty("代理机构") |
||||
private String agency; |
||||
|
||||
|
||||
public void setBidEvaluationTime(String bidEvaluationTime) { |
||||
try { |
||||
this.bidEvaluationTime = LocalDateTimeUtil.parse(bidEvaluationTime, "yyyy-MM-dd HH:mm:ss"); |
||||
}catch (Exception e){ |
||||
throw new DataException("日期格式错误,请使用yyyy-MM-dd HH:mm:ss格式"); |
||||
} |
||||
} |
||||
|
||||
} |
||||
|
||||
@Data |
||||
public static class AddParam extends BaseParam { |
||||
|
||||
} |
||||
|
||||
@Data |
||||
public static class EditParam extends BaseParam { |
||||
@ApiModelProperty("id") |
||||
private Integer id; |
||||
} |
||||
|
||||
@Data |
||||
public static class DeleteParam { |
||||
@ApiModelProperty("id") |
||||
private Integer id; |
||||
} |
||||
|
||||
@Data |
||||
public static class QueryListParam extends PageParam { |
||||
@ApiModelProperty("项目编号") |
||||
private String projectNumber; |
||||
|
||||
@ApiModelProperty("项目名称") |
||||
private String projectName; |
||||
|
||||
/** |
||||
* 权限控制 |
||||
*/ |
||||
private String menuId="572406059134626629"; |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class QueryResponse extends LotteryProject { |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class AddReviewParam { |
||||
@ApiModelProperty("抽签项目id") |
||||
private String id; |
||||
|
||||
@ApiModelProperty("专家组别信息Json") |
||||
private List<ExpertGroupInfo> expertGroupInfo; |
||||
|
||||
} |
||||
|
||||
@Data |
||||
public static class ExpertGroupInfo { |
||||
@ApiModelProperty("组别code") |
||||
private String groupCode; |
||||
@ApiModelProperty("组别名称") |
||||
private String groupName; |
||||
|
||||
@ApiModelProperty("专家库人数") |
||||
private String numberOfExpert; |
||||
|
||||
@ApiModelProperty("抽取人数") |
||||
private String numberOfExtract; |
||||
|
||||
@ApiModelProperty("确认参加人数") |
||||
private String numberOfParticipants; |
||||
|
||||
} |
||||
} |
||||
Loading…
Reference in new issue