Browse Source

Merge remote-tracking branch 'origin/dev'

master
yinzuomei 4 years ago
parent
commit
25b387c555
  1. 4
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataMonthlyDao.java
  2. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/dao/evaluationindex/screen/ScreenIndexDataYearlyDao.java
  3. 8
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java
  4. 9
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml
  5. 3
      epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml
  6. 6
      epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql
  7. 2
      epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql

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

@ -47,7 +47,9 @@ public interface ScreenIndexDataMonthlyDao{
* @author zxc
* @date 2020/8/20 9:02 上午
*/
List<MonthBarchartResult> selectMonthBarchart(@Param("agencyId")String agencyId,@Param("monthId") String monthId);
List<MonthBarchartResult> selectMonthBarchart(@Param("agencyId")String agencyId,
@Param("monthId") String monthId,
@Param("customerId")String customerId);
/**
* @param subAgencyIndexRankFormDTO

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

@ -40,7 +40,7 @@ public interface ScreenIndexDataYearlyDao{
* @author zxc
* @date 2020/8/19 3:43 下午
*/
YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId);
YearAverageIndexResultDTO selectYearAverageIndex(@Param("agencyId")String agencyId,@Param("customerId")String customerId);
/**
* 5下级部门指数排行安宁数据段用 -

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

@ -53,7 +53,7 @@ public class IndexServiceImpl implements IndexService {
@DataSource(value = DataSourceConstant.EVALUATION_INDEX,datasourceNameFromArg = true)
@Override
public YearAverageIndexResultDTO yearAverageIndex(YearAverageIndexFormDTO yearAverageIndexFormDTO) {
YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId());
YearAverageIndexResultDTO yearAverageIndexResultDTO = screenIndexDataYearlyDao.selectYearAverageIndex(yearAverageIndexFormDTO.getAgencyId(),yearAverageIndexFormDTO.getCustomerId());
if (null == yearAverageIndexResultDTO){
return new YearAverageIndexResultDTO();
}
@ -119,7 +119,9 @@ public class IndexServiceImpl implements IndexService {
result.setXAxis(partyMemberLeadServiceImpl.getXPro());
}
// 2. 查询近一年的指数值【包括本月】
List<MonthBarchartResult> monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId(),monthBarchartFormDTO.getMonthId());
List<MonthBarchartResult> monthBarchartResults = screenIndexDataMonthlyDao.selectMonthBarchart(monthBarchartFormDTO.getAgencyId(),
monthBarchartFormDTO.getMonthId(),
monthBarchartFormDTO.getCustomerId());
if (monthBarchartResults.size() == NumConstant.ZERO){
for (int i = NumConstant.ZERO; i <= NumConstant.TWELVE; i++) {
serviceAbilityData.add(NumConstant.ZERO_DOT_ZERO);
@ -233,8 +235,10 @@ public class IndexServiceImpl implements IndexService {
subAgencyIndexRankFormDTO.setYearId(String.valueOf(yearId));
List<SubAgencyIndexRankResultDTO> subAgencyIndexRankResultDTOS = new ArrayList<>();
if (StringUtils.isNotEmpty(subAgencyIndexRankFormDTO.getAreaCode())){
//area_code不为空,多客户
subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRankNew(subAgencyIndexRankFormDTO);
}else {
//单客户
subAgencyIndexRankResultDTOS = screenIndexDataMonthlyDao.selectSubAgencyIndexRank(subAgencyIndexRankFormDTO);
}
if (CollectionUtils.isEmpty(subAgencyIndexRankResultDTOS)){

9
epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml

@ -43,6 +43,9 @@
WHERE
del_flag = '0'
AND org_id = #{agencyId}
<if test="customerId != null and customerId != ''">
and customer_id = #{customerId}
</if>
<if test="monthId != null and monthId.trim() != ''">
AND MONTH_ID &lt;= #{monthId}
</if>
@ -64,6 +67,9 @@
AND parent_id = #{agencyId}
AND year_id = #{yearId}
AND ORG_TYPE != 'department'
<if test="customerId != null and customerId != ''">
and customer_id = #{customerId}
</if>
ORDER BY index_total DESC
LIMIT #{topNum}
</select>
@ -327,6 +333,9 @@
AND ca.AREA_CODE LIKE CONCAT(#{areaCode},'%')
AND y.year_id = #{yearId}
AND y.ORG_TYPE != 'department'
<if test="customerId != null and customerId != ''">
and y.customer_id = #{customerId}
</if>
ORDER BY y.index_total DESC
LIMIT #{topNum}
</select>

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

@ -15,6 +15,9 @@
WHERE
del_flag = '0'
AND org_id = #{agencyId}
<if test="customerId != null and customerId != ''">
and customer_id=#{customerId}
</if>
order by year_id desc
limit 1
</select>

6
epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.14__alter_project_location.sql

@ -1,6 +0,0 @@
ALTER TABLE `project`
ADD COLUMN `LOCATE_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位地址[立项项目指的项目发生位置,议题转的项目指的话题发生位置]' AFTER `ORG_ID_PATH`,
ADD COLUMN `LOCATE_LONGITUDE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位经度' AFTER `LOCATE_ADDRESS`,
ADD COLUMN `LOCATE_DIMENSION` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '定位维度' AFTER `LOCATE_LONGITUDE`;

2
epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.15__update_project.sql

@ -1,2 +0,0 @@
update project set locate_address = NULL,locate_longitude = NULL,locate_dimension = NULL;
Loading…
Cancel
Save