28 changed files with 586 additions and 138 deletions
@ -0,0 +1,56 @@ |
|||
package com.epmet.dto.form.demand; |
|||
|
|||
import com.epmet.commons.tools.dto.form.PageFormDTO; |
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 居民端-我的需求列表入参 |
|||
*/ |
|||
@Data |
|||
public class ResiClientMyDemandFormDTO extends PageFormDTO implements Serializable { |
|||
/*List<String> userIds=new ArrayList<>(); |
|||
userIds.add(formDTO.getIcResiUserId()); |
|||
if(CollectionUtils.isNotEmpty(formDTO.getEpmetUserIdList())){ |
|||
userIds.addAll(formDTO.getEpmetUserIdList()); |
|||
} |
|||
formDTO.setUserIds(userIds); |
|||
//2、小程序内自己上报+赋能平台待录入的
|
|||
PageInfo<IcResiUserReportDemandRes> pageInfo = PageHelper.startPage(formDTO.getPageNo(), |
|||
formDTO.getPageSize()).doSelectPageInfo(() -> baseDao.selectUserDemand(formDTO)); |
|||
List<IcResiUserReportDemandRes> list = pageInfo.getList(); |
|||
if (CollectionUtils.isNotEmpty(list)) { |
|||
// 1、状态字典
|
|||
Result<Map<String, String>> statusRes = adminOpenFeignClient.dictMap(DictTypeEnum.USER_DEMAND_STATUS.getCode()); |
|||
Map<String, String> statusMap = statusRes.success() && MapUtils.isNotEmpty(statusRes.getData()) ? statusRes.getData() : new HashMap<>(); |
|||
//2、查询分类名称
|
|||
List<String> categoryCodes = list.stream().map(IcResiUserReportDemandRes::getCategoryCode).collect(Collectors.toList()); |
|||
List<IcResiDemandDictEntity> dictList = demandDictService.listByCodes(formDTO.getCustomerId(), categoryCodes); |
|||
Map<String, String> dictMap = dictList.stream().collect(Collectors.toMap(IcResiDemandDictEntity::getCategoryCode, IcResiDemandDictEntity::getCategoryName)); |
|||
|
|||
for (IcResiUserReportDemandRes resDto : list) { |
|||
resDto.setStatusName(statusMap.containsKey(resDto.getStatus()) ? statusMap.get(resDto.getStatus()) : StrConstant.EPMETY_STR); |
|||
if (null != dictMap && dictMap.containsKey(resDto.getCategoryCode())) { |
|||
resDto.setCategoryName(dictMap.get(resDto.getCategoryCode())); |
|||
} |
|||
resDto.setFirstCategoryName(demandDictService.getCategoryName(formDTO.getCustomerId(),resDto.getFirstCategoryCode())); |
|||
} |
|||
}*/ |
|||
public interface AddUserInternalGroup {} |
|||
@NotBlank(message = "gridId不能为空",groups = AddUserInternalGroup.class) |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 待处理:unprocessed;处理中:processing;已完成:finished;已取消:canceled |
|||
*/ |
|||
@NotBlank(message = "type不能为空,待处理:unprocessed;处理中:processing;已完成:finished;已取消:canceled",groups = AddUserInternalGroup.class) |
|||
private String type; |
|||
|
|||
@NotBlank(message = "userId不能为空",groups = AddUserInternalGroup.class) |
|||
private String userId; |
|||
|
|||
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) |
|||
private String customerId; |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.dto.result.demand; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* 1、居民端-我有需求,分类列表发布餐(可用) |
|||
* 2、居民端-我有需求,最近预约返参 |
|||
*/ |
|||
@Data |
|||
public class DemandCategoryResDTO implements Serializable { |
|||
private String categoryId; |
|||
private String categoryCode; |
|||
private String parentCode; |
|||
private String categoryName; |
|||
@JsonIgnore |
|||
private String customerId; |
|||
private List<DemandCategoryResDTO> children; |
|||
} |
@ -0,0 +1,74 @@ |
|||
package com.epmet.dto.result.demand; |
|||
|
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.math.BigDecimal; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 居民端-我的需求列表入参 |
|||
*/ |
|||
@Data |
|||
public class ResiClientMyDemandResDTO implements Serializable { |
|||
private String demandRecId; |
|||
@JsonIgnore |
|||
private String categoryCode; |
|||
@JsonIgnore |
|||
private String parentCode; |
|||
/** |
|||
* 二级分类名称 |
|||
*/ |
|||
private String categoryName; |
|||
|
|||
/** |
|||
* 服务要求-服务时间:yyyy-MM-dd HH:mm |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date wantServiceTime; |
|||
|
|||
/** |
|||
* 服务地点 |
|||
*/ |
|||
private String serviceAddress; |
|||
/** |
|||
* 根据服务方类型找名字 |
|||
*/ |
|||
//服务方类型:服务方类型:志愿者:volunteer;社会组织:social_org;社区自组织:community_org;区域党建单位:party_unit;
|
|||
@JsonIgnore |
|||
private String serviceType; |
|||
@JsonIgnore |
|||
private String serverId; |
|||
|
|||
/** |
|||
* 服务方负责人姓名,如果是志愿者返回志愿者的姓名 |
|||
*/ |
|||
private String serviceUserName; |
|||
/** |
|||
* 服务方负责人联系电话,如果是志愿者返回志愿者的注册手机号 |
|||
*/ |
|||
private String serviceUserMobile; |
|||
/** |
|||
* 社会组织名 |
|||
* 社区自组织名 |
|||
* 区域党建单位名 |
|||
*/ |
|||
private String serviceUnitName; |
|||
/** |
|||
* 1:已评价;0:未评价;评价后ic_user_satisfaction表有记录 |
|||
*/ |
|||
private Boolean evaluateFlag; |
|||
/** |
|||
* 得分可为半星 |
|||
*/ |
|||
private BigDecimal score; |
|||
/** |
|||
* 待处理:pending;已取消canceled;已派单:assigned;已接单:have_order;已完成:finished |
|||
*/ |
|||
private String status; |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date cancelTime; |
|||
} |
Loading…
Reference in new issue