Browse Source

Merge remote-tracking branch 'remotes/origin/develop' into release_temp

dev
jianjun 4 years ago
parent
commit
2db99088fd
  1. 6
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java
  2. 6
      epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictTypeDTO.java
  3. 22
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictDataEntity.java
  4. 23
      epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictTypeEntity.java
  5. 2
      epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml
  6. 2
      epmet-module/data-report/data-report-server/pom.xml
  7. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java
  8. 4
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDetailFormDTO.java
  9. 112
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java
  10. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandDetailResDTO.java
  11. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java
  12. 39
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java
  13. 14
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  14. 276
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  15. 10
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java
  16. 3
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java
  17. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java
  18. 9
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java
  19. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java
  20. 24
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventListResultDTO.java
  21. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java
  22. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventListResultDTO.java
  23. 2
      epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UserMentionResultDTO.java
  24. 112
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
  25. 2
      epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml
  26. 26
      epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.17__event_scan.sql
  27. 83
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml
  28. 2
      epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventMentionDao.xml
  29. 1
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserResiInfoResultDTO.java
  30. 5
      epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml

6
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictDataDTO.java

@ -32,7 +32,7 @@ public class SysDictDataDTO implements Serializable {
@Null(message="{id.null}", groups = AddGroup.class) @Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class) @NotNull(message="{id.require}", groups = UpdateGroup.class)
private Long id; private String id;
@NotNull(message="{sysdict.type.require}", groups = DefaultGroup.class) @NotNull(message="{sysdict.type.require}", groups = DefaultGroup.class)
private Long dictTypeId; private Long dictTypeId;
@ -50,8 +50,8 @@ public class SysDictDataDTO implements Serializable {
private Integer sort; private Integer sort;
@JsonProperty(access = JsonProperty.Access.READ_ONLY) @JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createDate; private Date createdTime;
@JsonProperty(access = JsonProperty.Access.READ_ONLY) @JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date updateDate; private Date updatedTime;
} }

6
epmet-admin/epmet-admin-client/src/main/java/com/epmet/dto/SysDictTypeDTO.java

@ -33,7 +33,7 @@ public class SysDictTypeDTO implements Serializable {
@Null(message="{id.null}", groups = AddGroup.class) @Null(message="{id.null}", groups = AddGroup.class)
@NotNull(message="{id.require}", groups = UpdateGroup.class) @NotNull(message="{id.require}", groups = UpdateGroup.class)
private Long id; private String id;
@NotBlank(message="{sysdict.type.require}", groups = DefaultGroup.class) @NotBlank(message="{sysdict.type.require}", groups = DefaultGroup.class)
private String dictType; private String dictType;
@ -47,8 +47,8 @@ public class SysDictTypeDTO implements Serializable {
private Integer sort; private Integer sort;
@JsonProperty(access = JsonProperty.Access.READ_ONLY) @JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date createDate; private Date createdTime;
@JsonProperty(access = JsonProperty.Access.READ_ONLY) @JsonProperty(access = JsonProperty.Access.READ_ONLY)
private Date updateDate; private Date updatedTime;
} }

22
epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictDataEntity.java

@ -8,15 +8,13 @@
package com.epmet.entity; package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEntity; import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date;
/** /**
* 数据字典 * 数据字典
* *
@ -25,8 +23,10 @@ import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper=false)
@TableName("sys_dict_data") @TableName("sys_dict_data")
public class SysDictDataEntity extends BaseEntity { public class SysDictDataEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(type = IdType.ID_WORKER_STR)
private String id;
/** /**
* 字典类型ID * 字典类型ID
*/ */
@ -51,14 +51,4 @@ public class SysDictDataEntity extends BaseEntity {
* 排序 * 排序
*/ */
private Integer sort; private Integer sort;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
} }

23
epmet-admin/epmet-admin-server/src/main/java/com/epmet/entity/SysDictTypeEntity.java

@ -8,15 +8,13 @@
package com.epmet.entity; package com.epmet.entity;
import com.baomidou.mybatisplus.annotation.FieldFill; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.epmet.commons.mybatis.entity.BaseEntity; import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
import java.util.Date;
/** /**
* 字典类型 * 字典类型
* *
@ -25,8 +23,11 @@ import java.util.Date;
@Data @Data
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper=false)
@TableName("sys_dict_type") @TableName("sys_dict_type")
public class SysDictTypeEntity extends BaseEntity { public class SysDictTypeEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(type = IdType.ID_WORKER_STR)
private String id;
/** /**
* 字典类型 * 字典类型
*/ */
@ -43,14 +44,4 @@ public class SysDictTypeEntity extends BaseEntity {
* 排序 * 排序
*/ */
private Integer sort; private Integer sort;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
} }

2
epmet-module/data-report/data-report-server/deploy/docker-compose-prod.yml

@ -2,7 +2,7 @@ version: "3.7"
services: services:
data-report-server: data-report-server:
container_name: data-report-server-prod container_name: data-report-server-prod
image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:0.3.195 image: registry-vpc.cn-qingdao.aliyuncs.com/epmet-cloud-master/data-report-server:0.3.196
ports: ports:
- "8108:8108" - "8108:8108"
network_mode: host # 使用现有网络 network_mode: host # 使用现有网络

2
epmet-module/data-report/data-report-server/pom.xml

@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<version>0.3.195</version> <version>0.3.196</version>
<artifactId>data-report-server</artifactId> <artifactId>data-report-server</artifactId>
<parent> <parent>

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandAddFromDTO.java

