Browse Source

反馈详情

feature/teamB_zz_wgh
yinzuomei 3 years ago
parent
commit
6fc630b27f
  1. 64
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceFeedbackResDTO.java
  2. 9
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java
  3. 9
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackDao.java
  4. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java
  5. 48
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml

64
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 serviceProjectId;
/**
* 服务目标
*/
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<IcServiceFeedbackResDTO.Attachment> attachmentList;
@Data
public static class Attachment {
private String attachmentName;
private String attachmentFormat;
private String attachmentType;
private String attachmentUrl;
}
}

9
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/IcServiceRecDetailRes.java

@ -78,4 +78,13 @@ public class IcServiceRecDetailRes implements Serializable {
*/ */
private List<IcServiceScopeDTO> serviceScope; private List<IcServiceScopeDTO> serviceScope;
/**
* 服务人数
*/
private Integer servicePeopleNumber;
/**
* 反馈详情
*/
private IcServiceFeedbackResDTO feedBack;
} }

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

@ -1,8 +1,12 @@
package com.epmet.dao; package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.result.IcServiceFeedbackResDTO;
import com.epmet.entity.IcServiceFeedbackEntity; import com.epmet.entity.IcServiceFeedbackEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/** /**
* *
@ -12,5 +16,8 @@ import org.apache.ibatis.annotations.Mapper;
*/ */
@Mapper @Mapper
public interface IcServiceFeedbackDao extends BaseDao<IcServiceFeedbackEntity> { public interface IcServiceFeedbackDao extends BaseDao<IcServiceFeedbackEntity> {
IcServiceFeedbackResDTO selectByRecId(@Param("serviceRecordId") String serviceRecordId);
List<IcServiceFeedbackResDTO.Attachment> getAttachmentList(String serviceProjectId);
} }

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java

@ -1,6 +1,5 @@
package com.epmet.service.impl; package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.constant.ServiceConstant;
import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.enums.DictTypeEnum;
@ -100,6 +99,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl<IcServiceRecordD
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "服务分类字典查询异常"); throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "服务分类字典查询异常");
} }
res.setServiceCategoryName(icServiceTypeMapRes.getData().get(res.getServiceCategoryKey())); res.setServiceCategoryName(icServiceTypeMapRes.getData().get(res.getServiceCategoryKey()));
res.setFeedBack(serviceFeedbackDao.selectByRecId(icServiceRecordEntity.getId()));
} }
return res; return res;
} }

48
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackDao.xml

@ -24,5 +24,53 @@
<result property="serviceRecordId" column="SERVICE_RECORD_ID"/> <result property="serviceRecordId" column="SERVICE_RECORD_ID"/>
</resultMap> </resultMap>
<resultMap id="IcServiceFeedbackResDTOMap" type="com.epmet.dto.result.IcServiceFeedbackResDTO">
<result property="serviceGoal" column="SERVICE_GOAL"/>
<result property="serviceEffect" column="SERVICE_EFFECT"/>
<result property="satisfaction" column="SATISFACTION"/>
<result property="longitude" column="LONGITUDE"/>
<result property="latitude" column="LATITUDE"/>
<result property="address" column="address"/>
<result property="serviceProjectId" column="SERVICE_PROJECT_ID"/>
<collection property="attachmentList" column="SERVICE_PROJECT_ID"
ofType="com.epmet.dto.result.IcServiceFeedbackResDTO$Attachment"
select="com.epmet.dao.IcServiceFeedbackDao.getAttachmentList">
<result property="attachmentName" column="ATTACHMENT_NAME"/>
<result property="attachmentFormat" column="ATTACHMENT_FORMAT"/>
<result property="attachmentType" column="ATTACHMENT_TYPE"/>
<result property="attachmentUrl" column="ATTACHMENT_URL"/>
</collection>
</resultMap>
<select id="selectByRecId" parameterType="map" resultMap="IcServiceFeedbackResDTOMap">
SELECT
f.SERVICE_GOAL,
f.SERVICE_EFFECT,
f.SERVICE_PEOPLE_NUMBER,
f.SATISFACTION,
f.LATITUDE,
f.LONGITUDE,
f.address,
f.SERVICE_PROJECT_ID
FROM
ic_service_feedback f
WHERE
f.DEL_FLAG = '0'
and f.SERVICE_RECORD_ID=#{serviceRecordId}
</select>
<select id="getAttachmentList" parameterType="java.lang.String" resultType="com.epmet.dto.result.IcServiceFeedbackResDTO$Attachment">
SELECT
t.ATTACHMENT_NAME,
t.ATTACHMENT_TYPE,
t.ATTACHMENT_FORMAT,
t.ATTACHMENT_URL
FROM
ic_service_project_attachment t
WHERE
t.DEL_FLAG = '0'
AND t.IC_SERVICE_ID = #{serviceProjectId}
ORDER BY
t.SORT ASC
</select>
</mapper> </mapper>
Loading…
Cancel
Save