添加服务记录接口;
获取签约协议接口修改;
This commit is contained in:
parent
25bcc18232
commit
4023b7fbef
@ -32,7 +32,7 @@ public class ResidentServiceApplyController extends BaseController {
|
||||
@Resource
|
||||
private IResidentServiceAppletService residentServiceAppletService;
|
||||
|
||||
@ApiOperation("提交服务申请")
|
||||
@ApiOperation("提交服务预约")
|
||||
@PostMapping("/save")
|
||||
public R<?> save(@RequestBody ResidentServiceApplyBody body) {
|
||||
if (body == null || StringUtils.isBlank(body.getPackageNo()) || StringUtils.isBlank(body.getFormNo())) {
|
||||
@ -45,14 +45,14 @@ public class ResidentServiceApplyController extends BaseController {
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("取消服务申请")
|
||||
@ApiOperation("取消服务预约")
|
||||
@GetMapping("/cancel/{bookingNo}")
|
||||
public R<?> cancel(@PathVariable String bookingNo) {
|
||||
residentServiceAppletService.cancel(bookingNo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("服务申请列表")
|
||||
@ApiOperation("服务预约列表")
|
||||
@PostMapping("/list")
|
||||
public TableDataInfo performanceBookingList(@RequestBody ApplyQuery query) {
|
||||
if (StringUtils.isBlank(query.getIdentity())) {
|
||||
@ -67,7 +67,7 @@ public class ResidentServiceApplyController extends BaseController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("服务申请详情")
|
||||
@ApiOperation("服务预约详情")
|
||||
@GetMapping("/detail/{bookingNo}")
|
||||
public R<ResidentServiceApplyVo> performanceBookingDetail(@PathVariable String bookingNo) {
|
||||
return R.ok(residentServiceAppletService.detail(bookingNo));
|
||||
@ -78,4 +78,19 @@ public class ResidentServiceApplyController extends BaseController {
|
||||
public R<List<ScreeningProjectVo>> getForm(@PathVariable String identity, String projectName, @RequestHeader("region") String region) {
|
||||
return R.ok(residentServiceAppletService.getForm(identity, projectName,region));
|
||||
}
|
||||
|
||||
@ApiOperation("服务记录列表")
|
||||
@PostMapping("/record")
|
||||
public TableDataInfo performanceBookingRecord(@RequestBody ApplyQuery query) {
|
||||
if (StringUtils.isBlank(query.getIdentity())) {
|
||||
throw new ServiceException("居民身份证号不能为空");
|
||||
}
|
||||
try {
|
||||
startPage();
|
||||
return getDataTable(residentServiceAppletService.record(query));
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
throw new ServiceException(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -203,10 +203,10 @@ public class SignInfoController extends BaseController {
|
||||
return getDataTable(null, 0);
|
||||
}
|
||||
|
||||
@ApiOperation("获取签约协议内容")
|
||||
@GetMapping("/getContent/{orgNo}")
|
||||
public R<ProtocolContentVo> getAreaById(@PathVariable String orgNo, @RequestHeader("region") String region) {
|
||||
String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getContent/" + orgNo, null, String.class);
|
||||
@ApiOperation(value = "获取签约协议模版内容", notes = "协议模版内容、机构公章照片base64、签约医生签名照片base64")
|
||||
@GetMapping("/getContent/{userNo}")
|
||||
public R<ProtocolContentVo> getAreaById(@PathVariable String userNo, @RequestHeader("region") String region) {
|
||||
String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getContent/" + userNo, null, String.class);
|
||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||
if ("0".equals(jsonObject.get("code"))) {
|
||||
return R.fail(jsonObject.get("msg").toString());
|
||||
|
||||
@ -89,6 +89,15 @@ public interface ResidentServiceApplyMapper {
|
||||
* @return void
|
||||
**/
|
||||
void batchInsert(List<ResidentServiceApplyEntity> entity);
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
* @Description 服务记录列表
|
||||
* @Date 2023-10-13 013 14:01
|
||||
* @Param [query]
|
||||
* @return java.util.List<com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo>
|
||||
**/
|
||||
List<ResidentServiceApplyVo> getRecord(ApplyQuery query);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -127,4 +127,10 @@ public class ApplyQuery {
|
||||
*/
|
||||
@ApiModelProperty(value = "数据范围过滤SQL", hidden = true)
|
||||
private String dataScope;
|
||||
|
||||
/**
|
||||
* 是否已评价(1: 是 2: 否)
|
||||
*/
|
||||
@ApiModelProperty(value = "是否已评价(1: 是 2: 否)")
|
||||
private String isEvaluate;
|
||||
}
|
||||
|
||||
@ -0,0 +1,91 @@
|
||||
package com.xinelu.familydoctor.applet.pojo.vo;
|
||||
|
||||
import com.xinelu.common.core.domain.BaseDomain;
|
||||
import com.xinelu.manage.domain.orderevaluatepictureinfo.OrderEvaluatePictureInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
* @Description 服务评价对象
|
||||
* @Date 2023-10-13 013 14:49
|
||||
* @Param
|
||||
* @return
|
||||
**/
|
||||
@Data
|
||||
@ApiModel(value = "服务评价对象")
|
||||
public class OrderEvaluateInfoVo extends BaseDomain {
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 会员id
|
||||
*/
|
||||
@ApiModelProperty(value = "会员id")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 微信openid
|
||||
*/
|
||||
@ApiModelProperty(value = "微信openid")
|
||||
private String openid;
|
||||
|
||||
/**
|
||||
* 微信unionid
|
||||
*/
|
||||
@ApiModelProperty(value = "微信unionid")
|
||||
private String unionid;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
@ApiModelProperty(value = "订单编号")
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 服务编号
|
||||
*/
|
||||
@ApiModelProperty(value = "服务编号")
|
||||
private String serviceCode;
|
||||
|
||||
/**
|
||||
* 评价内容
|
||||
*/
|
||||
@ApiModelProperty(value = "评价内容")
|
||||
private String evaluateContent;
|
||||
|
||||
/**
|
||||
* 手机App:PHONE_APP,微信小程序:WE_CHAT_APPLET
|
||||
*/
|
||||
@ApiModelProperty(value = "手机App:PHONE_APP,微信小程序:WE_CHAT_APPLET")
|
||||
private String evaluateChannel;
|
||||
|
||||
/**
|
||||
* 预约服务满意度,一般:COMMONLY,满意:SATISFIED,非常满意:VERY_SATISFIED,不满意(差):DISSATISFIED,非常不满意(非常差):VERY_DISSATISFIED
|
||||
*/
|
||||
@ApiModelProperty(value = "预约服务满意度,一般:COMMONLY,满意:SATISFIED,非常满意:VERY_SATISFIED,不满意(差):DISSATISFIED,非常不满意(非常差):VERY_DISSATISFIED")
|
||||
private String evaluateSatisfaction;
|
||||
|
||||
/**
|
||||
* 商品订单综合评分,取值,1:代表1颗星,2:代表两颗星,3:代表三颗星,4:代表四颗星,5:代表五颗星
|
||||
*/
|
||||
@ApiModelProperty(value = "商品订单综合评分,取值,1:代表1颗星,2:代表两颗星,3:代表三颗星,4:代表四颗星,5:代表五颗星")
|
||||
private Integer compositeScore;
|
||||
|
||||
/**
|
||||
* 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR
|
||||
*/
|
||||
@ApiModelProperty(value = "订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR")
|
||||
private String orderSource;
|
||||
|
||||
/**
|
||||
* 订单评价图片信息
|
||||
*/
|
||||
@ApiModelProperty(value = "订单评价图片信息")
|
||||
private List<OrderEvaluatePictureInfo> orderEvaluatePictureInfoList;
|
||||
}
|
||||
@ -43,4 +43,16 @@ public class ProtocolContentVo {
|
||||
*/
|
||||
@ApiModelProperty(value = "内容")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 医生签名照片Base64
|
||||
*/
|
||||
@ApiModelProperty(value = "医生签名照片Base64")
|
||||
private String doctorBase64;
|
||||
|
||||
/**
|
||||
* 机构公章照片Base64
|
||||
*/
|
||||
@ApiModelProperty(value = "机构公章照片Base64")
|
||||
private String orgBase64;
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
@ -93,14 +94,14 @@ public class ResidentServiceApplyVo {
|
||||
* 预约时间
|
||||
*/
|
||||
@ApiModelProperty("预约时间")
|
||||
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date bookingTime;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
@ApiModelProperty("申请时间")
|
||||
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date applyTime;
|
||||
|
||||
/**
|
||||
@ -113,14 +114,14 @@ public class ResidentServiceApplyVo {
|
||||
* 取消时间
|
||||
*/
|
||||
@ApiModelProperty("取消时间")
|
||||
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@ApiModelProperty("完成时间")
|
||||
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date completeTime;
|
||||
|
||||
/**
|
||||
@ -139,7 +140,7 @@ public class ResidentServiceApplyVo {
|
||||
* 审批时间
|
||||
*/
|
||||
@ApiModelProperty("审批时间")
|
||||
@JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
@ -160,4 +161,10 @@ public class ResidentServiceApplyVo {
|
||||
@ApiModelProperty("评价编号")
|
||||
private String evaluateNo;
|
||||
|
||||
/**
|
||||
* 服务评价对象
|
||||
*/
|
||||
@ApiModelProperty("服务评价对象")
|
||||
OrderEvaluateInfoVo orderEvaluateInfo;
|
||||
|
||||
}
|
||||
|
||||
@ -3,6 +3,7 @@ package com.xinelu.familydoctor.applet.pojo.vo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -61,4 +62,16 @@ public class SignInfoDataVo {
|
||||
*/
|
||||
@ApiModelProperty(value = "机构公章照片Base64")
|
||||
private String orgBase64;
|
||||
|
||||
/**
|
||||
* 服务包签约价格
|
||||
*/
|
||||
@ApiModelProperty(value = "服务包签约价格")
|
||||
private BigDecimal packSignCost;
|
||||
|
||||
/**
|
||||
* 签约周期(年)
|
||||
*/
|
||||
@ApiModelProperty(value = "签约周期(年)")
|
||||
private Integer signYears;
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@ -105,4 +105,13 @@ public interface IResidentServiceAppletService {
|
||||
* @return java.lang.Object
|
||||
**/
|
||||
List<ScreeningProjectVo> getForm(String identity, String projectName, String region);
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
* @Description 服务记录列表
|
||||
* @Date 2023-10-13 013 13:41
|
||||
* @Param [query]
|
||||
* @return java.util.List<?>
|
||||
**/
|
||||
List<ResidentServiceApplyVo> record(ApplyQuery query);
|
||||
}
|
||||
|
||||
@ -88,6 +88,9 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
|
||||
// 审批状态0:待批准 1:已同意 2:已拒绝
|
||||
entity.setApprovalStatus("0");
|
||||
entity.setBookingNo(IdUtils.simpleUUID());
|
||||
if(StringUtils.isBlank(entity.getServiceWay())) {
|
||||
entity.setServiceWay("2");
|
||||
}
|
||||
residentServiceApplyMapper.insert(entity);
|
||||
}
|
||||
|
||||
@ -325,6 +328,24 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
|
||||
}
|
||||
return projectList;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
* @Description 服务记录列表
|
||||
* @Date 2023-10-13 013 13:56
|
||||
* @Param [query]
|
||||
* @return java.util.List<com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo>
|
||||
**/
|
||||
@Override
|
||||
public List<ResidentServiceApplyVo> record(ApplyQuery query) {
|
||||
if (query.getStartDate() != null) {
|
||||
query.setStartDate(DateUtils.parseDate(DateUtils.parseDateToStr("yyyy-MM-dd 00:00:00", query.getStartDate())));
|
||||
}
|
||||
if (query.getEndDate() != null) {
|
||||
query.setEndDate(DateUtils.parseDate(DateUtils.parseDateToStr("yyyy-MM-dd 23:59:59", query.getEndDate())));
|
||||
}
|
||||
return residentServiceApplyMapper.getRecord(query);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -32,6 +32,56 @@
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ServiceApplyRecordMap" type="com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo">
|
||||
<result property="bookingNo" column="booking_no" jdbcType="VARCHAR"/>
|
||||
<result property="patientId" column="patient_id" jdbcType="VARCHAR"/>
|
||||
<result property="residentName" column="resident_name" jdbcType="VARCHAR"/>
|
||||
<result property="identity" column="identity" jdbcType="VARCHAR"/>
|
||||
<result property="packageNo" column="package_no" jdbcType="VARCHAR"/>
|
||||
<result property="packageName" column="package_name" jdbcType="VARCHAR"/>
|
||||
<result property="formNo" column="form_no" jdbcType="VARCHAR"/>
|
||||
<result property="formName" column="form_name" jdbcType="VARCHAR"/>
|
||||
<result property="serviceWay" column="service_way" jdbcType="VARCHAR"/>
|
||||
<result property="bookingTime" column="booking_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="applyTime" column="apply_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="bookingStatus" column="booking_status" jdbcType="VARCHAR"/>
|
||||
<result property="cancelTime" column="cancel_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="completeTime" column="complete_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="approvalStatus" column="approval_status" jdbcType="VARCHAR"/>
|
||||
<result property="refuseReason" column="refuse_reason" jdbcType="VARCHAR"/>
|
||||
<result property="approvalTime" column="approval_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="remark" column="remark" jdbcType="VARCHAR"/>
|
||||
<!-- 服务评价 -->
|
||||
<association property="orderEvaluateInfo" notNullColumn="service_code" javaType="com.xinelu.familydoctor.applet.pojo.vo.OrderEvaluateInfoVo">
|
||||
<result property="id" column="id"/>
|
||||
<result property="openid" column="openid"/>
|
||||
<result property="unionid" column="unionid"/>
|
||||
<result property="orderNo" column="order_no"/>
|
||||
<result property="serviceCode" column="service_code"/>
|
||||
<result property="evaluateContent" column="evaluate_content"/>
|
||||
<result property="evaluateChannel" column="evaluate_channel"/>
|
||||
<result property="evaluateSatisfaction" column="evaluate_satisfaction"/>
|
||||
<result property="compositeScore" column="composite_score"/>
|
||||
<result property="orderSource" column="order_source"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<collection property="orderEvaluatePictureInfoList" notNullColumn="evaluate_picture_url" javaType="java.util.List" resultMap="OrderEvaluatePictureInfoMap"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<!--评价图片-->
|
||||
<resultMap type="com.xinelu.manage.domain.orderevaluatepictureinfo.OrderEvaluatePictureInfo" id="OrderEvaluatePictureInfoMap">
|
||||
<result property="id" column="id"/>
|
||||
<result property="orderEvaluateId" column="order_evaluate_id"/>
|
||||
<result property="evaluatePictureUrl" column="evaluate_picture_url"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,booking_no,patient_id,
|
||||
resident_name,identity,package_no,
|
||||
@ -44,7 +94,7 @@
|
||||
remark
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List2">
|
||||
<sql id="Base_Column_Service_Apply">
|
||||
s.id,s.booking_no,s.patient_id,
|
||||
s.resident_name,s.identity,s.package_no,
|
||||
s.package_name,s.form_no,s.form_name,
|
||||
@ -56,6 +106,16 @@
|
||||
s.remark
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_Evaluate_Info">
|
||||
oei.id, oei.openid, oei.unionid, oei.order_no, oei.service_code,
|
||||
oei.evaluate_content, oei.evaluate_channel, oei.evaluate_satisfaction, oei.composite_score, oei.order_source,
|
||||
oei.create_by, oei.create_time, oei.update_by, oei.update_time
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_Evaluate_Picture">
|
||||
oepi.id, oepi.order_evaluate_id, oepi.evaluate_picture_url, oepi.create_by, oepi.create_time, oepi.update_by, oepi.update_time
|
||||
</sql>
|
||||
|
||||
<sql id="Insert_Column_List">
|
||||
booking_no,patient_id,
|
||||
resident_name,identity,package_no,
|
||||
@ -190,7 +250,7 @@
|
||||
</update>
|
||||
|
||||
<select id="findByBody" resultType="com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo">
|
||||
select <include refid="Base_Column_List2"></include>,p.address,p.phone
|
||||
select <include refid="Base_Column_Service_Apply"></include>,p.address,p.phone
|
||||
from resident_service_apply s
|
||||
left join patient_info p on p.patient_code = s.patient_id
|
||||
where 1=1
|
||||
@ -248,6 +308,30 @@
|
||||
select <include refid="Base_Column_List"></include> from resident_service_apply where booking_no = #{bookingNo}
|
||||
</select>
|
||||
|
||||
<!-- 服务记录列表 -->
|
||||
<select id="getRecord" resultMap="ServiceApplyRecordMap">
|
||||
select <include refid="Base_Column_Service_Apply"></include>,
|
||||
<include refid="Base_Column_Evaluate_Info"></include>,
|
||||
<include refid="Base_Column_Evaluate_Picture"></include>
|
||||
from resident_service_apply s
|
||||
left join order_evaluate_info oei on oei.service_code = s.booking_no and oei.order_source = 'FAMILY_DOCTOR'
|
||||
left join order_evaluate_picture_info oepi on oepi.order_evaluate_id = oei.id
|
||||
where 1=1
|
||||
<if test="identity != null and identity != ''">
|
||||
and s.identity = #{identity}
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
and s.booking_time >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
and s.booking_time <= #{endDate}
|
||||
</if>
|
||||
<choose>
|
||||
<when test="isEvaluate == 1">and oei.id is not null</when>
|
||||
<when test="isEvaluate == 2">and oei.id is null</when>
|
||||
</choose>
|
||||
</select>
|
||||
|
||||
<update id="updateEx">
|
||||
update resident_service_apply
|
||||
<set>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user