Browse Source

社会组织列表

dev_shibei_match
yinzuomei 4 years ago
parent
commit
a3d7835d1f
  1. 106
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java
  2. 177
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java
  3. 102
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java
  4. 106
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java
  5. 13
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java
  6. 16
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java
  7. 41
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java
  8. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java
  9. 33
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java
  10. 33
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java
  11. 33
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java
  12. 33
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java
  13. 76
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java
  14. 147
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java
  15. 72
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java
  16. 76
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java
  17. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java
  18. 95
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcUserDemandRecService.java
  19. 34
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java
  20. 99
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java
  21. 12
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml
  22. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml
  23. 38
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml
  24. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml
  25. 24
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml

106
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandOperateLogDTO.java

@ -0,0 +1,106 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 居民需求操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcUserDemandOperateLogDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
private String userType;
/**
* 当前操作用户id
*/
private String userId;
/**
* 创建需求create;撤销需求cancel;指派assign;接单take_order;完成finish;评价evaluate
*/
private String actionCode;
/**
* 操作时间
*/
private Date operateTime;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
/**
*
*/
private String userName;
}

177
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandRecDTO.java

@ -0,0 +1,177 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcUserDemandRecDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 网格id
*/
private String gridId;
/**
* 组织id
*/
private String agencyId;
/**
* 网格的所有上级id
*/
private String gridPids;
/**
* 二级需求分类编码
*/
private String categoryCode;
/**
* 父级需求分类编码
*/
private String parentCode;
/**
* 需求内容1000字
*/
private String content;
/**
* 社区帮办community楼长帮办building_caption;党员帮办party;自身上报self_help
*/
private String reportType;
/**
* 上报人姓名
*/
private String reportUserName;
/**
* 上报人联系方式自身上报时存储注册居民的手机号
*/
private String reportUserMobile;
/**
* 自身上报时存储居民端用户id
*/
private String reportUserId;
/**
* 上报时间
*/
private Date reportTime;
/**
* 希望服务时间
*/
private Date wantServiceTime;
/**
* 小程序用户自己上报mini_resi居民信息录入的居民ic_resi_user
*/
private String demandUserType;
/**
* 需求人user.id或者ic_resi_user.id
*/
private String demandUserId;
/**
* 需求人姓名
*/
private String demandUserName;
/**
* 需求人联系电话
*/
private String demandUserMobile;
/**
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
*/
private String status;
/**
* 完成结果已解决 resolved未解决 unresolved
*/
private String finishResult;
/**
* 取消时间
*/
private Date cancelTime;
/**
* 1已评价0未评价;评价后ic_user_satisfaction表有记录
*/
private Integer evaluateFlag;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

102
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandSatisfactionDTO.java

@ -0,0 +1,102 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import java.math.BigDecimal;
/**
* 居民需求评价记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcUserDemandSatisfactionDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键居民需求评价表
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
private String userType;
/**
* 当前评价用户id可以是小程序里用户id,也可以是工作端帮忙录入需求的人
*/
private String userId;
/**
* 评价时间
*/
private Date evaluateTime;
/**
* 得分可为半星
*/
private BigDecimal score;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

106
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcUserDemandServiceDTO.java

@ -0,0 +1,106 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dto;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 居民需求服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
public class IcUserDemandServiceDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private String id;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
private String serviceType;
/**
* 志愿者居民端爱心互助的志愿者userId
*/
private String serverId;
/**
* 实际服务开始时间
*/
private Date serviceStartTime;
/**
* 实际服务结束时间
*/
private Date serviceEndTime;
/**
* 完成情况
*/
private String finishDesc;
/**
* 删除标识0.未删除 1.已删除
*/
private Integer delFlag;
/**
* 乐观锁
*/
private Integer revision;
/**
* 创建人
*/
private String createdBy;
/**
* 创建时间
*/
private Date createdTime;
/**
* 更新人
*/
private String updatedBy;
/**
* 更新时间
*/
private Date updatedTime;
}

13
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/demand/ServiceQueryFormDTO.java

