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..e25b5a8 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 @@ -32,24 +32,27 @@ public class ResidentServiceApplyController extends BaseController { @Resource private IResidentServiceAppletService residentServiceAppletService; - @ApiOperation("提交服务申请") + @ApiOperation("提交服务预约") @PostMapping("/save") public R save(@RequestBody ResidentServiceApplyBody body) { if (body == null || StringUtils.isBlank(body.getPackageNo()) || StringUtils.isBlank(body.getFormNo())) { return R.fail("请求参数不能为空"); } + if(StringUtils.isBlank(body.getIdentity())) { + return R.fail("居民身份证号不能为空"); + } residentServiceAppletService.insert(body); return R.ok(); } - @ApiOperation("取消服务申请") + @ApiOperation("取消服务预约") @GetMapping("/cancel/{bookingNo}") public R cancel(@PathVariable String bookingNo) { residentServiceAppletService.cancel(bookingNo); return R.ok(); } - @ApiOperation("服务申请列表") + @ApiOperation("服务预约列表") @PostMapping("/list") public TableDataInfo performanceBookingList(@RequestBody ApplyQuery query) { if (StringUtils.isBlank(query.getIdentity())) { @@ -59,11 +62,12 @@ public class ResidentServiceApplyController extends BaseController { startPage(); return getDataTable(residentServiceAppletService.findList(query)); } catch (Exception e) { + e.printStackTrace(); throw new ServiceException(e.getMessage()); } } - @ApiOperation("服务申请详情") + @ApiOperation("服务预约详情") @GetMapping("/detail/{bookingNo}") public R performanceBookingDetail(@PathVariable String bookingNo) { return R.ok(residentServiceAppletService.detail(bookingNo)); @@ -74,4 +78,19 @@ public class ResidentServiceApplyController extends BaseController { public R> getForm(@PathVariable String identity, String projectName, @RequestHeader("region") String region) { return R.ok(residentServiceAppletService.getForm(identity, projectName,region)); } + + @ApiOperation("服务记录列表") + @PostMapping("/record") + public TableDataInfo performanceBookingRecord(@RequestBody ApplyQuery query) { + if (StringUtils.isBlank(query.getIdentity())) { + throw new ServiceException("居民身份证号不能为空"); + } + try { + startPage(); + return getDataTable(residentServiceAppletService.record(query)); + } catch (Exception e) { + e.printStackTrace(); + throw new ServiceException(e.getMessage()); + } + } } 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..a4ec9c5 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.*; @@ -201,10 +203,10 @@ public class SignInfoController extends BaseController { return getDataTable(null, 0); } - @ApiOperation("获取签约协议内容") - @GetMapping("/getContent/{orgNo}") - public R getAreaById(@PathVariable String orgNo, @RequestHeader("region") String region) { - String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getContent/" + orgNo, null, String.class); + @ApiOperation(value = "获取签约协议模版内容", notes = "协议模版内容、机构公章照片base64、签约医生签名照片base64") + @GetMapping("/getContent/{userNo}") + public R getAreaById(@PathVariable String userNo, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getContent/" + userNo, null, String.class); JSONObject jsonObject = JSONObject.parseObject(result); if ("0".equals(jsonObject.get("code"))) { return R.fail(jsonObject.get("msg").toString()); @@ -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 2a6203c..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: 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/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/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-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentServiceApplyMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentServiceApplyMapper.java index e1d022b..c07948f 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentServiceApplyMapper.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/mapper/ResidentServiceApplyMapper.java @@ -89,6 +89,15 @@ public interface ResidentServiceApplyMapper { * @return void **/ void batchInsert(List entity); + + /** + * @Author mengkuiliang + * @Description 服务记录列表 + * @Date 2023-10-13 013 14:01 + * @Param [query] + * @return java.util.List + **/ + List getRecord(ApplyQuery query); } 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/ApplyQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ApplyQuery.java index 955f785..bd5d8e8 100644 --- 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 @@ -127,4 +127,10 @@ public class ApplyQuery { */ @ApiModelProperty(value = "数据范围过滤SQL", hidden = true) private String dataScope; + + /** + * 是否已评价(1: 是 2: 否) + */ + @ApiModelProperty(value = "是否已评价(1: 是 2: 否)") + private String isEvaluate; } 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/OrderEvaluateInfoVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrderEvaluateInfoVo.java new file mode 100644 index 0000000..528f2ec --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrderEvaluateInfoVo.java @@ -0,0 +1,91 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import com.xinelu.common.core.domain.BaseDomain; +import com.xinelu.manage.domain.orderevaluatepictureinfo.OrderEvaluatePictureInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 服务评价对象 + * @Date 2023-10-13 013 14:49 + * @Param + * @return + **/ +@Data +@ApiModel(value = "服务评价对象") +public class OrderEvaluateInfoVo extends BaseDomain { + /** + * 主键id + */ + private Long id; + + /** + * 会员id + */ + @ApiModelProperty(value = "会员id") + private Long patientId; + + /** + * 微信openid + */ + @ApiModelProperty(value = "微信openid") + private String openid; + + /** + * 微信unionid + */ + @ApiModelProperty(value = "微信unionid") + private String unionid; + + /** + * 订单编号 + */ + @ApiModelProperty(value = "订单编号") + private String orderNo; + + /** + * 服务编号 + */ + @ApiModelProperty(value = "服务编号") + private String serviceCode; + + /** + * 评价内容 + */ + @ApiModelProperty(value = "评价内容") + private String evaluateContent; + + /** + * 手机App:PHONE_APP,微信小程序:WE_CHAT_APPLET + */ + @ApiModelProperty(value = "手机App:PHONE_APP,微信小程序:WE_CHAT_APPLET") + private String evaluateChannel; + + /** + * 预约服务满意度,一般:COMMONLY,满意:SATISFIED,非常满意:VERY_SATISFIED,不满意(差):DISSATISFIED,非常不满意(非常差):VERY_DISSATISFIED + */ + @ApiModelProperty(value = "预约服务满意度,一般:COMMONLY,满意:SATISFIED,非常满意:VERY_SATISFIED,不满意(差):DISSATISFIED,非常不满意(非常差):VERY_DISSATISFIED") + private String evaluateSatisfaction; + + /** + * 商品订单综合评分,取值,1:代表1颗星,2:代表两颗星,3:代表三颗星,4:代表四颗星,5:代表五颗星 + */ + @ApiModelProperty(value = "商品订单综合评分,取值,1:代表1颗星,2:代表两颗星,3:代表三颗星,4:代表四颗星,5:代表五颗星") + private Integer compositeScore; + + /** + * 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR + */ + @ApiModelProperty(value = "订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR") + private String orderSource; + + /** + * 订单评价图片信息 + */ + @ApiModelProperty(value = "订单评价图片信息") + private List orderEvaluatePictureInfoList; +} 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 index bf712b8..9403648 100644 --- 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 @@ -43,4 +43,16 @@ public class ProtocolContentVo { */ @ApiModelProperty(value = "内容") private String content; + + /** + * 医生签名照片Base64 + */ + @ApiModelProperty(value = "医生签名照片Base64") + private String doctorBase64; + + /** + * 机构公章照片Base64 + */ + @ApiModelProperty(value = "机构公章照片Base64") + private String orgBase64; } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java index 14dce7d..608a42a 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; +import java.util.List; /** * @Author mengkuiliang @@ -93,14 +94,14 @@ public class ResidentServiceApplyVo { * 预约时间 */ @ApiModelProperty("预约时间") - @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date bookingTime; /** * 申请时间 */ @ApiModelProperty("申请时间") - @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date applyTime; /** @@ -113,14 +114,14 @@ public class ResidentServiceApplyVo { * 取消时间 */ @ApiModelProperty("取消时间") - @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date cancelTime; /** * 完成时间 */ @ApiModelProperty("完成时间") - @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date completeTime; /** @@ -139,7 +140,7 @@ public class ResidentServiceApplyVo { * 审批时间 */ @ApiModelProperty("审批时间") - @JsonFormat(pattern ="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date approvalTime; /** @@ -160,4 +161,10 @@ public class ResidentServiceApplyVo { @ApiModelProperty("评价编号") private String evaluateNo; + /** + * 服务评价对象 + */ + @ApiModelProperty("服务评价对象") + OrderEvaluateInfoVo orderEvaluateInfo; + } 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..b3b88b7 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDataVo.java @@ -0,0 +1,77 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +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; + + /** + * 服务包签约价格 + */ + @ApiModelProperty(value = "服务包签约价格") + private BigDecimal packSignCost; + + /** + * 签约周期(年) + */ + @ApiModelProperty(value = "签约周期(年)") + private Integer signYears; +} 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 index 0404b3a..7622cb6 100644 --- 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 @@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import java.math.BigDecimal; import java.util.Date; import java.util.List; diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentServiceAppletService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentServiceAppletService.java index f8893f5..51cc427 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentServiceAppletService.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentServiceAppletService.java @@ -105,4 +105,13 @@ public interface IResidentServiceAppletService { * @return java.lang.Object **/ List getForm(String identity, String projectName, String region); + + /** + * @Author mengkuiliang + * @Description 服务记录列表 + * @Date 2023-10-13 013 13:41 + * @Param [query] + * @return java.util.List + **/ + List record(ApplyQuery query); } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentServiceApplyServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentServiceApplyServiceImpl.java index 85007c0..388feea 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentServiceApplyServiceImpl.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentServiceApplyServiceImpl.java @@ -88,6 +88,9 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe // 审批状态0:待批准 1:已同意 2:已拒绝 entity.setApprovalStatus("0"); entity.setBookingNo(IdUtils.simpleUUID()); + if(StringUtils.isBlank(entity.getServiceWay())) { + entity.setServiceWay("2"); + } residentServiceApplyMapper.insert(entity); } @@ -325,6 +328,24 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe } return projectList; } + + /** + * @Author mengkuiliang + * @Description 服务记录列表 + * @Date 2023-10-13 013 13:56 + * @Param [query] + * @return java.util.List + **/ + @Override + public List record(ApplyQuery query) { + if (query.getStartDate() != null) { + query.setStartDate(DateUtils.parseDate(DateUtils.parseDateToStr("yyyy-MM-dd 00:00:00", query.getStartDate()))); + } + if (query.getEndDate() != null) { + query.setEndDate(DateUtils.parseDate(DateUtils.parseDateToStr("yyyy-MM-dd 23:59:59", query.getEndDate()))); + } + return residentServiceApplyMapper.getRecord(query); + } } 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/resources/mapper/sign/ResidentServiceApplyMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentServiceApplyMapper.xml index 9246de3..ed35592 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentServiceApplyMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentServiceApplyMapper.xml @@ -32,6 +32,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + id,booking_no,patient_id, resident_name,identity,package_no, @@ -44,7 +94,7 @@ remark - + s.id,s.booking_no,s.patient_id, s.resident_name,s.identity,s.package_no, s.package_name,s.form_no,s.form_name, @@ -56,6 +106,16 @@ s.remark + + oei.id, oei.openid, oei.unionid, oei.order_no, oei.service_code, + oei.evaluate_content, oei.evaluate_channel, oei.evaluate_satisfaction, oei.composite_score, oei.order_source, + oei.create_by, oei.create_time, oei.update_by, oei.update_time + + + + oepi.id, oepi.order_evaluate_id, oepi.evaluate_picture_url, oepi.create_by, oepi.create_time, oepi.update_by, oepi.update_time + + booking_no,patient_id, resident_name,identity,package_no, @@ -190,7 +250,7 @@ + + + update resident_service_apply diff --git a/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml index f8d8632..d1116c1 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml @@ -36,6 +36,7 @@ + @@ -61,7 +62,7 @@ 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, + sign_time,sign_years,resident_autograph_path,relationship_with_householder, householder_name,householder_identity,apply_time, booking_status,cancel_time,approval_status, refuse_reason,approval_time,remark @@ -78,7 +79,7 @@ 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.sign_time,p.sign_years,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 @@ -148,6 +149,9 @@ sign_time, + + sign_years, + resident_autograph_path, resident_avatar, @@ -235,6 +239,9 @@ #{signTime}, + + #{signYears}, + #{residentAutographPath}, #{residentAvatar}, diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java index f6ee977..01dcb6d 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java @@ -2,16 +2,18 @@ package com.xinelu.applet.controller.appletscreeningrecord; import com.alibaba.fastjson2.JSONObject; import com.xinelu.common.annotation.RepeatSubmit; +import com.xinelu.common.config.XinELuConfig; import com.xinelu.common.constant.ScreeningProjectConstants; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.StringUtils; +import com.xinelu.common.utils.file.FileUploadUtils; import com.xinelu.common.utils.file.FileUtils; import com.xinelu.manage.dto.screeningrecord.ScreeningApplyDTO; import com.xinelu.manage.dto.screeningrecord.ScreeningRecordDTO; -import com.xinelu.manage.service.patientinfo.IPatientInfoService; import com.xinelu.manage.service.screeningrecord.IScreeningRecordService; import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo; import io.swagger.annotations.Api; @@ -19,11 +21,13 @@ import io.swagger.annotations.ApiOperation; import java.io.File; import java.util.List; import javax.annotation.Resource; +import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; /** @@ -41,9 +45,6 @@ public class AppletScreeningRecordController extends BaseController { @Resource private IScreeningRecordService screeningRecordService; - @Resource - private IPatientInfoService patientService; - @GetMapping("/record") @ApiOperation(value = "获取筛查结果记录") public TableDataInfo record(ScreeningRecordDTO query) { @@ -75,6 +76,9 @@ public class AppletScreeningRecordController extends BaseController { @ApiOperation(value = "预约") @RepeatSubmit(interval = 2000, message = "请求过于频繁") public R save(@RequestBody ScreeningApplyDTO body) { + if(org.apache.commons.lang3.StringUtils.isBlank(body.getIdentity())) { + return R.fail("居民身份证号不能为空"); + } try { if(!DateUtils.formatDate(body.getApplyStartTime(), "yyyy-MM-dd").equals(DateUtils.formatDate(body.getApplyEndTime(), "yyyy-MM-dd"))) { return R.fail("预约日期请选择在同一天"); @@ -134,4 +138,18 @@ public class AppletScreeningRecordController extends BaseController { JSONObject jsonObject = screeningRecordService.getInfo(assessRecordId); return R.ok(jsonObject); } + + @ApiOperation("阿尔兹海默症结果预览") + @GetMapping("/fileview") + public void fileview(@RequestParam("filePath") String filePath, HttpServletResponse response) { + if (StringUtils.isNotEmpty(filePath)) { + String fileDir = XinELuConfig.getProfile() + filePath.replaceAll("/profile", ""); + File file = new File(fileDir); + if (file.exists() && file.isFile()) { + FileUploadUtils.read(fileDir, response); + } else { + throw new ServiceException("未找到文件"); + } + } + } } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalinfo/HospitalInfoController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalinfo/HospitalInfoController.java index c821ec1..f3cb280 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalinfo/HospitalInfoController.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/hospitalinfo/HospitalInfoController.java @@ -9,7 +9,10 @@ import com.xinelu.common.custominterface.Update; import com.xinelu.common.enums.BusinessType; import com.xinelu.common.utils.poi.ExcelUtil; import com.xinelu.manage.domain.hospitalinfo.HospitalInfo; +import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo; import com.xinelu.manage.service.hospitalinfo.IHospitalInfoService; +import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService; +import com.xinelu.system.service.ISysRoleService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.util.List; @@ -39,6 +42,10 @@ import org.springframework.web.bind.annotation.RestController; public class HospitalInfoController extends BaseController { @Resource private IHospitalInfoService hospitalInfoService; + @Resource + private IHospitalPersonInfoService hospitalPersonInfoService; + @Resource + private ISysRoleService roleService; /** * 查询医院信息管理列表 @@ -56,9 +63,15 @@ public class HospitalInfoController extends BaseController { * 查询医院信息管理列表 */ @ApiOperation("查询医院信息管理列表") - @PreAuthorize("@ss.hasPermi('system:hospital:list')") @GetMapping("/getList") public AjaxResult getList(HospitalInfo hospitalInfo) { + // TODO 根据用户权限获取医院列表,机构管理员只能看自己机构,超级管理员查看所有 + if (!getLoginUser().getUser().isAdmin()) { + HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId()); + if (hospitalPersonInfo != null) { + hospitalInfo.setId(hospitalPersonInfo.getHospitalId()); + } + } List list = hospitalInfoService.selectHospitalInfoList(hospitalInfo); return AjaxResult.success(list); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/screeningproject/ScreeningProjectController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/screeningproject/ScreeningProjectController.java index 281fe82..eec8c72 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/screeningproject/ScreeningProjectController.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/screeningproject/ScreeningProjectController.java @@ -3,7 +3,6 @@ package com.xinelu.manage.controller.screeningproject; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; -import com.xinelu.common.utils.SecurityUtils; import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo; import com.xinelu.manage.domain.screeningproject.ScreeningProject; @@ -37,32 +36,44 @@ import org.springframework.web.bind.annotation.RestController; public class ScreeningProjectController extends BaseController { @Resource private IScreeningProjectService projectService; - @Resource private IHospitalPersonInfoService personInfoService; @ApiOperation("服务项目分页列表") @GetMapping("list") - public TableDataInfo list(ScreeningProject project) { + public TableDataInfo list(ScreeningProject project) throws Exception { + if (!getLoginUser().getUser().isAdmin()) { + HospitalPersonInfo personInfo = personInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId()); + if (personInfo != null) { + project.setHospitalId(personInfo.getHospitalId()); + } else { + throw new Exception("该账号未绑定医生账号"); + } + } startPage(); - List list = projectService.findList(project); - return getDataTable(list); + List list = projectService.findList(project); + return getDataTable(list); } @ApiOperation("服务项目列表") @GetMapping("getList") - public R> getList(ScreeningProject project) { - List list = projectService.findList(project); - return R.ok(list); + public R> getList(ScreeningProject project) throws Exception { + // TODO 根据角色判断查看数据范围 + if (!getLoginUser().getUser().isAdmin()) { + HospitalPersonInfo personInfo = personInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId()); + if (personInfo != null) { + project.setHospitalId(personInfo.getHospitalId()); + } else { + throw new Exception("该账号未绑定医生账号"); + } + } + List list = projectService.findList(project); + return R.ok(list); } @ApiOperation("新增服务项目") @PostMapping("add") public R add(@RequestBody ScreeningProject project) { - // 根据当前登录用户获取医生主键 - HospitalPersonInfo hospitalPersonInfo = personInfoService.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId()); - project.setHospitalId(hospitalPersonInfo.getHospitalId()); - project.setHospitalName(hospitalPersonInfo.getPersonName()); if (projectService.checkSameProjectName(project.getProjectName(), project.getHospitalId(), null)) { return R.fail("【" + project.getHospitalName() + "】已存在服务项目【" + project.getProjectName() + "】,不能重复添加"); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/screeningrecord/ScreeningRecordController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/screeningrecord/ScreeningRecordController.java index b2998e3..2012cba 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/screeningrecord/ScreeningRecordController.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/screeningrecord/ScreeningRecordController.java @@ -7,9 +7,11 @@ import com.xinelu.common.core.domain.SelectVo; import com.xinelu.common.core.domain.TimelineVo; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.utils.StringUtils; +import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo; import com.xinelu.manage.domain.screeningrecord.ScreeningRecord; import com.xinelu.manage.dto.screeningrecord.ScreeningRecordDTO; import com.xinelu.manage.dto.screeningrecord.ScreeningRecordSaveDTO; +import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService; import com.xinelu.manage.service.screeningrecord.IScreeningRecordService; import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo; import io.swagger.annotations.Api; @@ -40,9 +42,19 @@ public class ScreeningRecordController extends BaseController { @Resource private IScreeningRecordService screeningRecordService; + @Resource + private IHospitalPersonInfoService personInfoService; + @GetMapping("/screeningList") @ApiOperation(value = "居民预约筛查列表") - public TableDataInfo screeningList(ScreeningRecordDTO query) { + public TableDataInfo screeningList(ScreeningRecordDTO query) throws Exception { + if (!getLoginUser().getUser().isAdmin()) { + HospitalPersonInfo personInfo = personInfoService.selectHospitalPersonInfoById(getLoginUser().getUser().getHospitalPersonId()); + if (personInfo == null) { + throw new Exception("该账号未绑定医生账号"); + } + query.setHospitalId(personInfo.getHospitalId()); + } startPage(); try { return getDataTable(screeningRecordService.screeningList(query)); diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/screeningproject/ScreeningProjectMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/screeningproject/ScreeningProjectMapper.java index d751d01..282c354 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/screeningproject/ScreeningProjectMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/screeningproject/ScreeningProjectMapper.java @@ -26,6 +26,6 @@ public interface ScreeningProjectMapper { int updateByPrimaryKey(ScreeningProject record); - Integer checkSameName(@Param("projectName") String projectName, @Param("deptId") Long deptId, @Param("projectId") String projectId); + Integer checkSameName(@Param("projectName") String projectName, @Param("hospitalId") Long hospitalId, @Param("projectId") String projectId); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java index 3a24c3e..3b2ac95 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/impl/HospitalPersonInfoServiceImpl.java @@ -197,10 +197,12 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService hospitalPersonCertificate.setUpdateBy(SecurityUtils.getUsername()); hospitalPersonCertificate.setCertificateCode(Constants.CERTIFICATE_CODE + generateSystemCodeUtil.generateSystemCode(Constants.CERTIFICATE_CODE)); } - int hospitalPersonCertificates = hospitalPersonCertificateMapper.insertHospitalPersonCertificateList(hospitalPersonInfo.getHospitalPersonCertificateList()); - if (hospitalPersonCertificates <= 0) { - throw new ServiceException("修改科室人员资质证书信息失败,请联系管理员!"); - } + if (CollectionUtils.isNotEmpty(hospitalPersonInfo.getHospitalPersonCertificateList())) { + int hospitalPersonCertificates = hospitalPersonCertificateMapper.insertHospitalPersonCertificateList(hospitalPersonInfo.getHospitalPersonCertificateList()); + if (hospitalPersonCertificates <= 0) { + throw new ServiceException("修改科室人员资质证书信息失败,请联系管理员!"); + } + } //删除人员的头像 if (StringUtils.isNotBlank(personInfo.getPersonPictureUrl()) && StringUtils.isNotBlank(hospitalPersonInfo.getPersonPictureUrl()) && !personInfo.getPersonPictureUrl().equals(hospitalPersonInfo.getPersonPictureUrl())) { this.deletePictureUrl(personInfo.getPersonPictureUrl()); diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/impl/NurseStationServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/impl/NurseStationServiceImpl.java index a65e47f..c21c4e8 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/impl/NurseStationServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/nursestation/impl/NurseStationServiceImpl.java @@ -454,6 +454,18 @@ public class NurseStationServiceImpl implements INurseStationService { case Constants.PERSON_CERTIFICATE_URL: uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPersonCertificateUrl(); break; + case Constants.PLATELET_PICTURE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getPlateletPitureUrl(); + break; + case Constants.LEFT_EYE_PICTURE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getLeftEyePitureUrl(); + break; + case Constants.RIGHT_EYE_PICTURE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getRightEyePitureUrl(); + break; + case Constants.ALZHEIMER_FILE_URL: + uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getAlzheimerFileUrl(); + break; default: break; } @@ -461,7 +473,13 @@ public class NurseStationServiceImpl implements INurseStationService { return AjaxResult.success(); } //上传 - String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION); + String pictureName = ""; + if (StringUtils.isNotBlank(type) && StringUtils.equals(type, Constants.ALZHEIMER_FILE_URL)) { + pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.FILE_EXTENSION); + } else { + pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, multipartFile, MimeTypeUtils.IMAGE_EXTENSION); + } + if (StringUtils.isBlank(pictureName)) { throw new ServiceException("图片上传失败,请联系管理员!"); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningproject/IScreeningProjectService.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningproject/IScreeningProjectService.java index 67d0106..ac53644 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningproject/IScreeningProjectService.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningproject/IScreeningProjectService.java @@ -21,11 +21,11 @@ public interface IScreeningProjectService { /** * 检验机构是否存在相同名称服务项目 * @param projectName 项目名称 - * @param deptId 机构id + * @param hospitalId 机构id * @param projectId 项目业务主键 * @return {@link boolean} * @author gaoyu * @date 2022-11-23 10:20 */ - boolean checkSameProjectName(String projectName, Long deptId, String projectId); + boolean checkSameProjectName(String projectName, Long hospitalId, String projectId); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningproject/impl/ScreeningProjectServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningproject/impl/ScreeningProjectServiceImpl.java index 7920898..23046f6 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningproject/impl/ScreeningProjectServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningproject/impl/ScreeningProjectServiceImpl.java @@ -32,12 +32,14 @@ public class ScreeningProjectServiceImpl implements IScreeningProjectService { } @Override public int insert(ScreeningProject project) { - HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId()); - if (hospitalPersonInfo != null) { - project.setHospitalId(hospitalPersonInfo.getHospitalId()); - HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId()); - if (hospital != null) { - project.setHospitalName(hospital.getHospitalName()); + if (project.getHospitalId() == null) { + HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId()); + if (hospitalPersonInfo != null) { + project.setHospitalId(hospitalPersonInfo.getHospitalId()); + HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId()); + if (hospital != null) { + project.setHospitalName(hospital.getHospitalName()); + } } } return projectMapper.insertSelective(project); @@ -45,12 +47,14 @@ public class ScreeningProjectServiceImpl implements IScreeningProjectService { @Override public int update(ScreeningProject project) { - HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId()); - if (hospitalPersonInfo != null) { - project.setHospitalId(hospitalPersonInfo.getHospitalId()); - HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId()); - if (hospital != null) { - project.setHospitalName(hospital.getHospitalName()); + if (project.getHospitalId() == null) { + HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId()); + if (hospitalPersonInfo != null) { + project.setHospitalId(hospitalPersonInfo.getHospitalId()); + HospitalInfo hospital = hospitalInfoMapper.selectHospitalInfoById(hospitalPersonInfo.getHospitalId()); + if (hospital != null) { + project.setHospitalName(hospital.getHospitalName()); + } } } return projectMapper.updateByPrimaryKey(project); @@ -60,7 +64,7 @@ public class ScreeningProjectServiceImpl implements IScreeningProjectService { projectMapper.updateByPrimaryKeySelective(project); } - @Override public boolean checkSameProjectName(String projectName, Long deptId, String projectId) { - return projectMapper.checkSameName(projectName, deptId, projectId) != null; + @Override public boolean checkSameProjectName(String projectName, Long hospitalId, String projectId) { + return projectMapper.checkSameName(projectName, hospitalId, projectId) != null; } } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java index 1de2a81..0a214af 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java @@ -61,12 +61,6 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { @Override public List screeningList(ScreeningRecordDTO query) throws Exception { - HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoMapper.selectHospitalPersonInfoById(SecurityUtils.getLoginUser().getUser().getHospitalPersonId()); - if (hospitalPersonInfo != null) { - query.setHospitalId(hospitalPersonInfo.getHospitalId()); - } else { - throw new Exception("该账号未关联医生"); - } return screeningRecordMapper.screeningList(query); } @@ -109,6 +103,9 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { if(registerVo == null) { throw new Exception("用户未注册"); } + if(StringUtils.isBlank(body.getPatientId())) { + body.setPatientId(String.valueOf(registerVo.getId())); + } // 查询 同一机构的同一筛查项目在同一天是否有预约 ScreeningRecordDTO query = new ScreeningRecordDTO(); query.setPatientId(body.getPatientId()); @@ -131,7 +128,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { // 预约条码 recordBody.setApplyBarcode(generateBarcode(xinELuConfig.getApplyBarcodePitureUrl(), recordBody.getScreeningId(), recordBody.getApplyCode())); } catch (Exception e) { - + e.printStackTrace(); } int flag = screeningRecordMapper.insert(recordBody); if(flag > 0) { @@ -467,7 +464,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { String uploadPathUrl = XinELuConfig.getProfile() + url + "/"; String fileName = screeningId + ".jpg"; QrCodeUtils.createTxm(content, uploadPathUrl, fileName); - return uploadPathUrl + "/" + fileName; + return uploadPathUrl + fileName; } } diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalinfo/HospitalInfoMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalinfo/HospitalInfoMapper.xml index f13ff9a..6cc5dec 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalinfo/HospitalInfoMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalinfo/HospitalInfoMapper.xml @@ -36,6 +36,9 @@ - select r.resident_name,r.gender,r.birthday,r.phone,r.`identity` - ,r.manage_status,r.manage_time,d.screening_id,d.patient_id,d.project_id,d.project_name + select r.patient_name,r.sex as gender,r.birth_date as birthday,r.phone,r.card_no as `identity` + ,d.screening_id,d.patient_id,d.project_id,d.project_name ,d.hospital_id,d.hospital_name,d.apply_start_time,d.apply_end_time, d.diagnostic_result,d.attachment,d.attachment_two, d.registration_date,d.registration_code, d.registration_barcode,d.screening_type,d.push_date, @@ -225,9 +222,9 @@ else '0' end as hasResult, case when diagnostic_result is not null then '1' else '0' end as hasDiagnose - from screening_record d left join patient_info r on d.patient_id = r.patient_id + from screening_record d left join patient_info r on d.patient_id = r.id - d.screening_status != '2' and r.del_flag = '0' and r.status = '0' + d.screening_status != '2' and r.del_flag = '0' and d.screening_status = #{screeningStatus} @@ -235,7 +232,7 @@ and r.patient_name like concat(#{patientName}, '%') - and r.identity = #{identity} + and r.card_no = #{identity} and r.address like concat('%', #{address}, '%') @@ -321,9 +318,8 @@ ssr.disease,ssr.hospital_id,IFNULL(ssr.hospital_name, '') as hospital_name,ssr.project_id, ssr.project_name, ssr.apply_start_time,ssr.apply_end_time, ssr.screening_date,ssr.content,ssr.diagnostic_result,ssr.attachment,ssr.attachment_two, ssr.doctor_id,IFNULL(ssr.doctor_name,'') as doctor_name,ssr.apply_barcode,ssr.registration_date,ssr.screening_type,ssr.push_date,ssr.assess_record_id, - ssr.remark,sf.suffix as fileType + ssr.remark,substring_index(ssr.attachment, '.', -1) as fileType from screening_record ssr - LEFT JOIN sys_file sf ON sf.file_id=ssr.attachment where 1=1 order by screening_date desc