Browse Source

以城找人

feature/syp_points
songyunpeng 5 years ago
parent
commit
0f044df2ea
  1. 6
      esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/constant/SdsPtgNoticeConstant.java
  2. 13
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java
  3. 4
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java
  4. 2
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml
  5. 2
      esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml
  6. 15
      esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenResidentInfoByCurrentAddressResultDTO.java
  7. 2
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java
  8. 33
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java
  9. 12
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java
  10. 44
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/EpdcScreenResidentInfoByCurrentAddressExcel.java
  11. 28
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java
  12. 25
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java
  13. 59
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

6
esua-epdc/epdc-module/epdc-custom/epdc-custom-client/src/main/java/com/elink/esua/epdc/constant/SdsPtgNoticeConstant.java

@ -26,7 +26,11 @@ public interface SdsPtgNoticeConstant {
/**
* 消息所属业务类型SDS_PTG
*/
String NOTICE_BUSINESS_TYPE_SDS_PTG= "sds_ptg";
String NOTICE_BUSINESS_TYPE_PTG= "ptg";
/**
* 消息所属业务类型SDS_PTG
*/
String NOTICE_BUSINESS_TYPE_SDS= "sds";
/**
* 我的消息类型1互动通知
*/

13
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/groupbuy/service/impl/GroupBuyInfoServiceImpl.java

@ -42,12 +42,6 @@ import com.elink.esua.epdc.dto.GroupBuyInfoDTO;
import com.elink.esua.epdc.dto.GroupBuyPriceNumberDTO;
import com.elink.esua.epdc.dto.GroupBuySignUpDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO;
import com.elink.esua.epdc.dto.form.EpdcAddGroupBuyInfoFormDTO;
import com.elink.esua.epdc.dto.form.EpdcSelectGroupBuyInfoListFormDTO;
import com.elink.esua.epdc.dto.form.GroupBuyTopFormDTO;
import com.elink.esua.epdc.dto.form.SdsPtgShieldFormDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyDetailResultDTO;
import com.elink.esua.epdc.dto.result.EpdcSelectGroupBuyInfoListResultDTO;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.modules.feign.AdminFeignClient;
@ -55,9 +49,8 @@ import com.elink.esua.epdc.modules.feign.ContentSecurityFeignClient;
import com.elink.esua.epdc.modules.groupbuy.dao.GroupBuyInfoDao;
import com.elink.esua.epdc.modules.groupbuy.dao.GroupBuyPriceNumberDao;
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyInfoEntity;
import com.elink.esua.epdc.modules.groupbuy.redis.GroupBuyInfoRedis;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyEvaluationService;
import com.elink.esua.epdc.modules.groupbuy.entity.GroupBuyPriceNumberEntity;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyEvaluationService;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuyInfoService;
import com.elink.esua.epdc.modules.groupbuy.service.GroupBuySignUpService;
import com.elink.esua.epdc.modules.reportissue.dao.CustomImgDao;
@ -165,7 +158,7 @@ public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, Gr
informationFormDTO.setUserId(dto.getUserId());
informationFormDTO.setContent("您的拼团购内容被修改,请注意查看。");
informationFormDTO.setTitle(SdsPtgNoticeConstant.NOTICE_PTG_UPDATE);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS_PTG);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_PTG);
informationFormDTO.setBusinessId(entity.getId());
// 发送消息
newsTask.insertUserInformation(informationFormDTO);
@ -345,7 +338,7 @@ public class GroupBuyInfoServiceImpl extends BaseServiceImpl<GroupBuyInfoDao, Gr
informationFormDTO.setUserId(entityDetail.getUserId());
informationFormDTO.setContent("您的拼团购内容被屏蔽,屏蔽原因:"+formDto.getShieldReason());
informationFormDTO.setTitle(SdsPtgNoticeConstant.NOTICE_PTG_DELETE);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS_PTG);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_PTG);
informationFormDTO.setBusinessId(entityDetail.getId());
// 发送消息
newsTask.insertUserInformation(informationFormDTO);

4
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/java/com/elink/esua/epdc/modules/sds/service/impl/SdsInfoServiceImpl.java