@ -2,10 +2,23 @@ package com.epmet.dto.form.demand;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
@Data
public class ServiceQueryFormDTO implements Serializable {
private static final long serialVersionUID = -2738313255838176318L;
public interface DemandId {
}
private String serviceName;
@NotBlank(message = "需求id不能为空", groups = DemandId.class)
private String demandRecId;
private String customerId;
}

16
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java

@ -24,7 +24,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dto.form.AddSocietyOrgFormDTO;
import com.epmet.dto.form.EditSocietyOrgFormDTO;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.service.IcSocietyOrgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -32,6 +34,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 社会组织管理
@ -91,4 +95,16 @@ public class IcSocietyOrgController {
return new Result<GetListSocietyOrgResultDTO>().ok(societyOrgService.getList(formDTO));
}
/**
* 需求指派选择社会组织调用此接口
* @param tokenDto
* @param formDTO
* @return
*/
@PostMapping("servicelist")
public Result<List<OptionDTO>> queryServiceList(@LoginUser TokenDto tokenDto,@RequestBody ServiceQueryFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
ValidatorUtils.validateEntity(formDTO,ServiceQueryFormDTO.DemandId.class);
return new Result<List<OptionDTO>>().ok(societyOrgService.queryServiceList(formDTO));
}
}

41
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcUserDemandRecController.java

@ -0,0 +1,41 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.controller;
import com.epmet.service.IcUserDemandRecService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@RestController
@RequestMapping("icuserdemandrec")
public class IcUserDemandRecController {
@Autowired
private IcUserDemandRecService icUserDemandRecService;
}

9
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcSocietyOrgDao.java

@ -20,8 +20,10 @@ package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcSocietyOrgEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@ -40,4 +42,11 @@ public interface IcSocietyOrgDao extends BaseDao<IcSocietyOrgEntity> {
**/
List<GetListSocietyOrgResultDTO.SocietyOrgList> getList(GetListSocietyOrgFormDTO formDTO);
/**
* 需求指派选择社会组织调用此接口
*
* @param agencyIds
* @return
*/
List<OptionDTO> selectListByAgencyId(@Param("agencyIds")List<String> agencyIds);
}

33
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandOperateLogDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcUserDemandOperateLogEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 居民需求操作日志表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface IcUserDemandOperateLogDao extends BaseDao<IcUserDemandOperateLogEntity> {
}

33
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandRecDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcUserDemandRecEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface IcUserDemandRecDao extends BaseDao<IcUserDemandRecEntity> {
}

33
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandSatisfactionDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcUserDemandSatisfactionEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 居民需求评价记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface IcUserDemandSatisfactionDao extends BaseDao<IcUserDemandSatisfactionEntity> {
}

33
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcUserDemandServiceDao.java

@ -0,0 +1,33 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.IcUserDemandServiceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 居民需求服务记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Mapper
public interface IcUserDemandServiceDao extends BaseDao<IcUserDemandServiceEntity> {
}

76
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandOperateLogEntity.java

@ -0,0 +1,76 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_user_demand_operate_log")
public class IcUserDemandOperateLogEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
private String userType;
/**
* 当前操作用户id
*/
private String userId;
/**
* 创建需求create;撤销需求cancel;指派assign;接单take_order;完成finish;评价evaluate
*/
private String actionCode;
/**
* 操作时间
*/
private Date operateTime;
/**
*
*/
private String userName;
}

147
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandRecEntity.java

