Browse Source

组织、网格、人员基础信息方法模板

dev_shibei_match
sunyuchao 4 years ago
parent
commit
782fff7245
  1. 2
      epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridBaseInfoFormDTO.java
  2. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java
  3. 8
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java
  4. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java
  5. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java
  6. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java
  7. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java
  8. 12
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java
  9. 11
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java
  10. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java
  11. 10
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java
  12. 13
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml
  13. 14
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml
  14. 13
      epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml

2
epmet-module/data-statistical/data-statistical-client/src/main/java/com/epmet/dto/org/GridBaseInfoFormDTO.java

@ -23,7 +23,7 @@ public class GridBaseInfoFormDTO implements Serializable {
/** /**
* 网格Id * 网格Id
*/ */
private List<String> GridIdList; private List<String> gridIdList;
public interface Grid extends CustomerClientShowGroup {} public interface Grid extends CustomerClientShowGroup {}
} }

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/CustomerGridDao.java

@ -22,7 +22,9 @@ import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO; import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO;
import com.epmet.dto.group.result.GridIdListByCustomerResultDTO; import com.epmet.dto.group.result.GridIdListByCustomerResultDTO;
import com.epmet.dto.org.CustomerStaffGridDTO; import com.epmet.dto.org.CustomerStaffGridDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO;
import com.epmet.dto.org.GridInfoDTO; import com.epmet.dto.org.GridInfoDTO;
import com.epmet.dto.org.result.CustomerGridDTO;
import com.epmet.entity.org.CustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@ -95,4 +97,10 @@ public interface CustomerGridDao extends BaseDao<CustomerGridEntity> {
* @Description 查询客户已删除网格列表 * @Description 查询客户已删除网格列表
**/ **/
List<String> selectDelGridList(@Param("customerId") String customerId); List<String> selectDelGridList(@Param("customerId") String customerId);
/**
* @Author sun
* @Description 批量查询客户网格基础信息
**/
List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO);
} }

8
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/org/StatsCustomerAgencyDao.java

@ -2,6 +2,8 @@ package com.epmet.dao.org;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.AgencySubTreeDto; import com.epmet.dto.AgencySubTreeDto;
import com.epmet.dto.org.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.result.CustomerAgencyDTO;
import com.epmet.dto.org.result.CustomerAreaCodeResultDTO; import com.epmet.dto.org.result.CustomerAreaCodeResultDTO;
import com.epmet.dto.org.result.OrgStaffDTO; import com.epmet.dto.org.result.OrgStaffDTO;
import com.epmet.entity.org.CustomerAgencyEntity; import com.epmet.entity.org.CustomerAgencyEntity;
@ -71,4 +73,10 @@ public interface StatsCustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
CustomerAgencyEntity selectByDeptId(String deptId); CustomerAgencyEntity selectByDeptId(String deptId);
CustomerAgencyEntity selecByAreaCode(@Param("customerId")String customerId, @Param("areaCode")String areaCode); CustomerAgencyEntity selecByAreaCode(@Param("customerId")String customerId, @Param("areaCode")String areaCode);
/**
* @Author sun
* @Description 批量查询客户组织基础信息
**/
List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO);
} }

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/user/UserDao.java

@ -5,6 +5,7 @@ import com.epmet.dto.extract.form.StaffPatrolStatsFormDTO;
import com.epmet.dto.extract.result.UserPartyResultDTO; import com.epmet.dto.extract.result.UserPartyResultDTO;
import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.dto.stats.form.GmUploadEventFormDTO; import com.epmet.dto.stats.form.GmUploadEventFormDTO;
import com.epmet.dto.user.StaffBaseInfoFormDTO;
import com.epmet.dto.user.result.*; import com.epmet.dto.user.result.*;
import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
@ -252,5 +253,11 @@ public interface UserDao {
* @author sun * @author sun
*/ */
int saveOrUpGmUploadEvent(@Param("list") List<GmUploadEventFormDTO.DataList> list); int saveOrUpGmUploadEvent(@Param("list") List<GmUploadEventFormDTO.DataList> list);
/**
* @Author sun
* @Description 批量查询客户网格人员基础信息
**/
List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO);
} }

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/impl/DataReportingServiceImpl.java

