From ca0611cbb55d9fa75fd7012aaf43f6e34e05c00d Mon Sep 17 00:00:00 2001 From: mengkuiliang <1464081137@qq.com> Date: Tue, 17 Oct 2023 15:58:26 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BB=B7=E8=A1=A8=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=9B=20=E6=9C=8D=E5=8A=A1=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E6=8E=A5=E5=8F=A3=E4=BF=AE=E6=94=B9=EF=BC=9B=20?= =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF=E6=B7=BB=E5=8A=A0=E6=88=B7?= =?UTF-8?q?=E4=B8=BB=E7=9B=B8=E5=85=B3=E5=AD=97=E6=AE=B5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applet/PatientScoreController.java | 2 +- .../applet/ResidentPatientInfoController.java | 12 +- .../ResidentServiceApplyController.java | 60 ++++-- .../xinelu/common/utils/http/HttpUtils.java | 6 +- .../applet/pojo/body/PatientInfoBody.java | 12 ++ .../applet/pojo/entity/PatientInfo.java | 13 ++ .../applet/pojo/query/PatientInfoQuery.java | 5 + .../applet/pojo/query/ServiceRecordQuery.java | 74 +++++++ .../pojo/vo/ResidentServiceApplyVo.java | 12 -- .../pojo/vo/ResidentServiceRecordVo.java | 194 ++++++++++++++++++ .../impl/ResidentPatientInfoServiceImpl.java | 8 +- .../register/ResidentPatientInfoMapper.xml | 28 ++- .../OrderEvaluateAndPictureDTO.java | 13 ++ .../applet/appletlogin/AppletLoginMapper.xml | 1 + .../AppOrderEvaluateMapper.xml | 4 + .../orderevaluateinfo/OrderEvaluateInfo.java | 13 ++ .../OrderEvaluateInfoMapper.java | 9 + .../IOrderEvaluateInfoService.java | 11 +- .../impl/OrderEvaluateInfoServiceImpl.java | 14 +- .../OrderEvaluateInfoMapper.xml | 31 +++ 20 files changed, 484 insertions(+), 38 deletions(-) create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ServiceRecordQuery.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceRecordVo.java diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientScoreController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientScoreController.java index bc2635b..4992134 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientScoreController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientScoreController.java @@ -37,7 +37,7 @@ public class PatientScoreController extends BaseController { if (!jsonObject.get("code").toString().equals("1")) { return R.fail(jsonObject.get("msg").toString()); } - return R.ok("请求成功", jsonObject.getString("data")); + return R.ok(jsonObject.getString("data")); } @ApiOperation("获取居民积分记录列表") diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java index d09c38e..70f2fa7 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java @@ -47,9 +47,9 @@ public class ResidentPatientInfoController extends BaseController { @ApiOperation("注册完善信息") @PostMapping("") public R register(@Validated @RequestBody PatientInfoBody body) { - if(body.getDiseaseList() == null || body.getDiseaseList().size() == 0) { - return R.fail("请选择基础疾病"); - } +// if(body.getDiseaseList() == null || body.getDiseaseList().size() == 0) { +// return R.fail("请选择基础疾病"); +// } try { residentPatientInfoService.register(body); return R.ok(); @@ -78,9 +78,9 @@ public class ResidentPatientInfoController extends BaseController { } @ApiOperation("获取已注册列表") - @GetMapping("/getList/{openid}/{cityCode}") - public R> getList(@PathVariable String openid, @PathVariable String cityCode) { - return R.ok(residentPatientInfoService.getList(openid, cityCode)); + @GetMapping("/getList/{openid}") + public R> getList(@PathVariable String openid) { + return R.ok(residentPatientInfoService.getList(openid, null)); } @ApiOperation("切换账号") diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java index e25b5a8..d7cd75a 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java @@ -1,14 +1,24 @@ package com.xinelu.web.controller.applet; +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.http.HttpService; +import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.familydoctor.applet.pojo.body.ResidentServiceApplyBody; +import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo; import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; +import com.xinelu.familydoctor.applet.pojo.query.ServiceRecordQuery; import com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo; +import com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceRecordVo; import com.xinelu.familydoctor.applet.pojo.vo.ScreeningProjectVo; +import com.xinelu.familydoctor.applet.service.IResidentPatientInfoService; import com.xinelu.familydoctor.applet.service.IResidentServiceAppletService; +import com.xinelu.manage.domain.orderevaluateinfo.OrderEvaluateInfo; +import com.xinelu.manage.service.orderevaluateinfo.IOrderEvaluateInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -16,6 +26,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; +import java.util.stream.Collectors; /** * @Author mengkuiliang @@ -31,6 +42,12 @@ public class ResidentServiceApplyController extends BaseController { @Resource private IResidentServiceAppletService residentServiceAppletService; + @Resource + private HttpService httpService; + @Resource + private IResidentPatientInfoService residentPatientInfoService; + @Resource + private IOrderEvaluateInfoService orderEvaluateInfoService; @ApiOperation("提交服务预约") @PostMapping("/save") @@ -38,7 +55,7 @@ public class ResidentServiceApplyController extends BaseController { if (body == null || StringUtils.isBlank(body.getPackageNo()) || StringUtils.isBlank(body.getFormNo())) { return R.fail("请求参数不能为空"); } - if(StringUtils.isBlank(body.getIdentity())) { + if (StringUtils.isBlank(body.getIdentity())) { return R.fail("居民身份证号不能为空"); } residentServiceAppletService.insert(body); @@ -76,21 +93,40 @@ public class ResidentServiceApplyController extends BaseController { @ApiOperation(value = "获取服务预约项目列表", notes = "获取家医个性服务包和筛查项目") @GetMapping("/getForm/{identity}") public R> getForm(@PathVariable String identity, String projectName, @RequestHeader("region") String region) { - return R.ok(residentServiceAppletService.getForm(identity, projectName,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("居民身份证号不能为空"); + @GetMapping("/record/{identity}") + public R> performanceBookingRecord(@PathVariable String identity, ServiceRecordQuery query, @RequestHeader("region") String region) { + query.setIdentity(identity); + if(query.getPageNum() == null) { + query.setPageNum(1); } - try { - startPage(); - return getDataTable(residentServiceAppletService.record(query)); - } catch (Exception e) { - e.printStackTrace(); - throw new ServiceException(e.getMessage()); + if(query.getPageSize() == null) { + query.setPageSize(100); } + JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/performance/recordV1", null, JSONObject.parseObject(JSONObject.toJSONString(query))); + if (result.get("code").toString().equals("0")) { + throw new ServiceException(result.get("msg").toString()); + } + if (result.get("data") != null) { + List perRecordList = JSONArray.parseArray(result.getJSONObject("data").getJSONArray("list").toJSONString()).toJavaList(ResidentServiceRecordVo.class); + if (perRecordList != null && perRecordList.size() > 0) { + // 查询评价 + List list = orderEvaluateInfoService.selectOrderEvaluateByServiceNos(perRecordList.stream().map(ResidentServiceRecordVo::getPerformanceNo).collect(Collectors.toList()), "FAMILY_DOCTOR"); + if (list != null && list.size() > 0) { + List orderEvaluateInfoTempList; + for (ResidentServiceRecordVo record : perRecordList) { + orderEvaluateInfoTempList = list.stream().filter(o -> o.getServiceCode().equals(record.getPerformanceNo())).collect(Collectors.toList()); + if (orderEvaluateInfoTempList.size() > 0) { + record.setOrderEvaluateInfo(orderEvaluateInfoTempList.get(0)); + } + } + } + } + return R.ok(perRecordList); + } + return R.ok(); } } diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/http/HttpUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/http/HttpUtils.java index 216d1d1..5b3a8d3 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/utils/http/HttpUtils.java +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/http/HttpUtils.java @@ -78,7 +78,7 @@ public class HttpUtils { while ((line = in.readLine()) != null) { result.append(line); } - log.info("recv - {}", result); +// log.info("recv - {}", result); } catch (ConnectException e) { log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e); } catch (SocketTimeoutException e) { @@ -129,7 +129,7 @@ public class HttpUtils { while ((line = in.readLine()) != null) { result.append(line); } - log.info("recv - {}", result); +// log.info("recv - {}", result); } catch (ConnectException e) { log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e); } catch (SocketTimeoutException e) { @@ -181,7 +181,7 @@ public class HttpUtils { result.append(new String(ret.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8)); } } - log.info("recv - {}", result); +// log.info("recv - {}", result); conn.disconnect(); br.close(); } catch (ConnectException e) { diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/PatientInfoBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/PatientInfoBody.java index a379a27..2eb55bb 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/PatientInfoBody.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/PatientInfoBody.java @@ -250,4 +250,16 @@ public class PatientInfoBody extends BaseEntity { @ApiModelProperty(value = "当前是否选中(0: 否 1:是)", hidden = true) private String isChecked; + /** + * 与户主关系 (1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;) + */ + @ApiModelProperty(value = "与户主关系 (1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;)") + private String householdRelationship; + + /** + * 户主身份证号 + */ + @ApiModelProperty(value = "户主身份证号") + private String householdCardNo; + } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/PatientInfo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/PatientInfo.java index 1fd7df9..4c013f0 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/PatientInfo.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/PatientInfo.java @@ -288,6 +288,17 @@ public class PatientInfo extends BaseEntity { @Excel(name = "当前是否选中(0: 否 1:是)") private String isChecked; + /** + * 与户主关系 (1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;) + */ + @ApiModelProperty(value = "与户主关系 (1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;)") + private String householdRelationship; + + /** + * 户主身份证号 + */ + @ApiModelProperty(value = "户主身份证号") + private String householdCardNo; @Override public String toString() { @@ -331,6 +342,8 @@ public class PatientInfo extends BaseEntity { .append("cityCode", getCityCode()) .append("bindingTime", getBindingTime()) .append("isChecked", getIsChecked()) + .append("householdRelationship", getHouseholdRelationship()) + .append("householdCardNo", getHouseholdCardNo()) .toString(); } } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PatientInfoQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PatientInfoQuery.java index f004673..d8e4917 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PatientInfoQuery.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PatientInfoQuery.java @@ -71,4 +71,9 @@ public class PatientInfoQuery extends BaseEntity { @ApiModelProperty(value = "当前是否选中(0: 否 1:是)") private String isChecked; + /** + * 户主身份证号 + */ + @ApiModelProperty(value = "户主身份证号") + private String householdCardNo; } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ServiceRecordQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ServiceRecordQuery.java new file mode 100644 index 0000000..3a8998e --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ServiceRecordQuery.java @@ -0,0 +1,74 @@ +package com.xinelu.familydoctor.applet.pojo.query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 服务记录查询类 + * @Date 2023-10-17 017 14:50 + * @Param + * @return + **/ +@Data +@ApiModel("服务记录查询类") +public class ServiceRecordQuery { + + /** + * 身份证号 + */ + @ApiModelProperty(value = "身份证号", hidden = true) + private String identity; + + /** + * 服务包编号 + */ + @ApiModelProperty(value = "服务包编号") + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称") + private String packageName; + + /** + * 服务项编号 + */ + @ApiModelProperty(value = "服务项编号") + private String formNo; + + /** + * 服务项名称 + */ + @ApiModelProperty(value = "服务项名称") + private String formName; + + /** + * 开始日期(yyyy-MM-dd) + */ + @ApiModelProperty(value = "开始日期(yyyy-MM-dd)") + private Date startDate; + + /** + * 结束日期(yyyy-MM-dd) + */ + @ApiModelProperty(value = "结束日期(yyyy-MM-dd)") + private Date endDate; + + /** + * 页码 + */ + @ApiModelProperty("页码") + private Integer pageNum; + + /** + * 页面大小 + */ + @ApiModelProperty("页面大小") + private Integer pageSize; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java index 608a42a..23890ba 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java @@ -155,16 +155,4 @@ public class ResidentServiceApplyVo { @ApiModelProperty("签约编号") private String signNo; - /** - * 评价编号 - */ - @ApiModelProperty("评价编号") - private String evaluateNo; - - /** - * 服务评价对象 - */ - @ApiModelProperty("服务评价对象") - OrderEvaluateInfoVo orderEvaluateInfo; - } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceRecordVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceRecordVo.java new file mode 100644 index 0000000..5aeecdd --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceRecordVo.java @@ -0,0 +1,194 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.manage.domain.orderevaluateinfo.OrderEvaluateInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 服务记录展示类 + * @Date 2023-10-17 017 11:32 + * @Param + * @return + **/ +@ApiModel("服务记录展示类") +@Data +public class ResidentServiceRecordVo { + + /** + * 履约业务主键 + */ + @ApiModelProperty(value = "履约业务主键") + private String performanceNo; + + /** + * 签约编号 + */ + @ApiModelProperty(value = "签约编号") + private String signNo; + + /** + * 居民编号 + */ + @ApiModelProperty(value = "居民编号") + private String residentNo; + + /** + * 居民身份证号 + */ + @ApiModelProperty(value = "居民身份证号") + private String identity; + + /** + * 居民姓名 + */ + @ApiModelProperty(value = "居民姓名") + private String residentName; + + + /** + * 履约明细业务主键 + */ + @ApiModelProperty(value = "履约明细业务主键") + private String performanceDetailNo; + + /** + * 服务包明细业务主键 + */ + @ApiModelProperty(value = "服务包明细业务主键") + private String packageDetailNo; + + /** + * 服务包编号 + */ + @ApiModelProperty(value = "服务包编号", required = true) + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称", required = true) + private String packageName; + + /** + * 服务项表单编号 + */ + @ApiModelProperty(value = "服务项表单编号") + private String formNo; + + /** + * 服务项表单名称 + */ + @ApiModelProperty(value = "服务项表单名称") + private String formName; + + /** + * 履约时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiModelProperty(value = "履约时间") + private Date performanceTime; + + /** + * 随访时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiModelProperty(value = "随访时间") + private Date followupTime; + + /** + * 下次履约时间 + */ + @ApiModelProperty(value = "下次履约时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date performanceNextTime; + + /** + * 机构业务编号 + */ + @ApiModelProperty(value = "机构业务编号") + private String orgNo; + + /** + * 机构名称 + */ + @ApiModelProperty(value = "机构名称", required = true) + private String orgName; + + /** + * 团队业务编号 + */ + @ApiModelProperty(value = "团队业务编号", required = true) + private String teamNo; + + /** + * 团队名称 + */ + @ApiModelProperty(value = "团队名称", required = true) + private String teamName; + + /** + * 履约医生 + */ + @ApiModelProperty(value = "履约医生") + private String userNo; + + /** + * 履约医生名称 + */ + @ApiModelProperty(value = "履约医生名称") + private String userName; + + /** + * 下次随访日期 + */ + @ApiModelProperty(value = "下次随访日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date followupNextTime; + + /** + * 履约方式(1:家庭,2:门诊,3:电话,99:其他) + */ + @ApiModelProperty(value = "履约方式(1:家庭,2:门诊,3:电话,99:其他)") + private String performanceWay; + + /** + * 履约方式名称(1:家庭,2:门诊,3:电话,99:其他) + */ + @ApiModelProperty(value = "履约方式(1:家庭,2:门诊,3:电话,99:其他)") + private String performanceWayName; + + /** + * 生成方式(1:手动添加 2:随访自动同步) + */ + @ApiModelProperty(value = "生成方式(1:手动添加 2:随访自动同步)") + private String generateWay; + + /** + * 生成方式名称(1:手动添加 2:随访自动同步) + */ + @ApiModelProperty(value = "生成方式(1:手动添加 2:随访自动同步)") + private String generateWayName; + + /** + * 应服务次数 + */ + @ApiModelProperty(value = "应服务次数") + private Integer serviceFreq; + + /** + * 已履约次数 + */ + @ApiModelProperty(value = "已履约次数") + private Integer performanceCount; + + /** + * 服务评价对象 + */ + @ApiModelProperty("服务评价对象") + OrderEvaluateInfo orderEvaluateInfo; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java index de51f3c..55d4889 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java @@ -156,6 +156,8 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi BeanUtils.copyBeanProp(patientInfo, body); if(body.getDiseaseList() != null) { patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); + } else { + patientInfo.setDisease("0"); } patientInfo.setLoginFlag(Long.valueOf(1)); updatePatientInfo(patientInfo); @@ -169,6 +171,8 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi BeanUtils.copyBeanProp(entity, body); if(body.getDiseaseList() != null) { entity.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); + } else { + entity.setDisease("0"); } entity.setPatientCode(IdUtils.fastSimpleUUID()); entity.setBindingTime(new Date()); @@ -194,6 +198,8 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi patientInfo.setLoginFlag(Long.valueOf(1)); if(body.getDiseaseList() != null) { patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); + } else { + patientInfo.setDisease("0"); } residentPatientInfoMapper.updatePatientInfo(patientInfo); } @@ -266,7 +272,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi **/ @Override public PatientInfo getCurrentResident(String openid, String cityCode) { - List list = residentPatientInfoMapper.getList(openid, cityCode); + List list = residentPatientInfoMapper.getList(openid, null); if (list == null || list.size() == 0) { return null; } diff --git a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml index 5574d49..e7c3870 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml @@ -45,6 +45,9 @@ + + + @@ -87,7 +90,9 @@ disease, city_code, binding_time, - is_checked + is_checked, + household_relationship, + household_card_no from patient_info @@ -119,6 +124,9 @@ and is_checked = #{isChecked} + + and household_card_no = #{householdCardNo} + order by binding_time desc @@ -207,6 +215,12 @@ is_checked, + + household_relationship, + + + household_card_no, + #{areaCode}, @@ -286,6 +300,12 @@ #{isChecked}, + + #{householdRelationship}, + + + #{householdCardNo}, + @@ -406,6 +426,12 @@ is_checked = #{isChecked}, + + household_relationship = #{householdRelationship}, + + + household_card_no = #{householdCardNo}, + where patient_code = #{patientCode} diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java index 1b8136f..49d59c9 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java @@ -2,6 +2,7 @@ package com.xinelu.applet.dto.apporderevaluate; import com.xinelu.common.custominterface.Insert; import com.xinelu.manage.domain.orderevaluatepictureinfo.OrderEvaluatePictureInfo; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -47,6 +48,12 @@ public class OrderEvaluateAndPictureDTO implements Serializable { @NotBlank(message = "请选择订单编号", groups = {Insert.class}) private String orderNo; + /** + * 服务编号 + */ + @ApiModelProperty(value = "服务编号") + private String serviceCode; + /** * 评价内容 */ @@ -69,6 +76,12 @@ public class OrderEvaluateAndPictureDTO implements Serializable { @NotNull(message = "请选择评分", groups = {Insert.class}) private Integer compositeScore; + /** + * 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR + */ + @ApiModelProperty(value = "订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR") + private String orderSource; + /** * 创建时间 */ diff --git a/xinelu-nurse-applet/src/main/resources/mapper/applet/appletlogin/AppletLoginMapper.xml b/xinelu-nurse-applet/src/main/resources/mapper/applet/appletlogin/AppletLoginMapper.xml index b18063c..ddb9d76 100644 --- a/xinelu-nurse-applet/src/main/resources/mapper/applet/appletlogin/AppletLoginMapper.xml +++ b/xinelu-nurse-applet/src/main/resources/mapper/applet/appletlogin/AppletLoginMapper.xml @@ -84,6 +84,7 @@ and openid = #{openId} + limit 1 @@ -78,6 +85,16 @@ + + + insert into order_evaluate_info @@ -92,6 +109,8 @@ order_no, + service_code, + evaluate_content, evaluate_channel, @@ -100,6 +119,8 @@ composite_score, + order_source, + create_by, create_time, @@ -120,6 +141,8 @@ #{orderNo}, + #{serviceCode}, + #{evaluateContent}, #{evaluateChannel}, @@ -128,6 +151,8 @@ #{compositeScore}, + #{orderSource}, + #{createBy}, #{createTime}, @@ -154,6 +179,9 @@ order_no = #{orderNo}, + service_code = + #{serviceCode}, + evaluate_content = #{evaluateContent}, @@ -166,6 +194,9 @@ composite_score = #{compositeScore}, + + order_source = #{orderSource}, + create_by = #{createBy},