Browse Source

年度计划微调

master
zxc 3 years ago
parent
commit
55fc092534
  1. 6
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/ActAndScheduleListFormDTO.java
  2. 25
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/form/YearSearchFormDTO.java
  3. 4
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/ActAndScheduleListResultDTO.java
  4. 46
      epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/YearSearchResultDTO.java
  5. 17
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/controller/IcPartyActController.java
  6. 10
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/IcPartyActService.java
  7. 38
      epmet-module/resi-partymember/resi-partymember-server/src/main/java/com/epmet/modules/partyOrg/service/impl/IcPartyActServiceImpl.java
  8. 17
      epmet-module/resi-partymember/resi-partymember-server/src/main/resources/mapper/partyOrg/IcPartyActDao.xml

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

@ -17,6 +17,7 @@ public class ActAndScheduleListFormDTO implements Serializable {
private String startDate;
private String endDate;
private String dateId;
private String yearId;
/**
* 是否本人创建的活动10
@ -32,4 +33,9 @@ public class ActAndScheduleListFormDTO implements Serializable {
private String staffId;
private String agencyId;
private String path;
/**
* 当seachType = 'yearSearch'不需要查询党组织
*/
private String searchType = "";
}

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

@ -0,0 +1,25 @@
package com.epmet.resi.partymember.dto.partyOrg.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/8/22 09:26
* @DESC
*/
@Data
public class YearSearchFormDTO implements Serializable {
private static final long serialVersionUID = 4557112229519696741L;
public interface YearSearchForm{}
@NotBlank(message = "yaerId不能为空",groups = YearSearchForm.class)
private String yearId;
private String staffId;
private String customerId;
}

4
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/ActAndScheduleListResultDTO.java

@ -37,6 +37,10 @@ public class ActAndScheduleListResultDTO implements Serializable {
private String topic;
private String address;
private String holdTime;
private String autoPublicTime;
private String isAutoInformValue;
private String isAutoInform;
private String autoInformDay;
private String type;
private String isPublicValue;
private String isPublish;

46
epmet-module/resi-partymember/resi-partymember-client/src/main/java/com/epmet/resi/partymember/dto/partyOrg/result/YearSearchResultDTO.java

@ -0,0 +1,46 @@
package com.epmet.resi.partymember.dto.partyOrg.result;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/8/22 09:27
* @DESC
*/
@Data
public class YearSearchResultDTO implements Serializable {
private static final long serialVersionUID = 8961924457475202790L;
private String type;
private String frequency;
private List<YearSearchActivityListDTO> activityList;
@Data
public static class YearSearchActivityListDTO implements Serializable{
private static final long serialVersionUID = -9050507457068805831L;
private String activityId;
private String staffId;
private String dateId;
private String topic;
private String address;
private String holdTime;
private String type;
private String isPublicValue;
private String isPublish;
private String joinTypeValue;
private String joinUserType;
private String isAutoInformValue;
private String autoInformDay;
private String autoPublicTime;
private List<ActAndScheduleListResultDTO.JoinOrgDTO> joinOrgList;
private List<String> joinOrgs;
private Boolean isMe = false;
}
}

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

@ -14,8 +14,10 @@ import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.ActAndScheduleListFormDTO;
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.result.ActAndScheduleListResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
@ -173,4 +175,19 @@ public class IcPartyActController {
}
return new Result();
}
/**
* Desc:党建日历生成年度活动计划查询
* @param tokenDto
* @param formDTO
* @author zxc
* @date 2022/8/22 09:33
*/
@PostMapping("yearSearch")
public Result<List<YearSearchResultDTO>> yearSearch(@LoginUser TokenDto tokenDto, @RequestBody YearSearchFormDTO formDTO){
formDTO.setStaffId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
return new Result<List<YearSearchResultDTO>>().ok(icPartyActService.yearSearch(formDTO));
}
}

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

@ -11,8 +11,10 @@ import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActDetailResDTO;
import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.ActAndScheduleListFormDTO;
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.result.ActAndScheduleListResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO;
import java.util.List;
import java.util.Map;
@ -96,4 +98,12 @@ public interface IcPartyActService extends BaseService<IcPartyActEntity> {
* @param icPartyActIds
*/
void deleteIcPartyAct(String customerId,String userId, List<String> icPartyActIds);
/**
* Desc: 党建日历生成年度活动计划查询
* @param formDTO
* @author zxc
* @date 2022/8/22 09:33
*/
List<YearSearchResultDTO> yearSearch(YearSearchFormDTO formDTO);
}

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