@ -10,6 +10,9 @@ import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
/**
* pc录入需求入参
*/
@Data @Data
public class DemandAddFromDTO implements Serializable { public class DemandAddFromDTO implements Serializable {

4
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/DemandDetailFormDTO.java

@ -5,6 +5,10 @@ import lombok.Data;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import java.io.Serializable; import java.io.Serializable;
/**
* 需求大厅-需求详情入参
* 我的需求-需求详情入参
*/
@Data @Data
public class DemandDetailFormDTO implements Serializable { public class DemandDetailFormDTO implements Serializable {
private static final long serialVersionUID = 514538389753713095L; private static final long serialVersionUID = 514538389753713095L;

112
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ReportDemandFormDTO.java

@ -0,0 +1,112 @@
package com.epmet.dto.form.demand;
import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
/**
* 居民端-上报需求或者修改需求
*/
@Data
public class ReportDemandFormDTO implements Serializable {
private static final long serialVersionUID = -2931148629441558468L;
public interface Add extends CustomerClientShowGroup {
}
public interface AddInternalGroup {
}
public interface Update extends CustomerClientShowGroup {
}
public interface UpdateInternalGroup {
}
@NotBlank(message = "需求id不能为空",groups = UpdateInternalGroup.class)
private String demandRecId;
@NotBlank(message = "customerId不能为空", groups = {AddInternalGroup.class, UpdateInternalGroup.class})
private String customerId;
/**
* 网格id
*/
@NotBlank(message = "所属网格不能为空",groups = {AddInternalGroup.class})
private String gridId;
/**
* 需求内容1000字
*/
@NotBlank(message = "需求内容不能为空", groups = {Add.class, Update.class})
@Length(max = 1000, message = "需求内容至多输入1000字", groups = {Add.class, Update.class})
private String content;
/**
* 二级需求分类编码
*/
@NotBlank(message = "需求类别不能为空",groups = Add.class)
private String categoryCode;
/**
* 父级需求分类编码
*/
@NotBlank(message = "父级分类不能为空",groups = Add.class)
private String parentCode;
/**
* 希望服务时间
*/
@NotNull(message = "服务时间不能为空",groups = {Add.class, Update.class})
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date wantServiceTime;
/**
* 需求人user.id或者ic_resi_user.id
*/
@NotBlank(message = "需求人不能为空",groups ={AddInternalGroup.class, UpdateInternalGroup.class})
private String demandUserId;
/**
* 需求人联系姓名
*/
@NotBlank(message = "联系人不能为空",groups = {Add.class, Update.class})
private String demandUserName;
/**
* 需求人联系电话
*/
@NotBlank(message = "联系电话不能为空",groups = {Add.class, Update.class})
private String demandUserMobile;
/**
* 服务地点工作端指派默认居民居住房屋地址居民端地图选择
*/
@NotBlank(message = "服务地点不能为空",groups = {Add.class, Update.class})
private String serviceLocation;
/**
* 门牌号详细地址
*/
@Length(max = 200, message = "门牌号至多输入200字", groups = {Add.class, Update.class})
private String locationDetail;
/**
* 经度,需求人是ic的居民时取所住楼栋的中心点位
*/
private String longitude;
/**
* 纬度,需求人是ic的居民时取所住楼栋的中心点位
*/
private String latitude;
}

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/demand/DemandDetailResDTO.java

@ -98,7 +98,8 @@ public class DemandDetailResDTO implements Serializable {
* 服务记录主键 * 服务记录主键
*/ */
private String serviceId; private String serviceId;
@JsonIgnore
private String serverId;
// 以下几个返参在我的需求详情中返回: // 以下几个返参在我的需求详情中返回:
private String serviceType; private String serviceType;
private String serviceUserName; private String serviceUserName;

9
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/constant/UserDemandConstant.java

@ -64,4 +64,13 @@ public interface UserDemandConstant {
* pc完成情况完成+评价 * pc完成情况完成+评价
*/ */
String FINISH_AND_EVALUATE="finish_and_evaluate"; String FINISH_AND_EVALUATE="finish_and_evaluate";
String MESSAGE_TITILE="您有一条需求消息";
String HAVE_SERVICE="您提出的需求将由%s为您解决,请查看";
String FINISH_DEMAND_MESSAGE="您提出的需求已完成,请进行服务评价。";
/**
* 您收到来自张三的评价请查看
*/
String DEMAND_EVALUATED=" 您收到来自%s的评价,请查看。";
String DEMAND_CANCELED=" %s的需求已取消,请查看。";
} }

39
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/ResiDemandController.java

@ -3,6 +3,7 @@ package com.epmet.controller;
import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO; import com.epmet.commons.rocketmq.messages.CalPartyUnitSatisfactionFormDTO;
import com.epmet.commons.tools.annotation.LoginUser; 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.NumConstant;
import com.epmet.commons.tools.dto.form.PageFormDTO; import com.epmet.commons.tools.dto.form.PageFormDTO;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
@ -16,6 +17,7 @@ import com.epmet.dto.result.demand.*;
import com.epmet.feign.EpmetMessageOpenFeignClient; import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.service.IcUserDemandRecService; import com.epmet.service.IcUserDemandRecService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
@ -75,6 +77,7 @@ public class ResiDemandController {
* @param tokenDto * @param tokenDto
* @return * @return
*/ */
@NoRepeatSubmit
@PostMapping("takeorder") @PostMapping("takeorder")
public Result<TakeOrderResultDTO> takeOrder(@LoginUser TokenDto tokenDto, @RequestBody TakeOrderFormDTO formDTO) { public Result<TakeOrderResultDTO> takeOrder(@LoginUser TokenDto tokenDto, @RequestBody TakeOrderFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId()); formDTO.setUserId(tokenDto.getUserId());
@ -89,6 +92,7 @@ public class ResiDemandController {
* @param formDTO * @param formDTO
* @return * @return
*/ */
@NoRepeatSubmit
@PostMapping("finish") @PostMapping("finish")
public Result finish(@LoginUser TokenDto tokenDto, @RequestBody FinishStaffFromDTO formDTO) { public Result finish(@LoginUser TokenDto tokenDto, @RequestBody FinishStaffFromDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());
@ -108,6 +112,7 @@ public class ResiDemandController {
* @param formDTO * @param formDTO
* @return * @return
*/ */
@NoRepeatSubmit
@PostMapping("evaluate") @PostMapping("evaluate")
public Result evaluate(@LoginUser TokenDto tokenDto, @RequestBody EvaluateDemandFormDTO formDTO) { public Result evaluate(@LoginUser TokenDto tokenDto, @RequestBody EvaluateDemandFormDTO formDTO) {
formDTO.setUserId(tokenDto.getUserId()); formDTO.setUserId(tokenDto.getUserId());
@ -138,6 +143,7 @@ public class ResiDemandController {
* @param formDTO * @param formDTO
* @return * @return
*/ */
@NoRepeatSubmit
@PostMapping("cancel") @PostMapping("cancel")
public Result cancel(@LoginUser TokenDto tokenDto,@RequestBody CancelDemandFormDTO formDTO){ public Result cancel(@LoginUser TokenDto tokenDto,@RequestBody CancelDemandFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId()); formDTO.setCustomerId(tokenDto.getCustomerId());
@ -161,5 +167,38 @@ public class ResiDemandController {
ValidatorUtils.validateEntity(formDTO,PageFormDTO.AddUserInternalGroup.class,ResiClientMyDemandFormDTO.AddUserInternalGroup.class); ValidatorUtils.validateEntity(formDTO,PageFormDTO.AddUserInternalGroup.class,ResiClientMyDemandFormDTO.AddUserInternalGroup.class);
return new Result<List<ResiClientMyDemandResDTO>>().ok(icUserDemandRecService.queryMyDemandForResiClient(formDTO)); return new Result<List<ResiClientMyDemandResDTO>>().ok(icUserDemandRecService.queryMyDemandForResiClient(formDTO));
} }
/**
* 我的需求-需求详情待处理处理中已完成已取消
*
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("my-detail")
public Result<DemandDetailResDTO> queryMyDetail(@LoginUser TokenDto tokenDto, @RequestBody DemandDetailFormDTO formDTO) {
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO, DemandDetailFormDTO.AddUserInternalGroup.class);
return new Result<DemandDetailResDTO>().ok(icUserDemandRecService.queryMyDetail(formDTO));
}
/**
* 居民端-我的需求提交需求修改需求
* @param tokenDto
* @param formDTO
* @return
*/
@NoRepeatSubmit
@PostMapping("submit")
public Result<DemandRecId> saveOrUpdateDemand(@LoginUser TokenDto tokenDto,@RequestBody ReportDemandFormDTO formDTO){
//需求人默认是当前用户id
formDTO.setDemandUserId(tokenDto.getUserId());
formDTO.setCustomerId(tokenDto.getCustomerId());
if(StringUtils.isNotBlank(formDTO.getDemandRecId())){
ValidatorUtils.validateEntity(formDTO,ReportDemandFormDTO.Update.class,ReportDemandFormDTO.UpdateInternalGroup.class);
}else{
ValidatorUtils.validateEntity(formDTO,ReportDemandFormDTO.Add.class,ReportDemandFormDTO.AddInternalGroup.class);
}
return new Result<DemandRecId>().ok(icUserDemandRecService.saveOrUpdateDemand(formDTO));
}
} }

14
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java

@ -190,4 +190,18 @@ public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntit
* @return * @return
*/ */
List<ResiClientMyDemandResDTO> queryMyDemandForResiClient(ResiClientMyDemandFormDTO formDTO); List<ResiClientMyDemandResDTO> queryMyDemandForResiClient(ResiClientMyDemandFormDTO formDTO);
/**
* 我的需求-需求详情待处理处理中已完成已取消
* @param formDTO
* @return
*/
DemandDetailResDTO queryMyDetail(DemandDetailFormDTO formDTO);
/**
* 居民端-我的需求提交需求修改需求
* @param formDTO
* @return
*/
DemandRecId saveOrUpdateDemand(ReportDemandFormDTO formDTO);
} }

276
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -20,6 +20,7 @@ package com.epmet.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.AppClientConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.constant.StrConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
@ -30,20 +31,21 @@ import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.Result;
import com.epmet.constant.ReadFlagConstant;
import com.epmet.constant.UserDemandConstant; import com.epmet.constant.UserDemandConstant;
import com.epmet.constant.UserMessageTypeConstant;
import com.epmet.dao.IcUserDemandOperateLogDao; import com.epmet.dao.IcUserDemandOperateLogDao;
import com.epmet.dao.IcUserDemandRecDao; import com.epmet.dao.IcUserDemandRecDao;
import com.epmet.dao.IcUserDemandSatisfactionDao; import com.epmet.dao.IcUserDemandSatisfactionDao;
import com.epmet.dao.IcUserDemandServiceDao; import com.epmet.dao.IcUserDemandServiceDao;
import com.epmet.dto.*; import com.epmet.dto.*;
import com.epmet.dto.form.CustomerGridFormDTO; import com.epmet.dto.form.*;
import com.epmet.dto.form.FindIcUserFormDTO;
import com.epmet.dto.form.ResiUserFormDTO;
import com.epmet.dto.form.demand.*; import com.epmet.dto.form.demand.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.dto.result.demand.*; import com.epmet.dto.result.demand.*;
import com.epmet.entity.*; import com.epmet.entity.*;
import com.epmet.feign.EpmetAdminOpenFeignClient; import com.epmet.feign.EpmetAdminOpenFeignClient;
import com.epmet.feign.EpmetMessageOpenFeignClient;
import com.epmet.feign.EpmetUserOpenFeignClient; import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.*; import com.epmet.service.*;
@ -92,6 +94,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
private IcSocietyOrgService societyOrgService; private IcSocietyOrgService societyOrgService;
@Autowired @Autowired
private IcCommunitySelfOrganizationService communitySelfOrganizationService; private IcCommunitySelfOrganizationService communitySelfOrganizationService;
@Autowired
private EpmetMessageOpenFeignClient messageOpenFeignClient;
@Override @Override
public IcUserDemandRecDTO get(String id) { public IcUserDemandRecDTO get(String id) {
@ -331,6 +335,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
logEntity.setActionCode(UserDemandConstant.CANCEL); logEntity.setActionCode(UserDemandConstant.CANCEL);
logEntity.setOperateTime(entity.getCancelTime()); logEntity.setOperateTime(entity.getCancelTime());
operateLogDao.insert(logEntity); operateLogDao.insert(logEntity);
//3、查看是否已经有志愿者接单,或者pc已经指派给志愿者了,通知它需求需求
sendVolunnterCanceled(entity);
} }
/** /**
@ -375,7 +381,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
serviceEntity.setUpdatedBy(formDTO.getUserId()); serviceEntity.setUpdatedBy(formDTO.getUserId());
demandServiceDao.updateById(serviceEntity); demandServiceDao.updateById(serviceEntity);
} }
// 4、如果需求是小程序端上报的,提醒需求人,服务已指派
sendDemandUserHaveOrgService(entity,formDTO.getServerId(),formDTO.getServiceType());
} }
/** /**
@ -421,6 +428,9 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
//3.4更新主表已评价标识,是否解决标识。 //3.4更新主表已评价标识,是否解决标识。
entity.setEvaluateFlag(true); entity.setEvaluateFlag(true);
entity.setFinishResult(formDTO.getFinishResult()); entity.setFinishResult(formDTO.getFinishResult());
//3.5如果需求是志愿者完成的,发送消息:您收到来自XXX的评价,请查看。
sendVolunnterEvaluated(entity);
} }
//4、修改主表状态为已完成 //4、修改主表状态为已完成
@ -431,6 +441,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
finishResultDTO.setServerId(serviceEntity.getServerId()); finishResultDTO.setServerId(serviceEntity.getServerId());
finishResultDTO.setServiceType(serviceEntity.getServiceType()); finishResultDTO.setServiceType(serviceEntity.getServiceType());
finishResultDTO.setAwardPoint(entity.getAwardPoint()); finishResultDTO.setAwardPoint(entity.getAwardPoint());
// 5、如果是居民端用户提出的需求,发消息:您提出的需求已完成,请进行服务评价。
sendDemandUserFinished(entity);
return finishResultDTO; return finishResultDTO;
} }
@ -995,6 +1007,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
demandServiceDao.updateById(origin); demandServiceDao.updateById(origin);
serviceId=origin.getId(); serviceId=origin.getId();
} }
this.sendDemandUserHaveVolunnteerService(entity,formDTO.getUserId());
takeOrderResultDTO.setServiceId(serviceId); takeOrderResultDTO.setServiceId(serviceId);
return takeOrderResultDTO; return takeOrderResultDTO;
} }
@ -1041,6 +1054,8 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
finishResultDTO.setServerId(serviceEntity.getServerId()); finishResultDTO.setServerId(serviceEntity.getServerId());
finishResultDTO.setServiceType(serviceEntity.getServiceType()); finishResultDTO.setServiceType(serviceEntity.getServiceType());
finishResultDTO.setAwardPoint(entity.getAwardPoint()); finishResultDTO.setAwardPoint(entity.getAwardPoint());
//5、我的需求-评价:如果服务方是志愿者,通知它: 您收到来自山东路-张先生的评价,请查看。
sendVolunnterEvaluated(entity);
return finishResultDTO; return finishResultDTO;
} }
@ -1175,4 +1190,257 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
return userInfoMap; return userInfoMap;
} }
/**
* 我的需求-需求详情待处理处理中已完成已取消
*
* @param formDTO
* @return
*/
@Override
public DemandDetailResDTO queryMyDetail(DemandDetailFormDTO formDTO) {
DemandRecResultDTO demandRecResultDTO = baseDao.selectDemandRecDetail(formDTO.getCustomerId(), formDTO.getDemandRecId());
if (null != demandRecResultDTO) {
DemandDetailResDTO resDto = ConvertUtils.sourceToTarget(demandRecResultDTO, DemandDetailResDTO.class);
//1、设置分类名称
IcResiDemandDictEntity demandDictEntity = demandDictService.getByCode(formDTO.getCustomerId(), resDto.getCategoryCode());
if (null != demandDictEntity) {
resDto.setCategoryName(demandDictEntity.getCategoryName());
}
//2、志愿者(姓名、手机号
//3、区域化党建单位、社会组织、社区自组织 设置负责人和手机
switch (resDto.getServiceType()) {
case UserDemandConstant.PARTY_UNIT:
Map<String, IcPartyUnitEntity> partyUnitMap = getPartyUnitMap(Arrays.asList(resDto.getServerId()));
resDto.setServiceUnitName(partyUnitMap.get(resDto.getServerId()).getUnitName());
resDto.setServiceUserName(partyUnitMap.get(resDto.getServerId()).getContact());
resDto.setServiceUserMobile(partyUnitMap.get(resDto.getServerId()).getContactMobile());
break;
case UserDemandConstant.SOCIAL_ORG:
Map<String, IcSocietyOrgEntity> socialOrgMap = getSocialOrgMap(Arrays.asList(resDto.getServerId()));
resDto.setServiceUnitName(socialOrgMap.get(resDto.getServerId()).getSocietyName());
resDto.setServiceUserName(socialOrgMap.get(resDto.getServerId()).getPersonInCharge());
resDto.setServiceUserMobile(socialOrgMap.get(resDto.getServerId()).getMobile());
break;
case UserDemandConstant.COMMUNITY_ORG:
Map<String, IcCommunitySelfOrganizationEntity> communityOrgMap = getCommunityOrgMap(Arrays.asList(resDto.getServerId()));
resDto.setServiceUnitName(communityOrgMap.get(resDto.getServerId()).getOrganizationName());
resDto.setServiceUserName(communityOrgMap.get(resDto.getServerId()).getPrincipalName());
resDto.setServiceUserMobile(communityOrgMap.get(resDto.getServerId()).getPrincipalPhone());
break;
case UserDemandConstant.VOLUNTEER:
Map<String, UserBaseInfoResultDTO> userInfoMap = getVolunteerMap(new HashSet<>(Arrays.asList(resDto.getServerId())));
resDto.setServiceUnitName(StrConstant.EPMETY_STR);
resDto.setServiceUserName(userInfoMap.get(resDto.getServerId()).getRealName());
resDto.setServiceUserMobile(userInfoMap.get(resDto.getServerId()).getMobile());
break;
default:
log.warn("serviceType 错误");
break;
}
return resDto;
}
return null;
}
/**
* 居民端-我的需求提交需求修改需求
*
* @param formDTO
* @return
*/
@Override
public DemandRecId saveOrUpdateDemand(ReportDemandFormDTO formDTO) {
Date now = new Date();
DemandRecId resultDto = new DemandRecId();
resultDto.setDemandRecId(formDTO.getDemandRecId());
if (StringUtils.isNotBlank(formDTO.getDemandRecId())) {
//修改需求
IcUserDemandRecEntity origin = baseDao.selectById(formDTO.getDemandRecId());
if (null == origin) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "需求不存在", EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getMsg());
}
if (!UserDemandConstant.PENDING.equals(origin.getStatus())) {
//待处理的才可以修改需求
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), String.format("需求当前状态为【%s】,不允许重新编辑", origin.getStatus()), "需求已处理,不允许重新编辑");
}
origin.setContent(formDTO.getContent());
origin.setWantServiceTime(formDTO.getWantServiceTime());
origin.setDemandUserName(formDTO.getDemandUserName());
origin.setDemandUserMobile(formDTO.getDemandUserMobile());
origin.setServiceLocation(formDTO.getServiceLocation());
origin.setLatitude(formDTO.getLatitude());
origin.setLongitude(formDTO.getLongitude());
origin.setLocationDetail(formDTO.getLocationDetail());
baseDao.updateById(origin);
} else {
CustomerGridFormDTO customerGridFormDTO = new CustomerGridFormDTO();
customerGridFormDTO.setGridId(formDTO.getGridId());
Result<CustomerGridDTO> gridInfoRes = govOrgOpenFeignClient.getGridBaseInfoByGridId(customerGridFormDTO);
if (!gridInfoRes.success() || null == gridInfoRes.getData()) {
throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "查询网格信息失败");
}
IcUserDemandRecEntity insertEntity = ConvertUtils.sourceToTarget(formDTO, IcUserDemandRecEntity.class);
insertEntity.setAgencyId(gridInfoRes.getData().getPid());
insertEntity.setGridPids(gridInfoRes.getData().getPids());
insertEntity.setDemandUserType(UserDemandConstant.MINI_RESI);
insertEntity.setStatus(UserDemandConstant.PENDING);
insertEntity.setEvaluateFlag(false);
//设置上报人消息
insertEntity.setReportType(UserDemandConstant.SELF_HELP_REPORT);
insertEntity.setReportTime(now);
insertEntity.setReportUserId(formDTO.getDemandUserId());
insertEntity.setReportUserMobile(formDTO.getDemandUserMobile());
insertEntity.setReportUserName(formDTO.getDemandUserName());
//记录发放积分
IcResiDemandDictEntity icResiDemandDictEntity = demandDictService.getByCode(formDTO.getCustomerId(), formDTO.getCategoryCode());
if (null != icResiDemandDictEntity) {
insertEntity.setAwardPoint(icResiDemandDictEntity.getAwardPoint());
}
baseDao.insert(insertEntity);
resultDto.setDemandRecId(insertEntity.getId());
}
//插入操作日志
IcUserDemandOperateLogEntity logEntity = new IcUserDemandOperateLogEntity();
logEntity.setCustomerId(formDTO.getCustomerId());
logEntity.setDemandRecId(resultDto.getDemandRecId());
logEntity.setUserType(UserDemandConstant.RESI);
logEntity.setUserId(formDTO.getDemandUserId());
logEntity.setActionCode(StringUtils.isNotBlank(formDTO.getDemandRecId()) ? UserDemandConstant.UPDATE : UserDemandConstant.CREATE);
logEntity.setOperateTime(now);
operateLogDao.insert(logEntity);
return resultDto;
}
/**
* 我的需求被抢单->您提出的需求将由青岛亿联科技有限公司为您解决请查看
*/
private void sendDemandUserHaveVolunnteerService(IcUserDemandRecEntity entity, String volunteerUserId) {
// 如果需求人是小程序里的用户,需要通知需求人:
// 您提出的需求将由青岛亿联科技有限公司为您解决,请查看。
// 您提出的需求将由张三为您解决,请查看。
if (UserDemandConstant.MINI_RESI.equals(entity.getDemandUserType())) {
UserResiInfoListFormDTO formDTO = new UserResiInfoListFormDTO();
formDTO.setUserIdList(Arrays.asList(volunteerUserId));
Result<List<UserResiInfoResultDTO>> userRes = epmetUserOpenFeignClient.getUserResiInfoList(formDTO);
if (userRes.success() && CollectionUtils.isNotEmpty(userRes.getData())) {
String volunteerName=userRes.getData().get(NumConstant.ZERO).getRealName();
UserMessageFormDTO userMessage = new UserMessageFormDTO();
userMessage.setApp(AppClientConstant.APP_RESI);
userMessage.setCustomerId(entity.getCustomerId());
userMessage.setGridId(entity.getGridId());
String messageContent = String.format(UserDemandConstant.HAVE_SERVICE, volunteerName);
userMessage.setMessageContent(messageContent);
userMessage.setReadFlag(ReadFlagConstant.UN_READ);
userMessage.setTitle(UserDemandConstant.MESSAGE_TITILE);
userMessage.setMessageType(UserMessageTypeConstant.DEMAND);
userMessage.setTargetId(entity.getId());
//通知需求提出人
userMessage.setUserId(entity.getDemandUserId());
messageOpenFeignClient.saveUserMessage(userMessage);
}
}
}
/**
* 您提出的需求将由青岛亿联科技有限公司为您解决请查看
*/
private void sendDemandUserHaveOrgService(IcUserDemandRecEntity entity, String serverId, String serviceType) {
// 如果需求人是小程序里的用户,需要通知需求人:
// 您提出的需求将由青岛亿联科技有限公司为您解决,请查看。
String serviceName = "";
if (UserDemandConstant.PARTY_UNIT.equals(serviceType)) {
IcPartyUnitDTO data = partyUnitService.get(serverId);
serviceName = null != data ? data.getUnitName() : StrConstant.EPMETY_STR;
} else if (UserDemandConstant.SOCIAL_ORG.equals(serviceType)) {
Map<String, IcSocietyOrgEntity> map = getSocialOrgMap(Arrays.asList(serverId));
serviceName = MapUtils.isNotEmpty(map) ? map.get(serverId).getSocietyName() : StrConstant.EPMETY_STR;
} else if (UserDemandConstant.COMMUNITY_ORG.equals(serviceType)) {
Map<String, IcCommunitySelfOrganizationEntity> communityOrgMap = getCommunityOrgMap(Arrays.asList(serverId));
serviceName = MapUtils.isNotEmpty(communityOrgMap) ? communityOrgMap.get(serverId).getOrganizationName() : StrConstant.EPMETY_STR;
}
if (StringUtils.isNotBlank(serviceName)) {
UserMessageFormDTO userMessage = new UserMessageFormDTO();
userMessage.setApp(AppClientConstant.APP_RESI);
userMessage.setCustomerId(entity.getCustomerId());
userMessage.setGridId(entity.getGridId());
String messageContent = String.format(UserDemandConstant.HAVE_SERVICE, serviceName);
userMessage.setMessageContent(messageContent);
userMessage.setReadFlag(ReadFlagConstant.UN_READ);
userMessage.setTitle(UserDemandConstant.MESSAGE_TITILE);
userMessage.setMessageType(UserMessageTypeConstant.DEMAND);
userMessage.setTargetId(entity.getId());
//通知需求提出人
userMessage.setUserId(entity.getDemandUserId());
messageOpenFeignClient.saveUserMessage(userMessage);
}
}
/**
* 我的需求服务完成->您提出的需求已完成请进行服务评价
*/
private void sendDemandUserFinished(IcUserDemandRecEntity entity) {
if (UserDemandConstant.MINI_RESI.equals(entity.getDemandUserType())) {
UserMessageFormDTO userMessage = new UserMessageFormDTO();
userMessage.setApp(AppClientConstant.APP_RESI);
userMessage.setCustomerId(entity.getCustomerId());
userMessage.setGridId(entity.getGridId());
String messageContent = UserDemandConstant.FINISH_DEMAND_MESSAGE;
userMessage.setMessageContent(messageContent);
userMessage.setReadFlag(ReadFlagConstant.UN_READ);
userMessage.setTitle(UserDemandConstant.MESSAGE_TITILE);
userMessage.setMessageType(UserMessageTypeConstant.DEMAND);
userMessage.setTargetId(entity.getId());
//通知需求提出人
userMessage.setUserId(entity.getDemandUserId());
messageOpenFeignClient.saveUserMessage(userMessage);
}
}
/**
* 我的需求-评价如果服务方是志愿者通知TA: 您收到来自张三的评价请查看
*/
private void sendVolunnterEvaluated(IcUserDemandRecEntity entity) {
IcUserDemandServiceEntity serviceEntity = demandServiceDao.selectByRecId(entity.getId());
if (null != serviceEntity && UserDemandConstant.VOLUNTEER.equals(serviceEntity.getServiceType())) {
UserMessageFormDTO userMessage = new UserMessageFormDTO();
userMessage.setApp(AppClientConstant.APP_RESI);
userMessage.setCustomerId(entity.getCustomerId());
userMessage.setGridId(entity.getGridId());
String messageContent = String.format(UserDemandConstant.DEMAND_EVALUATED, entity.getDemandUserName());
userMessage.setMessageContent(messageContent);
userMessage.setReadFlag(ReadFlagConstant.UN_READ);
userMessage.setTitle(UserDemandConstant.MESSAGE_TITILE);
userMessage.setMessageType(UserMessageTypeConstant.DEMAND);
userMessage.setTargetId(entity.getId());
//通知志愿者
userMessage.setUserId(serviceEntity.getServerId());
messageOpenFeignClient.saveUserMessage(userMessage);
}
}
/**
* 我的需求-取消需求未完成的都可以取消如果需求已经被小程序里的志愿者接单通知它->XXX的需求已取消请查看
* pc指派给志愿者的如果取消了也要通知
* @param entity
*/
private void sendVolunnterCanceled(IcUserDemandRecEntity entity) {
IcUserDemandServiceEntity serviceEntity = demandServiceDao.selectByRecId(entity.getId());
if (null != serviceEntity && UserDemandConstant.VOLUNTEER.equals(serviceEntity.getServiceType())) {
UserMessageFormDTO userMessage = new UserMessageFormDTO();
userMessage.setApp(AppClientConstant.APP_RESI);
userMessage.setCustomerId(entity.getCustomerId());
userMessage.setGridId(entity.getGridId());
String messageContent = String.format(UserDemandConstant.DEMAND_CANCELED, entity.getDemandUserName());
userMessage.setMessageContent(messageContent);
userMessage.setReadFlag(ReadFlagConstant.UN_READ);
userMessage.setTitle(UserDemandConstant.MESSAGE_TITILE);
userMessage.setMessageType(UserMessageTypeConstant.DEMAND);
userMessage.setTargetId(entity.getId());
//通知志愿者
userMessage.setUserId(serviceEntity.getServerId());
messageOpenFeignClient.saveUserMessage(userMessage);
}
}
} }

10
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/form/AppointmentFormDTO.java

@ -51,4 +51,14 @@ public class AppointmentFormDTO implements Serializable {
* 备注 * 备注
*/ */
private String remark; private String remark;
/**
* 组织ID
*/
private String orgId;
/**
* 组织类型grid网格agency组织
*/
private String orgType;
} }

