Browse Source

Merge remote-tracking branch 'origin/dev_party_helper' into dev_party_helper

master
sunyuchao 3 years ago
parent
commit
1b931c89c7
  1. 2
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/ActAndScheduleListFormDTO.java
  2. 5
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/YearSearchFormDTO.java
  3. 22
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/YearSearchDetailResultDTO.java
  4. 12
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyActController.java
  5. 5
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyActService.java
  6. 34
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java
  7. 3
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyActDao.xml

2
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/ActAndScheduleListFormDTO.java

@ -38,4 +38,6 @@ public class ActAndScheduleListFormDTO implements Serializable {
* 当seachType = 'yearSearch'不需要查询党组织 * 当seachType = 'yearSearch'不需要查询党组织
*/ */
private String searchType = ""; private String searchType = "";
private String type = "";
} }

5
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/YearSearchFormDTO.java

@ -17,9 +17,12 @@ public class YearSearchFormDTO implements Serializable {
public interface YearSearchForm{} public interface YearSearchForm{}
@NotBlank(message = "yaerId不能为空",groups = YearSearchForm.class) @NotBlank(message = "yearId不能为空",groups = YearSearchForm.class)
private String yearId; private String yearId;
@NotBlank(message = "type不能为空",groups = YearSearchForm.class)
private String type;
private String staffId; private String staffId;
private String customerId; private String customerId;
} }

22
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/YearSearchDetailResultDTO.java

@ -0,0 +1,22 @@
package com.epmet.resi.partymember.dto.partyOrg.result;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/8/22 09:27
* @DESC
*/
@Data
public class YearSearchDetailResultDTO implements Serializable {
private static final long serialVersionUID = 8961924457475202790L;
private String type;
private String frequency;
private List<IcPartyActDetailResDTO> activityList;
}

12
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyActController.java

@ -31,6 +31,7 @@ import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.YearSearchFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.YearSearchFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchDetailResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
@ -232,11 +233,18 @@ public class IcPartyActController {
* @author zxc * @author zxc
* @date 2022/8/22 09:33 * @date 2022/8/22 09:33
*/ */
@PostMapping("yearSearch01")
public Result<List<YearSearchResultDTO>> yearSearch01(@LoginUser TokenDto tokenDto, @RequestBody YearSearchFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<YearSearchResultDTO>>().ok(icPartyActService.yearSearch01(formDTO));
}
@PostMapping("yearSearch") @PostMapping("yearSearch")
public Result<List<YearSearchResultDTO>> yearSearch(@LoginUser TokenDto tokenDto, @RequestBody YearSearchFormDTO formDTO){ public Result<List<YearSearchDetailResultDTO>> yearSearch(@LoginUser TokenDto tokenDto, @RequestBody YearSearchFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId()); formDTO.setStaffId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<YearSearchResultDTO>>().ok(icPartyActService.yearSearch(formDTO)); return new Result<List<YearSearchDetailResultDTO>>().ok(icPartyActService.yearSearch(formDTO));
} }
@NoRepeatSubmit @NoRepeatSubmit

5
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyActService.java

@ -14,6 +14,7 @@ import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.YearSearchFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.YearSearchFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchDetailResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO;
import java.util.List; import java.util.List;
@ -105,5 +106,7 @@ public interface IcPartyActService extends BaseService<IcPartyActEntity> {
* @author zxc * @author zxc
* @date 2022/8/22 09:33 * @date 2022/8/22 09:33
*/ */
List<YearSearchResultDTO> yearSearch(YearSearchFormDTO formDTO); List<YearSearchResultDTO> yearSearch01(YearSearchFormDTO formDTO);
List<YearSearchDetailResultDTO> yearSearch(YearSearchFormDTO formDTO);
} }

34
epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java

@ -38,6 +38,7 @@ import com.epmet.resi.partymember.dto.partyOrg.form.HomeMonthTotalFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.YearSearchFormDTO; import com.epmet.resi.partymember.dto.partyOrg.form.YearSearchFormDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchDetailResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO; import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO;
import com.epmet.send.SendMqMsgUtil; import com.epmet.send.SendMqMsgUtil;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
@ -351,7 +352,7 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart
* @date 2022/8/22 09:33 * @date 2022/8/22 09:33
*/ */
@Override @Override
public List<YearSearchResultDTO> yearSearch(YearSearchFormDTO formDTO) { public List<YearSearchResultDTO> yearSearch01(YearSearchFormDTO formDTO) {
ActAndScheduleListFormDTO secondForm = ConvertUtils.sourceToTarget(formDTO, ActAndScheduleListFormDTO.class); ActAndScheduleListFormDTO secondForm = ConvertUtils.sourceToTarget(formDTO, ActAndScheduleListFormDTO.class);
secondForm.setSearchType("yearSearch"); secondForm.setSearchType("yearSearch");
disposeActAndScheduleListFormDTO(secondForm); disposeActAndScheduleListFormDTO(secondForm);
@ -376,6 +377,37 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart
return result; return result;
} }
@Override
public List<YearSearchDetailResultDTO> yearSearch(YearSearchFormDTO formDTO) {
ActAndScheduleListFormDTO secondForm = ConvertUtils.sourceToTarget(formDTO, ActAndScheduleListFormDTO.class);
secondForm.setSearchType("yearSearch");
disposeActAndScheduleListFormDTO(secondForm);
List<ActAndScheduleListResultDTO.ActivityListDTO> activityList = baseDao.getActivityList(secondForm);
List<IcPartyActDetailResDTO> activityDetailList = new ArrayList<>();
if (CollectionUtils.isEmpty(activityList)){
return new ArrayList<>();
}
activityList.forEach(al -> {
IcPartyActDetailResDTO icPartyActDetailResDTO = queryActDetail(formDTO.getCustomerId(), formDTO.getStaffId(), al.getActivityId());
activityDetailList.add(icPartyActDetailResDTO);
});
List<YearSearchDetailResultDTO> result = new ArrayList<>();
List<IcPartActTypeDTO> activityTypeList = actTypeList(formDTO.getCustomerId());
Map<String, List<IcPartyActDetailResDTO>> groupByType = activityDetailList.stream().collect(Collectors.groupingBy(IcPartyActDetailResDTO::getActType));
groupByType.forEach((type,list) -> {
YearSearchDetailResultDTO dto = new YearSearchDetailResultDTO();
activityTypeList.forEach(at -> {
if (at.getValue().equals(type)){
dto.setType(at.getLabel());
dto.setFrequency(at.getFrequencyDesc());
}
});
dto.setActivityList(list);
result.add(dto);
});
return result;
}
/** /**
* Desc: * Desc:
* @param formDTO * @param formDTO

3
epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyActDao.xml

@ -68,6 +68,9 @@
<if test='null != dateId and dateId != "" '> <if test='null != dateId and dateId != "" '>
AND DATE_FORMAT(pa.HOLD_TIME,'%Y%m%d') = #{dateId} AND DATE_FORMAT(pa.HOLD_TIME,'%Y%m%d') = #{dateId}
</if> </if>
<if test='null != type and type != "" '>
AND act_type = #{type}
</if>
<if test='searchType == "yearSearch" '> <if test='searchType == "yearSearch" '>
AND pa.ORG_ID_PATH like concat('%',#{agencyId},'%') AND pa.ORG_ID_PATH like concat('%',#{agencyId},'%')
</if> </if>

Loading…
Cancel
Save