diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/AuthOperationLogListener.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/AuthOperationLogListener.java index 6f8afd1418..10250f27a1 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/AuthOperationLogListener.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/mq/listener/listener/AuthOperationLogListener.java @@ -1,6 +1,7 @@ package com.epmet.mq.listener.listener; import com.alibaba.fastjson.JSON; +import com.epmet.auth.constants.AuthOperationConstants; import com.epmet.auth.constants.AuthOperationEnum; import com.epmet.commons.rocketmq.constants.MQUserPropertys; import com.epmet.commons.rocketmq.messages.LoginMQMsg; @@ -77,7 +78,11 @@ public class AuthOperationLogListener implements MessageListenerConcurrently { logEntity.setOperatorName(operatorInfo.getName()); logEntity.setOperatorMobile(operatorInfo.getMobile()); logEntity.setOperatingTime(msgObj.getLoginTime()); - logEntity.setContent("成功登录系统"); + if(AuthOperationConstants.LOGIN.equals(logEntity.getType())){ + logEntity.setContent("成功登录系统"); + }else{ + logEntity.setContent("成功退出系统"); + } DistributedLock distributedLock = null; RLock lock = null; diff --git a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java index 75eab372eb..9a9abeb5e5 100644 --- a/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java +++ b/epmet-admin/epmet-admin-server/src/main/java/com/epmet/service/impl/SysDictDataServiceImpl.java @@ -173,7 +173,7 @@ public class SysDictDataServiceImpl extends BaseServiceImpl getNationOption() { - String cacheKey = RedisKeys.getEducationOptions(); + String cacheKey = RedisKeys.getNationOptions(); List cachedDatas = JSON.parseObject(redisUtils.getString(cacheKey), new TypeReference>(){}); if (cachedDatas != null) { return cachedDatas; diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index bd1fff179d..e92f1a608f 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -1019,6 +1019,10 @@ public class RedisKeys { return rootPrefix.concat("icform:options:education"); } + public static String getNationOptions() { + return rootPrefix.concat("icform:options:nation"); + } + /** * 住房性质 * @author wxz diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java index 1217ea6875..e84928739d 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcPartyActivityDTO.java @@ -110,17 +110,30 @@ public class IcPartyActivityDTO implements Serializable { private String content; /** - * 服务人数 + * 服务人数;烟台:服务人数是活动限制名额,如果是0代表不限制 */ private Integer peopleCount; /** - * 活动时间 + * 活动时间;烟台:此列作为活动开始时间 */ @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - @JsonFormat(pattern="yyyy-MM-dd HH:mm") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date activityTime; + /** + * 烟台:此列作为活动结束时间;必填; + */ + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date activityEndTime; + + /** + * 烟台:活动封面;必填 + */ + private String coverUrl; + + /** * 活动地址 */ diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java index 76f6d485db..76fef2c33b 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivityFormDTO.java @@ -18,8 +18,16 @@ import java.util.Date; @Data public class PartyActivityFormDTO extends PageFormDTO implements Serializable { private static final long serialVersionUID = -2510068555703677L; - @NotBlank(message = "组织Id不能为空" ) + + public interface ResiDingQueryInternalGroup { + } + + + @NotBlank(message = "组织Id不能为空",groups = {ResiDingQueryInternalGroup.class}) private String agencyId; + + @NotBlank(message = "gridId不能为空",groups = {ResiDingQueryInternalGroup.class}) + private String gridId; private String unitId; private String title; @@ -31,4 +39,10 @@ public class PartyActivityFormDTO extends PageFormDTO implements Serializable { // private Integer pageNo; // private Integer pageSize; private String customerId; + + /** + * 居民端钉钉,传userId + */ + @NotBlank(message = "userId不能为空",groups = {ResiDingQueryInternalGroup.class}) + private String userId; } diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivitySignUpRecordFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivitySignUpRecordFormDTO.java new file mode 100644 index 0000000000..bb4dcc834f --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/PartyActivitySignUpRecordFormDTO.java @@ -0,0 +1,22 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.dto.form.PageFormDTO; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @Description 人员名单 + * @Author yzm + * @Date 2023/3/29 13:42 + */ +@Data +public class PartyActivitySignUpRecordFormDTO extends PageFormDTO implements Serializable { + /** + * 联建活动ID + */ + @NotBlank(message = "activityId不能为空", groups = AddUserInternalGroup.class) + private String activityId; +} + diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/SignUpParyActFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/SignUpParyActFormDTO.java new file mode 100644 index 0000000000..88a97b5cbb --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/SignUpParyActFormDTO.java @@ -0,0 +1,25 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.QueryGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; + +/** + * @Description + * @Author yzm + * @Date 2023/3/29 15:27 + */ +@Data +public class SignUpParyActFormDTO { + /** + * + */ + @NotBlank(message = "userId不能为空", groups = QueryGroup.class) + private String userId; + @NotBlank(message = "activityId不能为空", groups = QueryGroup.class) + private String activityId; + @NotBlank(message = "gridId不能为空", groups = QueryGroup.class) + private String gridId; +} + diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyActivityResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyActivityResDTO.java new file mode 100644 index 0000000000..bb10867388 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyActivityResDTO.java @@ -0,0 +1,46 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @Description 居民端钉钉,查看联建活动详情 + * @Author yzm + * @Date 2023/3/29 15:59 + */ +@Data +public class PartyActivityResDTO { + private String activityId; + private String agencyName; + private String agencyId; + private List unitNameList; + private List serviceMatterNameList; + private String title; + private String target; + private String content; + private Integer peopleCount; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date activityTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date activityEndTime; + private String coverUrl; + private String address; + private String result; + /** + * 报名记录id + */ + private String signUpId; + /** + * 已报名总人数 + */ + private Integer signUpCount; + /** + * 是否报名:true:已报名;false:未报名 + */ + private Boolean signUpFlag; + +} + diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyActivitySignUpRecordResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyActivitySignUpRecordResDTO.java new file mode 100644 index 0000000000..6151e149dc --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/PartyActivitySignUpRecordResDTO.java @@ -0,0 +1,61 @@ +package com.epmet.dto.result; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + + +/** + * 联建活动报名记录表(烟台需求) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-03-29 + */ +@Data +public class PartyActivitySignUpRecordResDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 主键 + */ + private String id; + + /** + * 客户id + */ + private String customerId; + + /** + * 联建活动ID + */ + private String activityId; + + /** + * 居民端用户id + */ + private String userId; + + /** + * 姓名 + */ + private String userName; + private String mobile; + /** + * 报名时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date signUpTime; + + /** + * 用户报名时所在的网格 + */ + private String gridId; + /** + * 网格名称:XXX社区-xxx网格 + */ + private String gridName; + +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java index 7e428aa6a0..0ed2488b12 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPartyActivityController.java @@ -24,6 +24,7 @@ import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.aop.NoRepeatSubmit; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; +import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; @@ -35,11 +36,16 @@ import com.epmet.commons.tools.utils.poi.excel.handler.FreezeAndFilter; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; +import com.epmet.commons.tools.validator.group.QueryGroup; import com.epmet.constants.ImportTaskConstants; import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.PartyActivityFormDTO; +import com.epmet.dto.form.PartyActivitySignUpRecordFormDTO; +import com.epmet.dto.form.SignUpParyActFormDTO; import com.epmet.dto.result.ImportTaskCommonResultDTO; +import com.epmet.dto.result.PartyActivityResDTO; +import com.epmet.dto.result.PartyActivitySignUpRecordResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcPartyActivityExcel; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; @@ -47,6 +53,7 @@ import com.epmet.service.IcPartyActivityService; import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.web.bind.annotation.*; @@ -60,9 +67,7 @@ import java.io.IOException; import java.io.InputStream; import java.net.URLEncoder; import java.nio.file.Path; -import java.util.Date; -import java.util.List; -import java.util.UUID; +import java.util.*; /** @@ -88,7 +93,7 @@ public class IcPartyActivityController implements ResultDataResolver { */ @PostMapping("search") public Result> page(@LoginUser TokenDto tokenDto,@RequestBody PartyActivityFormDTO formDTO){ - formDTO.setCustomerId(formDTO.getCustomerId()); + formDTO.setCustomerId(tokenDto.getCustomerId()); PageData page = icPartyActivityService.search(formDTO); return new Result>().ok(page); } @@ -253,5 +258,79 @@ public class IcPartyActivityController implements ResultDataResolver { } } + /** + * 人员名单 + * + * @param formDTO + * @return + */ + @PostMapping("querySignUpRecord") + public Result> querySignUpRecord(@RequestBody PartyActivitySignUpRecordFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, PageFormDTO.AddUserShowGroup.class,PageFormDTO.AddUserInternalGroup.class); + return new Result>().ok(icPartyActivityService.querySignUpRecord(formDTO.getActivityId(),formDTO.getPageNo(),formDTO.getPageSize())); + } + + /** + * 居民端钉钉,报名联建活动 + * + * @param formDTO + * @return + */ + @PostMapping("signUp") + public Result signUp(@RequestBody SignUpParyActFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, QueryGroup.class); + String signUpId = icPartyActivityService.signUp(formDTO.getActivityId(), formDTO.getUserId(), formDTO.getGridId()); + Map resultMap = new HashMap<>(); + resultMap.put("signUpId", signUpId); + return new Result().ok(resultMap); + } + + /** + * 居民端钉钉,查看联建活动详情 + * + * @param tokenDto + * @param activityId + * @return + */ + @PostMapping("act-detail-resi/{activityId}") + public Result queryActDetailForResi(@LoginUser TokenDto tokenDto, @PathVariable("activityId") String activityId) { + if (StringUtils.isBlank(activityId)) { + return new Result(); + } + return new Result().ok(icPartyActivityService.queryActDetailForResi(tokenDto.getCustomerId(),tokenDto.getUserId(),activityId)); + } + + /** + * 居民端钉钉,分页查询联建活动 + * + * @param formDTO + * @return + */ + @PostMapping("page-all-act") + public Result> pageAllAct(@RequestBody PartyActivityFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, PartyActivityFormDTO.ResiDingQueryInternalGroup.class); + return new Result>().ok( + icPartyActivityService.pageAllAct(formDTO.getPageNo(), + formDTO.getPageSize(), + formDTO.getGridId(), + formDTO.getAgencyId(), + formDTO.getUserId())); + } + + /** + * 居民端钉钉,已报名列表 + * @param formDTO + * @return + */ + @PostMapping("applied-act") + public Result> appliedAct(@RequestBody PartyActivityFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO, PartyActivityFormDTO.ResiDingQueryInternalGroup.class); + return new Result>().ok( + icPartyActivityService.appliedAct(formDTO.getPageNo(), + formDTO.getPageSize(), + formDTO.getGridId(), + formDTO.getAgencyId(), + formDTO.getUserId())); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcActivityUnitRelationDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcActivityUnitRelationDao.java index be27ce119b..9fb70cfb2b 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcActivityUnitRelationDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcActivityUnitRelationDao.java @@ -5,6 +5,8 @@ import com.epmet.entity.IcActivityUnitRelationEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; +import java.util.List; + /** * 联建活动与单位关联表 * @@ -22,4 +24,11 @@ public interface IcActivityUnitRelationDao extends BaseDao selectActivityUntiNames(String activityId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java index c8fba2ffed..23e764e4ec 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivityDao.java @@ -20,8 +20,10 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.dto.form.PartyActivityFormDTO; import com.epmet.dto.result.ActivityStatisticsDTO; +import com.epmet.dto.result.PartyActivityResDTO; import com.epmet.entity.IcPartyActivityEntity; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -54,4 +56,29 @@ public interface IcPartyActivityDao extends BaseDao { List getActivityList(PartyActivityFormDTO formDTO); + + /** + * + * @param gridId 当前用户所在网格id + * @param agencyId 当前用户所在网格所属组织id + * @param userId 居民端用户id,校验当前用户是否报名 + * @return 居民端钉钉-分页查询全部联建活动 + */ + List pageAllAct(@Param("customerId")String customerId, + @Param("gridId") String gridId, + @Param("agencyId")String agencyId, + @Param("userId")String userId); + + /** + * 居民端钉钉,已报名列表 + * @param customerId + * @param gridId + * @param agencyId + * @param userId + * @return + */ + List selectAppliedAct(@Param("customerId")String customerId, + @Param("gridId") String gridId, + @Param("agencyId")String agencyId, + @Param("userId")String userId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivitySignUpRecordDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivitySignUpRecordDao.java new file mode 100644 index 0000000000..a28ec3565a --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcPartyActivitySignUpRecordDao.java @@ -0,0 +1,24 @@ +package com.epmet.dao; + +import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.result.PartyActivitySignUpRecordResDTO; +import com.epmet.entity.IcPartyActivitySignUpRecordEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 联建活动报名记录表(烟台需求) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-03-29 + */ +@Mapper +public interface IcPartyActivitySignUpRecordDao extends BaseDao { + /** + * 人员名单 + * @param activityId + * @return + */ + List querySignUpRecord(String activityId); +} \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java index c01c80b4d4..7a0ef4f766 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceItemDictDao.java @@ -39,4 +39,13 @@ public interface IcServiceItemDictDao extends BaseDao { IcServiceItemDictEntity selectMax(String customerId); String selectName(@Param("customerId") String customerId, @Param("categoryCode") String categoryCode); + + /** + * 查询联建活动的服务事项名称 + * @param activityId + * @param customerId + * @return + */ + List selectActivityServiceItemName(@Param("activityId") String activityId, + @Param("customerId") String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java index f3ac1eb80b..7dc55e5fad 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java @@ -147,4 +147,13 @@ public interface IcUserDemandRecDao extends BaseDao { * @return */ Integer selectCountByServerId(String serverId); + + /*** + * 根据需求id查详情 + * @param demandRecId + * @return void + * @author qushutong + * @date 2023/3/30 17:37 + */ + IcUserDemandRecDTO selectInfoByDemandRecId(@Param("customerId") String customerId, @Param("demandRecId") String demandRecId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java index 28a588f6f4..630e95732d 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivityEntity.java @@ -83,14 +83,24 @@ public class IcPartyActivityEntity extends BaseEpmetEntity { private String content; /** - * 服务人数 + * 服务人数;烟台:服务人数是活动限制名额,如果是0代表不限制 */ private Integer peopleCount; /** - * 活动时间 + * 活动时间;烟台:此列作为活动开始时间 */ private Date activityTime; + /** + * 烟台:此列作为活动结束时间;必填; + */ + private Date activityEndTime; + + /** + * 烟台:活动封面;必填 + */ + private String coverUrl; + /** * 活动地址 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivitySignUpRecordEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivitySignUpRecordEntity.java new file mode 100644 index 0000000000..4917b0adf6 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcPartyActivitySignUpRecordEntity.java @@ -0,0 +1,54 @@ +package com.epmet.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.epmet.commons.mybatis.entity.BaseEpmetEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 联建活动报名记录表(烟台需求) + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2023-03-29 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("ic_party_activity_sign_up_record") +public class IcPartyActivitySignUpRecordEntity extends BaseEpmetEntity { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 联建活动ID + */ + private String activityId; + + /** + * 居民端用户id + */ + private String userId; + + /** + * 姓名 + */ + private String userName; + private String mobile; + /** + * 报名时间 + */ + private Date signUpTime; + + /** + * 用户报名时所在的网格 + */ + private String gridId; + private String gridName; +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java index 4b52917350..e7bdcaf3b8 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityExcel.java @@ -49,9 +49,20 @@ public class IcPartyActivityExcel { private Integer peopleCount; @ColumnWidth(20) - @ExcelProperty(value = "活动时间") + @ExcelProperty(value = "活动开始时间") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") private Date activityTime; + + + /** + * 烟台:此列作为活动结束时间;必填; + */ + @ColumnWidth(20) + @ExcelProperty(value = "活动结束时间") + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date activityEndTime; + + /** * actId不为空小程序 * 为空管理平台 diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityImportExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityImportExcel.java index 6998d20078..346993a2d0 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityImportExcel.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcPartyActivityImportExcel.java @@ -51,11 +51,20 @@ public class IcPartyActivityImportExcel extends ExcelVerifyInfo { @ExcelProperty(value = "服务人数*") private Integer peopleCount; - @NotNull(message = "活动时间不能为空") - @ExcelProperty("活动时间*") + @NotNull(message = "活动开始时间不能为空") + @ExcelProperty("活动开始时间*") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date activityTime; + /** + * 烟台:此列作为活动结束时间;必填; + */ + @NotNull(message = "活动结束时间不能为空") + @ExcelProperty("活动结束时间*") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date activityEndTime; + + @NotBlank(message = "详细地址") @Length(max = 250, message = "详细地址最多输入250字") @ExcelProperty(value = "详细地址*") diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcActivityUnitRelationService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcActivityUnitRelationService.java index 3d109db98b..fdc06e08bc 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcActivityUnitRelationService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcActivityUnitRelationService.java @@ -22,6 +22,13 @@ public interface IcActivityUnitRelationService extends BaseService getUnitList(String activityId); + /** + * 获取联建活动关联的联建单位名称 + * @param activityId + * @return + */ + List getActivityUntiNames(String activityId); + /** * 物理删除删除活动所属单位 * diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java index 22c559aace..41f597fb07 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPartyActivityService.java @@ -22,6 +22,8 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.form.PartyActivityFormDTO; +import com.epmet.dto.result.PartyActivityResDTO; +import com.epmet.dto.result.PartyActivitySignUpRecordResDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcPartyActivityEntity; @@ -127,4 +129,54 @@ public interface IcPartyActivityService extends BaseService querySignUpRecord(String activityId,Integer pageNo,Integer pageSize); + + /** + * 居民端钉钉,报名联建活动 + * @param activityId + * @param userId + * @param gridId + */ + String signUp(String activityId, String userId, String gridId); + + /** + * 居民端钉钉,查看联建活动详情 + * @param customerId + * @param userId + * @param activityId + * @return + */ + PartyActivityResDTO queryActDetailForResi(String customerId, String userId, String activityId); + + /** + * 居民端钉钉-分页查询全部联建活动 + * + * @param pageNo + * @param pageSize + * @param gridId + * @param userId + * @return + */ + PageData pageAllAct(Integer pageNo, Integer pageSize, String gridId, String agencyId,String userId); + + /** + * 居民端钉钉,已报名列表 + * @param pageNo + * @param pageSize + * @param gridId + * @param agencyId + * @param userId + * @return + */ + PageData appliedAct(Integer pageNo, + Integer pageSize, + String gridId, + String agencyId, + String userId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java index 92a6dc4ef6..9178b98d03 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceItemDictService.java @@ -83,4 +83,12 @@ public interface IcServiceItemDictService extends BaseService queryDictOption(String type, String customerId); + + /** + * 查询联建活动的,服务事项名称列表 + * @param activityId + * @param customerId + * @return + */ + List getByActivityId(String activityId, String customerId); } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcActivityUnitRelationServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcActivityUnitRelationServiceImpl.java index d7bedf1d0b..a52e4dd0bf 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcActivityUnitRelationServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcActivityUnitRelationServiceImpl.java @@ -43,6 +43,17 @@ public class IcActivityUnitRelationServiceImpl extends BaseServiceImpl getActivityUntiNames(String activityId) { + return baseDao.selectActivityUntiNames(activityId); + } + /** * 删除活动所属单位 * diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index 180877f027..70996fe308 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -24,28 +24,33 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; +import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.ExceptionUtils; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.*; import com.epmet.constants.ImportTaskConstants; import com.epmet.dao.IcPartyActivityDao; +import com.epmet.dao.IcPartyActivitySignUpRecordDao; import com.epmet.dto.IcPartyActivityDTO; import com.epmet.dto.IcPartyUnitDTO; import com.epmet.dto.form.ImportTaskCommonFormDTO; import com.epmet.dto.form.PartyActivityFormDTO; -import com.epmet.dto.result.ActivityStatisticsDTO; -import com.epmet.dto.result.UploadImgResultDTO; +import com.epmet.dto.result.*; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.entity.IcActivityServiceRelationEntity; import com.epmet.entity.IcActivityUnitRelationEntity; import com.epmet.entity.IcPartyActivityEntity; +import com.epmet.entity.IcPartyActivitySignUpRecordEntity; import com.epmet.excel.IcPartyActivityImportExcel; import com.epmet.excel.handler.IcPartyActivityImportListener; import com.epmet.feign.EpmetCommonServiceOpenFeignClient; +import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.OssFeignClient; import com.epmet.service.*; import com.github.pagehelper.PageHelper; @@ -57,6 +62,7 @@ import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.lang3.StringUtils; import org.apache.http.entity.ContentType; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -83,8 +89,8 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceMatterid = Arrays.asList(dto.getServiceMatter().split(StrConstant.COMMA)); List serviceMatterNameList=new ArrayList<>(); for(String id:serviceMatterid){ - String categoryName=icServiceItemDictService.getCategoryName(dto.getCustomerId(),id); + String categoryName=SpringContextUtils.getBean(IcServiceItemDictService.class).getCategoryName(dto.getCustomerId(),id); if(StringUtils.isNotBlank(categoryName)){ serviceMatterNameList.add(categoryName); } @@ -156,7 +166,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl(dtoList, pageInfo.getTotal()); + return new PageData<>(dtoList, pageInfo.getTotal(),formDTO.getPageSize()); } @Override @@ -201,7 +211,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl serviceItemList = icServiceItemDictService.queryDictList(entity.getCustomerId()); + List serviceItemList = SpringContextUtils.getBean(IcServiceItemDictService.class).queryDictList(entity.getCustomerId()); Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); List services = icActivityServiceRelationService.getServiceList(id); List serviceNames = services.stream().map(categoryMap::get).collect(Collectors.toList()); @@ -335,7 +345,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl option = icPartyUnitService.options(unitDTO).stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //获取服务事项字典 - List serviceItemList = icServiceItemDictService.queryDictList(tokenDto.getCustomerId()); + List serviceItemList = SpringContextUtils.getBean(IcServiceItemDictService.class).queryDictList(tokenDto.getCustomerId()); Map categoryMap = serviceItemList.stream().collect(Collectors.toMap(OptionDTO::getValue, OptionDTO::getLabel)); //数据组装 dtoList.forEach(dto -> { @@ -509,4 +519,164 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl querySignUpRecord(String activityId, Integer pageNo, Integer pageSize) { + PageHelper.startPage(pageNo, pageSize); + List list = partyActivitySignUpRecordDao.querySignUpRecord(activityId); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal(), pageSize); + } + + /** + * 居民端钉钉,报名联建活动 + * + * @param activityId + * @param userId + * @param gridId + */ + @Override + public String signUp(String activityId, String userId, String gridId) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(IcPartyActivitySignUpRecordEntity::getActivityId, activityId) + .eq(IcPartyActivitySignUpRecordEntity::getUserId, userId) + .select(IcPartyActivitySignUpRecordEntity::getId); + IcPartyActivitySignUpRecordEntity entity = partyActivitySignUpRecordDao.selectOne(queryWrapper); + if (null != entity) { + return entity.getId(); + } + // 查询网格名称 + GridInfoCache gridInfoCache = CustomerOrgRedis.getGridInfo(gridId); + if (null == gridInfoCache) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "网格信息查询异常gridId:" + gridId, "网格信息查询异常"); + } + // 查询用户姓名和手机号 + List userIdList=new ArrayList<>(); + userIdList.add(userId); + Result> userRes = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList); + if (!userRes.success() || CollectionUtils.isEmpty(userRes.getData())) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "网格信息查询异常gridId:" + gridId, "查询用户信息异常"); + } + UserBaseInfoResultDTO userBaseInfoResultDTO=userRes.getData().get(NumConstant.ZERO); + IcPartyActivitySignUpRecordEntity insert = new IcPartyActivitySignUpRecordEntity(); + insert.setActivityId(activityId); + insert.setCustomerId(EpmetRequestHolder.getLoginUserCustomerId()); + insert.setGridId(gridId); + insert.setGridName(gridInfoCache.getGridNamePath()); + insert.setUserId(userId); + insert.setUserName(userBaseInfoResultDTO.getRealName()); + insert.setMobile(userBaseInfoResultDTO.getMobile()); + insert.setSignUpTime(new Date()); + partyActivitySignUpRecordDao.insert(insert); + return insert.getId(); + } + + + /** + * 居民端钉钉,查看联建活动详情 + * + * @param customerId + * @param userId + * @param activityId + * @return + */ + @Override + public PartyActivityResDTO queryActDetailForResi(String customerId, String userId, String activityId) { + IcPartyActivityEntity activityEntity = baseDao.selectById(activityId); + if (null == activityEntity) { + throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "联建活动不存在,activityId:" + activityId, "联建活动不存在"); + } + PartyActivityResDTO resDTO = ConvertUtils.sourceToTarget(activityEntity, PartyActivityResDTO.class); + resDTO.setSignUpFlag(false); + resDTO.setActivityId(activityId); + + // 当前用户是否报名 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(IcPartyActivitySignUpRecordEntity::getActivityId, activityId) + .eq(IcPartyActivitySignUpRecordEntity::getUserId, userId) + .select(IcPartyActivitySignUpRecordEntity::getId); + IcPartyActivitySignUpRecordEntity signUpRecordEntity = partyActivitySignUpRecordDao.selectOne(queryWrapper); + if (null != signUpRecordEntity) { + resDTO.setSignUpId(signUpRecordEntity.getId()); + resDTO.setSignUpFlag(true); + } + // 主办方:组织名称 + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(resDTO.getAgencyId()); + if (null != agencyInfoCache) { + resDTO.setAgencyName(agencyInfoCache.getOrganizationName()); + } + // 联建单位: + resDTO.setUnitNameList(icActivityUnitRelationService.getActivityUntiNames(activityId)); + // 服务事项 + resDTO.setServiceMatterNameList(SpringContextUtils.getBean(IcServiceItemDictService.class).getByActivityId(activityId,activityEntity.getCustomerId())); + // 报名总人数 + LambdaQueryWrapper countWrapper = new LambdaQueryWrapper<>(); + countWrapper.eq(IcPartyActivitySignUpRecordEntity::getActivityId, activityId); + resDTO.setSignUpCount(partyActivitySignUpRecordDao.selectCount(countWrapper)); + return resDTO; + } + + + /** + * 居民端钉钉-分页查询全部联建活动 + * + * @param pageNo + * @param pageSize + * @param gridId + * @param userId + * @return + */ + @Override + public PageData pageAllAct(Integer pageNo, Integer pageSize, String gridId,String agencyId, String userId) { + PageHelper.startPage(pageNo,pageSize); + List list=baseDao.pageAllAct(EpmetRequestHolder.getLoginUserCustomerId(),gridId,agencyId,userId); + list.forEach(resDTO->{ + // 主办方:组织名称 + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(resDTO.getAgencyId()); + if (null != agencyInfoCache) { + resDTO.setAgencyName(agencyInfoCache.getOrganizationName()); + } + // 联建单位: + resDTO.setUnitNameList(icActivityUnitRelationService.getActivityUntiNames(resDTO.getActivityId())); + // 服务事项 + resDTO.setServiceMatterNameList(SpringContextUtils.getBean(IcServiceItemDictService.class).getByActivityId(resDTO.getActivityId(),EpmetRequestHolder.getLoginUserCustomerId())); + }); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal(),pageSize); + } + + /** + * 居民端钉钉,已报名列表 + * + * @param pageNo + * @param pageSize + * @param gridId + * @param agencyId + * @param userId + * @return + */ + @Override + public PageData appliedAct(Integer pageNo, Integer pageSize, String gridId, String agencyId, String userId) { + PageHelper.startPage(pageNo, pageSize); + List list = baseDao.selectAppliedAct(EpmetRequestHolder.getLoginUserCustomerId(), gridId, agencyId, userId); + list.forEach(resDTO -> { + // 主办方:组织名称 + AgencyInfoCache agencyInfoCache = CustomerOrgRedis.getAgencyInfo(resDTO.getAgencyId()); + if (null != agencyInfoCache) { + resDTO.setAgencyName(agencyInfoCache.getOrganizationName()); + } + // 联建单位: + resDTO.setUnitNameList(icActivityUnitRelationService.getActivityUntiNames(resDTO.getActivityId())); + // 服务事项 + resDTO.setServiceMatterNameList(SpringContextUtils.getBean(IcServiceItemDictService.class).getByActivityId(resDTO.getActivityId(), EpmetRequestHolder.getLoginUserCustomerId())); + }); + PageInfo pageInfo = new PageInfo<>(list); + return new PageData<>(list, pageInfo.getTotal(), pageSize); + } } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java index 1e7b7f0271..a8516d398a 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceItemDictServiceImpl.java @@ -226,5 +226,15 @@ public class IcServiceItemDictServiceImpl extends BaseServiceImpl getByActivityId(String activityId, String customerId) { + return baseDao.selectActivityServiceItemName(activityId,customerId); + } } \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 6a8f969d88..9be2bf967f 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; +import com.epmet.commons.rocketmq.messages.ServerSatisfactionCalFormDTO; import com.epmet.commons.tools.constant.AppClientConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.ServiceConstant; @@ -45,10 +46,7 @@ import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; -import com.epmet.constant.ReadFlagConstant; -import com.epmet.constant.SmsTemplateConstant; -import com.epmet.constant.UserDemandConstant; -import com.epmet.constant.UserMessageTypeConstant; +import com.epmet.constant.*; import com.epmet.dao.IcUserDemandOperateLogDao; import com.epmet.dao.IcUserDemandRecDao; import com.epmet.dao.IcUserDemandSatisfactionDao; @@ -1998,7 +1996,14 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml index e142f3680f..0d96fac179 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivityDao.xml @@ -52,7 +52,7 @@ a.ACT_ID, a.GRID_ID, ur.UNIT_ID, - GROUP_CONCAT( sr.SERVICE_MATTER ) AS serviceMatter, + GROUP_CONCAT( distinct sr.SERVICE_MATTER ) AS serviceMatter, a.TITLE, a.TARGET, a.CONTENT, @@ -63,7 +63,9 @@ a.LATITUDE, a.RESULT, a.AGENCY_ID, - a.CUSTOMER_ID + a.CUSTOMER_ID, + a.COVER_URL, + a.ACTIVITY_END_TIME FROM ic_party_activity a left join ic_activity_unit_relation ur @@ -89,8 +91,11 @@ AND sr.SERVICE_MATTER = #{serviceMatter} - - AND a.ACTIVITY_TIME BETWEEN #{startTime} AND #{endTime} + + AND a.ACTIVITY_TIME >= #{startTime} + + + AND a.ACTIVITY_TIME <= #{endTime} GROUP BY a.id ORDER BY a.ACTIVITY_TIME DESC @@ -159,4 +164,83 @@ + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivitySignUpRecordDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivitySignUpRecordDao.xml new file mode 100644 index 0000000000..c28b63da6c --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcPartyActivitySignUpRecordDao.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml index 4582741dbb..8359370be2 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceItemDictDao.xml @@ -41,4 +41,19 @@ d.CUSTOMER_ID = #{customerId} AND d.CATEGORY_CODE = #{categoryCode} + + + \ No newline at end of file diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 4fe2195446..9584288dc9 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -706,4 +706,24 @@ AND s.SERVER_ID = #{serverId} AND r.`STATUS` = 'assigned' + + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/icpartyactivity_import_tem.xlsx b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/icpartyactivity_import_tem.xlsx index 143cdaa637..a17cefb941 100644 Binary files a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/icpartyactivity_import_tem.xlsx and b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/templates/icpartyactivity_import_tem.xlsx differ diff --git a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java index 6c9bacafa8..749bdf4399 100644 --- a/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java +++ b/epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/IcEventReplyFormDTO.java @@ -46,6 +46,7 @@ public class IcEventReplyFormDTO implements Serializable { /** * 满意度 - 不满意:bad、基本满意:good、非常满意:perfect + * v2版本 传 1,2,3,4,5 */ @NotBlank(message = "满意度不能为空", groups = {Comment.class}) private String satisfaction; diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java index 5761c7bb7e..70b1bd82a3 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/controller/IcEventController.java @@ -301,6 +301,20 @@ public class IcEventController { return new Result(); } + /** + * @Author sun + * @Description 事件管理-评价 关联 联建单位 + **/ + @PostMapping("commentv2") + public Result commentv2(@LoginUser TokenDto tokenDto, @RequestBody IcEventReplyFormDTO formDTO) { + ValidatorUtils.validateEntity(formDTO, IcEventReplyFormDTO.Comment.class); + formDTO.setCustomerId(tokenDto.getCustomerId()); + formDTO.setUserId(tokenDto.getUserId()); + icEventService.comment(formDTO); + return new Result(); + } + + /** * @Author sun * @Description 事件管理-详情 diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java index 0df33e275a..c292f4031d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectSatisfactionDetailServiceImpl.java @@ -365,7 +365,9 @@ public class ProjectSatisfactionDetailServiceImpl extends BaseServiceImpl { - userAuthBadgeList.forEach(u -> { - if (ub.getBadgeId().equals(u.getBadgeId())){ + Boolean authFlag=false; + for (UserOperListResultDTO u : userAuthBadgeList) { + ub.setAuditStatus(StrConstant.EPMETY_STR); + if (ub.getBadgeId().equals(u.getBadgeId())) { ub.setIsReject(u.getAuditStatus().equals(BadgeConstant.REJECTED)); ub.setIsCertificated(u.getAuditStatus().equals(BadgeConstant.APPROVED) ? BadgeConstant.YES : BadgeConstant.NO); ub.setIsLighted(u.getIsOpened().equals(NumConstant.ZERO_STR) ? BadgeConstant.NO : BadgeConstant.YES); + ub.setAuditStatus(u.getAuditStatus()); + authFlag = true; } - }); + } + if (!authFlag) { + UserBadgeCertificateRecordEntity entity = userBadgeCertificateRecordDao.selectCertificateRecord(ub.getBadgeId(), userOperListFormDTO.getUserId()); + if (null == entity) { + //未申请 + ub.setIsReject(null); + ub.setIsLighted(BadgeConstant.NO); + ub.setAuditStatus(StrConstant.EPMETY_STR); + ub.setIsCertificated(BadgeConstant.NO); + } else { + //申请了,但是未通过的:rejected:审核驳回;auditing:审核中 + ub.setIsReject(entity.getAuditStatus().equals(BadgeConstant.REJECTED)); + ub.setIsLighted(BadgeConstant.NO); + ub.setAuditStatus(entity.getAuditStatus()); + ub.setIsCertificated(BadgeConstant.NO); + } + } + }); Map> collect = userOperListResultDTOS.stream().collect(Collectors.groupingBy(UserOperListResultDTO::getIsLighted)); List result = collect.get(BadgeConstant.YES); @@ -274,12 +298,13 @@ public class UserBadgeServiceImpl implements UserBadgeService { authFieldFormDTO.setBadgeId(certificationAddFormDTO.getBadgeId()); validateParams(certificationAddFormDTO, authFieldFormDTO); - if (StringUtils.isNotBlank(certificationAddFormDTO.getMobile())) { + //烟台不校验验证码 + /*if (StringUtils.isNotBlank(certificationAddFormDTO.getMobile())) { String smsCode = userBadgeRedis.getBadgeSmsCode(certificationAddFormDTO.getMobile()); if (!StringUtils.isNotBlank(smsCode)) { return new Result().error(EpmetErrorCode.MOBILE_CODE_ERROR.getCode()); } - } + }*/ // 0309:如果是党员徽章去判断居民信息-类别是否是党员 String auditRemark=""; BadgeEntity badgeEntity = badgeDao.selectBadgeInfo(EpmetRequestHolder.getLoginUserCustomerId(),certificationAddFormDTO.getBadgeId()); diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeCertificateRecordDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeCertificateRecordDao.xml index 2a58027d9c..bd895279b0 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeCertificateRecordDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeCertificateRecordDao.xml @@ -40,5 +40,17 @@ AND (AUDIT_STATUS = 'approved' OR AUDIT_STATUS = 'auditing') - + \ No newline at end of file diff --git a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml index f9f8390cd1..fb8acd52bb 100644 --- a/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml +++ b/epmet-user/epmet-user-server/src/main/resources/mapper/UserBadgeDao.xml @@ -73,7 +73,7 @@ CREATED_TIME DESC - +