@ -135,7 +135,7 @@ public class SdsInfoServiceImpl extends BaseServiceImpl<SdsInfoDao, SdsInfoEntit
informationFormDTO.setUserId(dto.getUserId());
informationFormDTO.setContent("您的顺道捎内容被修改,请注意查看。");
informationFormDTO.setTitle(SdsPtgNoticeConstant.NOTICE_SDS_UPDATE);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS_PTG);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS);
informationFormDTO.setBusinessId(entity.getId());
// 发送消息
newsTask.insertUserInformation(informationFormDTO);
@ -276,7 +276,7 @@ public class SdsInfoServiceImpl extends BaseServiceImpl<SdsInfoDao, SdsInfoEntit
informationFormDTO.setUserId(entityDetail.getUserId());
informationFormDTO.setContent("您的顺道捎内容被屏蔽,屏蔽原因:"+formDto.getShieldReason());
informationFormDTO.setTitle(SdsPtgNoticeConstant.NOTICE_SDS_DELETE);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS_PTG);
informationFormDTO.setBusinessType(SdsPtgNoticeConstant.NOTICE_BUSINESS_TYPE_SDS);
informationFormDTO.setBusinessId(entityDetail.getId());
// 发送消息
newsTask.insertUserInformation(informationFormDTO);

2
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/groupBuy/GroupBuyInfoDao.xml

@ -78,7 +78,7 @@
epdc_custom_img t1
on t.ID = t1.REFERENCE_ID and t1.IMG_TYPE = 'group_buy' and t1.DEL_FLAG = '0'
left join epdc_group_buy_price_number t2 on t.ID = t2.GROUP_BUY_ID and t2.DEL_FLAG = '0'
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0'
where t.DEL_FLAG = '0'
and t.ID = #{id}
order by t2.GROUP_BUY_NUMBER,t1.IMG_URL
</select>

2
esua-epdc/epdc-module/epdc-custom/epdc-custom-server/src/main/resources/mapper/sds/SdsInfoDao.xml

@ -64,7 +64,7 @@
t.CARRY_CONTENT,
t.CARRY_STATUS
from epdc_sds_info t
where t.DEL_FLAG = '0' and t.SHIELD_FLAG = '0' and t.ID = #{id}
where t.DEL_FLAG = '0' and t.ID = #{id}
</select>
<select id="selectListOfOrganizationInfo" resultType="com.elink.esua.epdc.dto.SdsInfoDTO">
SELECT

15
esua-epdc/epdc-module/epdc-user/epdc-user-client/src/main/java/com/elink/esua/epdc/dto/epdc/result/EpdcScreenResidentInfoByCurrentAddressResultDTO.java

@ -26,5 +26,20 @@ public class EpdcScreenResidentInfoByCurrentAddressResultDTO {
* 当前居住地址
*/
private String currentAddress;
/**
* 户主姓名
*/
private String houseHeadName;
/**
* 户主电话
*/
private String houseHeadPhone;
/**
* 户主居住地址
*/
private String houseHeadAddress;
}

2
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/EpdcScreenPopulationInformationController.java

@ -65,7 +65,7 @@ public class EpdcScreenPopulationInformationController {
}
/**
* @Description 找人接口
* @Description 找人接口
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]

33
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/controller/PopulationInformationController.java

@ -33,6 +33,8 @@ import com.elink.esua.epdc.dto.PopulationInformationDTO;
import com.elink.esua.epdc.dto.SysPopulationSimpleDictDTO;
import com.elink.esua.epdc.dto.SysSimpleDictDTO;
import com.elink.esua.epdc.dto.epdc.form.SysPopulationSimpleDictFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO;
import com.elink.esua.epdc.excel.EpdcScreenResidentInfoByCurrentAddressExcel;
import com.elink.esua.epdc.excel.FamilyInformationExcel;
import com.elink.esua.epdc.excel.PopulationInformationExcel;
import com.elink.esua.epdc.excel.populationMotorVehicleExcel;
@ -189,9 +191,6 @@ public class PopulationInformationController {
ExcelUtils.exportExcelToTarget(response, "家庭信息", list, FamilyInformationExcel.class);
}
/**
* @Description 获取居民信息采集总览数据
* @Author songyunpeng
@ -204,5 +203,33 @@ public class PopulationInformationController {
return populationInformationService.getPopulationInfoOverview();
}
/**
* @Description 以城找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.result.EpdcScreenPopulationInfoByHouseResultDTO>>
**/
@GetMapping("selectPeopleByCurrentAddress")
public Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>> selectPeopleByCurrentAddress(@RequestParam Map<String, Object> params){
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> pointDeptStatisticsResultDTOS = populationInformationService.selectPeopleByCurrentAddressForPc(params);
Integer total = populationInformationService.selectCountPeopleByCurrentAddressForPc(params);
PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> page = new PageData<>(pointDeptStatisticsResultDTOS,total);
return new Result<PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO>>().ok(page);
}
/**
* @Description 以城找人 - 导出
* @Author songyunpeng
* @Date 2020/8/28
* @Param [params, response]
* @return void
**/
@GetMapping("selectPeopleByCurrentAddress/export")
public void selectPeopleByCurrentAddressExport(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> pointDeptStatisticsResultDTOS = populationInformationService.selectPeopleByCurrentAddressExportList(params);
ExcelUtils.exportExcelToTarget(response, "居民信息", pointDeptStatisticsResultDTOS, EpdcScreenResidentInfoByCurrentAddressExcel.class);
}
}

