Browse Source

detail

master
zxc 3 years ago
parent
commit
60cf5478e3
  1. 3
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceFeedbackV2DTO.java
  2. 24
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2DetailFormDTO.java
  3. 71
      epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceRecordV2DetailResultDTO.java
  4. 14
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java
  5. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackV2Dao.java
  6. 3
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java
  7. 10
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordV2Service.java
  8. 38
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordV2ServiceImpl.java
  9. 37
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackV2Dao.xml
  10. 11
      epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml

3
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/IcServiceFeedbackV2DTO.java

@ -4,6 +4,7 @@ import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
@ -97,4 +98,6 @@ public class IcServiceFeedbackV2DTO implements Serializable {
*/
private Integer delFlag;
private List<HeartAttachmentDTO> fileList;
}

24
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceRecordV2DetailFormDTO.java

@ -0,0 +1,24 @@
package com.epmet.dto.form;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* @Author zxc
* @DateTime 2022/7/19 16:34
* @DESC
*/
@Data
public class ServiceRecordV2DetailFormDTO implements Serializable {
private static final long serialVersionUID = 476430342315532314L;
public interface ServiceRecordV2DetailForm{}
@NotBlank(message = "serviceRecordId不能为空",groups = ServiceRecordV2DetailForm.class)
private String serviceRecordId;
}

71
epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/result/ServiceRecordV2DetailResultDTO.java

@ -0,0 +1,71 @@
package com.epmet.dto.result;
import com.epmet.dto.IcServiceFeedbackV2DTO;
import com.epmet.dto.IcServiceScopeV2DTO;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @Author zxc
* @DateTime 2022/7/19 16:34
* @DESC
*/
@Data
public class ServiceRecordV2DetailResultDTO implements Serializable {
private static final long serialVersionUID = 3385425608362604836L;
private String serviceRecordId;
private String serviceName;
/**
* 服务组织类型
社区自组织community_org
志愿者ic_user_volunteer
联建单位party_unit
*/
private String serviceOrgType;
/**
* 服务组织ID
*/
private String serviceOrgId;
/**
* 经办人姓名
*/
private String principalName;
/**
* 联系方式
*/
private String principalContact;
/**
* 服务时间
*/
private Date serviceTimeStart;
/**
* 服务截止时间
*/
private Date serviceTimeEnd;
/**
* in_service服务中completed:已完成cancel取消
*/
private String serviceStatus;
/**
* 备注
*/
private String remark;
private List<IcServiceScopeV2DTO> gridIdList;
private IcServiceFeedbackV2DTO feedback;
}

14
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcServiceRecordV2Controller.java

@ -7,11 +7,14 @@ 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.IcServiceRecordV2DTO;
import com.epmet.dto.form.ServiceRecordV2DetailFormDTO;
import com.epmet.dto.form.IcServiceRecordV2AddEditFormDTO;
import com.epmet.dto.form.ServiceRecordV2ListFormDTO;
import com.epmet.dto.result.ServiceRecordV2DetailResultDTO;
import com.epmet.service.IcServiceRecordV2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -94,4 +97,15 @@ public class IcServiceRecordV2Controller {
return new Result<PageData>().ok(icServiceRecordV2Service.serviceRecordV2List(formDTO));
}
/**
* Desc: 详情
* @param formDTO
* @author zxc
* @date 2022/7/19 16:37
*/
@PostMapping("detail")
public Result<ServiceRecordV2DetailResultDTO> serviceRecordV2Detail(@RequestBody ServiceRecordV2DetailFormDTO formDTO){
ValidatorUtils.validateEntity(formDTO,ServiceRecordV2DetailFormDTO.ServiceRecordV2DetailForm.class);
return new Result<ServiceRecordV2DetailResultDTO>().ok(icServiceRecordV2Service.serviceRecordV2Detail(formDTO));
}
}

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceFeedbackV2Dao.java

@ -1,8 +1,10 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcServiceFeedbackV2DTO;
import com.epmet.entity.IcServiceFeedbackV2Entity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* 服务记录反馈表
@ -12,5 +14,7 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface IcServiceFeedbackV2Dao extends BaseDao<IcServiceFeedbackV2Entity> {
IcServiceFeedbackV2DTO getFeedbackV2(@Param("serviceRecordId") String serviceRecordId);
}

3
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/dao/IcServiceScopeDao.java

@ -1,6 +1,7 @@
package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.dto.IcServiceScopeV2DTO;
import com.epmet.dto.result.IcServiceScopeDTO;
import com.epmet.entity.IcServiceScopeEntity;
import org.apache.ibatis.annotations.Mapper;
@ -20,4 +21,6 @@ public interface IcServiceScopeDao extends BaseDao<IcServiceScopeEntity> {
int update(@Param("serviceId") String serviceId, @Param("userId") String userId);
List<IcServiceScopeDTO> selectList(String serviceRecordId);
List<IcServiceScopeV2DTO> selectListV2(@Param("serviceRecordId") String serviceRecordId);
}

10
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcServiceRecordV2Service.java

@ -3,8 +3,10 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.IcServiceRecordV2DTO;
import com.epmet.dto.form.ServiceRecordV2DetailFormDTO;
import com.epmet.dto.form.IcServiceRecordV2AddEditFormDTO;
import com.epmet.dto.form.ServiceRecordV2ListFormDTO;
import com.epmet.dto.result.ServiceRecordV2DetailResultDTO;
import com.epmet.entity.IcServiceRecordV2Entity;
import java.util.List;
@ -86,5 +88,13 @@ public interface IcServiceRecordV2Service extends BaseService<IcServiceRecordV2E
*/
PageData serviceRecordV2List(ServiceRecordV2ListFormDTO formDTO);
/**
* Desc: 详情
* @param formDTO
* @author zxc
* @date 2022/7/19 16:37
*/
ServiceRecordV2DetailResultDTO serviceRecordV2Detail(ServiceRecordV2DetailFormDTO formDTO);
void cancel(IcServiceRecordV2AddEditFormDTO dto);
}

