Browse Source

网格党建能力查询数据库修改

master
zxc 5 years ago
parent
commit
38176bc886
  1. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java
  2. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java
  3. 5
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java
  4. 9
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java
  5. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java
  6. 13
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml
  7. 13
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.java

@ -111,13 +111,6 @@ public interface FactIndexGovrnAblityGridMonthlyDao extends BaseDao<FactIndexGov
* @date 2020/9/18 10:47 上午
*/
List<GovernAbilityGridMonthlyFormDTO> selectAllGridInfo(String customerId);
/**
* @Description 查询全部网格信息
* @param customerId
* @author zxc
* @date 2020/9/19 10:50 上午
*/
List<PartyAbilityGridMonthlyFormDTO> selectAllGridInfoToParty(String customerId);
/**
* @Description 批量插入治理能力

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/screen/ScreenCustomerGridDao.java

@ -19,6 +19,7 @@ package com.epmet.dao.evaluationindex.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
import com.epmet.dto.extract.result.GridInfoResultDTO;
import com.epmet.dto.extract.result.OrgNameResultDTO;
@ -156,4 +157,12 @@ public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity>
* @date 2020/9/24 2:33 下午
*/
List<GridInfoResultDTO> selectDirectGrid(@Param("agencyIds") List<String> agencyIds);
/**
* @Description 查询全部网格信息
* @param customerId
* @author zxc
* @date 2020/9/19 10:50 上午
*/
List<PartyAbilityGridMonthlyFormDTO> selectAllGridInfoToParty(String customerId);
}

5
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

@ -15,6 +15,7 @@ import com.epmet.service.evaluationindex.extract.todata.*;
import com.epmet.service.evaluationindex.indexcoll.FactIndexGovrnAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexPartyAblityOrgMonthlyService;
import com.epmet.service.evaluationindex.indexcoll.FactIndexServiceAblityGridMonthlyService;
import com.epmet.service.evaluationindex.screen.ScreenCustomerGridService;
import com.epmet.service.heart.ActInfoService;
import com.epmet.service.partymember.PartyMemberService;
import com.epmet.service.stats.FactArticlePublishedGridDailyService;
@ -74,6 +75,8 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
private UserService userService;
@Autowired
private PartyMemberService partyMemberService;
@Autowired
private ScreenCustomerGridService gridService;
/**
* @Description 计算网格指标党建能力
@ -84,7 +87,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
*/
@Override
public Boolean calGridIndexPartyAbility(String customerId, String monthId) {
List<PartyAbilityGridMonthlyFormDTO> result = governAbilityDao.selectAllGridInfoToParty(customerId);
List<PartyAbilityGridMonthlyFormDTO> result = gridService.selectAllGridInfoToParty(customerId);
if (CollectionUtils.isEmpty(result)){
log.warn(String.format(ExtractConstant.CUSTOMER_INFO_NULL,customerId));
return true;

9
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/ScreenCustomerGridService.java

@ -19,6 +19,7 @@ package com.epmet.service.evaluationindex.screen;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
import com.epmet.dto.extract.result.GridInfoResultDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
@ -55,4 +56,12 @@ public interface ScreenCustomerGridService extends BaseService<ScreenCustomerGri
* @date 2020/9/24 2:33 下午
*/
List<GridInfoResultDTO> selectDirectGrid(List<String> agencyIds);
/**
* @Description 查询全部网格信息
* @param customerId
* @author zxc
* @date 2020/9/19 10:50 上午
*/
List<PartyAbilityGridMonthlyFormDTO> selectAllGridInfoToParty(String customerId);
}

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerGridServiceImpl.java

@ -24,6 +24,7 @@ import com.epmet.commons.tools.utils.DateUtils;
import com.epmet.constant.DataSourceConstant;
import com.epmet.constant.OrgSourceTypeConstant;
import com.epmet.dao.evaluationindex.screen.ScreenCustomerGridDao;
import com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO;
import com.epmet.dto.extract.form.PartyBaseInfoFormDTO;
import com.epmet.dto.extract.result.GridInfoResultDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerGridEntity;
@ -119,4 +120,15 @@ public class ScreenCustomerGridServiceImpl extends BaseServiceImpl<ScreenCustome
}
return new ArrayList<>();
}
/**
* @Description 查询全部网格信息
* @param customerId
* @author zxc
* @date 2020/9/19 10:50 上午
*/
@Override
public List<PartyAbilityGridMonthlyFormDTO> selectAllGridInfoToParty(String customerId) {
return screenCustomerGridDao.selectAllGridInfoToParty(customerId);
}
}

13
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/indexcoll/FactIndexGovrnAblityGridMonthlyDao.xml

@ -175,19 +175,6 @@
AND CUSTOMER_ID = #{customerId}
</select>
<!-- 查询全部网格信息 -->
<select id="selectAllGridInfoToParty" resultType="com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO">
SELECT
scg.CUSTOMER_ID,
scg.GRID_ID,
scg.PARENT_AGENCY_ID AS agencyId
FROM
screen_customer_grid scg
WHERE
DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId}
</select>
<!-- 批量插入治理能力 -->
<insert id="insertGovernAbilityRecord">
INSERT INTO fact_index_govrn_ablity_grid_monthly (

13
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerGridDao.xml

@ -270,4 +270,17 @@
</foreach>
)
</select>
<!-- 查询全部网格信息 -->
<select id="selectAllGridInfoToParty" resultType="com.epmet.dto.extract.form.PartyAbilityGridMonthlyFormDTO">
SELECT
scg.CUSTOMER_ID,
scg.GRID_ID,
scg.PARENT_AGENCY_ID AS agencyId
FROM
screen_customer_grid scg
WHERE
DEL_FLAG = 0
AND CUSTOMER_ID = #{customerId}
</select>
</mapper>

Loading…
Cancel
Save