diff --git a/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql
new file mode 100644
index 0000000000..70705df799
--- /dev/null
+++ b/epmet-admin/epmet-admin-server/src/main/resources/db/migration/V0.0.19__add_dict.sql
@@ -0,0 +1,11 @@
+INSERT INTO `epmet_admin`.`sys_dict_type` (`id`, `dict_type`, `dict_name`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1000000000000000014', 'ic_service_type', '服务类别', '', '20', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000000', '1000000000000000014', '社区养老', '00', '0', '', '0', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000001', '1000000000000000014', '社会保障', '01', '0', '', '1', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000002', '1000000000000000014', '社区救助', '02', '0', '', '2', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000003', '1000000000000000014', '健康医疗', '03', '0', '', '3', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000004', '1000000000000000014', '社区安全', '04', '0', '', '4', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000005', '1000000000000000014', '社区卫生', '05', '0', '', '5', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000006', '1000000000000000014', '社区环境', '06', '0', '', '6', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000007', '1000000000000000014', '社区治安', '07', '0', '', '7', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
+INSERT INTO `epmet_admin`.`sys_dict_data` (`id`, `dict_type_id`, `dict_label`, `dict_value`, `dict_p_value`, `remark`, `sort`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('3100000000000000008', '1000000000000000014', '社区文化', '08', '0', '', '8', '0', '0', '', '2022-05-27 16:23:27', '', '2022-05-27 16:23:27');
diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
index a813af8152..6c8f4271ce 100644
--- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
+++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/enums/DictTypeEnum.java
@@ -25,6 +25,7 @@ public enum DictTypeEnum {
ITEM_TYPE_QUERY("item_type_query","居民信息组件查询方式",14),
SELF_ORG_CATEGORY("self_org_category","社区自组织分类",15),
IC_EVENT_SOURCE_TYPE("ic_event_source_type","事件管理",19),
+ IC_SERVICE_TYPE("ic_service_type","服务类别",20),
;
private final String code;
diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
index add7341a75..d4bdb13bb2 100644
--- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
+++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenPartyUserRankDataDao.xml
@@ -203,6 +203,7 @@
INNER JOIN screen_customer_dept org ON org.CUSTOMER_ID = u.CUSTOMER_ID AND org.DEPT_ID = u.ORG_ID AND org.DEL_FLAG = '0'
+
WHERE
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java
new file mode 100644
index 0000000000..42d8fcf19b
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceOrgDTO.java
@@ -0,0 +1,115 @@
+package com.epmet.dto;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+public class IcServiceOrgDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 所属组织机构Id
+ */
+ private String agencyId;
+
+ /**
+ * agencyId的所有上级,包含自己
+ */
+ private String agencyIdPath;
+
+ /**
+ * 服务类别【字典表 ic_service_type】多个值逗号分隔
+ */
+ private String serviceType;
+
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+
+ /**
+ * 组织描述
+ */
+ private String orgDescribe;
+
+ /**
+ * 负责人姓名
+ */
+ private String principalName;
+
+ /**
+ * 负责人电话
+ */
+ private String principalMobile;
+
+ /**
+ * 经度
+ */
+ private String longitude;
+
+ /**
+ * 纬度
+ */
+ private String latitude;
+
+ /**
+ * 地址
+ */
+ private String address;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 删除标识
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java
new file mode 100644
index 0000000000..6919112fde
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectAttachmentDTO.java
@@ -0,0 +1,116 @@
+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 2022-05-27
+ */
+@Data
+public class IcServiceProjectAttachmentDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 主键
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 事件Id
+ */
+ private String icServiceId;
+
+ private String attachTo;
+
+ /**
+ * 附件名
+ */
+ private String attachmentName;
+ private String name;
+
+ /**
+ * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)
+ */
+ private String attachmentFormat;
+ private String format;
+
+ /**
+ * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))
+ */
+ private String attachmentType;
+ private String type;
+
+ /**
+ * 附件地址
+ */
+ private String attachmentUrl;
+ private String url;
+
+ /**
+ * 排序字段
+ */
+ private Integer sort;
+
+ /**
+ * 附件状态(审核中:auditing;
+auto_passed: 自动通过;
+review:结果不确定,需要人工审核;
+block: 结果违规;
+rejected:人工审核驳回;
+approved:人工审核通过)
+现在图片是同步审核的,所以图片只有auto_passed一种状态
+ */
+ private String status;
+
+ /**
+ * 失败原因
+ */
+ private String reason;
+
+ /**
+ * 语音或视频时长,秒
+ */
+ private Integer duration;
+
+ /**
+ * 删除标记 0:未删除,1:已删除
+ */
+ private String delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java
new file mode 100644
index 0000000000..3d3a6c733f
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceProjectDTO.java
@@ -0,0 +1,104 @@
+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 2022-05-27
+ */
+@Data
+public class IcServiceProjectDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * ID
+ */
+ private String id;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 组织ID
+ */
+ private String agencyId;
+
+ /**
+ * 组织ID的上级
+ */
+ private String pid;
+
+ /**
+ * 组织ID的所有上级[包括自己]
+ */
+ private String agencyIdPath;
+
+ /**
+ * 服务类别值
+ */
+ private String serviceCategoryKey;
+
+ /**
+ * 服务名称
+ */
+ private String serviceName;
+
+ /**
+ * 服务内容
+ */
+ private String serviceContent;
+
+ /**
+ * 政策级别,0市级;1区级;2街道级
+ */
+ private String policyLevel;
+
+ /**
+ * 政策依据
+ */
+ private String policyGround;
+
+ /**
+ * 启用状态,0启用,1禁用
+ */
+ private Integer enabled;
+
+ /**
+ *
+ */
+ private Integer delFlag;
+
+ /**
+ * 乐观锁
+ */
+ private Integer revision;
+
+ /**
+ * 创建人
+ */
+ private String createdBy;
+
+ /**
+ * 创建时间
+ */
+ private Date createdTime;
+
+ /**
+ * 更新人
+ */
+ private String updatedBy;
+
+ /**
+ * 更新时间
+ */
+ private Date updatedTime;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java
new file mode 100644
index 0000000000..140e8269c1
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceEditFormDTO.java
@@ -0,0 +1,49 @@
+package com.epmet.dto.form;
+
+
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+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 IcServiceEditFormDTO implements Serializable {
+ public interface AddUserInternalGroup {
+ }
+
+ public interface AddUserShowGroup extends CustomerClientShowGroup {
+ }
+
+ @NotBlank(message = "", groups = AddUserInternalGroup.class)
+ private String serviceRecordId;
+ private String principalName;
+ private String principalContact;
+ /**
+ * 服务时间
+ */
+ @NotNull(message = "起始服务时间不能为空", groups = AddUserShowGroup.class)
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date serviceTimeStart;
+
+ /**
+ * 服务截止时间
+ */
+ @NotNull(message = "截止服务时间不能为空", groups = AddUserShowGroup.class)
+ @DateTimeFormat(pattern = "yyyy-MM-dd")
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date serviceTimeEnd;
+
+ /**
+ * 备注
+ */
+ private String remark;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java
new file mode 100644
index 0000000000..3b95afef3f
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgAddEditFormDTO.java
@@ -0,0 +1,71 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.CustomerClientShowGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Description 服务组织新增/修改
+ * @Author sun
+ */
+@Data
+public class IcServiceOrgAddEditFormDTO implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ public interface Del extends CustomerClientShowGroup {
+ }
+
+ /**
+ * 服务组织Id
+ */
+ @NotBlank(message = "服务组织Id不能为空", groups = {UpdateGroup.class, Del.class})
+ private String icServiceOrgId;
+ /**
+ * 服务类型,多个值逗号分隔,字典值,字典key:ic_service_type
+ */
+ @NotBlank(message = "服务类型不能为空", groups = {AddGroup.class})
+ private String serviceType;
+ /**
+ * 服务组织名称
+ */
+ @NotBlank(message = "服务组织名称不能为空", groups = {AddGroup.class})
+ private String orgName;
+ /**
+ * 组织描述
+ */
+ private String orgDescribe;
+ /**
+ * 负责人姓名
+ */
+ @NotBlank(message = "负责人姓名不能为空", groups = {AddGroup.class})
+ private String principalName;
+ /**
+ * 联系方式
+ */
+ @NotBlank(message = "联系方式不能为空", groups = {AddGroup.class})
+ private String principalMobile;
+ /**
+ * 经度
+ */
+ private String longitude;
+ /**
+ * 维度
+ */
+ private String latitude;
+ /**
+ * 服务地址
+ */
+ private String address;
+ /**
+ * 备注信息
+ */
+ private String remark;
+
+ private String customerId;
+ private String userId;
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java
new file mode 100644
index 0000000000..b0cceaeb79
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/IcServiceOrgListFormDTO.java
@@ -0,0 +1,46 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description 【组织】服务组织列表--接口入参
+ * @Author sun
+ */
+@Data
+public class IcServiceOrgListFormDTO implements Serializable {
+ private static final long serialVersionUID = 9156247659994638103L;
+
+ /**
+ * 服务类型,字典值
+ */
+ private String serviceType;
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+ /**
+ * 服务地址
+ */
+ private String address;
+ /**
+ * 备注信息
+ */
+ private String remark;
+ /**
+ * 页码
+ */
+ private Integer pageNo = 1;
+ /**
+ * 每页显示数量
+ */
+ private Integer pageSize = 20;
+
+ private Boolean isPage = true;
+ private String icServiceOrgId;
+ private String customerId;
+ private String staffId;
+ private String agencyId;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java
new file mode 100644
index 0000000000..231ab79b95
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java
@@ -0,0 +1,57 @@
+package com.epmet.dto.form;
+
+import lombok.Data;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import java.util.List;
+
+@Data
+public class ServiceProjectFeedbackFormDTO {
+
+ /**
+ * 反馈接口分组
+ */
+ public interface FeedbackGroup {}
+
+ /**
+ * 发起服务接口分组
+ */
+ public interface InitiateGroup {}
+
+ @NotBlank(message = "服务记录id不能为空", groups = { FeedbackGroup.class })
+ private String serviceRecordId;
+ private String serviceProjectId;
+ private String serviceGoal;
+ private String serviceEffect;
+ private Integer servicePeopleNumber;
+ /**
+ * 服务状态。in_service服务中;completed:已完成
+ */
+ @NotBlank(message = "服务状态不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String serviceStatus;
+ /**
+ * 满意度。不满意:bad、基本满意:good、非常满意:perfect
+ * 按理说,服务完成的时候才可以选,不完成应该不能选,可是谁知道呢,原型也没写
+ */
+ private String satisfaction;
+ private String longitude;
+ private String latitude;
+ private String address;
+
+ @Valid
+ private List attachmentList;
+
+ @Data
+ public static class Attachment {
+
+ @NotBlank(message = "附件名称不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String attachmentName;
+ @NotBlank(message = "附件格式不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String attachmentFormat;
+ @NotBlank(message = "附件类型不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String attachmentType;
+ @NotBlank(message = "附件url不能为空", groups = { FeedbackGroup.class, InitiateGroup.class })
+ private String attachmentUrl;
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java
new file mode 100644
index 0000000000..524628e95c
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFormDTO.java
@@ -0,0 +1,53 @@
+package com.epmet.dto.form;
+
+import com.epmet.dto.IcServiceProjectAttachmentDTO;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2022/5/27 15:53
+ * @DESC
+ */
+@Data
+public class ServiceProjectFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -4573264697450644498L;
+
+ public interface ServiceProjectAddForm{}
+ public interface ServiceProjectUpdateForm{}
+
+ @NotBlank(message = "服务类别不能为空",groups = {ServiceProjectAddForm.class})
+ private String serviceCategoryKey;
+
+ @NotBlank(message = "服务名称不能为空",groups = {ServiceProjectAddForm.class,ServiceProjectUpdateForm.class})
+ private String serviceName;
+
+ @NotBlank(message = "服务内容不能为空",groups = {ServiceProjectAddForm.class,ServiceProjectUpdateForm.class})
+ private String serviceContent;
+
+ /**
+ * 政策依据
+ */
+ private String policyGround;
+
+ /**
+ * 政策级别,0市级;1区级;2街道级
+ */
+ private String policyLevel;
+
+ private String customerId;
+
+ private String userId;
+
+ @NotBlank(message = "serviceProjectId不能为空",groups = {ServiceProjectUpdateForm.class})
+ private String serviceProjectId;
+
+ /**
+ * 附件集合
+ */
+ private List attachmentList;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java
new file mode 100644
index 0000000000..ff265a8a44
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectListFormDTO.java
@@ -0,0 +1,32 @@
+package com.epmet.dto.form;
+
+import com.epmet.commons.tools.dto.form.PageFormDTO;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import java.io.Serializable;
+
+/**
+ * @Author zxc
+ * @DateTime 2022/5/27 16:42
+ * @DESC
+ */
+@Data
+public class ServiceProjectListFormDTO extends PageFormDTO implements Serializable {
+
+ private static final long serialVersionUID = -6508966695564469253L;
+
+ public interface ServiceProjectDetail{}
+
+ private String serviceCategoryKey;
+ private String serviceName;
+ private String serviceContent;
+ private String policyGround;
+ private String customerId;
+ private String userId;
+ private String agencyId;
+
+ @NotBlank(message = "serviceProjectId不能为空",groups = ServiceProjectDetail.class)
+ private String serviceProjectId;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java
new file mode 100644
index 0000000000..59d86bfac5
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectRecordFormDTO.java
@@ -0,0 +1,66 @@
+package com.epmet.dto.form;
+
+import com.epmet.dto.result.IcServiceScopeDTO;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import javax.validation.Valid;
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotEmpty;
+import javax.validation.constraints.NotNull;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class ServiceProjectRecordFormDTO {
+
+ /**
+ * 发起服务
+ */
+ public interface Initiate {}
+
+ @NotBlank(message = "服务类别key不能为空", groups = { Initiate.class })
+ private String serviceCategoryKey;
+
+ @NotBlank(message = "服务项目Id不能为空", groups = { Initiate.class })
+ private String serviceProjectId;
+
+ private String serviceProjectName;
+
+ @NotBlank(message = "服务组织Id不能为空", groups = { Initiate.class })
+ private String serviceOrgId;
+
+ private String serviceOrgName;
+
+ @NotEmpty(message = "发布范围不能为空", groups = { Initiate.class })
+ private List serviceScope;
+
+ @NotNull(message = "服务起始时间不能为空", groups = { Initiate.class })
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date serviceTimeStart;
+
+ @NotNull(message = "服务结束时间不能为空", groups = { Initiate.class })
+ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+ private Date serviceTimeEnd;
+ private String serviceStatus;
+ private String satisfaction;
+
+ private String principalName;
+
+ private String principalContact;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ @Valid
+ private ServiceProjectFeedbackFormDTO feedback;
+
+ private Integer pageNo = 1;
+ private Integer pageSize = 20;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java
new file mode 100644
index 0000000000..394b5b6b40
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java
@@ -0,0 +1,64 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * 服务记录反馈
+ */
+@Data
+public class IcServiceFeedbackResDTO implements Serializable {
+
+ /**
+ * 反馈记录id
+ */
+ private String feedBackId;
+
+ /**
+ * 服务目标
+ */
+ private String serviceGoal;
+
+ /**
+ * 服务效果
+ */
+ private String serviceEffect;
+
+ /**
+ * 服务人数
+ */
+ // private Integer servicePeopleNumber;
+
+ /**
+ * 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect
+ */
+ private String satisfaction;
+
+ /**
+ * 地址经度
+ */
+ private String longitude;
+
+ /**
+ * 地址纬度
+ */
+ private String latitude;
+
+ /**
+ * 地址
+ */
+ private String address;
+
+ private List attachmentList;
+
+ @Data
+ public static class Attachment {
+ private String attachmentName;
+ private String attachmentFormat;
+ private String attachmentType;
+ private String attachmentUrl;
+ }
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java
new file mode 100644
index 0000000000..30164b69c4
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgListResultDTO.java
@@ -0,0 +1,81 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Description 【组织】服务组织列表--接口返参
+ * @Author sun
+ */
+@Data
+public class IcServiceOrgListResultDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 服务组织Id
+ */
+ private String icServiceOrgId;
+ /**
+ * 组织Id
+ */
+ private String agencyId;
+ /**
+ * 服务类别
+ */
+ private List serviceTypeList;
+ /**
+ * 服务类别,多个值逗号分隔
+ */
+ private String serviceType;
+ /**
+ * 服务类别,多个值顿号分隔
+ */
+ private String serviceTypeName;
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+ /**
+ * 组织描述
+ */
+ private String orgDescribe;
+ /**
+ * 负责人名称
+ */
+ private String principalName;
+ /**
+ * 负责人电话
+ */
+ private String principalMobile;
+ /**
+ * 经度
+ */
+ private String longitude;
+ /**
+ * 纬度
+ */
+ private String latitude;
+ /**
+ * 地址
+ */
+ private String address;
+ /**
+ * 备注
+ */
+ private String remark;
+
+ @Data
+ public static class ServiceType {
+ /**
+ * 服务类别值
+ */
+ private String value;
+ /**
+ * 服务类别名
+ */
+ private String name;
+ }
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java
new file mode 100644
index 0000000000..30f5ef457b
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceOrgSelectListResultDTO.java
@@ -0,0 +1,24 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * @Description 【组织】服务组织列表_下拉框使用--接口返参
+ * @Author sun
+ */
+@Data
+public class IcServiceOrgSelectListResultDTO implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 服务组织Id
+ */
+ private String icServiceOrgId;
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java
new file mode 100644
index 0000000000..d1ef78ab5f
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java
@@ -0,0 +1,90 @@
+package com.epmet.dto.result;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+@Data
+public class IcServiceRecDetailRes implements Serializable {
+
+
+ /**
+ * 联系方式
+ */
+ private String principalContact;
+
+ /**
+ * 经办人姓名
+ */
+ private String principalName;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 服务类别ID
+ */
+ private String serviceCategoryKey;
+
+ /**
+ * 服务类别ID
+ */
+ private String serviceCategoryName;
+
+ /**
+ * 服务组织ID
+ */
+ private String serviceOrgId;
+
+ /**
+ * 服务组织名称
+ */
+ private String serviceOrgName;
+
+ /**
+ * 服务项目ID
+ */
+ private String serviceProjectId;
+
+ /**
+ * 服务项目名称
+ */
+ private String serviceProjectName;
+
+ /**
+ * 服务时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date serviceTimeStart;
+
+ /**
+ * 服务截止时间
+ */
+ @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+ private Date serviceTimeEnd;
+
+ /**
+ * in_service服务中;completed:已完成
+ */
+ private String serviceStatus;
+
+ /**
+ * 发布范围
+ */
+ private List serviceScope;
+
+ /**
+ * 服务人数
+ */
+ private Integer servicePeopleNumber;
+
+ /**
+ * 反馈详情
+ */
+ private IcServiceFeedbackResDTO feedBack;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java
new file mode 100644
index 0000000000..1a2be3dca0
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceScopeDTO.java
@@ -0,0 +1,15 @@
+package com.epmet.dto.result;
+
+
+import lombok.Data;
+
+@Data
+public class IcServiceScopeDTO {
+ private String objectId;
+ private String objectName;
+ private String objectType;
+ /**
+ * 发布范围的组织ID PATH
+ */
+ private String objectIdPath;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java
new file mode 100644
index 0000000000..eadf11a78a
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectListResultDTO.java
@@ -0,0 +1,63 @@
+package com.epmet.dto.result;
+
+import com.epmet.commons.tools.dto.form.PageFormDTO;
+import com.epmet.dto.IcServiceProjectAttachmentDTO;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * @Author zxc
+ * @DateTime 2022/5/27 16:42
+ * @DESC
+ */
+@Data
+public class ServiceProjectListResultDTO implements Serializable {
+
+ private static final long serialVersionUID = -6508966695564469113L;
+
+ /**
+ * 服务类别
+ */
+ private String serviceCategory;
+ private String serviceCategoryKey;
+
+ /**
+ * 服务项目ID
+ */
+ private String serviceProjectId;
+
+ /**
+ * 服务名称
+ */
+ private String serviceName;
+
+ /**
+ * 服务内容
+ */
+ private String serviceContent;
+
+ /**
+ * 政策依据
+ */
+ private String policyGround;
+
+ /**
+ * 政策级别
+ */
+ private String policyLevel;
+ private String policyLevelName;
+
+ private List attachmentList;
+
+ public ServiceProjectListResultDTO() {
+ this.serviceCategory = "";
+ this.serviceProjectId = "";
+ this.serviceName = "";
+ this.serviceContent = "";
+ this.policyGround = "";
+ this.policyLevel = "";
+ this.policyLevelName = "";
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java
new file mode 100644
index 0000000000..940a8ae9f1
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceProjectRecordResultDTO.java
@@ -0,0 +1,18 @@
+package com.epmet.dto.result;
+
+import lombok.Data;
+
+@Data
+public class ServiceProjectRecordResultDTO {
+ private String serviceRecordId;
+ private String serviceCategoryKey;
+ private String serviceCategoryName;
+ private String serviceProjectId;
+ private String serviceProjectName;
+ private String serviceOrgId;
+ private String serviceOrgName;
+ private String serviceTimeStart;
+ private String serviceTimeEnd;
+ private String serviceStatus;
+ private String servicePeopleNumber;
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/pom.xml b/epmet-module/epmet-heart/epmet-heart-server/pom.xml
index bc2955d8b7..af7bb32c5d 100644
--- a/epmet-module/epmet-heart/epmet-heart-server/pom.xml
+++ b/epmet-module/epmet-heart/epmet-heart-server/pom.xml
@@ -132,6 +132,14 @@
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 8
+ 8
+
+
${project.basedir}/src/main/java
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java
new file mode 100644
index 0000000000..2232830346
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceOrgController.java
@@ -0,0 +1,91 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.aop.NoRepeatSubmit;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.dto.IcServiceOrgDTO;
+import com.epmet.dto.form.IcServiceOrgAddEditFormDTO;
+import com.epmet.dto.form.IcServiceOrgListFormDTO;
+import com.epmet.dto.result.IcServiceOrgListResultDTO;
+import com.epmet.dto.result.IcServiceOrgSelectListResultDTO;
+import com.epmet.service.IcServiceOrgService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@RestController
+@RequestMapping("icServiceOrg")
+public class IcServiceOrgController {
+
+ @Autowired
+ private IcServiceOrgService icServiceOrgService;
+
+ @RequestMapping("list")
+ public Result> list(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgListFormDTO formDTO){
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setStaffId(tokenDto.getUserId());
+ return new Result>().ok(icServiceOrgService.list(formDTO));
+ }
+
+ @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
+ public Result get(@PathVariable("id") String id){
+ IcServiceOrgDTO data = icServiceOrgService.get(id);
+ return new Result().ok(data);
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("add")
+ public Result save(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO dto) {
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ dto.setCustomerId(tokenDto.getCustomerId());
+ dto.setUserId(tokenDto.getUserId());
+ icServiceOrgService.save(dto);
+ return new Result();
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("edit")
+ public Result edit(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO dto){
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ dto.setCustomerId(tokenDto.getCustomerId());
+ dto.setUserId(tokenDto.getUserId());
+ icServiceOrgService.update(dto);
+ return new Result();
+ }
+
+ @PostMapping("del")
+ public Result delete(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgAddEditFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, IcServiceOrgAddEditFormDTO.Del.class);
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ icServiceOrgService.delete(formDTO);
+ return new Result();
+ }
+
+ @RequestMapping("detail")
+ public Result detail(@RequestBody IcServiceOrgListFormDTO formDTO) {
+ return new Result().ok(icServiceOrgService.detail(formDTO));
+ }
+
+ @RequestMapping("selectlist")
+ public Result> selectList(@LoginUser TokenDto tokenDto, @RequestBody IcServiceOrgListFormDTO formDTO){
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setStaffId(tokenDto.getUserId());
+ return new Result>().ok(icServiceOrgService.selectList(formDTO));
+ }
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java
new file mode 100644
index 0000000000..07e07b0d92
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectAttachmentController.java
@@ -0,0 +1,72 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.aop.NoRepeatSubmit;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.utils.ExcelUtils;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.dto.IcServiceProjectAttachmentDTO;
+import com.epmet.service.IcServiceProjectAttachmentService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 事件附件表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@RestController
+@RequestMapping("icServiceProjectAttachment")
+public class IcServiceProjectAttachmentController {
+
+ @Autowired
+ private IcServiceProjectAttachmentService icServiceProjectAttachmentService;
+
+ @RequestMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = icServiceProjectAttachmentService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
+ public Result get(@PathVariable("id") String id){
+ IcServiceProjectAttachmentDTO data = icServiceProjectAttachmentService.get(id);
+ return new Result().ok(data);
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("save")
+ public Result save(@RequestBody IcServiceProjectAttachmentDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ icServiceProjectAttachmentService.save(dto);
+ return new Result();
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("update")
+ public Result update(@RequestBody IcServiceProjectAttachmentDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ icServiceProjectAttachmentService.update(dto);
+ return new Result();
+ }
+
+ @PostMapping("delete")
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ icServiceProjectAttachmentService.delete(ids);
+ return new Result();
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java
new file mode 100644
index 0000000000..abcf757f89
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceProjectController.java
@@ -0,0 +1,244 @@
+package com.epmet.controller;
+
+import com.epmet.commons.tools.annotation.LoginUser;
+import com.epmet.commons.tools.aop.NoRepeatSubmit;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.EpmetException;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.commons.tools.security.dto.TokenDto;
+import com.epmet.commons.tools.utils.Result;
+import com.epmet.commons.tools.validator.AssertUtils;
+import com.epmet.commons.tools.validator.ValidatorUtils;
+import com.epmet.commons.tools.validator.group.AddGroup;
+import com.epmet.commons.tools.validator.group.DefaultGroup;
+import com.epmet.commons.tools.validator.group.UpdateGroup;
+import com.epmet.dto.IcServiceProjectDTO;
+import com.epmet.dto.form.*;
+import com.epmet.dto.result.IcServiceRecDetailRes;
+import com.epmet.dto.result.ServiceProjectListResultDTO;
+import com.epmet.dto.result.ServiceProjectRecordResultDTO;
+import com.epmet.entity.IcServiceRecordEntity;
+import com.epmet.service.IcServiceProjectService;
+import com.epmet.service.IcServiceRecordService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * 服务项目管理表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@RestController
+@RequestMapping("icServiceProject")
+public class IcServiceProjectController {
+
+ @Autowired
+ private IcServiceProjectService icServiceProjectService;
+ @Autowired
+ private IcServiceRecordService icServiceRecordService;
+
+
+ @RequestMapping("page")
+ public Result> page(@RequestParam Map params){
+ PageData page = icServiceProjectService.page(params);
+ return new Result>().ok(page);
+ }
+
+ @RequestMapping(value = "{id}",method = {RequestMethod.POST,RequestMethod.GET})
+ public Result get(@PathVariable("id") String id){
+ IcServiceProjectDTO data = icServiceProjectService.get(id);
+ return new Result().ok(data);
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("save")
+ public Result save(@RequestBody IcServiceProjectDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
+ icServiceProjectService.save(dto);
+ return new Result();
+ }
+
+ @NoRepeatSubmit
+ @PostMapping("update")
+ public Result update(@RequestBody IcServiceProjectDTO dto){
+ //效验数据
+ ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
+ icServiceProjectService.update(dto);
+ return new Result();
+ }
+
+ @PostMapping("delete")
+ public Result delete(@RequestBody String[] ids){
+ //效验数据
+ AssertUtils.isArrayEmpty(ids, "id");
+ icServiceProjectService.delete(ids);
+ return new Result();
+ }
+
+ /**
+ * Desc: 服务项目新增
+ * @param tokenDto
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/27 16:04
+ */
+ @PostMapping("serviceProjectAdd")
+ public Result serviceProjectAdd(@LoginUser TokenDto tokenDto,@RequestBody ServiceProjectFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, ServiceProjectFormDTO.ServiceProjectAddForm.class);
+ formDTO.setUserId(tokenDto.getUserId());
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ icServiceProjectService.serviceProjectAdd(formDTO);
+ return new Result();
+ }
+
+ /**
+ * Desc: 服务项目列表
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/27 16:46
+ */
+ @PostMapping("serviceProjectList")
+ public Result serviceProjectList(@LoginUser TokenDto tokenDto,@RequestBody ServiceProjectListFormDTO formDTO){
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ formDTO.setUserId(tokenDto.getUserId());
+ return new Result().ok(icServiceProjectService.serviceProjectList(formDTO));
+ }
+
+ /**
+ * Desc: 服务项目详情
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/30 15:46
+ */
+ @PostMapping("serviceProjectDetail")
+ public Result serviceProjectDetail(@RequestBody ServiceProjectListFormDTO formDTO){
+ ValidatorUtils.validateEntity(formDTO, ServiceProjectListFormDTO.ServiceProjectDetail.class);
+ return new Result().ok(icServiceProjectService.serviceProjectDetail(formDTO));
+ }
+
+ /**
+ * Desc: 修改【服务项目】
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/30 09:36
+ */
+ @PostMapping("serviceProjectEdit")
+ public Result serviceProjectEdit(@RequestBody ServiceProjectFormDTO formDTO,@LoginUser TokenDto tokenDto){
+ ValidatorUtils.validateEntity(formDTO, ServiceProjectFormDTO.ServiceProjectUpdateForm.class);
+ formDTO.setCustomerId(tokenDto.getCustomerId());
+ icServiceProjectService.serviceProjectEdit(formDTO);
+ return new Result();
+ }
+
+ /**
+ * Desc: 上下架【服务项目】
+ * @param ids
+ * @author zxc
+ * @date 2022/5/30 10:17
+ */
+ @PostMapping("serviceProjectEnabled")
+ public Result serviceProjectEnabled(@RequestBody List ids){
+ icServiceProjectService.serviceProjectEnabled(ids);
+ return new Result();
+ }
+
+ /**
+ * http://yapi.elinkservice.cn/project/245/interface/api/7820
+ *
+ * @param serviceId
+ * @return 【服务项目记录】取消:进行中的项目可以取消。删除该记录
+ */
+ @PostMapping("service/cancel/{service-id}")
+ public Result cancelService(@PathVariable("service-id") String serviceId) {
+ icServiceRecordService.cancelService(serviceId, "yzm");
+ return new Result();
+ }
+
+ /**
+ * http://yapi.elinkservice.cn/project/245/interface/api/7821
+ * @param serviceId
+ * @return 【服务项目记录】详情
+ */
+ @PostMapping("service/detail/{service-id}")
+ public Result queryServiceDetail(@PathVariable("service-id") String serviceId) {
+ return new Result().ok(icServiceRecordService.queryServiceDetail(serviceId));
+ }
+
+ /**
+ * 【服务项目记录】修改
+ *
+ * @param formDTO
+ * @return
+ */
+ @PostMapping("service/update")
+ public Result updateServiceRecord(@RequestBody IcServiceEditFormDTO formDTO) {
+ ValidatorUtils.validateEntity(formDTO, IcServiceEditFormDTO.AddUserShowGroup.class, IcServiceEditFormDTO.AddUserInternalGroup.class);
+ icServiceRecordService.updateServiceRecord(formDTO);
+ return new Result();
+ }
+
+ /**
+ * 服务列表
+ * @param input
+ * @return
+ */
+ @PostMapping("/service/recordList")
+ public Result listServiceRecords(@RequestBody ServiceProjectRecordFormDTO input) {
+
+ PageData page = icServiceRecordService.listServiceRecords(
+ input.getServiceCategoryKey(), input.getServiceProjectName(), input.getServiceOrgName(), input.getServiceTimeStart(),
+ input.getServiceTimeEnd(), input.getServiceStatus(), input.getSatisfaction(), input.getPageNo(), input.getPageSize());
+
+ return new Result().ok(page);
+ }
+
+ /**
+ * 发起服务
+ * @param input
+ * @return
+ */
+ @PostMapping("/service/initiate")
+ public Result initiateService(@RequestBody ServiceProjectRecordFormDTO input) {
+
+ ValidatorUtils.validateEntity(input, ServiceProjectRecordFormDTO.Initiate.class, ServiceProjectFeedbackFormDTO.InitiateGroup.class);
+ icServiceRecordService.initiateService(input);
+
+ return new Result();
+ }
+
+ /**
+ * 反馈
+ * @param input
+ * @return
+ */
+ @PostMapping("/service/feedback")
+ public Result serviceFeedback(@RequestBody ServiceProjectFeedbackFormDTO input) {
+ ValidatorUtils.validateEntity(input, ServiceProjectFeedbackFormDTO.FeedbackGroup.class);
+ String serviceRecordId = input.getServiceRecordId();
+
+ // 做状态检查,未反馈的,服务状态为服务中的才可以反馈
+ IcServiceRecordEntity serviceRecord = icServiceRecordService.selectById(serviceRecordId);
+ if (serviceRecord == null) {
+ String msg = "未找到服务记录";
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg);
+ }
+
+ if ("completed".equals(serviceRecord.getServiceStatus())) {
+ String msg = "服务已完成,不能再次反馈";
+ throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), msg, msg);
+ }
+
+ icServiceRecordService.serviceFeedback(serviceRecord.getServiceCategoryKey(),
+ serviceRecord.getServiceOrgId(),
+ serviceRecord.getServiceProjectId(),
+ serviceRecord.getId(),
+ input);
+ return new Result();
+ }
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java
new file mode 100755
index 0000000000..301a261fb1
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java
@@ -0,0 +1,33 @@
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.IcServiceFeedbackResDTO;
+import com.epmet.entity.IcServiceFeedbackEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ *
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-30
+ */
+@Mapper
+public interface IcServiceFeedbackDao extends BaseDao {
+
+ /**
+ * 根据服务记录id,查询反馈记录
+ * @param serviceRecordId
+ * @return
+ */
+ IcServiceFeedbackResDTO selectByRecId(@Param("serviceRecordId") String serviceRecordId);
+
+ /**
+ * 根据服务反馈id,查询附件列表
+ * @param feedBackId
+ * @return
+ */
+ List getAttachmentList(String feedBackId);
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java
new file mode 100644
index 0000000000..5407d8f10b
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceOrgDao.java
@@ -0,0 +1,34 @@
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.IcServiceOrgListFormDTO;
+import com.epmet.dto.result.IcServiceOrgListResultDTO;
+import com.epmet.dto.result.IcServiceOrgSelectListResultDTO;
+import com.epmet.entity.IcServiceOrgEntity;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Mapper
+public interface IcServiceOrgDao extends BaseDao {
+
+ /**
+ * @Author sun
+ * @Description 服务组织-列表查询
+ **/
+ List selectServiceOrgList(IcServiceOrgListFormDTO formDTO);
+
+ /**
+ * @Author sun
+ * @Description 服务组织列表_下拉框
+ **/
+ List selectServiceOrgSelectList(IcServiceOrgListFormDTO formDTO);
+
+ void del(IcServiceOrgEntity entity);
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java
new file mode 100644
index 0000000000..17eddc6215
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectAttachmentDao.java
@@ -0,0 +1,27 @@
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.entity.IcServiceProjectAttachmentEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 事件附件表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Mapper
+public interface IcServiceProjectAttachmentDao extends BaseDao {
+
+ /**
+ * Desc: 根据服务项目ID删除附件
+ * @param id
+ * @author zxc
+ * @date 2022/5/30 09:50
+ */
+ void delAttachmentByServiceProjectId(@Param("id")String id);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java
new file mode 100644
index 0000000000..528e9a06a5
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceProjectDao.java
@@ -0,0 +1,37 @@
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.form.ServiceProjectListFormDTO;
+import com.epmet.dto.result.ServiceProjectListResultDTO;
+import com.epmet.entity.IcServiceProjectEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 服务项目管理表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Mapper
+public interface IcServiceProjectDao extends BaseDao {
+
+ /**
+ * Desc: 查询服务项目列表
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/27 17:13
+ */
+ List getServiceProjectList(ServiceProjectListFormDTO formDTO);
+
+ /**
+ * Desc: 上下架【服务项目】
+ * @param ids
+ * @author zxc
+ * @date 2022/5/30 10:17
+ */
+ void serviceProjectEnabled(@Param("ids") List ids);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java
new file mode 100644
index 0000000000..5a51a14a76
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceRecordDao.java
@@ -0,0 +1,29 @@
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.ServiceProjectRecordResultDTO;
+import com.epmet.entity.IcServiceRecordEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ *
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-30
+ */
+@Mapper
+public interface IcServiceRecordDao extends BaseDao {
+
+ List listServiceRecords(
+ @Param("serviceCategoryKey") String serviceCategoryKey,
+ @Param("serviceProjectName") String serviceProjectName,
+ @Param("serviceOrgName") String serviceOrgName,
+ @Param("serviceTimeStart") Date serviceTimeStart,
+ @Param("serviceTimeEnd") Date serviceTimeEnd,
+ @Param("serviceStatus") String serviceStatus,
+ @Param("satisfaction") String satisfaction);
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java
new file mode 100644
index 0000000000..c2fc96cfd9
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java
@@ -0,0 +1,23 @@
+package com.epmet.dao;
+
+import com.epmet.commons.mybatis.dao.BaseDao;
+import com.epmet.dto.result.IcServiceScopeDTO;
+import com.epmet.entity.IcServiceScopeEntity;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ *
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-30
+ */
+@Mapper
+public interface IcServiceScopeDao extends BaseDao {
+
+ int update(@Param("serviceId") String serviceId, @Param("userId") String userId);
+
+ List selectList(String serviceRecordId);
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java
new file mode 100755
index 0000000000..df89735b5b
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceFeedbackEntity.java
@@ -0,0 +1,83 @@
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+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 2022-05-30
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ic_service_feedback")
+public class IcServiceFeedbackEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableField(fill = FieldFill.INSERT)
+ private String customerId;
+ /**
+ * 服务类别ID
+ */
+ private String serviceCategoryKey;
+
+ /**
+ * 服务项目ID
+ */
+ private String serviceProjectId;
+
+ /**
+ * 服务组织ID
+ */
+ private String serviceOrgId;
+
+ /**
+ * 服务目标
+ */
+ private String serviceGoal;
+
+ /**
+ * 服务效果
+ */
+ private String serviceEffect;
+
+ /**
+ * 服务人数
+ */
+ //private Integer servicePeopleNumber;
+
+ /**
+ * 满意度。满意度 - 不满意:bad、基本满意:good、非常满意:perfect
+ */
+ private String satisfaction;
+
+ /**
+ * 地址经度
+ */
+ private String longitude;
+
+ /**
+ * 地址纬度
+ */
+ private String latitude;
+
+ /**
+ * 地址
+ */
+ private String address;
+
+ /**
+ *
+ */
+ private String serviceRecordId;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java
new file mode 100644
index 0000000000..9b9da6dd7c
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceOrgEntity.java
@@ -0,0 +1,81 @@
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ic_service_org")
+public class IcServiceOrgEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户Id
+ */
+ private String customerId;
+
+ /**
+ * 所属组织机构Id
+ */
+ private String agencyId;
+
+ /**
+ * agencyId的所有上级,包含自己
+ */
+ private String agencyIdPath;
+
+ /**
+ * 服务类别【字典表 ic_service_type】多个值逗号分隔
+ */
+ private String serviceType;
+
+ /**
+ * 服务组织名称
+ */
+ private String orgName;
+
+ /**
+ * 组织描述
+ */
+ private String orgDescribe;
+
+ /**
+ * 负责人姓名
+ */
+ private String principalName;
+
+ /**
+ * 负责人电话
+ */
+ private String principalMobile;
+
+ /**
+ * 经度
+ */
+ private String longitude;
+
+ /**
+ * 纬度
+ */
+ private String latitude;
+
+ /**
+ * 地址
+ */
+ private String address;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java
new file mode 100644
index 0000000000..966b5a6d94
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java
@@ -0,0 +1,88 @@
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+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 2022-05-27
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ic_service_project_attachment")
+public class IcServiceProjectAttachmentEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ @TableField(fill = FieldFill.INSERT)
+ private String customerId;
+
+ /**
+ * 事件Id
+ */
+ private String icServiceId;
+
+ /**
+ * 隶属于。feedback:反馈;service:服务本身
+ */
+ private String attachTo;
+
+ /**
+ * 附件名
+ */
+ private String attachmentName;
+
+ /**
+ * 文件格式(JPG、PNG、PDF、JPEG、BMP、MP4、WMA、M4A、MP3、DOC、DOCX、XLS)
+ */
+ private String attachmentFormat;
+
+ /**
+ * 附件类型((图片 - image、 视频 - video、 语音 - voice、 文档 - doc))
+ */
+ private String attachmentType;
+
+ /**
+ * 附件地址
+ */
+ private String attachmentUrl;
+
+ /**
+ * 排序字段
+ */
+ private Integer sort;
+
+ /**
+ * 附件状态(审核中:auditing;
+auto_passed: 自动通过;
+review:结果不确定,需要人工审核;
+block: 结果违规;
+rejected:人工审核驳回;
+approved:人工审核通过)
+现在图片是同步审核的,所以图片只有auto_passed一种状态
+ */
+ private String status;
+
+ /**
+ * 失败原因
+ */
+ private String reason;
+
+ /**
+ * 语音或视频时长,秒
+ */
+ private Integer duration;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java
new file mode 100644
index 0000000000..b8a09e67cf
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectEntity.java
@@ -0,0 +1,74 @@
+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 2022-05-27
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ic_service_project")
+public class IcServiceProjectEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * 客户ID
+ */
+ private String customerId;
+
+ /**
+ * 组织ID
+ */
+ private String agencyId;
+
+ /**
+ * 组织ID的上级
+ */
+ private String pid;
+
+ /**
+ * 组织ID的所有上级[包括自己]
+ */
+ private String agencyIdPath;
+
+ /**
+ * 服务类别值
+ */
+ private String serviceCategoryKey;
+
+ /**
+ * 服务名称
+ */
+ private String serviceName;
+
+ /**
+ * 服务内容
+ */
+ private String serviceContent;
+
+ /**
+ * 政策级别,0市级;1区级;2街道级
+ */
+ private String policyLevel;
+
+ /**
+ * 政策依据
+ */
+ private String policyGround;
+
+ /**
+ * 启用状态,0启用,1禁用
+ */
+ private Integer enabled;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java
new file mode 100644
index 0000000000..4156c60604
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceRecordEntity.java
@@ -0,0 +1,89 @@
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+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 2022-05-30
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ic_service_record")
+public class IcServiceRecordEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableField(fill = FieldFill.INSERT)
+ private String customerId;
+
+ /**
+ * 服务类别ID
+ */
+ private String serviceCategoryKey;
+
+ /**
+ * 服务项目ID
+ */
+ private String serviceProjectId;
+
+ /**
+ * 服务项目名称
+ */
+ private String serviceProjectName;
+
+ /**
+ * 服务组织ID
+ */
+ private String serviceOrgId;
+
+ /**
+ * 服务组织名称
+ */
+ private String serviceOrgName;
+
+ /**
+ * 经办人姓名
+ */
+ private String principalName;
+
+ /**
+ * 联系方式
+ */
+ private String principalContact;
+
+ /**
+ * 服务时间
+ */
+ private Date serviceTimeStart;
+
+ /**
+ * 服务截止时间
+ */
+ private Date serviceTimeEnd;
+
+ /**
+ * in_service服务中;completed:已完成
+ */
+ private String serviceStatus;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+ /**
+ * 服务人数
+ */
+ private Integer servicePeopleNumber;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java
new file mode 100644
index 0000000000..1826e26df1
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceScopeEntity.java
@@ -0,0 +1,75 @@
+package com.epmet.entity;
+
+import com.baomidou.mybatisplus.annotation.FieldFill;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+
+import com.epmet.commons.mybatis.entity.BaseEpmetEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+import java.util.Date;
+
+/**
+ *
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-30
+ */
+@Data
+@EqualsAndHashCode(callSuper=false)
+@TableName("ic_service_scope")
+public class IcServiceScopeEntity extends BaseEpmetEntity {
+
+ private static final long serialVersionUID = 1L;
+
+ @TableField(fill = FieldFill.INSERT)
+ private String customerId;
+
+ /**
+ * 服务类别ID
+ */
+ private String serviceCategoryKey;
+
+ /**
+ * 服务项目ID
+ */
+ private String serviceProjectId;
+
+ /**
+ * 服务组织ID
+ */
+ private String serviceOrgId;
+
+ /**
+ * 服务记录的ID
+ */
+ private String serviceRecordId;
+
+ /**
+ * agency单位;grid网格;neighborhood小区
+ */
+ private String objectType;
+
+ /**
+ * 选中的组织的ID
+ */
+ private String objectId;
+
+ /**
+ * 发布范围的组织ID PATH
+ */
+ private String objectIdPath;
+
+ /**
+ *
+ */
+ private String objectName;
+
+ /**
+ * 备注
+ */
+ private String remark;
+
+}
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java
new file mode 100644
index 0000000000..79c052a9f8
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/excel/IcServiceOrgExcel.java
@@ -0,0 +1,75 @@
+package com.epmet.excel;
+
+import cn.afterturn.easypoi.excel.annotation.Excel;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Data
+public class IcServiceOrgExcel {
+
+ @Excel(name = "ID")
+ private String id;
+
+ @Excel(name = "客户Id")
+ private String customerId;
+
+ @Excel(name = "所属组织机构Id")
+ private String agencyId;
+
+ @Excel(name = "agencyId的所有上级,包含自己")
+ private String agencyIdPath;
+
+ @Excel(name = "服务类别【字典表 ic_service_type】多个值逗号分隔")
+ private String serviceType;
+
+ @Excel(name = "服务组织名称")
+ private String orgName;
+
+ @Excel(name = "组织描述")
+ private String orgDescribe;
+
+ @Excel(name = "负责人姓名")
+ private String principalName;
+
+ @Excel(name = "负责人电话")
+ private String principalMobile;
+
+ @Excel(name = "经度")
+ private String longitude;
+
+ @Excel(name = "纬度")
+ private String latitude;
+
+ @Excel(name = "地址")
+ private String address;
+
+ @Excel(name = "备注")
+ private String remarks;
+
+ @Excel(name = "删除标识")
+ private String delFlag;
+
+ @Excel(name = "乐观锁")
+ private Integer revision;
+
+ @Excel(name = "创建人")
+ private String createdBy;
+
+ @Excel(name = "创建时间")
+ private Date createdTime;
+
+ @Excel(name = "更新人")
+ private String updatedBy;
+
+ @Excel(name = "更新时间")
+ private Date updatedTime;
+
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java
new file mode 100644
index 0000000000..3115e08d8a
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceOrgService.java
@@ -0,0 +1,68 @@
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.IcServiceOrgDTO;
+import com.epmet.dto.form.IcServiceOrgAddEditFormDTO;
+import com.epmet.dto.form.IcServiceOrgListFormDTO;
+import com.epmet.dto.result.IcServiceOrgListResultDTO;
+import com.epmet.dto.result.IcServiceOrgSelectListResultDTO;
+import com.epmet.entity.IcServiceOrgEntity;
+
+import java.util.List;
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+public interface IcServiceOrgService extends BaseService {
+
+ /**
+ * 默认查询
+ *
+ * @param formDTO
+ * @return java.util.List
+ * @author generator
+ * @date 2022-05-27
+ */
+ PageData list(IcServiceOrgListFormDTO formDTO);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return IcServiceOrgDTO
+ * @author generator
+ * @date 2022-05-27
+ */
+ IcServiceOrgDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void save(IcServiceOrgAddEditFormDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void update(IcServiceOrgAddEditFormDTO dto);
+
+ void delete(IcServiceOrgAddEditFormDTO formDTO);
+
+ IcServiceOrgListResultDTO detail(IcServiceOrgListFormDTO formDTO);
+
+ List selectList(IcServiceOrgListFormDTO formDTO);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.java
new file mode 100644
index 0000000000..afc94ec748
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectAttachmentService.java
@@ -0,0 +1,78 @@
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.IcServiceProjectAttachmentDTO;
+import com.epmet.entity.IcServiceProjectAttachmentEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 事件附件表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+public interface IcServiceProjectAttachmentService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-05-27
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2022-05-27
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return IcServiceProjectAttachmentDTO
+ * @author generator
+ * @date 2022-05-27
+ */
+ IcServiceProjectAttachmentDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void save(IcServiceProjectAttachmentDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void update(IcServiceProjectAttachmentDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void delete(String[] ids);
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java
new file mode 100644
index 0000000000..aa02487cab
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceProjectService.java
@@ -0,0 +1,122 @@
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.IcServiceProjectDTO;
+import com.epmet.dto.form.ServiceProjectFormDTO;
+import com.epmet.dto.form.ServiceProjectListFormDTO;
+import com.epmet.dto.result.ServiceProjectListResultDTO;
+import com.epmet.entity.IcServiceProjectEntity;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 服务项目管理表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+public interface IcServiceProjectService extends BaseService {
+
+ /**
+ * 默认分页
+ *
+ * @param params
+ * @return PageData
+ * @author generator
+ * @date 2022-05-27
+ */
+ PageData page(Map params);
+
+ /**
+ * 默认查询
+ *
+ * @param params
+ * @return java.util.List
+ * @author generator
+ * @date 2022-05-27
+ */
+ List list(Map params);
+
+ /**
+ * 单条查询
+ *
+ * @param id
+ * @return IcServiceProjectDTO
+ * @author generator
+ * @date 2022-05-27
+ */
+ IcServiceProjectDTO get(String id);
+
+ /**
+ * 默认保存
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void save(IcServiceProjectDTO dto);
+
+ /**
+ * 默认更新
+ *
+ * @param dto
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void update(IcServiceProjectDTO dto);
+
+ /**
+ * 批量删除
+ *
+ * @param ids
+ * @return void
+ * @author generator
+ * @date 2022-05-27
+ */
+ void delete(String[] ids);
+
+ /**
+ * Desc: 服务项目新增
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/27 16:04
+ */
+ void serviceProjectAdd(ServiceProjectFormDTO formDTO);
+
+ /**
+ * Desc: 服务项目列表
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/27 16:46
+ */
+ PageData serviceProjectList(ServiceProjectListFormDTO formDTO);
+
+ /**
+ * Desc: 服务项目详情
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/30 15:46
+ */
+ ServiceProjectListResultDTO serviceProjectDetail(ServiceProjectListFormDTO formDTO);
+
+ /**
+ * Desc: 修改【服务项目】
+ * @param formDTO
+ * @author zxc
+ * @date 2022/5/30 09:36
+ */
+ void serviceProjectEdit(ServiceProjectFormDTO formDTO);
+
+ /**
+ * Desc: 上下架【服务项目】
+ * @param ids
+ * @author zxc
+ * @date 2022/5/30 10:17
+ */
+ void serviceProjectEnabled(List ids);
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java
new file mode 100644
index 0000000000..1fe7cb518a
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordService.java
@@ -0,0 +1,56 @@
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.commons.tools.page.PageData;
+import com.epmet.dto.form.IcServiceEditFormDTO;
+import com.epmet.dto.form.ServiceProjectFeedbackFormDTO;
+import com.epmet.dto.form.ServiceProjectRecordFormDTO;
+import com.epmet.dto.result.IcServiceRecDetailRes;
+import com.epmet.dto.result.ServiceProjectRecordResultDTO;
+import com.epmet.entity.IcServiceRecordEntity;
+
+import java.util.Date;
+
+/**
+ *
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-30
+ */
+public interface IcServiceRecordService extends BaseService {
+
+ /**
+ * http://yapi.elinkservice.cn/project/245/interface/api/7820
+ * @param serviceId
+ * 【服务项目记录】取消:进行中的项目可以取消。删除该记录
+ */
+ void cancelService(String serviceId,String userId);
+
+ /**
+ * 【服务项目记录】详情
+ * @param serviceId
+ * @return
+ */
+ IcServiceRecDetailRes queryServiceDetail(String serviceId);
+
+ /**
+ * 【服务项目记录】修改
+ * @param formDTO
+ */
+ void updateServiceRecord(IcServiceEditFormDTO formDTO);
+
+ PageData listServiceRecords(String serviceCategoryKey, String serviceProjectName, String serviceOrgName,
+ Date serviceTimeStart, Date serviceTimeEnd, String serviceStatus,
+ String satisfaction, Integer pageNo, Integer pageSize);
+
+ /**
+ * 发起服务
+ * @param input
+ */
+ void initiateService(ServiceProjectRecordFormDTO input);
+
+ /**
+ * 服务反馈
+ */
+ void serviceFeedback(String serviceCategoryKey, String serviceOrgId, String serviceProjectId, String serviceRecordId, ServiceProjectFeedbackFormDTO feedbackDto);
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java
new file mode 100644
index 0000000000..00603de5c3
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceScopeService.java
@@ -0,0 +1,14 @@
+package com.epmet.service;
+
+import com.epmet.commons.mybatis.service.BaseService;
+import com.epmet.entity.IcServiceScopeEntity;
+
+/**
+ *
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-30
+ */
+public interface IcServiceScopeService extends BaseService {
+
+}
\ No newline at end of file
diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java
new file mode 100644
index 0000000000..6697510040
--- /dev/null
+++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceOrgServiceImpl.java
@@ -0,0 +1,202 @@
+package com.epmet.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
+import com.epmet.commons.tools.constant.FieldConstant;
+import com.epmet.commons.tools.constant.NumConstant;
+import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
+import com.epmet.commons.tools.enums.DictTypeEnum;
+import com.epmet.commons.tools.exception.EpmetErrorCode;
+import com.epmet.commons.tools.exception.EpmetException;
+import com.epmet.commons.tools.page.PageData;
+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.IcServiceOrgDao;
+import com.epmet.dto.IcServiceOrgDTO;
+import com.epmet.dto.form.IcServiceOrgAddEditFormDTO;
+import com.epmet.dto.form.IcServiceOrgListFormDTO;
+import com.epmet.dto.result.IcServiceOrgListResultDTO;
+import com.epmet.dto.result.IcServiceOrgSelectListResultDTO;
+import com.epmet.entity.IcServiceOrgEntity;
+import com.epmet.feign.EpmetAdminOpenFeignClient;
+import com.epmet.service.IcServiceOrgService;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import org.apache.commons.collections4.MapUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 服务组织表
+ *
+ * @author generator generator@elink-cn.com
+ * @since v1.0.0 2022-05-27
+ */
+@Service
+public class IcServiceOrgServiceImpl extends BaseServiceImpl implements IcServiceOrgService {
+ @Autowired
+ private EpmetAdminOpenFeignClient epmetAdminOpenFeignClient;
+
+
+ @Override
+ public PageData list(IcServiceOrgListFormDTO formDTO) {
+ CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
+ if (null == staffInfo) {
+ throw new EpmetException("获取工作人员信息失败");
+ }
+ //查询当前组织及下级数据
+ formDTO.setAgencyId(staffInfo.getAgencyId());
+ //列表/导出查询
+ PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize(), formDTO.getIsPage());
+ List list = baseDao.selectServiceOrgList(formDTO);
+ PageInfo pageInfo = new PageInfo<>(list);
+
+ //封装服务类别数据
+ if (!CollectionUtils.isEmpty(list)) {
+ //服务类别字典表数据
+ Result