3
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/HouseController.java

@ -146,10 +146,9 @@ public class HouseController {
List<Integer> numList = new ArrayList<>(); List<Integer> numList = new ArrayList<>();
if(!CollectionUtils.isEmpty(failList)){ if(!CollectionUtils.isEmpty(failList)){
for ( IcHouseExcel entity : failList) { for ( IcHouseExcel entity : failList) {
log.error("第{}行,{}",entity.getRowNum(),entity.getErrorMsg());//打印失败的行 和失败的信息 log.warn("第{}行,{}",entity.getRowNum(),entity.getErrorMsg());//打印失败的行 和失败的信息
numList.add(entity.getRowNum()); numList.add(entity.getRowNum());
} }
//return new Result().error(8001,failList.get(0).getErrorMsg());
} }
List<IcHouseExcel> result =importResult.getList(); List<IcHouseExcel> result =importResult.getList();

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/NeighborHoodController.java

@ -60,7 +60,7 @@ import java.util.stream.Collectors;
@RestController @RestController
@RequestMapping("neighborhood") @RequestMapping("neighborhood")
public class NeighborHoodController { public class NeighborHoodController {
@Autowired @Autowired
private IcNeighborHoodService icNeighborHoodService; private IcNeighborHoodService icNeighborHoodService;
@Autowired @Autowired
@ -210,7 +210,7 @@ public class NeighborHoodController {
List<Integer> numList = new ArrayList<>(); List<Integer> numList = new ArrayList<>();
if(!CollectionUtils.isEmpty(failList)){ if(!CollectionUtils.isEmpty(failList)){
for ( IcNeighborHoodExcel entity : failList) { for ( IcNeighborHoodExcel entity : failList) {
log.error("第{}行,{}",entity.getRowNum(),entity.getErrorMsg());//打印失败的行 和失败的信息 log.warn("第{}行,{}",entity.getRowNum(),entity.getErrorMsg());//打印失败的行 和失败的信息
numList.add(entity.getRowNum()); numList.add(entity.getRowNum());
} }
//return new Result().error(8001,failList.get(0).getErrorMsg()); //return new Result().error(8001,failList.get(0).getErrorMsg());
@ -231,4 +231,4 @@ public class NeighborHoodController {
} }

9
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPartyServiceCenterServiceImpl.java

@ -300,8 +300,13 @@ public class IcPartyServiceCenterServiceImpl extends BaseServiceImpl<IcPartyServ
} }
IcMatterAppointmentRecordEntity e = ConvertUtils.sourceToTarget(formDTO, IcMatterAppointmentRecordEntity.class); IcMatterAppointmentRecordEntity e = ConvertUtils.sourceToTarget(formDTO, IcMatterAppointmentRecordEntity.class);
e.setCustomerId(customerId); e.setCustomerId(customerId);
e.setOrgId(staffInfo.getAgencyId()); if (StringUtils.isNotBlank(formDTO.getOrgId())){
e.setOrgType(PartyServiceCenterConstant.ORG_TYPE_AGENCY); e.setOrgId(formDTO.getOrgId());
e.setOrgType(formDTO.getOrgType());
}else {
e.setOrgId(staffInfo.getAgencyId());
e.setOrgType(PartyServiceCenterConstant.ORG_TYPE_AGENCY);
}
e.setPid(agencyInfo.getPid()); e.setPid(agencyInfo.getPid());
e.setPids(agencyInfo.getPids()); e.setPids(agencyInfo.getPids());
e.setStatus(PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING); e.setStatus(PartyServiceCenterConstant.APPOINTMENT_STATUS_APPOINTING);

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/form/ResiEventFormDTO.java

@ -34,7 +34,7 @@ public class ResiEventFormDTO implements Serializable {
/** /**
* 事件内容最多1000 * 事件内容最多1000
*/ */
@Length(min = 1, max = 1000, message = "请填写内容,最多输入1000字", groups = AddUserShowGroup.class) @Length(max = 1000, message = "请填写内容,最多输入1000字", groups = AddUserShowGroup.class)
private String eventContent; private String eventContent;
/** /**

24
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/EventListResultDTO.java

@ -1,5 +1,6 @@
package com.epmet.dto.result; package com.epmet.dto.result;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -45,4 +46,27 @@ public class EventListResultDTO implements Serializable {
*/ */
private List<String> eventImgs; private List<String> eventImgs;
/**
* 语音附件url集合
*/
private List<String> voiceList;
/**
* 事件附件
*/
@JsonIgnore
private List<Attachment> attachmentList;
@Data
public static class Attachment {
/**
* url
*/
private String url;
/**
* 附件类型
*/
private String type;
}
} }

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/NewEventsResultDTO.java

@ -40,7 +40,7 @@ public class NewEventsResultDTO implements Serializable {
* 事件附件 * 事件附件
*/ */
@JsonIgnore @JsonIgnore
private List<EventDetailResultDTO.Attachment> attachmentList; private List<Attachment> attachmentList;
@Data @Data
public static class Attachment { public static class Attachment {

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/ResiEventListResultDTO.java

@ -69,7 +69,7 @@ public class ResiEventListResultDTO implements Serializable {
* 事件附件 * 事件附件
*/ */
@JsonIgnore @JsonIgnore
private List<EventDetailResultDTO.Attachment> attachmentList; private List<Attachment> attachmentList;
@Data @Data
public static class Attachment { public static class Attachment {

2
epmet-module/gov-project/gov-project-client/src/main/java/com/epmet/dto/result/UserMentionResultDTO.java

@ -68,7 +68,7 @@ public class UserMentionResultDTO implements Serializable {
* 事件附件 * 事件附件
*/ */
@JsonIgnore @JsonIgnore
private List<EventDetailResultDTO.Attachment> attachmentList; private List<Attachment> attachmentList;
@Data @Data
public static class Attachment { public static class Attachment {

112
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

@ -125,6 +125,20 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
PageHelper.startPage(formDTO.getPageNo(),formDTO.getPageSize()); PageHelper.startPage(formDTO.getPageNo(),formDTO.getPageSize());
List<EventListResultDTO> result = baseDao.eventUnDisposedList(formDTO.getOrgId(), formDTO.getEventType()); List<EventListResultDTO> result = baseDao.eventUnDisposedList(formDTO.getOrgId(), formDTO.getEventType());
if (!CollectionUtils.isEmpty(result)){ if (!CollectionUtils.isEmpty(result)){
//附件按类型分组【图片、语音】
result.forEach(re->{
List<String> eventImgs = new ArrayList<>();
List<String> voiceList = new ArrayList<>();
re.getAttachmentList().forEach(file->{
if ("image".equals(file.getType())) {
eventImgs.add(file.getUrl());
} else if ("voice".equals(file.getType())) {
voiceList.add(file.getUrl());
}
});
re.setEventImgs(eventImgs);
re.setVoiceList(voiceList);
});
return result; return result;
} }
return new ArrayList<>(); return new ArrayList<>();
@ -322,7 +336,50 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
}); });
//5-2.插入语音附件 //5-2.插入语音附件
if(!org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getVoiceList())) { if(!org.apache.commons.collections4.CollectionUtils.isEmpty(formDTO.getVoiceList())) {
eventVoiceAttachment(formDTO.getCustomerId(), resiEventEntity.getId(), formDTO.getVoiceList()); //语音附件处理【创建阿里安全审核任务】
//5-2-1.语音附件存入表中
List<VoiceTaskDTO> voiceDTOList = new ArrayList<>();
int sort = 1;//原本下标从0开始 图片的用了1就保持一致从1开始
for (FileCommonDTO file : formDTO.getVoiceList()) {
ResiEventAttachmentEntity entity = new ResiEventAttachmentEntity();
entity.setCustomerId(formDTO.getCustomerId());
entity.setResiEventId(resiEventEntity.getId());
entity.setAttachmentName(file.getName());
entity.setAttachmentFormat(file.getFormat());
entity.setAttachmentType(file.getType());
entity.setAttachmentUrl(file.getUrl());
entity.setSort(sort);
entity.setStatus(TopicConstant.AUDITING);
sort++;
resiEventAttachmentDao.insert(entity);
VoiceTaskDTO task = new VoiceTaskDTO();
task.setDataId(entity.getId());
task.setUrl(file.getUrl());
voiceDTOList.add(task);
}
//5-2-2.语音创建审核任务【定时任务会处理待审核语音后修改数据库数据】
VoiceScanParamDTO voiceScanParamDTO = new VoiceScanParamDTO();
voiceScanParamDTO.setTasks(voiceDTOList);
voiceScanParamDTO.setOpenCallBack(false);
Result<AsyncScanResult> voiceScanResult = ScanContentUtils.voiceAsyncScan(scanApiUrl.concat(voiceAsyncScanMethod), voiceScanParamDTO);
if (!voiceScanResult.success() || !voiceScanResult.getData().isAllSuccess()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
List<AsyncScanTaskDTO> taskList = voiceScanResult.getData().getSuccessTasks();
//提交记录存入task表
List<ResiEventScanTaskEntity> scanTaskEntityList = taskList.stream().map(item -> {
ResiEventScanTaskEntity taskEntity = new ResiEventScanTaskEntity();
taskEntity.setCustomerId(formDTO.getCustomerId());
taskEntity.setResiEventId(resiEventEntity.getId());
taskEntity.setResiEventAttachmentId(item.getDataId());
taskEntity.setTaskId(item.getTaskId());
taskEntity.setStatus(TopicConstant.AUDITING);
taskEntity.setAttachmentType(TopicConstant.VOICE);
return taskEntity;
}).collect(Collectors.toList());
resiEventScanTaskService.insertBatch(scanTaskEntityList);
}
} }
//6、插入组织表 //6、插入组织表
List<ResiEventReportOrgEntity> orgEntityList=getOrgList(formDTO.getCustomerId(),resiEventEntity.getId(),formDTO.getOrgList()); List<ResiEventReportOrgEntity> orgEntityList=getOrgList(formDTO.getCustomerId(),resiEventEntity.getId(),formDTO.getOrgList());
@ -401,62 +458,13 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
entity.setAttachmentType(img.getType()); entity.setAttachmentType(img.getType());
entity.setAttachmentUrl(img.getUrl()); entity.setAttachmentUrl(img.getUrl());
entity.setSort(sort); entity.setSort(sort);
entity.setStatus(TopicConstant.AUTO_PASSED);
sort++; sort++;
list.add(entity); list.add(entity);
} }
return list; return list;
} }
/**
* @Author sun
* @Description 事件-语音附件处理创建审核任务
**/
private void eventVoiceAttachment(String customerId, String resiEventId, List<FileCommonDTO> voiceList) {
//1.语音附件存入表中
List<VoiceTaskDTO> voiceDTOList = new ArrayList<>();
int sort = 0;
for (FileCommonDTO file : voiceList) {
ResiEventAttachmentEntity entity = new ResiEventAttachmentEntity();
entity.setCustomerId(customerId);
entity.setResiEventId(resiEventId);
entity.setAttachmentName(file.getName());
entity.setAttachmentFormat(file.getFormat());
entity.setAttachmentType(file.getType());
entity.setAttachmentUrl(file.getUrl());
entity.setSort(sort);
sort++;
resiEventAttachmentDao.insert(entity);
VoiceTaskDTO task = new VoiceTaskDTO();
task.setDataId(entity.getId());
task.setUrl(file.getUrl());
voiceDTOList.add(task);
}
//2.语音创建审核任务【定时任务会处理待审核语音后修改数据库数据】
VoiceScanParamDTO voiceScanParamDTO = new VoiceScanParamDTO();
voiceScanParamDTO.setTasks(voiceDTOList);
voiceScanParamDTO.setOpenCallBack(false);
Result<AsyncScanResult> voiceScanResult = ScanContentUtils.voiceAsyncScan(scanApiUrl.concat(voiceAsyncScanMethod), voiceScanParamDTO);
if (!voiceScanResult.success() || !voiceScanResult.getData().isAllSuccess()) {
throw new RenException(EpmetErrorCode.SERVER_ERROR.getCode());
} else {
List<AsyncScanTaskDTO> taskList = voiceScanResult.getData().getSuccessTasks();
List<String> taskIds = taskList.stream().map(AsyncScanTaskDTO::getTaskId).collect(Collectors.toList());
//提交记录存入task表
List<ResiEventScanTaskEntity> scanTaskEntityList = taskList.stream().map(item -> {
ResiEventScanTaskEntity taskEntity = new ResiEventScanTaskEntity();
taskEntity.setCustomerId(customerId);
taskEntity.setResiEventId(resiEventId);
taskEntity.setResiEventAttachmentId(item.getDataId());
taskEntity.setTaskId(item.getTaskId());
taskEntity.setStatus(TopicConstant.AUDITING);
taskEntity.setAttachmentType(TopicConstant.VOICE);
return taskEntity;
}).collect(Collectors.toList());
resiEventScanTaskService.insertBatch(scanTaskEntityList);
}
}
private void scanContent(String eventContent, List<FileCommonDTO> attachmentList) { private void scanContent(String eventContent, List<FileCommonDTO> attachmentList) {
//事件内容 //事件内容
if (StringUtils.isNotBlank(eventContent)) { if (StringUtils.isNotBlank(eventContent)) {
@ -1017,7 +1025,7 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
//草稿状态更新为auto_passed //草稿状态更新为auto_passed
ResiEventEntity draftEntity = new ResiEventEntity(); ResiEventEntity draftEntity = new ResiEventEntity();
draftEntity.setId(draftId); draftEntity.setId(draftId);
draftEntity.setAuditStatus(EventConstant.REVIEW); draftEntity.setAuditStatus(EventConstant.AUTO_PASSED);
baseDao.updateById(draftEntity); baseDao.updateById(draftEntity);
} }
}); });