@ -9,6 +9,7 @@ import com.epmet.dto.user.result.CustomerStaffDTO;
import com.epmet.service.DataReportingService; import com.epmet.service.DataReportingService;
import com.epmet.service.org.CustomerAgencyService; import com.epmet.service.org.CustomerAgencyService;
import com.epmet.service.org.CustomerGridService; import com.epmet.service.org.CustomerGridService;
import com.epmet.service.user.UserService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -26,38 +27,40 @@ public class DataReportingServiceImpl implements DataReportingService {
private CustomerAgencyService customerAgencyService; private CustomerAgencyService customerAgencyService;
@Autowired @Autowired
private CustomerGridService customerGridService; private CustomerGridService customerGridService;
@Autowired
private UserService userService;
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户组织基础信息 * @Description 批量查询客户组织基础信息
* **/
* @return*/
@Override @Override
public List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) { public List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) {
//批量查询客户组织信息 //批量查询客户组织信息
return null; List<CustomerAgencyDTO> resultList = customerAgencyService.getAgencyBaseInfo(formDTO);
return resultList;
} }
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户网格基础信息 * @Description 批量查询客户网格基础信息
* **/
* @return*/
@Override @Override
public List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO) { public List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO) {
//批量查询客户网格信息 //批量查询客户网格信息
return null; List<CustomerGridDTO> resultList = customerGridService.getGridBaseInfo(formDTO);
return resultList;
} }
/** /**
* @Author sun * @Author sun
* @Description 批量查询客户网格人员基础信息 * @Description 批量查询客户网格人员基础信息
* **/
* @return*/
@Override @Override
public List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) { public List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) {
//批量查询客户网格人员信息 //批量查询客户网格人员信息
return null; List<CustomerStaffDTO> resultList = userService.getStaffBaseInfo(formDTO);
return resultList;
} }
} }

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerAgencyService.java

@ -1,5 +1,7 @@
package com.epmet.service.org; package com.epmet.service.org;
import com.epmet.dto.org.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.result.CustomerAgencyDTO;
import com.epmet.dto.org.result.CustomerAreaCodeResultDTO; import com.epmet.dto.org.result.CustomerAreaCodeResultDTO;
import com.epmet.dto.org.result.OrgStaffDTO; import com.epmet.dto.org.result.OrgStaffDTO;
import com.epmet.entity.org.CustomerAgencyEntity; import com.epmet.entity.org.CustomerAgencyEntity;
@ -58,4 +60,9 @@ public interface CustomerAgencyService {
*/ */
void sysAgencyInfo(String fromCustomerId, String toCustomerId); void sysAgencyInfo(String fromCustomerId, String toCustomerId);
/**
* @Author sun
* @Description 批量查询客户组织基础信息
**/
List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO);
} }

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/CustomerGridService.java

@ -5,7 +5,9 @@ import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO; import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO;
import com.epmet.dto.group.result.GridIdListByCustomerResultDTO; import com.epmet.dto.group.result.GridIdListByCustomerResultDTO;
import com.epmet.dto.org.CustomerStaffGridDTO; import com.epmet.dto.org.CustomerStaffGridDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO;
import com.epmet.dto.org.GridInfoDTO; import com.epmet.dto.org.GridInfoDTO;
import com.epmet.dto.org.result.CustomerGridDTO;
import com.epmet.entity.org.CustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity;
import java.util.Date; import java.util.Date;
@ -77,4 +79,9 @@ public interface CustomerGridService extends BaseService<CustomerGridEntity> {
**/ **/
List<String> getdelGridProjectIdList(String customerId); List<String> getdelGridProjectIdList(String customerId);
/**
* @Author sun
* @Description 批量查询客户网格基础信息
**/
List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO);
} }

12
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerAgencyServiceImpl.java

@ -5,6 +5,8 @@ import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.constant.DataSourceConstant; import com.epmet.constant.DataSourceConstant;
import com.epmet.dao.org.StatsCustomerAgencyDao; import com.epmet.dao.org.StatsCustomerAgencyDao;
import com.epmet.dto.org.AgencyBaseInfoFormDTO;
import com.epmet.dto.org.result.CustomerAgencyDTO;
import com.epmet.dto.org.result.CustomerAreaCodeResultDTO; import com.epmet.dto.org.result.CustomerAreaCodeResultDTO;
import com.epmet.dto.org.result.OrgStaffDTO; import com.epmet.dto.org.result.OrgStaffDTO;
import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity; import com.epmet.entity.evaluationindex.screen.ScreenCustomerAgencyEntity;
@ -271,4 +273,14 @@ public class CustomerAgencyServiceImpl implements CustomerAgencyService {
} }
} }
} }
/**
* @Author sun
* @Description 批量查询客户组织基础信息
**/
@Override
public List<CustomerAgencyDTO> getAgencyBaseInfo(AgencyBaseInfoFormDTO formDTO) {
return customerAgencyDao.getAgencyBaseInfo(formDTO);
}
} }

11
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/org/impl/CustomerGridServiceImpl.java

@ -9,7 +9,9 @@ import com.epmet.dto.group.AgencyDTO;
import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO; import com.epmet.dto.group.result.AgencyGridTotalCountResultDTO;
import com.epmet.dto.group.result.GridIdListByCustomerResultDTO; import com.epmet.dto.group.result.GridIdListByCustomerResultDTO;
import com.epmet.dto.org.CustomerStaffGridDTO; import com.epmet.dto.org.CustomerStaffGridDTO;
import com.epmet.dto.org.GridBaseInfoFormDTO;
import com.epmet.dto.org.GridInfoDTO; import com.epmet.dto.org.GridInfoDTO;
import com.epmet.dto.org.result.CustomerGridDTO;
import com.epmet.entity.org.CustomerGridEntity; import com.epmet.entity.org.CustomerGridEntity;
import com.epmet.service.Issue.IssueService; import com.epmet.service.Issue.IssueService;
import com.epmet.service.org.CustomerGridService; import com.epmet.service.org.CustomerGridService;
@ -115,4 +117,13 @@ public class CustomerGridServiceImpl extends BaseServiceImpl<CustomerGridDao, Cu
return resultList; return resultList;
} }
/**
* @Author sun
* @Description 批量查询客户网格基础信息
**/
@Override
public List<CustomerGridDTO> getGridBaseInfo(GridBaseInfoFormDTO formDTO) {
return customerGridDao.getGridBaseInfo(formDTO);
}
} }

