Browse Source

暂存

dev_shibei_match
yinzuomei 5 years ago
parent
commit
e7866cd5f1
  1. 1
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java
  2. 28
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java
  3. 1
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java
  4. 116
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java
  5. 19
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/screen/ScreenCustomerGridDao.java
  6. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java
  7. 39
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java
  8. 23
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/screen/ScreenCustomerGridDao.xml

1
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CalculateCommonFormDTO.java

@ -12,6 +12,7 @@ import java.io.Serializable;
*/
@Data
public class CalculateCommonFormDTO implements Serializable {
private static final long serialVersionUID = -5689788391963427717L;
/**
* 月份id: yyyyMM
*/

28
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/CustomerGridInfoDTO.java

@ -0,0 +1,28 @@
package com.epmet.dto.indexcal;
import com.epmet.dto.ScreenCustomerGridDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* 客户下所有网格
*
* @author yinzuomei@elink-cn.com
* @date 2020/8/26 13:45
*/
@Data
public class CustomerGridInfoDTO implements Serializable {
private static final long serialVersionUID = -3211409107659568304L;
/**
* 网格总数
*/
private Integer total;
/**
* 网格列表
*/
private List<ScreenCustomerGridDTO> gridList;
}

1
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/indexcal/ExtremeValueCommonDTO.java

@ -14,6 +14,7 @@ import java.math.BigDecimal;
@Data
public class ExtremeValueCommonDTO implements Serializable {
private static final long serialVersionUID = -6295067080250068024L;
/**
* 最小值
*/

116
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/screen/ScreenCustomerGridDTO.java

@ -0,0 +1,116 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 网格(党支部)信息
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2020-08-26
*/
@Data
public class ScreenCustomerGridDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键ID 主键ID
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 网格id
*/
private String gridId;
/**
* 组织名称
*/
private String gridName;
/**
* 网格所属组织id
*/
private String parentAgencyId;
/**
* 坐标区域
*/
private String areaMarks;
/**
* 中心点位
*/
private String centerMark;
/**
* 党支部=网格的位置
*/
private String partyMark;
/**
* 删除标识 0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
* 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增)
*/
private String dataEndTime;
/**
* 所有上级ID用英文逗号分开
*/
private String allParentIds;
}

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

@ -18,6 +18,7 @@
package com.epmet.dao.screen;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.screencoll.form.CustomerGridFormDTO;
import com.epmet.entity.screen.ScreenCustomerGridEntity;
import org.apache.ibatis.annotations.Mapper;
@ -55,4 +56,22 @@ public interface ScreenCustomerGridDao extends BaseDao<ScreenCustomerGridEntity>
* @Date 10:52 2020-08-18
**/
void batchInsertCustomerGrid(@Param("list") List<CustomerGridFormDTO> list, @Param("customerId")String customerId);
/**
* @return java.lang.Integer
* @param customerId
* @author yinzuomei
* @description 查询客户下网格总数
* @Date 2020/8/26 15:33
**/
Integer selectCountByCustomerId(@Param("customerId") String customerId);
/**
* @return java.util.List<com.epmet.dto.ScreenCustomerGridDTO>
* @param customerId
* @author yinzuomei
* @description 查询客户下网格信息
* @Date 2020/8/26 15:33
**/
List<ScreenCustomerGridDTO> selectListByCustomerId(@Param("customerId")String customerId);
}

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/GridCorreLationService.java

@ -1,5 +1,6 @@
package com.epmet.service.indexcal;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
/**

39
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/indexcal/impl/GridCorreLationServiceImpl.java

@ -1,7 +1,18 @@
package com.epmet.service.indexcal.impl;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.indexcoll.FactIndexGovrnAblityGridMonthlyDao;
import com.epmet.dao.indexcoll.FactIndexPartyAblityGridMonthlyDao;
import com.epmet.dao.indexcoll.FactIndexServiceAblityGridMonthlyDao;
import com.epmet.dao.screen.ScreenCustomerGridDao;
import com.epmet.dto.ScreenCustomerGridDTO;
import com.epmet.dto.indexcal.CalculateCommonFormDTO;
import com.epmet.dto.indexcal.CustomerGridInfoDTO;
import com.epmet.service.indexcal.GridCorreLationService;
import io.swagger.annotations.Authorization;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
@ -12,6 +23,16 @@ import org.springframework.stereotype.Service;
*/
@Service
public class GridCorreLationServiceImpl implements GridCorreLationService {
private Logger logger = LogManager.getLogger(GridCorreLationServiceImpl.class);
@Autowired
private FactIndexGovrnAblityGridMonthlyDao factIndexGovrnAblityGridMonthlyDao;
@Autowired
private FactIndexPartyAblityGridMonthlyDao factIndexPartyAblityGridMonthlyDao;
@Autowired
private FactIndexServiceAblityGridMonthlyDao factIndexServiceAblityGridMonthlyDao;
@Autowired
private ScreenCustomerGridDao screenCustomerGridDao;
/**
* @param formDTO
@ -22,6 +43,22 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
**/
@Override
public Boolean calculateGridCorreLation(CalculateCommonFormDTO formDTO) {
return null;
return true;
}
/**
* @return com.epmet.dto.indexcal.CustomerGridInfoDTO
* @param customerId
* @author yinzuomei
* @description 查询客户下网格信息
* @Date 2020/8/26 15:37
**/
public CustomerGridInfoDTO queryCustomerGridInfo(String customerId){
CustomerGridInfoDTO customerGridInfoDTO=new CustomerGridInfoDTO();
customerGridInfoDTO.setTotal(screenCustomerGridDao.selectCountByCustomerId(customerId));
customerGridInfoDTO.setGridList(screenCustomerGridDao.selectListByCustomerId(customerId));
return customerGridInfoDTO;
}
}

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

@ -52,4 +52,27 @@
</foreach>
</insert>
<!-- 查询客户下网格总数 -->
<select id="selectCountByCustomerId" parameterType="map" resultType="java.lang.Integer">
SELECT
count( GRID_ID ) AS total
FROM
screen_customer_grid m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID =#{customerId}
</select>
<!-- 查询客户下网格信息 -->
<select id="selectListByCustomerId" parameterType="map" resultType="com.epmet.dto.ScreenCustomerGridDTO">
SELECT
m.GRID_ID,
m.CUSTOMER_ID,
m.GRID_NAME
FROM
screen_customer_grid m
WHERE
m.DEL_FLAG = '0'
AND m.CUSTOMER_ID = #{customerId}
</select>
</mapper>

Loading…
Cancel
Save