@ -0,0 +1,147 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_user_demand_rec")
public class IcUserDemandRecEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 网格id
*/
private String gridId;
/**
* 组织id
*/
private String agencyId;
/**
* 网格的所有上级id
*/
private String gridPids;
/**
* 二级需求分类编码
*/
private String categoryCode;
/**
* 父级需求分类编码
*/
private String parentCode;
/**
* 需求内容1000字
*/
private String content;
/**
* 社区帮办community楼长帮办building_caption;党员帮办party;自身上报self_help
*/
private String reportType;
/**
* 上报人姓名
*/
private String reportUserName;
/**
* 上报人联系方式自身上报时存储注册居民的手机号
*/
private String reportUserMobile;
/**
* 自身上报时存储居民端用户id
*/
private String reportUserId;
/**
* 上报时间
*/
private Date reportTime;
/**
* 希望服务时间
*/
private Date wantServiceTime;
/**
* 小程序用户自己上报mini_resi居民信息录入的居民ic_resi_user
*/
private String demandUserType;
/**
* 需求人user.id或者ic_resi_user.id
*/
private String demandUserId;
/**
* 需求人姓名
*/
private String demandUserName;
/**
* 需求人联系电话
*/
private String demandUserMobile;
/**
* 待处理pending已取消canceled已派单assigned已接单have_order已完成finished
*/
private String status;
/**
* 完成结果已解决 resolved未解决 unresolved
*/
private String finishResult;
/**
* 取消时间
*/
private Date cancelTime;
/**
* 1已评价0未评价;评价后ic_user_satisfaction表有记录
*/
private Integer evaluateFlag;
}

72
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandSatisfactionEntity.java

@ -0,0 +1,72 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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.math.BigDecimal;
import java.util.Date;
/**
* 居民需求评价记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_user_demand_satisfaction")
public class IcUserDemandSatisfactionEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 当前操作用户属于哪个端工作端staff居民端resi
*/
private String userType;
/**
* 当前评价用户id可以是小程序里用户id,也可以是工作端帮忙录入需求的人
*/
private String userId;
/**
* 评价时间
*/
private Date evaluateTime;
/**
* 得分可为半星
*/
private BigDecimal score;
}

76
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcUserDemandServiceEntity.java

@ -0,0 +1,76 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
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 2021-11-19
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ic_user_demand_service")
public class IcUserDemandServiceEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L;
/**
* 客户id
*/
private String customerId;
/**
* 需求id
*/
private String demandRecId;
/**
* 服务方类型志愿者volunteer社会组织social_org社区自组织community_org区域党建单位party_unit
*/
private String serviceType;
/**
* 志愿者居民端爱心互助的志愿者userId
*/
private String serverId;
/**
* 实际服务开始时间
*/
private Date serviceStartTime;
/**
* 实际服务结束时间
*/
private Date serviceEndTime;
/**
* 完成情况
*/
private String finishDesc;
}

11
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcSocietyOrgService.java

@ -21,9 +21,13 @@ import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.dto.form.AddSocietyOrgFormDTO;
import com.epmet.dto.form.EditSocietyOrgFormDTO;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcSocietyOrgEntity;
import java.util.List;
/**
* 社会组织管理
*
@ -55,4 +59,11 @@ public interface IcSocietyOrgService extends BaseService<IcSocietyOrgEntity> {
* @Description 社会组织列表查询
**/
GetListSocietyOrgResultDTO getList(GetListSocietyOrgFormDTO formDTO);
/**
* 需求指派选择社会组织调用此接口
* @param formDTO
* @return
*/
List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO);
}

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

@ -0,0 +1,95 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.entity.IcUserDemandRecEntity;
import java.util.List;
import java.util.Map;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
public interface IcUserDemandRecService extends BaseService<IcUserDemandRecEntity> {
/**
* 默认分页
*
* @param params
* @return PageData<IcUserDemandRecDTO>
* @author generator
* @date 2021-11-19
*/
PageData<IcUserDemandRecDTO> page(Map<String, Object> params);
/**
* 默认查询
*
* @param params
* @return java.util.List<IcUserDemandRecDTO>
* @author generator
* @date 2021-11-19
*/
List<IcUserDemandRecDTO> list(Map<String, Object> params);
/**
* 单条查询
*
* @param id
* @return IcUserDemandRecDTO
* @author generator
* @date 2021-11-19
*/
IcUserDemandRecDTO get(String id);
/**
* 默认保存
*
* @param dto
* @return void
* @author generator
* @date 2021-11-19
*/
void save(IcUserDemandRecDTO dto);
/**
* 默认更新
*
* @param dto
* @return void
* @author generator
* @date 2021-11-19
*/
void update(IcUserDemandRecDTO dto);
/**
* 批量删除
*
* @param ids
* @return void
* @author generator
* @date 2021-11-19
*/
void delete(String[] ids);
}

