Browse Source

看板1.4

master
Jinyuanyuan 5 months ago
parent
commit
c801508a17
  1. 4
      huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/HuzhouProjectController.java
  2. 2
      huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/HuzhouPlaninfoMapper.java
  3. 6
      huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/mapping/HuzhouContractinfoMapper.xml
  4. 3
      huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/mapping/HuzhouPlaninfoMapper.xml
  5. 2
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/IHuzhouProjectinfoService.java
  6. 102
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java
  7. 16
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/CountByConditionOV.java
  8. 21
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/FundByConditionOV.java
  9. 42
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/FundByKindOV.java
  10. 21
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/NewFundOV.java
  11. 2
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ProjectFoundOV.java
  12. 2
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ProjectProgressOV.java

4
huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/HuzhouProjectController.java

@ -215,7 +215,9 @@ public class HuzhouProjectController {
}
@GetMapping("/countByTask")
public Result<?> countByTask(){
return null;
String a="reform_name";
CountByConditionOV result = projectinfoService.countByReformName(a);
return Result.ok(result);
}

2
huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/HuzhouPlaninfoMapper.java

@ -9,4 +9,6 @@ import java.util.List;
public interface HuzhouPlaninfoMapper extends BaseMapper<HuzhouPlaninfo> {
List<HuzhouPlaninfo> getChildTaskBySuperior(@Param("info") HuzhouPlaninfo info);
Integer getNumByPlan(@Param("info") HuzhouPlaninfo info);
}

6
huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/mapping/HuzhouContractinfoMapper.xml

@ -266,9 +266,9 @@
select sum(total_money) as totalAcount,
sum(central_money) as centralAcount,
sum(provincial_money) as provincialAcount,
sum(city_money) as cityMoney,
sum(county_money) as countyMoney,
sum(self_money) as selfMoney from huzhou_contractinfo
sum(city_money) as cityAcount,
sum(county_money) as countyAcount,
sum(self_money) as selfAcount from huzhou_contractinfo
where project_id in
<foreach item="projectId" index="index" collection="projectIds" open="(" separator="," close=")">
#{projectId}

3
huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/mapping/HuzhouPlaninfoMapper.xml

@ -4,4 +4,7 @@
<select id="getChildTaskBySuperior" parameterType="com.easy.admin.modules.huzhou.entity.HuzhouPlaninfo" resultType="com.easy.admin.modules.huzhou.entity.HuzhouPlaninfo">
select * from huzhou_planinfo where superior = #{info.taskLevel} and project_id = #{info.projectId} order by INET_ATON(CONCAT(task_level, '.0'))
</select>
<select id="getNumByPlan" resultType="java.lang.Integer">
select count(*) from huzhou_planinfo where project_id#{projectId} and task_name=#{taskName}
</select>
</mapper>

2
huzhou/src/main/java/com/easy/admin/modules/huzhou/service/IHuzhouProjectinfoService.java

@ -173,7 +173,7 @@ public interface IHuzhouProjectinfoService extends IService<HuzhouProjectinfo> {
IPage<ProjectPageResponse> getProjectPage(HuzhouProjectinfo projectInfo, Integer pageNo, Integer pageSize,String orderBy,String orderDir);
List<CountByConditionOV> countByReformName(String reformName);
CountByConditionOV countByReformName(String reformName);
}

102
huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java

@ -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;
}
}

16
huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/CountByConditionOV.java

@ -1,17 +1,27 @@
package com.easy.admin.modules.huzhou.vo;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;
import java.util.List;
@Data
@Accessors(chain = true)
@Builder(toBuilder = true)
public class CountByConditionOV {
private String totalProgress;
List<ProjectStatusOV> progress;
List<ProjectProgressOV> progress;
List<ProjecFoundOV> countFundByFundType;
List<FundByConditionOV> countFundByCondition;
List<ProjecFoundOV> countFundByCondition;
FundByKindOV countFundByFundType;
}

21
huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/FundByConditionOV.java

@ -0,0 +1,21 @@
package com.easy.admin.modules.huzhou.vo;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@Builder(toBuilder = true)
public class FundByConditionOV {
private String name;
private String totalMoney;
private String paymentExecutionRate;
private String superiorFundExecutionRate;
}

42
huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/FundByKindOV.java

@ -0,0 +1,42 @@
package com.easy.admin.modules.huzhou.vo;
import lombok.Builder;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@Builder(toBuilder = true)
public class FundByKindOV {
private String totalMoney;
private String totalCentral;
private String totalProvincial;
private String totalCity;
private String totalCounty;
private String totalSelf;
private String payAmount;
private String payCentral;
private String payProvincial;
private String payCity;
private String payCounty;
private String paySelf;
private String paymentExecutionRate;
private String payCentralExecutionRate;
private String payProvincialExecutionRate;
private String payCityExecutionRate;
private String payCountyExecutionRate;
private String paySelfExecutionRate;
}

21
huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/NewFundOV.java

@ -12,14 +12,35 @@ import java.math.BigDecimal;
public class NewFundOV {
private String name;
private String totalMoney;
private String totalCentral;
private String totalProvincial;
private String totalCity;
private String totalCounty;
private String totalSelf;
private String payAmount;
private String payCentral;
private String payProvincial;
private String payCity;
private String payCounty;
private String paySelf;
private String paymentExecutionRate;
private String superiorFundExecutionRate;
private String payCentralExecutionRate;
private String payProvincialExecutionRate;
private String payCityExecutionRate;
private String payCountyExecutionRate;
private String paySelfExecutionRate;
}

2
huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ProjecFoundOV.java → huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ProjectFoundOV.java

@ -8,7 +8,7 @@ import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
@Builder(toBuilder = true)
public class ProjecFoundOV {
public class ProjectFoundOV {
private String name;
private String total;
private String paymentExecutionRate;

2
huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ProjectProgressOV.java

@ -8,6 +8,8 @@ import lombok.experimental.Accessors;
@Accessors(chain = true)
@Builder(toBuilder = true)
public class ProjectProgressOV {
private String name;
private Integer fininshNum;
private Integer unfininshNum;

Loading…
Cancel
Save