From 618d08665ab9e09df26a254cff68db8931e41c1c Mon Sep 17 00:00:00 2001 From: mengkuiliang <1464081137@qq.com> Date: Wed, 27 Sep 2023 16:44:25 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AD=BE=E7=BA=A6=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3=EF=BC=9B=20?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=88=86=E9=A1=B5=E9=85=8D=E7=BD=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applet/PatientInfoController.java | 10 + .../applet/PatientScoreController.java | 38 +- .../controller/applet/PrizeController.java | 17 +- .../applet/PrizeExchangeController.java | 19 +- .../applet/ResidentSignApplyController.java | 84 +++ .../controller/applet/SignInfoController.java | 217 ++++++ .../controller/common/CommonController.java | 7 + .../core/controller/BaseController.java | 16 + .../xinelu/common/core/page/PageDomain.java | 4 +- .../xinelu/common/core/page/TablePage.java | 84 +++ .../common/utils/SignInfoBaseUtils.java | 13 + .../applet/mapper/PatientInfoMapper.java | 8 + .../mapper/ResidentSignApplyMapper.java | 77 ++ .../applet/pojo/body/ApprovalBody.java | 42 ++ .../pojo/body/ResidentSignApplyBody.java | 230 ++++++ .../applet/pojo/dto/MedicalHistory.java | 27 + .../applet/pojo/dto/PointHealthAct.java | 118 ++++ .../pojo/entity/ResidentSignApplyEntity.java | 242 +++++++ .../applet/pojo/query/ApplyQuery.java | 124 ++++ .../applet/pojo/query/DoctorListQuery.java | 65 ++ .../applet/pojo/query/NearbyOrgQuery.java | 61 ++ .../applet/pojo/query/TeamListQuery.java | 30 + .../applet/pojo/vo/ArchiveReviewVo.java | 659 ++++++++++++++++++ .../applet/pojo/vo/AreaListVo.java | 83 +++ .../familydoctor/applet/pojo/vo/CrowdVo.java | 94 +++ .../applet/pojo/vo/DoctorDetailVo.java | 180 +++++ .../applet/pojo/vo/NearOrgVo.java | 29 + .../applet/pojo/vo/PackageDetailVo.java | 141 ++++ .../applet/pojo/vo/PackageListVo.java | 134 ++++ .../applet/pojo/vo/ProtocolContentVo.java | 46 ++ .../applet/pojo/vo/ResidentSignApplyVo.java | 271 +++++++ .../applet/pojo/vo/SignInfoDetailVo.java | 374 ++++++++++ .../applet/pojo/vo/SignedPackageVo.java | 78 +++ .../applet/pojo/vo/TeamDetailVo.java | 63 ++ .../applet/service/IPatientInfoService.java | 19 + .../service/IResidentSignAppletService.java | 91 +++ .../service/impl/PatientInfoServiceImpl.java | 63 ++ .../impl/ResidentSignApplyServiceImpl.java | 218 ++++++ .../mapper/register/PatientInfoMapper.xml | 6 + .../mapper/sign/ResidentSignApplyMapper.xml | 350 ++++++++++ 40 files changed, 4394 insertions(+), 38 deletions(-) create mode 100644 xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java create mode 100644 xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SignInfoController.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/core/page/TablePage.java create mode 100644 xinelu-common/src/main/java/com/xinelu/common/utils/SignInfoBaseUtils.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentSignApplyMapper.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ApprovalBody.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentSignApplyBody.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/MedicalHistory.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PointHealthAct.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/ResidentSignApplyEntity.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ApplyQuery.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/DoctorListQuery.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/NearbyOrgQuery.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/TeamListQuery.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ArchiveReviewVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/AreaListVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/CrowdVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/DoctorDetailVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/NearOrgVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PackageDetailVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PackageListVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ProtocolContentVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentSignApplyVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDetailVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignedPackageVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/TeamDetailVo.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentSignAppletService.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentSignApplyServiceImpl.java create mode 100644 xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientInfoController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientInfoController.java index fd60437..c782cae 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientInfoController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientInfoController.java @@ -44,6 +44,16 @@ public class PatientInfoController extends BaseController { } } + @ApiOperation("获取微信手机号") + @GetMapping("/getPhone/{code}") + public AjaxResult getPhone(@PathVariable String code) { + try { + return AjaxResult.success(patientInfoService.getPhone(code)); + } catch (Exception e) { + return AjaxResult.error(e.getMessage()); + } + } + @ApiOperation("注册") @Log(title = "居民小程序注册", businessType = BusinessType.INSERT) @PostMapping("/") 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 d7fa7b8..e268b82 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 @@ -2,9 +2,13 @@ package com.xinelu.web.controller.applet; import com.alibaba.fastjson2.JSONObject; import com.github.pagehelper.PageInfo; +import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.http.HttpUtils; import com.xinelu.common.utils.spring.SpringUtils; +import com.xinelu.familydoctor.applet.pojo.dto.PointHealthAct; import com.xinelu.familydoctor.applet.pojo.query.DictHealthActQuery; import com.xinelu.familydoctor.applet.pojo.query.PatientScoreQuery; import com.xinelu.familydoctor.applet.pojo.vo.DictHealthActVo; @@ -22,8 +26,8 @@ import org.springframework.web.bind.annotation.*; **/ @Api(tags = "健康行为积分控制器") @RestController -@RequestMapping("/score") -public class PatientScoreController { +@RequestMapping("/applet/score") +public class PatientScoreController extends BaseController { @ApiOperation(value = "获取居民总积分", notes = "region: (1: 德州 2:东营)") @GetMapping("/total/{cardNo}") @@ -36,9 +40,9 @@ public class PatientScoreController { return AjaxResult.success("请求成功", jsonObject.getString("data")); } - @ApiOperation("获取居民积分列表") + @ApiOperation("获取居民积分记录列表") @GetMapping("/list") - public AjaxResult schemaList(PatientScoreQuery query, @RequestHeader("region") String region) { + public TableDataInfo schemaList(PatientScoreQuery query, @RequestHeader("region") String region) { StringBuffer params = new StringBuffer(); params.append("?identity=").append(query.getIdentity()); params.append("&pageSize=").append(query.getPageSize() != null && query.getPageSize() > 0 ? query.getPageSize() : 15); @@ -46,20 +50,18 @@ public class PatientScoreController { String result = HttpUtils.sendGet(SpringUtils.getFdUrl(region) + "/patient/score/record/list" + params.toString()); JSONObject jsonObject = JSONObject.parseObject(result); if (!jsonObject.get("code").toString().equals("1")) { - return AjaxResult.error(jsonObject.get("msg").toString()); + throw new ServiceException(jsonObject.get("msg").toString()); } - PageInfo pageInfo = new PageInfo(); if (jsonObject.get("data") != null) { JSONObject jsonObject1 = (JSONObject) jsonObject.get("data"); - pageInfo.setTotal(jsonObject1.getInteger("total")); - pageInfo.setList(jsonObject1.getJSONArray("list")); + return getDataTable(jsonObject1.getJSONArray("list"), jsonObject1.getInteger("total")); } - return AjaxResult.success(pageInfo); + return getDataTable(null, 0); } @GetMapping("/healthAct/list") - @ApiOperation("健康行为列表") - public AjaxResult healthActList(DictHealthActQuery query, @RequestHeader("region") String region) { + @ApiOperation("健康行为内容列表") + public TableDataInfo healthActList(DictHealthActQuery query, @RequestHeader("region") String region) { StringBuffer params = new StringBuffer(); params.append("?pageNum=").append(query.getPageNum() != null && query.getPageNum() > 0 ? query.getPageNum() : 1); params.append("&pageSize=").append(query.getPageSize() != null && query.getPageSize() > 0 ? query.getPageSize() : 15); @@ -71,27 +73,25 @@ public class PatientScoreController { String result = HttpUtils.sendGet(SpringUtils.getFdUrl(region) + "/patient/score/list" + params.toString()); JSONObject jsonObject = JSONObject.parseObject(result); if (!jsonObject.get("code").toString().equals("1")) { - return AjaxResult.error(jsonObject.get("msg").toString()); + throw new ServiceException(jsonObject.get("msg").toString()); } - PageInfo pageInfo = new PageInfo(); if (jsonObject.get("data") != null) { JSONObject jsonObject1 = (JSONObject) jsonObject.get("data"); - pageInfo.setTotal(jsonObject1.getInteger("total")); - pageInfo.setList(jsonObject1.getJSONArray("list")); + return getDataTable(jsonObject1.getJSONArray("list"), jsonObject1.getInteger("total")); } - return AjaxResult.success(pageInfo); + return getDataTable(null, 0); } @GetMapping("/healthAct/detail/{actId}") - @ApiOperation("健康行为明细") + @ApiOperation("健康行为积分明细") public AjaxResult healthActDetail(@PathVariable String actId, @RequestHeader("region") String region) { String result = HttpUtils.sendGet(SpringUtils.getFdUrl(region) + "/patient/score/detail/" + actId); JSONObject jsonObject = JSONObject.parseObject(result); if (!jsonObject.get("code").toString().equals("1")) { - return AjaxResult.error(jsonObject.get("msg").toString()); + throw new ServiceException(jsonObject.get("msg").toString()); } if (jsonObject.get("data") != null) { - return AjaxResult.success(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), DictHealthActVo.class)); + return AjaxResult.success(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), PointHealthAct.class)); } return AjaxResult.success(); } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PrizeController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PrizeController.java index 656d530..53190d2 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PrizeController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PrizeController.java @@ -2,7 +2,10 @@ package com.xinelu.web.controller.applet; import com.alibaba.fastjson2.JSONObject; import com.github.pagehelper.PageInfo; +import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.http.HttpUtils; import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.familydoctor.applet.pojo.query.PrizeQuery; @@ -20,12 +23,12 @@ import org.springframework.web.bind.annotation.*; **/ @Api(tags = "健康行为积分商城奖品控制器") @RestController -@RequestMapping("/score/prize") -public class PrizeController { +@RequestMapping("/applet/score/prize") +public class PrizeController extends BaseController { @ApiOperation("获取奖品列表") @GetMapping("/list") - public AjaxResult getPrizeList(PrizeQuery query, @RequestHeader("region") String region) { + public TableDataInfo getPrizeList(PrizeQuery query, @RequestHeader("region") String region) { StringBuffer params = new StringBuffer(); params.append("?identity=").append(query.getIdentity()); params.append("&pageSize=").append(query.getPageSize() != null && query.getPageSize() > 0 ? query.getPageSize() : 15); @@ -33,15 +36,13 @@ public class PrizeController { String result = HttpUtils.sendGet(SpringUtils.getFdUrl(region) + "/prize/list" + params); JSONObject jsonObject = JSONObject.parseObject(result); if (!jsonObject.get("code").toString().equals("1")) { - return AjaxResult.error(jsonObject.get("msg").toString()); + throw new ServiceException(jsonObject.get("msg").toString()); } - PageInfo pageInfo = new PageInfo(); if (jsonObject.get("data") != null) { JSONObject jsonObject1 = (JSONObject) jsonObject.get("data"); - pageInfo.setTotal(jsonObject1.getInteger("total")); - pageInfo.setList(jsonObject1.getJSONArray("list")); + return getDataTable(jsonObject1.getJSONArray("list"), jsonObject1.getInteger("total")); } - return AjaxResult.success(pageInfo); + return getDataTable(null, 0); } @GetMapping("/getByPrizeId/{prizeId}") diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PrizeExchangeController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PrizeExchangeController.java index 52ed330..01f3d52 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PrizeExchangeController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PrizeExchangeController.java @@ -2,7 +2,10 @@ package com.xinelu.web.controller.applet; import com.alibaba.fastjson2.JSONObject; import com.github.pagehelper.PageInfo; +import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; +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.http.HttpUtils; import com.xinelu.common.utils.spring.SpringUtils; @@ -25,8 +28,8 @@ import javax.annotation.Resource; **/ @Api(tags = "积分兑换记录控制器") @RestController -@RequestMapping("/score/prizeExchange") -public class PrizeExchangeController { +@RequestMapping("/applet/score/prizeExchange") +public class PrizeExchangeController extends BaseController { @Resource private HttpService httpService; @@ -48,10 +51,10 @@ public class PrizeExchangeController { @ApiOperation("查询兑换记录列表") @GetMapping("/list") - public AjaxResult getList(PrizeQuery query, @RequestHeader("region") String region) { + public TableDataInfo getList(PrizeQuery query, @RequestHeader("region") String region) { StringBuffer params = new StringBuffer(); params.append("?identity=").append(query.getIdentity()); - if(!StringUtils.isBlank(query.getStatus())) { + if (!StringUtils.isBlank(query.getStatus())) { params.append("&status=").append(query.getStatus()); } params.append("&pageSize=").append(query.getPageSize() != null && query.getPageSize() > 0 ? query.getPageSize() : 15); @@ -59,15 +62,13 @@ public class PrizeExchangeController { String result = HttpUtils.sendGet(SpringUtils.getFdUrl(region) + "/prizeExchange/list" + params); JSONObject jsonObject = JSONObject.parseObject(result); if (!jsonObject.get("code").toString().equals("1")) { - return AjaxResult.error(jsonObject.get("msg").toString()); + throw new ServiceException(jsonObject.get("msg").toString()); } - PageInfo pageInfo = new PageInfo(); if (jsonObject.get("data") != null) { JSONObject jsonObject1 = (JSONObject) jsonObject.get("data"); - pageInfo.setTotal(jsonObject1.getInteger("total")); - pageInfo.setList(jsonObject1.getJSONArray("list")); + return getDataTable(jsonObject1.getJSONArray("list"), jsonObject1.getInteger("total")); } - return AjaxResult.success(pageInfo); + return getDataTable(null, 0); } @GetMapping("/getById/{exchangeId}") diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java new file mode 100644 index 0000000..6137fbb --- /dev/null +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java @@ -0,0 +1,84 @@ +package com.xinelu.web.controller.applet; + +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody; +import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; +import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo; +import com.xinelu.familydoctor.applet.service.IResidentSignAppletService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 居民小程序签约申请控制器 + * @Date 2023-09-26 026 10:10 + * @Param + * @return + **/ +@Api(tags = "居民小程序签约申请控制器") +@RestController +@RequestMapping("/applet/sign/apply") +public class ResidentSignApplyController extends BaseController { + + @Resource + private IResidentSignAppletService residentSignAppletService; + + @ApiOperation("提交签约申请") + @PostMapping("/save") + public AjaxResult save(@RequestBody ResidentSignApplyBody body) { + if(StringUtils.isBlank(body.getIdentity())) { + return AjaxResult.error("身份证号不能为空"); + } + residentSignAppletService.insert(body); + return AjaxResult.success(); + } + + @ApiOperation("取消签约申请") + @PostMapping("/cancel/{signCode}") + public AjaxResult cancel(@PathVariable String signCode) { + residentSignAppletService.cancel(signCode); + return AjaxResult.success(); + } + + @ApiOperation(value = "是否已签约", notes = "data(01: 已申请签约 02:已签约 0: 未签约)") + @GetMapping("/checkSignApply/{identity}") + public AjaxResult save(@PathVariable String identity, @RequestHeader("region") String region) { + try { + return AjaxResult.success(residentSignAppletService.checkSignApply(identity, region)); + } catch (Exception e) { + return AjaxResult.error(e.getMessage()); + } + } + + @ApiOperation(value = "获取签约申请列表") + @GetMapping("/getList") + public TableDataInfo getList(ApplyQuery query) { + try { + startPage(); + List list = residentSignAppletService.findList(query); + return getDataTable(list); + } catch (Exception e) { + throw new ServiceException(e.getMessage()); + } + } + + @ApiOperation(value = "获取签约申请详情") + @GetMapping("/detail/{signCode}") + public AjaxResult getSignApply(@PathVariable String signCode) { + try { + return AjaxResult.success(residentSignAppletService.detail(signCode)); + } catch (Exception e) { + return AjaxResult.error(e.getMessage()); + } + } + +} diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SignInfoController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SignInfoController.java new file mode 100644 index 0000000..3d68365 --- /dev/null +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SignInfoController.java @@ -0,0 +1,217 @@ +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.AjaxResult; +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.query.DoctorListQuery; +import com.xinelu.familydoctor.applet.pojo.query.NearbyOrgQuery; +import com.xinelu.familydoctor.applet.pojo.query.TeamListQuery; +import com.xinelu.familydoctor.applet.pojo.vo.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 签约控制器 + * @Date 2023-09-26 026 14:25 + * @Param + * @return + **/ +@Api(tags = "签约控制器") +@RestController +@RequestMapping("/applet/signinfo") +public class SignInfoController extends BaseController { + @Resource + private HttpService httpService; + @Value("${applet.distance}") + private BigDecimal DISTANCE; + + @ApiOperation(value = "获取签约详情") + @GetMapping("/detail/{identity}") + public AjaxResult detail(@PathVariable String identity, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/detail/" + identity, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (!"1".equals(jsonObject.get("code"))) { + return AjaxResult.error(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return AjaxResult.error("未查询到签约信息"); + } + return AjaxResult.success(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDetailVo.class)); + } + + @ApiOperation(value = "获取居民公卫健康档案") + @GetMapping("/archive/{identity}") + public AjaxResult archive(@PathVariable String identity, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/archive/" + identity, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (!"1".equals(jsonObject.get("code"))) { + return AjaxResult.error(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data")) { + return AjaxResult.error("未查询到居民公卫档案"); + } + JSONObject data = jsonObject.getJSONObject("data"); + if (data == null) { + return AjaxResult.error("未查询到居民公卫档案"); + } + return AjaxResult.success(JSONObject.parseObject(data.toJSONString(), ArchiveReviewVo.class)); + } + + @ApiOperation(value = "获取已签约服务包") + @GetMapping("/getSignPackage/{identity}") + public AjaxResult getSignPackage(@PathVariable("identity") String identity, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getSignPackage/" + identity, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (!"1".equals(jsonObject.get("code"))) { + return AjaxResult.error(jsonObject.get("msg").toString()); + } + JSONArray array = jsonObject.getJSONArray("data"); + List signedPackageVoList = new ArrayList<>(); + for (int i = 0; i < array.size(); i++) { + JSONObject object = array.getJSONObject(i); + signedPackageVoList.add(JSONObject.parseObject(object.toJSONString(), SignedPackageVo.class)); + } + return AjaxResult.success(signedPackageVoList); + } + + @ApiOperation("获取可选择的服务包(个性包)") + @GetMapping("/getPackageList/{identity}") + public AjaxResult getPackageList(@PathVariable("identity") String identity, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getPackageList/" + identity, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (!"1".equals(jsonObject.get("code"))) { + return AjaxResult.error(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return null; + } + return AjaxResult.success(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(PackageDetailVo.class)); + } + + @ApiOperation(value = "获取区县列表") + @PostMapping("/getCounty") + public AjaxResult getCounty(@RequestBody NearbyOrgQuery query, @RequestHeader("region") String region) { + JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/org/getCounty", null, JSONObject.parseObject(JSONObject.toJSONString(query))); + if ("0".equals(result.get("code"))) { + return AjaxResult.error(result.get("msg").toString()); + } + if (!result.containsKey("data") || result.get("data") == null) { + return AjaxResult.success(); + } + return AjaxResult.success(JSONArray.parseArray(result.getJSONArray("data").toJSONString()).toJavaList(NearOrgVo.class)); + } + + @ApiOperation(value = "获取区划列表", notes = "山东省: 371400000000 德州市: 371400000000 东营市:370500000000") + @GetMapping("/area/list/{pid}") + public AjaxResult getPhArea(@PathVariable Long pid, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/area/ph/list/" + pid, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if ("0".equals(jsonObject.get("code"))) { + return AjaxResult.error(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return AjaxResult.success(); + } + return AjaxResult.success(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(AreaListVo.class)); + } + +// @ApiOperation("获取区划详情") +// @GetMapping("/area/getAreaById/{id}") +// public AjaxResult getAreaById(@PathVariable Long id, @RequestHeader("region") String region) { +// String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/area/ph/getAreaById/" + id, null, String.class); +// JSONObject jsonObject = JSONObject.parseObject(result); +// if ("0".equals(jsonObject.get("code"))) { +// return AjaxResult.error(jsonObject.get("msg").toString()); +// } +// if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { +// return AjaxResult.success(); +// } +// return AjaxResult.success(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), AreaListVo.class)); +// } + + @ApiOperation(value = "获取附近机构列表", notes = "lng:经度 lat:纬度") + @GetMapping("/getNearbyOrg") + public TableDataInfo getNearbyOrg(NearbyOrgQuery query, @RequestHeader("region") String region) { + if (query.getDistance() == null || query.getDistance().compareTo(new BigDecimal("0")) == 0) { + query.setDistance(DISTANCE); + } + JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/org/getNearbyOrg/", null, JSONObject.parseObject(JSONObject.toJSONString(query))); + if ("0".equals(result.get("code"))) { + throw new ServiceException(result.get("msg").toString()); + } + if (result.containsKey("data") && result.get("data") != null) { + JSONObject jsonObject = result.getJSONObject("data"); + return getDataTable(jsonObject.getJSONArray("list"), jsonObject.getInteger("total")); + } + return getDataTable(null, 0); + } + + @ApiOperation(value = "获取团队列表") + @GetMapping("/getTeamList") + public TableDataInfo getTeamList(TeamListQuery query, @RequestHeader("region") String region) { + JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/resident/signinfo/getTeamList", null, JSONObject.parseObject(JSONObject.toJSONString(query))); + if ("0".equals(result.get("code"))) { + throw new ServiceException(result.get("msg").toString()); + } + if (result.containsKey("data") && result.get("data") != null) { + JSONObject jsonObject = result.getJSONObject("data"); + return getDataTable(jsonObject.getJSONArray("list"), jsonObject.getInteger("total")); + } + return getDataTable(null, 0); + } + + @ApiOperation(value = "获取团队详情") + @GetMapping("/getTeam/{teamNo}") + public AjaxResult getTeamList(@PathVariable String teamNo, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getTeam/" + teamNo, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if ("0".equals(jsonObject.get("code"))) { + return AjaxResult.error(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return AjaxResult.success(); + } + return AjaxResult.success(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(TeamDetailVo.class)); + } + + @ApiOperation("获取医生列表") + @GetMapping("/getDoctorList") + public TableDataInfo getDoctorList(DoctorListQuery query, @RequestHeader("region") String region) { + JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/doctor/getDoctorList", 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) { + JSONObject jsonObject = result.getJSONObject("data"); + return getDataTable(jsonObject.getJSONArray("list"), jsonObject.getInteger("total")); + } + return getDataTable(null, 0); + } + + @ApiOperation("获取签约协议内容") + @GetMapping("/getContent/{orgNo}") + public AjaxResult getAreaById(@PathVariable String orgNo, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getContent/" + orgNo, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if ("0".equals(jsonObject.get("code"))) { + return AjaxResult.error(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return AjaxResult.success(); + } + return AjaxResult.success(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), ProtocolContentVo.class)); + } +} diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/common/CommonController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/common/CommonController.java index 214e9cd..9cc6a93 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/common/CommonController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/common/CommonController.java @@ -7,6 +7,8 @@ import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.file.FileUploadUtils; import com.xinelu.common.utils.file.FileUtils; import com.xinelu.framework.config.ServerConfig; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -27,6 +29,7 @@ import java.util.List; * * @author xinelu */ +@Api(tags = "通用文件上传控制器") @RestController @RequestMapping("/common") public class CommonController { @@ -43,6 +46,7 @@ public class CommonController { * @param fileName 文件名称 * @param delete 是否删除 */ + @ApiOperation("文件下载") @GetMapping("/download") public void fileDownload(String fileName, Boolean delete, HttpServletResponse response, HttpServletRequest request) { try { @@ -66,6 +70,7 @@ public class CommonController { /** * 通用上传请求(单个) */ + @ApiOperation("文件上传") @PostMapping("/upload") public AjaxResult uploadFile(MultipartFile file) throws Exception { try { @@ -88,6 +93,7 @@ public class CommonController { /** * 通用上传请求(多个) */ + @ApiOperation("文件上传(批量)") @PostMapping("/uploads") public AjaxResult uploadFiles(List files) throws Exception { try { @@ -120,6 +126,7 @@ public class CommonController { /** * 本地资源通用下载 */ + @ApiOperation("下载本地资源") @GetMapping("/download/resource") public void resourceDownload(String resource, HttpServletRequest request, HttpServletResponse response) throws Exception { diff --git a/xinelu-common/src/main/java/com/xinelu/common/core/controller/BaseController.java b/xinelu-common/src/main/java/com/xinelu/common/core/controller/BaseController.java index 0eec034..7810e9b 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/core/controller/BaseController.java +++ b/xinelu-common/src/main/java/com/xinelu/common/core/controller/BaseController.java @@ -82,6 +82,22 @@ public class BaseController { return rspData; } + /** + * @Author mengkuiliang + * @Description 分页 + * @Date 2023-09-27 027 10:17 + * @Param [list, total] + * @return com.xinelu.common.core.page.TableDataInfo + **/ + protected TableDataInfo getDataTable(List list, int total) { + TableDataInfo rspData = new TableDataInfo(); + rspData.setCode(HttpStatus.SUCCESS); + rspData.setMsg("查询成功"); + rspData.setRows(list); + rspData.setTotal(total); + return rspData; + } + /** * 返回成功 */ diff --git a/xinelu-common/src/main/java/com/xinelu/common/core/page/PageDomain.java b/xinelu-common/src/main/java/com/xinelu/common/core/page/PageDomain.java index c38ad58..d875931 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/core/page/PageDomain.java +++ b/xinelu-common/src/main/java/com/xinelu/common/core/page/PageDomain.java @@ -31,7 +31,7 @@ public class PageDomain { /** * 分页参数合理化 */ - private Boolean reasonable = true; + private Boolean reasonable = false; public String getOrderBy() { if (StringUtils.isEmpty(orderByColumn)) { @@ -82,7 +82,7 @@ public class PageDomain { public Boolean getReasonable() { if (StringUtils.isNull(reasonable)) { - return Boolean.TRUE; + return Boolean.FALSE; } return reasonable; } diff --git a/xinelu-common/src/main/java/com/xinelu/common/core/page/TablePage.java b/xinelu-common/src/main/java/com/xinelu/common/core/page/TablePage.java new file mode 100644 index 0000000..78652cc --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/core/page/TablePage.java @@ -0,0 +1,84 @@ +package com.xinelu.common.core.page; + +import java.io.Serializable; +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 分页对象 + * @Date 2023-09-27 027 10:38 + * @Param + * @return + **/ +public class TablePage implements Serializable { + private static final long serialVersionUID = 1L; + + /** + * 总记录数 + */ + private long total; + + /** + * 列表数据 + */ + private List rows; + + /** + * 消息状态码 + */ + private int code; + + /** + * 消息内容 + */ + private String msg; + + /** + * 表格数据对象 + */ + public TablePage() { + } + + /** + * 分页 + * + * @param list 列表数据 + * @param total 总记录数 + */ + public TablePage(List list, int total) { + this.rows = list; + this.total = total; + } + + public long getTotal() { + return total; + } + + public void setTotal(long total) { + this.total = total; + } + + public List getRows() { + return rows; + } + + public void setRows(List rows) { + this.rows = rows; + } + + public int getCode() { + return code; + } + + public void setCode(int code) { + this.code = code; + } + + public String getMsg() { + return msg; + } + + public void setMsg(String msg) { + this.msg = msg; + } +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/SignInfoBaseUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/SignInfoBaseUtils.java new file mode 100644 index 0000000..f347f9d --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/SignInfoBaseUtils.java @@ -0,0 +1,13 @@ +package com.xinelu.common.utils; + +/** + * @Author mengkuiliang + * @Description 签约基础工具类 + * @Date 2023-09-27 027 10:33 + * @Param + * @return + **/ +public class SignInfoBaseUtils { + + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/PatientInfoMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/PatientInfoMapper.java index d3c0720..a041ce6 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/PatientInfoMapper.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/PatientInfoMapper.java @@ -87,4 +87,12 @@ public interface PatientInfoMapper { **/ void updateChecked(@Param("patientCode") String patientCode, @Param("isChecked") String isChecked); + /** + * @Author mengkuiliang + * @Description 获取注册信息-根据身份证号 + * @Date 2023-09-27 027 15:14 + * @Param [cardNo] + * @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo + **/ + PatientInfo getByCardNo(String cardNo); } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentSignApplyMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentSignApplyMapper.java new file mode 100644 index 0000000..cadfcc6 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentSignApplyMapper.java @@ -0,0 +1,77 @@ +package com.xinelu.familydoctor.applet.mapper; + + +import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; +import com.xinelu.familydoctor.applet.pojo.entity.ResidentSignApplyEntity; +import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; +import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo; + +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 签约申请Mapper + * @Date 2023-09-26 026 10:33 + * @Param + * @return + **/ +public interface ResidentSignApplyMapper { + /** + * 查询 + * @author lixinying + * @param query: + * @return List + * @date 2022/11/21 16:00 + */ + List findByBody(ApplyQuery query); + + /** + * 审批 + * @author lixinying + * @param body: + * @return Integer + * @date 2022/11/21 17:22 + */ + Integer updateEx(ApprovalBody body); + + /** + * @Author mengkuiliang + * @Description 查询签约申请记录 + * @Date 2022-11-22 10:58 + * @Param [identity] + * @return com.xinelu.mp.sign.pojo.vo.FdSignBookingVo + **/ + ResidentSignApplyVo getSignBookingByIdentity(String identity); + + /** + * @Author mengkuiliang + * @Description 签约申请详情 + * @Date 2022-11-23 10:33 + * @Param [bookingNo] + * @return com.xinelu.mp.sign.pojo.vo.FdSignBookingVo + **/ + ResidentSignApplyVo detail(String signCode); + + /** + * @Author mengkuiliang + * @Description 取消签约申请 + * @Date 2022-11-23 14:44 + * @Param [bookingNo] + * @return void + **/ + void cancel(String signCode); + + /** + * @Author mengkuiliang + * @Description 新增 + * @Date 2023-09-26 026 10:42 + * @Param [entity] + * @return void + **/ + void insert(ResidentSignApplyEntity entity); + +} + + + + diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ApprovalBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ApprovalBody.java new file mode 100644 index 0000000..ae4fe63 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ApprovalBody.java @@ -0,0 +1,42 @@ +package com.xinelu.familydoctor.applet.pojo.body; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 审批请求对象 + * @Date 2023-09-26 026 10:36 + * @Param + * @return + **/ +@ApiModel("审批请求对象") +@Data +public class ApprovalBody { + /** + * 申请编号 + */ + @ApiModelProperty(value = "申请编号", required = true) + private String applyNo; + + /** + * 审批状态0:待批准1:已同意2:已拒绝 + */ + @ApiModelProperty(value = "审批状态0:待批准1:已同意2:已拒绝", required = true) + private String approvalStatus; + + /** + * 拒绝理由 + */ + @ApiModelProperty(value = "拒绝理由", required = true) + private String refuseReason; + + /** + * 审批时间 + */ + @ApiModelProperty(value = "审批时间", required = true) + private Date approvalTime; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentSignApplyBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentSignApplyBody.java new file mode 100644 index 0000000..7427c21 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentSignApplyBody.java @@ -0,0 +1,230 @@ +package com.xinelu.familydoctor.applet.pojo.body; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 居民签约申请请求类 + * @Date 2023-09-26 026 10:21 + * @Param + * @return + **/ +@ApiModel("签约申请请求类") +@Data +public class ResidentSignApplyBody { + /** + * 签约申请编号 + */ + @ApiModelProperty("签约申请编号") + private String signCode; + + /** + * 居民注册业务主键 + */ + @ApiModelProperty("居民注册业务主键") + private String patientId; + + /** + * 居民姓名 + */ + @ApiModelProperty(value = "居民姓名", required = true) + private String residentName; + + /** + * 居民性别1:男2:女99:不详 + */ + @ApiModelProperty(value = "居民性别1:男2:女99:不详", required = true) + private String gender; + + /** + * 出生日期 + */ + @ApiModelProperty(value = "出生日期", required = true) + private Date birthday; + + /** + * 民族 + */ + @ApiModelProperty(value = "民族", required = true) + private String nation; + + /** + * 身份证号 + */ + @ApiModelProperty(value = "身份证号", required = true) + private String identity; + + /** + * 联系电话 + */ + @ApiModelProperty(value = "联系电话", required = true) + private String phone; + + /** + * 省编码 + */ + @ApiModelProperty(value = "省编码", required = true) + private String province; + + /** + * 省名称 + */ + @ApiModelProperty(value = "省名称", required = true) + private String provinceName; + + /** + * 市编码 + */ + @ApiModelProperty(value = "市编码", required = true) + private String city; + + /** + * 市名称 + */ + @ApiModelProperty(value = "市名称", required = true) + private String cityName; + + /** + * 区县编码 + */ + @ApiModelProperty(value = "区县编码", required = true) + private String county; + + /** + * 区县名称 + */ + @ApiModelProperty(value = "区县名称", required = true) + private String countyName; + + /** + * 街道/乡镇编码 + */ + @ApiModelProperty(value = "街道/乡镇编码", required = true) + private String town; + + /** + * 街道/乡镇名称 + */ + @ApiModelProperty(value = "街道/乡镇名称", required = true) + private String townName; + + /** + * 社区/村编码 + */ + @ApiModelProperty(value = "社区/村编码", required = true) + private String committee; + + /** + * 社区/村名称 + */ + @ApiModelProperty(value = "社区/村名称", required = true) + private String committeeName; + + /** + * 详细地址 + */ + @ApiModelProperty(value = "详细地址", required = true) + private String address; + + /** + * 所属人群编号 + */ + @ApiModelProperty(value = "所属人群编号", required = true) + private String crowdsNo; + + /** + * 所属人群名称 + */ + @ApiModelProperty(value = "所属人群名称", required = true) + private String crowdsName; + + /** + * 选择服务包编号 + */ + @ApiModelProperty(value = "选择服务包编号", required = true) + private String packagesNo; + + /** + * 选择服务包名称 + */ + @ApiModelProperty(value = "选择服务包名称", required = true) + private String packagesName; + + /** + * 签约机构编号 + */ + @ApiModelProperty(value = "签约机构编号", required = true) + 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 = "签约医生编号", required = true) + private String userNo; + + /** + * 签约医生姓名 + */ + @ApiModelProperty(value = "签约医生姓名", required = true) + private String userName; + + /** + * 签约时间 + */ + @ApiModelProperty(value = "签约时间", required = true) + private Date signTime; + + /** + * 居民头像照片 + */ + @ApiModelProperty(value = "居民头像照片") + private String residentAvatar; + + /** + * 居民签字 + */ + @ApiModelProperty(value = "居民签字", required = true) + private String residentAutographPath; + + /** + * 与户主关系 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.其他;", required = true) + private String relationshipWithHouseholder; + + /** + * 户主姓名 + */ + @ApiModelProperty(value = "户主姓名", required = true) + private String householderName; + + /** + * 户主身份证号 + */ + @ApiModelProperty(value = "户主身份证号", required = true) + private String householderIdentity; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/MedicalHistory.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/MedicalHistory.java new file mode 100644 index 0000000..07881d1 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/MedicalHistory.java @@ -0,0 +1,27 @@ +package com.xinelu.familydoctor.applet.pojo.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 病史对象 + * @Date 2023-09-26 026 14:34 + * @Param + * @return + **/ +@Data +public class MedicalHistory { + /** + * 名称 + */ + private String name; + /** + * 时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd") + private Date date; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PointHealthAct.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PointHealthAct.java new file mode 100644 index 0000000..849b30f --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PointHealthAct.java @@ -0,0 +1,118 @@ +package com.xinelu.familydoctor.applet.pojo.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 健康行为积分对象 + * @Date 2023-09-27 027 11:05 + * @Param + * @return + **/ +@Data +public class PointHealthAct implements Serializable { + + /** + * 行为序号 + */ + @ApiModelProperty("行为序号") + private String actId; + + /** + * 适用人群 + */ + @ApiModelProperty("适用人群") + private String targetGroups; + + /** + * 行为名称 + */ + @ApiModelProperty("行为名称") + private String actName; + + /** + * 具体内容 + */ + @ApiModelProperty("具体内容") + private String actContent; + + /** + * 积分分值 + */ + @ApiModelProperty("积分分值") + private Integer score; + + @ApiModelProperty("反馈医生积分") + private Integer awardScore; + + /** + * 积分周期(1:月度,2:季度,3:年度) + */ + @ApiModelProperty("积分周期(1:月度,2:季度,3:年度)") + private String period; + + /** + * 年度总分 + */ + @ApiModelProperty("年度总分") + private Integer totalScore; + + /** + * 创建机构业务主键 + */ + @ApiModelProperty("创建机构业务主键") + private String orgNo; + + /** + * 创建机构名称 + */ + @ApiModelProperty("创建机构名称") + private String orgName; + + /** + * 创建人 + */ + private String createBy; + + /** + * 创建时间 + */ + @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createDate; + + /** + * 更新人 + */ + private String updateBy; + + /** + * 更新时间 + */ + @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateDate; + + /** + * 删除标志(0:未删除 1:删除) + */ + private String delFlag; + + /** + * 生成方式 (1: 手动 2:自动) + */ + @ApiModelProperty("生成方式 (1: 手动 2:自动)") + private String scoreWay; + + /** + * 行为类型 (签约服务:SIGNING_SERVICES、驿站自测:STATION_SELF_TESTING、随访服务:FOLLOW_UP_SERVICES、健康体检:PHYSICAL_EXAMINATION、自测血压:SELF_MEASURED_BLOOD_PRESSURE、自测血糖:SELF_MEASURED_BLOOD_SUGAR) + */ + @ApiModelProperty("行为类型 (签约服务:SIGNING_SERVICES、驿站自测:STATION_SELF_TESTING、随访服务:FOLLOW_UP_SERVICES、健康体检:PHYSICAL_EXAMINATION、自测血压:SELF_MEASURED_BLOOD_PRESSURE、自测血糖:SELF_MEASURED_BLOOD_SUGAR)") + private String actType; + + private static final long serialVersionUID = 1L; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/ResidentSignApplyEntity.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/ResidentSignApplyEntity.java new file mode 100644 index 0000000..d32660f --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/ResidentSignApplyEntity.java @@ -0,0 +1,242 @@ +package com.xinelu.familydoctor.applet.pojo.entity; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 居民签约申请对象 + * @Date 2023-09-26 026 10:21 + * @Param + * @return + **/ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class ResidentSignApplyEntity implements Serializable { + /** + * 自增主键 + */ + private Long id; + + /** + * 签约申请编号 + */ + private String signCode; + + /** + * 居民注册业务主键 + */ + private String patientId; + + /** + * 居民姓名 + */ + private String residentName; + + /** + * 居民性别1:男2:女99:不详 + */ + private String gender; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 民族 + */ + private String nation; + + /** + * 身份证号 + */ + private String identity; + + /** + * 联系电话 + */ + private String phone; + + /** + * 省编码 + */ + private String province; + + /** + * 省名称 + */ + private String provinceName; + + /** + * 市编码 + */ + private String city; + + /** + * 市名称 + */ + private String cityName; + + /** + * 区县编码 + */ + private String county; + + /** + * 区县名称 + */ + private String countyName; + + /** + * 街道/乡镇编码 + */ + private String town; + + /** + * 街道/乡镇名称 + */ + private String townName; + + /** + * 社区/村编码 + */ + private String committee; + + /** + * 社区/村名称 + */ + private String committeeName; + + /** + * 详细地址 + */ + private String address; + + /** + * 所属人群编号 + */ + private String crowdsNo; + + /** + * 所属人群名称 + */ + private String crowdsName; + + /** + * 选择服务包编号 + */ + private String packagesNo; + + /** + * 选择服务包名称 + */ + private String packagesName; + + /** + * 签约机构编号 + */ + private String orgNo; + + /** + * 签约机构名称 + */ + private String orgName; + + /** + * 签约团队编号 + */ + private String teamNo; + + /** + * 签约团队名称 + */ + private String teamName; + + /** + * 签约医生编号 + */ + private String userNo; + + /** + * 签约医生姓名 + */ + private String userName; + + /** + * 签约时间 + */ + private Date signTime; + + /** + * 居民头像照片 + */ + private String residentAvatar; + + /** + * 居民签名照片 + */ + private String residentAutographPath; + + /** + * 医生签名照片 + */ + private String doctorAutographPath; + + /** + * 与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他; + */ + private String relationshipWithHouseholder; + + /** + * 户主姓名 + */ + private String householderName; + + /** + * 户主身份证号 + */ + private String householderIdentity; + + /** + * 申请时间 + */ + private Date applyTime; + + /** + * 预约状态0:已申请1:已取消 + */ + private String bookingStatus; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 审批状态0:待批准1:已同意2:已拒绝 + */ + private String approvalStatus; + + /** + * 拒绝理由 + */ + private String refuseReason; + + /** + * 审批时间 + */ + private Date approvalTime; + + /** + * 备注 + */ + private String remark; + + private static final long serialVersionUID = 1L; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ApplyQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ApplyQuery.java new file mode 100644 index 0000000..05828e1 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ApplyQuery.java @@ -0,0 +1,124 @@ +package com.xinelu.familydoctor.applet.pojo.query; + + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 申请查询类 + * @Date 2023-09-26 026 10:34 + * @Param + * @return + **/ +@Data +@ApiModel("申请查询类") +public class ApplyQuery { + + /** + * 居民业务主键 + */ + @ApiModelProperty(value = "居民业务主键", hidden = true) + private String patientId; + + /** + * 居民身份证号 + */ + @ApiModelProperty(value = "居民身份证号") + private String identity; + + /** + * 姓名 + */ + @ApiModelProperty(value = "姓名", hidden = true) + private String residentName; + + /** + * 签约医生业务主键 + */ + @ApiModelProperty(value = "签约医生业务主键") + private String userNo; + + /** + * 团队编号 + */ + @ApiModelProperty(value = "团队编号") + private String teamNo; + + /** + * 签约机构编号 + */ + @ApiModelProperty(value = "签约机构编号") + private String orgNo; + + /** + * 开始日期(yyyy-MM-dd) + */ + @ApiModelProperty(value = "开始日期(yyyy-MM-dd)") + private Date startDate; + + /** + * 结束日期(yyyy-MM-dd) + */ + @ApiModelProperty(value = "结束日期(yyyy-MM-dd)") + private Date endDate; + + /** + * 地址 + */ + @ApiModelProperty(value = "地址") + private String address; + + + /** + * 申请状态(0:已申请1:已取消) + */ + @ApiModelProperty(value = "申请状态(0:已申请1:已取消)") + private String bookingStatus; + + /** + * 审批状态0:待批准1:已同意2:已拒绝 + */ + @ApiModelProperty(value = "审批状态0:待批准1:已同意2:已拒绝") + private String approvalStatus; + + /** + * 服务包编号 + */ + @ApiModelProperty(value = "服务包编号") + private String packageNo; + + /** + * 服务项编号 + */ + @ApiModelProperty(value = "服务项编号") + private String formNo; + + /** + * 申请日期 + */ + @ApiModelProperty(value = "申请日期", hidden = true) + private String applyDate; + + /** + * 页码 + */ + @ApiModelProperty("页码") + private Integer pageNum; + + /** + * 页面大小 + */ + @ApiModelProperty("页面大小") + private Integer pageSize; + + /** + * 是否已完成(1: 是 2: 否) + */ + @ApiModelProperty(value = "是否已完成(1: 是 2: 否)") + private String completed; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/DoctorListQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/DoctorListQuery.java new file mode 100644 index 0000000..9580020 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/DoctorListQuery.java @@ -0,0 +1,65 @@ +package com.xinelu.familydoctor.applet.pojo.query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 医生用户列表查询对象 + * @Date 2023-09-26 026 18:02 + * @Param + * @return + **/ +@ApiModel("医生用户列表查询对象") +@Data +public class DoctorListQuery { + /** + * 所属机构业务主键 + */ + @ApiModelProperty("所属机构业务主键") + private String orgNo; + + /** + * 所属团队业务主键 + */ + @ApiModelProperty("所属团队业务主键") + private String teamNo; + + /** + * 真实姓名 + */ + @ApiModelProperty("真实姓名") + private String realname; + + /** + * 登录名 + */ + @ApiModelProperty("登录名") + private String username; + + /** + * 是否团队长0:否,1:是 + */ + @ApiModelProperty("是否团队长") + private Boolean teamLeader; + + /** + * 团队成员类型(0:全科医生,1:专科医生,2:社区护士,3:公共卫生人员) + */ + @ApiModelProperty("团队成员类型(0:全科医生,1:专科医生,2:社区护士,3:公共卫生人员)") + private String teamMemberType; + + /** + * 页码 + */ + @ApiModelProperty("页码") + private Integer pageNum; + + /** + * 页面大小 + */ + @ApiModelProperty("页面大小") + private Integer pageSize; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/NearbyOrgQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/NearbyOrgQuery.java new file mode 100644 index 0000000..b913dad --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/NearbyOrgQuery.java @@ -0,0 +1,61 @@ +package com.xinelu.familydoctor.applet.pojo.query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author mengkuiliang + * @Description 附近机构查询类 + * @Date 2023-09-26 026 15:01 + * @Param + * @return + **/ +@Data +@ApiModel("附近机构查询类") +public class NearbyOrgQuery { + + /** + * 经度 + */ + @ApiModelProperty(value = "经度", required = true) + private String lng; + + /** + * 纬度 + */ + @ApiModelProperty(value = "纬度", required = true) + private String lat; + + /** + * 机构名称 + */ + @ApiModelProperty(value = "机构名称") + private String orgName; + + /** + * 距离(公里) + */ + @ApiModelProperty(value = "距离(公里)") + private BigDecimal distance; + + /** + * 页码 + */ + @ApiModelProperty("页码") + private Integer pageNum; + + /** + * 页面大小 + */ + @ApiModelProperty("页面大小") + private Integer pageSize; + + /** + * 区县编码 + */ + @ApiModelProperty(value = "区县编码") + private String countyNo; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/TeamListQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/TeamListQuery.java new file mode 100644 index 0000000..b7bebe3 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/TeamListQuery.java @@ -0,0 +1,30 @@ +package com.xinelu.familydoctor.applet.pojo.query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @Author mengkuiliang + * @Description 团队查询对象 + * @Date 2023-09-27 027 11:43 + * @Param + * @return + **/ +@ApiModel("团队查询对象") +@Data +public class TeamListQuery { + /** + * 所属机构业务主键 + */ + @ApiModelProperty("所属机构业务主键") + private String orgNo; + + /** + * 家医团队名称 + */ + @ApiModelProperty("家医团队名称") + private String teamName; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ArchiveReviewVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ArchiveReviewVo.java new file mode 100644 index 0000000..ab9bb40 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ArchiveReviewVo.java @@ -0,0 +1,659 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.familydoctor.applet.pojo.dto.MedicalHistory; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 居民公卫档案展示类 + * @Date 2023-09-26 026 14:32 + * @Param + * @return + **/ +@Data +public class ArchiveReviewVo { + /** + * 档案编号 + */ + @ApiModelProperty(value = "糖尿病公卫随访业务主键") + private String archiveCode; + + /** + * 档案ID + */ + @ApiModelProperty(value = "档案ID") + private String archiveId; + + /** + * 当前所属机构 + */ + @ApiModelProperty(value = "当前所属机构") + private String belongOrg; + + /** + * 缺项值 + */ + @ApiModelProperty(value = "缺项值") + private String missingValue; + + /** + * 居民类型:1:城镇 2:农村 + */ + @ApiModelProperty(value = "居民类型 1:城镇 2:农村") + private Integer peopleType; + + /** + * 档案状态 1.活动;2.非活动;(一般都是1) + */ + @ApiModelProperty(value = "档案状态 1.活动;2.非活动;(一般都是1)") + private Integer archiveStatus; + + /** + * 档案非活动状态原因 1.死亡 2.失踪 3.迁出 4.其他 5.长期外出 + */ + @ApiModelProperty(value = "档案非活动状态原因 1.死亡 2.失踪 3.迁出 4.其他 5.长期外出") + private Integer archiveInactive; + + /** + * 居民姓名 + */ + @ApiModelProperty(value = "居民姓名") + private String sickName; + + /** + * 拼音简码 + */ + @ApiModelProperty(value = "拼音简码") + private String sickNamePinyin; + + /** + * 居民性别 + */ + @ApiModelProperty(value = "居民性别") + private Integer sickSex; + /** + * 居民出生日期 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "居民出生日期") + private Date birthday; + /** + * 证件类型 + */ + @ApiModelProperty(value = "证件类型") + private String documentType; + + /** + * 居民身份证号 + */ + @ApiModelProperty(value = "居民身份证号") + private String identityCardNo; + + /** + * 其他证件号 + */ + @ApiModelProperty(value = "其他证件号") + private String documentOther; + + /** + * 邮箱 + */ + @ApiModelProperty(value = "邮箱") + private String email; + + /** + * 省 + */ + @ApiModelProperty(value = "省") + private String province; + + /** + * 市 + */ + @ApiModelProperty(value = "市") + private String city; + + /** + * 区/县 + */ + @ApiModelProperty(value = "区/县") + private String county; + + /** + * 街道/乡 + */ + @ApiModelProperty(value = "街道/乡") + private String street; + + /** + * 居委会 + */ + @ApiModelProperty(value = "居委会") + private String committee; + + /** + * 详细地址 + */ + @ApiModelProperty(value = "详细地址") + private String sickAddress; + + /** + * 所属片区 + */ + @ApiModelProperty(value = "所属片区") + private String area; + + /** + * 工作单位 + */ + @ApiModelProperty(value = "工作单位") + private String workUnit; + /** + * 居民联系电话 + */ + @ApiModelProperty(value = "居民联系电话") + private String sickPhone; + /** + * 联系人姓名 + */ + @ApiModelProperty(value = "联系人姓名") + private String linkmanName; + /** + * 联系人电话 + */ + @ApiModelProperty(value = "联系人电话") + private String linkmanPhone; + + /** + * 常住类型 + */ + @ApiModelProperty(value = "常住类型") + private Integer residenceType; + + /** + * 民族 + */ + @ApiModelProperty(value = "民族") + private Integer nation; + + /** + * 少数民族名字 + */ + @ApiModelProperty(value = "少数民族名字") + private String minority; + + /** + * 血型 + */ + @ApiModelProperty(value = "血型") + private Integer bloodType; + /** + * rh型 1.阴性 2.阳性 3.不详 + */ + @ApiModelProperty(value = "rh型 1.阴性 2.阳性 3.不详") + private Integer bloodRh; + /** + * 文化程度 + */ + @ApiModelProperty(value = "文化程度") + private Integer education; + /** + * 职业 + */ + @ApiModelProperty(value = "职业") + private Integer occupation; + /** + * 婚姻状态 + */ + @ApiModelProperty(value = "婚姻状态") + private Integer marriageStatus; + /** + * 医疗费用支付方式 + */ + @ApiModelProperty(value = "医疗费用支付方式") + private String payment; + /** + * 医保卡号 + */ + @ApiModelProperty(value = "医保卡号") + private String insurCardNo; + /** + * 合作医疗卡号 + */ + @ApiModelProperty(value = "合作医疗卡号") + private String newRuralCoopCardNo; + + /** + * 医疗费用支付方式其他 + */ + @ApiModelProperty(value = "医疗费用支付方式其他") + private String paymentOtherContent; + + /** + * 怀孕情况 + */ + @ApiModelProperty(value = "怀孕情况") + private String pregnancy; + + /** + * 孕次1.1 2.2 3.3 4.4 5.5 6.6 + */ + @ApiModelProperty(value = "孕次1.1 2.2 3.3 4.4 5.5 6.6") + private Integer pregnancyTimes; + + /** + * 孕次生产 + */ + @ApiModelProperty(value = "孕次生产") + private String gestationalBirth; + + /** + * 产次 1.1 2.2 3.3 4.4 5.5 6.6 + */ + @ApiModelProperty(value = "产次 1.1 2.2 3.3 4.4 5.5 6.6") + private Integer timesOfBirth; + + /** + * 产次生产 + */ + @ApiModelProperty(value = "产次生产") + private String productionTimes; + + /** + * 是否有药物过敏史(1:有 2:无) + */ + @ApiModelProperty(value = "是否有药物过敏史(1:有 2:无)") + private Integer existAllergyHistory; + + /** + * 药物过敏史类型 + */ + @ApiModelProperty(value = "药物过敏史类型") + private String allergyHistory; + + /** + * 药物过敏史其他 + */ + @ApiModelProperty(value = "药物过敏史其他") + private String allergyHistoryOther; + + /** + * 是否有暴露史(1:有 2:无) + */ + @ApiModelProperty(value = "是否有暴露史(1:有 2:无)") + private Integer existExposureHistory; + + /** + * 暴露史 1:无 2:化学品 3:毒物 4:射线 + */ + @ApiModelProperty(value = "暴露史 1:无 2:化学品 3:毒物 4:射线") + private String exposureHistory; + + /** + * 暴露史类型 - 化学 + */ + @ApiModelProperty(value = "暴露史类型 - 化学") + private String exposureHistoryChemistry; + + /** + * 暴露史类型 - 毒物 + */ + @ApiModelProperty(value = "暴露史类型 - 毒物") + private String exposureHistoryPoison; + + /** + * 暴露史类型 - 射线 + */ + @ApiModelProperty(value = "暴露史类型 - 射线") + private String exposureHistoryRadial; + + /** + * 是否有遗传病史(1:有 2:无) + */ + @ApiModelProperty(value = "是否有遗传病史(1:有 2:无)") + private Integer existGeneticDisease; + /** + * 遗传病史--疾病名称 + */ + @ApiModelProperty(value = "遗传病史--疾病名称") + private String geneticDiseaseName; + + /*** + * 既往疾病史 + * */ + @ApiModelProperty(value = "既往疾病史") + private String diseaseHistory; + /** + * 高血压患病日期:2 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "高血压患病日期") + private Date hypertensionDate; + /** + * 糖尿病患病日期:3 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "糖尿病患病日期") + private Date diabetesDate; + /** + * 冠心病患病日期:4 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "冠心病患病日期") + private Date coronaryDate; + /** + * 慢性阻塞性肺疾病日期:5 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "慢性阻塞性肺疾病日期") + private Date copdDate; + + /** + * 恶性肿瘤名称 6 + */ + @ApiModelProperty(value = "恶性肿瘤名称") + private String malignancyContent; + + /** + * 恶性肿瘤患病日期 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "恶性肿瘤患病日期") + private Date malignantDate; + /** + * 脑卒中患病日期:7 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "脑卒中患病日期") + private Date apoplexyDate; + /** + * 严重精神障碍患病日期:8 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "严重精神障碍患病日期") + private Date schizophreniaDate; + /** + * 结核病患病日期:9 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "结核病患病日期") + private Date tbDate; + /** + * 肝炎患病日期:10 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "肝炎患病日期") + private Date hepatitisDate; + + /** + * 其他法定传染病内容:11 + */ + @ApiModelProperty(value = "其他法定传染病内容") + private String oficialaContent; + /** + * 其他法定传染病患病日期 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "其他法定传染病患病日期") + private Date oficialaDate; + + /** + * 职业病 + */ + @ApiModelProperty(value = "职业病") + private String occDiseaseContent; + /** + * 职业病患病日期:12 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "职业病患病日期") + private Date occDiseaseDate; + /** + * 其他既往史疾病内容:13 + */ + @ApiModelProperty(value = "其他既往史疾病内容") + private String otherDiseaseContent; + /** + * 其他既往史疾病患病时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "其他既往史疾病患病时间") + private Date otherDiseaseDate; + + /** + * 手术有无 + */ + @ApiModelProperty(value = "手术有无") + private Integer existSurgeryHistory; + + /** + * 手术集合 + */ + @ApiModelProperty(value = "手术集合") + private List surgeryHistory; + + /** + * 外伤有无 + */ + @ApiModelProperty(value = "外伤有无") + private Integer existTraumaHistory; + + /** + * 外伤集合 + */ + @ApiModelProperty(value = "外伤集合") + private List traumaHistory; + + /** + * 输血有无 + */ + @ApiModelProperty(value = "输血有无") + private Integer existTransfusionHistory; + + /** + * 输血集合 + */ + @ApiModelProperty(value = "输血集合") + private List transfusionHistory; + + /** + * 家族史--父亲 + */ + @ApiModelProperty(value = "家族史--父亲") + private String familyHistoryFather; + /** + * 家族史--父亲:其他 + */ + @ApiModelProperty(value = "家族史--父亲:其他") + private String fatherOtherContent; + /** + * 家族史--母亲: + */ + @ApiModelProperty(value = "家族史--母亲") + private String familyHistoryMother; + /** + * 家族史--母亲:其他 + */ + @ApiModelProperty(value = "家族史--母亲:其他") + private String motherOtherContent; + /** + * 家族史--兄弟姐妹 + */ + @ApiModelProperty(value = "家族史--兄弟姐妹") + private String familyHistoryBrothers; + /** + * 家族史--兄弟姐妹:其他 + */ + @ApiModelProperty(value = "家族史--兄弟姐妹:其他") + private String brothersOtherContent; + /** + * 家族史--子女 + */ + @ApiModelProperty(value = "家族史--子女") + private String familyHistoryChildren; + /** + * 家族史--子女:其他 + */ + @ApiModelProperty(value = "家族史--子女:其他") + private String childrenOtherContent; + + /** + * 有无残疾(1:是 2:否) + */ + + @ApiModelProperty(value = "有无残疾(1:是 2:否)") + private Integer existDisability; + + /** + * 残疾 + */ + @ApiModelProperty(value = "残疾") + private String disability; + + /** + * 残疾情况--其他 + */ + @ApiModelProperty(value = "残疾情况--其他") + private String disabilityOtherContent; + + /** + * 生活环境--厨房排风设施 + */ + @ApiModelProperty(value = "生活环境--厨房排风设施") + private String liveExhaust; + /** + * 生活环境--燃料类型 + */ + @ApiModelProperty(value = "生活环境--燃料类型") + private String liveFuelType; + /** + * 生活环境--饮水 + */ + @ApiModelProperty(value = "生活环境--饮水") + private String liveDrinkingWater; + /** + * 生活环境--厕所 + */ + @ApiModelProperty(value = "生活环境--厕所") + private String liveToilet; + /** + * 生活环境--禽畜栏 + */ + @ApiModelProperty(value = "生活环境--禽畜栏") + private String liveLivestock; + + /** + * 复核人 + */ + @ApiModelProperty(value = "复核人") + private String checkOperator; + + /** + * 复核方式 1.门诊 2.家庭 3.电话 + */ + @ApiModelProperty(value = "复核方式 1.门诊 2.家庭 3.电话") + private String checkWay; + + /** + * 复核时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "复核时间") + private Date checkDate; + + /** + * 复核(更新)内容 + */ + @ApiModelProperty(value = "复核(更新)内容") + private String checkContent; + + /** + * 居民(家属)签字 + */ + @ApiModelProperty(value = "居民(家属)签字") + private String sickSign; + + /** + * 调查时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "调查时间") + private Date investigationTime; + + /** + * 录入时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "录入时间") + private Date createTime; + + /** + * 最近更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "最近更新时间") + private Date updateTime; + + /** + * 录入人 + */ + @ApiModelProperty(value = "录入人") + private String createUser; + + /** + * 最近修改人 + */ + @ApiModelProperty(value = "最近修改人") + private String updateUser; + + /** + * + */ + @ApiModelProperty(value = "") + private String xzt; + + /** + * 与户主关系 + */ + @ApiModelProperty(value = "与户主关系") + private String householderRelationship; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 户主姓名 + */ + @ApiModelProperty(value = "户主姓名") + private String householderName; + + /** + * 户主身份证 + */ + @ApiModelProperty(value = "户主身份证") + private String houeseholderIdentity; + /** + * 家庭人口数 + */ + @ApiModelProperty(value = "家庭人口数") + private Integer familyMemberNo; + /** + * 家庭结构 + */ + @ApiModelProperty(value = "家庭结构") + private String familyStructure; + /** + * 居住情况 + */ + @ApiModelProperty(value = "居住情况") + private Integer liveSituation; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/AreaListVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/AreaListVo.java new file mode 100644 index 0000000..3346bdd --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/AreaListVo.java @@ -0,0 +1,83 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.compress.utils.Lists; + +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 区划列表展示类 + * @Date 2023-09-26 026 15:13 + * @Param + * @return + **/ +@EqualsAndHashCode() +@ApiModel("区划列表展示类") +@Data +public class AreaListVo { + /** + * 区划代码 + */ + @ApiModelProperty("区划代码") + private Long id; + + /** + * 名称 + */ + @ApiModelProperty("名称") + private String name; + + /** + * 父级区划代码 + */ + @ApiModelProperty("父级区划代码") + private Long pid; + + /** + * 省/直辖市代码 + */ + @ApiModelProperty("省/直辖市代码") + private Long provinceCode; + + /** + * 市代码 + */ + @ApiModelProperty("市代码") + private Long cityCode; + + /** + * 区/县代码 + */ + @ApiModelProperty("区/县代码") + private Long areaCode; + + /** + * 街道/镇代码 + */ + @ApiModelProperty("街道/镇代码") + private Long streetCode; + + /** + * 社区/乡村代码 + */ + @ApiModelProperty("社区/乡村代码") + private Long committeeCode; + + /** + * 城乡分类代码 + */ + @ApiModelProperty("城乡分类代码") + private Long committeeType; + + /** + * 级别: 1-省/直辖市, 2-市, 3-区/县/地级市, 4-街道/镇, 5-社区/乡村 + */ + @ApiModelProperty("级别: 1-省/直辖市, 2-市, 3-区/县/地级市, 4-街道/镇, 5-社区/乡村") + private Integer level; + + private List children = Lists.newArrayList(); +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/CrowdVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/CrowdVo.java new file mode 100644 index 0000000..c1c84df --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/CrowdVo.java @@ -0,0 +1,94 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 人群展示类 + * @Date 2023-09-26 026 11:03 + * @Param + * @return + **/ +@Data +public class CrowdVo implements Serializable { + + /** + * 人群编号 + */ + private String crowdNo; + + /** + * 人群名称 + */ + private String crowdName; + + /** + * 最小适用年龄 + */ + private Integer fitMinAge; + + /** + * 最大适用年龄 + */ + private Integer fitMaxAge; + + /** + * 适用性别 (0:全部 1:男 2:女 99:未知) + */ + private String fitGender; + + /** + * 序号 + */ + private Integer sort; + + /** + * 人群类型(0: 默认 1:慢病 2:特殊人群) + */ + private String crowdType; + + /** + * 特殊人群类型( 1:60岁老年人 2:65岁老年人 3:60-64岁老年人 4:老年人 5:儿童 6:孕产妇 7:严重精神障碍 8:特扶家庭 9:残疾人 10:贫困人口 11:结核病 12:恶性肿瘤病) + */ + private String specialType; + + /** + * 备注 + */ + private String remark; + + /** + * 创建人 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createDate; + + /** + * 更新人 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateDate; + + /** + * 删除标识 0:正常,1:已删除 + */ + private Boolean delete; + + /** + * 是否禁用(0: 可用 1:禁用) + */ + private String disable; + + private static final long serialVersionUID = 1L; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/DoctorDetailVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/DoctorDetailVo.java new file mode 100644 index 0000000..89e25e0 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/DoctorDetailVo.java @@ -0,0 +1,180 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 医生用户详情展示类 + * @Date 2023-09-26 026 11:06 + * @Param + * @return + **/ +@ApiModel("医生用户详情展示类") +@Data +public class DoctorDetailVo { + /** + * 用户业务主键 + */ + @ApiModelProperty("用户业务主键") + private String userNo; + + /** + * 身份证号码 + */ + @ApiModelProperty("身份证号码") + private String identity; + + /** + * 所属机构业务主键 + */ + @ApiModelProperty("所属机构业务主键") + private String orgNo; + + /** + * 所属机构名称 + */ + @ApiModelProperty("所属机构名称") + private String orgName; + + /** + * 服务机构业务主键 + */ + @ApiModelProperty("服务机构业务主键") + private String serviceOrgNo; + + /** + * 服务机构名称 + */ + @ApiModelProperty("服务机构名称") + private String serviceOrgName; + + /** + * 所属团队业务主键 + */ + @ApiModelProperty("所属团队业务主键") + private String teamNo; + + /** + * 所属团队名称 + */ + @ApiModelProperty("所属团队名称") + private String teamName; + + /** + * 真实姓名 + */ + @ApiModelProperty("真实姓名") + private String realname; + + /** + * 登录名 + */ + @ApiModelProperty("登录名") + private String username; + + /** + * 手机号码 + */ + @ApiModelProperty("手机号码") + private String mobilePhone; + + /** + * 固定电话 + */ + @ApiModelProperty("固定电话") + private String landline; + + /** + * 职称(0:初级,1:中级,2:高级,99:其他) + */ + @ApiModelProperty("职称(0:初级,1:中级,2:高级,99:其他)") + private String profTitle; + + /** + * 是否团队长0:否,1:是 + */ + @ApiModelProperty("是否团队长0:否,1:是") + private Boolean teamLeader; + + /** + * 团队成员类型(0:全科医生,1:专科医生,2:社区护士,3:公共卫生人员) + */ + @ApiModelProperty("团队成员类型(0:全科医生,1:专科医生,2:社区护士,3:公共卫生人员)") + private String teamMemberType; + + /** + * 团队成员类型名称 + */ + @ApiModelProperty("团队成员类型名称") + private String teamMemberTypeName; + + /** + * 用户头像路径 + */ + @ApiModelProperty("用户头像路径") + private String avatar; + + /** + * 签字路径 + */ + @ApiModelProperty("签字路径") + private String signature; + + /** + * 数据范围(0:全部数据,1:自定义范围,2:本机构及以下数据,3:本机构数据,4:本团队数据,5:仅本人数据) + */ + @ApiModelProperty("数据范围(0:全部数据,1:自定义范围,2:本机构及以下数据,3:本机构数据,4:本团队数据,5:仅本人数据)") + private String dataScope; + + /** + * 公卫用户ID + */ + @ApiModelProperty("公卫用户ID") + private String phUserId; + + /** + * 公卫用户名称 + */ + @ApiModelProperty("公卫用户名称") + private String phUserName; + + /** + * 公卫机构ID + */ + @ApiModelProperty("公卫机构ID") + private String phOrgId; + + /** + * 公卫机构编号 + */ + @ApiModelProperty("公卫机构编号") + private String phOrgCode; + + /** + * 个人简介 + */ + @ApiModelProperty("个人简介") + private String individualResume; + + /** + * 用户是否被锁定或解锁 true:解锁,false:锁定 + */ + @ApiModelProperty("用户是否被锁定或解锁 true:解锁,false:锁定") + private Boolean accountNonLocked; + + /** + * 备注 + */ + @ApiModelProperty("备注") + private String remark; + + /** + * 角色编号集合 + */ + @ApiModelProperty("角色编号集合") + private List roleNoList; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/NearOrgVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/NearOrgVo.java new file mode 100644 index 0000000..046ed5f --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/NearOrgVo.java @@ -0,0 +1,29 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 附近机构展示类 + * @Date 2023-09-27 027 9:45 + * @Param + * @return + **/ +@Data +@ApiModel("附近机构展示类") +public class NearOrgVo { + + @ApiModelProperty("机构编号") + private String orgNo; + + @ApiModelProperty("机构名称") + private String orgName; + + @ApiModelProperty("机构地址") + private String address; + + @ApiModelProperty("距离(km)") + private String distance; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PackageDetailVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PackageDetailVo.java new file mode 100644 index 0000000..42a22ca --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PackageDetailVo.java @@ -0,0 +1,141 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 服务包明细对象 + * @Date 2023-09-26 026 14:39 + * @Param + * @return + **/ +@ApiModel("服务包明细对象") +@Data +public class PackageDetailVo { + + /** + * 服务包业务主键 + */ + @ApiModelProperty(value = "服务包业务主键") + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称") + private String packageName; + + /** + * 机构编号 + */ + @ApiModelProperty(value = "机构编号") + private String orgNo; + + /** + * 机构名称 + */ + @ApiModelProperty(value = "机构名称") + private String orgName; + + /** + * 适用人群编号(0:全部人群) + */ + @ApiModelProperty(value = "适用人群编号(0:全部人群)") + private String crowdNo; + + /** + * 适用人群名称 + */ + @ApiModelProperty(value = "适用人群名称") + private String crowdName; + + /** + * 价格(单位:元,#0.00) + */ + @ApiModelProperty(value = "价格(单位:元,#0.00)") + private BigDecimal packCost; + + /** + * 服务周期 + */ + @ApiModelProperty(value = "服务周期") + private Integer servicePeriod; + + /** + * 单位(D:天,W:周,M:月,Y:年) + */ + @ApiModelProperty(value = "单位(D:天,W:周,M:月,Y:年)") + private String unit; + + /** + * 是否公共(市级机构才可创建) + * */ + @ApiModelProperty(value = "是否公共(市级机构才可创建)") + private Boolean common; + + /** + * 服务包类型(0:基本公共卫生服务包 1:家医服务包 2:精细化服务包) + */ + @ApiModelProperty(value = "服务包类型(0:基本公共卫生服务包 1:家医服务包 2:精细化服务包)") + private String packType; + + /** + * 服务包类别(0:基础服务包 1:个性化服务包) + * */ + @ApiModelProperty(value = "服务包类别(0:基础服务包 1:个性化服务包)") + private String packCategory; + + /** + * 服务包内容 + */ + @ApiModelProperty(value = "服务包内容") + private String packageContent; + + /** + * 启用状态 + */ + @ApiModelProperty(value = "启用状态") + private Boolean state; + + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private String createBy; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private Date createDate; + + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private Date updateDate; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + + /** + * 是否已申请 + */ + @ApiModelProperty(value = "是否已申请") + private Boolean isBooking; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PackageListVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PackageListVo.java new file mode 100644 index 0000000..a1317f9 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PackageListVo.java @@ -0,0 +1,134 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 服务包列表展示类 + * @Date 2023-09-26 026 11:05 + * @Param + * @return + **/ +@ApiModel("服务包列表展示类") +@Data +public class PackageListVo { + + /** + * 服务包业务主键 + */ + @ApiModelProperty(value = "服务包业务主键") + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称") + private String packageName; + + /** + * 机构编号 + */ + @ApiModelProperty(value = "机构编号") + private String orgNo; + + /** + * 机构名称 + */ + @ApiModelProperty(value = "机构名称") + private String orgName; + + /** + * 适用人群编号(0:全部人群) + */ + @ApiModelProperty(value = "适用人群编号(0:全部人群)") + private String crowdNo; + + /** + * 适用人群名称 + */ + @ApiModelProperty(value = "适用人群名称") + private String crowdName; + + /** + * 价格(单位:元,#0.00) + */ + @ApiModelProperty(value = "价格(单位:元,#0.00)") + private BigDecimal packCost; + + /** + * 服务周期 + */ + @ApiModelProperty(value = "服务周期") + private Integer servicePeriod; + + /** + * 单位(D:天,W:周,M:月,Y:年) + */ + @ApiModelProperty(value = "单位(D:天,W:周,M:月,Y:年)") + private String unit; + + /** + * 是否公共(市级机构才可创建) + * */ + @ApiModelProperty(value = "是否公共(市级机构才可创建)") + private Boolean common; + + /** + * 服务包类型(0:基本公共卫生服务包 1:家医服务包 2:精细化服务包) + */ + @ApiModelProperty(value = "服务包类型(0:基本公共卫生服务包 1:家医服务包 2:精细化服务包)") + private String packType; + + /** + * 服务包内容 + */ + @ApiModelProperty(value = "服务包内容") + private String packageContent; + + /** + * 服务包类别(0:基础服务包 1:个性化服务包) + * */ + @ApiModelProperty(value = "服务包类别(0:基础服务包 1:个性化服务包)") + private String packCategory; + + /** + * 启用状态 + */ + @ApiModelProperty(value = "启用状态") + private Boolean state; + + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private String createBy; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private Date createDate; + + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private Date updateDate; + + /** + * 备注 + */ + @ApiModelProperty("备注") + private String remark; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ProtocolContentVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ProtocolContentVo.java new file mode 100644 index 0000000..bf712b8 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ProtocolContentVo.java @@ -0,0 +1,46 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 签约协内容展示对象 + * @Date 2023-09-27 027 9:33 + * @Param + * @return + **/ +@Api("签约协内容展示对象") +@Data +public class ProtocolContentVo { + /** + * 协议内容模板编号 + */ + @ApiModelProperty(value = "协议内容模板编号") + private String contentNo; + + /** + * 签约机构编号 + */ + @ApiModelProperty(value = "签约机构编号") + private String orgNo; + + /** + * 签约机构名称 + */ + @ApiModelProperty(value = "签约机构名称") + private String orgName; + + /** + * 模板类型(0:市,1:县,2:机构) + */ + @ApiModelProperty(value = "模板类型") + private String contentType; + + /** + * 内容 + */ + @ApiModelProperty(value = "内容") + private String content; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentSignApplyVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentSignApplyVo.java new file mode 100644 index 0000000..faf6eb3 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentSignApplyVo.java @@ -0,0 +1,271 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.common.core.domain.BaseEntity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 居民签约申请展示类 + * @Date 2023-09-26 026 10:23 + * @Param + * @return + **/ +@Data +@ApiModel("居民签约申请展示类") +public class ResidentSignApplyVo extends BaseEntity { + /** + * 签约申请编号 + */ + @ApiModelProperty("签约申请编号") + private String signCode; + + /** + * 居民注册业务主键 + */ + @ApiModelProperty("居民注册业务主键") + private String patientId; + + /** + * 居民姓名 + */ + @ApiModelProperty("居民姓名") + private String residentName; + + /** + * 居民性别1:男2:女99:不详 + */ + @ApiModelProperty("居民性别1:男2:女99:不详") + private String gender; + + /** + * 出生日期 + */ + @ApiModelProperty("出生日期") + @JsonFormat(pattern ="yyyy-MM-dd", timezone = "GMT+8") + private Date birthday; + + /** + * 民族 + */ + @ApiModelProperty("民族") + private String nation; + + /** + * 身份证号 + */ + @ApiModelProperty("身份证号") + private String identity; + + /** + * 联系电话 + */ + @ApiModelProperty("联系电话") + private String phone; + + /** + * 省编码 + */ + @ApiModelProperty("省编码") + private String province; + + /** + * 省名称 + */ + @ApiModelProperty("省名称") + private String provinceName; + + /** + * 市编码 + */ + @ApiModelProperty("市编码") + private String city; + + /** + * 市名称 + */ + @ApiModelProperty("市名称") + private String cityName; + + /** + * 区县编码 + */ + @ApiModelProperty("区县编码") + private String county; + + /** + * 区县名称 + */ + @ApiModelProperty("区县名称") + private String countyName; + + /** + * 街道/乡镇编码 + */ + @ApiModelProperty("街道/乡镇编码") + private String town; + + /** + * 街道/乡镇名称 + */ + @ApiModelProperty("街道/乡镇名称") + private String townName; + + /** + * 社区/村编码 + */ + @ApiModelProperty("社区/村编码") + private String committee; + + /** + * 社区/村名称 + */ + @ApiModelProperty("社区/村名称") + private String committeeName; + + /** + * 详细地址 + */ + @ApiModelProperty("详细地址") + private String address; + + /** + * 所属人群编号 + */ + @ApiModelProperty("所属人群编号") + private String crowdsNo; + + /** + * 所属人群名称 + */ + @ApiModelProperty("所属人群名称") + private String crowdsName; + + /** + * 选择服务包编号 + */ + @ApiModelProperty("选择服务包编号") + private String packagesNo; + + /** + * 选择服务包名称 + */ + @ApiModelProperty("选择服务包名称") + private String packagesName; + + /** + * 签约机构编号 + */ + @ApiModelProperty("签约机构编号") + private String orgNo; + + /** + * 签约机构名称 + */ + @ApiModelProperty("签约机构名称") + private String orgName; + + /** + * 签约团队编号 + */ + @ApiModelProperty("签约团队编号") + private String teamNo; + + /** + * 签约团队名称 + */ + @ApiModelProperty("签约团队名称") + private String teamName; + + /** + * 签约医生编号 + */ + @ApiModelProperty("签约医生编号") + private String userNo; + + /** + * 签约医生姓名 + */ + @ApiModelProperty("签约医生姓名") + private String userName; + + /** + * 签约时间 + */ + @ApiModelProperty("签约时间") + @JsonFormat(pattern ="yyyy-MM-dd", timezone = "GMT+8") + private Date signTime; + + /** + * 居民签字 + */ + @ApiModelProperty("居民签字") + private String residentAutographPath; + + /** + * 与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他; + */ + @ApiModelProperty("与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;") + private String relationshipWithHouseholder; + + /** + * 户主姓名 + */ + @ApiModelProperty("户主姓名") + private String householderName; + + /** + * 户主身份证号 + */ + @ApiModelProperty("户主身份证号") + private String householderIdentity; + + /** + * 预约时间 + */ + @ApiModelProperty("预约时间") + @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date applyTime; + + /** + * 预约状态0:已申请1:已取消 + */ + @ApiModelProperty("预约状态0:已申请1:已取消") + private String bookingStatus; + + /** + * 取消时间 + */ + @ApiModelProperty("取消时间") + @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date cancelTime; + + /** + * 审批状态0:待批准1:已同意2:已拒绝 + */ + @ApiModelProperty("审批状态0:待批准1:已同意2:已拒绝") + private String approvalStatus; + + /** + * 拒绝理由 + */ + @ApiModelProperty("拒绝理由") + private String refuseReason; + + /** + * 操作时间 + */ + @ApiModelProperty("审批时间") + @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date approvalTime; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDetailVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDetailVo.java new file mode 100644 index 0000000..0404b3a --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDetailVo.java @@ -0,0 +1,374 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 签约详情类 + * @Date 2023-09-26 026 11:02 + * @Param + * @return + **/ +@ApiModel("签约详情类") +@Data +public class SignInfoDetailVo { + + /** + * 签约业务主键 + */ + @ApiModelProperty(value = "签约业务主键") + private String signNo; + + /** + * 居民用户业务主键 + */ + @ApiModelProperty(value = "居民用户业务主键") + private String residentNo; + + /** + * 姓名 + */ + @ApiModelProperty(value = "姓名") + private String residentName; + + /** + * 年龄 + */ + @ApiModelProperty(value = "年龄") + private String age; + + /** + * 性别(1:男 2:女 99:未知) + */ + @ApiModelProperty(value = "性别(1:男 2:女 99:未知)") + private String gender; + + /** + * 电话 + */ + @ApiModelProperty(value = "电话") + private String phone; + + /** + * 身份证号 + */ + @ApiModelProperty(value = "身份证号") + private String identity; + + /** + * 民族 + */ + @ApiModelProperty(value = "民族") + private String nation; + + /** + * 出生日期(YYYY-MM-DD) + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "出生日期(yyyy-MM-dd)") + private Date birthday; + + /** + * 省 + */ + @ApiModelProperty(value = "省") + private String province; + + /** + * 省名称 + */ + @ApiModelProperty(value = "省名称") + private String provinceName; + + /** + * 市 + */ + @ApiModelProperty(value = "市") + private String city; + + /** + * 市名称 + */ + @ApiModelProperty(value = "市名称") + private String cityName; + + /** + * 区/县 + */ + @ApiModelProperty(value = "区/县") + private String county; + + /** + * 区/县名称 + */ + @ApiModelProperty(value = "区/县名称") + private String countyName; + + /** + * 乡镇/街道 + */ + @ApiModelProperty(value = "乡镇/街道") + private String town; + + /** + * 乡镇/街道名称 + */ + @ApiModelProperty(value = "乡镇/街道名称") + private String townName; + + /** + * 社区/乡村 + */ + @ApiModelProperty(value = "社区/乡村") + private String committee; + + /** + * 社区/乡村名称 + */ + @ApiModelProperty(value = "社区/乡村名称") + private String committeeName; + + /** + * 详细地址 + */ + @ApiModelProperty(value = "详细地址") + private String address; + + /** + * 居民头像照片 + */ + @ApiModelProperty(value = "居民头像照片") + private String residentAvatar; + + /** + * 居民签名照片 + */ + @ApiModelProperty(value = "居民签名照片") + private String residentAutographPath; + + /** + * 医生签名照片 + */ + @ApiModelProperty(value = "医生签名照片") + private String doctorAutographPath; + + /** + * 医保卡号 + */ + @ApiModelProperty(value = "医保卡号") + private String medicare; + + /** + * 签约医生业务主键 + */ + @ApiModelProperty(value = "签约医生业务主键") + private String userNo; + + /** + * 签约医生名称 + */ + @ApiModelProperty(value = "签约医生名称") + private String userName; + + /** + * 责任医生业务主键 + */ + @ApiModelProperty(value = "责任医生业务主键") + private String dutyDoctorNo; + + /** + * 责任医生名称 + */ + @ApiModelProperty(value = "责任医生名称") + private String dutyDoctorName; + + /** + * 责任医生集合 + */ + @ApiModelProperty(value = "责任医生集合") + List dutyDoctorList; + + /** + * 团队编号 + */ + @ApiModelProperty(value = "团队编号") + private String teamNo; + + /** + * 团队名称 + */ + @ApiModelProperty(value = "团队名称") + private String teamName; + + /** + * 签约机构编号 + */ + @ApiModelProperty(value = "签约机构编号") + private String orgNo; + + /** + * 签约机构名称 + */ + @ApiModelProperty(value = "签约机构名称") + private String orgName; + + /** + * 服务机构编号 + */ + @ApiModelProperty(value = "服务机构编号") + private String agencyOrgNo; + + /** + * 服务机构名称 + */ + @ApiModelProperty(value = "服务机构名称") + private String agencyOrgName; + + /** + * 人群编号(,号隔开) + */ + @ApiModelProperty(value = "人群编号(,号隔开)") + private String crowdsNo; + + /** + * 人群名称(,号隔开) + */ + @ApiModelProperty(value = "人群名称(,号隔开)") + private String crowdsName; + + /** + * 人群集合 + */ + @ApiModelProperty(value = "人群集合") + private List crowdList; + + /** + * 服务包编号(,号隔开) + */ + @ApiModelProperty(value = "服务包编号(,号隔开)") + private String packagesNo; + + /** + * 服务包名称(,号隔开) + */ + @ApiModelProperty(value = "服务包名称(,号隔开)") + private String packagesName; + + /** + * 服务包集合 + */ + @ApiModelProperty(value = "服务集合") + private List packageList; + + /** + * 签约时间 + */ + @ApiModelProperty(value = "签约时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date signTime; + + /** + * 到期时间 + */ + @ApiModelProperty(value = "到期时间") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date signDeadline; + + /** + * 首次签约时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @ApiModelProperty(value = "首次签约时间") + private Date firstSignTime; + + /** + * 家庭编号 + */ + @ApiModelProperty(value = "家庭编号") + private String familyNo; + + /** + * 家庭名称 + */ + @ApiModelProperty(value = "家庭名称") + private String familyName; + + /** + * 是否为户主(0:否 1:是) + */ + @ApiModelProperty(value = "是否为户主(0:否 1:是)") + private Boolean householder; + + /** + * 户主姓名 + */ + @ApiModelProperty(value = "户主姓名") + private String householderName; + + /** + * 户主身份证号 + */ + @ApiModelProperty(value = "户主身份证号") + private String householderIdentity; + + /** + * 与户主关系(字典) + */ + @ApiModelProperty(value = "与户主关系(字典)") + private String relationshipWithHouseholder; + + /** + * 是否纳入重点人群(0:否 1:是) + */ + @ApiModelProperty(value = "是否纳入重点人群(0:否 1:是)") + private Boolean focusGroups; + + /** + * 是否在公卫建档(0:否 1:是) + */ + @ApiModelProperty(value = "是否在公卫建档") + private Boolean archivingInPh; + + /** + * 履约是否完成(0:未完成 1:已完成) + */ + @ApiModelProperty(value = "履约是否完成(0:未完成 1:已完成)") + private String perComplete; + + /** + * 创建人 + */ + @ApiModelProperty(value = "创建人") + private String createBy; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + private Date createDate; + + /** + * 更新人 + */ + @ApiModelProperty(value = "更新人") + private String updateBy; + + /** + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + private Date updateDate; + + /** + * 备注 + */ + @ApiModelProperty(value = "备注") + private String remark; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignedPackageVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignedPackageVo.java new file mode 100644 index 0000000..599eb62 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignedPackageVo.java @@ -0,0 +1,78 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author mengkuiliang + * @Description 居民已签约服务包对象 + * @Date 2023-09-26 026 14:37 + * @Param + * @return + **/ +@ApiModel("居民已签约服务包对象") +@Data +public class SignedPackageVo { + /** + * 服务包业务主键 + */ + @ApiModelProperty("服务包业务主键") + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty("服务包名称") + private String packageName; + + /** + * 已服务次数 + */ + @ApiModelProperty("已服务次数") + private Integer servicedTimes; + + /** + * 总次数 + */ + @ApiModelProperty("总次数") + private Integer totalTimes; + + /** + * 服务次数百分比 + */ + @ApiModelProperty("服务次数百分比") + private Integer percent; + + /** + * 适用人群名称 + */ + @ApiModelProperty(value = "适用人群名称") + private String crwodName; + + /** + * 服务周期 + */ + @ApiModelProperty(value = "服务周期") + private Integer servicePeriod; + + /** + * 服务周期 单位(D:天,W:周,M:月,Y:年) + */ + @ApiModelProperty(value = "服务周期 单位(D:天,W:周,M:月,Y:年)") + private String unit; + + /** + * 价格(单位:元,#0.00) + */ + @ApiModelProperty(value = "价格(单位:元,#0.00)") + private BigDecimal packCost; + + /** + * 服务包内容 + */ + @ApiModelProperty(value = "服务包内容") + private String packageContent; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/TeamDetailVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/TeamDetailVo.java new file mode 100644 index 0000000..e03fdea --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/TeamDetailVo.java @@ -0,0 +1,63 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @author gaoyu + * @version v3.0.1.0 + * @description 团队详情展示类 + * @date 2021-11-26 8:51 + */ +@Data +@ApiModel("团队详情展示类") +public class TeamDetailVo { + /** + * 家医团队业务主键 + */ + @ApiModelProperty("家医团队业务主键") + private String teamNo; + + /** + * 所属机构业务主键 + */ + @ApiModelProperty("所属机构业务主键") + private String orgNo; + + /** + * 所属机构名称 + */ + @ApiModelProperty("所属机构名称") + private String orgName; + + /** + * 家医团队名称 + */ + @ApiModelProperty("家医团队名称") + private String teamName; + + /** + * 团队长业务主键 + */ + @ApiModelProperty("团队长业务主键") + private String teamLeaderNo; + + /** + * 团队长名称 + */ + @ApiModelProperty("团队长名称") + private String teamLeaderName; + + /** + * 团队介绍 + */ + @ApiModelProperty("团队介绍") + private String introduction; + + /** + * 备注 + */ + @ApiModelProperty("备注") + private String remark; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IPatientInfoService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IPatientInfoService.java index 6d6549a..2c9374b 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IPatientInfoService.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IPatientInfoService.java @@ -1,5 +1,6 @@ package com.xinelu.familydoctor.applet.service; +import com.alibaba.fastjson2.JSONObject; import com.xinelu.familydoctor.applet.pojo.body.PatientInfoBody; import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo; import com.xinelu.familydoctor.applet.pojo.query.PatientInfoQuery; @@ -41,6 +42,15 @@ public interface IPatientInfoService { **/ String getOpenId(String code) throws Exception; + /** + * @Author mengkuiliang + * @Description 获取微信手机号 + * @Date 2023-09-26 026 11:42 + * @Param [code] + * @return java.lang.String + **/ + JSONObject getPhone(String code) throws Exception; + /** * @return java.lang.String * @Author mengkuiliang @@ -94,4 +104,13 @@ public interface IPatientInfoService { * @return java.lang.String **/ PatientInfo getCurrentResident(String openid, String cityCode); + + /** + * @Author mengkuiliang + * @Description 获取注册信息-根据身份证号 + * @Date 2023-09-27 027 15:13 + * @Param [cardNo] + * @return void + **/ + PatientInfo getByCardNo(String cardNo); } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentSignAppletService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentSignAppletService.java new file mode 100644 index 0000000..32d56f7 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentSignAppletService.java @@ -0,0 +1,91 @@ +package com.xinelu.familydoctor.applet.service; + +import com.github.pagehelper.PageInfo; +import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; +import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody; +import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; +import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo; + +import java.util.List; +import java.util.Map; + +/** + * @Author mengkuiliang + * @Description 居民签约申请Service + * @Date 2023-09-26 026 10:37 + * @Param + * @return + **/ +public interface IResidentSignAppletService { + + /** + * 新增签约预约 + * @author lixinying + * @param body: + * @return Integer + * @date 2022/11/21 9:38 + */ + void insert(ResidentSignApplyBody body); + /** + * 取消 + * @author lixinying + * @param signCode: + * @return Integer + * @date 2022/11/21 10:10 + */ + Integer delete(String signCode); + /** + * fd查找 + * @author lixinying + * @param query: + * @return List + * @date 2022/11/21 16:02 + */ + List findList(ApplyQuery query); + + /** + * 修改审批 + * @author lixinying + * @param body: + * @return Integer + * @date 2022/11/21 17:07 + */ + Integer updateFd(ApprovalBody body); + + /** + * @Author mengkuiliang + * @Description 查询签约申请记录 + * @Date 2022-11-22 10:56 + * @Param + * @return + **/ + ResidentSignApplyVo getSignBookingByIdentity(String identity); + + /** + * @Author mengkuiliang + * @Description 签约申请详情 + * @Date 2022-11-23 10:05 + * @Param [bookingNo] + * @return java.lang.Object + **/ + ResidentSignApplyVo detail(String signCode); + + /** + * @Author mengkuiliang + * @Description 取消签约申请 + * @Date 2022-11-23 14:42 + * @Param [bookingNo] + * @return void + **/ + void cancel(String signCode); + + /** + * @Author mengkuiliang + * @Description 是否已申请签约 + * @Date 2022-11-30 9:48 + * @Param [identity] + * @return java.lang.String + **/ + Map checkSignApply(String identity, String region); + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/PatientInfoServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/PatientInfoServiceImpl.java index d9afa82..e6c8328 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/PatientInfoServiceImpl.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/PatientInfoServiceImpl.java @@ -4,10 +4,12 @@ import java.util.Date; import java.util.List; import java.util.stream.Collectors; +import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.bean.BeanUtils; +import com.xinelu.common.utils.http.HttpService; import com.xinelu.common.utils.http.HttpUtils; import com.xinelu.common.utils.http.SslUtils; import com.xinelu.common.utils.uuid.IdUtils; @@ -34,6 +36,8 @@ public class PatientInfoServiceImpl implements IPatientInfoService { @Resource private PatientInfoMapper patientInfoMapper; + @Resource + private HttpService httpService; @Value("${applet.wxAppid}") private String WX_APPID; @@ -94,6 +98,53 @@ public class PatientInfoServiceImpl implements IPatientInfoService { } } + /** + * @Author mengkuiliang + * @Description 获取微信手机号 + * @Date 2023-09-26 026 11:42 + * @Param [code] + * @return java.lang.String + **/ + @Override + public JSONObject getPhone(String code) { + + try { + JSONObject result; + + // 获取token + String token_url = String.format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", WX_APPID, WX_SECRET); + SslUtils.ignoreSsl(); + String tokenResult = HttpUtils.sendGet(token_url); + if (tokenResult == null) { + return null; + } + result = JSON.parseObject(tokenResult); + log.info("获取小程序token : {}", result.toJSONString()); + String accessToken = result.getString("access_token"); + if (StringUtils.isEmpty(accessToken)) { + return null; + } + + //获取手机号 https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/user-info/phone-number/getPhoneNumber.html + String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber"+ "?access_token=" + accessToken; + JSONObject params = new JSONObject(); + params.put("code", code); + SslUtils.ignoreSsl(); + result = httpService.post(url, null, params); + if (result == null) { + return null; + } + log.info("获取小程序手机号 : {}", result.toJSONString()); + if(result.getInteger("errcode") != 0) { + return null; + } + return result; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + /** * @return java.lang.String * @Author mengkuiliang @@ -228,4 +279,16 @@ public class PatientInfoServiceImpl implements IPatientInfoService { return list.get(0); } } + + /** + * @Author mengkuiliang + * @Description 获取注册信息-根据身份证号 + * @Date 2023-09-27 027 15:13 + * @Param [cardNo] + * @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo + **/ + @Override + public PatientInfo getByCardNo(String cardNo) { + return patientInfoMapper.getByCardNo(cardNo); + } } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentSignApplyServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentSignApplyServiceImpl.java new file mode 100644 index 0000000..547cc9b --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentSignApplyServiceImpl.java @@ -0,0 +1,218 @@ +package com.xinelu.familydoctor.applet.service.impl; + +import com.alibaba.fastjson2.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.common.utils.StringUtils; +import com.xinelu.common.utils.http.HttpService; +import com.xinelu.common.utils.spring.SpringUtils; +import com.xinelu.common.utils.uuid.IdUtils; +import com.xinelu.familydoctor.applet.mapper.ResidentSignApplyMapper; +import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; +import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody; +import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo; +import com.xinelu.familydoctor.applet.pojo.entity.ResidentSignApplyEntity; +import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; +import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo; +import com.xinelu.familydoctor.applet.pojo.vo.SignInfoDetailVo; +import com.xinelu.familydoctor.applet.service.IPatientInfoService; +import com.xinelu.familydoctor.applet.service.IResidentSignAppletService; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Author mengkuiliang + * @Description 签约申请Impl + * @Date 2023-09-26 026 10:39 + * @Param + * @return + **/ +@Service +public class ResidentSignApplyServiceImpl implements IResidentSignAppletService { + + @Resource + private ResidentSignApplyMapper residentSignApplyMapper; + @Resource + private HttpService httpService; + @Resource + private IPatientInfoService patientInfoService; + + /** + * 新增签约申请 + * + * @param body : + * @return Integer + * @author lixinying + * @date 2022/11/21 9:38 + */ + @Override + public void insert(ResidentSignApplyBody body) { + ApplyQuery applyQuery = new ApplyQuery(); + applyQuery.setIdentity(body.getIdentity()); + applyQuery.setBookingStatus("0"); + applyQuery.setApprovalStatus("0"); + List signBookingInfoVoList = residentSignApplyMapper.findByBody(applyQuery); + if (signBookingInfoVoList != null && signBookingInfoVoList.size() > 0) { + throw new ServiceException("已经提交签约申请,不能重复提交"); + } + + PatientInfo patientInfo = patientInfoService.getByCardNo(body.getIdentity()); + if (patientInfo == null) { + throw new ServiceException("未查询到注册信息"); + } + + ResidentSignApplyEntity entity = new ResidentSignApplyEntity(); + BeanUtils.copyProperties(body, entity); + entity.setPatientId(patientInfo.getPatientCode()); + entity.setApplyTime(new Date()); + // 预约状态0:已申请 1:已取消 + entity.setBookingStatus("0"); + // 审批状态0:待批准 1:已同意 2:已拒绝 + entity.setApprovalStatus("0"); + entity.setSignCode(IdUtils.simpleUUID()); + residentSignApplyMapper.insert(entity); + } + + /** + * 取消 + * + * @param bookingNo : + * @return Integer + * @author lixinying + * @date 2022/11/21 10:10 + */ + @Override + public Integer delete(String bookingNo) { + return null; + } + + /** + * fd查找 + * + * @param query : + * @return List + * @author lixinying + * @date 2022/11/21 16:02 + */ + @Override + public List findList(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 residentSignApplyMapper.findByBody(query); + } + + /** + * 修改审批 + * + * @param body : + * @return Integer + * @author lixinying + * @date 2022/11/21 17:07 + */ + @Override + public Integer updateFd(ApprovalBody body) { + return residentSignApplyMapper.updateEx(body); + } + + /** + * @return com.xinelu.mp.sign.pojo.vo.FdSignBookingVo + * @Author mengkuiliang + * @Description 查询签约申请记录 + * @Date 2022-11-22 10:57 + * @Param [identity] + **/ + @Override + public ResidentSignApplyVo getSignBookingByIdentity(String identity) { + return residentSignApplyMapper.getSignBookingByIdentity(identity); + } + + /** + * @return com.xinelu.mp.sign.pojo.vo.FdSignBookingVo + * @Author mengkuiliang + * @Description 签约申请详情 + * @Date 2022-11-23 10:33 + * @Param [bookingNo] + **/ + @Override + public ResidentSignApplyVo detail(String signCode) { + return residentSignApplyMapper.detail(signCode); + } + + /** + * @return void + * @Author mengkuiliang + * @Description 取消签约申请 + * @Date 2022-11-23 14:42 + * @Param [bookingNo] + **/ + @Override + public void cancel(String signCode) { + ResidentSignApplyVo residentSignApplyVo = residentSignApplyMapper.detail(signCode); + if (residentSignApplyVo == null) { + throw new ServiceException("未查询到申请记录"); + } + if (!StringUtils.isBlank(residentSignApplyVo.getBookingStatus()) && residentSignApplyVo.getBookingStatus().equals("1")) { + throw new ServiceException("不能重复取消"); + } + if (!StringUtils.isBlank(residentSignApplyVo.getApprovalStatus())) { + if (residentSignApplyVo.getApprovalStatus().equals("1")) { + throw new ServiceException("已同意,不能取消"); + } + if (residentSignApplyVo.getApprovalStatus().equals("2")) { + throw new ServiceException("已拒绝,不能取消"); + } + } + residentSignApplyMapper.cancel(signCode); + } + + /** + * @Author mengkuiliang + * @Description 是否已申请签约 + * @Date 2022-11-30 9:49 + * @Param [identity] + **/ + @Override + public Map checkSignApply(String identity, String region) { + Map retMap = new HashMap<>(); + // 签约申请 + ResidentSignApplyVo signBookingInfoVo = getSignBookingByIdentity(identity); + if (signBookingInfoVo != null) { + retMap.put("code", 01); + retMap.put("info", DateUtils.parseDateToStr("yyyy年MM月dd日", signBookingInfoVo.getSignTime()) + "已在【" + signBookingInfoVo.getOrgName() + "】【" + signBookingInfoVo.getTeamName() + "】【" + signBookingInfoVo.getUserName() + "】申请签约"); + return retMap; + } + // 查询签约信息 + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/detail/" + identity, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (!"1".equals(jsonObject.get("code"))) { + throw new ServiceException(jsonObject.get("msg").toString()); + } + // 已签约 + if (jsonObject.containsKey("data") && jsonObject.get("data") != null) { + SignInfoDetailVo signInfoDetailVo = JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDetailVo.class); + retMap.put("code", 02); + retMap.put("info", DateUtils.parseDateToStr("yyyy年MM月dd日", signInfoDetailVo.getSignTime()) + "已在【" + signInfoDetailVo.getOrgName() + "】【" + signInfoDetailVo.getTeamName() + "】【" + signInfoDetailVo.getUserName() + "】签约"); + return retMap; + } + retMap.put("code", 0); + retMap.put("info", "true"); + return retMap; + } + +} + + + + diff --git a/xinelu-familydoctor/src/main/resources/mapper/register/PatientInfoMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/register/PatientInfoMapper.xml index 2596dad..fdb3137 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/register/PatientInfoMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/register/PatientInfoMapper.xml @@ -424,6 +424,12 @@ order by binding_time desc + + + update patient_info diff --git a/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml new file mode 100644 index 0000000..40b13a7 --- /dev/null +++ b/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml @@ -0,0 +1,350 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id + ,sign_code,patient_id, + resident_name,gender,birthday, + nation,identity,phone, + province,province_name,city, + city_name,county,county_name, + town,town_name,committee, + committee_name,address,crowds_no, + crowds_name,packages_no,packages_name, + org_no,org_name,team_no, + team_name,user_no,user_name, + sign_time,resident_autograph_path,relationship_with_householder, + householder_name,householder_identity,apply_time, + booking_status,cancel_time,approval_status, + refuse_reason,approval_time,remark + + + + p.id,p.sign_code,p.patient_id, + p.resident_name,p.gender,p.birthday, + p.nation,p.identity,p.phone, + p.province,p.province_name,p.city, + p.city_name,p.county,p.county_name, + p.town,p.town_name,p.committee, + p.committee_name,p.address,p.crowds_no, + p.crowds_name,p.packages_no,p.packages_name, + p.org_no,p.org_name,p.team_no, + p.team_name,p.user_no,p.user_name, + p.sign_time,p.resident_autograph_path,p.relationship_with_householder, + p.householder_name,p.householder_identity,p.apply_time, + p.booking_status,p.cancel_time,p.approval_status, + p.refuse_reason,p.approval_time,p.remark + + + + + insert into resident_sign_apply + + sign_code, + + patient_id, + + resident_name, + + gender, + + birthday, + + nation, + + identity, + + phone, + + province, + + province_name, + + city, + + city_name, + + county, + + county_name, + + town, + + town_name, + + committee, + + committee_name, + + address, + + crowds_no, + + crowds_name, + + packages_no, + + packages_name, + + org_no, + + org_name, + + team_no, + + team_name, + + user_no, + + user_name, + + sign_time, + + resident_autograph_path, + + resident_avatar, + + + relationship_with_householder, + + householder_name, + + householder_identity, + + apply_time, + + booking_status, + + cancel_time, + + approval_status, + + refuse_reason, + + approval_time, + + remark, + + + + #{signCode}, + + #{patientId}, + + #{residentName}, + + #{gender}, + + #{birthday}, + + #{nation}, + + #{identity}, + + #{phone}, + + #{province}, + + #{provinceName}, + + #{city}, + + #{cityName}, + + #{county}, + + #{countyName}, + + #{town}, + + #{townName}, + + #{committee}, + + #{committeeName}, + + #{address}, + + #{crowdsNo}, + + #{crowdsName}, + + #{packagesNo}, + + #{packagesName}, + + #{orgNo}, + + #{orgName}, + + #{teamNo}, + + #{teamName}, + + #{userNo}, + + #{userName}, + + #{signTime}, + + #{residentAutographPath}, + + #{residentAvatar}, + + + #{relationshipWithHouseholder}, + + #{householderName}, + + #{householderIdentity}, + + #{applyTime}, + + #{bookingStatus}, + + #{cancelTime}, + + #{approvalStatus}, + + #{refuseReason}, + + #{approvalTime}, + + #{remark}, + + + + + + + update resident_sign_apply + set booking_status = '1', + cancel_time = now() + where sign_code = #{signCode} + + + + + + + + + + + + update resident_sign_apply + + + approval_status = #{approvalStatus}, + + + refuse_reason = #{refuseReason}, + + approval_time = now() + + where sign_code = #{signCode}; + + +