Browse Source

看板1.3.1

master
uu 5 months ago
parent
commit
26d91ec0b4
  1. 12
      huzhou/src/main/java/com/easy/admin/modules/huzhou/controller/HuzhouProjectController.java
  2. 1
      huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/HuzhouProjectinfoMapper.java
  3. 10
      huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/mapping/HuzhouContractinfoMapper.xml
  4. 31
      huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/mapping/HuzhouProjectinfoMapper.xml
  5. 2
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/IHuzhouProjectinfoService.java
  6. 18
      huzhou/src/main/java/com/easy/admin/modules/huzhou/service/impl/HuzhouProjectinfoServiceImpl.java
  7. 12
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/CountByConditionOV.java
  8. 17
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/DimensionPageOV.java
  9. 16
      huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/ProjecFoundOV.java

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

@ -23,6 +23,7 @@ import java.time.LocalDate;
import java.time.ZoneId;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import java.util.List;
@RestController
@ -212,14 +213,9 @@ public class HuzhouProjectController {
IPage<ProjectPageResponse> projectPage = projectinfoService.getProjectPage(projectInfo, pageNo, pageSize, orderBy, orderDir);
return Result.OK(projectPage);
}
@GetMapping("/countByCondition")
public Result<?> countByCondition(HuzhouProjectinfo projectInfo,
@RequestParam(name="current", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
@RequestParam(name="orderBy", defaultValue="duty_workplace") String orderBy,
@RequestParam(name="orderDir", defaultValue="desc") String orderDir){
IPage<ProjectPageResponse> projectPage = projectinfoService.getProjectPage(projectInfo, pageNo, pageSize, orderBy, orderDir);
return Result.OK(projectPage);
@GetMapping("/countByTask")
public Result<?> countByTask(){
return null;
}

1
huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/HuzhouProjectinfoMapper.java

@ -65,4 +65,5 @@ public interface HuzhouProjectinfoMapper extends BaseMapper<HuzhouProjectinfo> {
*/
IPage<ProjectPageOV> getProjectPageSorted(Page page, @Param("info") HuzhouProjectinfo info, @Param("orderBy") String orderBy, @Param("orderDir") String orderDir);
List<HuzhouProjectinfoOV> getListByCondition(@Param("info") HuzhouProjectinfo info,@Param("condition") String condition);
}

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

@ -252,7 +252,10 @@
<select id="getPaymentsByProjectIds" resultType="map">
select sum(a.total_money) as totalPayment,
sum(a.central_money) as centralPayment,
sum(a.provincial_money) as provincialPayment from huzhou_contractinfo a left join huzhou_planinfo b
sum(a.provincial_money) as provincialPayment,
sum(city_money) as cityPayment,
sum(county_money) as countyPayment,
sum(self_money) as selfPayment from huzhou_contractinfo a left join huzhou_planinfo b
on (a.project_id = b.project_id AND a.task_name = b.task_name) where a.project_id in
<foreach item="projectId" index="index" collection="projectIds" open="(" separator="," close=")">
#{projectId}
@ -262,7 +265,10 @@
<select id="getTotalByProjectIds" resultType="map">
select sum(total_money) as totalAcount,
sum(central_money) as centralAcount,
sum(provincial_money) as provincialAcount from huzhou_contractinfo
sum(provincial_money) as provincialAcount,
sum(city_money) as cityMoney,
sum(county_money) as countyMoney,
sum(self_money) as selfMoney from huzhou_contractinfo
where project_id in
<foreach item="projectId" index="index" collection="projectIds" open="(" separator="," close=")">
#{projectId}

31
huzhou/src/main/java/com/easy/admin/modules/huzhou/dao/mapping/HuzhouProjectinfoMapper.xml

@ -308,42 +308,15 @@ order by create_date desc
</where>
order by ${orderBy} ${orderDir}
</select>
<select id="getDimensionPageSortedByCondition" resultMap="dimensionPageMap" parameterType="com.easy.admin.modules.huzhou.entity.HuzhouProjectinfo">
SELECT duty_workplace as dutyWorkplace,admin_division as adminDivision,workplace_properties as workplaceProperties,super_leader as superLeader,
sum(total_money) as totalMoney,
sum(central_money) as centralMoney,
sum(provincial_money) as provincialMoney from huzhou_projectinfo
<select id="getListByCondition" resultMap="HuzhouProjectinfoMap">
SELECT SELECT * from huzhou_projectinfo u
<where>
<include refid="selectAuthSql"/>
<if test="info.projectName!=null and info.projectName!=''">
<bind name="tempStr" value="'%' + info.projectName + '%'" />
and project_name like #{tempStr}
</if>
<if test="info.adminDivision!=null and info.adminDivision!=''">
<bind name="tempStr" value="'%' + info.adminDivision + '%'" />
and admin_division like #{tempStr}
</if>
<if test="info.dutyWorkplace!=null and info.dutyWorkplace!=''">
<bind name="tempStr" value="'%' + info.dutyWorkplace + '%'" />
and duty_workplace like #{tempStr}
</if>
<if test="info.workplaceProperties!=null and info.workplaceProperties!=''">
<bind name="tempStr" value="'%' + info.workplaceProperties + '%'" />
and workplace_properties like #{tempStr}
</if>
<if test="info.dutyWorkplace!=null and info.dutyWorkplace!=''">
<bind name="tempStr" value="'%' + info.dutyWorkplace + '%'" />
and duty_workplace like #{tempStr}
</if>
<if test="info.reformName!=null and info.reformName!=''">
and reform_name = #{info.reformName}
</if>
<if test="info.superLeader!=null and info.superLeader!=''">
and super_leader = #{info.superLeader}
</if>
</where>
group by ${condition}
order by ${orderBy} ${orderDir}
</select>
</mapper>

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

@ -173,5 +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);
}

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