34
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcSocietyOrgServiceImpl.java

@ -19,21 +19,26 @@ package com.epmet.service.impl;
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.RenException;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dao.IcSocietyOrgDao;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.dto.form.AddSocietyOrgFormDTO;
import com.epmet.dto.form.EditSocietyOrgFormDTO;
import com.epmet.dto.form.GetListSocietyOrgFormDTO;
import com.epmet.dto.form.UserIdsFormDTO;
import com.epmet.dto.form.demand.ServiceQueryFormDTO;
import com.epmet.dto.result.GetListSocietyOrgResultDTO;
import com.epmet.dto.result.StaffSinGridResultDTO;
import com.epmet.dto.result.demand.OptionDTO;
import com.epmet.entity.IcSocietyOrgEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.service.IcSocietyOrgService;
import com.epmet.service.IcUserDemandRecService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.slf4j.Logger;
@ -42,7 +47,10 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@ -57,7 +65,8 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic
private static final Logger log = LoggerFactory.getLogger(IcSocietyOrgServiceImpl.class);
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
@Autowired
private IcUserDemandRecService icUserDemandRecService;
/**
* @Author sun
@ -127,4 +136,27 @@ public class IcSocietyOrgServiceImpl extends BaseServiceImpl<IcSocietyOrgDao, Ic
return resultDTO;
}
/**
* 需求指派选择社会组织调用此接口
*
* @param formDTO
* @return
*/
@Override
public List<OptionDTO> queryServiceList(ServiceQueryFormDTO formDTO) {
List<OptionDTO> resultList=new ArrayList<>();
IcUserDemandRecDTO icUserDemandRecDTO=icUserDemandRecService.get(formDTO.getDemandRecId());
if(null==icUserDemandRecDTO|| StringUtils.isEmpty(icUserDemandRecDTO.getGridPids())){
return resultList;
}
List<String> agencyIds=new ArrayList<>();
if(icUserDemandRecDTO.getGridPids().contains(StrConstant.COLON)){
agencyIds.addAll(Arrays.asList(icUserDemandRecDTO.getGridPids().split(StrConstant.COLON)));
}else{
agencyIds.add(icUserDemandRecDTO.getGridPids());
}
resultList=baseDao.selectListByAgencyId(agencyIds);
return resultList;
}
}

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

