Browse Source

Merge remote-tracking branch 'remotes/origin/dev'

dev_shibei_match
jianjun 4 years ago
parent
commit
81d63b6abd
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
  2. 7
      epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java
  3. 3
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java
  4. 6
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java
  5. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java

@ -40,6 +40,7 @@ public interface NumConstant {
int FIFTY_ONE = 51; int FIFTY_ONE = 51;
int SIXTY = 60; int SIXTY = 60;
int ONE_HUNDRED = 100; int ONE_HUNDRED = 100;
int TWO_HUNDRED = 200;
BigDecimal ONE_HUNDRED_DECIMAL = new BigDecimal(100); BigDecimal ONE_HUNDRED_DECIMAL = new BigDecimal(100);
BigDecimal ZERO_DECIMAL = new BigDecimal(0); BigDecimal ZERO_DECIMAL = new BigDecimal(0);
int ONE_THOUSAND = 1000; int ONE_THOUSAND = 1000;

7
epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/form/ScreenProjectDistributionFormDTO.java

@ -31,10 +31,17 @@ public class ScreenProjectDistributionFormDTO implements Serializable {
@NotBlank(message = "agencyId不能为空") @NotBlank(message = "agencyId不能为空")
private String agencyId; private String agencyId;
/**
* 显示条数
*/
private Integer pageSize;
/* *//** /* *//**
* 不必填默认查询的是处理中可选值all: 全部pending处理中 已结案closed_case 已关闭closed * 不必填默认查询的是处理中可选值all: 全部pending处理中 已结案closed_case 已关闭closed
* 默认查询pending * 默认查询pending
*//* *//*
private String status;*/ private String status;*/
} }

3
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenProjectDataDao.java

@ -12,7 +12,8 @@ public interface ScreenProjectDataDao {
List<ScreenProjectDistributionResultDTO> projectDistribution(@Param("agencyId") String agencyId, List<ScreenProjectDistributionResultDTO> projectDistribution(@Param("agencyId") String agencyId,
@Param("ids") List<String> ids, @Param("ids") List<String> ids,
@Param("level") String level); @Param("level") String level,
@Param("pageSize") Integer pageSize);
List<String> selectIdsByAreaCode(@Param("areaCode") String areaCode); List<String> selectIdsByAreaCode(@Param("areaCode") String areaCode);

6
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/ScreenProjectServiceImpl.java

@ -1,6 +1,7 @@
package com.epmet.datareport.service.evaluationindex.screen.impl; package com.epmet.datareport.service.evaluationindex.screen.impl;
import com.epmet.commons.dynamic.datasource.annotation.DataSource; import com.epmet.commons.dynamic.datasource.annotation.DataSource;
import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao; import com.epmet.datareport.dao.evaluationindex.screen.ScreenEventDataDao;
@ -77,7 +78,10 @@ public class ScreenProjectServiceImpl implements ScreenProjectService {
if (StringUtils.isNotBlank(formDTO.getAreaCode())){ if (StringUtils.isNotBlank(formDTO.getAreaCode())){
areaIds = screenProjectDataDao.selectIdsByAreaCode(formDTO.getAreaCode()); areaIds = screenProjectDataDao.selectIdsByAreaCode(formDTO.getAreaCode());
} }
List<ScreenProjectDistributionResultDTO> resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel()); if (formDTO.getPageSize() == null){
formDTO.setPageSize(NumConstant.TWO_HUNDRED);
}
List<ScreenProjectDistributionResultDTO> resultDTOS = screenProjectDataDao.projectDistribution(formDTO.getAgencyId(),areaIds,formDTO.getLevel(),formDTO.getPageSize());
return new Result().ok(resultDTOS); return new Result().ok(resultDTOS);
} }

3
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenProjectDataDao.xml

@ -46,6 +46,9 @@
</otherwise> </otherwise>
</choose> </choose>
order by PROJECT_CREATE_TIME desc order by PROJECT_CREATE_TIME desc
<if test='level != null and "3" == level'>
LIMIT #{pageSize}
</if>
</select> </select>
<select id="selectIdsByAreaCode" resultType="java.lang.String"> <select id="selectIdsByAreaCode" resultType="java.lang.String">
select agency_id as id from screen_customer_agency where del_flag = '0' and area_code like concat(#{areaCode},'%') select agency_id as id from screen_customer_agency where del_flag = '0' and area_code like concat(#{areaCode},'%')

Loading…
Cancel
Save