12
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/dao/PopulationInformationDao.java

@ -174,7 +174,7 @@ public interface PopulationInformationDao extends BaseDao<PopulationInformationE
**/
Integer selectCountPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 找人
* @Description 找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
@ -182,11 +182,19 @@ public interface PopulationInformationDao extends BaseDao<PopulationInformationE
**/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
/**
* @Description 找人 - count
* @Description 找人 - count
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return java.lang.Integer
**/
Integer selectCountPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
/**
* @Description 以城找人 - 导出
* @Author songyunpeng
* @Date 2021/1/5
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params);
}

44
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/excel/EpdcScreenResidentInfoByCurrentAddressExcel.java

@ -0,0 +1,44 @@
package com.elink.esua.epdc.excel;
import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;
/**
* @author songyunpeng
* @Description 大屏以人找人结果
* @create 2020-09-14
*/
@Data
public class EpdcScreenResidentInfoByCurrentAddressExcel {
/**
* 居住人姓名
*/
@Excel(name = "姓名")
private String residentName;
/**
* 当前居住地址
*/
@Excel(name = "现居住地")
private String currentAddress;
/**
* 户主姓名
*/
@Excel(name = "户主姓名")
private String houseHeadName;
/**
* 户主电话
*/
@Excel(name = "户主电话")
private String houseHeadPhone;
/**
* 户主居住地址
*/
@Excel(name = "户主居住地址")
private String houseHeadAddress;
}

28
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/PopulationInformationService.java

@ -210,11 +210,37 @@ public interface PopulationInformationService extends BaseService<PopulationInfo
**/
PageData<EpdcScreenPopulationInfoByHouseResultDTO> selectPeopleByHouse(EpdcScreenPopulationInfoByHouseFormDTO dto);
/**
* @Description 一人找人
* @Description 以城找人
* @Author songyunpeng
* @Date 2020/9/19
* @Param [dto]
* @return com.elink.esua.epdc.commons.tools.page.PageData<com.elink.esua.epdc.dto.epdc.form.EpdcScreenResidentInfoByCurrentAddressFormDTO>
**/
PageData<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddress(EpdcScreenResidentInfoByCurrentAddressFormDTO dto);
/**
* @Description 以城找人 - pc
* @Author songyunpeng
* @Date 2021/1/4
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressForPc(Map<String, Object> params);
/**
* 以城找人 - pc导出
*
* @param params
* @return java.util.List<PopulationInformationDTO>
* @author generator
* @date 2020-08-19
*/
List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params);
/**
* @Description 以城找人 - pc - count
* @Author songyunpeng
* @Date 2021/1/4
* @Param [params]
* @return java.util.List<com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO>
**/
Integer selectCountPeopleByCurrentAddressForPc(Map<String, Object> params);
}

25
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/PopulationInformationServiceImpl.java

