94 changed files with 29 additions and 12111 deletions
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
package jnpf.mapper; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.entity.Base_datainterfaceEntity; |
||||
|
||||
/** |
||||
* base_datainterface |
||||
* 版本: V3.5 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2024-06-19 |
||||
*/ |
||||
public interface Base_datainterfaceMapper extends BaseMapper<Base_datainterfaceEntity> { |
||||
|
||||
} |
||||
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.entity.BiddingProjectSubscribeChild; |
||||
|
||||
/** |
||||
* <p> |
||||
* Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-06-11 |
||||
*/ |
||||
public interface BiddingProjectSubscribeChildMapper extends BaseMapper<BiddingProjectSubscribeChild> { |
||||
|
||||
} |
||||
@ -1,31 +0,0 @@
@@ -1,31 +0,0 @@
|
||||
package jnpf.mapper; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import jnpf.entity.BiddingProjectSubscribeEntity; |
||||
import jnpf.model.bidding_project_subscribe.BiddingProjectSubscribePagination; |
||||
import jnpf.model.dto.IndicatorStatisticsDto; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* bidding_project_subscribe |
||||
* 版本: V3.5 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2024-06-11 |
||||
*/ |
||||
public interface BiddingProjectSubscribeMapper extends BaseMapper<BiddingProjectSubscribeEntity> { |
||||
|
||||
IPage<BiddingProjectSubscribeEntity> queryList(@Param("page") Page<Object> objectPage, @Param("param") BiddingProjectSubscribePagination biddingProjectSubscribePagination, @Param("ew") Map<String, Object> ew,@Param("sql") String sql); |
||||
|
||||
BiddingProjectSubscribeEntity getInfoById(@Param("id") String id); |
||||
|
||||
List<IndicatorStatisticsDto.Indicator> getProjectsNumberByType(@Param("param")IndicatorStatisticsDto.ProjectsNumberParam param,@Param("ew") Map<String, Object> paramNameValuePairs, @Param("sql")String sql); |
||||
|
||||
List<IndicatorStatisticsDto.MoneyAndProjectsNumberChild> moneyAndProjectsNumber(@Param("param")IndicatorStatisticsDto.MoneyAndProjectsNumberParam param,@Param("ew") Map<String, Object> paramNameValuePairs, @Param("sql")String sql); |
||||
} |
||||
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.entity.BiddingProjectSubscribeStep; |
||||
|
||||
/** |
||||
* <p> |
||||
* Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-06-11 |
||||
*/ |
||||
public interface BiddingProjectSubscribeStepMapper extends BaseMapper<BiddingProjectSubscribeStep> { |
||||
|
||||
} |
||||
@ -1,33 +0,0 @@
@@ -1,33 +0,0 @@
|
||||
package jnpf.mapper; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.base.entity.DictionaryDataEntity; |
||||
import jnpf.entity.Bidding_project_statisticsEntity; |
||||
import jnpf.model.bidding_project_statistics.Bidding_project_statisticsPagination; |
||||
import jnpf.model.dto.BiddingProjectDto; |
||||
import org.apache.ibatis.annotations.MapKey; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* bidding_project_statistics |
||||
* 版本: V3.5 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2024-06-13 |
||||
*/ |
||||
public interface Bidding_project_statisticsMapper extends BaseMapper<Bidding_project_statisticsEntity> { |
||||
|
||||
List<Bidding_project_statisticsEntity> queryList(@Param("param")Bidding_project_statisticsPagination bidding_project_statisticsPagination, @Param("ew")Map<String, Object> paramNameValuePairs, @Param("sql") String replace); |
||||
|
||||
@MapKey("id") |
||||
List<Map<String,Object>> queryListDl(@Param("param")Bidding_project_statisticsPagination bidding_project_statisticsPagination, @Param("ew")Map<String, Object> paramNameValuePairs, @Param("sql") String replace,@Param("dataList") List<DictionaryDataEntity> dataList); |
||||
|
||||
|
||||
List<Bidding_project_statisticsEntity> queryListJe(@Param("param")Bidding_project_statisticsPagination bidding_project_statisticsPagination, @Param("ew")Map<String, Object> paramNameValuePairs, @Param("sql") String replace); |
||||
|
||||
List<String> getProjectNameList(@Param("ew")Map<String, Object> paramNameValuePairs,@Param("param") BiddingProjectDto.GetProjectNameList param); |
||||
} |
||||
@ -1,17 +0,0 @@
@@ -1,17 +0,0 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import jnpf.base.mapper.SuperMapper; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.entity.ContractEntity; |
||||
|
||||
/** |
||||
* |
||||
* Contract |
||||
* 版本: V3.0.0 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2020-12-31 |
||||
*/ |
||||
public interface ContractMapper extends SuperMapper<ContractEntity> { |
||||
|
||||
} |
||||
@ -1,22 +0,0 @@
@@ -1,22 +0,0 @@
|
||||
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); |
||||
} |
||||
@ -1,27 +0,0 @@
@@ -1,27 +0,0 @@
|
||||
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); |
||||
} |
||||
@ -1,19 +0,0 @@
@@ -1,19 +0,0 @@
|
||||
package jnpf.mapper; |
||||
|
||||
import jnpf.entity.LotteryReview; |
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
import org.apache.ibatis.annotations.Param; |
||||
|
||||
/** |
||||
* <p> |
||||
* 评审次数 Mapper 接口 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
public interface LotteryReviewMapper extends BaseMapper<LotteryReview> { |
||||
|
||||
LotteryProjectDto.QueryReviewResponse queryReviewInfo(@Param("id") String id); |
||||
} |
||||
@ -1,33 +0,0 @@
@@ -1,33 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.entity.Base_datainterfaceEntity; |
||||
import jnpf.model.base_datainterface.*; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* base_datainterface |
||||
* 版本: V3.5 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2024-06-19 |
||||
*/ |
||||
public interface Base_datainterfaceService extends IService<Base_datainterfaceEntity> { |
||||
List<Base_datainterfaceEntity> getList(Base_datainterfacePagination base_datainterfacePagination); |
||||
|
||||
List<Base_datainterfaceEntity> getTypeList(Base_datainterfacePagination base_datainterfacePagination,String dataType); |
||||
|
||||
Base_datainterfaceEntity getInfo(String id); |
||||
|
||||
void delete(Base_datainterfaceEntity entity); |
||||
|
||||
void create(Base_datainterfaceEntity entity); |
||||
|
||||
boolean update(String id, Base_datainterfaceEntity entity); |
||||
|
||||
//子表方法
|
||||
//副表数据方法
|
||||
String checkForm(Base_datainterfaceForm form,int i); |
||||
|
||||
} |
||||
@ -1,63 +0,0 @@
@@ -1,63 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.entity.BiddingProjectSubscribeEntity; |
||||
import jnpf.model.bidding_project_subscribe.*; |
||||
import jnpf.model.dto.BiddingProjectDto; |
||||
import jnpf.model.dto.IndicatorStatisticsDto; |
||||
import jnpf.permission.entity.UserEntity; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* bidding_project_subscribe |
||||
* 版本: V3.5 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2024-06-11 |
||||
*/ |
||||
public interface BiddingProjectSubscribeService extends IService<BiddingProjectSubscribeEntity> { |
||||
List<BiddingProjectSubscribeEntity> getList(BiddingProjectSubscribePagination biddingProjectSubscribePagination); |
||||
|
||||
List<BiddingProjectSubscribeEntity> getTypeList(BiddingProjectSubscribePagination biddingProjectSubscribePagination, String dataType); |
||||
|
||||
BiddingProjectSubscribeEntity getInfo(String id); |
||||
|
||||
void delete(BiddingProjectSubscribeEntity entity); |
||||
|
||||
void create(BiddingProjectSubscribeEntity entity); |
||||
|
||||
boolean update(String id, BiddingProjectSubscribeEntity entity); |
||||
|
||||
//子表方法
|
||||
//副表数据方法
|
||||
String checkForm(BiddingProjectSubscribeForm form, int i); |
||||
|
||||
void updateFlow(UserEntity userEntity, BiddingProjectSubscribeEntity entity,Boolean add); |
||||
|
||||
void auditing(BiddingProjectDto.AuditingParam param); |
||||
|
||||
void updateFlowByUser(BiddingProjectSubscribeEntity entity); |
||||
|
||||
String obtainHierarchy(); |
||||
|
||||
void archivist(BiddingProjectDto.ArchivistParam param); |
||||
|
||||
void termination(String id); |
||||
|
||||
List<JSONObject> getAllFileInfo(String id); |
||||
|
||||
void temporaryStorage(UserEntity userInfo, BiddingProjectSubscribeEntity entity); |
||||
|
||||
MultipartFile download(String id, String type); |
||||
MultipartFile download(String id, String type,BiddingProjectSubscribeEntity entity); |
||||
|
||||
String obtainHierarchyOfCreate(String id); |
||||
|
||||
List<IndicatorStatisticsDto.Indicator> getProjectsNumberByType(IndicatorStatisticsDto.ProjectsNumberParam param, Map<String, Object> paramNameValuePairs, String sql); |
||||
|
||||
List<IndicatorStatisticsDto.MoneyAndProjectsNumberChild> moneyAndProjectsNumber(IndicatorStatisticsDto.MoneyAndProjectsNumberParam param, Map<String, Object> paramNameValuePairs, String replace); |
||||
} |
||||
@ -1,36 +0,0 @@
@@ -1,36 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.entity.Bidding_project_statisticsEntity; |
||||
import jnpf.model.bidding_project_statistics.*; |
||||
import jnpf.model.dto.BiddingProjectDto; |
||||
|
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* bidding_project_statistics |
||||
* 版本: V3.5 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2024-06-13 |
||||
*/ |
||||
public interface Bidding_project_statisticsService extends IService<Bidding_project_statisticsEntity> { |
||||
List<Map<String, Object>> getList(Bidding_project_statisticsPagination bidding_project_statisticsPagination); |
||||
|
||||
List<Map<String, Object>> getTypeList(Bidding_project_statisticsPagination bidding_project_statisticsPagination,String dataType); |
||||
|
||||
Bidding_project_statisticsEntity getInfo(String id); |
||||
|
||||
void delete(Bidding_project_statisticsEntity entity); |
||||
|
||||
void create(Bidding_project_statisticsEntity entity); |
||||
|
||||
boolean update(String id, Bidding_project_statisticsEntity entity); |
||||
|
||||
//子表方法
|
||||
//副表数据方法
|
||||
String checkForm(Bidding_project_statisticsForm form,int i); |
||||
|
||||
List<String> getProjectNameList(BiddingProjectDto.GetProjectNameList param); |
||||
} |
||||
@ -1,29 +0,0 @@
@@ -1,29 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import jnpf.base.service.SuperService; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.base.Pagination; |
||||
import jnpf.entity.ContractEntity; |
||||
|
||||
import java.util.*; |
||||
|
||||
/** |
||||
* |
||||
* Contract |
||||
* 版本: V3.0.0 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2020-12-31 |
||||
*/ |
||||
public interface ContractService extends SuperService<ContractEntity> { |
||||
|
||||
List<ContractEntity> getlist(Pagination pagination); |
||||
|
||||
ContractEntity getInfo(String id); |
||||
|
||||
void create(ContractEntity entity); |
||||
|
||||
void update(String id, ContractEntity entity); |
||||
|
||||
void delete(ContractEntity entity); |
||||
} |
||||
@ -1,8 +0,0 @@
@@ -1,8 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import jnpf.permission.model.authorize.AuthorizeConditionModel; |
||||
|
||||
public interface CustomAuthService { |
||||
public <T> QueryWrapper<T> getCondition(AuthorizeConditionModel conditionModel); |
||||
} |
||||
@ -1,28 +0,0 @@
@@ -1,28 +0,0 @@
|
||||
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 org.springframework.web.multipart.MultipartFile; |
||||
|
||||
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); |
||||
|
||||
void expertImport(MultipartFile file); |
||||
} |
||||
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.entity.BiddingProjectSubscribeChild; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-06-11 |
||||
*/ |
||||
public interface IBiddingProjectSubscribeChildService extends IService<BiddingProjectSubscribeChild> { |
||||
|
||||
} |
||||
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.entity.BiddingProjectSubscribeStep; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-06-11 |
||||
*/ |
||||
public interface IBiddingProjectSubscribeStepService extends IService<BiddingProjectSubscribeStep> { |
||||
|
||||
} |
||||
@ -1,51 +0,0 @@
@@ -1,51 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import jnpf.base.vo.DownloadVO; |
||||
import jnpf.entity.Expert; |
||||
import jnpf.entity.LotteryProject; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <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); |
||||
|
||||
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); |
||||
} |
||||
@ -1,18 +0,0 @@
@@ -1,18 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import jnpf.entity.LotteryReview; |
||||
import com.baomidou.mybatisplus.extension.service.IService; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
|
||||
/** |
||||
* <p> |
||||
* 评审次数 服务类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
public interface ILotteryReviewService extends IService<LotteryReview> { |
||||
|
||||
LotteryProjectDto.QueryReviewResponse queryReviewInfo(String id); |
||||
} |
||||
@ -1,12 +0,0 @@
@@ -1,12 +0,0 @@
|
||||
package jnpf.service; |
||||
|
||||
import jnpf.model.dto.IndicatorStatisticsDto; |
||||
|
||||
public interface IndicatorStatisticsService { |
||||
IndicatorStatisticsDto.ProjectsNumberResponse projectsNumber(IndicatorStatisticsDto.ProjectsNumberParam param); |
||||
|
||||
IndicatorStatisticsDto.MoneyAndProjectsNumberResponse moneyAndProjectsNumber(IndicatorStatisticsDto.MoneyAndProjectsNumberParam param); |
||||
|
||||
IndicatorStatisticsDto.MyToDoListResponse myToDoList(); |
||||
|
||||
} |
||||
@ -1,209 +0,0 @@
@@ -1,209 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.util.ObjectUtil; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.database.model.superQuery.ConditionJsonModel; |
||||
import jnpf.database.model.superQuery.SuperQueryConditionModel; |
||||
import jnpf.database.model.superQuery.SuperQueryJsonModel; |
||||
import jnpf.entity.Base_datainterfaceEntity; |
||||
import jnpf.mapper.Base_datainterfaceMapper; |
||||
import jnpf.model.base_datainterface.*; |
||||
import jnpf.permission.model.authorize.AuthorizeConditionModel; |
||||
import jnpf.service.Base_datainterfaceService; |
||||
import jnpf.service.CustomAuthService; |
||||
import jnpf.util.*; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.lang.reflect.Field; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.stream.Collectors; |
||||
/** |
||||
* |
||||
* base_datainterface |
||||
* 版本: V3.5 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2024-06-19 |
||||
*/ |
||||
@Service |
||||
public class Base_datainterfaceServiceImpl extends ServiceImpl<Base_datainterfaceMapper, Base_datainterfaceEntity> implements Base_datainterfaceService{ |
||||
@Autowired |
||||
private GeneraterSwapUtil generaterSwapUtil; |
||||
|
||||
@Autowired |
||||
private UserProvider userProvider; |
||||
|
||||
@Autowired |
||||
private CustomAuthService customAuthService; |
||||
|
||||
@Override |
||||
public List<Base_datainterfaceEntity> getList(Base_datainterfacePagination base_datainterfacePagination){ |
||||
return getTypeList(base_datainterfacePagination,base_datainterfacePagination.getDataType()); |
||||
} |
||||
/** 列表查询 */ |
||||
@Override |
||||
public List<Base_datainterfaceEntity> getTypeList(Base_datainterfacePagination base_datainterfacePagination,String dataType){ |
||||
String userId=userProvider.get().getUserId(); |
||||
List<String> AllIdList =new ArrayList(); |
||||
List<List<String>> intersectionList =new ArrayList<>(); |
||||
int total=0; |
||||
int base_datainterfaceNum =0; |
||||
QueryWrapper<Base_datainterfaceEntity> base_datainterfaceQueryWrapper=new QueryWrapper<>(); |
||||
List<String> allSuperIDlist = new ArrayList<>(); |
||||
String superOp =""; |
||||
if (ObjectUtil.isNotEmpty(base_datainterfacePagination.getSuperQueryJson())){ |
||||
SuperQueryJsonModel superQueryJsonModel = JsonUtil.getJsonToBean(base_datainterfacePagination.getSuperQueryJson(), SuperQueryJsonModel.class); |
||||
String matchLogic = ""; |
||||
List<ConditionJsonModel> superQueryList = new ArrayList<>(); |
||||
for (ConditionJsonModel conditionjson : superQueryList){ |
||||
Map<String, Object> map = JsonUtil.stringToMap(conditionjson.getAttr()); |
||||
Map<String, Object> configMap = JsonUtil.stringToMap(map.get("__config__").toString()); |
||||
String tableName = configMap.get("relationTable")!=null ? String.valueOf(configMap.get("relationTable")) : String.valueOf(configMap.get("tableName")); |
||||
if (map.get("multiple") != null) { |
||||
if (Boolean.valueOf(String.valueOf(map.get("multiple"))) && ObjectUtil.isNull(conditionjson.getFieldValue())) { |
||||
conditionjson.setFieldValue("[]"); |
||||
} |
||||
} |
||||
conditionjson.setTableName(tableName); |
||||
} |
||||
List<String> allSuperList = new ArrayList<>(); |
||||
List<List<String>> intersectionSuperList = new ArrayList<>(); |
||||
|
||||
|
||||
|
||||
int base_datainterfaceNum1 = 0; |
||||
QueryWrapper<Base_datainterfaceEntity> base_datainterfaceSuperWrapper = new QueryWrapper<>(); |
||||
base_datainterfaceNum1 = generaterSwapUtil.getCondition(new SuperQueryConditionModel(base_datainterfaceSuperWrapper,superQueryList,matchLogic,"base_datainterface") |
||||
,new Base_datainterfaceEntity(),base_datainterfaceNum1); |
||||
if (base_datainterfaceNum1>0){ |
||||
List<String> base_datainterfaceList =this.list(base_datainterfaceSuperWrapper).stream().map(Base_datainterfaceEntity::getId).collect(Collectors.toList()); |
||||
allSuperList.addAll(base_datainterfaceList); |
||||
intersectionSuperList.add(base_datainterfaceList); |
||||
} |
||||
superOp = matchLogic; |
||||
//and or
|
||||
if(matchLogic.equalsIgnoreCase("and")){ |
||||
allSuperIDlist = generaterSwapUtil.getIntersection(intersectionSuperList); |
||||
}else{ |
||||
allSuperIDlist = allSuperList; |
||||
} |
||||
} |
||||
boolean pcPermission = false; |
||||
boolean appPermission = false; |
||||
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); |
||||
if(isPc && pcPermission){ |
||||
if (!userProvider.get().getIsAdministrator()){ |
||||
Object base_datainterfaceObj= customAuthService.getCondition(new AuthorizeConditionModel(base_datainterfaceQueryWrapper,base_datainterfacePagination.getMenuId(),"base_datainterface")); |
||||
if (ObjectUtil.isEmpty(base_datainterfaceObj)){ |
||||
return new ArrayList<>(); |
||||
} else { |
||||
base_datainterfaceQueryWrapper = (QueryWrapper<Base_datainterfaceEntity>)base_datainterfaceObj; |
||||
if( base_datainterfaceQueryWrapper.getExpression().getNormal().size()>0){ |
||||
base_datainterfaceNum++; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
if(!isPc && appPermission){ |
||||
if (!userProvider.get().getIsAdministrator()){ |
||||
Object base_datainterfaceObj= customAuthService.getCondition(new AuthorizeConditionModel(base_datainterfaceQueryWrapper,base_datainterfacePagination.getMenuId(),"base_datainterface")); |
||||
if (ObjectUtil.isEmpty(base_datainterfaceObj)){ |
||||
return new ArrayList<>(); |
||||
} else { |
||||
base_datainterfaceQueryWrapper = (QueryWrapper<Base_datainterfaceEntity>)base_datainterfaceObj; |
||||
if( base_datainterfaceQueryWrapper.getExpression().getNormal().size()>0){ |
||||
base_datainterfaceNum++; |
||||
} |
||||
} |
||||
|
||||
|
||||
} |
||||
} |
||||
|
||||
List<String> intersection = generaterSwapUtil.getIntersection(intersectionList); |
||||
if (total>0){ |
||||
if (intersection.size()==0){ |
||||
intersection.add("jnpfNullList"); |
||||
} |
||||
base_datainterfaceQueryWrapper.lambda().in(Base_datainterfaceEntity::getId, intersection); |
||||
} |
||||
//是否有高级查询
|
||||
if (StringUtil.isNotEmpty(superOp)){ |
||||
if (allSuperIDlist.size()==0){ |
||||
allSuperIDlist.add("jnpfNullList"); |
||||
} |
||||
List<String> finalAllSuperIDlist = allSuperIDlist; |
||||
base_datainterfaceQueryWrapper.lambda().and(t->t.in(Base_datainterfaceEntity::getId, finalAllSuperIDlist)); |
||||
} |
||||
|
||||
|
||||
//排序
|
||||
if(StringUtil.isEmpty(base_datainterfacePagination.getSidx())){ |
||||
base_datainterfaceQueryWrapper.lambda().orderByDesc(Base_datainterfaceEntity::getId); |
||||
}else{ |
||||
try { |
||||
String sidx = base_datainterfacePagination.getSidx(); |
||||
String[] strs= sidx.split("_name"); |
||||
Base_datainterfaceEntity base_datainterfaceEntity = new Base_datainterfaceEntity(); |
||||
Field declaredField = base_datainterfaceEntity.getClass().getDeclaredField(strs[0]); |
||||
declaredField.setAccessible(true); |
||||
String value = declaredField.getAnnotation(TableField.class).value(); |
||||
base_datainterfaceQueryWrapper="asc".equals(base_datainterfacePagination.getSort().toLowerCase())?base_datainterfaceQueryWrapper.orderByAsc(value):base_datainterfaceQueryWrapper.orderByDesc(value); |
||||
} catch (NoSuchFieldException e) { |
||||
e.printStackTrace(); |
||||
} |
||||
} |
||||
|
||||
if("0".equals(dataType)){ |
||||
if((total>0 && AllIdList.size()>0) || total==0){ |
||||
Page<Base_datainterfaceEntity> page=new Page<>(base_datainterfacePagination.getCurrentPage(), base_datainterfacePagination.getPageSize()); |
||||
IPage<Base_datainterfaceEntity> userIPage=this.page(page, base_datainterfaceQueryWrapper); |
||||
return base_datainterfacePagination.setData(userIPage.getRecords(),userIPage.getTotal()); |
||||
}else{ |
||||
List<Base_datainterfaceEntity> list = new ArrayList(); |
||||
return base_datainterfacePagination.setData(list, list.size()); |
||||
} |
||||
}else{ |
||||
return this.list(base_datainterfaceQueryWrapper); |
||||
} |
||||
} |
||||
@Override |
||||
public Base_datainterfaceEntity getInfo(String id){ |
||||
QueryWrapper<Base_datainterfaceEntity> queryWrapper=new QueryWrapper<>(); |
||||
queryWrapper.lambda().eq(Base_datainterfaceEntity::getId,id); |
||||
return this.getOne(queryWrapper); |
||||
} |
||||
@Override |
||||
public void create(Base_datainterfaceEntity entity){ |
||||
this.save(entity); |
||||
} |
||||
@Override |
||||
public boolean update(String id, Base_datainterfaceEntity entity){ |
||||
return this.updateById(entity); |
||||
} |
||||
@Override |
||||
public void delete(Base_datainterfaceEntity entity){ |
||||
if(entity!=null){ |
||||
this.removeById(entity.getId()); |
||||
} |
||||
} |
||||
/** 验证表单唯一字段,正则,非空 i-0新增-1修改*/ |
||||
@Override |
||||
public String checkForm(Base_datainterfaceForm form,int i) { |
||||
boolean isUp =StringUtil.isNotEmpty(form.getId()) && !form.getId().equals("0"); |
||||
String id=""; |
||||
String countRecover = ""; |
||||
if (isUp){ |
||||
id = form.getId(); |
||||
} |
||||
//主表字段验证
|
||||
return countRecover; |
||||
} |
||||
} |
||||
@ -1,20 +0,0 @@
@@ -1,20 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.entity.BiddingProjectSubscribeChild; |
||||
import jnpf.mapper.BiddingProjectSubscribeChildMapper; |
||||
import jnpf.service.IBiddingProjectSubscribeChildService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-06-11 |
||||
*/ |
||||
@Service |
||||
public class BiddingProjectSubscribeChildServiceImpl extends ServiceImpl<BiddingProjectSubscribeChildMapper, BiddingProjectSubscribeChild> implements IBiddingProjectSubscribeChildService { |
||||
|
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -1,20 +0,0 @@
@@ -1,20 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.entity.BiddingProjectSubscribeStep; |
||||
import jnpf.mapper.BiddingProjectSubscribeStepMapper; |
||||
import jnpf.service.IBiddingProjectSubscribeStepService; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* <p> |
||||
* 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-06-11 |
||||
*/ |
||||
@Service |
||||
public class BiddingProjectSubscribeStepServiceImpl extends ServiceImpl<BiddingProjectSubscribeStepMapper, BiddingProjectSubscribeStep> implements IBiddingProjectSubscribeStepService { |
||||
|
||||
} |
||||
@ -1,297 +0,0 @@
@@ -1,297 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.collection.CollectionUtil; |
||||
import cn.hutool.core.util.ObjectUtil; |
||||
import cn.hutool.core.util.StrUtil; |
||||
import com.alibaba.fastjson.JSON; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.base.DictionaryDataApi; |
||||
import jnpf.base.entity.DictionaryDataEntity; |
||||
import jnpf.entity.Bidding_project_statisticsEntity; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.mapper.Bidding_project_statisticsMapper; |
||||
import jnpf.model.bidding_project_statistics.*; |
||||
import jnpf.model.dto.BiddingProjectDto; |
||||
import jnpf.permission.OrganizeApi; |
||||
import jnpf.permission.model.authorize.AuthorizeConditionModel; |
||||
import jnpf.permission.util.AuthorizeUtil; |
||||
import jnpf.service.BiddingProjectSubscribeService; |
||||
import jnpf.service.Bidding_project_statisticsService; |
||||
import jnpf.service.CustomAuthService; |
||||
import jnpf.util.*; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import javax.annotation.Resource; |
||||
import java.lang.reflect.Field; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import java.util.Optional; |
||||
|
||||
/** |
||||
* bidding_project_statistics |
||||
* 版本: V3.5 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2024-06-13 |
||||
*/ |
||||
@Service |
||||
@AllArgsConstructor |
||||
public class Bidding_project_statisticsServiceImpl extends ServiceImpl<Bidding_project_statisticsMapper, Bidding_project_statisticsEntity> implements Bidding_project_statisticsService { |
||||
// @Autowired
|
||||
// private GeneraterSwapUtil generaterSwapUtil;
|
||||
private final DictionaryDataApi dictionaryDataApi; |
||||
private final UserProvider userProvider; |
||||
private final OrganizeApi organizeApi; |
||||
private final CustomAuthService customAuthService; |
||||
private final BiddingProjectSubscribeService biddingProjectSubscribeService; |
||||
|
||||
@Override |
||||
public List<Map<String, Object>> getList(Bidding_project_statisticsPagination bidding_project_statisticsPagination) { |
||||
return getTypeList(bidding_project_statisticsPagination, bidding_project_statisticsPagination.getDataType()); |
||||
} |
||||
|
||||
/** |
||||
* 列表查询 |
||||
*/ |
||||
@Override |
||||
public List<Map<String, Object>> getTypeList(Bidding_project_statisticsPagination bidding_project_statisticsPagination, String dataType) { |
||||
String userId = userProvider.get().getUserId(); |
||||
List<String> AllIdList = new ArrayList(); |
||||
List<List<String>> intersectionList = new ArrayList<>(); |
||||
int total = 0; |
||||
int bidding_project_statisticsNum = 0; |
||||
QueryWrapper<Bidding_project_statisticsEntity> bidding_project_statisticsQueryWrapper = new QueryWrapper<>(); |
||||
boolean pcPermission = true; |
||||
boolean appPermission = false; |
||||
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); |
||||
if (isPc) { |
||||
if (!userProvider.get().getIsAdministrator()) { |
||||
Object bidding_project_statisticsObj = customAuthService.getCondition(new AuthorizeConditionModel(bidding_project_statisticsQueryWrapper, bidding_project_statisticsPagination.getMenuId(), "bidding_project_subscribe")); |
||||
System.out.println("---------------" + JSON.toJSONString(bidding_project_statisticsObj)); |
||||
if (ObjectUtil.isEmpty(bidding_project_statisticsObj)) { |
||||
return new ArrayList<>(); |
||||
} else { |
||||
bidding_project_statisticsQueryWrapper = (QueryWrapper<Bidding_project_statisticsEntity>) bidding_project_statisticsObj; |
||||
if (bidding_project_statisticsQueryWrapper.getExpression().getNormal().size() > 0) { |
||||
bidding_project_statisticsNum++; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
|
||||
if (Boolean.TRUE) { |
||||
|
||||
switch (bidding_project_statisticsPagination.getQueryType()) { |
||||
case "1": |
||||
List<Bidding_project_statisticsEntity> bidding_project_statisticsEntities = this.baseMapper.queryList(bidding_project_statisticsPagination, bidding_project_statisticsQueryWrapper.getParamNameValuePairs(), bidding_project_statisticsQueryWrapper.getSqlSegment().replace("paramNameValuePairs.", "")); |
||||
// checkResult(bidding_project_statisticsEntities);
|
||||
|
||||
return JsonUtil.getJsonToList(JSON.parseArray(JSON.toJSONString(bidding_project_statisticsEntities))); |
||||
case "2": |
||||
List<DictionaryDataEntity> dataList = dictionaryDataApi.getList("dc6b2542d94b5434fc61ec1d59592901"); |
||||
dataList.forEach(data -> data.setEnCode("'" + data.getEnCode() + "'")); |
||||
List<Map<String, Object>> maps = this.baseMapper.queryListDl(bidding_project_statisticsPagination, bidding_project_statisticsQueryWrapper.getParamNameValuePairs(), bidding_project_statisticsQueryWrapper.getSqlSegment().replace("paramNameValuePairs.", ""), dataList); |
||||
// for (Map<String, Object> map : maps) {
|
||||
// String reportingUnit = map.get("reportingUnit").toString();
|
||||
// if (StrUtil.isBlank(reportingUnit))continue;
|
||||
// List<String> strings = JSON.parseArray(reportingUnit, String.class);
|
||||
//// List<OrganizeEntity> organizeName = organizeApi.getOrganizeName(strings);
|
||||
// if (CollectionUtil.isEmpty(strings))continue;
|
||||
// map.put("reportingUnit",organizeApi.getInfoById(strings.get(strings.size()-1)).getFullName());
|
||||
//// map.put("reportingUnit",StrUtil.join("/",organizeName.stream().map(OrganizeEntity::getFullName).toList()));
|
||||
// }
|
||||
return maps; |
||||
case "3": |
||||
bidding_project_statisticsEntities = this.baseMapper.queryListJe(bidding_project_statisticsPagination, bidding_project_statisticsQueryWrapper.getParamNameValuePairs(), bidding_project_statisticsQueryWrapper.getSqlSegment().replace("paramNameValuePairs.", "")); |
||||
// checkResult(bidding_project_statisticsEntities);
|
||||
|
||||
return JsonUtil.getJsonToList(JSON.parseArray(JSON.toJSONString(bidding_project_statisticsEntities))); |
||||
} |
||||
} |
||||
|
||||
// if (!isPc && appPermission) {
|
||||
// if (!userProvider.get().getIsAdministrator()) {
|
||||
// Object bidding_project_statisticsObj = authorizeUtil.getCondition(new AuthorizeConditionModel(bidding_project_statisticsQueryWrapper, bidding_project_statisticsPagination.getMenuId(), "bidding_project_statistics"));
|
||||
// if (ObjectUtil.isEmpty(bidding_project_statisticsObj)) {
|
||||
// return new ArrayList<>();
|
||||
// } else {
|
||||
// bidding_project_statisticsQueryWrapper = (QueryWrapper<Bidding_project_statisticsEntity>) bidding_project_statisticsObj;
|
||||
// if (bidding_project_statisticsQueryWrapper.getExpression().getNormal().size() > 0) {
|
||||
// bidding_project_statisticsNum++;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// }
|
||||
// }
|
||||
|
||||
// List<String> intersection = generaterSwapUtil.getIntersection(intersectionList);
|
||||
// if (total > 0) {
|
||||
// if (intersection.size() == 0) {
|
||||
// intersection.add("jnpfNullList");
|
||||
// }
|
||||
// bidding_project_statisticsQueryWrapper.lambda().in(Bidding_project_statisticsEntity::getId, intersection);
|
||||
// }
|
||||
// //是否有高级查询
|
||||
//
|
||||
//
|
||||
// //排序
|
||||
// if (StringUtil.isEmpty(bidding_project_statisticsPagination.getSidx())) {
|
||||
// bidding_project_statisticsQueryWrapper.lambda().orderByDesc(Bidding_project_statisticsEntity::getProjectsNums);
|
||||
// } else {
|
||||
// try {
|
||||
// String sidx = bidding_project_statisticsPagination.getSidx();
|
||||
// String[] strs = sidx.split("_name");
|
||||
// Bidding_project_statisticsEntity bidding_project_statisticsEntity = new Bidding_project_statisticsEntity();
|
||||
// Field declaredField = bidding_project_statisticsEntity.getClass().getDeclaredField(strs[0]);
|
||||
// declaredField.setAccessible(true);
|
||||
// String value = declaredField.getAnnotation(TableField.class).value();
|
||||
// bidding_project_statisticsQueryWrapper = "asc".equals(bidding_project_statisticsPagination.getSort().toLowerCase()) ? bidding_project_statisticsQueryWrapper.orderByAsc(value) : bidding_project_statisticsQueryWrapper.orderByDesc(value);
|
||||
// } catch (NoSuchFieldException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
return new ArrayList<>(); |
||||
|
||||
// if ("0".equals(dataType)) {
|
||||
// if ((total > 0 && AllIdList.size() > 0) || total == 0) {
|
||||
// Page<Bidding_project_statisticsEntity> page = new Page<>(bidding_project_statisticsPagination.getCurrentPage(), bidding_project_statisticsPagination.getPageSize());
|
||||
// IPage<Bidding_project_statisticsEntity> userIPage = this.page(page, bidding_project_statisticsQueryWrapper);
|
||||
// return bidding_project_statisticsPagination.setData(userIPage.getRecords(), userIPage.getTotal());
|
||||
// } else {
|
||||
// List<Bidding_project_statisticsEntity> list = new ArrayList();
|
||||
// return bidding_project_statisticsPagination.setData(list, list.size());
|
||||
// }
|
||||
// } else {
|
||||
// return this.list(bidding_project_statisticsQueryWrapper);
|
||||
// }
|
||||
} |
||||
|
||||
private void checkResult(List<Bidding_project_statisticsEntity> bidding_project_statisticsEntities) { |
||||
|
||||
for (Bidding_project_statisticsEntity bidding_project_statisticsEntity : bidding_project_statisticsEntities) { |
||||
String reportingUnit = bidding_project_statisticsEntity.getReportingUnit(); |
||||
if (StrUtil.isBlank(reportingUnit)) continue; |
||||
List<String> strings = JSON.parseArray(reportingUnit, String.class); |
||||
// List<OrganizeEntity> organizeName = organizeApi.getOrganizeName(strings);
|
||||
if (CollectionUtil.isEmpty(strings)) continue; |
||||
bidding_project_statisticsEntity.setReportingUnit(organizeApi.getInfoById(strings.get(strings.size() - 1)).getFullName()); |
||||
// bidding_project_statisticsEntity.setReportingUnit(StrUtil.join("/",organizeName.stream().map(OrganizeEntity::getFullName).toList()));
|
||||
} |
||||
} |
||||
|
||||
@Override |
||||
public Bidding_project_statisticsEntity getInfo(String id) { |
||||
QueryWrapper<Bidding_project_statisticsEntity> queryWrapper = new QueryWrapper<>(); |
||||
queryWrapper.lambda().eq(Bidding_project_statisticsEntity::getId, id); |
||||
return this.getOne(queryWrapper); |
||||
} |
||||
|
||||
@Override |
||||
public void create(Bidding_project_statisticsEntity entity) { |
||||
this.save(entity); |
||||
} |
||||
|
||||
@Override |
||||
public boolean update(String id, Bidding_project_statisticsEntity entity) { |
||||
return this.updateById(entity); |
||||
} |
||||
|
||||
@Override |
||||
public void delete(Bidding_project_statisticsEntity entity) { |
||||
if (entity != null) { |
||||
this.removeById(entity.getId()); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 验证表单唯一字段,正则,非空 i-0新增-1修改 |
||||
*/ |
||||
@Override |
||||
public String checkForm(Bidding_project_statisticsForm form, int i) { |
||||
boolean isUp = StringUtil.isNotEmpty(form.getId()) && !form.getId().equals("0"); |
||||
String id = ""; |
||||
String countRecover = ""; |
||||
if (isUp) { |
||||
id = form.getId(); |
||||
} |
||||
//主表字段验证
|
||||
return countRecover; |
||||
} |
||||
|
||||
|
||||
@Override |
||||
public List<String> getProjectNameList(BiddingProjectDto.GetProjectNameList param) { |
||||
checkParam(param); |
||||
QueryWrapper<Bidding_project_statisticsEntity> bidding_project_statisticsQueryWrapper = new QueryWrapper<>(); |
||||
boolean isPc = ServletUtil.getHeader("jnpf-origin").equals("pc"); |
||||
if (isPc) { |
||||
if (!userProvider.get().getIsAdministrator()) { |
||||
Object bidding_project_statisticsObj = customAuthService.getCondition(new AuthorizeConditionModel(bidding_project_statisticsQueryWrapper, param.getMenuId(), "bidding_project_subscribe")); |
||||
System.out.println("---------------" + JSON.toJSONString(bidding_project_statisticsObj)); |
||||
if (ObjectUtil.isEmpty(bidding_project_statisticsObj)) { |
||||
return new ArrayList<>(); |
||||
} else { |
||||
bidding_project_statisticsQueryWrapper = (QueryWrapper<Bidding_project_statisticsEntity>) bidding_project_statisticsObj; |
||||
} |
||||
} |
||||
} |
||||
String replace = bidding_project_statisticsQueryWrapper.getSqlSegment().replace("paramNameValuePairs.", ""); |
||||
param.setSql(replace); |
||||
//* 1-项目 * 2-代理 * 3-金额
|
||||
switch (param.getStatisticalType()) { |
||||
case "1": |
||||
case "3": |
||||
String projectTypeCode=getProjectTypeCode(param.getFieldName()); |
||||
param.setCode(projectTypeCode); |
||||
return this.baseMapper.getProjectNameList(bidding_project_statisticsQueryWrapper.getParamNameValuePairs(),param); |
||||
case "2": |
||||
List<DictionaryDataEntity> dataList = dictionaryDataApi.getList("dc6b2542d94b5434fc61ec1d59592901"); |
||||
Optional<DictionaryDataEntity> first = dataList.stream().filter(data -> data.getFullName().equals(param.getFieldName())).findFirst(); |
||||
if (!first.isPresent())return new ArrayList<>(); |
||||
param.setCode(first.get().getEnCode()); |
||||
return this.baseMapper.getProjectNameList(bidding_project_statisticsQueryWrapper.getParamNameValuePairs(),param); |
||||
default: |
||||
return new ArrayList<>(); |
||||
} |
||||
} |
||||
|
||||
private String getProjectTypeCode(String fieldName) { |
||||
switch (fieldName) { |
||||
case "engineering": |
||||
return "1"; |
||||
case "goods": |
||||
return "2"; |
||||
case "service": |
||||
return "3"; |
||||
case "rentOut": |
||||
return "4"; |
||||
case "agency1": |
||||
return "5"; |
||||
case "other": |
||||
return "6"; |
||||
default: |
||||
return ""; |
||||
} |
||||
} |
||||
|
||||
private void checkParam(BiddingProjectDto.GetProjectNameList param) { |
||||
if (StrUtil.isBlank(param.getProjectName())) { |
||||
throw new DataException("参数为空[项目名称]"); |
||||
} |
||||
if (StrUtil.isBlank(param.getStatisticalType())) { |
||||
throw new DataException("参数为空[统计类型]"); |
||||
} |
||||
if (StrUtil.isBlank(param.getFieldName())) { |
||||
throw new DataException("参数为空[字段名称]"); |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
||||
@ -1,84 +0,0 @@
@@ -1,84 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import jnpf.base.service.SuperServiceImpl; |
||||
import com.baomidou.dynamic.datasource.annotation.DSTransactional; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.base.Pagination; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.util.RandomUtil; |
||||
import jnpf.util.UserProvider; |
||||
import jnpf.entity.ContractEntity; |
||||
import jnpf.mapper.ContractMapper; |
||||
import jnpf.service.ContractService; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
|
||||
import java.util.List; |
||||
/** |
||||
* |
||||
* Contract |
||||
* 版本: V3.0.0 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2020-12-31 |
||||
*/ |
||||
@Service |
||||
public class ContractServiceImpl extends SuperServiceImpl<ContractMapper, ContractEntity> implements ContractService { |
||||
|
||||
@Autowired |
||||
private UserProvider userProvider; |
||||
|
||||
@Override |
||||
public List<ContractEntity> getlist(Pagination pagination){ |
||||
//通过UserProvider获取用户信息
|
||||
UserInfo UserProvider = userProvider.get(); |
||||
QueryWrapper<ContractEntity> queryWrapper = new QueryWrapper<>(); |
||||
if (!StringUtils.isEmpty(pagination.getKeyword())) { |
||||
queryWrapper.lambda().and( |
||||
t -> t.like(ContractEntity::getContractName, pagination.getKeyword()) |
||||
.or().like(ContractEntity::getMytelePhone, pagination.getKeyword()) |
||||
); |
||||
} |
||||
//排序
|
||||
if (StringUtils.isEmpty(pagination.getSidx())) { |
||||
} else { |
||||
queryWrapper = "asc".equals(pagination.getSort().toLowerCase()) ? queryWrapper.orderByAsc(pagination.getSidx()) : queryWrapper.orderByDesc(pagination.getSidx()); |
||||
} |
||||
Page<ContractEntity> page = new Page<>(pagination.getCurrentPage(), pagination.getPageSize()); |
||||
IPage<ContractEntity> userIPage = this.page(page, queryWrapper); |
||||
return pagination.setData(userIPage.getRecords(), page.getTotal()); |
||||
} |
||||
|
||||
@Override |
||||
public ContractEntity getInfo(String id){ |
||||
QueryWrapper<ContractEntity> queryWrapper = new QueryWrapper<>(); |
||||
queryWrapper.lambda().eq(ContractEntity::getId, id); |
||||
return this.getOne(queryWrapper); |
||||
} |
||||
|
||||
@Override |
||||
@DSTransactional |
||||
public void create(ContractEntity entity){ |
||||
entity.setId(RandomUtil.uuId()); |
||||
this.save(entity); |
||||
} |
||||
|
||||
@Override |
||||
@Transactional |
||||
public void update(String id, ContractEntity entity){ |
||||
entity.setId(id); |
||||
this.updateById(entity); |
||||
} |
||||
|
||||
@Override |
||||
public void delete(ContractEntity entity) { |
||||
if (entity != null) { |
||||
this.removeById(entity.getId()); |
||||
} |
||||
} |
||||
} |
||||
@ -1,222 +0,0 @@
@@ -1,222 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.util.StrUtil; |
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.base.model.resource.ResourceModel; |
||||
import jnpf.constant.PermissionConst; |
||||
import jnpf.emnus.SearchMethodEnum; |
||||
import jnpf.permission.OrganizeAdminTratorApi; |
||||
import jnpf.permission.OrganizeApi; |
||||
import jnpf.permission.UserSettingApi; |
||||
import jnpf.permission.entity.OrganizeEntity; |
||||
import jnpf.permission.model.authorize.AuthorizeConditionEnum; |
||||
import jnpf.permission.model.authorize.AuthorizeConditionModel; |
||||
import jnpf.permission.model.authorize.AuthorizeVO; |
||||
import jnpf.permission.model.authorize.ConditionModel; |
||||
import jnpf.service.CustomAuthService; |
||||
import jnpf.util.*; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.stream.Collectors; |
||||
|
||||
|
||||
@Service |
||||
public class CustomAuthServiceImpl implements CustomAuthService { |
||||
|
||||
@Autowired |
||||
public OrganizeApi organizeApi; |
||||
@Autowired |
||||
private UserProvider userProvider; |
||||
@Autowired |
||||
private OrganizeAdminTratorApi organizeAdminIsTratorApi; |
||||
@Autowired |
||||
private UserSettingApi userSettingApi; |
||||
@Autowired |
||||
private RedisUtil redisUtil; |
||||
@Autowired |
||||
private CacheKeyUtil cacheKeyUtil; |
||||
|
||||
public AuthorizeVO getAuthorize() { |
||||
return userSettingApi.getAuthorize(); |
||||
} |
||||
@Override |
||||
public <T> QueryWrapper<T> getCondition(AuthorizeConditionModel conditionModel) { |
||||
QueryWrapper<T> queryWhere =(QueryWrapper<T>) conditionModel.getObj(); |
||||
String moduleId = conditionModel.getModuleId(); |
||||
String tableName = conditionModel.getTableName(); |
||||
UserInfo userInfo = userProvider.get(); |
||||
AuthorizeVO model = this.getAuthorize(); |
||||
List<ResourceModel> resourceList = model.getResourceList().stream().filter(m -> m.getModuleId().equals(moduleId)).collect(Collectors.toList()); |
||||
if (resourceList.size() == 0) { |
||||
return null; |
||||
} |
||||
List<ResourceModel> resourceList1 = new ArrayList<>(); |
||||
//拼接计数
|
||||
int t = 1; |
||||
long count = resourceList.stream().filter(item -> "jnpf_alldata".equals(item.getEnCode())).count(); |
||||
if (count > 0) { |
||||
return queryWhere; |
||||
} |
||||
for (ResourceModel item : resourceList) { |
||||
if (item.getAllData() != null && item.getAllData() == 1) { |
||||
t = 0; |
||||
break; |
||||
} |
||||
List<ConditionModel> conditionModelList = JsonUtil.getJsonToList(item.getConditionJson(), ConditionModel.class); |
||||
for (int i = 0; i < conditionModelList.size(); i++) { |
||||
ConditionModel conditionItem = conditionModelList.get(i); |
||||
for (int k = 0; k < conditionItem.getGroups().size(); k++) { |
||||
ConditionModel.ConditionItemModel fieldItem = conditionItem.getGroups().get(k); |
||||
String itemTable = fieldItem.getBindTable(); |
||||
if (StringUtil.isNotEmpty(itemTable) && itemTable.equalsIgnoreCase(tableName)) { |
||||
resourceList1.add(item); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
if (t == 1) { |
||||
if (resourceList1.size() > 0) { |
||||
queryWhere.and(tw -> { |
||||
for (ResourceModel item : resourceList1) { |
||||
List<ConditionModel> conditionModelList = JsonUtil.getJsonToList(item.getConditionJson(), ConditionModel.class); |
||||
for (int i = 0; i < conditionModelList.size(); i++) { |
||||
ConditionModel conditionItem = conditionModelList.get(i); |
||||
for (int k = 0; k < conditionItem.getGroups().size(); k++) { |
||||
ConditionModel.ConditionItemModel fieldItem = conditionItem.getGroups().get(k); |
||||
String itemField = fieldItem.getField(); |
||||
String itemValue = fieldItem.getValue(); |
||||
String itemMethod = fieldItem.getOp(); |
||||
Object value; |
||||
if (AuthorizeConditionEnum.USER.getCondition().equals(itemValue)) { //当前用户
|
||||
value = userInfo.getUserId(); |
||||
//任意文本 当前用户 当前组织 包含为模糊查询
|
||||
if (itemMethod.equals(SearchMethodEnum.Included.getMessage())) { |
||||
itemMethod = SearchMethodEnum.Like.getMessage(); |
||||
} |
||||
if (itemMethod.equals(SearchMethodEnum.NotIncluded.getMessage())) { |
||||
itemMethod = SearchMethodEnum.NotLike.getMessage(); |
||||
} |
||||
} else if (AuthorizeConditionEnum.ORGANIZE.getCondition().equals(itemValue)) { //当前组织
|
||||
String orgId = userInfo.getOrganizeId(); |
||||
if (StringUtil.isNotEmpty(userInfo.getDepartmentId())) { |
||||
orgId = userInfo.getDepartmentId(); |
||||
} |
||||
if (itemMethod.equals(SearchMethodEnum.Included.getMessage())) { |
||||
itemMethod = SearchMethodEnum.Like.getMessage(); |
||||
} |
||||
if (itemMethod.equals(SearchMethodEnum.NotIncluded.getMessage())) { |
||||
itemMethod = SearchMethodEnum.NotLike.getMessage(); |
||||
} |
||||
value = orgId; |
||||
} else if (AuthorizeConditionEnum.ORGANIZEANDUNDER.getCondition().equals(itemValue)) { //组织及子组织
|
||||
String orgId = userInfo.getOrganizeId(); |
||||
if (StringUtil.isNotEmpty(userInfo.getDepartmentId())) { |
||||
orgId = userInfo.getDepartmentId(); |
||||
} |
||||
List<String> underOrganizations = organizeApi.getUnderOrganizations(orgId); |
||||
underOrganizations.add(orgId); |
||||
value = underOrganizations; |
||||
} else if (AuthorizeConditionEnum.USERANDUNDER.getCondition().equals(itemValue)) { //用户及用户下属
|
||||
List<String> idsList = new ArrayList<>(); |
||||
if (userInfo.getSubordinateIds().size() > 0) { |
||||
idsList = userInfo.getSubordinateIds(); |
||||
} |
||||
idsList.add(userInfo.getUserId()); |
||||
value = idsList; |
||||
} else if ("@userAraSubordinatesAll".equals(itemValue)) { //用户及用户下属
|
||||
List<String> idsList = new ArrayList<>(); |
||||
String organizeId = userInfo.getOrganizeId(); |
||||
OrganizeEntity organize = organizeApi.getInfoById(organizeId); |
||||
if (StrUtil.equals(organize.getCategory(), PermissionConst.DEPARTMENT)){ |
||||
organize = organizeApi.getInfoById(organize.getParentId()); |
||||
} |
||||
List<String> underOrganizations = organizeApi.getUnderOrganizations(organize.getId()); |
||||
underOrganizations.add(organizeId); |
||||
value = underOrganizations; |
||||
} else {//任意文本
|
||||
value = itemValue; |
||||
if (itemMethod.equals(SearchMethodEnum.Included.getMessage())) { |
||||
itemMethod = SearchMethodEnum.Like.getMessage(); |
||||
} |
||||
if (itemMethod.equals(SearchMethodEnum.NotIncluded.getMessage())) { |
||||
itemMethod = SearchMethodEnum.NotLike.getMessage(); |
||||
} |
||||
} |
||||
if ("and".equalsIgnoreCase(conditionItem.getLogic())) { |
||||
if (itemMethod.equals(SearchMethodEnum.Equal.getSymbol())) { |
||||
tw.eq(itemField, value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.NotEqual.getSymbol())) { |
||||
tw.ne(itemField, value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.LessThan.getSymbol())) { |
||||
tw.lt(itemField, value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.LessThanOrEqual.getSymbol())) { |
||||
tw.le(itemField, value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.GreaterThan.getSymbol())) { |
||||
tw.gt(itemField, value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.GreaterThanOrEqual.getSymbol())) { |
||||
tw.ge(itemField, value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.Included.getSymbol())) { |
||||
tw.in(itemField, (List)value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.NotIncluded.getSymbol())) { |
||||
tw.notIn(itemField, (List)value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.Like.getSymbol())) { |
||||
tw.like(itemField, value); |
||||
} else if (itemMethod.equals(SearchMethodEnum.NotLike.getMessage())) { |
||||
tw.notLike(itemField, value); |
||||
} |
||||
} else { |
||||
if (itemMethod.equals(SearchMethodEnum.Equal.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.eq(itemField, value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.NotEqual.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.ne(itemField, value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.LessThan.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.lt(itemField, value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.LessThanOrEqual.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.le(itemField, value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.GreaterThan.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.gt(itemField, value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.GreaterThanOrEqual.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.ge(itemField, value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.Included.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.in(itemField, (List)value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.NotIncluded.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.notIn(itemField, (List)value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.Like.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.like(itemField, value) |
||||
); |
||||
} else if (itemMethod.equals(SearchMethodEnum.NotLike.getMessage())) { |
||||
tw.or( |
||||
qw -> qw.notLike(itemField, value) |
||||
); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}); |
||||
} |
||||
} |
||||
return queryWhere; |
||||
} |
||||
} |
||||
@ -1,326 +0,0 @@
@@ -1,326 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.core.collection.CollectionUtil; |
||||
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.DictionaryDataApi; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.base.entity.DictionaryDataEntity; |
||||
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.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.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.util.*; |
||||
import java.util.stream.Collectors; |
||||
|
||||
@Service |
||||
@AllArgsConstructor |
||||
public class ExpertServiceImpl extends ServiceImpl<ExpertMapper, Expert> implements ExpertService { |
||||
private final OrganizeService organizeService; |
||||
private final UserProvider userProvider; |
||||
private final DictionaryDataApi dictionaryDataApi; |
||||
private final RedisSerialNumberGenerator redisSerialNumberGenerator; |
||||
private static final String EXPERTS_KEY = "experts:"; |
||||
private static final String PREFIX = "EXPERT"; |
||||
|
||||
private static final String COMPANY_KEY = "company:"; |
||||
private static final String COM_PREFIX = "COMPANY"; |
||||
|
||||
@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.getUserId()); |
||||
expert.setCreateName(userInfo.getUserName()); |
||||
expert.setUpdateName(userInfo.getUserName()); |
||||
expert.setUpdateId(userInfo.getUserId()); |
||||
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)); |
||||
} |
||||
|
||||
if (this.lambdaQuery().eq(Expert::getId, expert.getId()).exists()) { |
||||
throw new DataException("编号生成异常,请稍后再试!"); |
||||
} |
||||
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 |
||||
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 (CollectionUtil.isEmpty(param.getContactInformation())) { |
||||
throw new DataException("联系人信息不能为空"); |
||||
} |
||||
if (StrUtil.isBlank(param.getCompanyName())) { |
||||
throw new DataException("公司名称不能为空"); |
||||
} |
||||
param.setStatus("0"); |
||||
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); |
||||
} |
||||
|
||||
@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("0"); |
||||
addParamList.add(addParam); |
||||
} |
||||
for (ExpertDto.AddParam addParam : addParamList) { |
||||
this.add(addParam); |
||||
} |
||||
}catch (Exception e){ |
||||
e.printStackTrace(); |
||||
throw new DataException(e.getMessage()); |
||||
} |
||||
} |
||||
} |
||||
@ -1,296 +0,0 @@
@@ -1,296 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.core.collection.CollectionUtil; |
||||
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 jnpf.base.DictionaryDataApi; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.base.entity.DictionaryDataEntity; |
||||
import jnpf.entity.BiddingProjectSubscribeChild; |
||||
import jnpf.entity.Bidding_project_statisticsEntity; |
||||
import jnpf.enump.BiddingProjectEnum; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.model.dto.IndicatorStatisticsDto; |
||||
import jnpf.permission.model.authorize.AuthorizeConditionModel; |
||||
import jnpf.service.BiddingProjectSubscribeService; |
||||
import jnpf.service.CustomAuthService; |
||||
import jnpf.service.IBiddingProjectSubscribeChildService; |
||||
import jnpf.service.IndicatorStatisticsService; |
||||
import jnpf.util.ServletUtil; |
||||
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.time.YearMonth; |
||||
import java.time.format.DateTimeFormatter; |
||||
import java.util.*; |
||||
import java.util.stream.Collectors; |
||||
|
||||
@Service |
||||
@AllArgsConstructor |
||||
public class IndicatorStatisticsServiceImpl implements IndicatorStatisticsService { |
||||
|
||||
private final BiddingProjectSubscribeService biddingProjectSubscribeService; |
||||
private final IBiddingProjectSubscribeChildService iBiddingProjectSubscribeChildService; |
||||
private final CustomAuthService customAuthService; |
||||
private final UserProvider userProvider; |
||||
private final DictionaryDataApi dictionaryDataApi; |
||||
|
||||
|
||||
@Override |
||||
public IndicatorStatisticsDto.ProjectsNumberResponse projectsNumber(IndicatorStatisticsDto.ProjectsNumberParam param) { |
||||
//校验参数
|
||||
IndicatorStatisticsDto.ProjectsNumberResponse response = checkProjectsNumber(param); |
||||
QueryWrapper<T> queryWhere = getAuthWrapper(param.getMenuId()); |
||||
if (ObjectUtil.isEmpty(queryWhere)) { |
||||
return response; |
||||
} |
||||
assert queryWhere != null; |
||||
List<IndicatorStatisticsDto.Indicator> indicatorList = biddingProjectSubscribeService.getProjectsNumberByType(param, queryWhere.getParamNameValuePairs(), queryWhere.getSqlSegment().replace("paramNameValuePairs.", "")); |
||||
checkResult(response, indicatorList); |
||||
|
||||
return response; |
||||
} |
||||
|
||||
private void checkResult(IndicatorStatisticsDto.ProjectsNumberResponse response, List<IndicatorStatisticsDto.Indicator> indicatorList) { |
||||
List<IndicatorStatisticsDto.Indicator> responseIndicatorList = response.getIndicatorList(); |
||||
if (CollectionUtil.isEmpty(responseIndicatorList)) { |
||||
response.setIndicatorList(indicatorList); |
||||
return; |
||||
} |
||||
for (IndicatorStatisticsDto.Indicator indicator : responseIndicatorList) { |
||||
Optional<IndicatorStatisticsDto.Indicator> first = indicatorList.stream().filter(item -> item.getXData().equals(indicator.getXData())).findFirst(); |
||||
first.ifPresent(value -> BeanUtil.copyProperties(value, indicator)); |
||||
} |
||||
} |
||||
|
||||
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; |
||||
} |
||||
|
||||
private IndicatorStatisticsDto.ProjectsNumberResponse checkProjectsNumber(IndicatorStatisticsDto.ProjectsNumberParam param) { |
||||
IndicatorStatisticsDto.ProjectsNumberResponse response = new IndicatorStatisticsDto.ProjectsNumberResponse(); |
||||
if (StrUtil.isBlank(param.getMenuId())) { |
||||
throw new DataException("请传入menuId"); |
||||
} |
||||
if (StrUtil.isBlank(param.getType())) { |
||||
throw new DataException("请选择查询类型"); |
||||
} |
||||
//查询类型 1-本月:到日。2-当年:按月。3-累计:按年
|
||||
//赋予默认值 查询每月天数/查询每年月数
|
||||
switch (param.getType()) { |
||||
case "1": |
||||
if (StrUtil.isBlank(param.getCorresponding())) { |
||||
String format = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy-MM"); |
||||
param.setCorresponding(format); |
||||
response.setCorresponding(LocalDateTimeUtil.parse(format, "yyyy-MM")); |
||||
} else { |
||||
//校验时间格式
|
||||
try { |
||||
response.setCorresponding(LocalDateTimeUtil.parse(param.getCorresponding(), "yyyy-MM")); |
||||
} catch (Exception e) { |
||||
throw new DataException("dataTime parse error, must be yyyy-MM"); |
||||
} |
||||
} |
||||
LocalDateTime month = LocalDateTimeUtil.parse(param.getCorresponding(), "yyyy-MM"); |
||||
YearMonth yearMonth = YearMonth.from(month); |
||||
int i = yearMonth.lengthOfMonth(); |
||||
if (LocalDateTimeUtil.parse(LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy-MM"), "yyyy-MM").isEqual(LocalDateTimeUtil.parse(param.getCorresponding(), "yyyy-MM"))) { |
||||
i = LocalDateTime.now().getDayOfMonth(); |
||||
} |
||||
for (int day = 1; day <= i; day++) { |
||||
IndicatorStatisticsDto.Indicator indicator = new IndicatorStatisticsDto.Indicator(); |
||||
indicator.setYData("0"); |
||||
// 创建代表该日期的LocalDate对象
|
||||
LocalDate date = yearMonth.atDay(day); |
||||
// 使用DateTimeFormatter来格式化日期为字符串
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("dd日"); |
||||
indicator.setXData(date.format(formatter)); |
||||
response.getIndicatorList().add(indicator); |
||||
} |
||||
break; |
||||
case "2": |
||||
int value = LocalDateTime.now().getMonth().getValue(); |
||||
if (StrUtil.isBlank(param.getCorresponding())) { |
||||
String yyyy = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy"); |
||||
param.setCorresponding(yyyy); |
||||
response.setCorresponding(LocalDateTimeUtil.parse(yyyy, "yyyy")); |
||||
} else { |
||||
//校验时间格式
|
||||
try { |
||||
response.setCorresponding(LocalDateTimeUtil.parse(param.getCorresponding(), "yyyy")); |
||||
if (LocalDateTime.now().getYear() > LocalDateTimeUtil.parse(param.getCorresponding(), "yyyy").getYear()) { |
||||
value = 12; |
||||
} |
||||
} catch (Exception e) { |
||||
throw new DataException("dataTime parse error, must be yyyy"); |
||||
} |
||||
} |
||||
for (int monthCount = 1; monthCount <= value; monthCount++) { |
||||
IndicatorStatisticsDto.Indicator indicator = new IndicatorStatisticsDto.Indicator(); |
||||
indicator.setYData("0"); |
||||
String monthString = String.format("%02d", monthCount); |
||||
indicator.setXData(monthString + "月"); |
||||
response.getIndicatorList().add(indicator); |
||||
} |
||||
break; |
||||
case "3": |
||||
break; |
||||
default: |
||||
throw new DataException("查询类型错误: " + param.getType()); |
||||
} |
||||
return response; |
||||
} |
||||
|
||||
@Override |
||||
public IndicatorStatisticsDto.MoneyAndProjectsNumberResponse moneyAndProjectsNumber(IndicatorStatisticsDto.MoneyAndProjectsNumberParam param) { |
||||
IndicatorStatisticsDto.MoneyAndProjectsNumberResponse response = checkMoneyAndProjectsNumberParam(param); |
||||
QueryWrapper<T> queryWhere = getAuthWrapper(param.getMenuId()); |
||||
if (ObjectUtil.isEmpty(queryWhere)) { |
||||
return response; |
||||
} |
||||
assert queryWhere != null; |
||||
List<IndicatorStatisticsDto.MoneyAndProjectsNumberChild> dataList = biddingProjectSubscribeService.moneyAndProjectsNumber(param, queryWhere.getParamNameValuePairs(), queryWhere.getSqlSegment().replace("paramNameValuePairs.", "")); |
||||
checkMoneyAndProjectsNumberResult(param, dataList); |
||||
response.setDataList(dataList); |
||||
return response; |
||||
} |
||||
|
||||
private void checkMoneyAndProjectsNumberResult(IndicatorStatisticsDto.MoneyAndProjectsNumberParam param, List<IndicatorStatisticsDto.MoneyAndProjectsNumberChild> dataList) { |
||||
// <if test="param.classificationType=='2'.toString()">
|
||||
// count(organizational_form) projectsNumber,
|
||||
// (select f_full_name from base_dictionary_data where f_dictionary_type_id='539393647729185989' and f_en_code=main.organizational_form limit 1) yName
|
||||
// </if>
|
||||
// <if test="param.classificationType=='3'.toString()">
|
||||
// count(Item_classification) projectsNumber,
|
||||
// (select f_full_name from base_dictionary_data where f_dictionary_type_id='539390743437907141' and f_en_code=main.item_classification limit 1) yName
|
||||
// </if>
|
||||
// <if test="param.classificationType=='4'.toString()">
|
||||
// count(bidding_method) projectsNumber,
|
||||
// (select f_full_name from base_dictionary_data where f_dictionary_type_id='539394095383057605' and f_en_code=main.bidding_method limit 1) yName
|
||||
// </if>
|
||||
String classificationType = param.getClassificationType(); |
||||
List<String> oldNameList = dataList.stream().map(IndicatorStatisticsDto.MoneyAndProjectsNumberChild::getYName).collect(Collectors.toList()); |
||||
List<String> newNameList = new ArrayList<>(); |
||||
switch (classificationType) { |
||||
case "1": |
||||
break; |
||||
|
||||
case "2": |
||||
newNameList = dictionaryDataApi.getList("539393647729185989") |
||||
.stream() |
||||
.map(DictionaryDataEntity::getFullName) |
||||
.filter(fullName -> !oldNameList.contains(fullName)) |
||||
.collect(Collectors.toList()); |
||||
break; |
||||
case "3": |
||||
newNameList = dictionaryDataApi.getList("539390743437907141") |
||||
.stream() |
||||
.map(DictionaryDataEntity::getFullName) |
||||
.filter(fullName -> !oldNameList.contains(fullName)) |
||||
.collect(Collectors.toList()); |
||||
break; |
||||
case "4": |
||||
newNameList = dictionaryDataApi.getList("539394095383057605") |
||||
.stream() |
||||
.map(DictionaryDataEntity::getFullName) |
||||
.filter(fullName -> !oldNameList.contains(fullName)) |
||||
.collect(Collectors.toList()); |
||||
break; |
||||
case "5": |
||||
newNameList = dictionaryDataApi.getList("dc6b2542d94b5434fc61ec1d59592901") |
||||
.stream() |
||||
.map(DictionaryDataEntity::getFullName) |
||||
.filter(fullName -> !oldNameList.contains(fullName)) |
||||
.collect(Collectors.toList()); |
||||
break; |
||||
|
||||
} |
||||
if (CollectionUtil.isEmpty(newNameList)) { |
||||
return; |
||||
} |
||||
for (String name : newNameList) { |
||||
IndicatorStatisticsDto.MoneyAndProjectsNumberChild data = new IndicatorStatisticsDto.MoneyAndProjectsNumberChild(); |
||||
data.setYName(name); |
||||
data.setProjectsNumber("0"); |
||||
data.setMoney("0.0"); |
||||
dataList.add(data); |
||||
} |
||||
} |
||||
|
||||
private IndicatorStatisticsDto.MoneyAndProjectsNumberResponse checkMoneyAndProjectsNumberParam(IndicatorStatisticsDto.MoneyAndProjectsNumberParam param) { |
||||
IndicatorStatisticsDto.MoneyAndProjectsNumberResponse response = new IndicatorStatisticsDto.MoneyAndProjectsNumberResponse(); |
||||
if (StrUtil.isBlank(param.getMenuId())) { |
||||
throw new DataException("请传入menuId"); |
||||
} |
||||
switch (param.getQueryDateType()) { |
||||
case "1": |
||||
String format = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy-MM"); |
||||
param.setCorresponding(format); |
||||
break; |
||||
case "2": |
||||
String yyyy = LocalDateTimeUtil.format(LocalDateTime.now(), "yyyy"); |
||||
param.setCorresponding(yyyy); |
||||
case "3": |
||||
break; |
||||
case "4": |
||||
if (StrUtil.isBlank(param.getStartTime()) || StrUtil.isBlank(param.getEndTime())) { |
||||
throw new DataException("请传入开始及结束时间"); |
||||
} |
||||
try { |
||||
LocalDateTimeUtil.parse(param.getStartTime(), "yyyy-MM-dd HH:mm:ss"); |
||||
LocalDateTimeUtil.parse(param.getEndTime(), "yyyy-MM-dd HH:mm:ss"); |
||||
} catch (Exception e) { |
||||
throw new DataException("时间格式错误,应为yyyy-MM-dd HH:mm:ss"); |
||||
} |
||||
break; |
||||
default: |
||||
throw new DataException("查询类型错误: " + param.getQueryDateType()); |
||||
} |
||||
response.setClassificationType(param.getClassificationType()); |
||||
return response; |
||||
|
||||
} |
||||
|
||||
@Override |
||||
public IndicatorStatisticsDto.MyToDoListResponse myToDoList() { |
||||
IndicatorStatisticsDto.MyToDoListResponse response = new IndicatorStatisticsDto.MyToDoListResponse(); |
||||
//查询用户信息
|
||||
UserInfo userInfo = userProvider.get(); |
||||
//待填报
|
||||
response.setToBeFilledCount(iBiddingProjectSubscribeChildService.lambdaQuery() |
||||
.eq(BiddingProjectSubscribeChild::getUserId, userInfo.getUserId()) |
||||
.in(BiddingProjectSubscribeChild::getChildStatus, Arrays.asList(BiddingProjectEnum.ChildStatusEnum.TO_BE_SUBMITTED.getCode(), BiddingProjectEnum.ChildStatusEnum.TO_BE_EDIT.getCode())) |
||||
.count() + ""); |
||||
//待归档
|
||||
response.setToBeArchivedApprovalCount(iBiddingProjectSubscribeChildService.lambdaQuery() |
||||
.eq(BiddingProjectSubscribeChild::getUserId, userInfo.getUserId()) |
||||
.in(BiddingProjectSubscribeChild::getChildStatus, Collections.singletonList(BiddingProjectEnum.ChildStatusEnum.TO_BE_ARCHIVED.getCode())) |
||||
.count() + ""); |
||||
//待审核
|
||||
response.setPendingApprovalCount(iBiddingProjectSubscribeChildService.lambdaQuery() |
||||
.eq(BiddingProjectSubscribeChild::getUserId, userInfo.getUserId()) |
||||
.in(BiddingProjectSubscribeChild::getChildStatus, Collections.singletonList(BiddingProjectEnum.ChildStatusEnum.PENDING_REVIEW.getCode())) |
||||
.count() + ""); |
||||
|
||||
//已办数量
|
||||
response.setAlreadyCount(iBiddingProjectSubscribeChildService.lambdaQuery() |
||||
.eq(BiddingProjectSubscribeChild::getUserId, userInfo.getUserId()) |
||||
.in(BiddingProjectSubscribeChild::getChildStatus, Arrays.asList(BiddingProjectEnum.ChildStatusEnum.RETURNED.getCode(), BiddingProjectEnum.ChildStatusEnum.ARCHIVED.getCode(), BiddingProjectEnum.ChildStatusEnum.PASS.getCode())) |
||||
.count() + ""); |
||||
return response; |
||||
} |
||||
} |
||||
@ -1,889 +0,0 @@
@@ -1,889 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.bean.BeanUtil; |
||||
import cn.hutool.core.collection.CollectionUtil; |
||||
import cn.hutool.core.date.LocalDateTimeUtil; |
||||
import cn.hutool.core.io.resource.ResourceUtil; |
||||
import cn.hutool.core.util.ObjectUtil; |
||||
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.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.base.vo.DownloadVO; |
||||
import jnpf.constant.FileTypeConstant; |
||||
import jnpf.entity.Expert; |
||||
import jnpf.entity.LotteryProject; |
||||
import jnpf.entity.LotteryReview; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.file.FileApi; |
||||
import jnpf.file.FileUploadApi; |
||||
import jnpf.mapper.LotteryProjectMapper; |
||||
import jnpf.model.dto.ExpertDto; |
||||
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.ExpertService; |
||||
import jnpf.service.ILotteryProjectService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import jnpf.service.ILotteryReviewService; |
||||
import jnpf.util.UploaderUtil; |
||||
import jnpf.util.UserProvider; |
||||
import lombok.AllArgsConstructor; |
||||
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 java.io.*; |
||||
import java.math.BigInteger; |
||||
import java.time.LocalDate; |
||||
import java.time.LocalDateTime; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.Optional; |
||||
import java.util.stream.Collectors; |
||||
import java.util.stream.Stream; |
||||
|
||||
/** |
||||
* <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; |
||||
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 |
||||
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()); |
||||
if (null != param.getBidEvaluationTime()) { |
||||
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); |
||||
if (null != param.getBidEvaluationTime()) { |
||||
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); |
||||
} |
||||
|
||||
@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, lotteryProject.getProjectName()); |
||||
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,lotteryProject.getProjectName()); |
||||
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, String projectName) throws Exception { |
||||
|
||||
try (InputStream inputStream = ResourceUtil.getStream("jnpf/templete/浙江出版传媒股份有限公司ERP系统建设项目.docx"); |
||||
XWPFDocument doc = new XWPFDocument(inputStream)) { |
||||
|
||||
// 找到标记位置的段落
|
||||
XWPFParagraph placeholderParagraph = null; |
||||
XWPFParagraph textParagraph = null; |
||||
for (XWPFParagraph paragraph : doc.getParagraphs()) { |
||||
if (paragraph.getText().contains("{{table_here}}")) { |
||||
placeholderParagraph = paragraph; |
||||
break; |
||||
} |
||||
if (paragraph.getText().contains("{{projectName}}")) { |
||||
textParagraph = paragraph; |
||||
} |
||||
} |
||||
|
||||
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); |
||||
//替换项目名称
|
||||
if (textParagraph != null) { |
||||
String join = StrUtil.join("", textParagraph.getRuns().stream().map(te -> te.getText(0)).collect(Collectors.toList())); |
||||
XWPFRun xwpfRun = textParagraph.getRuns().get(0); |
||||
for (XWPFRun textParagraphRun : textParagraph.getRuns()) { |
||||
textParagraphRun.setText(""); |
||||
} |
||||
xwpfRun.setText(join.replace("{{projectName}}",projectName), 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, String projectName) throws Exception { |
||||
|
||||
try (InputStream inputStream = ResourceUtil.getStream("jnpf/templete/招投标公司打印.docx"); |
||||
XWPFDocument doc = new XWPFDocument(inputStream)) { |
||||
|
||||
// 找到标记位置的段落
|
||||
XWPFParagraph placeholderParagraph = null; |
||||
XWPFParagraph textParagraph = null; |
||||
for (XWPFParagraph paragraph : doc.getParagraphs()) { |
||||
if (paragraph.getText().contains("{{table_here}}")) { |
||||
placeholderParagraph = paragraph; |
||||
break; |
||||
} |
||||
if (paragraph.getText().contains("{{projectName}}")) { |
||||
textParagraph = paragraph; |
||||
} |
||||
} |
||||
|
||||
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); |
||||
|
||||
//替换项目名称
|
||||
if (textParagraph != null) { |
||||
String join = StrUtil.join("", textParagraph.getRuns().stream().map(te -> te.getText(0)).collect(Collectors.toList())); |
||||
XWPFRun xwpfRun = textParagraph.getRuns().get(0); |
||||
for (XWPFRun textParagraphRun : textParagraph.getRuns()) { |
||||
textParagraphRun.setText(""); |
||||
} |
||||
xwpfRun.setText(join.replace("{{projectName}}",projectName), 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/code/jnpfsoft-jnpf-jnpf-java-cloud-/jnpf-tendering/jnpf-tendering-server/src/main/resources/jnpf/templete/浙江出版传媒股份有限公司ERP系统建设项目.docx")); |
||||
XWPFDocument doc = new XWPFDocument(inputStream)) { |
||||
|
||||
// 找到标记位置的段落
|
||||
XWPFParagraph placeholderParagraph = null; |
||||
XWPFParagraph textParagraph = null; |
||||
for (XWPFParagraph paragraph : doc.getParagraphs()) { |
||||
if (paragraph.getText().contains("{{table_here}}")) { |
||||
placeholderParagraph = paragraph; |
||||
break; |
||||
} |
||||
if (paragraph.getText().contains("{{projectName}}")) { |
||||
textParagraph = paragraph; |
||||
} |
||||
} |
||||
|
||||
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); |
||||
//替换项目名称
|
||||
if (textParagraph != null) { |
||||
String join = StrUtil.join("", textParagraph.getRuns().stream().map(te -> te.getText(0)).collect(Collectors.toList())); |
||||
XWPFRun xwpfRun = textParagraph.getRuns().get(0); |
||||
for (XWPFRun textParagraphRun : textParagraph.getRuns()) { |
||||
textParagraphRun.setText(""); |
||||
} |
||||
xwpfRun.setText(join.replace("{{projectName}}","测试2"), 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")); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
@ -1,51 +0,0 @@
@@ -1,51 +0,0 @@
|
||||
package jnpf.service.impl; |
||||
|
||||
import cn.hutool.core.util.StrUtil; |
||||
import jnpf.entity.LotteryReview; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.mapper.LotteryReviewMapper; |
||||
import jnpf.model.dto.LotteryProjectDto; |
||||
import jnpf.service.ILotteryReviewService; |
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* <p> |
||||
* 评审次数 服务实现类 |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-30 |
||||
*/ |
||||
@Service |
||||
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; |
||||
} |
||||
} |
||||
@ -1,33 +0,0 @@
@@ -1,33 +0,0 @@
|
||||
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); |
||||
} |
||||
|
||||
public long generateSerialNumber(String key,long defaultValue){ |
||||
String redisKey = SERIAL_KEY_PREFIX + key; |
||||
// 使用Redis的INCR命令原子递增
|
||||
return redisTemplate.opsForValue().increment(redisKey,defaultValue); |
||||
} |
||||
} |
||||
@ -1,7 +0,0 @@
@@ -1,7 +0,0 @@
|
||||
<?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.Base_datainterfaceMapper"> |
||||
|
||||
|
||||
|
||||
</mapper> |
||||
@ -1,5 +0,0 @@
@@ -1,5 +0,0 @@
|
||||
<?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.BiddingProjectSubscribeChildMapper"> |
||||
|
||||
</mapper> |
||||
@ -1,253 +0,0 @@
@@ -1,253 +0,0 @@
|
||||
<?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.BiddingProjectSubscribeMapper"> |
||||
|
||||
|
||||
<resultMap id="BiddingProjectSubscribe" type="jnpf.entity.BiddingProjectSubscribeEntity"> |
||||
<id property="id" column="id"/> |
||||
<result property="managementStyle" column="management_style"/> |
||||
<result property="projectNumber" column="project_number"/> |
||||
<result property="planSubmissionTime" column="plan_submission_time"/> |
||||
<result property="reportingCorp" column="reporting_corp"/> |
||||
<result property="tenderingEntity" column="tendering_entity"/> |
||||
<result property="projectName" column="project_name"/> |
||||
<result property="itemClassification" column="Item_classification"/> |
||||
<result property="organizationalForm" column="organizational_form"/> |
||||
<result property="biddingMethod" column="bidding_method"/> |
||||
<result property="reportedFileName" column="reported_file_name"/> |
||||
<result property="biddingDocumentId" column="bidding_document_id"/> |
||||
<result property="decisionProcedure" column="decision_procedure"/> |
||||
<result property="approvalDocumentsId" column="approval_documents_id"/> |
||||
<result property="finalApprovalTime" column="final_approval_time"/> |
||||
<result property="settingOwinningBidderOne" column="setting_of_winning_bidder_one"/> |
||||
<result property="settingOwinningBidderTwo" column="setting_of_winning_bidder_two"/> |
||||
<result property="scoringIndicatorSettingsOne" column="scoring_indicator_settings_one"/> |
||||
<result property="scoringIndicatorSettingsTwo" column="scoring_indicator_settings_two"/> |
||||
<result property="scoringIndicatorSettingsThree" column="scoring_indicator_settings_three"/> |
||||
<result property="scoringIndicatorSettingsFour" column="scoring_indicator_settings_four"/> |
||||
<result property="agencyOne" column="agency_one"/> |
||||
<result property="agencyTwo" column="agency_two"/> |
||||
<result property="scoringMethodOne" column="scoring_method_one"/> |
||||
<result property="scoringMethodTwo" column="scoring_method_two"/> |
||||
<result property="approvalDocumentsIdTwo" column="approval_documents_id_two"/> |
||||
<result property="resultReportingTime" column="result_reporting_time"/> |
||||
<result property="resultReportedFileName" column="result_reported_file_name"/> |
||||
<result property="bidOpeningTime" column="bid_opening_time"/> |
||||
<result property="explanationObid" column="explanation_of_bid"/> |
||||
<result property="winningBidderAndWinningAmount" column="winning_bidder_and_winning_amount"/> |
||||
<result property="bidEvaluationCommittee" column="bid_evaluation_committee"/> |
||||
<result property="tenderAgencyFee" column="tender_agency_fee"/> |
||||
<result property="attachmentObiddingResultsOneId" column="attachment_of_bidding_results_one_id"/> |
||||
<result property="attachmentObiddingResultsTwoId" column="attachment_of_bidding_results_two_id"/> |
||||
<result property="winningBidder" column="winning_bidder"/> |
||||
<result property="winningBidderCandidate" column="winning_bidder_candidate"/> |
||||
<result property="filingDecisionProcedure" column="filing_decision_procedure"/> |
||||
<result property="filingResultsOneId" column="filing_results_one_id"/> |
||||
<result property="filingResultsTwoId" column="filing_results_two_id"/> |
||||
<result property="filingResultsThreeId" column="filing_results_three_id"/> |
||||
<result property="approvalTimeForResults" column="approval_time_for_results"/> |
||||
<result property="flowid" column="f_flowid"/> |
||||
<result property="flowtaskid" column="f_flowtaskid"/> |
||||
<result property="annexProgrammeDocument" column="annex_programme_document"/> |
||||
<result property="mainStatus" column="main_status"/> |
||||
<result property="mainStatusName" column="main_status_name"/> |
||||
<result property="bidWinningAmount" column="bid_winning_amount"/> |
||||
<result property="isApproval" column="is_approval"/> |
||||
<result property="queryType" column="query_type"/> |
||||
<result property="approvalDocumentsIdJt" column="approval_documents_id_jt"/> |
||||
<result property="archiveNumber" column="archive_number"/> |
||||
<result property="createTime" column="create_time"/> |
||||
<result property="updateTime" column="update_time"/> |
||||
<result property="projectAmount" column="project_amount"/> |
||||
<result property="winningBidderType" column="winning_bidder_type"/> |
||||
<result property="winningBidderInfo" column="winning_bidder_info" typeHandler="jnpf.model.JsonTypeHandler"/> |
||||
<result property="controlPrice" column="control_price"/> |
||||
<result property="evalSetting" column="eval_setting"/> |
||||
<result property="contractPeriod" column="contract_period"/> |
||||
|
||||
<collection property="childList" column="id" javaType="list" select="selectChildMap"/> |
||||
<collection property="stepList" column="id" javaType="list" select="selectStepMap"/> |
||||
|
||||
</resultMap> |
||||
<select id="selectChildMap" resultMap="childMap"> |
||||
select |
||||
<include refid="baseChildFields"/> |
||||
from bidding_project_subscribe_child child where child.main_id = #{id} |
||||
</select> |
||||
<select id="selectStepMap" resultMap="stepMap"> |
||||
select |
||||
<include refid="baseStepFields"/> |
||||
from bidding_project_subscribe_step step where step.relation_main_id = #{id} |
||||
</select> |
||||
|
||||
<resultMap id="stepMap" type="jnpf.entity.BiddingProjectSubscribeStep"> |
||||
<id property="id" column="child_id"/> |
||||
<result property="relationMainId" column="relation_main_id"/> |
||||
<result property="relationType" column="relation_type"/> |
||||
<result property="relationChildId" column="relation_child_id"/> |
||||
<result property="dealType" column="deal_type"/> |
||||
<result property="dealTypeName" column="deal_type_name"/> |
||||
<result property="otherRelationId" column="other_relation_id"/> |
||||
<result property="remake" column="remake"/> |
||||
<result property="createTime" column="create_time"/> |
||||
<result property="createUserId" column="create_user_id"/> |
||||
<result property="createUserName" column="create_user_name"/> |
||||
<result property="createOrganizationId" column="create_organization_id"/> |
||||
<result property="createOrganizationName" column="create_organization_name"/> |
||||
|
||||
</resultMap> |
||||
|
||||
<resultMap id="childMap" type="jnpf.entity.BiddingProjectSubscribeChild"> |
||||
<id property="childId" column="child_id"/> |
||||
<result property="mainId" column="main_id"/> |
||||
<result property="childStatus" column="child_status"/> |
||||
<result property="childStatusName" column="child_status_name"/> |
||||
<result property="userDeptId" column="user_dept_id"/> |
||||
<result property="userDeptName" column="user_dept_name"/> |
||||
<result property="userId" column="user_id"/> |
||||
<result property="userName" column="user_name"/> |
||||
<result property="remake" column="remake"/> |
||||
<result property="createTime" column="create_time"/> |
||||
<result property="updateTime" column="update_time"/> |
||||
<result property="rootChildFlag" column="root_child_flag"/> |
||||
<result property="rootChildId" column="root_child_id"/> |
||||
<result property="createUserId" column="create_user_id"/> |
||||
<result property="createUserName" column="create_user_name"/> |
||||
|
||||
</resultMap> |
||||
|
||||
<sql id="baseFields"> |
||||
main |
||||
. |
||||
id |
||||
,main.management_style ,main.project_number ,main.plan_submission_time ,main.reporting_corp ,main.tendering_entity ,main.project_name ,main.Item_classification ,main.organizational_form ,main.bidding_method ,main.reported_file_name ,main.bidding_document_id ,main.decision_procedure ,main.approval_documents_id ,main.final_approval_time ,main.setting_of_winning_bidder_one ,main.setting_of_winning_bidder_two ,main.scoring_indicator_settings_one ,main.scoring_indicator_settings_two ,main.scoring_indicator_settings_three ,main.scoring_indicator_settings_four ,main.agency_one ,main.agency_two ,main.scoring_method_one ,main.scoring_method_two ,main.approval_documents_id_two ,main.result_reporting_time ,main.result_reported_file_name ,main.bid_opening_time ,main.explanation_of_bid ,main.winning_bidder_and_winning_amount ,main.bid_evaluation_committee ,main.tender_agency_fee ,main.attachment_of_bidding_results_one_id ,main.attachment_of_bidding_results_two_id ,main.winning_bidder ,main.winning_bidder_candidate ,main.filing_decision_procedure ,main.filing_results_one_id ,main.filing_results_two_id ,main.approval_time_for_results ,main.f_flowid ,main.f_flowtaskid ,main.annex_programme_document ,main.main_status ,main.main_status_name,bid_winning_amount,is_approval,query_type,approval_documents_id_jt,archive_number,main.create_time,main.update_time,main.winning_bidder_type,main.winning_bidder_info,main.control_price,main.filing_results_three_id,main.project_amount,main.eval_setting,main.contract_period |
||||
</sql> |
||||
<sql id="baseStepFields"> |
||||
id |
||||
,relation_main_id ,relation_type ,relation_child_id ,deal_type ,deal_type_name ,other_relation_id ,remake ,create_time ,create_user_id ,create_user_name ,create_organization_id ,create_organization_name |
||||
</sql> |
||||
|
||||
<sql id="baseChildFields"> |
||||
child_id |
||||
,main_id ,child_status ,child_status_name ,user_dept_id ,user_dept_name ,user_id ,user_name ,remake ,create_time ,update_time ,root_child_flag ,root_child_id ,create_user_id ,create_user_name |
||||
</sql> |
||||
<select id="queryList" resultMap="BiddingProjectSubscribe" |
||||
parameterType="jnpf.model.bidding_project_subscribe.BiddingProjectSubscribePagination"> |
||||
select distinct |
||||
<include refid="baseFields"/> |
||||
from bidding_project_subscribe main |
||||
left join bidding_project_subscribe_child child on child.main_id=main.id |
||||
where 1=1 |
||||
<if test="sql != null and sql !=''"> |
||||
and main.id in (select child.main_id from bidding_project_subscribe_child child where root_child_flag='0' |
||||
and ${sql}) |
||||
</if> |
||||
|
||||
<if test="param.childIdList != null and param.childIdList.size()>0"> |
||||
and main.id in |
||||
<foreach collection="param.childIdList" item="item" open="(" separator="," close=")"> |
||||
#{item} |
||||
</foreach> |
||||
</if> |
||||
order by main.create_time desc |
||||
</select> |
||||
|
||||
<select id="getInfoById" resultMap="BiddingProjectSubscribe" |
||||
parameterType="jnpf.model.bidding_project_subscribe.BiddingProjectSubscribePagination"> |
||||
select |
||||
<include refid="baseFields"/> |
||||
from bidding_project_subscribe main |
||||
where main.id=#{id} |
||||
</select> |
||||
<select id="getProjectsNumberByType" resultType="jnpf.model.dto.IndicatorStatisticsDto$Indicator"> |
||||
select |
||||
count(1) yData, |
||||
count(case management_style when '1' then 1 end ) spCount, |
||||
count(case management_style when '2' then 1 end ) baCount, |
||||
<if test="param.type=='1'.toString()"> |
||||
concat(date_format(MAX(create_time),'%d'),'日') xData |
||||
</if> |
||||
<if test="param.type=='2'.toString()"> |
||||
concat(date_format(MAX(create_time),'%m'),'月') xData |
||||
</if> |
||||
<if test="param.type=='3'.toString()"> |
||||
concat(date_format(MAX(create_time),'%Y'),'年') xData |
||||
</if> |
||||
from bidding_project_subscribe main |
||||
where 1=1 |
||||
<if test="param.type=='1'.toString()"> |
||||
and date_format(create_time,'%Y-%m')=#{param.corresponding} |
||||
</if> |
||||
<if test="param.type=='2'.toString()"> |
||||
and date_format(create_time,'%Y')=#{param.corresponding} |
||||
</if> |
||||
<if test="sql != null and sql !=''"> |
||||
and main.id in (select child.main_id from bidding_project_subscribe_child child where root_child_flag='0' |
||||
and ${sql}) |
||||
</if> |
||||
<if test="param.type=='1'.toString()"> |
||||
group by date_format(create_time,'%d') |
||||
</if> |
||||
<if test="param.type=='2'.toString()"> |
||||
group by date_format(create_time,'%m') |
||||
</if> |
||||
<if test="param.type=='3'.toString()"> |
||||
group by date_format(create_time,'%Y') |
||||
</if> |
||||
|
||||
</select> |
||||
<select id="moneyAndProjectsNumber" |
||||
resultType="jnpf.model.dto.IndicatorStatisticsDto$MoneyAndProjectsNumberChild"> |
||||
select |
||||
sum(project_amount) money, |
||||
<if test="param.classificationType=='1'.toString()"> |
||||
count(1) projectsNumber, |
||||
'' yName |
||||
</if> |
||||
<if test="param.classificationType=='2'.toString()"> |
||||
count(organizational_form) projectsNumber, |
||||
(select f_full_name from base_dictionary_data where f_dictionary_type_id='539393647729185989' and f_en_code=main.organizational_form limit 1) yName |
||||
</if> |
||||
<if test="param.classificationType=='3'.toString()"> |
||||
count(Item_classification) projectsNumber, |
||||
(select f_full_name from base_dictionary_data where f_dictionary_type_id='539390743437907141' and f_en_code=main.item_classification limit 1) yName |
||||
</if> |
||||
<if test="param.classificationType=='4'.toString()"> |
||||
count(bidding_method) projectsNumber, |
||||
(select f_full_name from base_dictionary_data where f_dictionary_type_id='539394095383057605' and f_en_code=main.bidding_method limit 1) yName |
||||
</if> |
||||
|
||||
<if test="param.classificationType=='5'.toString()"> |
||||
count(agency_one) projectsNumber, |
||||
(select f_full_name from base_dictionary_data where f_dictionary_type_id='dc6b2542d94b5434fc61ec1d59592901' and f_en_code=main.agency_one limit 1) yName |
||||
</if> |
||||
from bidding_project_subscribe main |
||||
where 1=1 |
||||
<if test="param.queryDateType=='1'.toString()"> |
||||
and date_format(create_time,'%Y-%m')=#{param.corresponding} |
||||
</if> |
||||
<if test="param.queryDateType=='2'.toString()"> |
||||
and date_format(create_time,'%Y')=#{param.corresponding} |
||||
</if> |
||||
<if test="param.queryDateType=='4'.toString()"> |
||||
and create_time between #{param.startTime} and #{param.endTime} |
||||
</if> |
||||
<if test="sql != null and sql !=''"> |
||||
and main.id in (select child.main_id from bidding_project_subscribe_child child where root_child_flag='0' |
||||
and ${sql}) |
||||
</if> |
||||
<if test="param.classificationType=='2'.toString()"> |
||||
group by organizational_form order by count(organizational_form) desc |
||||
</if> |
||||
<if test="param.classificationType=='3'.toString()"> |
||||
group by Item_classification order by count(Item_classification) desc |
||||
</if> |
||||
<if test="param.classificationType=='4'.toString()"> |
||||
group by bidding_method order by count(bidding_method) desc |
||||
</if> |
||||
|
||||
<if test="param.classificationType=='5'.toString()"> |
||||
group by agency_one order by count(agency_one) desc |
||||
</if> |
||||
</select> |
||||
</mapper> |
||||
@ -1,5 +0,0 @@
@@ -1,5 +0,0 @@
|
||||
<?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.BiddingProjectSubscribeStepMapper"> |
||||
|
||||
</mapper> |
||||
@ -1,126 +0,0 @@
@@ -1,126 +0,0 @@
|
||||
<?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.Bidding_project_statisticsMapper"> |
||||
|
||||
|
||||
<resultMap id="staticDataResultMap" type="jnpf.entity.Bidding_project_statisticsEntity"> |
||||
<id property="id" column="child_id"/> |
||||
<result property="reportingUnit" column="zero"/> |
||||
<result property="projectsAmount" column="one"/> |
||||
<result property="projectsNums" column="one"/> |
||||
<result property="engineering" column="two"/> |
||||
<result property="goods" column="tree"/> |
||||
<result property="service" column="four"/> |
||||
<result property="rentOut" column="five"/> |
||||
<result property="agency1" column="six"/> |
||||
<result property="other" column="seven"/> |
||||
|
||||
</resultMap> |
||||
<select id="queryList" resultMap="staticDataResultMap"> |
||||
SELECT |
||||
reporting_corp AS zero, |
||||
SUM(CASE WHEN Item_classification BETWEEN '1' AND '6' THEN 1 ELSE 0 END) AS one, |
||||
SUM(CASE WHEN Item_classification = '1' THEN 1 ELSE 0 END) AS two, |
||||
SUM(CASE WHEN Item_classification = '2' THEN 1 ELSE 0 END) AS tree, |
||||
SUM(CASE WHEN Item_classification = '3' THEN 1 ELSE 0 END) AS four, |
||||
SUM(CASE WHEN Item_classification = '4' THEN 1 ELSE 0 END) AS five, |
||||
SUM(CASE WHEN Item_classification = '5' THEN 1 ELSE 0 END) AS six, |
||||
SUM(CASE WHEN Item_classification = '6' THEN 1 ELSE 0 END) AS seven |
||||
FROM |
||||
bidding_project_subscribe main |
||||
where main.id in ( |
||||
select main_id from bidding_project_subscribe_child child where 1=1 and root_child_flag='0'and main.main_status='7' |
||||
<if test="sql != null and sql !=''"> |
||||
and ${sql} |
||||
</if> |
||||
<if test="param.startTime != null and param.startTime !='' and param.endTime != null and param.endTime !=''"> |
||||
and child.create_time between #{param.startTime} and #{param.endTime} |
||||
</if> |
||||
) |
||||
|
||||
GROUP BY reporting_corp; |
||||
</select> |
||||
|
||||
<select id="queryListDl" resultType="com.alibaba.fastjson.JSONObject"> |
||||
SELECT |
||||
reporting_corp AS reportingUnit, |
||||
SUM(CASE ifnull(agency_one, agency_two) WHEN null THEN 0 ELSE 1 END) projectsNums, |
||||
<if test="dataList != null and dataList.size()>0"> |
||||
<foreach collection="dataList" item="item" open="" separator="," close=""> |
||||
SUM(CASE ifnull(agency_one, agency_two) WHEN ${item.enCode} THEN 1 ELSE 0 END) ${item.simpleSpelling} |
||||
</foreach> |
||||
</if> |
||||
from |
||||
bidding_project_subscribe main |
||||
where main.id in ( |
||||
select main_id from bidding_project_subscribe_child child where 1=1 and root_child_flag='0'and main.main_status='7' |
||||
<if test="sql != null and sql !=''"> |
||||
and ${sql} |
||||
</if> |
||||
<if test="param.startTime != null and param.startTime !='' and param.endTime != null and param.endTime !=''"> |
||||
and child.create_time between #{param.startTime} and #{param.endTime} |
||||
</if> |
||||
) |
||||
GROUP BY reporting_corp |
||||
</select> |
||||
|
||||
<select id="queryListJe" resultMap="staticDataResultMap"> |
||||
SELECT |
||||
reporting_corp AS zero, |
||||
SUM(CASE WHEN Item_classification BETWEEN '1' AND '6' THEN project_amount ELSE 0 END) AS one, |
||||
SUM(CASE WHEN Item_classification = '1' THEN project_amount ELSE 0 END) AS two, |
||||
SUM(CASE WHEN Item_classification = '2' THEN project_amount ELSE 0 END) AS tree, |
||||
SUM(CASE WHEN Item_classification = '3' THEN project_amount ELSE 0 END) AS four, |
||||
SUM(CASE WHEN Item_classification = '4' THEN project_amount ELSE 0 END) AS five, |
||||
SUM(CASE WHEN Item_classification = '5' THEN project_amount ELSE 0 END) AS six, |
||||
SUM(CASE WHEN Item_classification = '6' THEN project_amount ELSE 0 END) AS seven |
||||
FROM |
||||
bidding_project_subscribe main |
||||
where main.id in ( |
||||
select main_id from bidding_project_subscribe_child child where 1=1 and root_child_flag='0'and main.main_status='7' |
||||
<if test="sql != null and sql !=''"> |
||||
and ${sql} |
||||
</if> |
||||
<if test="param.startTime != null and param.startTime !='' and param.endTime != null and param.endTime !=''"> |
||||
and child.create_time between #{param.startTime} and #{param.endTime} |
||||
</if> |
||||
) |
||||
GROUP BY reporting_corp; |
||||
</select> |
||||
<select id="getProjectNameList" resultType="java.lang.String"> |
||||
SELECT |
||||
<if test="param.statisticalType != null and param.statisticalType =='1'.toString()"> |
||||
main.project_name |
||||
</if> |
||||
<if test="param.statisticalType != null and param.statisticalType =='3'.toString()"> |
||||
concat(main.project_name,': ',main.project_amount,'万元') |
||||
</if> |
||||
<if test="param.statisticalType != null and param.statisticalType =='2'.toString()"> |
||||
main.project_name |
||||
</if> |
||||
FROM |
||||
bidding_project_subscribe main |
||||
<where> |
||||
main.reporting_corp=#{param.projectName} |
||||
<if test="param.statisticalType != null and (param.statisticalType =='1'.toString() or param.statisticalType =='3'.toString())"> |
||||
and main.item_classification=#{param.code} |
||||
</if> |
||||
<if test="param.statisticalType != null and (param.statisticalType =='2'.toString())"> |
||||
and ifnull(main.agency_one, main.agency_two)=#{param.code} |
||||
</if> |
||||
|
||||
and main.id in ( |
||||
select main_id from bidding_project_subscribe_child child |
||||
where |
||||
root_child_flag='0' |
||||
and main.main_status='7' |
||||
<if test="param.sql != null and param.sql !=''"> |
||||
and ${param.sql} |
||||
</if> |
||||
<if test="param.startTime != null and param.startTime !='' and param.endTime != null and param.endTime !=''"> |
||||
and child.create_time between #{param.startTime} and #{param.endTime} |
||||
</if> |
||||
) |
||||
</where> |
||||
</select> |
||||
</mapper> |
||||
@ -1,70 +0,0 @@
@@ -1,70 +0,0 @@
|
||||
<?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"/> |
||||
<result property="contactInformation" column="contact_information" typeHandler="jnpf.model.ContactInformationTypeHandler"/> |
||||
</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,contact_information |
||||
</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> |
||||
<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 |
||||
</select> |
||||
<select id="queryInfo" resultMap="resultMap"> |
||||
select |
||||
<include refid="Base_Column_List"/> |
||||
from t_expert |
||||
where del_flag ='0' and id=#{id} |
||||
</select> |
||||
</mapper> |
||||
@ -1,101 +0,0 @@
@@ -1,101 +0,0 @@
|
||||
<?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"/> |
||||
<result property="lotteryType" column="lottery_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,upload_results_info,lottery_type |
||||
</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="query.lotteryType != null and query.lotteryType != ''"> |
||||
AND lottery_type = #{query.lotteryType} |
||||
</if> |
||||
<if test="sql != null and sql !=''"> |
||||
and ${sql} |
||||
</if> |
||||
order by create_time desc |
||||
</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"/> |
||||
<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> |
||||
<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 <include refid="baseQuery"/> |
||||
from t_lottery_project |
||||
where del_flag = '0' |
||||
and id=#{id} |
||||
</select> |
||||
</mapper> |
||||
@ -1,23 +0,0 @@
@@ -1,23 +0,0 @@
|
||||
<?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"> |
||||
|
||||
|
||||
<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> |
||||
@ -1,169 +0,0 @@
@@ -1,169 +0,0 @@
|
||||
package jnpf.controller; |
||||
|
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.base.vo.PageListVO; |
||||
import jnpf.base.vo.PaginationVO; |
||||
import jnpf.controller.util.SwapUtil; |
||||
import jnpf.entity.Base_datainterfaceEntity; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.model.base_datainterface.*; |
||||
import jnpf.permission.entity.UserEntity; |
||||
import jnpf.service.Base_datainterfaceService; |
||||
import jnpf.util.*; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.validation.Valid; |
||||
import java.io.IOException; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* base_datainterface |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-19 |
||||
*/ |
||||
@Slf4j |
||||
@RestController |
||||
@Tag(name = "base_datainterface" , description = "example") |
||||
@RequestMapping("/Base_datainterface") |
||||
public class Base_datainterfaceController { |
||||
|
||||
@Autowired |
||||
private SwapUtil generaterSwapUtil; |
||||
|
||||
@Autowired |
||||
private UserProvider userProvider; |
||||
|
||||
@Autowired |
||||
private Base_datainterfaceService base_datainterfaceService; |
||||
|
||||
|
||||
|
||||
/** |
||||
* 列表 |
||||
* |
||||
* @param base_datainterfacePagination |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "获取列表") |
||||
@PostMapping("/getList") |
||||
public ActionResult list(@RequestBody Base_datainterfacePagination base_datainterfacePagination)throws IOException{ |
||||
List<Base_datainterfaceEntity> list= base_datainterfaceService.getList(base_datainterfacePagination); |
||||
List<Map<String, Object>> realList=new ArrayList<>(); |
||||
for (Base_datainterfaceEntity entity : list) { |
||||
Map<String, Object> base_datainterfaceMap=JsonUtil.entityToMap(entity); |
||||
base_datainterfaceMap.put("id", base_datainterfaceMap.get("id")); |
||||
//副表数据
|
||||
//子表数据
|
||||
realList.add(base_datainterfaceMap); |
||||
} |
||||
//数据转换
|
||||
realList = generaterSwapUtil.swapDataList(realList, Base_datainterfaceConstant.getFormData(), Base_datainterfaceConstant.getColumnData(), base_datainterfacePagination.getModuleId(),false); |
||||
|
||||
//返回对象
|
||||
PageListVO vo = new PageListVO(); |
||||
vo.setList(realList); |
||||
PaginationVO page = JsonUtil.getJsonToBean(base_datainterfacePagination, PaginationVO.class); |
||||
vo.setPagination(page); |
||||
return ActionResult.success(vo); |
||||
} |
||||
/** |
||||
* 创建 |
||||
* |
||||
* @param base_datainterfaceForm |
||||
* @return |
||||
*/ |
||||
@PostMapping() |
||||
@Transactional |
||||
@Operation(summary = "创建") |
||||
public ActionResult create(@RequestBody @Valid Base_datainterfaceForm base_datainterfaceForm) throws DataException { |
||||
String b = base_datainterfaceService.checkForm(base_datainterfaceForm,0); |
||||
if (StringUtil.isNotEmpty(b)){ |
||||
return ActionResult.fail(b ); |
||||
} |
||||
String mainId = RandomUtil.uuId() ; |
||||
UserInfo userInfo=userProvider.get(); |
||||
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId()); |
||||
base_datainterfaceForm = JsonUtil.getJsonToBean( |
||||
SwapUtil.swapDatetime(Base_datainterfaceConstant.getFormData(),base_datainterfaceForm),Base_datainterfaceForm.class); |
||||
Base_datainterfaceEntity entity = JsonUtil.getJsonToBean(base_datainterfaceForm, Base_datainterfaceEntity.class); |
||||
entity.setId(mainId); |
||||
base_datainterfaceService.save(entity); |
||||
return ActionResult.success("创建成功"); |
||||
} |
||||
/** |
||||
* 编辑 |
||||
* @param id |
||||
* @param base_datainterfaceForm |
||||
* @return |
||||
*/ |
||||
@PutMapping("/{id}") |
||||
@Transactional |
||||
@Operation(summary = "更新") |
||||
public ActionResult update(@PathVariable("id") String id,@RequestBody @Valid Base_datainterfaceForm base_datainterfaceForm) throws DataException { |
||||
String b = base_datainterfaceService.checkForm(base_datainterfaceForm,1); |
||||
if (StringUtil.isNotEmpty(b)){ |
||||
return ActionResult.fail(b ); |
||||
} |
||||
UserInfo userInfo=userProvider.get(); |
||||
Base_datainterfaceEntity entity= base_datainterfaceService.getInfo(id); |
||||
if(entity!=null){ |
||||
base_datainterfaceForm = JsonUtil.getJsonToBean( |
||||
SwapUtil.swapDatetime(Base_datainterfaceConstant.getFormData(),base_datainterfaceForm),Base_datainterfaceForm.class); |
||||
Base_datainterfaceEntity subentity=JsonUtil.getJsonToBean(base_datainterfaceForm, Base_datainterfaceEntity.class); |
||||
boolean b1 = base_datainterfaceService.updateById(subentity); |
||||
if (!b1){ |
||||
return ActionResult.fail("当前表单原数据已被调整,请重新进入该页面编辑并提交数据"); |
||||
} |
||||
return ActionResult.success("更新成功"); |
||||
}else{ |
||||
return ActionResult.fail("更新失败,数据不存在"); |
||||
} |
||||
} |
||||
/** |
||||
* 删除 |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "删除") |
||||
@DeleteMapping("/{id}") |
||||
@Transactional |
||||
public ActionResult delete(@PathVariable("id") String id){ |
||||
Base_datainterfaceEntity entity= base_datainterfaceService.getInfo(id); |
||||
if(entity!=null){ |
||||
//主表数据删除
|
||||
base_datainterfaceService.delete(entity); |
||||
} |
||||
return ActionResult.success("删除成功"); |
||||
} |
||||
/** |
||||
* 获取详情(编辑页) |
||||
* 编辑页面使用-不转换数据 |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "信息") |
||||
@GetMapping("/{id}") |
||||
public ActionResult info(@PathVariable("id") String id){ |
||||
Base_datainterfaceEntity entity= base_datainterfaceService.getInfo(id); |
||||
if(entity==null){ |
||||
return ActionResult.fail("表单数据不存在!"); |
||||
} |
||||
Map<String, Object> base_datainterfaceMap=JsonUtil.entityToMap(entity); |
||||
base_datainterfaceMap.put("id", base_datainterfaceMap.get("id")); |
||||
//副表数据
|
||||
//子表数据
|
||||
base_datainterfaceMap = generaterSwapUtil.swapDataForm(base_datainterfaceMap,Base_datainterfaceConstant.getFormData(),Base_datainterfaceConstant.TABLEFIELDKEY,Base_datainterfaceConstant.TABLERENAMES); |
||||
return ActionResult.success(base_datainterfaceMap); |
||||
} |
||||
|
||||
} |
||||
@ -1,339 +0,0 @@
@@ -1,339 +0,0 @@
|
||||
package jnpf.controller; |
||||
|
||||
import cn.hutool.core.collection.CollectionUtil; |
||||
import cn.hutool.core.date.DateUtil; |
||||
import cn.hutool.core.util.StrUtil; |
||||
import cn.xuyanwu.spring.file.storage.FileInfo; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.base.vo.DownloadVO; |
||||
import jnpf.base.vo.PageListVO; |
||||
import jnpf.base.vo.PaginationVO; |
||||
import jnpf.constant.FileTypeConstant; |
||||
import jnpf.controller.util.SwapUtil; |
||||
import jnpf.entity.BiddingProjectSubscribeEntity; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.file.FileApi; |
||||
import jnpf.file.FileUploadApi; |
||||
import jnpf.model.bidding_project_subscribe.*; |
||||
import jnpf.model.dto.BiddingProjectDto; |
||||
import jnpf.permission.entity.UserEntity; |
||||
import jnpf.service.BiddingProjectSubscribeService; |
||||
import jnpf.util.*; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
|
||||
import javax.validation.Valid; |
||||
import java.io.IOException; |
||||
import java.time.LocalDateTime; |
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* bidding_project_subscribe |
||||
* |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-11 |
||||
*/ |
||||
@Slf4j |
||||
@RestController |
||||
@Tag(name = "bidding_project_subscribe", description = "example") |
||||
@RequestMapping("/Bidding_project_subscribe") |
||||
@AllArgsConstructor |
||||
public class BiddingProjectSubscribeController { |
||||
|
||||
private final SwapUtil generaterSwapUtil; |
||||
private final FileApi fileApi; |
||||
private final FileUploadApi fileUploadApi; |
||||
|
||||
|
||||
private final UserProvider userProvider; |
||||
|
||||
|
||||
private final BiddingProjectSubscribeService biddingProjectSubscribeService; |
||||
|
||||
|
||||
/** |
||||
* 列表 |
||||
* |
||||
* @param biddingProjectSubscribePagination |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "获取列表") |
||||
@PostMapping("/getList") |
||||
public ActionResult list(@RequestBody BiddingProjectSubscribePagination biddingProjectSubscribePagination) throws IOException { |
||||
List<BiddingProjectSubscribeEntity> list = biddingProjectSubscribeService.getList(biddingProjectSubscribePagination); |
||||
List<Map<String, Object>> realList = new ArrayList<>(); |
||||
// // 方式一:使用fastjson
|
||||
// SerializeConfig config = new SerializeConfig();
|
||||
// config.propertyNamingStrategy = PropertyNamingStrategy.SnakeCase;
|
||||
for (BiddingProjectSubscribeEntity entity : list) { |
||||
|
||||
|
||||
Map<String, Object> bidding_project_subscribeMap = JsonUtil.entityToMap(entity); |
||||
|
||||
// Map<String, Object> bidding_project_subscribeMap= JSON.parseObject(text,Map.class);
|
||||
bidding_project_subscribeMap.put("id", bidding_project_subscribeMap.get("id")); |
||||
//副表数据
|
||||
//子表数据
|
||||
realList.add(bidding_project_subscribeMap); |
||||
} |
||||
//数据转换
|
||||
realList = generaterSwapUtil.swapDataList(realList, BiddingProjectSubscribeConstant.getFormData(), BiddingProjectSubscribeConstant.getColumnData(), biddingProjectSubscribePagination.getModuleId(), false); |
||||
|
||||
// // 创建ObjectMapper实例
|
||||
// ObjectMapper objectMapper = new ObjectMapper();
|
||||
//
|
||||
// // 配置ObjectMapper将驼峰转换为下划线
|
||||
// objectMapper.setPropertyNamingStrategy(Pro pertyNamingStrategies.SNAKE_CASE);
|
||||
//
|
||||
// // 禁用默认的换行输出
|
||||
// objectMapper.configure(SerializationFeature.INDENT_OUTPUT, false);
|
||||
// for (Map<String, Object> map : realList) {
|
||||
// String json = objectMapper.writeValueAsString(map);
|
||||
// System.out.println(json);
|
||||
// }
|
||||
//返回对象
|
||||
PageListVO vo = new PageListVO(); |
||||
vo.setList(realList); |
||||
PaginationVO page = JsonUtil.getJsonToBean(biddingProjectSubscribePagination, PaginationVO.class); |
||||
vo.setPagination(page); |
||||
return ActionResult.success(vo); |
||||
} |
||||
|
||||
/** |
||||
* 创建 |
||||
* |
||||
* @param bidding_project_subscribeForm |
||||
* @return |
||||
*/ |
||||
@PostMapping() |
||||
@Transactional |
||||
@Operation(summary = "创建") |
||||
public ActionResult create(@RequestBody @Valid BiddingProjectSubscribeForm bidding_project_subscribeForm) throws DataException { |
||||
String b = biddingProjectSubscribeService.checkForm(bidding_project_subscribeForm, 0); |
||||
if (StringUtil.isNotEmpty(b)) { |
||||
return ActionResult.fail(b); |
||||
} |
||||
String oldBidOpeningTime = bidding_project_subscribeForm.getBidOpeningTime(); |
||||
String mainId = RandomUtil.uuId(); |
||||
UserInfo userInfo = userProvider.get(); |
||||
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId()); |
||||
bidding_project_subscribeForm = JsonUtil.getJsonToBean( |
||||
SwapUtil.swapDatetime(BiddingProjectSubscribeConstant.getFormData(), bidding_project_subscribeForm), BiddingProjectSubscribeForm.class); |
||||
BiddingProjectSubscribeEntity entity = JsonUtil.getJsonToBean(bidding_project_subscribeForm, BiddingProjectSubscribeEntity.class); |
||||
entity.setPlanSubmissionTime(new Date()); |
||||
if (bidding_project_subscribeForm.getManagementStyle().equals("2")) { |
||||
entity.setResultReportingTime(new Date()); |
||||
entity.setIsApproval(true); |
||||
} |
||||
entity.setFlowtaskid(mainId); |
||||
if (StrUtil.isNotBlank(oldBidOpeningTime)) { |
||||
entity.setBidOpeningTime(new Date(Long.parseLong(oldBidOpeningTime))); |
||||
} |
||||
entity.setCreateTime(LocalDateTime.now()); |
||||
entity.setUpdateTime(LocalDateTime.now()); |
||||
checkProjectAmount(entity); |
||||
biddingProjectSubscribeService.saveOrUpdate(entity); |
||||
if (StringUtil.equals(bidding_project_subscribeForm.getSaveType(), "1")) { |
||||
//修改流程 查询领导 新增子单数据 记录流程
|
||||
biddingProjectSubscribeService.updateFlow(userEntity, entity, true); |
||||
} else { |
||||
biddingProjectSubscribeService.temporaryStorage(userEntity, entity); |
||||
} |
||||
return ActionResult.success("创建成功"); |
||||
} |
||||
|
||||
private void checkProjectAmount(BiddingProjectSubscribeEntity entity) { |
||||
if (null==entity.getWinningBidderInfo())return; |
||||
if (StrUtil.isBlank(entity.getWinningBidderType()))return; |
||||
switch (entity.getWinningBidderType()){ |
||||
case "1": |
||||
entity.setProjectAmount(entity.getWinningBidderInfo().stream() |
||||
.map(BiddingProjectDto.WinningBidderParam::getAmount) |
||||
.mapToDouble(Double::parseDouble) |
||||
.sum()); |
||||
break; |
||||
case "2": |
||||
Double top = entity.getWinningBidderInfo().stream() |
||||
.map(BiddingProjectDto.WinningBidderParam::getAmount) |
||||
.mapToDouble(Double::parseDouble) |
||||
.sum(); |
||||
for (BiddingProjectDto.WinningBidderParam winningBidderParam : entity.getWinningBidderInfo()) { |
||||
if (CollectionUtil.isEmpty(winningBidderParam.getChildren()))continue; |
||||
top+=winningBidderParam.getChildren().stream() |
||||
.map(BiddingProjectDto.BaseWinningBidderParam::getAmount) |
||||
.mapToDouble(Double::parseDouble) |
||||
.sum(); |
||||
} |
||||
entity.setProjectAmount(top); |
||||
break; |
||||
default: |
||||
return; |
||||
} |
||||
} |
||||
|
||||
|
||||
@Operation(summary = "审核") |
||||
@PostMapping("/auditing") |
||||
public ActionResult auditing(@RequestBody BiddingProjectDto.AuditingParam param) throws IOException { |
||||
biddingProjectSubscribeService.auditing(param); |
||||
return ActionResult.success("审核成功"); |
||||
} |
||||
|
||||
@Operation(summary = "归档") |
||||
@PostMapping("/archivist") |
||||
public ActionResult archivist(@RequestBody BiddingProjectDto.ArchivistParam param) throws IOException { |
||||
biddingProjectSubscribeService.archivist(param); |
||||
return ActionResult.success("归档完成"); |
||||
} |
||||
|
||||
|
||||
@Operation(summary = "获取当前人层级层级") |
||||
@GetMapping("/obtainHierarchy") |
||||
public ActionResult obtainHierarchy() throws IOException { |
||||
String hierarchy = biddingProjectSubscribeService.obtainHierarchy(); |
||||
return ActionResult.success(hierarchy); |
||||
} |
||||
|
||||
@Operation(summary = "获取招标填报人员层级") |
||||
@GetMapping("/obtainHierarchyOfCreate") |
||||
public ActionResult obtainHierarchyOfCreate(@RequestParam String id) throws IOException { |
||||
String hierarchy = biddingProjectSubscribeService.obtainHierarchyOfCreate(id); |
||||
return ActionResult.success(hierarchy); |
||||
} |
||||
|
||||
@Operation(summary = "终止项目") |
||||
@PostMapping("/termination") |
||||
public ActionResult termination(@RequestParam String id) throws IOException { |
||||
biddingProjectSubscribeService.termination(id); |
||||
return ActionResult.success("操作成功"); |
||||
} |
||||
|
||||
@Operation(summary = "获取全部文件") |
||||
@GetMapping("/getAllFileInfo") |
||||
public ActionResult getAllFileInfo(@RequestParam String id) throws IOException { |
||||
return ActionResult.success(biddingProjectSubscribeService.getAllFileInfo(id)); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param id |
||||
* @param bidding_project_subscribeForm |
||||
* @return |
||||
*/ |
||||
@PutMapping("/{id}") |
||||
@Transactional |
||||
@Operation(summary = "更新") |
||||
public ActionResult update(@PathVariable("id") String id, @RequestBody @Valid BiddingProjectSubscribeForm bidding_project_subscribeForm) throws DataException { |
||||
String b = biddingProjectSubscribeService.checkForm(bidding_project_subscribeForm, 1); |
||||
if (StringUtil.isNotEmpty(b)) { |
||||
return ActionResult.fail(b); |
||||
} |
||||
String oldBidOpeningTime = bidding_project_subscribeForm.getBidOpeningTime(); |
||||
UserInfo userInfo = userProvider.get(); |
||||
BiddingProjectSubscribeEntity entity = biddingProjectSubscribeService.getInfo(id); |
||||
if (entity != null) { |
||||
bidding_project_subscribeForm = JsonUtil.getJsonToBean( |
||||
generaterSwapUtil.swapDatetime(BiddingProjectSubscribeConstant.getFormData(), bidding_project_subscribeForm), BiddingProjectSubscribeForm.class); |
||||
BiddingProjectSubscribeEntity subentity = JsonUtil.getJsonToBean(bidding_project_subscribeForm, BiddingProjectSubscribeEntity.class); |
||||
if (StrUtil.isNotBlank(oldBidOpeningTime)) { |
||||
entity.setBidOpeningTime(new Date(Long.parseLong(oldBidOpeningTime))); |
||||
} |
||||
subentity.setUpdateTime(LocalDateTime.now()); |
||||
subentity.setCreateTime(entity.getCreateTime()); |
||||
checkProjectAmount(subentity); |
||||
// subentity.setWinningBidderInfo(entity.getWinningBidderInfo());
|
||||
// subentity.setWinningBidderType(entity.getWinningBidderType());
|
||||
boolean b1 = biddingProjectSubscribeService.updateById(subentity); |
||||
if (!b1) { |
||||
return ActionResult.fail("当前表单原数据已被调整,请重新进入该页面编辑并提交数据"); |
||||
} |
||||
biddingProjectSubscribeService.updateFlowByUser(entity); |
||||
return ActionResult.success("更新成功"); |
||||
} else { |
||||
return ActionResult.fail("更新失败,数据不存在"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "删除") |
||||
@DeleteMapping("/{id}") |
||||
@Transactional |
||||
public ActionResult delete(@PathVariable("id") String id) { |
||||
BiddingProjectSubscribeEntity entity = biddingProjectSubscribeService.getInfo(id); |
||||
if (entity != null) { |
||||
//主表数据删除
|
||||
biddingProjectSubscribeService.delete(entity); |
||||
|
||||
} |
||||
return ActionResult.success("删除成功"); |
||||
} |
||||
|
||||
/** |
||||
* 获取详情(编辑页) |
||||
* 编辑页面使用-不转换数据 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "信息") |
||||
@GetMapping("/{id}") |
||||
public ActionResult info(@PathVariable("id") String id) { |
||||
BiddingProjectSubscribeEntity entity = biddingProjectSubscribeService.getInfo(id); |
||||
if (entity == null) { |
||||
return ActionResult.fail("表单数据不存在!"); |
||||
} |
||||
Map<String, Object> bidding_project_subscribeMap = JsonUtil.entityToMap(entity); |
||||
bidding_project_subscribeMap.put("id", bidding_project_subscribeMap.get("id")); |
||||
//副表数据
|
||||
//子表数据
|
||||
bidding_project_subscribeMap = generaterSwapUtil.swapDataForm(bidding_project_subscribeMap, BiddingProjectSubscribeConstant.getFormData(), BiddingProjectSubscribeConstant.TABLEFIELDKEY, BiddingProjectSubscribeConstant.TABLERENAMES); |
||||
return ActionResult.success(bidding_project_subscribeMap); |
||||
} |
||||
|
||||
/** |
||||
* @param type 1-备案表 2-审批 3-结果 |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "下载文件") |
||||
@GetMapping("/download/{id}/{type}") |
||||
public ActionResult download(@PathVariable("id") String id, @PathVariable("type") String type) { |
||||
DownloadVO vo = DownloadVO.builder().build(); |
||||
MultipartFile multipartFile = biddingProjectSubscribeService.download(id, type); |
||||
String temporaryFilePath = fileApi.getPath(FileTypeConstant.TEMPORARY); |
||||
FileInfo fileInfo = fileUploadApi.uploadFile(multipartFile, temporaryFilePath, multipartFile.getOriginalFilename()); |
||||
vo.setName(fileInfo.getFilename()); |
||||
vo.setUrl(UploaderUtil.uploaderFile(fileInfo.getFilename() + "#" + "Temporary") + "&name=" + multipartFile.getOriginalFilename()); |
||||
return ActionResult.success(vo); |
||||
} |
||||
|
||||
@Operation(summary = "下载文件") |
||||
@PostMapping("/download/{id}/{type}") |
||||
public ActionResult download2(@PathVariable("id") String id, @PathVariable("type") String type,@RequestBody BiddingProjectSubscribeForm form) { |
||||
DownloadVO vo = DownloadVO.builder().build(); |
||||
BiddingProjectSubscribeEntity entity = JsonUtil.getJsonToBean(form, BiddingProjectSubscribeEntity.class); |
||||
MultipartFile multipartFile = biddingProjectSubscribeService.download(id, type,entity); |
||||
String temporaryFilePath = fileApi.getPath(FileTypeConstant.TEMPORARY); |
||||
FileInfo fileInfo = fileUploadApi.uploadFile(multipartFile, temporaryFilePath, multipartFile.getOriginalFilename()); |
||||
vo.setName(fileInfo.getFilename()); |
||||
vo.setUrl(UploaderUtil.uploaderFile(fileInfo.getFilename() + "#" + "Temporary") + "&name=" + multipartFile.getOriginalFilename()); |
||||
return ActionResult.success(vo); |
||||
} |
||||
|
||||
} |
||||
@ -1,446 +0,0 @@
@@ -1,446 +0,0 @@
|
||||
package jnpf.controller; |
||||
|
||||
import cn.afterturn.easypoi.excel.ExcelExportUtil; |
||||
import cn.afterturn.easypoi.excel.entity.ExportParams; |
||||
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; |
||||
import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; |
||||
import cn.hutool.core.util.StrUtil; |
||||
import cn.xuyanwu.spring.file.storage.FileInfo; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.base.DictionaryDataApi; |
||||
import jnpf.base.UserInfo; |
||||
import jnpf.base.entity.DictionaryDataEntity; |
||||
import jnpf.base.vo.DownloadVO; |
||||
import jnpf.base.vo.PageListVO; |
||||
import jnpf.base.vo.PaginationVO; |
||||
import jnpf.config.ConfigValueUtil; |
||||
import jnpf.constant.FileTypeConstant; |
||||
import jnpf.controller.util.SwapUtil; |
||||
import jnpf.entity.Bidding_project_statisticsEntity; |
||||
import jnpf.exception.DataException; |
||||
import jnpf.file.FileApi; |
||||
import jnpf.file.FileUploadApi; |
||||
import jnpf.model.bidding_project_statistics.*; |
||||
import jnpf.model.dto.BiddingProjectDto; |
||||
import jnpf.permission.entity.UserEntity; |
||||
import jnpf.service.Bidding_project_statisticsService; |
||||
import jnpf.util.*; |
||||
import lombok.Cleanup; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.apache.poi.hssf.usermodel.HSSFWorkbook; |
||||
import org.apache.poi.ss.usermodel.Workbook; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.transaction.annotation.Transactional; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import org.springframework.web.multipart.MultipartFile; |
||||
|
||||
import javax.annotation.Resource; |
||||
import javax.validation.Valid; |
||||
import java.io.IOException; |
||||
import java.util.*; |
||||
import java.util.stream.Collectors; |
||||
|
||||
/** |
||||
* bidding_project_statistics |
||||
* |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-13 |
||||
*/ |
||||
@Slf4j |
||||
@RestController |
||||
@Tag(name = "bidding_project_statistics", description = "example") |
||||
@RequestMapping("/Bidding_project_statistics") |
||||
public class Bidding_project_statisticsController { |
||||
|
||||
@Autowired |
||||
private SwapUtil generaterSwapUtil; |
||||
|
||||
@Autowired |
||||
private UserProvider userProvider; |
||||
|
||||
@Autowired |
||||
private Bidding_project_statisticsService bidding_project_statisticsService; |
||||
@Resource |
||||
private DictionaryDataApi dictionaryDataApi; |
||||
|
||||
|
||||
@Autowired |
||||
private ConfigValueUtil configValueUtil; |
||||
|
||||
@Autowired |
||||
private FileUploadApi fileUploadApi; |
||||
|
||||
@Autowired |
||||
private FileApi fileApi; |
||||
|
||||
/** |
||||
* 列表 |
||||
* |
||||
* @param bidding_project_statisticsPagination |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "获取列表") |
||||
@PostMapping("/getList") |
||||
public ActionResult list(@RequestBody Bidding_project_statisticsPagination bidding_project_statisticsPagination) throws IOException { |
||||
List<Map<String, Object>> list = bidding_project_statisticsService.getList(bidding_project_statisticsPagination); |
||||
List<Map<String, Object>> realList = new ArrayList<>(); |
||||
if (StrUtil.equalsAny(bidding_project_statisticsPagination.getQueryType(), "1","3")) { |
||||
for (Map<String, Object> entity : list) { |
||||
Map<String, Object> bidding_project_statisticsMap = JsonUtil.entityToMap(entity); |
||||
bidding_project_statisticsMap.put("id", bidding_project_statisticsMap.get("id")); |
||||
//副表数据
|
||||
//子表数据
|
||||
realList.add(bidding_project_statisticsMap); |
||||
} |
||||
} else { |
||||
List<DictionaryDataEntity> dataList = dictionaryDataApi.getList("dc6b2542d94b5434fc61ec1d59592901"); |
||||
for (Map<String, Object> entity : list) { |
||||
Map<String, Object> bidding_project_statisticsMap = new TreeMap<>(new Comparator<String>() { |
||||
@Override |
||||
public int compare(String o1, String o2) { |
||||
// 检查o1是否为"上报单位",如果是,则将其排在所有其他字符串之前
|
||||
if (StrUtil.equals(o1, "上报单位")) { |
||||
return -1; // 返回-1,表示o1应该排在o2之前
|
||||
} |
||||
if (StrUtil.equals(o1, "机构数量")) { |
||||
// 如果o2是"上报单位",则o1(即"机构数量")应该排在o2之后
|
||||
if (StrUtil.equals(o2, "上报单位")) { |
||||
return 1; // 返回1,表示o1应该排在o2之后
|
||||
} |
||||
return -1; // 返回-1,表示o1应该排在o2之前
|
||||
} |
||||
// 如果o1既不是"上报单位"也不是"机构数量",则检查o2是否为这两个特殊字符串之一
|
||||
if (StrUtil.equals(o2, "上报单位") || StrUtil.equals(o2, "机构数量")) { |
||||
return 1; // 返回1,表示o1应该排在o2之后
|
||||
} |
||||
if (StrUtil.equals(o1, "无")) { |
||||
return 1; |
||||
} |
||||
return o1.compareTo(o2); |
||||
} |
||||
}); |
||||
for (String key : entity.keySet()) { |
||||
if (StrUtil.equals(key, "reportingUnit")) { |
||||
bidding_project_statisticsMap.put("上报单位", entity.get(key)); |
||||
continue; |
||||
} |
||||
if (StrUtil.equals(key, "projectsNums")) { |
||||
bidding_project_statisticsMap.put("机构数量", entity.get(key)); |
||||
continue; |
||||
} |
||||
Optional<DictionaryDataEntity> first = dataList.stream().filter(data -> data.getSimpleSpelling().equals(key)).findFirst(); |
||||
if (!first.isPresent()) { |
||||
continue; |
||||
} |
||||
bidding_project_statisticsMap.put(first.get().getFullName(), entity.get(key)); |
||||
} |
||||
realList.add(bidding_project_statisticsMap); |
||||
} |
||||
} |
||||
//数据转换
|
||||
// realList = generaterSwapUtil.swapDataList(realList, Bidding_project_statisticsConstant.getFormData(), Bidding_project_statisticsConstant.getColumnData(), bidding_project_statisticsPagination.getModuleId(),false);
|
||||
|
||||
//返回对象
|
||||
PageListVO vo = new PageListVO(); |
||||
vo.setList(realList); |
||||
PaginationVO page = JsonUtil.getJsonToBean(bidding_project_statisticsPagination, PaginationVO.class); |
||||
vo.setPagination(page); |
||||
return ActionResult.success(realList); |
||||
} |
||||
|
||||
/** |
||||
* 导出Excel |
||||
* |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "导出Excel") |
||||
@PostMapping("/Actions/Export") |
||||
public ActionResult Export(@RequestBody Bidding_project_statisticsPagination bidding_project_statisticsPagination) throws IOException { |
||||
List<Map<String, Object>> list = bidding_project_statisticsService.getList(bidding_project_statisticsPagination); |
||||
List<Map<String, Object>> realList = new ArrayList<>(); |
||||
for (Map<String, Object> entity : list) { |
||||
Map<String, Object> bidding_project_statisticsMap = JsonUtil.entityToMap(entity); |
||||
bidding_project_statisticsMap.put("id", bidding_project_statisticsMap.get("id")); |
||||
//副表数据
|
||||
//子表数据
|
||||
realList.add(bidding_project_statisticsMap); |
||||
} |
||||
//数据转换
|
||||
// realList = generaterSwapUtil.swapDataList(realList, Bidding_project_statisticsConstant.getFormData(), Bidding_project_statisticsConstant.getColumnData(), bidding_project_statisticsPagination.getModuleId(), false);
|
||||
UserInfo userInfo = userProvider.get(); |
||||
DownloadVO vo = null; |
||||
if (StrUtil.equalsAny(bidding_project_statisticsPagination.getQueryType(), "1")) { |
||||
String[] keys = {"reportingUnit", |
||||
"projectsNums", |
||||
"engineering", |
||||
"goods", |
||||
"service", |
||||
"rentOut", |
||||
"agency1", |
||||
"other" |
||||
}; |
||||
vo = this.creatModelExcel(fileApi.getPath(FileTypeConstant.TEMPORARY), realList, Arrays.asList(keys), userInfo, bidding_project_statisticsPagination.getQueryType()); |
||||
|
||||
}else if (StrUtil.equalsAny(bidding_project_statisticsPagination.getQueryType(), "3")){ |
||||
String[] keys = {"reportingUnit", |
||||
"projectsAmount", |
||||
"engineering", |
||||
"goods", |
||||
"service", |
||||
"rentOut", |
||||
"agency1", |
||||
"other" |
||||
}; |
||||
vo = this.creatModelExcel(fileApi.getPath(FileTypeConstant.TEMPORARY), realList, Arrays.asList(keys), userInfo, bidding_project_statisticsPagination.getQueryType()); |
||||
}else { |
||||
//查询字典表
|
||||
List<DictionaryDataEntity> dataList = dictionaryDataApi.getList("dc6b2542d94b5434fc61ec1d59592901"); |
||||
vo = this.creatModelExcel(fileApi.getPath(FileTypeConstant.TEMPORARY), realList, dataList.stream().map(DictionaryDataEntity::getSimpleSpelling).collect(Collectors.toList()), userInfo, bidding_project_statisticsPagination.getQueryType()); |
||||
|
||||
} |
||||
return ActionResult.success(vo); |
||||
} |
||||
|
||||
/** |
||||
* 导出表格方法 |
||||
*/ |
||||
public DownloadVO creatModelExcel(String path, List<Map<String, Object>> list, List<String> keys, UserInfo userInfo, String queryType) { |
||||
DownloadVO vo = DownloadVO.builder().build(); |
||||
List<ExcelExportEntity> entitys = new ArrayList<>(); |
||||
if (StrUtil.equals(queryType, "1")) { |
||||
if (keys.size() > 0) { |
||||
for (String key : keys) { |
||||
switch (key) { |
||||
case "reportingUnit": |
||||
entitys.add(new ExcelExportEntity("上报单位", "reportingUnit",21)); |
||||
break; |
||||
case "projectsNums": |
||||
entitys.add(new ExcelExportEntity("项目数量", "projectsNums",20)); |
||||
break; |
||||
case "engineering": |
||||
entitys.add(new ExcelExportEntity("工程", "engineering",10)); |
||||
break; |
||||
case "goods": |
||||
entitys.add(new ExcelExportEntity("货物", "goods",10)); |
||||
break; |
||||
case "service": |
||||
entitys.add(new ExcelExportEntity("服务", "service",10)); |
||||
break; |
||||
case "rentOut": |
||||
entitys.add(new ExcelExportEntity("不动产出租", "rentOut",14)); |
||||
break; |
||||
case "agency1": |
||||
entitys.add(new ExcelExportEntity("资产处置", "agency1",11)); |
||||
break; |
||||
case "other": |
||||
entitys.add(new ExcelExportEntity("其他", "other",10)); |
||||
break; |
||||
default: |
||||
break; |
||||
} |
||||
} |
||||
List<String> keylist = keys; |
||||
} |
||||
} else if (StrUtil.equals(queryType, "3")) { |
||||
if (keys.size() > 0) { |
||||
for (String key : keys) { |
||||
switch (key) { |
||||
case "reportingUnit": |
||||
entitys.add(new ExcelExportEntity("上报单位", "reportingUnit",21)); |
||||
break; |
||||
case "projectsAmount": |
||||
entitys.add(new ExcelExportEntity("项目总金额", "projectsAmount",21)); |
||||
break; |
||||
case "engineering": |
||||
entitys.add(new ExcelExportEntity("工程", "engineering",10)); |
||||
break; |
||||
case "goods": |
||||
entitys.add(new ExcelExportEntity("货物", "goods",10)); |
||||
break; |
||||
case "service": |
||||
entitys.add(new ExcelExportEntity("服务", "service",10)); |
||||
break; |
||||
case "rentOut": |
||||
entitys.add(new ExcelExportEntity("不动产出租", "rentOut",14)); |
||||
break; |
||||
case "agency1": |
||||
entitys.add(new ExcelExportEntity("资产处置", "agency1",11)); |
||||
break; |
||||
case "other": |
||||
entitys.add(new ExcelExportEntity("其他", "other",10)); |
||||
break; |
||||
default: |
||||
break; |
||||
} |
||||
} |
||||
List<String> keylist = keys; |
||||
} |
||||
} else { |
||||
List<DictionaryDataEntity> dataList = dictionaryDataApi.getList("dc6b2542d94b5434fc61ec1d59592901"); |
||||
entitys.add(new ExcelExportEntity("上报单位", "reportingUnit",21)); |
||||
entitys.add(new ExcelExportEntity("机构数量", "projectsNums",20)); |
||||
for (DictionaryDataEntity dictionaryDataEntity : dataList) { |
||||
entitys.add(new ExcelExportEntity(dictionaryDataEntity.getFullName(), dictionaryDataEntity.getSimpleSpelling(),21)); |
||||
} |
||||
|
||||
} |
||||
String excelName = StrUtil.equals(queryType, "1") ? "项目数量统计" : "机构数量统计"; |
||||
ExportParams exportParams = new ExportParams(null, excelName); |
||||
exportParams.setType(ExcelType.XSSF); |
||||
try { |
||||
@Cleanup Workbook workbook = new HSSFWorkbook(); |
||||
if (entitys.size() > 0) { |
||||
if (list.size() == 0) { |
||||
list.add(new HashMap<>()); |
||||
} |
||||
//去除空数据
|
||||
List<Map<String, Object>> dataList = new ArrayList<>(); |
||||
for (Map<String, Object> map : list) { |
||||
int i = 0; |
||||
for (String key : keys) { |
||||
//子表
|
||||
if (key.toLowerCase().startsWith("tablefield")) { |
||||
String tableField = key.substring(0, key.indexOf("-")); |
||||
String field = key.substring(key.indexOf("-") + 1); |
||||
Object o = map.get(tableField); |
||||
if (o != null) { |
||||
List<Map<String, Object>> childList = (List<Map<String, Object>>) o; |
||||
for (Map<String, Object> childMap : childList) { |
||||
if (childMap.get(field) != null) { |
||||
i++; |
||||
} |
||||
} |
||||
} |
||||
} else { |
||||
Object o = map.get(key); |
||||
if (o != null) { |
||||
i++; |
||||
} |
||||
} |
||||
} |
||||
if (i > 0) { |
||||
dataList.add(map); |
||||
} |
||||
} |
||||
workbook = ExcelExportUtil.exportExcel(exportParams, entitys, dataList); |
||||
} |
||||
String fileName = excelName + DateUtil.dateNow("yyyyMMdd") + "_" + RandomUtil.uuId() + ".xlsx"; |
||||
MultipartFile multipartFile = ExcelUtil.workbookToCommonsMultipartFile(workbook, fileName); |
||||
String temporaryFilePath = fileApi.getPath(FileTypeConstant.TEMPORARY); |
||||
FileInfo fileInfo = fileUploadApi.uploadFile(multipartFile, temporaryFilePath, fileName); |
||||
vo.setName(fileInfo.getFilename()); |
||||
vo.setUrl(UploaderUtil.uploaderFile(fileInfo.getFilename() + "#" + "Temporary") + "&name=" + fileName); |
||||
} catch (Exception e) { |
||||
log.error("信息导出Excel错误:{}", e.getMessage()); |
||||
e.printStackTrace(); |
||||
} |
||||
return vo; |
||||
} |
||||
|
||||
@Operation(summary = "根据统计类型,单位名称,以及字段名称查询项目名称列表") |
||||
@PostMapping("/getProjectNameList") |
||||
public ActionResult getProjectNameList(@RequestBody BiddingProjectDto.GetProjectNameList param) { |
||||
return ActionResult.success(bidding_project_statisticsService.getProjectNameList(param)); |
||||
} |
||||
|
||||
/** |
||||
* 创建 |
||||
* |
||||
* @param bidding_project_statisticsForm |
||||
* @return |
||||
*/ |
||||
@PostMapping() |
||||
@Transactional |
||||
@Operation(summary = "创建") |
||||
public ActionResult create(@RequestBody @Valid Bidding_project_statisticsForm bidding_project_statisticsForm) throws DataException { |
||||
String b = bidding_project_statisticsService.checkForm(bidding_project_statisticsForm, 0); |
||||
if (StringUtil.isNotEmpty(b)) { |
||||
return ActionResult.fail(b); |
||||
} |
||||
String mainId = RandomUtil.uuId(); |
||||
UserInfo userInfo = userProvider.get(); |
||||
UserEntity userEntity = generaterSwapUtil.getUser(userInfo.getUserId()); |
||||
bidding_project_statisticsForm = JsonUtil.getJsonToBean( |
||||
SwapUtil.swapDatetime(Bidding_project_statisticsConstant.getFormData(), bidding_project_statisticsForm), Bidding_project_statisticsForm.class); |
||||
Bidding_project_statisticsEntity entity = JsonUtil.getJsonToBean(bidding_project_statisticsForm, Bidding_project_statisticsEntity.class); |
||||
entity.setId(mainId); |
||||
bidding_project_statisticsService.save(entity); |
||||
return ActionResult.success("创建成功"); |
||||
} |
||||
|
||||
/** |
||||
* 编辑 |
||||
* |
||||
* @param id |
||||
* @param bidding_project_statisticsForm |
||||
* @return |
||||
*/ |
||||
@PutMapping("/{id}") |
||||
@Transactional |
||||
@Operation(summary = "更新") |
||||
public ActionResult update(@PathVariable("id") String id, @RequestBody @Valid Bidding_project_statisticsForm bidding_project_statisticsForm) throws DataException { |
||||
String b = bidding_project_statisticsService.checkForm(bidding_project_statisticsForm, 1); |
||||
if (StringUtil.isNotEmpty(b)) { |
||||
return ActionResult.fail(b); |
||||
} |
||||
UserInfo userInfo = userProvider.get(); |
||||
Bidding_project_statisticsEntity entity = bidding_project_statisticsService.getInfo(id); |
||||
if (entity != null) { |
||||
bidding_project_statisticsForm = JsonUtil.getJsonToBean( |
||||
SwapUtil.swapDatetime(Bidding_project_statisticsConstant.getFormData(), bidding_project_statisticsForm), Bidding_project_statisticsForm.class); |
||||
Bidding_project_statisticsEntity subentity = JsonUtil.getJsonToBean(bidding_project_statisticsForm, Bidding_project_statisticsEntity.class); |
||||
boolean b1 = bidding_project_statisticsService.updateById(subentity); |
||||
if (!b1) { |
||||
return ActionResult.fail("当前表单原数据已被调整,请重新进入该页面编辑并提交数据"); |
||||
} |
||||
return ActionResult.success("更新成功"); |
||||
} else { |
||||
return ActionResult.fail("更新失败,数据不存在"); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 删除 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "删除") |
||||
@DeleteMapping("/{id}") |
||||
@Transactional |
||||
public ActionResult delete(@PathVariable("id") String id) { |
||||
Bidding_project_statisticsEntity entity = bidding_project_statisticsService.getInfo(id); |
||||
if (entity != null) { |
||||
//主表数据删除
|
||||
bidding_project_statisticsService.delete(entity); |
||||
} |
||||
return ActionResult.success("删除成功"); |
||||
} |
||||
|
||||
/** |
||||
* 获取详情(编辑页) |
||||
* 编辑页面使用-不转换数据 |
||||
* |
||||
* @param id |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "信息") |
||||
@GetMapping("/{id}") |
||||
public ActionResult info(@PathVariable("id") String id) { |
||||
Bidding_project_statisticsEntity entity = bidding_project_statisticsService.getInfo(id); |
||||
if (entity == null) { |
||||
return ActionResult.fail("表单数据不存在!"); |
||||
} |
||||
Map<String, Object> bidding_project_statisticsMap = JsonUtil.entityToMap(entity); |
||||
bidding_project_statisticsMap.put("id", bidding_project_statisticsMap.get("id")); |
||||
//副表数据
|
||||
//子表数据
|
||||
bidding_project_statisticsMap = generaterSwapUtil.swapDataForm(bidding_project_statisticsMap, Bidding_project_statisticsConstant.getFormData(), Bidding_project_statisticsConstant.TABLEFIELDKEY, Bidding_project_statisticsConstant.TABLERENAMES); |
||||
return ActionResult.success(bidding_project_statisticsMap); |
||||
} |
||||
|
||||
} |
||||
@ -1,124 +0,0 @@
@@ -1,124 +0,0 @@
|
||||
package jnpf.controller; |
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.Parameter; |
||||
import io.swagger.v3.oas.annotations.Parameters; |
||||
import jnpf.base.controller.SuperController; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.base.Pagination; |
||||
import jnpf.base.vo.PageListVO; |
||||
import jnpf.base.vo.PaginationVO; |
||||
import jnpf.constant.MsgCode; |
||||
import jnpf.entity.ContractEntity; |
||||
import jnpf.model.ContractForm; |
||||
import jnpf.model.ContractInfoVO; |
||||
import jnpf.model.ContractListVO; |
||||
import jnpf.service.ContractService; |
||||
import jnpf.util.JsonUtil; |
||||
import org.springframework.beans.factory.annotation.Autowired; |
||||
import org.springframework.web.bind.annotation.*; |
||||
|
||||
import javax.validation.Valid; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* Contract |
||||
* 版本: V3.0.0 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2020-12-31 |
||||
*/ |
||||
@RestController |
||||
@Tag(name = "示例接口", description = "Contract") |
||||
@RequestMapping("/Contract") |
||||
public class ContractController extends SuperController<ContractService, ContractEntity> { |
||||
|
||||
@Autowired |
||||
private ContractService contractService; |
||||
|
||||
/** |
||||
* 获取列表 |
||||
* |
||||
* @param pagination 分页模型 |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "获取列表") |
||||
@GetMapping("/List") |
||||
public ActionResult<PageListVO<ContractListVO>> list(Pagination pagination) { |
||||
List<ContractEntity> entity = contractService.getlist(pagination); |
||||
List<ContractListVO> listVo = JsonUtil.getJsonToList(JsonUtil.getObjectToStringDateFormat(entity, "yyyy-MM-dd HH:mm:ss"), ContractListVO.class); |
||||
PaginationVO vo = JsonUtil.getJsonToBean(pagination, PaginationVO.class); |
||||
return ActionResult.page(listVo, vo); |
||||
} |
||||
|
||||
/** |
||||
* 获取详情 |
||||
* |
||||
* @param id 主键 |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "获取详情") |
||||
@GetMapping("/{id}") |
||||
@Parameters({ |
||||
@Parameter(name = "id", description = "主键", required = true), |
||||
}) |
||||
public ActionResult<ContractInfoVO> info(@PathVariable("id") String id) { |
||||
ContractEntity entity = contractService.getInfo(id); |
||||
ContractInfoVO vo = JsonUtil.getJsonToBean(entity, ContractInfoVO.class); |
||||
return ActionResult.success(vo); |
||||
} |
||||
|
||||
/** |
||||
* 新建 |
||||
* |
||||
* @param contractForm 新建模型 |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "新建") |
||||
@PostMapping |
||||
@Parameters({ |
||||
@Parameter(name = "contractForm", description = "示例模型",required = true), |
||||
}) |
||||
public ActionResult create(@RequestBody @Valid ContractForm contractForm) { |
||||
ContractEntity entity = JsonUtil.getJsonToBean(contractForm, ContractEntity.class); |
||||
contractService.create(entity); |
||||
return ActionResult.success(MsgCode.SU002.get()); |
||||
} |
||||
|
||||
/** |
||||
* @param id 主键 |
||||
* @param contractForm 修改模型 |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "修改") |
||||
@PutMapping("/{id}") |
||||
@Parameters({ |
||||
@Parameter(name = "contractForm", description = "示例模型",required = true), |
||||
@Parameter(name = "id", description = "主键", required = true), |
||||
}) |
||||
public ActionResult update(@PathVariable("id") String id, @RequestBody @Valid ContractForm contractForm) { |
||||
ContractEntity entity = JsonUtil.getJsonToBean(contractForm, ContractEntity.class); |
||||
contractService.update(id, entity); |
||||
return ActionResult.success(MsgCode.SU002.get()); |
||||
} |
||||
|
||||
/** |
||||
* 删除 |
||||
* |
||||
* @param id 主键 |
||||
* @return |
||||
*/ |
||||
@Operation(summary = "删除") |
||||
@DeleteMapping("/{id}") |
||||
@Parameters({ |
||||
@Parameter(name = "id", description = "主键", required = true), |
||||
}) |
||||
public ActionResult delete(@PathVariable("id") String id) { |
||||
ContractEntity entity = contractService.getInfo(id); |
||||
contractService.delete(entity); |
||||
return ActionResult.success(MsgCode.SU003.get()); |
||||
} |
||||
|
||||
} |
||||
@ -1,93 +0,0 @@
@@ -1,93 +0,0 @@
|
||||
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.annotations.Api; |
||||
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 org.springframework.web.multipart.MultipartFile; |
||||
|
||||
import java.util.*; |
||||
|
||||
@RestController |
||||
@Api("专家管理相关接口") |
||||
@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("/expertImport") |
||||
public ActionResult<Void> expertImport(@RequestParam(name = "file") MultipartFile file) { |
||||
expertService.expertImport(file); |
||||
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)); |
||||
} |
||||
|
||||
} |
||||
@ -1,51 +0,0 @@
@@ -1,51 +0,0 @@
|
||||
package jnpf.controller; |
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.Operation; |
||||
import io.swagger.v3.oas.annotations.tags.Tag; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.base.Pagination; |
||||
import jnpf.base.vo.PageListVO; |
||||
import jnpf.base.vo.PaginationVO; |
||||
import jnpf.entity.ContractEntity; |
||||
import jnpf.model.ContractListVO; |
||||
import jnpf.model.dto.IndicatorStatisticsDto; |
||||
import jnpf.service.BiddingProjectSubscribeService; |
||||
import jnpf.service.IndicatorStatisticsService; |
||||
import jnpf.util.JsonUtil; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springframework.web.bind.annotation.GetMapping; |
||||
import org.springframework.web.bind.annotation.RequestMapping; |
||||
import org.springframework.web.bind.annotation.RestController; |
||||
|
||||
import java.util.List; |
||||
|
||||
@RestController |
||||
@Tag(name = "指标统计接口", description = "indicator") |
||||
@RequestMapping("/indicator") |
||||
@AllArgsConstructor |
||||
public class IndicatorStatisticsController { |
||||
private final IndicatorStatisticsService indicatorStatisticsService; |
||||
|
||||
|
||||
@Operation(summary = "审批/备案项目数") |
||||
@GetMapping("/projectsNumber") |
||||
public ActionResult<IndicatorStatisticsDto.ProjectsNumberResponse> projectsNumber(IndicatorStatisticsDto.ProjectsNumberParam param) { |
||||
return ActionResult.success(indicatorStatisticsService.projectsNumber(param)); |
||||
} |
||||
|
||||
|
||||
@Operation(summary = "项目数 金额") |
||||
@GetMapping("/moneyAndProjectsNumber") |
||||
public ActionResult<IndicatorStatisticsDto.MoneyAndProjectsNumberResponse> moneyAndProjectsNumber(IndicatorStatisticsDto.MoneyAndProjectsNumberParam param) { |
||||
return ActionResult.success(indicatorStatisticsService.moneyAndProjectsNumber(param)); |
||||
} |
||||
|
||||
@Operation(summary = "我的待办") |
||||
@GetMapping("/myToDoList") |
||||
public ActionResult<IndicatorStatisticsDto.MyToDoListResponse> myToDoList() { |
||||
return ActionResult.success(indicatorStatisticsService.myToDoList()); |
||||
} |
||||
|
||||
|
||||
} |
||||
@ -1,138 +0,0 @@
@@ -1,138 +0,0 @@
|
||||
package jnpf.controller; |
||||
|
||||
|
||||
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.tags.Tag; |
||||
import jnpf.base.ActionResult; |
||||
import jnpf.base.vo.DownloadVO; |
||||
import jnpf.entity.Expert; |
||||
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; |
||||
|
||||
import java.util.List; |
||||
|
||||
|
||||
@RestController |
||||
@Api("项目抽签相关接口") |
||||
@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(); |
||||
} |
||||
|
||||
|
||||
@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(); |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -1,75 +0,0 @@
@@ -1,75 +0,0 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
|
||||
import java.util.Date; |
||||
/** |
||||
* 数据接口 |
||||
* |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-19 |
||||
*/ |
||||
@Data |
||||
@TableName("base_datainterface") |
||||
public class Base_datainterfaceEntity { |
||||
@TableId(value ="F_ID" ) |
||||
private String id; |
||||
@TableField(value = "F_CATEGORYID" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String categoryid; |
||||
@TableField(value = "F_FULLNAME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String fullname; |
||||
@TableField("F_PATH") |
||||
private String path; |
||||
@TableField(value = "F_REQUESTMETHOD" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String requestmethod; |
||||
@TableField(value = "F_RESPONSETYPE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String responsetype; |
||||
@TableField("F_QUERY") |
||||
private String query; |
||||
@TableField("F_REQUESTPARAMETERS") |
||||
private String requestparameters; |
||||
@TableField("F_IPADDRESS") |
||||
private String ipaddress; |
||||
@TableField("F_ENCODE") |
||||
private String encode; |
||||
@TableField("F_SORTCODE") |
||||
private Long sortcode; |
||||
@TableField("F_ENABLEDMARK") |
||||
private Integer enabledmark; |
||||
@TableField("F_DESCRIPTION") |
||||
private String description; |
||||
@TableField("F_CREATORTIME") |
||||
private Date creatortime; |
||||
@TableField("F_CREATORUSERID") |
||||
private String creatoruserid; |
||||
@TableField("F_LASTMODIFYTIME") |
||||
private Date lastmodifytime; |
||||
@TableField("F_LASTMODIFYUSERID") |
||||
private String lastmodifyuserid; |
||||
@TableField(value = "F_DELETEMARK" , updateStrategy = FieldStrategy.IGNORED) |
||||
private Integer deletemark; |
||||
@TableField("F_DELETETIME") |
||||
private Date deletetime; |
||||
@TableField("F_DELETEUSERID") |
||||
private String deleteuserid; |
||||
@TableField("F_DBLINKID") |
||||
private String dblinkid; |
||||
@TableField("F_DATATYPE") |
||||
private Integer datatype; |
||||
@TableField("F_CHECKTYPE") |
||||
private Integer checktype; |
||||
@TableField("F_REQUESTHEADERS") |
||||
private String requestheaders; |
||||
@TableField("F_DATAPROCESSING") |
||||
private String dataprocessing; |
||||
@TableField("F_TENANTID") |
||||
private String tenantid; |
||||
@TableField("F_FLOWID") |
||||
private String flowid; |
||||
} |
||||
@ -1,91 +0,0 @@
@@ -1,91 +0,0 @@
|
||||
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 lombok.AllArgsConstructor; |
||||
import lombok.Builder; |
||||
import lombok.Data; |
||||
import lombok.NoArgsConstructor; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* <p> |
||||
* |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-06-11 |
||||
*/ |
||||
@Data |
||||
@TableName("bidding_project_subscribe_child") |
||||
@Builder |
||||
@AllArgsConstructor |
||||
@NoArgsConstructor |
||||
public class BiddingProjectSubscribeChild implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@TableId(value = "child_id", type = IdType.INPUT) |
||||
private String childId; |
||||
|
||||
@TableField(value = "main_id") |
||||
private String mainId; |
||||
|
||||
// @ApiModelProperty("状态")
|
||||
@TableField(value = "child_status") |
||||
private String childStatus; |
||||
|
||||
// @ApiModelProperty("状态名称")
|
||||
@TableField(value = "child_status_name") |
||||
private String childStatusName; |
||||
|
||||
// @ApiModelProperty("人员所属部门")
|
||||
@TableField(value = "user_dept_id") |
||||
private String userDeptId; |
||||
|
||||
// @ApiModelProperty("人员所属部门名称")
|
||||
@TableField(value = "user_dept_name") |
||||
private String userDeptName; |
||||
|
||||
// @ApiModelProperty("操作人员id")
|
||||
@TableField(value = "user_id") |
||||
private String userId; |
||||
|
||||
// @ApiModelProperty("操作人员名称")
|
||||
@TableField(value = "user_name") |
||||
private String userName; |
||||
|
||||
// @ApiModelProperty("描述")
|
||||
@TableField(value = "remake") |
||||
private String remake; |
||||
|
||||
// @ApiModelProperty("创建时间")
|
||||
@TableField(value = "create_time") |
||||
private LocalDateTime createTime; |
||||
|
||||
// @ApiModelProperty("更新时间")
|
||||
@TableField(value = "update_time") |
||||
private LocalDateTime updateTime; |
||||
//根子单标记 "1" 非根子单 "0"
|
||||
@TableField(value = "root_child_flag") |
||||
private String rootChildFlag; |
||||
|
||||
|
||||
//非根子单时根子单的id
|
||||
@TableField(value = "root_child_id") |
||||
private String rootChildId; |
||||
|
||||
//创建人id
|
||||
@TableField(value = "create_user_id") |
||||
private String createUserId; |
||||
|
||||
//创建人姓名
|
||||
@TableField(value = "create_user_name") |
||||
private String createUserName; |
||||
|
||||
|
||||
} |
||||
@ -1,187 +0,0 @@
@@ -1,187 +0,0 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.*; |
||||
import jnpf.enump.BiddingProjectEnum; |
||||
import jnpf.model.JsonTypeHandler; |
||||
import jnpf.model.dto.BiddingProjectDto; |
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.ArrayList; |
||||
import java.util.Date; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 招标项目表申请表 |
||||
* |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-11 |
||||
*/ |
||||
@Data |
||||
@TableName(value = "bidding_project_subscribe",autoResultMap = true) |
||||
public class BiddingProjectSubscribeEntity { |
||||
@TableId(value ="ID" ,type = IdType.AUTO ) |
||||
private Integer id; |
||||
@TableField(value = "MANAGEMENT_STYLE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String managementStyle; |
||||
@TableField(value = "PROJECT_NUMBER" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String projectNumber; |
||||
@TableField(value = "PLAN_SUBMISSION_TIME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private Date planSubmissionTime; |
||||
@TableField(value = "REPORTING_CORP" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String reportingCorp; |
||||
@TableField(value = "TENDERING_ENTITY" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String tenderingEntity; |
||||
@TableField(value = "PROJECT_NAME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String projectName; |
||||
@TableField(value = "ITEM_CLASSIFICATION" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String itemClassification; |
||||
@TableField(value = "ORGANIZATIONAL_FORM" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String organizationalForm; |
||||
@TableField(value = "BIDDING_METHOD" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String biddingMethod; |
||||
@TableField("REPORTED_FILE_NAME") |
||||
private String reportedFileName; |
||||
@TableField(value = "BIDDING_DOCUMENT_ID" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String biddingDocumentId; |
||||
@TableField(value = "DECISION_PROCEDURE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String decisionProcedure; |
||||
@TableField(value = "APPROVAL_DOCUMENTS_ID" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String approvalDocumentsId; |
||||
@TableField(value = "FINAL_APPROVAL_TIME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private Date finalApprovalTime; |
||||
@TableField(value = "SETTING_OF_WINNING_BIDDER_ONE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String settingOwinningBidderOne; |
||||
@TableField(value = "SETTING_OF_WINNING_BIDDER_TWO" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String settingOwinningBidderTwo; |
||||
@TableField(value = "SCORING_INDICATOR_SETTINGS_ONE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String scoringIndicatorSettingsOne; |
||||
@TableField("SCORING_INDICATOR_SETTINGS_TWO") |
||||
private String scoringIndicatorSettingsTwo; |
||||
@TableField("SCORING_INDICATOR_SETTINGS_THREE") |
||||
private String scoringIndicatorSettingsThree; |
||||
@TableField("SCORING_INDICATOR_SETTINGS_FOUR") |
||||
private String scoringIndicatorSettingsFour; |
||||
@TableField(value = "AGENCY_ONE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String agencyOne; |
||||
@TableField("AGENCY_TWO") |
||||
private String agencyTwo; |
||||
@TableField(value = "SCORING_METHOD_ONE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String scoringMethodOne; |
||||
@TableField(value = "SCORING_METHOD_TWO" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String scoringMethodTwo; |
||||
@TableField("APPROVAL_DOCUMENTS_ID_TWO") |
||||
private String approvalDocumentsIdTwo; |
||||
@TableField(value = "RESULT_REPORTING_TIME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private Date resultReportingTime; |
||||
@TableField(value = "RESULT_REPORTED_FILE_NAME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String resultReportedFileName; |
||||
@TableField(value = "BID_OPENING_TIME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private Date bidOpeningTime; |
||||
@TableField(value = "EXPLANATION_OF_BID" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String explanationObid; |
||||
@TableField(value = "WINNING_BIDDER_AND_WINNING_AMOUNT" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String winningBidderAndWinningAmount; |
||||
@TableField(value = "BID_EVALUATION_COMMITTEE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String bidEvaluationCommittee; |
||||
@TableField(value = "TENDER_AGENCY_FEE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String tenderAgencyFee; |
||||
@TableField(value = "ATTACHMENT_OF_BIDDING_RESULTS_ONE_ID" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String attachmentObiddingResultsOneId; |
||||
@TableField("ATTACHMENT_OF_BIDDING_RESULTS_TWO_ID") |
||||
private String attachmentObiddingResultsTwoId; |
||||
@TableField("WINNING_BIDDER") |
||||
private String winningBidder; |
||||
@TableField(value = "WINNING_BIDDER_CANDIDATE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String winningBidderCandidate; |
||||
@TableField(value = "FILING_DECISION_PROCEDURE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String filingDecisionProcedure; |
||||
@TableField(value = "FILING_RESULTS_ONE_ID" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String filingResultsOneId; |
||||
@TableField("FILING_RESULTS_TWO_ID") |
||||
private String filingResultsTwoId; |
||||
@TableField(value = "APPROVAL_TIME_FOR_RESULTS" , updateStrategy = FieldStrategy.IGNORED) |
||||
private Date approvalTimeForResults; |
||||
@TableField("F_FLOWID") |
||||
private String flowid; |
||||
@TableField("F_FLOWTASKID") |
||||
private String flowtaskid; |
||||
@TableField(value = "ANNEX_PROGRAMME_DOCUMENT" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String annexProgrammeDocument; |
||||
@TableField("MAIN_STATUS") |
||||
private String mainStatus; |
||||
@TableField("MAIN_STATUS_NAME") |
||||
private String mainStatusName; |
||||
@TableField("BID_WINNING_AMOUNT") |
||||
private String bidWinningAmount; |
||||
@TableField("IS_APPROVAL") |
||||
private Boolean isApproval; |
||||
@TableField(value = "QUERY_TYPE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String queryType; |
||||
@TableField(value = "APPROVAL_DOCUMENTS_ID_JT" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String approvalDocumentsIdJt; |
||||
@TableField(value = "ARCHIVE_NUMBER" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String archiveNumber; |
||||
@TableField(value = "CONTROL_PRICE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private Double controlPrice; |
||||
@TableField(value = "FILING_RESULTS_THREE_ID" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String filingResultsThreeId; |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@TableField(value = "WINNING_BIDDER_INFO",typeHandler = JsonTypeHandler.class) |
||||
private List<BiddingProjectDto.WinningBidderParam> winningBidderInfo; |
||||
/** |
||||
*1-单一 2-多标段 3-入围机制 |
||||
*/ |
||||
@TableField("project_amount") |
||||
private Double projectAmount; |
||||
@TableField("WINNING_BIDDER_TYPE") |
||||
private String winningBidderType; |
||||
@TableField(value = "CREATE_TIME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private LocalDateTime createTime; |
||||
@TableField(value = "UPDATE_TIME" , updateStrategy = FieldStrategy.IGNORED) |
||||
private LocalDateTime updateTime; |
||||
|
||||
|
||||
/** |
||||
* 评标专家设置 |
||||
*/ |
||||
@TableField("eval_setting") |
||||
private String evalSetting; |
||||
/** |
||||
*合同期 |
||||
*/ |
||||
@TableField("contract_period") |
||||
private String contractPeriod; |
||||
|
||||
|
||||
@TableField(exist = false) |
||||
private List<BiddingProjectSubscribeChild> childList; |
||||
@TableField(exist = false) |
||||
private List<BiddingProjectSubscribeStep> stepList; |
||||
|
||||
|
||||
@TableField(exist = false) |
||||
private List<BiddingProjectEnum.Button> buttonList=new ArrayList<>(); |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
} |
||||
@ -1,97 +0,0 @@
@@ -1,97 +0,0 @@
|
||||
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 lombok.AllArgsConstructor; |
||||
import lombok.Builder; |
||||
import lombok.Data; |
||||
import lombok.NoArgsConstructor; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
|
||||
/** |
||||
* <p> |
||||
* |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-06-11 |
||||
*/ |
||||
@TableName("bidding_project_subscribe_step") |
||||
@Builder |
||||
@Data |
||||
@AllArgsConstructor |
||||
@NoArgsConstructor |
||||
//@apiModel(value = "BiddingProjectSubscribeStep对象", description = "")
|
||||
public class BiddingProjectSubscribeStep implements Serializable { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
//@apiModelProperty("主键")
|
||||
@TableId(value = "id", type = IdType.AUTO) |
||||
private Integer id; |
||||
|
||||
//@apiModelProperty("关联id")
|
||||
@TableField(value = "relation_main_id") |
||||
private String relationMainId; |
||||
|
||||
//@apiModelProperty("关联类型")
|
||||
@TableField(value = "relation_type") |
||||
|
||||
private String relationType; |
||||
|
||||
//@apiModelProperty("子单关联id")
|
||||
@TableField(value = "relation_child_id") |
||||
|
||||
private String relationChildId; |
||||
|
||||
//@apiModelProperty("处理类型")
|
||||
@TableField(value = "deal_type") |
||||
|
||||
private String dealType; |
||||
|
||||
//@apiModelProperty("处理类型名称")
|
||||
@TableField(value = "deal_type_name") |
||||
|
||||
private String dealTypeName; |
||||
|
||||
//@apiModelProperty("第三方关联id")
|
||||
@TableField(value = "other_relation_id") |
||||
|
||||
private String otherRelationId; |
||||
|
||||
//@apiModelProperty("描述")
|
||||
@TableField(value = "remake") |
||||
|
||||
private String remake; |
||||
|
||||
//@apiModelProperty("创建时间")
|
||||
@TableField(value = "create_time") |
||||
|
||||
private LocalDateTime createTime; |
||||
|
||||
//@apiModelProperty("创建人id")
|
||||
@TableField(value = "create_user_id") |
||||
|
||||
private String createUserId; |
||||
|
||||
//@apiModelProperty("创建人姓名")
|
||||
@TableField(value = "create_user_name") |
||||
|
||||
private String createUserName; |
||||
|
||||
//@apiModelProperty("创建者组织id")
|
||||
@TableField(value = "create_organization_id") |
||||
|
||||
private String createOrganizationId; |
||||
|
||||
//@apiModelProperty("创建人组织名称")
|
||||
@TableField(value = "create_organization_name") |
||||
|
||||
private String createOrganizationName; |
||||
|
||||
|
||||
} |
||||
@ -1,55 +0,0 @@
@@ -1,55 +0,0 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.FieldStrategy; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* 招标情况统计表 |
||||
* |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-13 |
||||
*/ |
||||
@Data |
||||
@TableName("bidding_project_statistics") |
||||
public class Bidding_project_statisticsEntity { |
||||
@TableId(value ="ID" ) |
||||
private String id; |
||||
@TableField("F_FLOWID") |
||||
private String flowid; |
||||
@TableField("REPORTING_UNIT") |
||||
private String reportingUnit; |
||||
@TableField("PROJECTS_NUMS") |
||||
private String projectsNums; |
||||
|
||||
@TableField(exist = false) |
||||
private String projectsAmount; |
||||
@TableField(value = "F_ENGINEERING" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String engineering; |
||||
@TableField(value = "F_GOODS" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String goods; |
||||
@TableField(value = "F_SERVICE" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String service; |
||||
@TableField(value = "RENT_OUT" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String rentOut; |
||||
@TableField(value = "F_OTHER" , updateStrategy = FieldStrategy.IGNORED) |
||||
private String other; |
||||
@TableField("REPORTING_UNIT_2") |
||||
private String reportingUnit2; |
||||
@TableField("PROJECTS_NUMS_2") |
||||
private String projectsNums2; |
||||
@TableField("F_AGENCY_1") |
||||
private String agency1; |
||||
@TableField("F_AGENCY_2") |
||||
private String agency2; |
||||
@TableField("F_AGENCY_3") |
||||
private String agency3; |
||||
@TableField("F_AGENCY_4") |
||||
private String agency4; |
||||
@TableField("F_OTHER_2") |
||||
private String other2; |
||||
} |
||||
@ -1,33 +0,0 @@
@@ -1,33 +0,0 @@
|
||||
package jnpf.entity; |
||||
|
||||
import jnpf.base.entity.SuperBaseEntity; |
||||
import com.baomidou.mybatisplus.annotation.TableField; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* |
||||
* Contract |
||||
* 版本: V3.0.0 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2020-12-31 |
||||
*/ |
||||
@Data |
||||
@TableName("test_contract") |
||||
public class ContractEntity extends SuperBaseEntity.SuperTBaseEntity<String> implements Serializable { |
||||
|
||||
@TableField("F_CONTRACTNAME") |
||||
private String contractName; |
||||
|
||||
@TableField("F_MYTELEPHONE") |
||||
private String mytelePhone; |
||||
|
||||
@TableField("F_FILEJSON") |
||||
private String fileJson; |
||||
|
||||
} |
||||
@ -1,129 +0,0 @@
@@ -1,129 +0,0 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.*; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import jnpf.model.ContactInformationTypeHandler; |
||||
import jnpf.model.dto.ExpertDto; |
||||
import lombok.Getter; |
||||
import lombok.Setter; |
||||
|
||||
/** |
||||
* <p> |
||||
* |
||||
* </p> |
||||
* |
||||
* @author admin |
||||
* @since 2024-08-26 |
||||
*/ |
||||
@Getter |
||||
@Setter |
||||
@TableName(value = "t_expert",autoResultMap = true) |
||||
//@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("联系人信息(json)")
|
||||
@TableField(value = "contact_information",typeHandler = ContactInformationTypeHandler.class) |
||||
private List<ExpertDto.ContactInformation> contactInformation; |
||||
|
||||
// @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; |
||||
|
||||
|
||||
} |
||||
@ -1,131 +0,0 @@
@@ -1,131 +0,0 @@
|
||||
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 com.fasterxml.jackson.annotation.JsonFormat; |
||||
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_project",autoResultMap = true) |
||||
@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("抽签类型 1-专家(默认) 2-公司") |
||||
@TableField(value = "lottery_type") |
||||
private String lotteryType; |
||||
|
||||
@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") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
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") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
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") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
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; |
||||
|
||||
@ApiModelProperty("结果信息") |
||||
@TableField(value ="upload_results_info",typeHandler = JsonTypeHandler.class) |
||||
private LotteryProjectDto.FileInfo uploadResultsInfo; |
||||
|
||||
|
||||
} |
||||
@ -1,63 +0,0 @@
@@ -1,63 +0,0 @@
|
||||
package jnpf.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.*; |
||||
|
||||
import java.io.Serializable; |
||||
import java.time.LocalDateTime; |
||||
import java.util.List; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import jnpf.model.*; |
||||
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 = ExpertGroupInfoTypeHandler.class) |
||||
private List<LotteryProjectDto.ExpertGroupInfo> expertGroupInfo; |
||||
|
||||
@ApiModelProperty("抽取专家信息json") |
||||
@TableField(value = "extract_experts_info",typeHandler = ExtractExpertsInfoTypeHandler.class) |
||||
private List<LotteryProjectDto.ExtractExpertsInfo> extractExpertsInfo; |
||||
|
||||
|
||||
|
||||
@TableField(value ="create_time") |
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
||||
private LocalDateTime createTime; |
||||
|
||||
@TableField(value ="del_flag") |
||||
private String delFlag; |
||||
|
||||
|
||||
} |
||||
@ -1,266 +0,0 @@
@@ -1,266 +0,0 @@
|
||||
package jnpf.enump; |
||||
|
||||
import lombok.Builder; |
||||
import lombok.Data; |
||||
|
||||
public class BiddingProjectEnum { |
||||
|
||||
public enum ChildStatusEnum { |
||||
TO_BE_EDIT("0", "待修改"), |
||||
//待审核
|
||||
PENDING_REVIEW("1", "待审核"), |
||||
//已退回
|
||||
RETURNED("2", "已驳回"), |
||||
//已通过
|
||||
PASS("3", "已通过"), |
||||
TO_BE_SUBMITTED("4", "待提交"), |
||||
SUBMITTED("5", "已提交/修改"), |
||||
TO_BE_ARCHIVED("6", "待归档"), |
||||
ARCHIVED("7", "已归档"), |
||||
; |
||||
|
||||
private String code; |
||||
private String describe; |
||||
|
||||
ChildStatusEnum(String code, String describe) { |
||||
this.code = code; |
||||
this.describe = describe; |
||||
|
||||
} |
||||
|
||||
//根据roleKey返回 enum
|
||||
// public static CoordinationEnum.RoleEnum getNameByRoleKey(String roleKey) {
|
||||
// for (CoordinationEnum.RoleEnum enm : CoordinationEnum.RoleEnum.values()) {
|
||||
// if (enm.getRoleKey().equals(roleKey)) {
|
||||
// return enm;
|
||||
// }
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
|
||||
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 MainStatusEnum { |
||||
//待审核
|
||||
PENDING_REVIEW("1", "待审核(子集团)"), |
||||
PENDING_REVIEW_JT("2", "待审核(集团)"), |
||||
PENDING_REVIEW_XM("8", "待审核(项目单位)"), |
||||
//已退回
|
||||
RETURNED("3", "已驳回"), |
||||
//已通过
|
||||
PASS("4", "审核通过"), |
||||
BE_SUBMITTED("6", "待提交(招标结果)"), |
||||
//已归档
|
||||
ARCHIVIST("5", "待归档"), |
||||
ARCHIVED("7", "已归档"), |
||||
PROJECT_TERMINATION("9", "已终止"), |
||||
TO_BE_SUBMITTED("10", "待提交"), |
||||
; |
||||
|
||||
private String code; |
||||
private String describe; |
||||
|
||||
MainStatusEnum(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 RootFlagEnum { |
||||
//发布类型
|
||||
ROOT_FLAG("1", "根子单"), |
||||
NOT_ROOT_FLAG("0", "非根子单"), |
||||
; |
||||
|
||||
private String code; |
||||
private String describe; |
||||
|
||||
RootFlagEnum(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 StepRelationTypeEnum { |
||||
//发布类型
|
||||
BIDDING("1", "招标"), |
||||
; |
||||
|
||||
private String code; |
||||
private String describe; |
||||
|
||||
StepRelationTypeEnum(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 StepTypeEnum { |
||||
LAUNCH("1", "流程发起"), |
||||
//三级发起/二级审核后/一级发起
|
||||
AUTOMATIC_DISPATCH("2", "系统自动流转"), |
||||
AUDITING_AGREE("3", "上级审核同意"), |
||||
AUDITING_DISAGREE("4", "上级审核不同意"), |
||||
ARCHIVIST("5", "归档"), |
||||
MATERIAL_MODIFICATION("6", "材料修改/上传"), |
||||
ARCHIVE_UPLOAD("7", "归档材料上传"), |
||||
PROCESS_TERMINATION("8", "流程终止"), |
||||
; |
||||
|
||||
private String code; |
||||
private String describe; |
||||
|
||||
StepTypeEnum(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 |
||||
@Builder |
||||
public static class Button { |
||||
// @ApiModelProperty("按钮动作")
|
||||
private String act; |
||||
// @ApiModelProperty("按钮名称")
|
||||
private String buttonName; |
||||
|
||||
} |
||||
|
||||
//业务部门管理状态
|
||||
public enum ButtonEnum { |
||||
CHECK("1", "查看"), |
||||
AUDITING("2", "审核"), |
||||
EDIT("3", "编辑"), |
||||
ARCHIVIST("4", "归档"), |
||||
TERMINATION("5", "终止"), |
||||
DOWNLOAD("6", "下载"), |
||||
|
||||
; |
||||
|
||||
|
||||
private String code; |
||||
private String name; |
||||
|
||||
ButtonEnum(String action, String name) { |
||||
this.code = action; |
||||
this.name = name; |
||||
|
||||
} |
||||
|
||||
|
||||
public static ButtonEnum getEnumByCode(String code) { |
||||
for (ButtonEnum enm : ButtonEnum.values()) { |
||||
if (enm.getCode().equals(code)) { |
||||
return enm; |
||||
} |
||||
} |
||||
return null; |
||||
} |
||||
|
||||
public String getCode() { |
||||
return code; |
||||
} |
||||
|
||||
public void setCode(String code) { |
||||
this.code = code; |
||||
} |
||||
|
||||
public String getName() { |
||||
return name; |
||||
} |
||||
|
||||
public void setName(String name) { |
||||
this.name = name; |
||||
} |
||||
} |
||||
} |
||||
@ -1,62 +0,0 @@
@@ -1,62 +0,0 @@
|
||||
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); |
||||
} |
||||
} |
||||
} |
||||
@ -1,25 +0,0 @@
@@ -1,25 +0,0 @@
|
||||
package jnpf.model; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* |
||||
* |
||||
* 版本: V3.0.0 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2020-12-31 |
||||
*/ |
||||
@Data |
||||
public class ContractForm { |
||||
|
||||
@Schema(description ="姓名") |
||||
private String contractName; |
||||
|
||||
@Schema(description ="手机号") |
||||
private String mytelePhone; |
||||
|
||||
@Schema(description ="文件") |
||||
private String fileJson; |
||||
|
||||
} |
||||
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
package jnpf.model; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* |
||||
* |
||||
* 版本: V3.0.0 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2020-12-31 |
||||
*/ |
||||
@Data |
||||
public class ContractInfoVO { |
||||
@Schema(description ="主键") |
||||
private String id; |
||||
|
||||
@Schema(description ="姓名") |
||||
private String contractName; |
||||
|
||||
@Schema(description ="手机号") |
||||
private String mytelePhone; |
||||
|
||||
@Schema(description ="文件") |
||||
private String fileJson; |
||||
} |
||||
@ -1,16 +0,0 @@
@@ -1,16 +0,0 @@
|
||||
package jnpf.model; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* |
||||
* |
||||
* 版本: V3.0.0 |
||||
* 版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* 作者: JNPF开发平台组 |
||||
* 日期: 2020-12-31 |
||||
*/ |
||||
@Data |
||||
public class ContractListVO extends ContractInfoVO { |
||||
|
||||
} |
||||
@ -1,63 +0,0 @@
@@ -1,63 +0,0 @@
|
||||
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); |
||||
} |
||||
} |
||||
} |
||||
@ -1,64 +0,0 @@
@@ -1,64 +0,0 @@
|
||||
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); |
||||
} |
||||
} |
||||
} |
||||
File diff suppressed because one or more lines are too long
@ -1,33 +0,0 @@
@@ -1,33 +0,0 @@
|
||||
package jnpf.model.base_datainterface; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* base_datainterface |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-19 |
||||
*/ |
||||
@Data |
||||
public class Base_datainterfaceForm { |
||||
/** 主键 */ |
||||
private String id; |
||||
|
||||
/** 分组ID **/ |
||||
@JsonProperty("categoryid") |
||||
private String categoryid; |
||||
/** 接口名称 **/ |
||||
@JsonProperty("fullname") |
||||
private String fullname; |
||||
/** 请求方式 **/ |
||||
@JsonProperty("requestmethod") |
||||
private String requestmethod; |
||||
/** 返回类型 **/ |
||||
@JsonProperty("responsetype") |
||||
private String responsetype; |
||||
/** 删除标志(默认0) **/ |
||||
@JsonProperty("deletemark") |
||||
private String deletemark; |
||||
} |
||||
@ -1,28 +0,0 @@
@@ -1,28 +0,0 @@
|
||||
package jnpf.model.base_datainterface; |
||||
|
||||
import jnpf.base.Pagination; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* |
||||
* base_datainterface |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-19 |
||||
*/ |
||||
@Data |
||||
public class Base_datainterfacePagination extends Pagination { |
||||
/** 查询key */ |
||||
private String[] selectKey; |
||||
/** json */ |
||||
private String json; |
||||
/** 数据类型 0-当前页,1-全部数据 */ |
||||
private String dataType; |
||||
/** 高级查询 */ |
||||
private String superQueryJson; |
||||
/** 功能id */ |
||||
private String moduleId; |
||||
/** 菜单id */ |
||||
private String menuId; |
||||
} |
||||
File diff suppressed because one or more lines are too long
@ -1,39 +0,0 @@
@@ -1,39 +0,0 @@
|
||||
package jnpf.model.bidding_project_statistics; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* bidding_project_statistics |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-13 |
||||
*/ |
||||
@Data |
||||
public class Bidding_project_statisticsForm { |
||||
/** 主键 */ |
||||
private String id; |
||||
|
||||
/** 上报单位 **/ |
||||
@JsonProperty("reporting_unit") |
||||
private String reporting_unit; |
||||
/** 项目数量 **/ |
||||
@JsonProperty("projects_nums") |
||||
private String projects_nums; |
||||
/** 工程 **/ |
||||
@JsonProperty("engineering") |
||||
private String engineering; |
||||
/** 货物 **/ |
||||
@JsonProperty("goods") |
||||
private String goods; |
||||
/** 服务 **/ |
||||
@JsonProperty("service") |
||||
private String service; |
||||
/** 租赁 **/ |
||||
@JsonProperty("rentOut") |
||||
private String rentOut; |
||||
/** 其他 **/ |
||||
@JsonProperty("other") |
||||
private String other; |
||||
} |
||||
@ -1,39 +0,0 @@
@@ -1,39 +0,0 @@
|
||||
package jnpf.model.bidding_project_statistics; |
||||
|
||||
import jnpf.base.Pagination; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* |
||||
* bidding_project_statistics |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-13 |
||||
*/ |
||||
@Data |
||||
public class Bidding_project_statisticsPagination extends Pagination { |
||||
/** 查询key */ |
||||
// private String[] selectKey;
|
||||
/** json */ |
||||
private String json; |
||||
/** 数据类型 0-当前页,1-全部数据 */ |
||||
private String dataType; |
||||
/** 高级查询 */ |
||||
private String superQueryJson; |
||||
/** 功能id */ |
||||
private String moduleId; |
||||
/** 菜单id */ |
||||
private String menuId; |
||||
/** |
||||
* 结果最终评审时间 |
||||
*/ |
||||
private String startTime; |
||||
private String endTime; |
||||
/** |
||||
* 1-项目 |
||||
* 2-代理 |
||||
* 3-金额 |
||||
*/ |
||||
private String queryType="1"; |
||||
} |
||||
File diff suppressed because one or more lines are too long
@ -1,167 +0,0 @@
@@ -1,167 +0,0 @@
|
||||
package jnpf.model.bidding_project_subscribe; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import jnpf.model.dto.BiddingProjectDto; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* bidding_project_subscribe |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-11 |
||||
*/ |
||||
@Data |
||||
public class BiddingProjectSubscribeForm { |
||||
/** 主键 */ |
||||
private String id; |
||||
|
||||
/** 备案编号 **/ |
||||
@JsonProperty("archiveNumber") |
||||
private String archiveNumber; |
||||
/** 审批状态 **/ |
||||
@JsonProperty("queryType") |
||||
private String queryType; |
||||
/** 管理方式 **/ |
||||
@JsonProperty("managementStyle") |
||||
private String managementStyle; |
||||
/** 项目编号 **/ |
||||
@JsonProperty("projectNumber") |
||||
private String projectNumber; |
||||
/** 方案上报时间 **/ |
||||
@JsonProperty("planSubmissionTime") |
||||
private String planSubmissionTime; |
||||
/** 上报单位(部门) **/ |
||||
@JsonProperty("reportingCorp") |
||||
private String reportingCorp; |
||||
/** 招标主体 **/ |
||||
@JsonProperty("tenderingEntity") |
||||
private String tenderingEntity; |
||||
/** 项目名称 **/ |
||||
@JsonProperty("projectName") |
||||
private String projectName; |
||||
/** 招标事项分类 **/ |
||||
@JsonProperty("itemClassification") |
||||
private String itemClassification; |
||||
/** 招标组织形式 **/ |
||||
@JsonProperty("organizationalForm") |
||||
private String organizationalForm; |
||||
/** 招标方式 **/ |
||||
@JsonProperty("biddingMethod") |
||||
private String biddingMethod; |
||||
/** 代理机构 **/ |
||||
@JsonProperty("agencyOne") |
||||
private String agencyOne; |
||||
/** 评分方法 **/ |
||||
@JsonProperty("scoringMethodOne") |
||||
private String scoringMethodOne; |
||||
/** 其他(评分说明) **/ |
||||
@JsonProperty("scoringMethodTwo") |
||||
private String scoringMethodTwo; |
||||
/** 评分指标设置 **/ |
||||
@JsonProperty("scoringIndicatorSettingsOne") |
||||
private String scoringIndicatorSettingsOne; |
||||
/** 中标人设置 **/ |
||||
@JsonProperty("settingOwinningBidderOne") |
||||
private String settingOwinningBidderOne; |
||||
/** 方案上报文件名称 **/ |
||||
@JsonProperty("annexProgrammeDocument") |
||||
private Object annexProgrammeDocument; |
||||
/** 招标文件及附件 **/ |
||||
@JsonProperty("biddingDocumentId") |
||||
private Object biddingDocumentId; |
||||
/** 审批/备案决策程序 **/ |
||||
@JsonProperty("decisionProcedure") |
||||
private Object decisionProcedure; |
||||
/** 子公司审批/备案文件 **/ |
||||
@JsonProperty("approvalDocumentsId") |
||||
private Object approvalDocumentsId; |
||||
/** 集团审批/备案批准文件 **/ |
||||
@JsonProperty("approvalDocumentsIdJt") |
||||
private Object approvalDocumentsIdJt; |
||||
/** 方案最终审批时间 **/ |
||||
@JsonProperty("finalApprovalTime") |
||||
private String finalApprovalTime; |
||||
/** 招标结果上报时间 **/ |
||||
@JsonProperty("resultReportingTime") |
||||
private String resultReportingTime; |
||||
/** 结果上报文件名称 **/ |
||||
@JsonProperty("resultReportedFileName") |
||||
private Object resultReportedFileName; |
||||
/** 开标时间 **/ |
||||
@JsonProperty("bidOpeningTime") |
||||
private String bidOpeningTime; |
||||
/** 开标情况说明 **/ |
||||
@JsonProperty("explanationObid") |
||||
private String explanationObid; |
||||
/** 中标人及中标金额 **/ |
||||
@JsonProperty("winningBidderAndWinningAmount") |
||||
private String winningBidderAndWinningAmount; |
||||
/** 评标委员会设置 **/ |
||||
@JsonProperty("bidEvaluationCommittee") |
||||
private String bidEvaluationCommittee; |
||||
/** 招标代理费 **/ |
||||
@JsonProperty("tenderAgencyFee") |
||||
private String tenderAgencyFee; |
||||
/** 招标结果附件 **/ |
||||
@JsonProperty("attachmentObiddingResultsOneId") |
||||
private Object attachmentObiddingResultsOneId; |
||||
/** 中标人 **/ |
||||
@JsonProperty("settingOwinningBidderTwo") |
||||
private String settingOwinningBidderTwo; |
||||
/** 中标候选人 **/ |
||||
@JsonProperty("winningBidderCandidate") |
||||
private String winningBidderCandidate; |
||||
/** 审批/备案决策程序 **/ |
||||
@JsonProperty("filingDecisionProcedure") |
||||
private Object filingDecisionProcedure; |
||||
/** 审批/备案结果 **/ |
||||
@JsonProperty("filingResultsOneId") |
||||
private Object filingResultsOneId; |
||||
/** 二级审批/备案结果 **/ |
||||
@JsonProperty("filingResultsTwoId") |
||||
private Object filingResultsTwoId; |
||||
/** 三级审批备案结果 **/ |
||||
@JsonProperty("filingResultsThreeId") |
||||
private Object filingResultsThreeId; |
||||
/** 结果最终审批时间 **/ |
||||
@JsonProperty("approvalTimeForResults") |
||||
private String approvalTimeForResults; |
||||
/** 招标控制价 **/ |
||||
@JsonProperty("controlPrice") |
||||
private Double controlPrice; |
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@JsonProperty("winningBidderInfo") |
||||
private List<BiddingProjectDto.WinningBidderParam> winningBidderInfo; |
||||
/** |
||||
*1-单一 2-多标段 3-入围机制 |
||||
*/ |
||||
@JsonProperty("winningBidderType") |
||||
private String winningBidderType; |
||||
|
||||
|
||||
/** |
||||
* 保存类型 1-提交 2-暂存 |
||||
* */ |
||||
private String saveType="1"; |
||||
|
||||
|
||||
/** |
||||
* 评标专家设置 |
||||
*/ |
||||
private String evalSetting; |
||||
/** |
||||
*合同期 |
||||
*/ |
||||
private String contractPeriod; |
||||
} |
||||
@ -1,68 +0,0 @@
@@ -1,68 +0,0 @@
|
||||
package jnpf.model.bidding_project_subscribe; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import jnpf.base.Pagination; |
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* |
||||
* bidding_project_subscribe |
||||
* @版本: V3.5 |
||||
* @版权: 引迈信息技术有限公司(https://www.jnpfsoft.com)
|
||||
* @作者: JNPF开发平台组 |
||||
* @日期: 2024-06-11 |
||||
*/ |
||||
@Data |
||||
public class BiddingProjectSubscribePagination extends Pagination { |
||||
/** 查询key */ |
||||
private String[] selectKey; |
||||
/** |
||||
* 查询类型 |
||||
* 1-我的自建 |
||||
* 2-我的待审批 |
||||
* 3-我的已审批 |
||||
* 4-查询所有(根据数据权限) |
||||
* 5-查询全部(待审核,已审核) |
||||
* 6-待归档 |
||||
* 7-已归档 |
||||
*/ |
||||
private String queryType="5"; |
||||
private List<String> childIdList; |
||||
|
||||
/** json */ |
||||
private String json; |
||||
/** 数据类型 0-当前页,1-全部数据 */ |
||||
private String dataType; |
||||
/** 高级查询 */ |
||||
private String superQueryJson; |
||||
/** 功能id */ |
||||
private String moduleId; |
||||
/** 菜单id */ |
||||
private String menuId; |
||||
/** 项目编号 */ |
||||
@JsonProperty("archiveNumber") |
||||
private Object archiveNumber; |
||||
/** 管理方式 */ |
||||
@JsonProperty("managementStyle") |
||||
private Object managementStyle; |
||||
/** 方案上报时间 */ |
||||
@JsonProperty("planSubmissionTime") |
||||
private Object planSubmissionTime; |
||||
/** 项目名称 */ |
||||
@JsonProperty("projectName") |
||||
private Object projectName; |
||||
/** 结果最终审批时间 */ |
||||
@JsonProperty("approvalTimeForResults") |
||||
private Object approvalTimeForResults; |
||||
/** 方案最终审批时间 */ |
||||
@JsonProperty("finalApprovalTime") |
||||
private Object finalApprovalTime; |
||||
/** 招标主体 */ |
||||
@JsonProperty("tenderingEntity") |
||||
private Object tenderingEntity; |
||||
/** 上报单位(部门) */ |
||||
@JsonProperty("reportingCorp") |
||||
private Object reportingCorp; |
||||
} |
||||
@ -1,96 +0,0 @@
@@ -1,96 +0,0 @@
|
||||
package jnpf.model.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class BiddingProjectDto { |
||||
|
||||
|
||||
|
||||
@Data |
||||
public static class AuditingParam { |
||||
/** |
||||
* 是否同意 1-同意 2-不同意 |
||||
*/ |
||||
private String act; |
||||
/** |
||||
* 描述 |
||||
*/ |
||||
private String remake; |
||||
/** |
||||
* 招标单id |
||||
*/ |
||||
private String id; |
||||
|
||||
|
||||
} |
||||
@Data |
||||
public static class ArchivistParam { |
||||
/** |
||||
* 招标单id |
||||
*/ |
||||
private String id; |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class BaseWinningBidderParam { |
||||
/** |
||||
* 标段 |
||||
*/ |
||||
private String bidSection; |
||||
/** |
||||
* 中标人 |
||||
*/ |
||||
private String people; |
||||
/** |
||||
* 金额 |
||||
*/ |
||||
private String amount; |
||||
} |
||||
|
||||
@Data |
||||
public static class WinningBidderParam extends BaseWinningBidderParam { |
||||
|
||||
/** |
||||
* 多标段中标结果字段 |
||||
*/ |
||||
private List<BaseWinningBidderParam> children; |
||||
} |
||||
|
||||
@Data |
||||
public static class GetProjectNameList{ |
||||
/** |
||||
* 单位名称 |
||||
*/ |
||||
private String projectName; |
||||
/** |
||||
* 统计类型 |
||||
*/ |
||||
private String statisticalType; |
||||
/** |
||||
* 字段名称 |
||||
*/ |
||||
private String fieldName; |
||||
|
||||
private String moduleId; |
||||
/** 菜单id */ |
||||
private String menuId; |
||||
/** |
||||
* 结果最终评审时间 |
||||
*/ |
||||
private String startTime; |
||||
private String endTime; |
||||
|
||||
|
||||
/** |
||||
* mapperCode |
||||
*/ |
||||
private String code; |
||||
private String sql; |
||||
|
||||
|
||||
} |
||||
} |
||||
@ -1,133 +0,0 @@
@@ -1,133 +0,0 @@
|
||||
package jnpf.model.dto; |
||||
|
||||
import cn.hutool.core.date.LocalDateTimeUtil; |
||||
import com.github.pagehelper.PageParam; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
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 { |
||||
@Schema(description = "新增类型 1-专家 2-公司 默认专家") |
||||
private String dataType = "1"; |
||||
@Schema(description = "专家姓名") |
||||
private String expertName; |
||||
@Schema(description = "专家组别(字典表id)") |
||||
private String expertGroup; |
||||
|
||||
@Schema(description = "公司名称(招投标类型)") |
||||
private String companyName; |
||||
|
||||
@Schema(description = "联系信息(招投标类型)") |
||||
private List<ExpertDto.ContactInformation> contactInformation; |
||||
|
||||
|
||||
@Schema(description = "联系方式") |
||||
private String phoneNumber; |
||||
|
||||
|
||||
|
||||
// @Schema(description = "出生日期")
|
||||
// private String birthdayString;
|
||||
|
||||
@Schema(description = "出生日期") |
||||
private LocalDateTime birthday; |
||||
|
||||
|
||||
@Schema(description = "专家来源 1-内部专家 2-外部专家") |
||||
private String expertSources; |
||||
|
||||
@Schema(description = "工作单位名称") |
||||
private String workUnit; |
||||
|
||||
|
||||
@Schema(description = "职务") |
||||
private String post; |
||||
|
||||
@Schema(description = "专业技术职称") |
||||
private String technicalPosition; |
||||
|
||||
@Schema(description = "专业专长") |
||||
private String professionalExpertise; |
||||
|
||||
@Schema(description = "性别 1-男 2-女") |
||||
private String sex; |
||||
|
||||
@Schema(description = "工龄") |
||||
private String workingYears; |
||||
|
||||
@Schema(description = "状态0-有效 1-无效") |
||||
private String status; |
||||
|
||||
public void setBirthday(String birthdayString) { |
||||
try { |
||||
this.birthday = LocalDateTimeUtil.parse(birthdayString, "yyyy-MM-dd"); |
||||
} catch (Exception e) { |
||||
throw new DataException("日期格式错误,请使用yyyy-MM-dd格式"); |
||||
} |
||||
} |
||||
} |
||||
|
||||
@Data |
||||
public static class AddParam extends BaseParam { |
||||
} |
||||
|
||||
@Data |
||||
public static class EditParam extends BaseParam { |
||||
//主键ID
|
||||
private String id; |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class ContactInformation { |
||||
//联系人姓名
|
||||
private String contactName; |
||||
//联系人手机号
|
||||
private String contactPhone; |
||||
} |
||||
|
||||
|
||||
@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; |
||||
|
||||
private String concatPerson; |
||||
private String expertGroup; |
||||
|
||||
@Schema(description = "新增类型 1-专家 2-公司 默认专家") |
||||
private String dataType = "1"; |
||||
|
||||
} |
||||
|
||||
@Data |
||||
public static class ListResponse extends Expert implements Serializable { |
||||
} |
||||
} |
||||
@ -1,134 +0,0 @@
@@ -1,134 +0,0 @@
|
||||
package jnpf.model.dto; |
||||
|
||||
import lombok.Data; |
||||
|
||||
import java.time.LocalDateTime; |
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
@Data |
||||
public class IndicatorStatisticsDto { |
||||
@Data |
||||
public static class ProjectsNumberParam { |
||||
/** |
||||
* 查询类型 1-本月(默认本月):到日。2-当年:按月。3-累计:按年 |
||||
*/ |
||||
private String type = "1"; |
||||
/** |
||||
* 权限控制 |
||||
*/ |
||||
private String menuId; |
||||
/** |
||||
* 根据type 传入对应参数 eg:月份查询传入某年某月 不传入默认为当年当月 返回当月当月日统计 |
||||
* 月份传入 yyyy-MM |
||||
* 年份传入 yyyy |
||||
* 累计无需传入 |
||||
*/ |
||||
private String corresponding; |
||||
|
||||
} |
||||
|
||||
@Data |
||||
public static class ProjectsNumberResponse { |
||||
/** |
||||
* 返回时间类型 用于前端展示使用 |
||||
*/ |
||||
private LocalDateTime corresponding; |
||||
/** |
||||
* 根据type 传入对应参数 eg:月份查询传入某年某月 不传入默认为当年当月 返回当月当月日统计 |
||||
*/ |
||||
private List<Indicator> indicatorList = new ArrayList<>(); |
||||
} |
||||
|
||||
@Data |
||||
public static class Indicator { |
||||
/** |
||||
* x轴数据 |
||||
*/ |
||||
private String xData; |
||||
/** |
||||
* y轴数据 |
||||
*/ |
||||
private String yData; |
||||
/** |
||||
* 审批数量 |
||||
*/ |
||||
private String spCount = "0"; |
||||
/** |
||||
* 备案数量 |
||||
*/ |
||||
private String baCount = "0"; |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class MoneyAndProjectsNumberParam { |
||||
/** |
||||
* 查询类型 1-本月 默认本月。2-当年。3-累计 4-自定义日期 |
||||
*/ |
||||
private String queryDateType = "1"; |
||||
/** |
||||
* 查询类型 1-所有(默认所有) 2-按组织形式分布 3-按事项分类分布 4-按招标方式分布 5-招标代理统计 |
||||
*/ |
||||
private String classificationType = "1"; |
||||
/** |
||||
* 权限控制 |
||||
*/ |
||||
private String menuId; |
||||
//mapper查询使用 日期
|
||||
private String corresponding; |
||||
|
||||
|
||||
/** |
||||
* 自定义日期查询使用 -开始时间 yyyy-MM-dd HH:mm:ss |
||||
*/ |
||||
private String startTime; |
||||
private String endTime; |
||||
} |
||||
|
||||
@Data |
||||
public static class MoneyAndProjectsNumberResponse { |
||||
/** |
||||
* 1-所有(默认所有) 2-按组织形式分布 3-按事项分类分布 4-按招标方式分布 |
||||
*/ |
||||
private String classificationType; |
||||
private List<MoneyAndProjectsNumberChild> dataList = new ArrayList<>(); |
||||
} |
||||
|
||||
@Data |
||||
public static class MoneyAndProjectsNumberChild { |
||||
/** |
||||
* 类型名称 |
||||
*/ |
||||
private String yName; |
||||
/** |
||||
* 项目数量 |
||||
*/ |
||||
private String projectsNumber; |
||||
/** |
||||
* 金额 |
||||
*/ |
||||
private String money; |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class MyToDoListResponse { |
||||
/** |
||||
* 待填报 |
||||
*/ |
||||
private String toBeFilledCount; |
||||
/** |
||||
* 待审批 |
||||
*/ |
||||
private String pendingApprovalCount; |
||||
/** |
||||
* 待归档 |
||||
*/ |
||||
private String toBeArchivedApprovalCount; |
||||
/** |
||||
* 已办 |
||||
*/ |
||||
private String alreadyCount; |
||||
} |
||||
} |
||||
@ -1,361 +0,0 @@
@@ -1,361 +0,0 @@
|
||||
package jnpf.model.dto; |
||||
|
||||
|
||||
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 io.swagger.annotations.ApiModelProperty; |
||||
import io.swagger.v3.oas.annotations.media.Schema; |
||||
import jnpf.entity.Expert; |
||||
import jnpf.entity.LotteryProject; |
||||
import jnpf.entity.LotteryReview; |
||||
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", "中止"), |
||||
ARCHIVIST("3", "已归档"), |
||||
; |
||||
|
||||
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; |
||||
@ApiModelProperty("抽签类型 1-专家 2-公司(默认专家)") |
||||
private String lotteryType = "1"; |
||||
|
||||
|
||||
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; |
||||
|
||||
@ApiModelProperty("抽签类型 1-专家 2-公司(默认专家)") |
||||
private String lotteryType = "1"; |
||||
|
||||
/** |
||||
* 权限控制 |
||||
*/ |
||||
private String menuId = "572406059134626629"; |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class QueryResponse extends LotteryProject { |
||||
@ApiModelProperty("评审列表") |
||||
private List<LotteryReview> lotteryReviewList; |
||||
} |
||||
|
||||
|
||||
@Data |
||||
public static class AddReviewParam { |
||||
@ApiModelProperty("抽签项目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") |
||||
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 |
||||
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 = "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; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue