diff --git a/pom.xml b/pom.xml
index 2d63ba8..e776c35 100644
--- a/pom.xml
+++ b/pom.xml
@@ -36,6 +36,7 @@
1.18.4
3.0.3
2.7.1
+ 0.4.4
@@ -235,6 +236,13 @@
simple-xml
${simple-xml.version}
+
+
+
+ com.github.wechatpay-apiv3
+ wechatpay-apache-httpclient
+ ${wechatpay-apiv3.version}
+
diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java
index da46c82..d09c38e 100644
--- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java
+++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java
@@ -89,6 +89,7 @@ public class ResidentPatientInfoController extends BaseController {
try {
return R.ok(residentPatientInfoService.switchResident(openid, patientCode));
} catch (Exception e) {
+ e.printStackTrace();
return R.fail(e.getMessage());
}
}
diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentRescindApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentRescindApplyController.java
index 37981ad..03552aa 100644
--- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentRescindApplyController.java
+++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentRescindApplyController.java
@@ -53,6 +53,7 @@ public class ResidentRescindApplyController extends BaseController {
List list = rescindApplyService.findList(query);
return getDataTable(list);
} catch (Exception e) {
+ e.printStackTrace();
throw new ServiceException(e.getMessage());
}
}
@@ -63,6 +64,7 @@ public class ResidentRescindApplyController extends BaseController {
try {
return R.ok(rescindApplyService.detail(applyNo));
} catch (Exception e) {
+ e.printStackTrace();
return R.fail(e.getMessage());
}
}
diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java
index 085b97a..dec5de9 100644
--- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java
+++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java
@@ -38,6 +38,9 @@ public class ResidentServiceApplyController extends BaseController {
if (body == null || StringUtils.isBlank(body.getPackageNo()) || StringUtils.isBlank(body.getFormNo())) {
return R.fail("请求参数不能为空");
}
+ if(StringUtils.isBlank(body.getIdentity())) {
+ return R.fail("居民身份证号不能为空");
+ }
residentServiceAppletService.insert(body);
return R.ok();
}
@@ -59,6 +62,7 @@ public class ResidentServiceApplyController extends BaseController {
startPage();
return getDataTable(residentServiceAppletService.findList(query));
} catch (Exception e) {
+ e.printStackTrace();
throw new ServiceException(e.getMessage());
}
}
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
index 283fd6d..dbb2d61 100644
--- 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
@@ -1,5 +1,6 @@
package com.xinelu.web.controller.applet;
+import com.alibaba.fastjson2.JSONObject;
import com.xinelu.common.config.XinELuConfig;
import com.xinelu.common.core.controller.BaseController;
import com.xinelu.common.core.domain.AjaxResult;
@@ -9,6 +10,9 @@ import com.xinelu.common.exception.ServiceException;
import com.xinelu.common.utils.file.FileUploadUtils;
import com.xinelu.common.utils.file.FileUtils;
import com.xinelu.common.utils.file.MimeTypeUtils;
+import com.xinelu.common.utils.http.HttpService;
+import com.xinelu.common.utils.spring.SpringUtils;
+import com.xinelu.familydoctor.applet.pojo.body.FileUploadBody;
import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody;
import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery;
import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo;
@@ -16,10 +20,12 @@ import com.xinelu.familydoctor.applet.service.IResidentSignAppletService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
+import org.aspectj.weaver.loadtime.Aj;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
+import java.util.Base64;
import java.util.List;
/**
@@ -37,14 +43,20 @@ public class ResidentSignApplyController extends BaseController {
@Resource
private IResidentSignAppletService residentSignAppletService;
@Resource
- private XinELuConfig xinELuConfig;
+ private HttpService httpService;
@ApiOperation("提交签约申请")
@PostMapping("/save")
public R save(@RequestBody ResidentSignApplyBody body) {
- if(StringUtils.isBlank(body.getIdentity())) {
+ if (StringUtils.isBlank(body.getIdentity())) {
return R.fail("身份证号不能为空");
}
+ if (body.getCrowdList() == null || body.getCrowdList().size() == 0) {
+ return R.fail("人群不能为空");
+ }
+ if (body.getPackageList() == null || body.getPackageList().size() == 0) {
+ return R.fail("服务包不能为空");
+ }
residentSignAppletService.insert(body);
return R.ok();
}
@@ -62,6 +74,7 @@ public class ResidentSignApplyController extends BaseController {
try {
return R.ok(residentSignAppletService.checkSignApply(identity, region));
} catch (Exception e) {
+ e.printStackTrace();
return R.fail(e.getMessage());
}
}
@@ -74,6 +87,7 @@ public class ResidentSignApplyController extends BaseController {
List list = residentSignAppletService.findList(query);
return getDataTable(list);
} catch (Exception e) {
+ e.printStackTrace();
throw new ServiceException(e.getMessage());
}
}
@@ -84,6 +98,7 @@ public class ResidentSignApplyController extends BaseController {
try {
return R.ok(residentSignAppletService.detail(bookingNo));
} catch (Exception e) {
+ e.printStackTrace();
return R.fail(e.getMessage());
}
}
@@ -91,32 +106,38 @@ public class ResidentSignApplyController extends BaseController {
@ApiOperation("居民签字上传")
@PostMapping(value = "/residentSignatureUpload")
- public AjaxResult headPictureUpload(MultipartFile file) throws Exception {
+ public AjaxResult headPictureUpload(MultipartFile file, @RequestHeader("region") String region) throws Exception {
if (StringUtils.isBlank(file.getOriginalFilename())) {
return AjaxResult.error("请选择所要上传的居民签字!");
}
- //获取路径名称
- String uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getResidentSignatureUrl();
- //上传图片
- String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, file, MimeTypeUtils.IMAGE_EXTENSION);
- if (StringUtils.isBlank(pictureName)) {
- throw new ServiceException(pictureName + "居民头像上传失败!");
+ FileUploadBody body = new FileUploadBody();
+ body.setOriginalFilename(file.getOriginalFilename());
+ body.setCode("1001");
+ body.setContentType(file.getContentType());
+ body.setSuffix(body.getOriginalFilename().substring(body.getOriginalFilename().lastIndexOf(".") + 1));
+ body.setFile(Base64.getEncoder().encodeToString(file.getBytes()));
+ // 上传家医
+ JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/resident/signinfo/uploadBase64", null, JSONObject.parseObject(JSONObject.toJSONString(body)));
+ if ("0".equals(result.get("code"))) {
+ return AjaxResult.error(result.get("msg").toString());
}
- //获取返回值
AjaxResult ajax = AjaxResult.success("上传成功!");
- ajax.put("imgUrl", pictureName);
+ ajax.put("imgUrl", result.getString("data"));
return ajax;
}
- @ApiOperation("获取居民签字(base64)")
- @GetMapping( "/getResidentSignature/")
- public AjaxResult getResidentSignature(String imgUrl) throws Exception {
- //获取路径名称
- String pathUrl = XinELuConfig.getProfile() + imgUrl;
- String base64 = FileUtils.PicToBase64(pathUrl);
- AjaxResult ajax = AjaxResult.success("解析成功!");
- ajax.put("imgUrl", base64);
- return ajax;
+ @ApiOperation("获取居民签字")
+ @GetMapping(value = "/getResidentSignature/{fileNo}")
+ public AjaxResult getResidentSignature(@PathVariable String fileNo, @RequestHeader("region") String region) {
+ String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getSignBase64/" + fileNo, 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.success();
+ }
+ return AjaxResult.success("查询成功", jsonObject.getString("data"));
}
}
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
index eb44401..134d953 100644
--- 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
@@ -10,10 +10,12 @@ 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.PackageQuery;
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.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
@@ -229,4 +231,53 @@ public class SignInfoController extends BaseController {
return R.ok(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(PerformancePackageVo.class));
}
+ @ApiOperation(value = "获取家医人群")
+ @GetMapping("/getCrowd/{identity}")
+ public R> getCrowd(@PathVariable String identity, @RequestHeader("region") String region) {
+ String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getCrowd/" + identity, null, String.class);
+ JSONObject jsonObject = JSONObject.parseObject(result);
+ if ("0".equals(jsonObject.get("code"))) {
+ return R.fail(jsonObject.get("msg").toString());
+ }
+ if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) {
+ return R.ok();
+ }
+ return R.ok(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(CrowdVo.class));
+ }
+
+ @ApiOperation("根据人群获取服务包")
+ @PostMapping("/getPackageByCrowdNo")
+ public R> getPackageByCrowdNo(@RequestBody PackageQuery query, @RequestHeader("region") String region) {
+ if (query == null) {
+ return R.fail("请求参数不能为空");
+ }
+ if (StringUtils.isBlank(query.getOrgNo())) {
+ return R.fail("机构编号不能为空");
+ }
+ if (query.getCrowdNoList() == null || query.getCrowdNoList().size() == 0) {
+ return R.fail("人群编号不能为空");
+ }
+ JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/package/getPackageByCrowdNoList", null, JSONObject.parseObject(JSONObject.toJSONString(query)));
+ if ("0".equals(result.get("code"))) {
+ return R.fail(result.get("msg").toString());
+ }
+ if (result.containsKey("data") && result.get("data") != null) {
+ return R.ok(JSONArray.parseArray(result.getJSONArray("data").toJSONString()).toJavaList(PackageDetailVo.class));
+ }
+ return R.ok();
+ }
+
+ @ApiOperation(value = "获取签约协议")
+ @GetMapping("/getSignProtocol/{cardNo}")
+ public R getSignProtocol(@PathVariable String cardNo, @RequestHeader("region") String region) {
+ String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getSignProtocol/" + cardNo, null, String.class);
+ JSONObject jsonObject = JSONObject.parseObject(result);
+ if ("0".equals(jsonObject.get("code"))) {
+ return R.fail(jsonObject.get("msg").toString());
+ }
+ if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) {
+ return R.ok();
+ }
+ return R.ok(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDataVo.class));
+ }
}
diff --git a/xinelu-admin/src/main/resources/application.yml b/xinelu-admin/src/main/resources/application.yml
index dadcde7..54b1ee5 100644
--- a/xinelu-admin/src/main/resources/application.yml
+++ b/xinelu-admin/src/main/resources/application.yml
@@ -84,6 +84,8 @@ xinelu:
right-eye-piture-url: /rightEyePitureUrl
#居民签约申请签字图片地址
resident-signature-url: /residentSignatureUrl
+ #阿尔兹海默症结果文件地址
+ alzheimer-file-url: /alzheimerFileUrl
# 开发环境配置
server:
@@ -254,10 +256,10 @@ fd:
# 腾讯云音视频
trtc:
- sdkappid: 1400236771
- sdksecretkey: 83ab78d1a8513af6626d58cc2bacd7b28bfb2af06515fa02b0204129ebb53422
- secretid: AKIDOBpP2ICALat0wP4lcIiAMtZ7XgUJ5vMO
- secretkey: zxjJhGcx75lECyweHgphKYefWCkBPSHt
+ sdkappid: 1600006944
+ sdksecretkey: 6ddbc3e7e4aa128b52898df27a35f8f3d5acdca6f34ffa17b87ebc33e83314f1
+ secretid: AKIDjKo7GF2g9PQJ7KMBpGUTFrFZP7cw2upY
+ secretkey: c1HajkZCdrrhLsDRUL1XotpeUAkAOSM7
# 微信小程序参数配置信息
applet-chat-config:
@@ -274,21 +276,6 @@ applet-chat-config:
# 微信小程序事件回调消息加密密钥
encoding-aes-key: 5rbyhMBpdnxTEVT54zeHMNcXi3ccilQZ209QqGi89EW
-# 护理员微信小程序参数配置信息
-nurse-applet-chat-config:
- # 微信小程序id,wxa4f2b43d2ccb9908
- applet-id: wxa4f2b43d2ccb9908
- # 微信小程序密钥,
- secret: faeba9fc043cfdcb088f43be1747e054
- # 微信小程序返回国家语言
- lang: zh_CN
- # 微信小程序授权类型
- grant-type: authorization_code
- # 微信小程序事件回调令牌
- token: Yw3vfW1ILpc34qAVDtTpB2hesAMCpvW0
- # 微信小程序事件回调消息加密密钥
- encoding-aes-key: Lr2uq0F3ds36ZA4AUv1h3Pki0JO1Ql0QeG0z1r4A3at
-
# 小程序首页路径
applet-page-config:
# 首页跳转路径
@@ -303,3 +290,37 @@ applet-page-config:
integral-page-url: pages/integral/integral
# 护理结构详情页面跳转路径
nursestation-details-page-url: pages/nursestation/nursestation
+
+# 新医路微信商户号配置参数
+xyl-we-chat-config:
+ xyl-mch-id: 1633348407
+ xyl-mch-serial-no: 7C6A18FC8E1F0445901B1BE1C4DD1ACE284C3D79
+ xyl-private-key-path: xinyilu_apiclient_key.pem
+ xyl-payment-key: Xyl699003981qazVFR4xsw23edcASDFG
+ xyl-wechat-notify-url: https://1608.xinelu.cn
+
+# 医路优品微信商户号配置参数
+ylyp-we-chat-config:
+ ylyp-mch-id: 1633506981
+ ylyp-mch-serial-no: 7840E8CE4B9B1F0F19D5DD2AB7BC159E007F9D90
+ ylyp-private-key-path: yiluyoupin_apiclient_key.pem
+ ylyp-payment-key: Xyk699003981qazxsw23edcvfr4bgt56
+ ylyp-we-chat-notify-url: https://1608.xinelu.cn
+
+# 微信支付接口地址,包含小程序和App支付接口地址
+we-chat-payment-url-config:
+ jsapi-palce-order-url: https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi
+ query-order-no-url: https://api.mch.weixin.qq.com/v3/pay/transactions/id/%s
+ query-mch-id-url: https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/%s
+ close-order-url: https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/%s/close
+ refund-apply-url: https://api.mch.weixin.qq.com/v3/refund/domestic/refunds
+ refund-query-order-url: https://api.mch.weixin.qq.com/v3/refund/domestic/refunds/%s
+ trade-apply-bill-url: https://api.mch.weixin.qq.com/v3/bill/tradebill
+ capital-apply-bill-url: https://api.mch.weixin.qq.com/v3/bill/fundflowbill
+ app-place-order-url: https://api.mch.weixin.qq.com/v3/pay/transactions/app
+
+# 快递鸟物流查询参数配置
+logistics-config:
+ e-business-id: 1781371
+ api-key: 998b273d-c926-4659-a9d5-ae0613782d70
+ express-bird-url: https://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx
\ No newline at end of file
diff --git a/xinelu-admin/src/main/resources/xinyilu_apiclient_key.pem b/xinelu-admin/src/main/resources/xinyilu_apiclient_key.pem
new file mode 100644
index 0000000..9cf8337
--- /dev/null
+++ b/xinelu-admin/src/main/resources/xinyilu_apiclient_key.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDFgFmuT17PjBIN
+B0wSGnchCCsB9ZRZZFpcpvBpO+VLspmTSM//zV621uTzZeWNONEBzwO4C7VCsbHW
+gu7R5AQj9FYSzTKdycvs+097qQcQAvMr3VwrX0/dtH2U0iFX6zr3ztDKv2eQBegu
+wEcZsoOEgEW1rsjs/t2MTJJLPYWfzDDUbDBJi2hKFzSGAPfpqeOz0+loKNUz/i7V
+/dg5TXlbWfe0gdf4SI04sdrUkNsbQKabc7hWoPSVaRnX4ywfgzW8fHaIP+vuTzHr
+p7h5dnFNUuA5CdobDnIl0sz+ekLfCFuX4pCYNE6uR/58uknmXW0jfrK/WPU5T+F7
+sGDIsuJHAgMBAAECggEADIrkJx+/Q6r/kng+KoAnxJ9CK/OuoiavXmbzqZs2KqKD
+AkmDfBlMxIvNKm/0Lg3HqDe/YrbLohqq0paqGAZFBQuFU9hYOJESNFCZcZ8AZdHq
+I4UBT3fUGJ5Xw1W87Fpx+j7WH6ocJ5dYcW+glE8z7vw+cRVSiUp+Q2SxfbnAfK9c
+anqJLWA8pxkGRcXzE/tcB4JAkPsluWslFPDeKVOZ5/NRs8oE5ppmQKxqx2KFK7rh
+S0irhlJ/6t1jiI3t+syYXJILwbutJ9PUFaS1Uu3CErcvmBwWiLRZEkNa7xMlzEk+
+R2dplVhT0W++Ku1cjtU4q7V+paea+/YZj3mtos45YQKBgQDsFc4KM8/Lm146dNJX
+TOK1pDjZD5rfEpgtHCEm6dBRbueOYjb/D1Lo/JU4L6Yl2fGsJNtTX4a8i38nxTuI
+6b+SEQoLinEyr8JQtBFMvU4vYOIiA5oCHaZIXn0WLLFbUBkOhq/dXC4xDT6MOyNd
+2rDTSwvLqVE8K8sbupcvRP/RLwKBgQDWKVayVKGHz3cT+YyPhGTD19yBM0w6AGBR
+MLNKdKek7/BnKXe009fxDg/gCtGUBmE+umFbEBLStg7zD31JXLm5/LyT2NBkJYRl
+neO9UW8tWbnL6DOGgNvQTqDN650Od39R8rVoRSH4H4az6A/B1qrJReyrGw7xDXOz
+0eAq9vnKaQKBgH1IDPDJEepAZr6qo7yEJoKxxSEa8NqT6YF2vfkCdvPf4K1kXT75
+CMxuzVjloEvR3je1z1XtCXkgpbebKL69HFYNCMGbE/sL3hgplkyc4NKvnRDjzGR3
+C3i3+7U6vltwo/tbahQUCMcq+hg8gcYaeV+HIZlQHrXJn5z1ZalF+mMtAoGAKVgZ
+sJu+A2X96xFGHX7FpTlLDHZGxPvFnGb2de1HYAQiOQg8X+B108ePMQVlqFoC9AUv
+PlFAEQWspSfcXAlWoZ01GqXEtVC42pU8nhPWjr6/q6nMKK8/wFstmBNgYqaXIc7l
+TpfqEuijLKAkSpuSpQCmy/GRVN/v8ksWJ7U+S+ECgYB+e/GAdxHOdMGOFbrqZ3Dx
+jmPshaFFj/3UEsBZ6lBBTbdlMI7wFrSsqxCe1KGh0yG2GnOXE2useggeJyDVuaEY
+7/CNalD9w158WS9Zb7pPOm6QQpKUeIEXvpQbKi6FjKZKaFlUDk2auFT+d1lOga0T
+QRowjmcym1p+moKlqdiXGw==
+-----END PRIVATE KEY-----
diff --git a/xinelu-admin/src/main/resources/yiluyoupin_apiclient_key.pem b/xinelu-admin/src/main/resources/yiluyoupin_apiclient_key.pem
new file mode 100644
index 0000000..cf65f27
--- /dev/null
+++ b/xinelu-admin/src/main/resources/yiluyoupin_apiclient_key.pem
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC3rkr2Mp+Xb31y
+xfTOJPSmjQkG5/Eko6cyJcb8e6fGrrtsPVM9kExpVIor61oWTS1gyKYLwCQ92xmh
+qjKtazzd6KvqjKdxFknxxH9R1L+n7LnSEfK2KNaxIL17h2vdXOJatuinX0+7A9Ct
+5ZnKb5O5HVctQH0xCca6C6yyuF0q11BFquKyGPVwhqVwQnt+qIeQ/VCKFD5AYf1r
+ebkaHwKCg0rbzPFWeZfVI0z3j6M71DLxdIHV40xDn31ygQYlBeuTOUxFvKnri8m+
+BalcSUhocS9VAIyuPyDXCAdujm3hKz/WgqVtvgB3OOiIeGVppbgDlW+JWgR7lizM
+TzMYfhjPAgMBAAECggEBAJbB6SjVOAO1MEOpklo4Hs0saMJQUK3/3FTeiMnmPDho
+ZdBbLR0UeILjLl0J2HEBe0M6rH5sf9J9KDZ2WQ3ZPKXuOFxUgYHiB2L2IoHpmjyb
+oZB3xrwYHM5Yzuy6o5+Wgvptsdrd8bTPVtHD50wt9BM1r72mdppvKbq9pksx4tYr
+apw4WXfjO2zbdOngY4T5pCk5NZgXrlBfY0/vXsP/3SR+52KXGre/lSt35A4SjNe6
+voI1vZLDNlqzRaEZqBC0tLyvMH3NaYpRhwyEHtoABE9AQvVaQNt+fN1qhbhjtVdQ
+lR64Dqdc6jjIhuUhs1umYswf2umA3duZox8RTLZo1UECgYEA4oM2gLsX7dVNiDI4
+bZsMBdm8cb+N3/npiZBlDL9UL4tWCzLQP8sR/HJH3OZHQ1iLk+7QXi2g0YR5VtNx
+tLvECK1+Cd3sGt2zyFcrSpeYAnvbsMqB9F/K3grCCnvzKKmHJS27c9EVGr+sRTbx
+6hSqQyEAYTP1yRLnLVmWzkCBXh8CgYEAz5eqFmfou3U7B04tK739HTJGAaHTxVAR
+C4u4x0HGUP+NhPKZzySc70vWHoNgyP/QBUgzf5gTEnGCJ7Rk6Y2YZxCLyPksEDFc
+meW9ENSOQMwTWM1PAF+XLr4wXbyojMqlI7vWimTMOPK7WMVt4jYCoaN9lBS+McYj
+e1ZpB5yEj1ECgYEAiSXLXVxq2604GYvW0L59JBm22OSTwZZuycUs+e/qyDLEcVld
+8BJDnKeRTXX8lhFJydNiRHO6GMHuOh0ijrzVsC9jzhOZvpaYIWhuJObuuipGVZ/3
+2YAatCCtZm2wR+GFm4Q6KKDi92QwqWPgS8whXy3fLfupCQsyACprfgxeiB8CgYBF
+pfjm843d9wMK/GujVWbquMdMHONUO/y8BvDDyYmj+1mb1VlNaldM4gDA1AtQ5KMC
+YqsEkB01/udQMvH4eg075w0/LHpgJG+RIsdAMlBX5SBIlvl+gpPSlvTbPkS+l+64
+AnmEjTUHlkjNC9BGKSDQ4m1rlVoKkROuedtbNmQzQQKBgQCQdmmWy2Nr9NRmy5+r
+3FKymUVGujww+R7IiFGnFiBBhec8hUPaBp1xG5d8XVIcLt6nleOX5ZunXBwTOmp6
+XH6tQuup+hjFiNpRLmbVkTv8uQVy5sWEqiGp0i7Jhb+0QEOSEshOr8sQDDAFwWXl
+FyCbC1amAeC1i1knzGrNOdppUw==
+-----END PRIVATE KEY-----
diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/LogisticsConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/LogisticsConfig.java
new file mode 100644
index 0000000..af39e48
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/config/LogisticsConfig.java
@@ -0,0 +1,23 @@
+package com.xinelu.common.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description 快递鸟物流接口配置参数类
+ * @Author 纪寒
+ * @Date 2022-11-01 13:30:47
+ * @Version 1.0
+ */
+@Data
+@Component
+@ConfigurationProperties(prefix = "logistics-config")
+public class LogisticsConfig {
+
+ private String eBusinessId;
+
+ private String apiKey;
+
+ private String expressBirdUrl;
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/NurseAppletChatConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/NurseAppletChatConfig.java
deleted file mode 100644
index eb05253..0000000
--- a/xinelu-common/src/main/java/com/xinelu/common/config/NurseAppletChatConfig.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.xinelu.common.config;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.stereotype.Component;
-
-/**
- * 护理员小程序配置类
- *
- * @author ljh
- * @version 1.0
- * Create by 2023/3/29 15:40
- */
-@Data
-@Component
-@ConfigurationProperties(prefix = "nurse-applet-chat-config")
-public class NurseAppletChatConfig {
-
- /**
- * 小程序id
- */
- private String appletId;
-
- /**
- * 小程序secret
- */
- private String secret;
-
- /**
- * 返回国家地区语言版本,zh_CN 简体,zh_TW 繁体,en 英语
- */
- private String lang;
-
- /**
- * 授权类型
- */
- private String grantType;
-
- /**
- * 微信小程序事件回调令牌
- */
- private String token;
-
- /**
- * 微信小程序事件回调消息加密密钥
- */
- private String encodingAesKey;
-
- /**
- * 护理站运营人员-服务派单通知-模板id
- */
- private String serviceDispatchOperationsTemplateId;
-
- /**
- * 护理站运营人员-接单提醒-模板id
- */
- private String receivingOrdersOperationsTemplateId;
-
- /**
- * 护理站运营人员-师傅拒绝接单通知-模板id
- */
- private String refusalOrdersOperationsTemplateId;
-
- /**
- * 护理站运营人员和护理员-订单回池通知-模板id
- */
- private String overtimeOrdersOperationsTemplateId;
-
- /**
- * 护理站运营人员-订单完成通知-模板id
- */
- private String orderCompletionOperationsTemplateId;
-
- /**
- * 护理员-接单提醒-模板id
- */
- private String receivingOrdersNurseTemplateId;
-
-}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/WeChatPaymentUrlConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/WeChatPaymentUrlConfig.java
new file mode 100644
index 0000000..efe2237
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/config/WeChatPaymentUrlConfig.java
@@ -0,0 +1,35 @@
+package com.xinelu.common.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description 微信支付接口地址
+ * @Author 纪寒
+ * @Date 2022-10-17 17:56:25
+ * @Version 1.0
+ */
+@Component
+@Data
+@ConfigurationProperties(prefix = "we-chat-payment-url-config")
+public class WeChatPaymentUrlConfig {
+
+ private String jsapiPalceOrderUrl;
+
+ private String queryOrderNoUrl;
+
+ private String queryMchIdUrl;
+
+ private String closeOrderUrl;
+
+ private String refundApplyUrl;
+
+ private String refundQueryOrderUrl;
+
+ private String tradeApplyBillUrl;
+
+ private String capitalApplyBillUrl;
+
+ private String appPlaceOrderUrl;
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java
index 84f5a8f..5b5aa84 100644
--- a/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java
+++ b/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java
@@ -101,6 +101,11 @@ public class XinELuConfig {
*/
public String rightEyePitureUrl;
+ /**
+ * 阿尔兹海默症筛查结果文件地址
+ */
+ private String alzheimerFileUrl;
+
/**
* 修改会员App用户头像上传
*/
@@ -653,4 +658,12 @@ public class XinELuConfig {
public void setRightEyePitureUrl(String rightEyePitureUrl) {
this.rightEyePitureUrl = rightEyePitureUrl;
}
+
+ public String getAlzheimerFileUrl() {
+ return alzheimerFileUrl;
+ }
+
+ public void setAlzheimerFileUrl(String alzheimerFileUrl) {
+ this.alzheimerFileUrl = alzheimerFileUrl;
+ }
}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/XylWeChatPaymentConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/XylWeChatPaymentConfig.java
new file mode 100644
index 0000000..097ef16
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/config/XylWeChatPaymentConfig.java
@@ -0,0 +1,27 @@
+package com.xinelu.common.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description 新医路商户号微信支付参数配置类
+ * @Author 纪寒
+ * @Date 2022-10-17 16:55:04
+ * @Version 1.0
+ */
+@Data
+@Component
+@ConfigurationProperties(prefix = "xyl-we-chat-config")
+public class XylWeChatPaymentConfig {
+
+ private String xylMchId;
+
+ private String xylMchSerialNo;
+
+ private String xylPrivateKeyPath;
+
+ private String xylPaymentKey;
+
+ private String xylWeChatNotifyUrl;
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/YlypWeChatPaymentConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/YlypWeChatPaymentConfig.java
new file mode 100644
index 0000000..ea976a4
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/config/YlypWeChatPaymentConfig.java
@@ -0,0 +1,27 @@
+package com.xinelu.common.config;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.stereotype.Component;
+
+/**
+ * @Description 医路优品商户号微信支付参数配置类
+ * @Author 纪寒
+ * @Date 2022-10-17 16:55:04
+ * @Version 1.0
+ */
+@Data
+@Component
+@ConfigurationProperties(prefix = "ylyp-we-chat-config")
+public class YlypWeChatPaymentConfig {
+
+ private String ylypMchId;
+
+ private String ylypMchSerialNo;
+
+ private String ylypPrivateKeyPath;
+
+ private String ylypPaymentKey;
+
+ private String ylypWeChatNotifyUrl;
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/constant/Constants.java b/xinelu-common/src/main/java/com/xinelu/common/constant/Constants.java
index 616ba50..fc17fba 100644
--- a/xinelu-common/src/main/java/com/xinelu/common/constant/Constants.java
+++ b/xinelu-common/src/main/java/com/xinelu/common/constant/Constants.java
@@ -283,6 +283,10 @@ public class Constants {
*/
public static final String RIGHT_EYE_PICTURE_URL = "rightEyePitureUrl";
+ /**
+ * 阿尔兹海默症结果文件地址
+ */
+ public static final String ALZHEIMER_FILE_URL = "alzheimerFileUrl";
/**
* 护理站模板信息下载
*/
diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/PayTypeEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/PayTypeEnum.java
new file mode 100644
index 0000000..4679dbd
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/enums/PayTypeEnum.java
@@ -0,0 +1,30 @@
+package com.xinelu.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @Description 支付了类型枚举
+ * @Author 纪寒
+ * @Date 2022-10-18 15:16:02
+ * @Version 1.0
+ */
+@Getter
+public enum PayTypeEnum {
+
+ /**
+ * 微信
+ */
+ WECHAT_PAY("WECHAT_PAY"),
+
+ /**
+ * 支付宝
+ */
+ ALI_PAY("ALI_PAY"),
+ ;
+
+ final private String info;
+
+ PayTypeEnum(String info) {
+ this.info = info;
+ }
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/PaymentMerchantTypeEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/PaymentMerchantTypeEnum.java
new file mode 100644
index 0000000..9a2f4d6
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/enums/PaymentMerchantTypeEnum.java
@@ -0,0 +1,30 @@
+package com.xinelu.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @Description 支付账户枚举
+ * @Author 纪寒
+ * @Date 2022-10-20 17:48:32
+ * @Version 1.0
+ */
+@Getter
+public enum PaymentMerchantTypeEnum {
+
+ /**
+ * 新医路
+ */
+ XINYILU("XINYILU"),
+
+ /**
+ * 医路优品
+ */
+ YILUYOUPIN("YILUYOUPIN"),
+ ;
+
+ final private String info;
+
+ PaymentMerchantTypeEnum(String info) {
+ this.info = info;
+ }
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/RefundStatusEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/RefundStatusEnum.java
new file mode 100644
index 0000000..7df7d78
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/enums/RefundStatusEnum.java
@@ -0,0 +1,41 @@
+package com.xinelu.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @Description 微信退款通知枚举
+ * @Author 纪寒
+ * @Date 2022-10-25 13:12:03
+ * @Version 1.0
+ */
+@Getter
+public enum RefundStatusEnum {
+ /**
+ * 退款成功
+ */
+ SUCCESS("SUCCESS"),
+
+ /**
+ * 退款关闭
+ */
+ CLOSED("CLOSED"),
+
+ /**
+ * 退款处理中
+ */
+ PROCESSING("PROCESSING"),
+
+ /**
+ * 退款异常,退款到银行发现用户的卡作废或者冻结了,
+ * 导致原路退款银行卡失败,可前往【商户平台—>交易中心】,手动处理此笔退款
+ */
+ ABNORMAL("ABNORMAL"),
+
+ ;
+
+ final private String info;
+
+ RefundStatusEnum(String info) {
+ this.info = info;
+ }
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/RefundTypeEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/RefundTypeEnum.java
new file mode 100644
index 0000000..bc049d3
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/enums/RefundTypeEnum.java
@@ -0,0 +1,30 @@
+package com.xinelu.common.enums;
+
+import lombok.Getter;
+
+/**
+ * @Description 退款类型枚举
+ * @Author 纪寒
+ * @Date 2022-10-18 15:16:02
+ * @Version 1.0
+ */
+@Getter
+public enum RefundTypeEnum {
+
+ /**
+ * 微信
+ */
+ WE_CHAT("WE_CHAT"),
+
+ /**
+ * 支付宝
+ */
+ ALI_PAY("ALI_PAY"),
+ ;
+
+ final private String info;
+
+ RefundTypeEnum(String info) {
+ this.info = info;
+ }
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/WeChatTradeStateEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/WeChatTradeStateEnum.java
new file mode 100644
index 0000000..009a8b5
--- /dev/null
+++ b/xinelu-common/src/main/java/com/xinelu/common/enums/WeChatTradeStateEnum.java
@@ -0,0 +1,52 @@
+package com.xinelu.common.enums;
+
+import lombok.Getter;
+
+/**
+ * 微信支付回调通知状态
+ */
+@Getter
+public enum WeChatTradeStateEnum {
+
+ /**
+ * 支付成功
+ */
+ SUCCESS("SUCCESS"),
+
+ /**
+ * 未支付
+ */
+ NOTPAY("NOTPAY"),
+
+ /**
+ * 已关闭
+ */
+ CLOSED("CLOSED"),
+
+ /**
+ * 转入退款
+ */
+ REFUND("REFUND"),
+
+ /**
+ * 已撤销(付款码支付)
+ */
+ REVOKED("REVOKED"),
+
+ /**
+ * 用户支付中(付款码支付)
+ */
+ USERPAYING("USERPAYING"),
+
+ /**
+ * 支付失败(其他原因,如银行返回失败)
+ */
+ PAYERROR("PAYERROR")
+ ;
+
+ final private String info;
+
+ WeChatTradeStateEnum(String info) {
+ this.info = info;
+ }
+}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java
index b432747..8f25260 100644
--- a/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java
+++ b/xinelu-common/src/main/java/com/xinelu/common/utils/file/FileUploadUtils.java
@@ -10,6 +10,12 @@ import com.xinelu.common.utils.DateUtils;
import com.xinelu.common.utils.StringUtils;
import com.xinelu.common.utils.uuid.Seq;
import com.xinelu.common.utils.uuid.UUID;
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.io.OutputStream;
+import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.FilenameUtils;
import org.springframework.web.multipart.MultipartFile;
@@ -352,4 +358,27 @@ public class FileUploadUtils {
return StringUtils.format("{}.{}",
FilenameUtils.getBaseName(file.getOriginalFilename()), getExtension(file));
}
+
+ /**
+ * 读取文件
+ *
+ * @param filePath 文件地址
+ * @param response 响应流
+ * @return void
+ * @author gaoyu
+ * @date 2022-01-05 11:43
+ */
+ @SuppressWarnings("all")
+ public static void read(String filePath, HttpServletResponse response) {
+ File file = new File(filePath);
+ try (InputStream in = new BufferedInputStream(new FileInputStream(file));
+ OutputStream os = new BufferedOutputStream(response.getOutputStream())) {
+ byte[] buffer = new byte[in.available()];
+ in.read(buffer);
+ os.write(buffer);
+ os.flush();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
}
diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/file/MimeTypeUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/file/MimeTypeUtils.java
index 24e6ba6..d8f0cf6 100644
--- a/xinelu-common/src/main/java/com/xinelu/common/utils/file/MimeTypeUtils.java
+++ b/xinelu-common/src/main/java/com/xinelu/common/utils/file/MimeTypeUtils.java
@@ -29,6 +29,8 @@ public class MimeTypeUtils {
public static final String[] VIDEO_EXTENSION = {"mp4", "avi", "rmvb"};
+ public static final String[] FILE_EXTENSION = {"doc", "docx", "pdf"};
+
public static final String[] DEFAULT_ALLOWED_EXTENSION = {
// 图片
"bmp", "gif", "jpg", "jpeg", "png",
diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/http/HttpUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/http/HttpUtils.java
index 216d1d1..f22b454 100644
--- a/xinelu-common/src/main/java/com/xinelu/common/utils/http/HttpUtils.java
+++ b/xinelu-common/src/main/java/com/xinelu/common/utils/http/HttpUtils.java
@@ -16,6 +16,7 @@ import org.apache.http.HttpEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import javax.net.ssl.*;
+import javax.servlet.http.HttpServletRequest;
import java.io.*;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
@@ -253,4 +254,35 @@ public class HttpUtils {
}
return result;
}
+
+ /**
+ * 将通知参数转化为字符串
+ *
+ * @param request 请求信息
+ * @return 请求参数信息
+ */
+ public static String readRequestData(HttpServletRequest request) {
+ BufferedReader br = null;
+ try {
+ StringBuilder result = new StringBuilder();
+ br = request.getReader();
+ for (String line; (line = br.readLine()) != null; ) {
+ if (result.length() > 0) {
+ result.append("\n");
+ }
+ result.append(line);
+ }
+ return result.toString();
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ } finally {
+ if (br != null) {
+ try {
+ br.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ }
}
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
index 8eb0e0c..1a5eccc 100644
--- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentPatientInfoMapper.java
@@ -95,5 +95,12 @@ public interface ResidentPatientInfoMapper {
**/
PatientInfo getByCardNo(String cardNo);
- int selectPatientInfoByPhone(String phone);
+ List selectPatientInfoByPhone(String phone);
+ /**
+ *根据用户编号查询
+ *
+ *@param patientCode 用户编号
+ *@return PatientInfo
+ **/
+ PatientInfo getPatientInfoByPatientCode(String patientCode);
}
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java
new file mode 100644
index 0000000..8f40a48
--- /dev/null
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java
@@ -0,0 +1,33 @@
+package com.xinelu.familydoctor.applet.pojo.body;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author mengkuiliang
+ * @Description base64文件上传请求类
+ * @Date 2023-10-12 012 11:37
+ * @Param
+ * @return
+ **/
+@ApiModel("base64文件上传请求类")
+@Data
+public class FileUploadBody {
+
+ @ApiModelProperty("文件(base64)")
+ private String file;
+
+ @ApiModelProperty("文件类型编码")
+ private String code;
+
+ @ApiModelProperty("文件名称")
+ private String originalFilename;
+
+ @ApiModelProperty("文件类型")
+ private String contentType;
+
+ @ApiModelProperty("文件后缀")
+ private String suffix;
+
+}
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
index fb8ffd8..9918d0b 100644
--- 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
@@ -1,10 +1,14 @@
package com.xinelu.familydoctor.applet.pojo.body;
+import com.xinelu.familydoctor.applet.pojo.dto.CrowdDto;
+import com.xinelu.familydoctor.applet.pojo.dto.PackageDto;
+import com.xinelu.familydoctor.applet.pojo.vo.CrowdVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
+import java.util.List;
/**
* @Author mengkuiliang
@@ -133,27 +137,39 @@ public class ResidentSignApplyBody {
/**
* 所属人群编号
*/
- @ApiModelProperty(value = "所属人群编号", required = true)
+ @ApiModelProperty(value = "所属人群编号", hidden = true)
private String crowdsNo;
/**
* 所属人群名称
*/
- @ApiModelProperty(value = "所属人群名称", required = true)
+ @ApiModelProperty(value = "所属人群名称", hidden = true)
private String crowdsName;
+ /**
+ * 人群对象集合
+ */
+ @ApiModelProperty(value = "人群对象集合", required = true)
+ private List crowdList;
+
/**
* 选择服务包编号
*/
- @ApiModelProperty(value = "选择服务包编号", required = true)
+ @ApiModelProperty(value = "选择服务包编号", hidden = true)
private String packagesNo;
/**
* 选择服务包名称
*/
- @ApiModelProperty(value = "选择服务包名称", required = true)
+ @ApiModelProperty(value = "选择服务包名称", hidden = true)
private String packagesName;
+ /**
+ * 服务包对象集合
+ */
+ @ApiModelProperty(value = "服务包对象集合", required = true)
+ private List packageList;
+
/**
* 签约机构编号
*/
@@ -196,6 +212,9 @@ public class ResidentSignApplyBody {
@ApiModelProperty(value = "签约时间", required = true)
private Date signTime;
+ @ApiModelProperty("签约年数")
+ private Integer signYears;
+
/**
* 居民头像照片
*/
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/CrowdDto.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/CrowdDto.java
new file mode 100644
index 0000000..acd87ac
--- /dev/null
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/CrowdDto.java
@@ -0,0 +1,30 @@
+package com.xinelu.familydoctor.applet.pojo.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author mengkuiliang
+ * @Description 人群对象dto
+ * @Date 2023-10-11 011 16:35
+ * @Param
+ * @return
+ **/
+@ApiModel("人群对象dto")
+@Data
+public class CrowdDto {
+
+ /**
+ * 人群编号
+ */
+ @ApiModelProperty("人群编号")
+ private String crowdNo;
+
+ /**
+ * 人群名称
+ */
+ @ApiModelProperty("人群名称")
+ private String crowdName;
+
+}
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PackageDto.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PackageDto.java
new file mode 100644
index 0000000..36bd9a9
--- /dev/null
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PackageDto.java
@@ -0,0 +1,33 @@
+package com.xinelu.familydoctor.applet.pojo.dto;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * @Author mengkuiliang
+ * @Description 服务包Dto
+ * @Date 2023-10-11 011 16:37
+ * @Param
+ * @return
+ **/
+@ApiModel("服务包Dto")
+@Data
+public class PackageDto {
+
+ /**
+ * 服务包业务主键
+ */
+ @ApiModelProperty(value = "服务包业务主键")
+ private String packageNo;
+
+ /**
+ * 服务包名称
+ */
+ @ApiModelProperty(value = "服务包名称")
+ private String packageName;
+
+}
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
index 730d83f..e0701d7 100644
--- 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
@@ -205,6 +205,9 @@ public class ResidentSignApplyEntity implements Serializable {
@ApiModelProperty(value = "签约时间")
private Date signTime;
+ @ApiModelProperty("签约年数")
+ private Integer signYears;
+
/**
* 居民头像照片
*/
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PackageQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PackageQuery.java
new file mode 100644
index 0000000..e6acd2b
--- /dev/null
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PackageQuery.java
@@ -0,0 +1,32 @@
+package com.xinelu.familydoctor.applet.pojo.query;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Author mengkuiliang
+ * @Description 查询服务包对象(根据人群)
+ * @Date 2023-10-11 011 16:15
+ * @Param
+ * @return
+ **/
+@ApiModel("查询服务包对象(根据人群)")
+@Data
+public class PackageQuery {
+
+ /**
+ * 机构编号
+ */
+ @ApiModelProperty(value = "机构编号", required = true)
+ private String orgNo;
+
+ /**
+ * 人群编号集合
+ */
+ @ApiModelProperty(value = "人群编号集合", required = true)
+ private List crowdNoList;
+
+}
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
index f78efd8..33f137e 100644
--- 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
@@ -201,6 +201,9 @@ public class ResidentSignApplyVo extends BaseEntity {
@JsonFormat(pattern ="yyyy-MM-dd", timezone = "GMT+8")
private Date signTime;
+ @ApiModelProperty("签约年数")
+ private Integer signYears;
+
/**
* 居民签字
*/
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDataVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDataVo.java
new file mode 100644
index 0000000..a8d677e
--- /dev/null
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDataVo.java
@@ -0,0 +1,64 @@
+package com.xinelu.familydoctor.applet.pojo.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Author mengkuiliang
+ * @Description 签约信息详情类
+ * @Date 2023-10-12 012 15:02
+ * @Param
+ * @return
+ **/
+@Data
+public class SignInfoDataVo {
+
+ /** 签约对象 */
+ @ApiModelProperty(value = "签约对象")
+ private SignInfoDetailVo signInfo;
+
+ /** 基础服务包名称 */
+ @ApiModelProperty(value = "基础服务包名称")
+ private String basePackagesName;
+
+ /** 个性化服务包名称 */
+ @ApiModelProperty(value = "个性化服务包名称")
+ private String specialPackagesName;
+
+ /** 个性化服务包内容 */
+ @ApiModelProperty(value = "个性化服务包内容")
+ private List specialPackageContentList;
+
+ /** 是否存在履约记录 */
+ @ApiModelProperty(value = "是否存在履约记录")
+ private Boolean existPerformance;
+
+ /** 协议模版内容对象 */
+ @ApiModelProperty(value = "协议模版内容对象")
+ private ProtocolContentVo protocolContent;
+ /**
+ * 人群分类1:一般人群2:次重点人群3:重点人群9:未分类
+ */
+ @ApiModelProperty(value = "人群分类1:一般人群2:次重点人群3:重点人群9:未分类")
+ private String category;
+
+ /**
+ * 居民签名照片Base64
+ */
+ @ApiModelProperty(value = "居民签名照片Base64")
+ private String residentBase64;
+
+ /**
+ * 医生签名照片Base64
+ */
+ @ApiModelProperty(value = "医生签名照片Base64")
+ private String doctorBase64;
+
+ /**
+ * 机构公章照片Base64
+ */
+ @ApiModelProperty(value = "机构公章照片Base64")
+ private String orgBase64;
+}
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
index 715033c..9128d8c 100644
--- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentPatientInfoServiceImpl.java
@@ -152,7 +152,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
if (ObjectUtils.isNotEmpty(body.getCardNo())) {
// 修改
if(!StringUtils.isBlank(body.getPatientCode())) {
- PatientInfo patientInfo = residentPatientInfoMapper.getByCardNo(body.getCardNo());
+ PatientInfo patientInfo = residentPatientInfoMapper.getPatientInfoByPatientCode(body.getPatientCode());
if (ObjectUtils.isNotEmpty(patientInfo)) {
BeanUtils.copyBeanProp(patientInfo, body);
if (body.getDiseaseList() != null) {
@@ -336,12 +336,22 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}
+ //获取手机号
String code;
+ String cityCode = "";
AppletPhoneVO phone = getPhone(phoneCode);
String phoneNumber = phone.getPhoneInfo().getPhoneNumber();
HashMap.put("phone",phoneNumber);
- code = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber) == 0 ? "0" : "1";
+ List infoList = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber);
+ code = infoList.size()== 0 ? "0" : "1";
+ //返回绑定城市
+ if ("1".equals(code)){
+ for (PatientInfo patientInfo : infoList) {
+ cityCode = patientInfo.getCityCode();
+ }
+ }
HashMap.put("code",code);
+ HashMap.put("cityCode",cityCode);
return HashMap;
}
}
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
index eb23725..0c6a1f9 100644
--- 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
@@ -10,6 +10,8 @@ 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.dto.CrowdDto;
+import com.xinelu.familydoctor.applet.pojo.dto.PackageDto;
import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo;
import com.xinelu.familydoctor.applet.pojo.entity.ResidentSignApplyEntity;
import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery;
@@ -25,6 +27,7 @@ import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.stream.Collectors;
/**
* @Author mengkuiliang
@@ -81,6 +84,13 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService
if(StringUtils.isBlank(entity.getNation())) {
entity.setNation("1");
}
+ if(entity.getSignYears() == null || entity.getSignYears() <= 0) {
+ entity.setSignYears(1);
+ }
+ entity.setCrowdsNo(body.getCrowdList().stream().map(CrowdDto::getCrowdNo).collect(Collectors.joining(",")));
+ entity.setCrowdsName(body.getCrowdList().stream().map(CrowdDto::getCrowdName).collect(Collectors.joining(",")));
+ entity.setPackagesNo(body.getPackageList().stream().map(PackageDto::getPackageNo).collect(Collectors.joining(",")));
+ entity.setPackagesName(body.getPackageList().stream().map(PackageDto::getPackageName).collect(Collectors.joining(",")));
residentSignApplyMapper.insert(entity);
}
@@ -192,7 +202,7 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService
// 查询未完成的签约申请
ResidentSignApplyVo signBookingInfoVo = getSignBookingByIdentity(identity);
if (signBookingInfoVo != null) {
- retMap.put("code", 01);
+ retMap.put("code", "01");
retMap.put("info", DateUtils.parseDateToStr("yyyy年MM月dd日", signBookingInfoVo.getSignTime()) + "已在【" + signBookingInfoVo.getOrgName() + "】【" + signBookingInfoVo.getTeamName() + "】【" + signBookingInfoVo.getUserName() + "】申请签约");
return retMap;
}
@@ -205,11 +215,11 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService
// 已签约
if (jsonObject.containsKey("data") && jsonObject.get("data") != null) {
SignInfoDetailVo signInfoDetailVo = JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDetailVo.class);
- retMap.put("code", 02);
+ retMap.put("code", "02");
retMap.put("info", DateUtils.parseDateToStr("yyyy年MM月dd日", signInfoDetailVo.getSignTime()) + "已在【" + signInfoDetailVo.getOrgName() + "】【" + signInfoDetailVo.getTeamName() + "】【" + signInfoDetailVo.getUserName() + "】签约");
return retMap;
} else {
- retMap.put("code", 0);
+ retMap.put("code", "0");
retMap.put("info", "未签约");
}
return retMap;
diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/utils/AppletAccessTokenUtils.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/utils/AppletAccessTokenUtils.java
index b126972..24318f5 100644
--- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/utils/AppletAccessTokenUtils.java
+++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/utils/AppletAccessTokenUtils.java
@@ -1,7 +1,6 @@
package com.xinelu.familydoctor.applet.utils;
import com.xinelu.common.config.AppletChatConfig;
-import com.xinelu.common.config.NurseAppletChatConfig;
import com.xinelu.common.constant.Constants;
import com.xinelu.common.entity.AppletAccessToken;
import com.xinelu.common.exception.ServiceException;
@@ -27,8 +26,7 @@ public class AppletAccessTokenUtils {
private RedisTemplate redisTemplate;
@Resource
private AppletChatConfig appletChatConfig;
- @Resource
- private NurseAppletChatConfig nurseAppletChatConfig;
+
/**
* 返回成功状态码
*/
@@ -65,34 +63,4 @@ public class AppletAccessTokenUtils {
return accessToken;
}
- /**
- * 护理员小程序获取小程序AccessToken方法
- *
- * @return 小程序的AccessToken
- */
- public String getPersonAppletAccessToken() {
- String accessToken;
- String accessTokenKey = Constants.NURSE_STATION_PERSON_APPLET_ACCESS_TOKEN + "accessToken";
- //从Redis中取出accessToken
- Object object = redisTemplate.opsForValue().get(accessTokenKey);
- if (Objects.isNull(object)) {
- //没有,获取accessToken
- AppletAccessToken appletAccessToken = AppletChatUtil.getAppletAccessToken(nurseAppletChatConfig.getAppletId(), nurseAppletChatConfig.getSecret());
- if (Objects.isNull(appletAccessToken)) {
- throw new ServiceException("获取微信小程序accessToken信息失败");
- }
- if (Objects.nonNull(appletAccessToken.getErrcode()) && appletAccessToken.getErrcode() != SUCCESS_CODE) {
- throw new ServiceException("获取微信小程序accessToken信息失败,失败信息为:" + appletAccessToken.getErrmsg(), 201);
- }
- if (StringUtils.isBlank(appletAccessToken.getAccessToken())) {
- throw new ServiceException("accessToken信息为空");
- }
- //存入Redis中
- redisTemplate.opsForValue().set(accessTokenKey, appletAccessToken.getAccessToken(), 3600, TimeUnit.SECONDS);
- accessToken = appletAccessToken.getAccessToken();
- } else {
- accessToken = (String) object;
- }
- return accessToken;
- }
}
\ No newline at end of file
diff --git a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
index 5574d49..f3bed34 100644
--- a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
+++ b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml
@@ -453,10 +453,15 @@
-