7
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/UserService.java

@ -7,6 +7,7 @@ import com.epmet.dto.org.result.OrgStaffDTO;
import com.epmet.dto.screen.ScreenProjectDataDTO; import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.dto.stats.form.GmUploadEventFormDTO; import com.epmet.dto.stats.form.GmUploadEventFormDTO;
import com.epmet.dto.stats.user.result.UserStatisticalData; import com.epmet.dto.stats.user.result.UserStatisticalData;
import com.epmet.dto.user.StaffBaseInfoFormDTO;
import com.epmet.dto.user.result.StaffRoleInfoDTO; import com.epmet.dto.user.result.StaffRoleInfoDTO;
import com.epmet.dto.user.result.CustomerStaffDTO; import com.epmet.dto.user.result.CustomerStaffDTO;
import com.epmet.dto.user.result.StaffPatrolRecordResult; import com.epmet.dto.user.result.StaffPatrolRecordResult;
@ -137,4 +138,10 @@ public interface UserService {
* @author sun * @author sun
*/ */
void saveOrUpGmUploadEvent(List<GmUploadEventFormDTO.DataList> list); void saveOrUpGmUploadEvent(List<GmUploadEventFormDTO.DataList> list);
/**
* @Author sun
* @Description 批量查询客户网格人员基础信息
**/
List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO);
} }

10
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/user/impl/UserServiceImpl.java

@ -17,6 +17,7 @@ import com.epmet.dto.screen.ScreenProjectDataDTO;
import com.epmet.dto.stats.form.GmUploadEventFormDTO; import com.epmet.dto.stats.form.GmUploadEventFormDTO;
import com.epmet.dto.stats.user.*; import com.epmet.dto.stats.user.*;
import com.epmet.dto.stats.user.result.UserStatisticalData; import com.epmet.dto.stats.user.result.UserStatisticalData;
import com.epmet.dto.user.StaffBaseInfoFormDTO;
import com.epmet.dto.user.result.*; import com.epmet.dto.user.result.*;
import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity; import com.epmet.entity.evaluationindex.screen.ScreenPartyUserRankDataEntity;
import com.epmet.service.user.UserService; import com.epmet.service.user.UserService;
@ -1088,4 +1089,13 @@ public class UserServiceImpl implements UserService {
userDao.saveOrUpGmUploadEvent(list); userDao.saveOrUpGmUploadEvent(list);
} }
/**
* @Author sun
* @Description 批量查询客户网格人员基础信息
**/
@Override
public List<CustomerStaffDTO> getStaffBaseInfo(StaffBaseInfoFormDTO formDTO) {
return userDao.getStaffBaseInfo(formDTO);
}
} }

13
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/CustomerGridDao.xml

@ -126,4 +126,17 @@
AND customer_id = #{customerId} AND customer_id = #{customerId}
</select> </select>
<select id="getGridBaseInfo" resultType="com.epmet.dto.org.result.CustomerGridDTO">
SELECT
*
FROM
customer_grid
WHERE
del_flag = '0'
AND customer_id = #{customerId}
<foreach collection="gridIdList" item="gridId" open="AND id IN (" separator="," close=")">
#{gridId}
</foreach>
</select>
</mapper> </mapper>

14
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/org/StatsCustomerAgencyDao.xml

@ -203,4 +203,18 @@
AND ca.CUSTOMER_ID = #{customerId} AND ca.CUSTOMER_ID = #{customerId}
AND ca.AREA_CODE = #{areaCode} AND ca.AREA_CODE = #{areaCode}
</select> </select>
<select id="getAgencyBaseInfo" resultType="com.epmet.dto.org.result.CustomerAgencyDTO">
SELECT
*
FROM
customer_agency
WHERE
del_flag = '0'
AND customer_id = #{customerId}
<foreach collection="agencyIdList" item="agencyId" open="AND id IN (" separator="," close=")">
#{agencyId}
</foreach>
</select>
</mapper> </mapper>

13
epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/user/UserDao.xml

@ -991,4 +991,17 @@
updated_time = NOW() updated_time = NOW()
</insert> </insert>
<select id="getStaffBaseInfo" resultType="com.epmet.dto.user.result.CustomerStaffDTO">
SELECT
*
FROM
customer_staff
WHERE
del_flag = '0'
AND customer_id = #{customerId}
<foreach collection="staffIdList" item="staffId" open="AND user_id IN (" separator="," close=")">
#{staffId}
</foreach>
</select>
</mapper> </mapper>

Loading…
Cancel
Save