|
|
@ -147,6 +147,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
userprojectService.saveFromProject(info, "0");//保存项目联系人信息,0表示当前醒目是主项目
|
|
|
|
uploadfileinfoService.saveFileAndFileInfo(multipartFile, info.getId(), "5"); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void batchImportProjects(MultipartFile multipartFile) throws Exception { |
|
|
|
//是否有文件
|
|
|
@ -270,6 +271,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
userprojectService.saveFromProject(huzhouProjectinfo, "0");//保存联系人
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void approveProjectInfo(ProjectApproveOV projectApproveOV, MultipartFile[] multipartFile) throws IOException { |
|
|
|
String taskId = projectApproveOV.getTaskId(); |
|
|
@ -344,8 +346,6 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public void modifyStageById(String id, String stage) { |
|
|
|
HuzhouProjectinfo byId = getById(id); |
|
|
@ -429,6 +429,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
return projectAndChildInfoPageList; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void batchdownloadProject(HttpServletResponse response, HuzhouProjectinfo projectinfo) { |
|
|
|
//查询主项目的信息
|
|
|
@ -512,9 +513,10 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 暂时无用 |
|
|
|
/** |
|
|
|
* 暂时无用 |
|
|
|
* 查询当前项目是否已经发起流程计划 |
|
|
|
* |
|
|
|
* @param |
|
|
|
* @return 2 计划的审批流程已完成 1 是流程中, 0 是未发起流程 |
|
|
|
*/ |
|
|
@ -811,8 +813,13 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
BigDecimal payCentral = paymentMap != null ? paymentMap.get("centralPayment") : defVal; |
|
|
|
BigDecimal payProvincial = paymentMap != null ? paymentMap.get("provincialPayment") : defVal; |
|
|
|
//补充区级资金、市级资金、自筹资金
|
|
|
|
|
|
|
|
//资金执行率
|
|
|
|
BigDecimal totalCity = totalMap != null ? totalMap.get("cityAcount") : defVal; |
|
|
|
BigDecimal totalCounty = totalMap != null ? totalMap.get("countyAcount") : defVal; |
|
|
|
BigDecimal totalSelf = totalMap != null ? totalMap.get("selfAcount") : defVal; |
|
|
|
BigDecimal payCity = paymentMap != null ? paymentMap.get("cityPayment") : defVal; |
|
|
|
BigDecimal payCounty = paymentMap != null ? paymentMap.get("countyPayment") : defVal; |
|
|
|
BigDecimal paySelf = paymentMap != null ? paymentMap.get("selfPayment") : defVal; |
|
|
|
//合同总资金执行率
|
|
|
|
BigDecimal paymentExecutionRate = new BigDecimal("0.00"); |
|
|
|
if (payAmount.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
paymentExecutionRate = payAmount.divide(totalAmount, 2, RoundingMode.HALF_UP); |
|
|
@ -824,12 +831,46 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
if (superiorFundPayment.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
superiorFundExecutionRate = superiorFundPayment.divide(superiorFundTotal, 2, RoundingMode.HALF_UP); |
|
|
|
} |
|
|
|
//中央资金执行率
|
|
|
|
BigDecimal payCentralExecutionRate = new BigDecimal("0.00"); |
|
|
|
if (payCentral.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
payCentralExecutionRate = payCentral.divide(totalCentral, 2, RoundingMode.HALF_UP); |
|
|
|
} |
|
|
|
//省级资金执行率
|
|
|
|
BigDecimal payProvincialExecutionRate = new BigDecimal("0.00"); |
|
|
|
if (payProvincial.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
payProvincialExecutionRate = payProvincial.divide(totalProvincial, 2, RoundingMode.HALF_UP); |
|
|
|
} |
|
|
|
//市级资金执行率
|
|
|
|
BigDecimal payCityExecutionRate = new BigDecimal("0.00"); |
|
|
|
if (payCity.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
payCityExecutionRate = payCity.divide(totalCity, 2, RoundingMode.HALF_UP); |
|
|
|
} |
|
|
|
//区级资金执行率
|
|
|
|
BigDecimal payCountyExecutionRate = new BigDecimal("0.00"); |
|
|
|
if (payCounty.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
payCountyExecutionRate = payCounty.divide(totalCounty, 2, RoundingMode.HALF_UP); |
|
|
|
} |
|
|
|
//自筹资金执行率
|
|
|
|
BigDecimal paySelfExecutionRate = new BigDecimal("0.00"); |
|
|
|
if (paySelf.compareTo(BigDecimal.ZERO) > 0) { |
|
|
|
paySelfExecutionRate = paySelf.divide(totalSelf, 2, RoundingMode.HALF_UP); |
|
|
|
} |
|
|
|
|
|
|
|
result = NewFundOV.builder().totalMoney(String.valueOf(totalAmount)).payAmount(String.valueOf(payAmount)) |
|
|
|
.totalCentral(String.valueOf(totalCentral)).payCentral(String.valueOf(payCentral)) |
|
|
|
.totalProvincial(String.valueOf(totalProvincial)).payProvincial(String.valueOf(payProvincial)) |
|
|
|
.totalCity(String.valueOf(totalCity)).payCity(String.valueOf(payCity)) |
|
|
|
.totalCounty(String.valueOf(totalCounty)).payCounty(String.valueOf(payCounty)) |
|
|
|
.totalSelf(String.valueOf(totalSelf)).paySelf(String.valueOf(paySelf)) |
|
|
|
.paymentExecutionRate(String.valueOf(paymentExecutionRate)) |
|
|
|
.superiorFundExecutionRate(String.valueOf(superiorFundExecutionRate)).build(); |
|
|
|
.superiorFundExecutionRate(String.valueOf(superiorFundExecutionRate)) |
|
|
|
.payCentralExecutionRate(String.valueOf(payCentralExecutionRate)) |
|
|
|
.payProvincialExecutionRate(String.valueOf(payProvincialExecutionRate)) |
|
|
|
.payCityExecutionRate(String.valueOf(payCityExecutionRate)) |
|
|
|
.payCountyExecutionRate(String.valueOf(payCountyExecutionRate)) |
|
|
|
.paySelfExecutionRate(String.valueOf(paySelfExecutionRate)) |
|
|
|
.build(); |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
@ -897,6 +938,7 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
result.setSize(pageSorted.getSize()).setCurrent(pageSorted.getCurrent()).setRecords(newRecords).setTotal(pageSorted.getTotal()); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public IPage<ProjectPageResponse> getProjectPage(HuzhouProjectinfo projectInfo, Integer pageNo, Integer pageSize, String orderBy, String orderDir) { |
|
|
|
Page page = new Page(pageNo, pageSize); |
|
|
@ -935,21 +977,59 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<CountByConditionOV> countByReformName(String reformName) { |
|
|
|
public CountByConditionOV countByReformName(String reformName) { |
|
|
|
HuzhouProjectinfo projectInfo = new HuzhouProjectinfo(); |
|
|
|
ProjectInfoAuthSelect projectInfoAuthSelect = CommonUtils.setGetProjectInfoAuth(projectInfo); |
|
|
|
List<HuzhouProjectinfoOV> projectinfoOVList= projectinfoMapper.getListByCondition(projectInfoAuthSelect,reformName); |
|
|
|
List<HuzhouProjectinfoOV> projectinfoOVList = projectinfoMapper.getProjectAndChildInfoPageList(projectInfoAuthSelect); |
|
|
|
List<String> allProjectIds = projectinfoOVList.stream().map(x -> x.getId()).collect(Collectors.toList()); |
|
|
|
Map<String, List<HuzhouProjectinfoOV>> reformMap = projectinfoOVList.stream().collect(Collectors.groupingBy(HuzhouProjectinfo::getReformName)); |
|
|
|
//总进度(待补充)
|
|
|
|
List<ProjectProgressOV> progressResponse = new ArrayList<>(); |
|
|
|
List<FundByConditionOV> fundByConditionResponse = new ArrayList<>(); |
|
|
|
for (String key : reformMap.keySet()) { |
|
|
|
List<String> keyProjectIdsList = reformMap.get(key).stream().map(x -> x.getId()).collect(Collectors.toList()); |
|
|
|
//进度
|
|
|
|
ProjectProgressOV progress = this.getProgress(keyProjectIdsList); |
|
|
|
progressResponse.add(ProjectProgressOV.builder().name(key).projectProgress(String.valueOf(progress.getProjectProgress())).build()); |
|
|
|
|
|
|
|
//所属改革总金额、执行率、上级资金执行率
|
|
|
|
NewFundOV fund = this.getFund(keyProjectIdsList); |
|
|
|
//各种类资金总额和执行率,from fund
|
|
|
|
fundByConditionResponse.add(FundByConditionOV.builder().name(key).totalMoney(fund.getTotalMoney()) |
|
|
|
.paymentExecutionRate(fund.getPaymentExecutionRate()) |
|
|
|
.superiorFundExecutionRate(fund.getSuperiorFundExecutionRate()).build()); |
|
|
|
} |
|
|
|
return null; |
|
|
|
//各种类资金总额和执行率,from fund
|
|
|
|
NewFundOV totalFund = this.getFund(allProjectIds); |
|
|
|
FundByKindOV fundByTypeResponse = FundByKindOV.builder().totalMoney(totalFund.getTotalMoney()).payAmount(totalFund.getPayAmount()) |
|
|
|
.paymentExecutionRate(totalFund.getPaymentExecutionRate()) |
|
|
|
.totalCentral(totalFund.getTotalCentral()).payCentral(totalFund.getPayCentral()) |
|
|
|
.payCentralExecutionRate(totalFund.getPayCentralExecutionRate()) |
|
|
|
.totalProvincial(totalFund.getTotalProvincial()).payProvincial(totalFund.getPayProvincial()) |
|
|
|
.payProvincialExecutionRate(totalFund.getPayProvincialExecutionRate()) |
|
|
|
.totalCity(totalFund.getTotalCity()).payCity(totalFund.getPayCity()) |
|
|
|
.payCityExecutionRate(totalFund.getPayCityExecutionRate()) |
|
|
|
.totalCounty(totalFund.getTotalCounty()).payCounty(totalFund.getPayCounty()) |
|
|
|
.payCountyExecutionRate(totalFund.getPayCountyExecutionRate()) |
|
|
|
.totalSelf(totalFund.getTotalSelf()).paySelf(totalFund.getPaySelf()) |
|
|
|
.paySelfExecutionRate(totalFund.getPaySelfExecutionRate()) |
|
|
|
.build(); |
|
|
|
|
|
|
|
CountByConditionOV result = CountByConditionOV.builder().progress(progressResponse) |
|
|
|
.countFundByCondition(fundByConditionResponse).countFundByFundType(fundByTypeResponse).build(); |
|
|
|
return result; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
public Map<String,String> countNumByPlan(){ |
|
|
|
List<String> planName=new ArrayList<>(); |
|
|
|
planName.add("合同签订"); |
|
|
|
planName.add("终验阶段"); |
|
|
|
HuzhouProjectinfo projectInfo = new HuzhouProjectinfo(); |
|
|
|
ProjectInfoAuthSelect projectInfoAuthSelect = CommonUtils.setGetProjectInfoAuth(projectInfo); |
|
|
|
List<HuzhouProjectinfoOV> projectinfoOVList = projectinfoMapper.getProjectAndChildInfoPageList(projectInfoAuthSelect); |
|
|
|
List<String> projectIds = projectinfoOVList.stream().map(x -> x.getId()).collect(Collectors.toList()); |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|