@ -532,6 +532,31 @@ public class PopulationInformationServiceImpl extends BaseServiceImpl<Population
return new PageData<>(list, baseDao.selectCountPeopleByCurrentAddress(dto));
}
@Override
public List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressForPc(Map<String, Object> params) {
EpdcScreenResidentInfoByCurrentAddressFormDTO formDTO = new EpdcScreenResidentInfoByCurrentAddressFormDTO();
int pageIndex = (Integer.parseInt(params.get("page")+"")- NumConstant.ONE) * Integer.parseInt(params.get("limit")+"");
formDTO.setPageIndex(pageIndex);
formDTO.setPageSize(Integer.parseInt(params.get("limit")+""));
formDTO.setCurrentAddress(params.get("houseAddress")==null?null:String.valueOf(params.get("houseAddress")));
return baseDao.selectPeopleByCurrentAddress(formDTO);
}
@Override
public List<EpdcScreenResidentInfoByCurrentAddressResultDTO> selectPeopleByCurrentAddressExportList(Map<String, Object> params) {
return baseDao.selectPeopleByCurrentAddressExportList(params);
}
@Override
public Integer selectCountPeopleByCurrentAddressForPc(Map<String, Object> params) {
EpdcScreenResidentInfoByCurrentAddressFormDTO formDTO = new EpdcScreenResidentInfoByCurrentAddressFormDTO();
int pageIndex = (Integer.parseInt(params.get("page")+"")- NumConstant.ONE) * Integer.parseInt(params.get("limit")+"");
formDTO.setPageIndex(pageIndex);
formDTO.setPageSize(Integer.parseInt(params.get("limit")+""));
formDTO.setCurrentAddress(params.get("houseAddress")==null?null:String.valueOf(params.get("houseAddress")));
return baseDao.selectCountPeopleByCurrentAddress(formDTO);
}
private void setHouseUse(String houseUse, HousingInfo housingInfo) {
switch (houseUse) {
case HouseUseConstant.RENT:

59
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/PopulationInformationDao.xml

@ -455,19 +455,28 @@
</select>
<select id="selectPeopleByCurrentAddress"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO">
select
t.ID as populationId,
2 as identityFlag,
t.RESIDENTS_NAME as residentName,
t.CURRENT_ADDRESS as currentAddress
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0' and ehr.IS_HOUSE_HEAD = '0'
<if test="currentAddress!=null and currentAddress!=''">
and CURRENT_ADDRESS like concat('%', #{currentAddress}, '%')
</if>
LIMIT #{pageIndex},#{pageSize}
select t.ID as populationId,
2 as identityFlag,
t.RESIDENTS_NAME as residentName,
t.CURRENT_ADDRESS as currentAddress,
hh.RESIDENTS_NAME as houseHeadName,
hh.RESIDENTS_PHONE as houseHeadPhone,
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0'
and ehr.IS_HOUSE_HEAD = '0'
and hh.DEL_FLAG = '0'
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0'
<if test="currentAddress!=null and currentAddress!=''">
and t.CURRENT_ADDRESS like concat('%', #{currentAddress}, '%')
</if>
group by t.ID
LIMIT #{pageIndex},#{pageSize}
</select>
<select id="selectCountPeopleByCurrentAddress" resultType="java.lang.Integer">
select
@ -480,6 +489,30 @@
and CURRENT_ADDRESS like concat('%', #{currentAddress}, '%')
</if>
</select>
<select id="selectPeopleByCurrentAddressExportList"
resultType="com.elink.esua.epdc.dto.epdc.result.EpdcScreenResidentInfoByCurrentAddressResultDTO">
select t.ID as populationId,
2 as identityFlag,
t.RESIDENTS_NAME as residentName,
t.CURRENT_ADDRESS as currentAddress,
hh.RESIDENTS_NAME as houseHeadName,
hh.RESIDENTS_PHONE as houseHeadPhone,
GROUP_CONCAT(distinct ehi.HOUSE_ADDRESS) as houseHeadAddress
from epdc_population_information t
left join epdc_house_resident ehr on t.ID = ehr.RESIDENT_ID
left join epdc_population_information hh on hh.ID = ehr.HOUSE_HEAD_ID
left join epdc_house_resident hhehr on hh.ID = hhehr.RESIDENT_ID
left join epdc_housing_information ehi on hhehr.HOUSE_ID = ehi.ID
where t.DEL_FLAG = '0'
and ehr.DEL_FLAG = '0'
and ehr.IS_HOUSE_HEAD = '0'
and hh.DEL_FLAG = '0'
and hhehr.DEL_FLAG ='0' and ehi.DEL_FLAG = '0'
<if test="houseAddress!=null and houseAddress!=''">
and t.CURRENT_ADDRESS like concat('%', #{houseAddress}, '%')
</if>
group by t.ID
</select>
</mapper>
Loading…
Cancel
Save