2
epmet-module/gov-project/gov-project-server/src/main/resources/bootstrap.yml

@ -122,6 +122,8 @@ openapi:
method: method:
imgSyncScan: /imgSyncScan imgSyncScan: /imgSyncScan
textSyncScan: /textSyncScan textSyncScan: /textSyncScan
voiceAsyncScan: /voiceAsyncScan
voiceResults: /voiceResults
#pageHelper分页插件 #pageHelper分页插件
pagehelper: pagehelper:

26
epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.17__event_scan.sql

@ -0,0 +1,26 @@
ALTER TABLE `resi_event`
ADD COLUMN `AUDIT_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'auto_passed' COMMENT '事件审核状态[涉及附件审核需要加的状态](审核中:auditing; \r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;\r\nrejected:人工审核驳回;\r\napproved:人工审核通过)' AFTER `UPDATED_TIME`,
ADD COLUMN `AUDIT_REASON` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审核理由' AFTER `AUDIT_STATUS`;
CREATE TABLE `resi_event_scan_task` (
`ID` varchar(64) NOT NULL COMMENT '唯一标识',
`CUSTOMER_ID` varchar(64) NOT NULL COMMENT '客户ID',
`RESI_EVENT_ID` varchar(64) NOT NULL COMMENT '事件Id,关联resi_event的id',
`RESI_EVENT_ATTACHMENT_ID` varchar(64) NOT NULL COMMENT '事件附件表主键,对应dataId',
`TASK_ID` varchar(64) NOT NULL COMMENT '阿里云审核任务Id',
`STATUS` varchar(32) NOT NULL COMMENT '审核状态【auditing: 审核中;\r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;】',
`ATTACHMENT_TYPE` varchar(64) NOT NULL COMMENT '附件类型(视频 - video、 语音 - voice 文件 - doc)',
`DEL_FLAG` char(1) NOT NULL COMMENT '删除标识:0.未删除 1.已删除',
`REVISION` int(11) NOT NULL COMMENT '乐观锁',
`CREATED_BY` varchar(64) NOT NULL COMMENT '操作人,API审核结果,存储为SCAN_USER或者APP_USER',
`CREATED_TIME` datetime NOT NULL COMMENT '创建时间',
`UPDATED_BY` varchar(32) NOT NULL COMMENT '更新人',
`UPDATED_TIME` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='事件附件安全校验任务表';
ALTER TABLE `resi_event_attachment`
ADD COLUMN `STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'auto_passed' COMMENT '附件状态(审核中:auditing; \r\nauto_passed: 自动通过;\r\nreview:结果不确定,需要人工审核;\r\nblock: 结果违规;\r\nrejected:人工审核驳回;\r\napproved:人工审核通过)\r\n现在图片是同步审核的,所以图片只有auto_passed一种状态' AFTER `UPDATED_TIME`,
ADD COLUMN `REASON` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '失败原因' AFTER `STATUS`;