@ -0,0 +1,99 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.dao.IcUserDemandRecDao;
import com.epmet.dto.IcUserDemandRecDTO;
import com.epmet.entity.IcUserDemandRecEntity;
import com.epmet.service.IcUserDemandRecService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
/**
* 居民需求记录表
*
* @author generator generator@elink-cn.com
* @since v1.0.0 2021-11-19
*/
@Service
public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecDao, IcUserDemandRecEntity> implements IcUserDemandRecService {
@Override
public PageData<IcUserDemandRecDTO> page(Map<String, Object> params) {
IPage<IcUserDemandRecEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params)
);
return getPageData(page, IcUserDemandRecDTO.class);
}
@Override
public List<IcUserDemandRecDTO> list(Map<String, Object> params) {
List<IcUserDemandRecEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, IcUserDemandRecDTO.class);
}
private QueryWrapper<IcUserDemandRecEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<IcUserDemandRecEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper;
}
@Override
public IcUserDemandRecDTO get(String id) {
IcUserDemandRecEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, IcUserDemandRecDTO.class);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void save(IcUserDemandRecDTO dto) {
IcUserDemandRecEntity entity = ConvertUtils.sourceToTarget(dto, IcUserDemandRecEntity.class);
insert(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(IcUserDemandRecDTO dto) {
IcUserDemandRecEntity entity = ConvertUtils.sourceToTarget(dto, IcUserDemandRecEntity.class);
updateById(entity);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(String[] ids) {
// 逻辑删除(@TableLogic 注解)
baseDao.deleteBatchIds(Arrays.asList(ids));
}
}

12
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcSocietyOrgDao.xml

@ -42,4 +42,16 @@
ORDER BY created_time DESC
</select>
<select id="selectListByAgencyId" parameterType="map" resultType="com.epmet.dto.result.demand.OptionDTO">
<foreach collection="agencyIds" item="agencyId" separator=" UNION ">
SELECT
id as label,
society_name as `value`
FROM
ic_society_org
WHERE
del_flag = '0'
and AGENCY_ID=#{agencyId}
</foreach>
</select>
</mapper>

24
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandOperateLogDao.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcUserDemandOperateLogDao">
<resultMap type="com.epmet.entity.IcUserDemandOperateLogEntity" id="icUserDemandOperateLogMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="demandRecId" column="DEMAND_REC_ID"/>
<result property="userType" column="USER_TYPE"/>
<result property="userId" column="USER_ID"/>
<result property="actionCode" column="ACTION_CODE"/>
<result property="operateTime" column="OPERATE_TIME"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
<result property="userName" column="USER_NAME"/>
</resultMap>
</mapper>

38
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml

@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcUserDemandRecDao">
<resultMap type="com.epmet.entity.IcUserDemandRecEntity" id="icUserDemandRecMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="gridId" column="GRID_ID"/>
<result property="agencyId" column="AGENCY_ID"/>
<result property="gridPids" column="GRID_PIDS"/>
<result property="categoryCode" column="CATEGORY_CODE"/>
<result property="parentCode" column="PARENT_CODE"/>
<result property="content" column="CONTENT"/>
<result property="reportType" column="REPORT_TYPE"/>
<result property="reportUserName" column="REPORT_USER_NAME"/>
<result property="reportUserMobile" column="REPORT_USER_MOBILE"/>
<result property="reportUserId" column="REPORT_USER_ID"/>
<result property="reportTime" column="REPORT_TIME"/>
<result property="wantServiceTime" column="WANT_SERVICE_TIME"/>
<result property="demandUserType" column="DEMAND_USER_TYPE"/>
<result property="demandUserId" column="DEMAND_USER_ID"/>
<result property="demandUserName" column="DEMAND_USER_NAME"/>
<result property="demandUserMobile" column="DEMAND_USER_MOBILE"/>
<result property="status" column="STATUS"/>
<result property="finishResult" column="FINISH_RESULT"/>
<result property="cancelTime" column="CANCEL_TIME"/>
<result property="evaluateFlag" column="EVALUATE_FLAG"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

23
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandSatisfactionDao.xml

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcUserDemandSatisfactionDao">
<resultMap type="com.epmet.entity.IcUserDemandSatisfactionEntity" id="icUserDemandSatisfactionMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="demandRecId" column="DEMAND_REC_ID"/>
<result property="userType" column="USER_TYPE"/>
<result property="userId" column="USER_ID"/>
<result property="evaluateTime" column="EVALUATE_TIME"/>
<result property="score" column="SCORE"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>

24
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandServiceDao.xml

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.IcUserDemandServiceDao">
<resultMap type="com.epmet.entity.IcUserDemandServiceEntity" id="icUserDemandServiceMap">
<result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/>
<result property="demandRecId" column="DEMAND_REC_ID"/>
<result property="serviceType" column="SERVICE_TYPE"/>
<result property="serverId" column="SERVER_ID"/>
<result property="serviceStartTime" column="SERVICE_START_TIME"/>
<result property="serviceEndTime" column="SERVICE_END_TIME"/>
<result property="finishDesc" column="FINISH_DESC"/>
<result property="delFlag" column="DEL_FLAG"/>
<result property="revision" column="REVISION"/>
<result property="createdBy" column="CREATED_BY"/>
<result property="createdTime" column="CREATED_TIME"/>
<result property="updatedBy" column="UPDATED_BY"/>
<result property="updatedTime" column="UPDATED_TIME"/>
</resultMap>
</mapper>
Loading…
Cancel
Save