38
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordV2ServiceImpl.java

@ -11,14 +11,21 @@ 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.dao.IcServiceFeedbackV2Dao;
import com.epmet.dao.IcServiceRecordV2Dao;
import com.epmet.dao.IcServiceScopeDao;
import com.epmet.dto.IcServiceFeedbackV2DTO;
import com.epmet.dto.IcServiceRecordV2DTO;
import com.epmet.dto.IcServiceScopeV2DTO;
import com.epmet.dto.form.IcServiceRecordV2AddEditFormDTO;
import com.epmet.dto.form.ServiceProjectFeedbackFormDTO;
import com.epmet.dto.form.ServiceRecordV2DetailFormDTO;
import com.epmet.dto.form.ServiceRecordV2ListFormDTO;
import com.epmet.dto.result.IcServiceScopeDTO;
import com.epmet.dto.result.ServiceRecordV2DetailResultDTO;
import com.epmet.dto.result.ServiceRecordV2ListResultDTO;
import com.epmet.entity.*;
import com.epmet.entity.HeartAttachmentEntity;
import com.epmet.entity.IcServiceFeedbackV2Entity;
import com.epmet.entity.IcServiceRecordV2Entity;
import com.epmet.entity.IcServiceScopeV2Entity;
import com.epmet.redis.IcPartyUnitRedis;
import com.epmet.service.HeartAttachmentService;
import com.epmet.service.IcServiceFeedbackV2Service;
@ -59,6 +66,10 @@ public class IcServiceRecordV2ServiceImpl extends BaseServiceImpl<IcServiceRecor
@Autowired
private HeartAttachmentService heartAttachmentService;
@Autowired
private IcServiceScopeDao serviceScopeDao;
@Autowired
private IcServiceFeedbackV2Dao serviceFeedbackV2Dao;
@Override
public PageData<IcServiceRecordV2DTO> page(Map<String, Object> params) {
@ -201,4 +212,25 @@ public class IcServiceRecordV2ServiceImpl extends BaseServiceImpl<IcServiceRecor
return result;
}
/**
* Desc: 详情
* @param formDTO
* @author zxc
* @date 2022/7/19 16:37
*/
@Override
public ServiceRecordV2DetailResultDTO serviceRecordV2Detail(ServiceRecordV2DetailFormDTO formDTO) {
IcServiceRecordV2Entity entity = baseDao.selectById(formDTO.getServiceRecordId());
if (null == entity){
return new ServiceRecordV2DetailResultDTO();
}
ServiceRecordV2DetailResultDTO result = ConvertUtils.sourceToTarget(entity, ServiceRecordV2DetailResultDTO.class);
result.setServiceRecordId(entity.getId());
List<IcServiceScopeV2DTO> scopeV2DTOS = serviceScopeDao.selectListV2(formDTO.getServiceRecordId());
result.setGridIdList(scopeV2DTOS);
IcServiceFeedbackV2DTO feedbackV2 = serviceFeedbackV2Dao.getFeedbackV2(formDTO.getServiceRecordId());
result.setFeedback(feedbackV2);
return result;
}
}

37
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceFeedbackV2Dao.xml

@ -22,5 +22,42 @@
<result property="delFlag" column="DEL_FLAG"/>
</resultMap>
<resultMap id="getFeedbackV2Map" type="com.epmet.dto.IcServiceFeedbackV2DTO">
<result column="serviceGoal" property="serviceGoal"/>
<result column="serviceEffect" property="serviceEffect"/>
<result column="servicePeopleNumber" property="servicePeopleNumber"/>
<result column="satisfaction" property="satisfaction"/>
<result column="address" property="address"/>
<result column="longitude" property="longitude"/>
<result column="latitude" property="latitude"/>
<collection property="fileList" ofType="com.epmet.dto.HeartAttachmentDTO">
<result column="url" property="url"/>
<result column="name" property="name"/>
<result column="type" property="type"/>
<result column="format" property="format"/>
<result column="duration" property="duration"/>
<result column="id" property="id"/>
</collection>
</resultMap>
<select id="getFeedbackV2" resultMap="getFeedbackV2Map">
SELECT
sf.SERVICE_GOAL AS serviceGoal,
sf.SERVICE_EFFECT AS serviceEffect,
sf.SERVICE_PEOPLE_NUMBER AS servicePeopleNumber,
sf.SATISFACTION AS satisfaction,
sf.ADDRESS AS address,
sf.LONGITUDE AS longitude,
sf.LATITUDE AS latitude,
ha.url AS url,
ha.NAME AS name,
ha.type AS type,
ha.format AS format,
ha.duration AS duration,
ha.id AS id
FROM ic_service_feedback_v2 sf
LEFT JOIN heart_attachment ha ON ha.business_id = sf.ID AND ha.del_flag = '0'
WHERE sf.SERVICE_RECORD_ID = #{serviceRecordId}
</select>
</mapper>

11
epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcServiceScopeDao.xml

@ -39,4 +39,15 @@
s.DEL_FLAG = '0'
AND s.SERVICE_RECORD_ID = #{serviceRecordId}
</select>
<select id="selectListV2" resultType="com.epmet.dto.IcServiceScopeV2DTO">
SELECT
s.OBJECT_ID,
s.OBJECT_TYPE,
s.OBJECT_NAME
FROM
ic_service_scope_v2 s
WHERE
s.DEL_FLAG = '0'
AND s.SERVICE_RECORD_ID = #{serviceRecordId}
</select>
</mapper>
Loading…
Cancel
Save