@ -810,6 +810,8 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM
BigDecimal payAmount = paymentMap != null?paymentMap.get("totalPayment"):defVal;
BigDecimal payCentral = paymentMap != null?paymentMap.get("centralPayment"):defVal;
BigDecimal payProvincial = paymentMap != null?paymentMap.get("provincialPayment"):defVal;
//补充区级资金、市级资金、自筹资金
//资金执行率
BigDecimal paymentExecutionRate=new BigDecimal("0.00");
if(payAmount.compareTo(BigDecimal.ZERO) > 0){
@ -932,6 +934,22 @@ public class HuzhouProjectinfoServiceImpl extends ServiceImpl<HuzhouProjectinfoM
return result;
}
@Override
public List<CountByConditionOV> countByReformName(String reformName) {
HuzhouProjectinfo projectInfo = new HuzhouProjectinfo();
ProjectInfoAuthSelect projectInfoAuthSelect = CommonUtils.setGetProjectInfoAuth(projectInfo);
List<HuzhouProjectinfoOV> projectinfoOVList= projectinfoMapper.getListByCondition(projectInfoAuthSelect,reformName);
Map<String, List<HuzhouProjectinfoOV>> reformMap = projectinfoOVList.stream().collect(Collectors.groupingBy(HuzhouProjectinfo::getReformName));
for (String key:reformMap.keySet()){
List<String> keyProjectIdsList = reformMap.get(key).stream().map(x -> x.getId()).collect(Collectors.toList());
//进度
ProjectProgressOV progress = this.getProgress(keyProjectIdsList);
//所属改革总金额、执行率、上级资金执行率
NewFundOV fund = this.getFund(keyProjectIdsList);
//各种类资金总额和执行率,from fund
}
return null;
}
}

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

@ -1,7 +1,17 @@
package com.easy.admin.modules.huzhou.vo;
import java.util.List;
public class CountByConditionOV {
private String progress;
private String totalProgress;
List<ProjectStatusOV> progress;
List<ProjecFoundOV> countFundByFundType;
List<ProjecFoundOV> countFundByCondition;
}

17
huzhou/src/main/java/com/easy/admin/modules/huzhou/vo/DimensionPageOV.java

@ -51,6 +51,23 @@ public class DimensionPageOV {
*/
private Double provincialMoney;
// /**
// * 市级资金
// */
// private Double cityMoney;
//
// /**
// * 区级资金
// */
// private Double countyMoney;
//
// /**
// * 自筹资金
// */
// private Double selfMoney;
// /**
// * 合同支付执行率
// */

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

@ -0,0 +1,16 @@
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 ProjecFoundOV {
private String name;
private String total;
private String paymentExecutionRate;
private String superiorFundExecutionRate;
}
Loading…
Cancel
Save