@ -36,8 +36,10 @@ import com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.IcPartyOrgDTO;
import com.epmet.resi.partymember.dto.partyOrg.form.ActAndScheduleListFormDTO;
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.result.ActAndScheduleListResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.HomeMonthTotalResultDTO;
import com.epmet.resi.partymember.dto.partyOrg.result.YearSearchResultDTO;
import com.epmet.send.SendMqMsgUtil;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
@ -328,6 +330,32 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart
return result;
}
/**
* Desc: 党建日历生成年度活动计划查询
* @param formDTO
* @author zxc
* @date 2022/8/22 09:33
*/
@Override
public List<YearSearchResultDTO> yearSearch(YearSearchFormDTO formDTO) {
ActAndScheduleListFormDTO secondForm = ConvertUtils.sourceToTarget(formDTO, ActAndScheduleListFormDTO.class);
secondForm.setSearchType("yearSearch");
disposeActAndScheduleListFormDTO(secondForm);
List<ActAndScheduleListResultDTO.ActivityListDTO> activityList = baseDao.getActivityList(secondForm);
List<YearSearchResultDTO> result = new ArrayList<>();
if (CollectionUtils.isNotEmpty(activityList)) {
disposeActivityList(secondForm, activityList);
Map<String, List<ActAndScheduleListResultDTO.ActivityListDTO>> groupByType = activityList.stream().collect(Collectors.groupingBy(ActAndScheduleListResultDTO.ActivityListDTO::getType));
groupByType.forEach((type,list) -> {
YearSearchResultDTO dto = new YearSearchResultDTO();
dto.setType(type);
dto.setActivityList(ConvertUtils.sourceToTarget(list, YearSearchResultDTO.YearSearchActivityListDTO.class));
result.add(dto);
});
}
return result;
}
/**
* Desc:
* @param formDTO
@ -340,11 +368,13 @@ public class IcPartyActServiceImpl extends BaseServiceImpl<IcPartyActDao, IcPart
throw new EpmetException("查询工作人员失败:"+formDTO.getStaffId());
}
formDTO.setAgencyId(staffInfo.getAgencyId());
IcPartyOrgDTO icPartyOrgDTO = partyOrgService.get(formDTO.getOrgId());
if (null == icPartyOrgDTO){
throw new EpmetException("未查询到党组织信息:"+formDTO.getOrgId());
if (!formDTO.getSearchType().equals("yearSearch")){
IcPartyOrgDTO icPartyOrgDTO = partyOrgService.get(formDTO.getOrgId());
if (null == icPartyOrgDTO){
throw new EpmetException("未查询到党组织信息:"+formDTO.getOrgId());
}
formDTO.setPath(icPartyOrgDTO.getOrgPids().equals("") || icPartyOrgDTO.getOrgPids().equals(NumConstant.ZERO_STR) ? icPartyOrgDTO.getId() : icPartyOrgDTO.getOrgPids().concat(":").concat(icPartyOrgDTO.getId()));
}
formDTO.setPath(icPartyOrgDTO.getOrgPids().equals("") || icPartyOrgDTO.getOrgPids().equals(NumConstant.ZERO_STR) ? icPartyOrgDTO.getId() : icPartyOrgDTO.getOrgPids().concat(":").concat(icPartyOrgDTO.getId()));
}

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

@ -30,6 +30,10 @@
<result property="isPublicValue" column="isPublicValue"/>
<result property="isPublish" column="isPublish"/>
<result property="type" column="type"/>
<result property="autoPublicTime" column="autoPublicTime"/>
<result property="autoInformDay" column="autoInformDay"/>
<result property="isAutoInformValue" column="isAutoInformValue"/>
<result property="isAutoInform" column="isAutoInform"/>
<collection property="joinOrgList" ofType="com.epmet.resi.partymember.dto.partyOrg.result.ActAndScheduleListResultDTO$JoinOrgDTO">
<result column="partyOrgId" property="partyOrgId"/>
</collection>
@ -40,6 +44,12 @@
pa.TOPIC,
pa.ADDRESS,
DATE_FORMAT(pa.HOLD_TIME,'%Y-%m-%d %H:%i:%s') AS holdTime,
(CASE WHEN pa.IS_AUTO_INFORM = '1' THEN '是'
WHEN pa.IS_AUTO_INFORM = '0' THEN '否'
ELSE '否' END) AS isAutoInformValue,
pa.IS_AUTO_INFORM as isAutoInform,
if(IS_AUTO_INFORM = '1',DATE_FORMAT(pa.AUTO_PUBLIC_TIME,'%Y-%m-%d %H:%i:%s'),'') AS autoPublicTime,
if(IS_AUTO_INFORM = '1',concat('活动开始前',pa.AUTO_PUBLIC_TYPE,'天'),'') as autoInformDay,
DATE_FORMAT(pa.HOLD_TIME,'%Y%m%d') AS dateId,
pa.ACT_TYPE AS type,
(CASE WHEN pa.JOIN_USER_TYPE = '1' THEN '支部委员'
@ -59,6 +69,9 @@
<if test='null != dateId and dateId != "" '>
AND DATE_FORMAT(pa.HOLD_TIME,'%Y%m%d') = #{dateId}
</if>
<if test='searchType == "yearSearch" '>
AND pa.ORG_ID_PATH like concat('%',#{agencyId},'%')
</if>
<if test=' isSelf == "1" '>
AND pa.PUBLISH_STAFF_ID = #{staffId}
</if>
@ -68,7 +81,9 @@
<if test='null != endDate and endDate != ""'>
AND DATE_FORMAT(pa.HOLD_TIME,'%Y%m%d') <![CDATA[ <= ]]> #{endDate}
</if>
AND pa.PUBLISH_ORG_PATH LIKE CONCAT(#{path},'%')
<if test='null != path and path != ""'>
AND pa.PUBLISH_ORG_PATH LIKE CONCAT(#{path},'%')
</if>
</select>
<select id="selectPageList" parameterType="com.epmet.resi.partymember.dto.icpartyact.form.IcPartyActPageFormDTO" resultType="com.epmet.resi.partymember.dto.icpartyact.result.IcPartyActPageResultDTO">

Loading…
Cancel
Save