83
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventDao.xml

@ -10,46 +10,51 @@
<result property="eventTime" column="eventTime"/> <result property="eventTime" column="eventTime"/>
<result property="isProject" column="isProject"/> <result property="isProject" column="isProject"/>
<result property="redDot" column="redDot"/> <result property="redDot" column="redDot"/>
<collection property="eventImgs" ofType="java.lang.String"> <collection property="attachmentList" ofType="com.epmet.dto.result.EventListResultDTO$Attachment">
<result column="img"/> <result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 -->
<result column="url" property="url"/>
<result column="type" property="type"/>
</collection> </collection>
</resultMap> </resultMap>
<select id="eventUnDisposedList" resultMap="eventUnDisposedListMap"> <select id="eventUnDisposedList" resultMap="eventUnDisposedListMap">
SELECT rea.ATTACHMENT_URL AS img,t.* FROM SELECT
(SELECT rea.id AS resiEventAttachmentId,
re.EVENT_CONTENT AS eventContent, rea.ATTACHMENT_URL AS url,
<if test='eventType == "undisposed" '> rea.ATTACHMENT_TYPE AS type,
IFNULL(DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, t.*
</if> FROM
<if test='eventType == "processed" '> (
IFNULL(DATE_FORMAT(re.LATEST_OPERATED_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, SELECT
</if> re.EVENT_CONTENT AS eventContent,
<if test='eventType == "transferred" '> <if test='eventType == "undisposed" '>
IFNULL(DATE_FORMAT(re.CLOSE_CASE_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime, IFNULL(DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime,
</if> </if>
re.ID AS eventId, <if test='eventType == "processed" '>
(CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject, IFNULL(DATE_FORMAT(re.LATEST_OPERATED_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime,
(CASE WHEN ro.RED_DOT = 1 THEN TRUE ELSE FALSE END) AS redDot </if>
FROM resi_event_report_org ro <if test='eventType == "transferred" '>
INNER JOIN resi_event re ON (ro.RESI_EVENT_ID = re.ID AND re.DEL_FLAG = '0' AND re.audit_status = 'auto_passed') IFNULL(DATE_FORMAT(re.CLOSE_CASE_TIME,'%Y-%m-%d %H:%i'),'') AS eventTime,
AND ro.DEL_FLAG = '0' </if>
and ro.ORG_ID = #{orgId} re.ID AS eventId,
<if test='eventType == "undisposed" '> (CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject,
AND ro.ORG_READ = 'un_read' (CASE WHEN ro.RED_DOT = 1 THEN TRUE ELSE FALSE END) AS redDot
</if> FROM resi_event_report_org ro
<if test='eventType == "processed" '> INNER JOIN resi_event re ON (ro.RESI_EVENT_ID = re.ID AND re.DEL_FLAG = '0' AND re.audit_status = 'auto_passed')
AND ro.ORG_READ = 'read' AND ro.DEL_FLAG = '0'
AND re.`STATUS` = 'processing' AND ro.ORG_ID = #{orgId}
</if> <if test='eventType == "undisposed" '>
<if test='eventType == "transferred" '> AND ro.ORG_READ = 'un_read'
AND ro.ORG_READ = 'read' </if>
AND re.`STATUS` = 'closed_case' <if test='eventType == "processed" '>
</if> AND ro.ORG_READ = 'read'
AND re.`STATUS` = 'processing'
</if>
<if test='eventType == "transferred" '>
AND ro.ORG_READ = 'read'
AND re.`STATUS` = 'closed_case'
</if>
)t )t
LEFT JOIN resi_event_attachment rea LEFT JOIN resi_event_attachment rea ON (rea.resi_event_id = t.eventId AND rea.del_flag = '0' AND rea.attachment_type = 'image')
ON (rea.RESI_EVENT_ID = t.eventId
and rea.DEL_FLAG = '0'
AND rea.ATTACHMENT_TYPE = 'image')
<if test='eventType == "undisposed" '> <if test='eventType == "undisposed" '>
ORDER BY t.eventTime,rea.sort asc ORDER BY t.eventTime,rea.sort asc
</if> </if>
@ -126,6 +131,7 @@
<result column="eventImg"/> <result column="eventImg"/>
</collection>--> </collection>-->
<collection property="attachmentList" ofType="com.epmet.dto.result.EventDetailResultDTO$Attachment"> <collection property="attachmentList" ofType="com.epmet.dto.result.EventDetailResultDTO$Attachment">
<result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 -->
<result column="url" property="url"/> <result column="url" property="url"/>
<result column="type" property="type"/> <result column="type" property="type"/>
</collection> </collection>
@ -146,6 +152,7 @@
(CASE WHEN re.READ_FLAG = 1 THEN FALSE ELSE TRUE END) AS isRollback, (CASE WHEN re.READ_FLAG = 1 THEN FALSE ELSE TRUE END) AS isRollback,
(CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject, (CASE WHEN re.SHIFT_PROJECT = 1 THEN TRUE ELSE FALSE END) AS isProject,
IFNULL(re.project_id,'') AS projectId, IFNULL(re.project_id,'') AS projectId,
ea.id AS resiEventAttachmentId,
ea.ATTACHMENT_URL AS url, ea.ATTACHMENT_URL AS url,
ea.ATTACHMENT_TYPE AS type, ea.ATTACHMENT_TYPE AS type,
IF(ISNULL(em.USER_SHOW_NAME),NULL,concat('人大代表-',em.USER_SHOW_NAME)) AS person, IF(ISNULL(em.USER_SHOW_NAME),NULL,concat('人大代表-',em.USER_SHOW_NAME)) AS person,
@ -186,6 +193,7 @@
<result property="eventTime" column="eventTime"/> <result property="eventTime" column="eventTime"/>
<result property="eventId" column="eventId"/> <result property="eventId" column="eventId"/>
<collection property="attachmentList" ofType="com.epmet.dto.result.NewEventsResultDTO$Attachment"> <collection property="attachmentList" ofType="com.epmet.dto.result.NewEventsResultDTO$Attachment">
<result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 -->
<result column="url" property="url"/> <result column="url" property="url"/>
<result column="type" property="type"/> <result column="type" property="type"/>
</collection> </collection>
@ -197,6 +205,7 @@
SELECT SELECT
IFNULL(re.EVENT_CONTENT,'') AS eventContent, IFNULL(re.EVENT_CONTENT,'') AS eventContent,
DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i') AS eventTime, DATE_FORMAT(re.CREATED_TIME,'%Y-%m-%d %H:%i') AS eventTime,
ea.id AS resiEventAttachmentId,
ea.attachment_url AS url, ea.attachment_url AS url,
ea.attachment_type AS type, ea.attachment_type AS type,
re.id as eventId re.id as eventId
@ -240,6 +249,7 @@
<result property="longitude" column="longitude" /> <result property="longitude" column="longitude" />
<result property="latitude" column="latitude" /> <result property="latitude" column="latitude" />
<collection property="attachmentList" ofType="com.epmet.dto.result.ResiEventListResultDTO$Attachment"> <collection property="attachmentList" ofType="com.epmet.dto.result.ResiEventListResultDTO$Attachment">
<result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 -->
<result column="url" property="url"/> <result column="url" property="url"/>
<result column="type" property="type"/> <result column="type" property="type"/>
</collection> </collection>
@ -257,6 +267,7 @@
re.`status`, re.`status`,
re.shift_project, re.shift_project,
re.latest_operated_time, re.latest_operated_time,
rea.id AS resiEventAttachmentId,
rea.attachment_url AS url, rea.attachment_url AS url,
rea.attachment_type AS type, rea.attachment_type AS type,
re.read_flag, re.read_flag,

2
epmet-module/gov-project/gov-project-server/src/main/resources/mapper/ResiEventMentionDao.xml

@ -11,6 +11,7 @@
<result property="shiftProject" column="SHIFT_PROJECT" /> <result property="shiftProject" column="SHIFT_PROJECT" />
<result property="showTime" column="LATEST_OPERATED_TIME" /> <result property="showTime" column="LATEST_OPERATED_TIME" />
<collection property="attachmentList" ofType="com.epmet.dto.result.UserMentionResultDTO$Attachment"> <collection property="attachmentList" ofType="com.epmet.dto.result.UserMentionResultDTO$Attachment">
<result column="resiEventAttachmentId"/><!-- 附件表ID,如果附件url和type一样会被去重 加上id就可以了 -->
<result column="url" property="url"/> <result column="url" property="url"/>
<result column="type" property="type"/> <result column="type" property="type"/>
</collection> </collection>
@ -33,6 +34,7 @@
re.`STATUS`, re.`STATUS`,
re.SHIFT_PROJECT, re.SHIFT_PROJECT,
re.LATEST_OPERATED_TIME, re.LATEST_OPERATED_TIME,
rea.id AS resiEventAttachmentId,
rea.attachment_url AS url, rea.attachment_url AS url,
rea.attachment_type AS type rea.attachment_type AS type
FROM FROM

1
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/result/UserResiInfoResultDTO.java

@ -58,4 +58,5 @@ public class UserResiInfoResultDTO implements Serializable {
private String headPhoto; private String headPhoto;
private String nickName; private String nickName;
private String realName;
} }

5
epmet-user/epmet-user-server/src/main/resources/mapper/UserResiInfoDao.xml

@ -113,7 +113,7 @@
<select id="selectListUserResiInfoDTO" resultType="com.epmet.dto.result.UserResiInfoResultDTO"> <select id="selectListUserResiInfoDTO" resultType="com.epmet.dto.result.UserResiInfoResultDTO">
SELECT SELECT
ubi.USER_ID, ubi.USER_ID,
uri.REG_MOBILE, IFNULL(uri.REG_MOBILE,ubi.MOBILE) as REG_MOBILE,
ubi.SURNAME, ubi.SURNAME,
ubi.`NAME`, ubi.`NAME`,
ubi.STREET, ubi.STREET,
@ -125,7 +125,8 @@
ubi.SURNAME, ubi.SURNAME,
( CASE WHEN ubi.GENDER = '1' THEN '先生' WHEN ubi.GENDER = '2' THEN '女士' ELSE '先生/女士' END ) ( CASE WHEN ubi.GENDER = '1' THEN '先生' WHEN ubi.GENDER = '2' THEN '女士' ELSE '先生/女士' END )
) AS show_name, ) AS show_name,
ubi.HEAD_IMG_URL as head_photo ubi.HEAD_IMG_URL as head_photo,
ubi.REAL_NAME
FROM user_base_info ubi FROM user_base_info ubi
left join user_resi_info uri on(ubi.user_id=uri.user_id and uri.del_flag='0') left join user_resi_info uri on(ubi.user_id=uri.user_id and uri.del_flag='0')
WHERE ubi.DEL_FLAG = '0' WHERE ubi.DEL_FLAG = '0'

Loading…
Cancel
Save