diff --git a/xinelu-admin/pom.xml b/xinelu-admin/pom.xml index 605eede..c2752b0 100644 --- a/xinelu-admin/pom.xml +++ b/xinelu-admin/pom.xml @@ -79,10 +79,6 @@ com.xinelu xinelu-nurse-applet - - com.xinelu - xinelu-familydoctor - @@ -90,6 +86,14 @@ xinelu-familydoctor + + + com.tzwy + hmac + 1.0 + system + ${basedir}/src/main/resources/lib/hmac-1.0.jar + diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/FdMessageController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/FdMessageController.java new file mode 100644 index 0000000..3d9148d --- /dev/null +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/FdMessageController.java @@ -0,0 +1,151 @@ +package com.xinelu.web.controller.applet; + +import com.alibaba.fastjson2.JSONObject; +import com.github.pagehelper.PageInfo; +import com.xinelu.applet.dto.chatrecord.ChatRecordDTO; +import com.xinelu.applet.dto.chatrecord.MessageSearchDto; +import com.xinelu.applet.service.chatRecord.IChatRecordService; +import com.xinelu.applet.service.messagepush.MessagePushService; +import com.xinelu.applet.vo.chatrecord.MessageVo; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.R; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.familydoctor.applet.pojo.body.MessagePushBody; +import com.xinelu.familydoctor.applet.pojo.dto.FDMessageDto; +import com.xinelu.familydoctor.applet.pojo.vo.SignInfoDataVo; +import com.xinelu.framework.config.AsyncExecutorConfig; +import com.xinelu.manage.domain.chatRecord.ChatRecord; +import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo; +import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import javax.annotation.Resource; +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 家医消息推送控制器 + * @Date 2023-10-19 019 11:18 + * @Param + * @return + **/ +@Api(tags = "家医消息推送控制器") +@RestController +@RequestMapping("/applet/message") +public class FdMessageController extends BaseController { + @Resource + private MessagePushService messagePushService; + @Resource + private AsyncExecutorConfig asyncExecutorConfig; + @Resource + private IChatRecordService chatRecordService; + @Resource + private IHospitalPersonInfoService hospitalPersonInfoService; + + @ApiOperation(value = "家医推送订阅消息", notes = "向接收方推送订阅消息") + @PostMapping("/push") + public R pushMessage(@RequestBody FDMessageDto message) throws Exception { + if (StringUtils.isBlank(message.getRecipientIdentity())) { + return R.fail("接收方参数异常"); + } + if (StringUtils.isBlank(message.getTemplateType())) { + return R.fail("消息模版参数异常"); + } + messagePushService.FdPushMessage(JSONObject.parseObject(JSONObject.toJSONString(message))); + return R.ok(); + } + + @ApiOperation(value = "测试接口") + @GetMapping("/test/") + public R test(MessagePushBody body, @RequestHeader("region") String region) { +// JSONObject jsonObject = null; +// try { +// String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/detail/2334", null, String.class); +// 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)); +// } catch (Exception e) { +// System.out.println("注册完善信息-更新签约标识出错:" + e.getMessage()); +// } + + ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); + //设置子线程共享 + RequestContextHolder.setRequestAttributes(servletRequestAttributes, true); + asyncExecutorConfig.asyncThreadServiceExecutor().execute(new Runnable() { + @Override + public void run() { + System.out.println("发送消息"); + messagePushService.fdApprovePush(JSONObject.parseObject(JSONObject.toJSONString(body))); + } + }); + System.out.println("执行成功"); + return R.ok(); + } + + + @ApiOperation("查询通知推送列表-家医PC端") + @PostMapping("/getNoticList") + public R> getNoticList(@RequestBody MessageSearchDto messageDto) { + if (StringUtils.isBlank(messageDto.getSenderNo())) { + return R.fail("发送人编号不能为空"); + } + return R.ok(chatRecordService.getNoticList(messageDto)); + } + + @ApiOperation("查询通知详情-PC端") + @GetMapping("/getNoticDetail/{messageNo}") + public R getNoticDetail(@PathVariable String messageNo) { + return R.ok(chatRecordService.getNoticDetail(messageNo)); + } + + @ApiOperation(value = "保存通知-PC端", notes = "健康推送和通知公告消息通知") + @PostMapping("/noticeSave") + @Transactional + public R noticeSave(@RequestBody ChatRecordDTO message) { + // 根据发送人编号查询家医用户信息 + HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.getByPersonCode(message.getSenderNo(), null); + if(hospitalPersonInfo == null) { + throw new ServiceException("未查询到医生信息"); + } + if(StringUtils.isBlank(message.getMessageNo())) { + message.setSendTime(new Date()); + message.setSenderId(hospitalPersonInfo.getId()); + message.setSenderName(hospitalPersonInfo.getPersonName()); + chatRecordService.insertChatRecord(message); + } else { + MessageVo messageVo = chatRecordService.getNoticDetail(message.getMessageNo()); + if(messageVo != null) { + ChatRecord entity = new ChatRecord(); + BeanUtils.copyProperties(messageVo, entity); + entity.setMessageType(message.getMessageType()); + entity.setContent(message.getContent()); + entity.setCrowds(message.getCrowds()); + entity.setCrowdsName(message.getCrowdsName()); + entity.setTitle(message.getTitle()); + entity.setUpdateTime(new Date()); + entity.setUpdateBy(message.getSenderNo()); + chatRecordService.updateChatRecordOfNo(entity); + } + } + return R.ok(); + } + + @ApiOperation("删除通知-家医PC端") + @GetMapping("/noticDel/{messageNo}") + public R noticDel(@PathVariable String messageNo) { + chatRecordService.del(messageNo); + return R.ok(); + } +} diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientScoreController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientScoreController.java index bc2635b..4992134 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientScoreController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/PatientScoreController.java @@ -37,7 +37,7 @@ public class PatientScoreController extends BaseController { if (!jsonObject.get("code").toString().equals("1")) { return R.fail(jsonObject.get("msg").toString()); } - return R.ok("请求成功", jsonObject.getString("data")); + return R.ok(jsonObject.getString("data")); } @ApiOperation("获取居民积分记录列表") diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java index 0a00e7b..e57d9bf 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentPatientInfoController.java @@ -47,13 +47,14 @@ public class ResidentPatientInfoController extends BaseController { @ApiOperation("注册完善信息") @PostMapping("") public R register(@Validated @RequestBody PatientInfoBody body) { - /*if(body.getDiseaseList() == null || body.getDiseaseList().size() == 0) { - return R.fail("请选择基础疾病"); - }*/ +// if(body.getDiseaseList() == null || body.getDiseaseList().size() == 0) { +// return R.fail("请选择基础疾病"); +// } try { residentPatientInfoService.register(body); return R.ok(); } catch (Exception e) { + e.printStackTrace(); return R.fail(e.getMessage()); } } @@ -78,9 +79,9 @@ public class ResidentPatientInfoController extends BaseController { } @ApiOperation("获取已注册列表") - @GetMapping("/getList/{openid}/{cityCode}") - public R> getList(@PathVariable String openid, @PathVariable String cityCode) { - return R.ok(residentPatientInfoService.getList(openid, cityCode)); + @GetMapping("/getList/{openid}") + public R> getList(@PathVariable String openid) { + return R.ok(residentPatientInfoService.getList(openid, null)); } @ApiOperation("切换账号") diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java index e25b5a8..628432c 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java @@ -1,14 +1,22 @@ package com.xinelu.web.controller.applet; +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.http.HttpService; +import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.familydoctor.applet.pojo.body.ResidentServiceApplyBody; +import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo; import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; -import com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo; -import com.xinelu.familydoctor.applet.pojo.vo.ScreeningProjectVo; +import com.xinelu.familydoctor.applet.pojo.query.ServiceRecordQuery; +import com.xinelu.familydoctor.applet.pojo.vo.*; +import com.xinelu.familydoctor.applet.service.IResidentPatientInfoService; import com.xinelu.familydoctor.applet.service.IResidentServiceAppletService; +import com.xinelu.manage.domain.orderevaluateinfo.OrderEvaluateInfo; +import com.xinelu.manage.service.orderevaluateinfo.IOrderEvaluateInfoService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -16,6 +24,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.util.List; +import java.util.stream.Collectors; /** * @Author mengkuiliang @@ -31,28 +40,34 @@ public class ResidentServiceApplyController extends BaseController { @Resource private IResidentServiceAppletService residentServiceAppletService; + @Resource + private HttpService httpService; + @Resource + private IResidentPatientInfoService residentPatientInfoService; + @Resource + private IOrderEvaluateInfoService orderEvaluateInfoService; - @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())) { + 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())) { @@ -67,30 +82,79 @@ public class ResidentServiceApplyController extends BaseController { } } - @ApiOperation("服务预约详情") + @ApiOperation("服务申请详情") @GetMapping("/detail/{bookingNo}") public R performanceBookingDetail(@PathVariable String bookingNo) { return R.ok(residentServiceAppletService.detail(bookingNo)); } - @ApiOperation(value = "获取服务预约项目列表", notes = "获取家医个性服务包和筛查项目") + @ApiOperation(value = "获取服务申请项目列表", notes = "获取家医个性服务包和筛查项目") @GetMapping("/getForm/{identity}") public R> getForm(@PathVariable String identity, String projectName, @RequestHeader("region") String region) { - return R.ok(residentServiceAppletService.getForm(identity, projectName,region)); + return R.ok(residentServiceAppletService.getForm(identity, projectName, region)); } @ApiOperation("服务记录列表") - @PostMapping("/record") - public TableDataInfo performanceBookingRecord(@RequestBody ApplyQuery query) { - if (StringUtils.isBlank(query.getIdentity())) { - throw new ServiceException("居民身份证号不能为空"); + @GetMapping("/record/{identity}") + public R> performanceBookingRecord(@PathVariable String identity, ServiceRecordQuery query, @RequestHeader("region") String region) { + query.setIdentity(identity); + if (query.getPageNum() == null) { + query.setPageNum(1); } - try { - startPage(); - return getDataTable(residentServiceAppletService.record(query)); - } catch (Exception e) { - e.printStackTrace(); - throw new ServiceException(e.getMessage()); + if (query.getPageSize() == null) { + query.setPageSize(1000); } + JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/performance/recordV1", null, JSONObject.parseObject(JSONObject.toJSONString(query))); + if (result.get("code").toString().equals("0")) { + throw new ServiceException(result.get("msg").toString()); + } + if (result.get("data") != null) { + List perRecordList = JSONArray.parseArray(result.getJSONObject("data").getJSONArray("list").toJSONString()).toJavaList(ResidentServiceRecordVo.class); + if (perRecordList != null && perRecordList.size() > 0) { + // 查询评价 + List list = orderEvaluateInfoService.selectOrderEvaluateByServiceNos(perRecordList.stream().map(ResidentServiceRecordVo::getPerformanceNo).collect(Collectors.toList()), "FAMILY_DOCTOR"); + if (list != null && list.size() > 0) { + List orderEvaluateInfoTempList; + for (ResidentServiceRecordVo record : perRecordList) { + orderEvaluateInfoTempList = list.stream().filter(o -> o.getOrderNo().equals(record.getPerformanceNo())).collect(Collectors.toList()); + if (orderEvaluateInfoTempList.size() > 0) { + record.setOrderEvaluateInfo(orderEvaluateInfoTempList.get(0)); + } + } + } + } + return R.ok(perRecordList); + } + return R.ok(); + } + + @ApiOperation("获取服务记录详情") + @GetMapping("/serviceRecordDetail/{identity}/{performanceNo}") + public R serviceRecordDetail(@PathVariable String identity, @PathVariable String performanceNo, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/performance/detail/" + identity + "/" + performanceNo, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (jsonObject.getInteger("code") != 1) { + throw new ServiceException(jsonObject.getString("msg")); + } + if (jsonObject.get("data") != null) { + return R.ok(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), ResidentServiceRecordVo.class)); + } + return R.ok(); + } + + @ApiOperation("服务评价列表") + @GetMapping("/evaluateRecord/{identity}") + public R> performanceEvaluateRecord(@PathVariable String identity) { + PatientInfo patientInfo = residentPatientInfoService.getByCardNo(identity); + if (patientInfo != null && !StringUtils.isBlank(patientInfo.getCityCode())) { + String result = (String) httpService.get(SpringUtils.getFdUrl(patientInfo.getCityCode()) + "/performance/recordV2/" + identity, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (jsonObject.getInteger("code") == 1) { + if (jsonObject.get("data") != null && jsonObject.getJSONArray("data").size() > 0) { + return R.ok(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(OrderEvaluateVo.class)); + } + } + } + return R.ok(); } } 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 a4ec9c5..7d023fc 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 @@ -2,6 +2,7 @@ package com.xinelu.web.controller.applet; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; +import com.xinelu.applet.service.messagepush.MessagePushService; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.R; import com.xinelu.common.core.page.TableDataInfo; @@ -13,6 +14,7 @@ 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 com.xinelu.framework.config.AsyncExecutorConfig; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -280,4 +282,5 @@ public class SignInfoController extends BaseController { } return R.ok(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDataVo.class)); } + } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/DeviceBindResidentController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/DeviceBindResidentController.java index d230d62..84b7084 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/DeviceBindResidentController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/DeviceBindResidentController.java @@ -1,7 +1,7 @@ package com.xinelu.web.controller.familydoctor; import com.xinelu.common.core.controller.BaseController; -import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.R; import com.xinelu.familydoctor.entity.DeviceBindResident; import com.xinelu.familydoctor.service.DeviceBindResidentService; import io.swagger.annotations.Api; @@ -26,38 +26,34 @@ public class DeviceBindResidentController extends BaseController { @ApiOperation("绑定设备") @PostMapping("binding") - public AjaxResult bind(@RequestBody DeviceBindResident entity) { + public R bind(@RequestBody DeviceBindResident entity) { if (deviceBindResidentService.repeatBind(entity)) { - return AjaxResult.error("设备【" + entity.getSn() + "】已绑定"); + return R.fail("设备【" + entity.getSn() + "】已绑定"); } - AjaxResult ajaxResult; int row = deviceBindResidentService.bindDevice(entity); if (row > 0) { - ajaxResult = AjaxResult.success(); + return R.ok(); } else { - ajaxResult = AjaxResult.error("绑定失败"); + return R.fail("绑定失败"); } - return ajaxResult; } @ApiOperation("已绑定的设备") @GetMapping("bound/{identity}") @ApiImplicitParam(name = "identity", value = "身份证号", required = true) - public AjaxResult boundDevice(@PathVariable String identity) { + public R> boundDevice(@PathVariable String identity) { List list = deviceBindResidentService.boundDevice(identity); - return AjaxResult.success(list); + return R.ok(list); } @ApiOperation("解绑设备") @PostMapping("unbind") - public AjaxResult unbindDevice(@RequestBody DeviceBindResident entity) { - AjaxResult ajaxResult; + public R unbindDevice(@RequestBody DeviceBindResident entity) { int row = deviceBindResidentService.unbindDevice(entity); if (row > 0) { - ajaxResult = AjaxResult.success(); + return R.ok(); } else { - ajaxResult = AjaxResult.error("解绑失败"); + return R.fail("解绑失败"); } - return ajaxResult; } } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/EvaluateAdviceTemplateController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/EvaluateAdviceTemplateController.java new file mode 100644 index 0000000..72a5752 --- /dev/null +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/EvaluateAdviceTemplateController.java @@ -0,0 +1,65 @@ +package com.xinelu.web.controller.familydoctor; + +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.familydoctor.entity.EvaluateAdviceTemplate; +import com.xinelu.familydoctor.service.EvaluateAdviceTemplateService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author gaoyu + * @description 自我评估处方模板接口控制器 + * @date 2023-10-16 16:59 + */ +@Api(tags = {"自我评估处方模板接口控制器"}) +@RestController +@RequestMapping("/evaluate/advice/template") +public class EvaluateAdviceTemplateController extends BaseController { + + @Resource + private EvaluateAdviceTemplateService evaluateAdviceTemplateService; + + @ApiOperation("模板列表") + @GetMapping("list") + public TableDataInfo list(EvaluateAdviceTemplate entity) { + startPage(); + List list = evaluateAdviceTemplateService.findList(entity); + return getDataTable(list); + } + + @ApiOperation("新增/编辑模板") + @PostMapping("save") + public AjaxResult save(@RequestBody EvaluateAdviceTemplate entity) { + evaluateAdviceTemplateService.save(entity); + return AjaxResult.success(); + } + + @ApiOperation("修改模板状态") + @PostMapping("change/status") + public AjaxResult changeStatus(@RequestBody EvaluateAdviceTemplate entity) { + evaluateAdviceTemplateService.changeStatus(entity); + return AjaxResult.success(); + } + + @ApiOperation("逻辑删除模板") + @PostMapping("del/{id}") + @ApiImplicitParam(name = "id", value = "模板ID", required = true) + public AjaxResult del(@PathVariable Long id) { + evaluateAdviceTemplateService.delTemplate(id); + return AjaxResult.success(); + } + + @ApiOperation("根据自评结果获取处方模板") + @GetMapping("get/{templateType}") + @ApiImplicitParam(name = "templateType", value = "处方模板类型", required = true) + public AjaxResult getTemplate(@PathVariable String templateType) { + return AjaxResult.success(evaluateAdviceTemplateService.getTemplate(templateType)); + } +} diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/EvaluateSurveyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/EvaluateSurveyController.java new file mode 100644 index 0000000..5c8fa2e --- /dev/null +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/EvaluateSurveyController.java @@ -0,0 +1,88 @@ +package com.xinelu.web.controller.familydoctor; + +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.page.TableDataInfo; +import com.xinelu.familydoctor.entity.EvaluateRecord; +import com.xinelu.familydoctor.entity.EvaluateSurvey; +import com.xinelu.familydoctor.service.EvaluateRecordService; +import com.xinelu.familydoctor.service.EvaluateSurveyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.List; + +/** + * @author gaoyu + * @description 自我评估问卷控制器 + * @date 2023-10-10 11:02 + */ +@Api(tags = {"自我评估问卷控制器"}) +@RestController +@RequestMapping("/evaluate") +public class EvaluateSurveyController extends BaseController { + @Resource + private EvaluateSurveyService evaluateSurveyService; + @Resource + private EvaluateRecordService evaluateRecordService; + + @ApiOperation("问卷列表") + @GetMapping("survey/list") + public TableDataInfo surveyList(EvaluateSurvey entity) { + startPage(); + List list = evaluateSurveyService.findList(entity); + return getDataTable(list); + } + + @ApiOperation("问卷新增") + @PostMapping("survey/save") + public AjaxResult surveySave(@RequestBody EvaluateSurvey entity) { + evaluateSurveyService.insert(entity); + return AjaxResult.success(); + } + + @ApiOperation("问卷编辑") + @PostMapping("survey/update") + public AjaxResult surveyUpdate(@RequestBody EvaluateSurvey entity) { + evaluateSurveyService.update(entity); + return AjaxResult.success(); + } + + @ApiOperation("修改问卷状态(启用/停用)") + @PostMapping("survey/change/state") + public AjaxResult changeState() { + return AjaxResult.success(); + } + + @ApiOperation("获取问卷") + @GetMapping("survey/get/{subject}") + @ApiImplicitParam(name = "subject", value = "问卷主题", required = true) + public AjaxResult getSurvey(@PathVariable String subject) { + EvaluateSurvey survey = evaluateSurveyService.getSurvey(subject); + return AjaxResult.success(survey); + } + + @ApiOperation("问卷提交") + @PostMapping("survey/submit") + public AjaxResult surveySubmit(@RequestBody EvaluateRecord evaluateRecord) { + evaluateRecordService.submit(evaluateRecord); + return AjaxResult.success(); + } + + @ApiOperation("获取评估记录") + @GetMapping("record/timeline/{userId}") + @ApiImplicitParam(name = "userId", value = "用户ID", required = true) + public AjaxResult record(@PathVariable Long userId) { + return AjaxResult.success(evaluateRecordService.getEvaluateTimeline(userId)); + } + + @ApiOperation("获取评估问卷答案") + @GetMapping("survey/answer/{recordId}") + @ApiImplicitParam(name = "recordId", value = "评估记录ID", required = true) + public AjaxResult detail(@PathVariable Long recordId) { + return AjaxResult.success(evaluateRecordService.getAnswers(recordId)); + } +} diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/PhysicalSignController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/PhysicalSignController.java index f4dad3f..55685e2 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/PhysicalSignController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/familydoctor/PhysicalSignController.java @@ -1,9 +1,10 @@ package com.xinelu.web.controller.familydoctor; import com.xinelu.common.core.controller.BaseController; -import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.R; import com.xinelu.familydoctor.entity.*; import com.xinelu.familydoctor.service.PhysicalSignService; +import com.xinelu.familydoctor.vo.PhysicalLastRecordVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -11,6 +12,7 @@ import io.swagger.annotations.ApiOperation; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.List; import java.util.Map; /** @@ -27,51 +29,51 @@ public class PhysicalSignController extends BaseController { @ApiOperation("上传血糖") @PostMapping("bg/save") - public AjaxResult saveBg(@RequestBody DeviceBgRecord record) { + public R saveBg(@RequestBody DeviceBgRecord record) { physicalSignService.saveBg(record); - return AjaxResult.success(); + return R.ok(); } @ApiOperation("上传血压") @PostMapping("bp/save") - public AjaxResult saveBp(@RequestBody DeviceBpRecord record) { + public R saveBp(@RequestBody DeviceBpRecord record) { physicalSignService.saveBp(record); - return AjaxResult.success(); + return R.ok(); } @ApiOperation("上传血脂") @PostMapping("bf/save") - public AjaxResult saveBf(@RequestBody DeviceBfRecord record) { + public R saveBf(@RequestBody DeviceBfRecord record) { physicalSignService.saveBf(record); - return AjaxResult.success(); + return R.ok(); } @ApiOperation("上传BMI") @PostMapping("bmi/save") - public AjaxResult saveBmi(@RequestBody DeviceBmiRecord record) { + public R saveBmi(@RequestBody DeviceBmiRecord record) { physicalSignService.saveBmi(record); - return AjaxResult.success(); + return R.ok(); } @ApiOperation("上传血氧") @PostMapping("bo/save") - public AjaxResult saveBo(@RequestBody DeviceBoRecord record) { + public R saveBo(@RequestBody DeviceBoRecord record) { physicalSignService.saveBo(record); - return AjaxResult.success(); + return R.ok(); } @ApiOperation("上传心率") @PostMapping("hr/save") - public AjaxResult saveHr(@RequestBody DeviceHrRecord record) { + public R saveHr(@RequestBody DeviceHrRecord record) { physicalSignService.saveHr(record); - return AjaxResult.success(); + return R.ok(); } @ApiOperation("上传体温") @PostMapping("temp/save") - public AjaxResult saveTemp(@RequestBody DeviceTempRecord record) { + public R saveTemp(@RequestBody DeviceTempRecord record) { physicalSignService.saveTemp(record); - return AjaxResult.success(); + return R.ok(); } @ApiOperation("获取体征记录") @@ -79,8 +81,15 @@ public class PhysicalSignController extends BaseController { @ApiImplicitParams({@ApiImplicitParam(name = "identity", value = "身份证号", required = true), @ApiImplicitParam(name = "type", value = "时间类型0:全部1:周2:月3:年", required = true), @ApiImplicitParam(name = "label", value = "查询标识1:血糖2:血压3:血脂4:bmi5:血氧6:心率7:体温", required = true)}) - public AjaxResult record(String identity, String type, String label) { + public R record(String identity, String type, String label) { Map map = physicalSignService.record(identity, type, label); - return AjaxResult.success(map); + return R.ok(map); + } + + @ApiOperation("获取最后一次体征记录") + @GetMapping("record/last/{identity}") + @ApiImplicitParam(name = "identity", value = "身份证号", required = true) + public R> lastRecord(@PathVariable String identity) { + return R.ok(physicalSignService.getLastRecord(identity)); } } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/DzsCodeController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/DzsCodeController.java new file mode 100644 index 0000000..c131fe3 --- /dev/null +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/DzsCodeController.java @@ -0,0 +1,352 @@ +package com.xinelu.web.controller.fd; + +import com.alibaba.fastjson2.JSONObject; +import com.xinelu.common.core.controller.BaseController; +import com.xinelu.common.core.domain.R; +import com.xinelu.common.exception.ServiceException; +import com.xinelu.common.utils.DateUtils; +import com.xinelu.common.utils.http.HttpService; +import com.xinelu.common.utils.http.SslUtils; +import com.xinelu.familydoctor.applet.pojo.body.DzsCodeBody; +import com.xinelu.familydoctor.applet.pojo.query.DzsCodeQuery; +import com.xinelu.web.controller.fd.utils.DzsCodeSign; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +@Api(tags = "德州市居民码控制器(爱山东APP)") +@Slf4j +@RestController +@RequestMapping("/applet/fd/dzs/code") +public class DzsCodeController extends BaseController { + + @Resource + private HttpService httpService; + @Value("${dzsCode.appid}") + private String appid; + @Value("${dzsCode.appSecret}") + private String appSecret; + @Value("${dzsCode.url}") + private String url; + @Value("${dzsCode.mutualUrl}") + private String mutualUrl; + @Value("${dzsCode.isSecret}") + private String isSecret; + @Value("${dzsCode.isWhole}") + private String isWhole; + @Value("${dzsCode.institutionCode}") + private String institutionCode; + @Value("${dzsCode.useCityCode}") + private String useCityCode; + @Value("${dzsCode.businessStepCode}") + private String businessStepCode; + + @ApiOperation(value = "居民码注册接口") + @GetMapping("/register") + public R register(DzsCodeBody body) { + try { + JSONObject bodyParams = registerBody(body); + String message = ""; + // 0:明文 1:加密 + if (isSecret.equals("1")) { + message = DzsCodeSign.makeSign(appSecret, bodyParams.toJSONString()); + } else { + message = bodyParams.toJSONString(); + } + Map headerMap = headerParams(message); + // 0:明文 1:加密 + JSONObject requestBody = new JSONObject(); + requestBody.put("message", message); + SslUtils.ignoreSsl(); + JSONObject resultObj = httpService.post(url + "/register", headerMap, requestBody); + log.info("居民码注册接口响应:{}", resultObj); + if (!resultObj.containsKey("code") || !resultObj.getString("code").equals("200")) { + if (resultObj.containsKey("msg") && !StringUtils.isBlank(resultObj.getString("msg"))) { + return R.fail(resultObj.getString("msg")); + } + return R.fail("接口异常"); + } + if (resultObj.containsKey("data")) { + return R.ok(resultObj.get("data")); + } + } catch (Exception e) { + e.printStackTrace(); + throw new ServiceException(e.getMessage()); + } + return R.ok(); + } + + @ApiOperation(value = "居民码查询接口") + @GetMapping("/analysis") + public R query(DzsCodeQuery queryBody) { + try { + JSONObject bodyParams; + switch (queryBody.getInterfaceName()) { + // 是否已注册 + case "isReg": + bodyParams = isRegBody(queryBody.getCardType(), queryBody.getCardNo()); + break; + // 根据UID获取码值 + case "getCodeByUid": + bodyParams = getCodeByUidBody(queryBody.getUid()); + break; + // 根据证件获取居民码 + case "getCodeByCard": + bodyParams = getCodeByCardBody(queryBody.getCardType(), queryBody.getCardNo()); + break; + // 解析二维码 + case "parsingCode": + bodyParams = parsingCodeBody(queryBody.getQrCode()); + break; + // 获取用户信息 + case "getUserInfo": + bodyParams = getUserInfoBody(queryBody.getJmmCode()); + break; + default: + return R.fail("参数无效"); + } + String message = ""; + // 0:明文 1:加密 + if (isSecret.equals("1")) { + message = DzsCodeSign.makeSign(appSecret, bodyParams.toJSONString()); + } else { + message = bodyParams.toJSONString(); + } + Map headerMap = headerParams(message); + // 0:明文 1:加密 + JSONObject requestBody = new JSONObject(); + requestBody.put("message", message); + SslUtils.ignoreSsl(); + JSONObject resultObj = httpService.post(url + "/" + queryBody.getInterfaceName(), headerMap, requestBody); + log.info("居民码{}接口响应:{}", queryBody.getInterfaceName(), resultObj); + if (!resultObj.containsKey("code") || !resultObj.getString("code").equals("200")) { + if (resultObj.containsKey("msg") && !StringUtils.isBlank(resultObj.getString("msg"))) { + return R.fail(resultObj.getString("msg")); + } + return R.fail("接口异常"); + } + if (resultObj.containsKey("data")) { + return R.ok(resultObj.getJSONObject("data")); + } + } catch (Exception e) { + e.printStackTrace(); + throw new ServiceException(e.getMessage()); + } + return R.ok(); + } + + @ApiOperation(value = "多码互认接口") + @PostMapping("/mutualDiscern") + public R mutualDiscern(@RequestBody DzsCodeBody body) { + // 请求参数示例: + // { + // "qrCode":"SDQR0000001A00010001371400011667058654613299203000169828216216982822221410ff8de0b234bdf8a92932e36173578789c4099bf3606c4c1e3e175a91a5ac754434bd767e4155ffdf095dc8a096714d4b86e535231efbb5383e9fd4cd13f2" + // } + if(body == null || StringUtils.isBlank(body.getQrCode())) { + return R.fail("请求参数无效"); + } + try { + JSONObject bodyParams = mutualDiscernBody(body.getQrCode()); + Map headerMap; + SslUtils.ignoreSsl(); + String message = ""; + JSONObject resultObj; + // 0:明文 1:加密 + if (isSecret.equals("1")) { + message = DzsCodeSign.makeSign(appSecret, bodyParams.toJSONString()); + headerMap = headerParams(message); + resultObj = httpService.post(mutualUrl + "/mutualDiscern", headerMap, message); + } else { + headerMap = headerParams(bodyParams.toJSONString()); + resultObj = httpService.post(mutualUrl + "/mutualDiscern", headerMap, bodyParams); + } + log.info("居民码多码互认接口响应:{}", resultObj); + if (!resultObj.containsKey("code") || !resultObj.getString("code").equals("200")) { + if (resultObj.containsKey("msg") && !StringUtils.isBlank(resultObj.getString("msg"))) { + if (resultObj.containsKey("detail") && !StringUtils.isBlank(resultObj.getString("detail"))) { + return R.fail(resultObj.getString("msg") + "->" + resultObj.getString("detail")); + } else { + return R.fail(resultObj.getString("msg")); + } + } + return R.fail("接口异常"); + } + if (resultObj.containsKey("data")) { + return R.ok(resultObj.getJSONObject("data")); + } + } catch (Exception e) { + e.printStackTrace(); + throw new ServiceException(e.getMessage()); + } + return R.ok(); + } + + /** + * 设置请求header参数 参数都是必填的 + */ + private Map headerParams(String message) { + Map headMap = new HashMap<>(); + // 客户端生成的安全随机码 + String nonceStr = DzsCodeSign.getRandomString(10); + // 当前时间(yyyyMMddHHmmss) + String time = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss"); + // 根据appid、nonceStr、time和(message),经过HMAC算法计算的值 + String str = appid + "&" + time + "&" + nonceStr; + if (isWhole.equals("1")) { + str += message; + } + System.out.println("签名字符串:" + str); + + // 应用ID + headMap.put("appid", appid); + headMap.put("nonceStr", nonceStr); + headMap.put("time", time); + headMap.put("sign", DzsCodeSign.makeSign(appSecret, str)); + headMap.put("isSecret", isSecret); + headMap.put("isWhole", isWhole); + return headMap; + } + + /** + * 设置body参数 - 判断是否已注册居民码 + */ + private JSONObject isRegBody(String cardType, String cardNo) { + JSONObject jsonObject = new JSONObject(); + // 证件类型 必 + jsonObject.put("cardType", cardType); + // 证件编号 必 + jsonObject.put("cardNo", cardNo); + return jsonObject; + } + + /** + * 设置body参数 - 用户注册 + */ + private JSONObject registerBody(DzsCodeBody body) { + JSONObject jsonObject = new JSONObject(); + return jsonObject; + } + + /** + * 设置body参数 - 根据UID获取居民码 + */ + private JSONObject getCodeByUidBody(String uid) { + JSONObject jsonObject = new JSONObject(); + // 居民码UID 必 + jsonObject.put("uid", uid); + // 经度 + jsonObject.put("longitude", ""); + // 纬度 + jsonObject.put("latitude", ""); + // 县区编码 + jsonObject.put("county", ""); + // 街道 + jsonObject.put("subdistrict", ""); + // 地点 + jsonObject.put("position", ""); + return jsonObject; + } + + /** + * 设置body参数 - 根据证件获取居民码 + */ + private JSONObject getCodeByCardBody(String cardType, String cardNo) { + JSONObject jsonObject = new JSONObject(); + // 证件类型 必 + jsonObject.put("cardType", cardType); + // 证件编号 必 + jsonObject.put("cardNo", cardNo); + // 经度 + jsonObject.put("longitude", ""); + // 纬度 + jsonObject.put("latitude", ""); + // 县区编码 + jsonObject.put("county", ""); + // 街道 + jsonObject.put("subdistrict", ""); + // 地点 + jsonObject.put("position", ""); + return jsonObject; + } + + /** + * 设置body参数 - 解析二维码 + */ + private JSONObject parsingCodeBody(String qrCode) { + JSONObject jsonObject = new JSONObject(); + // 必 + jsonObject.put("QrCode", qrCode); + // 机构编码 必 + jsonObject.put("institutionCode", institutionCode); + // 终端类型(0人工、1自助)必 + jsonObject.put("channelCode", "0"); + // 业务环节 必 + jsonObject.put("businessStepCode", businessStepCode); + // 用码时间 yyyy-MM-dd HH:mm:ss 必 + jsonObject.put("useTime", DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss")); + // 返回值类型(对接时添加,后台的 二维码解析返回值类型)必 + jsonObject.put("returnValueType", "01"); + // 经度 + jsonObject.put("longitude", ""); + // 纬度 + jsonObject.put("latitude", ""); + // 县区编码 + jsonObject.put("county", ""); + // 街道 + jsonObject.put("subdistrict", ""); + // 地点 + jsonObject.put("position", ""); + return jsonObject; + } + + /** + * 设置body参数 - 获取用户信息 + */ + private JSONObject getUserInfoBody(String jmmCode) { + JSONObject jsonObject = new JSONObject(); + // 省居民码授权码 必 + jsonObject.put("jmmCode", jmmCode); + return jsonObject; + } + + /** + * 设置body参数 - 多码互认 二维码识读 + */ + private JSONObject mutualDiscernBody(String qrCode) { + JSONObject jsonObject = new JSONObject(); + // 必 + jsonObject.put("QrCode", qrCode); + // 城市编码 必 + jsonObject.put("useCityCode", useCityCode); + // 机构编码 必 + jsonObject.put("institutionCode", institutionCode); + // 终端类型(0人工、1自助)必 + jsonObject.put("channelCode", "0"); + // 业务环节(接口方提供) 必 + jsonObject.put("businessStepCode", businessStepCode); + // 用卡时间 yyyy-MM-dd HH:mm:ss 必 + jsonObject.put("useTime", DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss")); + // 返回值类型(对接时添加,后台的 二维码解析返回值类型)必 + jsonObject.put("returnValueType", "01"); + // 经度 + jsonObject.put("longitude", ""); + // 纬度 + jsonObject.put("latitude", ""); + // 县区编码 (市辖区:371401 德城区:371402 陵城区:371403 宁津县:371422 庆云县:371423 临邑县:371424 齐河县:371425 平原县:371426 夏津县:371427 武城县:371428 乐陵市:371481 禹城市:371482 天衢新区:371471) + jsonObject.put("county", ""); + // 街道 + jsonObject.put("subdistrict", ""); + // 地点 + jsonObject.put("position", ""); + return jsonObject; + } + +} diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/FDController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/FDController.java index acd2eb1..535617d 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/FDController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/FDController.java @@ -1,9 +1,15 @@ package com.xinelu.web.controller.fd; + import com.alibaba.fastjson2.JSONObject; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.xinelu.applet.dto.chatrecord.ChatRecordDTO; +import com.xinelu.applet.dto.chatrecord.MessageSearchDto; +import com.xinelu.applet.service.chatRecord.IChatRecordService; +import com.xinelu.applet.vo.chatrecord.MessageVo; import com.xinelu.common.core.domain.R; import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; +import com.xinelu.familydoctor.applet.pojo.body.SyncHospitalPersonInfoBody; import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; import com.xinelu.familydoctor.applet.pojo.vo.ResidentRescindApplyVo; import com.xinelu.familydoctor.applet.pojo.vo.ResidentServiceApplyVo; @@ -11,11 +17,20 @@ import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo; import com.xinelu.familydoctor.applet.service.IResidentRescindApplyService; import com.xinelu.familydoctor.applet.service.IResidentServiceAppletService; import com.xinelu.familydoctor.applet.service.IResidentSignAppletService; +import com.xinelu.manage.domain.chatRecord.ChatRecord; +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.manage.service.patientinfo.IPatientInfoService; import com.xinelu.manage.vo.patientinfo.PatientInfoVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -31,8 +46,13 @@ public class FDController { private IResidentSignAppletService residentSignAppletService; @Resource private IResidentServiceAppletService residentServiceAppletService; - @Resource - private IPatientInfoService patientInfoService; + @Resource + private IPatientInfoService patientInfoService; + @Resource + private IHospitalPersonInfoService hospitalPersonInfoService; + @Resource + private IHospitalInfoService hospitalInfoService; + @ApiOperation("服务申请列表") @PostMapping("/performanceBooking/list") @@ -40,6 +60,7 @@ public class FDController { PageHelper.startPage(query.getPageNum(), query.getPageSize()); return R.ok(PageInfo.of(residentServiceAppletService.findList(query))); } + @ApiOperation("服务申请详情") @GetMapping("/performanceBooking/detail/{bookingNo}") public R performanceBookingDetail(@PathVariable String bookingNo) { @@ -66,13 +87,14 @@ public class FDController { @ApiOperation("解约申请列表") @PostMapping("/rescindApply/list") public R> rescindApplyList(@RequestBody ApplyQuery query) { - if(StringUtils.isBlank(query.getUserNo())) { + if (StringUtils.isBlank(query.getUserNo())) { return R.fail("医生编号不能为空"); } PageHelper.startPage(query.getPageNum(), query.getPageSize()); query.setBookingStatus("0"); return R.ok(PageInfo.of(residentRescindApplyService.findList(query))); } + @ApiOperation("解约申请详情") @GetMapping("/rescindApply/detail/{applyNo}") public R rescindApplyDetail(@PathVariable String applyNo) { @@ -92,7 +114,7 @@ public class FDController { @ApiOperation("签约申请列表") @PostMapping("/signBooking/list") public R> signBookingList(@RequestBody ApplyQuery query) { - if(StringUtils.isBlank(query.getUserNo())) { + if (StringUtils.isBlank(query.getUserNo())) { return R.fail("医生编号不能为空"); } PageHelper.startPage(query.getPageNum(), query.getPageSize()); @@ -116,15 +138,66 @@ public class FDController { return R.ok(); } - @ApiOperation("根据签约主键查询绑定编号") - @GetMapping("/signBooking/getBySignNo/{cardNo}") - public R getBySignNo(@PathVariable String cardNo) { - JSONObject retObj = new JSONObject(); + @ApiOperation("根据签约主键查询绑定编号") + @GetMapping("/signBooking/getBySignNo/{cardNo}") + public R getBySignNo(@PathVariable String cardNo) { + JSONObject retObj = new JSONObject(); PatientInfoVO patientInfo = patientInfoService.selectPatientInfoByCardNo(cardNo); - if (patientInfo != null) { - retObj.fluentPut("bindingNo", patientInfo.getPatientCode()) - .fluentPut("openid", patientInfo.getOpenid()); - } - return R.ok(retObj); - } + if (patientInfo != null) { + retObj.fluentPut("bindingNo", patientInfo.getPatientCode()) + .fluentPut("openid", patientInfo.getOpenid()); + } + return R.ok(retObj); + } + + @ApiOperation("家医医生同步科室人员信息") + @PostMapping("/synHospatialPersonInfo") + public R synHospatialPersonInfo(@RequestBody SyncHospitalPersonInfoBody body) { + if (body == null) { + return R.fail("请求参数不能为空"); + } + if (StringUtils.isBlank(body.getPersonCode())) { + return R.fail("科室人员编号不能为空"); + } + if (StringUtils.isBlank(body.getOrgCode())) { + return R.fail("家医机构编号不能为空"); + } + // 判断是否已存在 + HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.getByPersonCode(body.getPersonCode(), body.getStatus()); + // 根据家医机构查询医院信息 + HospitalInfo hospital = hospitalInfoService.getHosptalByOrgCode(body.getOrgCode()); + // 新增 + if (hospitalPersonInfo == null) { + hospitalPersonInfo = new HospitalPersonInfo(); + BeanUtils.copyProperties(body, hospitalPersonInfo); + hospitalPersonInfo.setCreateBy(body.getPersonCode()); + hospitalPersonInfo.setStatus("1"); + if (hospital != null) { + hospitalPersonInfo.setHospitalId(hospital.getId()); + } + hospitalPersonInfoService.insert(hospitalPersonInfo); + + // 修改 + } else { + if (!String.valueOf(hospitalPersonInfo.getPersonAccount()).equals(String.valueOf(body.getPersonAccount())) + || !String.valueOf(hospitalPersonInfo.getPersonPhone()).equals(String.valueOf(body.getPersonPhone())) + || !String.valueOf(hospitalPersonInfo.getPersonName()).equals(String.valueOf(body.getPersonName())) + || !String.valueOf(hospitalPersonInfo.getPersonIntroduce()).equals(String.valueOf(body.getPersonIntroduce())) + || !String.valueOf(hospitalPersonInfo.getCardNo()).equals(String.valueOf(body.getCardNo())) + ) { + hospitalPersonInfo.setPersonName(body.getPersonName()); + hospitalPersonInfo.setPersonPhone(body.getPersonPhone()); + hospitalPersonInfo.setPersonAddress(body.getPersonAddress()); + hospitalPersonInfo.setPersonAccount(body.getPersonAccount()); + hospitalPersonInfo.setPersonIntroduce(body.getPersonIntroduce()); + hospitalPersonInfo.setCardNo(body.getCardNo()); + if (hospital != null) { + hospitalPersonInfo.setHospitalId(hospital.getId()); + } + hospitalPersonInfo.setUpdateBy(body.getPersonCode()); + hospitalPersonInfoService.updateByPersonCode(hospitalPersonInfo); + } + } + return R.ok(); + } } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/utils/DzsCodeSign.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/utils/DzsCodeSign.java new file mode 100644 index 0000000..2b07e79 --- /dev/null +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/fd/utils/DzsCodeSign.java @@ -0,0 +1,98 @@ +package com.xinelu.web.controller.fd.utils; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.util.HexUtil; +import com.tzwy.hmac.sm3.utils.Sm3HmacUtils; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.io.UnsupportedEncodingException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Random; + +/** + * @Author mengkuiliang + * @Description 德州市居民码签名工具类 + * @Date 2023-06-08 16:45 + * @Param + * @return + **/ +@Slf4j +@Component +public class DzsCodeSign { + + /** + * @return java.lang.String + * @Author mengkuiliang + * @Description 生成签名 + * @Date 2023-06-08 16:40 + * @Param [appId, appSecret, isWhole] + **/ + public static String createSign(String appId, String appSecret, String isWhole, String message) { + SimpleDateFormat formater = new SimpleDateFormat("yyyyMMddHHmmss"); + String str; + if(isWhole.equals("0")) { + str = appId + "&" + formater.format(new Date()) + "&" + getRandomString(10); + } else { + // message前边没有 & + str = appId + "&" + formater.format(new Date()) + "&" + getRandomString(10) + message; + } + System.out.println("签名字符串:" + str); + return makeSign(appSecret, str); + } + + /** + * @return boolean + * @Author mengkuiliang + * @Description 验证签名 + * @Date 2023-06-08 16:43 + * @Param [str, appSecret, sign] + **/ + public static boolean verifySign(String str, String appSecret, String sign) { + String signS = makeSign(appSecret, str); + return signS.equals(sign); + } + + /** + * 生成指定长度的随机字符串 + */ + public static String getRandomString(int length) { + String str = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + Random random = new Random(); + StringBuffer sb = new StringBuffer(); + for (int i = 0; i < length; i++) { + int number = random.nextInt(62); + sb.append(str.charAt(number)); + } + return sb.toString(); + } + + /** + * 生成签名 + */ + public static String makeSign(String appSecret, String str) { + try { + byte[] sm3Sign = Sm3HmacUtils.calcMac(HexUtil.decodeHex(appSecret), str.getBytes("UTF-8")); + return Base64.encode(sm3Sign); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + public static void main(String[] args) throws UnsupportedEncodingException { + + String appSecret = "74cb380c19b5448da4d7a1ef505089c4"; + String appid = "lhw8570wl9zojyou6zv6"; +// String time = DateUtils.formatDate(new Date(), "yyyyMMddHHmmss"); + String time = "20230609165045"; +// String nonceStr = DzsCodeSign.getRandomString(10); + String nonceStr = "8EqtkddxC2"; + String str = appid + "&" + time + "&" + nonceStr; + String signS = makeSign(appSecret, str); + System.out.println(signS); + + // JAlMiqpak3hwtTa+OzlWPcTuE2sSwn+F/I0j5/Cu3Mg= + } +} diff --git a/xinelu-admin/src/main/resources/application.yml b/xinelu-admin/src/main/resources/application.yml index fb063b6..479d194 100644 --- a/xinelu-admin/src/main/resources/application.yml +++ b/xinelu-admin/src/main/resources/application.yml @@ -163,7 +163,7 @@ token: # 令牌有效期(默认30分钟) expireTime: 1440 #请求拦截白名单 - ant-matchers: /nurseApplet/**,/nurseApp/**,/applet/**,webSocket/** + ant-matchers: /nurseApplet/**,/nurseApp/**,/applet/**,webSocket/**,/message/** # MyBatis-Plus配置 mybatis-plus: @@ -249,8 +249,8 @@ xss: # 家医配置 fd: - dy: http://192.168.124.6:8001/fd/mp - dz: http://192.168.124.6:8001/fd/mp + dz: http://8.131.93.145:54089/fd/mp + dy: http://8.131.93.145:54089/fd/mp # 签约附近的机构多少公里内 <=0时不限制 distance: 0 @@ -315,4 +315,23 @@ we-chat-payment-url-config: 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 + express-bird-url: https://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx + +# 德州市鲁通码接口配置 +dzsCode: + appid: lhw8570wl9zojyou6zv6 + appSecret: 74cb380c19b5448da4d7a1ef505089c4 + # 接口服务 + url: https://dsjj.dezhou.gov.cn/dzjmm/code + # 多码互认 + mutualUrl: https://dsjj.dezhou.gov.cn/dzjmm/mutual + # 传输数据是否要加密(0:否1:是) + isSecret: 0 + # 是否校验完整性(0:否1:是) 当为1时:sign的生成入参包括message + isWhole: 0 + # 机构编码 + institutionCode: 1137140000440159XP + # 城市编码 德州市 + useCityCode: 371400 + # 业务场景 + businessStepCode: 302 diff --git a/xinelu-admin/src/main/resources/lib/hmac-1.0.jar b/xinelu-admin/src/main/resources/lib/hmac-1.0.jar new file mode 100644 index 0000000..492272f Binary files /dev/null and b/xinelu-admin/src/main/resources/lib/hmac-1.0.jar differ diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/AppletChatConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/AppletChatConfig.java index d2c2b96..f726231 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/config/AppletChatConfig.java +++ b/xinelu-common/src/main/java/com/xinelu/common/config/AppletChatConfig.java @@ -64,4 +64,5 @@ public class AppletChatConfig { * 签到通知模板 */ private String signTemplateId; + } diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/MessageTemplateType.java b/xinelu-common/src/main/java/com/xinelu/common/enums/MessageTemplateType.java new file mode 100644 index 0000000..b1ba81c --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/enums/MessageTemplateType.java @@ -0,0 +1,79 @@ +package com.xinelu.common.enums; + +import lombok.Getter; + +import java.util.*; + +/** + * @Author mengkuiliang + * @Description 订阅消息枚举 + * @Date 2023-01-11 17:32 + * @Param + * @return + **/ +@Getter +public enum MessageTemplateType { + + JTYSXXTZ("1", "家庭医生消息通知", "8InV9jXDT5sMj9OWfXEvlLQGlw2UaWfZ9OBMFxufmfk", "默认通知模版"), + + YYTX_1("9", "用药提醒", "2wn1BssReKjZasxKKZRWxBN0VqSmGmkuhc3AhTr18I0", "提醒居民用药"), + + YYCGTZ("10", "预约成功", "MSSKCxOdtMUkY1ACu-u3itz8Vh_w5xDkO2llAOGwElU", "筛查项目预约成功"); + + + /** + * 模版类型 + */ + private final String type; + + /** + * 标题 + */ + private final String title; + /** + * 模版ID + */ + private final String templateId; + /** + * 说明 + */ + private final String description; + + MessageTemplateType(String type,String title, String templateId, String description) { + this.type = type; + this.title = title; + this.templateId = templateId; + this.description = description; + } + + public static MessageTemplateType getFolllowupTypeByCode(String type) { + for (MessageTemplateType templateType : MessageTemplateType.values()) { + if (type.equals(templateType.getType())) { + return templateType; + } + } + return MessageTemplateType.JTYSXXTZ; + } + + + /** + * 获得所有枚举类型到list + */ + public static List getAllToList() { + List list = new ArrayList<>(); + MessageTemplateType[] values = values(); + Collections.addAll(list, values); + return list; + } + + /** + * 获得所有枚举类型到map + */ + public static Map getAllToMap() { + Map map = new HashMap<>(); + for (MessageTemplateType templateType : values()) { + map.put(templateType.getType(), templateType); + } + return map; + } +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/MessageTypePath.java b/xinelu-common/src/main/java/com/xinelu/common/enums/MessageTypePath.java new file mode 100644 index 0000000..0f1a62c --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/enums/MessageTypePath.java @@ -0,0 +1,45 @@ +package com.xinelu.common.enums; + +import lombok.Getter; +import org.apache.commons.lang3.StringUtils; + +/** + * @Author haown + * @Description 订阅消息跳转路径枚举类 + * @Date 2023-05-11 17:32 + * @return + **/ +@Getter +public enum MessageTypePath { + //消息类型,1:健康推送,2:日常提醒, 3:风险评估完成, 4:推送筛查项目,5:预约筛查成功, 6:筛查完成, + // 7:康复处方,8:随访提醒,9:纳入管理,10:申请转诊,11:转诊申请通过,12:申请会诊,13:会诊申请通过,14:处理异常" + JKTS("1", "pages/index/index"), + RCTX("2", "pages/dailyhealth/dailyhealth"), + FXPG("3", "pages/index/index"), + SCXM("4", "pagesB/screeningUserInfo/screeningUserInfo?assessRecordId="), + YYCG("5", "pages/index/index"), + SCWC("6", "pages/screeningResult/screeningResult?screeningId="), + KFCF("7", "pages/boughtRecoveryPrescription/boughtRecoveryPrescription?prescriptionRecordId="), + DEFAULT("0", "pages/index/index"); + + private final String messageType; + + private final String path; + + MessageTypePath(String messageType, String path) { + this.messageType = messageType; + this.path = path; + } + + public static MessageTypePath getPathByType(String type) { + if(StringUtils.isBlank(type)) { + return MessageTypePath.DEFAULT; + } + for (MessageTypePath typePath : MessageTypePath.values()) { + if (type.equals(typePath.getMessageType())) { + return typePath; + } + } + return MessageTypePath.DEFAULT; + } +} diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/RegionKeyType.java b/xinelu-common/src/main/java/com/xinelu/common/enums/RegionKeyType.java index 3aecc6a..acaae97 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/enums/RegionKeyType.java +++ b/xinelu-common/src/main/java/com/xinelu/common/enums/RegionKeyType.java @@ -35,6 +35,6 @@ public enum RegionKeyType { return uploadType; } } - throw new ServiceException("获取区域配置出错"); + throw new ServiceException("未查询到区域配置"); } } diff --git a/xinelu-common/src/main/java/com/xinelu/common/enums/SurveySubjectEnum.java b/xinelu-common/src/main/java/com/xinelu/common/enums/SurveySubjectEnum.java new file mode 100644 index 0000000..29109f3 --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/enums/SurveySubjectEnum.java @@ -0,0 +1,32 @@ +package com.xinelu.common.enums; +/** + * @description: 问卷主题枚举 + * @author gaoyu + * @date 2023-10-11 10:44 + */ +public enum SurveySubjectEnum { + HBP_EVALUATE("1001", "高血压评估问卷"), + BG_EVALUATE("1002", "糖尿病评估问卷"), + STOKE_EVALUATE("1003", "脑卒中评估问卷"), + COPD_EVALUATE("1004", "慢阻肺评估问卷"), + CHRONIC_EVALUATE("1005", "慢病评估问卷"), + NS_EVALUATE("1006", "糖尿病肾病评估问卷"), + ED_EVALUATE("1007", "糖尿病眼病评估问卷"), + FD_EVALUATE("1008", "糖尿病足病评估问卷"); + + private final String code; + private final String label; + + SurveySubjectEnum(String code, String label) { + this.code = code; + this.label = label; + } + + public String getCode() { + return code; + } + + public String getLabel() { + return label; + } +} 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 f22b454..c25a523 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 @@ -79,7 +79,7 @@ public class HttpUtils { while ((line = in.readLine()) != null) { result.append(line); } - log.info("recv - {}", result); +// log.info("recv - {}", result); } catch (ConnectException e) { log.error("调用HttpUtils.sendGet ConnectException, url=" + url + ",param=" + param, e); } catch (SocketTimeoutException e) { @@ -130,7 +130,7 @@ public class HttpUtils { while ((line = in.readLine()) != null) { result.append(line); } - log.info("recv - {}", result); +// log.info("recv - {}", result); } catch (ConnectException e) { log.error("调用HttpUtils.sendPost ConnectException, url=" + url + ",param=" + param, e); } catch (SocketTimeoutException e) { @@ -182,7 +182,7 @@ public class HttpUtils { result.append(new String(ret.getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8)); } } - log.info("recv - {}", result); +// log.info("recv - {}", result); conn.disconnect(); br.close(); } catch (ConnectException e) { diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/map/MapUtil.java b/xinelu-common/src/main/java/com/xinelu/common/utils/map/MapUtil.java new file mode 100644 index 0000000..fe5652c --- /dev/null +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/map/MapUtil.java @@ -0,0 +1,72 @@ +package com.xinelu.common.utils.map; + +import java.lang.reflect.Field; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @Author mengkuiliang + * @Description Obj转Map + * @Date 2022-04-27 13:39 + * @Param + * @return + **/ +public class MapUtil { + /** + * Pojo -> Map + * + * @param obj + * @return + * @throws Exception + */ + public static Map object2Map(Object obj) throws Exception { + Map map = new HashMap(); + Field[] fields = obj.getClass().getDeclaredFields(); + for (Field field : fields) { + field.setAccessible(true); + map.put(field.getName(), field.get(obj)); + } + return map; + } + + /** + * List --> List> + * + * @param objectList + * @param + * @return + * @throws Exception + */ + public static List> objectList2ListMap(List objectList) throws Exception { + ArrayList> resultList = new ArrayList<>(); + Map map = new HashMap<>(); + for (T t : objectList) { + resultList.add(object2Map(t)); + } + return resultList; + } + + /** + * List --> Map> + * + * @param objectList + * @param keyName + * @param + * @return + * @throws Exception + */ + public static Map> objectList2MapList(List objectList, String[] keyName) throws Exception { + Map> resultMap = new HashMap<>(); + for (int i = 0; i < keyName.length; i++) { + List arrayList = new ArrayList<>(); + // List有序,所以对每个对象依次变为map,然后得到对应的值,存入arrayList + for (T t : objectList) { + arrayList.add(object2Map(t).get(keyName[i])); + } + resultMap.put(keyName[i], arrayList);//将keyName和对应List集合存入resultMap + } + return resultMap; + } +} diff --git a/xinelu-familydoctor/pom.xml b/xinelu-familydoctor/pom.xml index d7a4b4c..2ed898b 100644 --- a/xinelu-familydoctor/pom.xml +++ b/xinelu-familydoctor/pom.xml @@ -39,6 +39,10 @@ com.xinelu xinelu-nurse-manage + + com.xinelu + xinelu-nurse-applet + com.xinelu xinelu-nurse-applet 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 1a5eccc..e656909 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 @@ -103,4 +103,5 @@ public interface ResidentPatientInfoMapper { *@return PatientInfo **/ PatientInfo getPatientInfoByPatientCode(String patientCode); + } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/DzsCodeBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/DzsCodeBody.java new file mode 100644 index 0000000..47cf84e --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/DzsCodeBody.java @@ -0,0 +1,66 @@ +package com.xinelu.familydoctor.applet.pojo.body; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 德州市居民码请求对象 + * @Date 2023-06-09 9:45 + * @Param + * @return + **/ +@Data +@ApiModel("德州市居民码请求对象") +public class DzsCodeBody { + + @ApiModelProperty(value = "二维码信息") + private String qrCode; + + @ApiModelProperty(value = "姓名", required = true) + private String name; + + @ApiModelProperty(value = "证件类型", required = true) + private String cardType; + + @ApiModelProperty(value = "证件号码", required = true) + private String cardNo; + + @ApiModelProperty(value = "电话号码", required = true) + private String phone; + + @ApiModelProperty(value = "民族 (01:汉族 02:蒙古族 03:回族 04:藏族 05:维吾尔族 06:苗族 07:彝族 08:壮族 09:布依族 10:朝鲜族 11:满族 12:侗族 13:瑶族 14:白族 15:土家族 16:哈尼族 17:哈萨克族 18:傣族 19:黎族 20:傈僳族 21:佤族 22:畲族 23:高山族 24:拉祜族 25:水族 26:东乡族 27:纳西族 28:景颇族 29:柯尔柯孜族 30:土族 31:达尔族 32:仫佬族 33:羌族 34:布朗族 35:撒拉族 36:毛南族 37:仡佬族 38:锡伯族 39:阿昌族 40:普米族 41:塔吉克族 42:怒族 43:乌孜别克族 44:俄罗斯族 45:鄂温克族 46:德昂族 47:保安族 48:裕固族 49:京族 50:塔塔尔族 51:独龙族 52:鄂伦春族 53:赫哲族 54:门巴族 55:珞巴族 56:基诺族 97:其他未识别的民族)", required = true) + private String nation; + + @ApiModelProperty(value = "性别 (1:男 2:女 9:未说明性别 )", required = true) + private String sex; + + @ApiModelProperty(value = "注册途径(11:APP 12:微信公众帐号 13:支付宝服务号 21:自助机 31:窗口 41:批量处理)", required = true) + private String regChannel; + + @ApiModelProperty(value = "注册模式(1线上、2线下)", required = true) + private String regMode; + + @ApiModelProperty(value = "个人审核材料上传地址(身份证时可空;非身份证时必填)") + private String path; + + @ApiModelProperty(value = "绑卡类型(对接时添加,后台字典的 证件类型--可绑定证)") + private String bindCardType; + + @ApiModelProperty(value = "绑卡卡号") + private String bindCardNo; + + @ApiModelProperty(value = "出生年月(yyyyMM 证件类型是身份证时可空,非身份证时必填)") + private String birthday; + + @ApiModelProperty(value = "地区编码") + private String addressAreaCode; + + @ApiModelProperty(value = "用户uid(调用省居民码接口返回)", required = true) + private String uid; + + @ApiModelProperty(value = "用户id(调用省居民码接口返回)", required = true) + private String qcUserId; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/MessagePushBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/MessagePushBody.java new file mode 100644 index 0000000..9313ae6 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/MessagePushBody.java @@ -0,0 +1,90 @@ +package com.xinelu.familydoctor.applet.pojo.body; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 消息推送请求对象 + * @Date 2023-10-18 018 14:26 + * @Param + * @return + **/ +@Data +@ApiModel(value = "消息推送请求对象") +public class MessagePushBody { + + /** + * 消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知 + */ + @ApiModelProperty(value = "消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知") + private String messageCategory; + + /** + * 业务类型(1: 默认 9:申请 10:用药提醒通知) + */ + @ApiModelProperty(value = "务类型(1: 家医默认通知 10:申请通知 9:用药提醒通知)") + private String busType; + + /** + * 身份证号 + */ + @ApiModelProperty(value = "cardNo") + private String cardNo; + + /** + * openid + */ + @ApiModelProperty(value = "openid") + private String openid; + + /** + * 发送人 + */ + @ApiModelProperty(value = "发送人") + private String senderName; + + /** + * 发送标题 + */ + @ApiModelProperty(value = "发送标题") + private String sendTitle; + + /** + * 发送内容 + */ + @ApiModelProperty(value = "发送内容") + private String sendContent; + + /** + * 发送时间(yyyy-MM-dd HH:mm:ss) + */ + @ApiModelProperty(value = "发送时间(yyyy-MM-dd HH:mm:ss)") + private String sendTime; + + /** + * 接收人 + */ + @ApiModelProperty(value = "接收人") + private String receiveName; + + /** + * 发送内容1 + */ + @ApiModelProperty(value = "发送内容1") + private String text1; + + /** + * 发送内容2 + */ + @ApiModelProperty(value = "发送内容2") + private String text2; + + /** + * 发送内容3 + */ + @ApiModelProperty(value = "发送内容3") + private String text3; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/PatientInfoBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/PatientInfoBody.java index a379a27..1b23687 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/PatientInfoBody.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/PatientInfoBody.java @@ -250,4 +250,21 @@ public class PatientInfoBody extends BaseEntity { @ApiModelProperty(value = "当前是否选中(0: 否 1:是)", hidden = true) private String isChecked; + /** + * 与户主关系 (1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;) + */ + @ApiModelProperty(value = "与户主关系 (1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;)") + private String householdRelationship; + + /** + * 户主身份证号 + */ + @ApiModelProperty(value = "户主身份证号") + private String householdCardNo; + + /** + * 签约编号 + */ + @ApiModelProperty(value = "签约编号") + private String signNo; } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/SyncHospitalPersonInfoBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/SyncHospitalPersonInfoBody.java new file mode 100644 index 0000000..4abface --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/SyncHospitalPersonInfoBody.java @@ -0,0 +1,115 @@ +package com.xinelu.familydoctor.applet.pojo.body; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @Author mengkuiliang + * @Description 同步科室人员信息请求对象 + * @Date 2023-10-20 020 14:18 + * @Param + * @return + **/ +@Data +@ApiModel(value = "同步科室人员信息请求对象") +public class SyncHospitalPersonInfoBody { + + /** + * 所属医院id + */ + @ApiModelProperty(value = "所属医院id") + private Long hospitalId; + + /** + * 所属部门id + */ + @ApiModelProperty(value = "所属部门id") + private Long departmentId; + + /** + * 科室人员编码 + */ + @ApiModelProperty(value = "科室人员编码") + private String personCode; + + /** + * 科室人员名称 + */ + @ApiModelProperty(value = "科室人员名称") + private String personName; + + /** + * 科室人员联系电话 + */ + @ApiModelProperty(value = "科室人员联系电话") + private String personPhone; + + /** + * 科室人员地址 + */ + @ApiModelProperty(value = "科室人员地址") + private String personAddress; + + /** + * 身份证号 + */ + @ApiModelProperty(value = "身份证号") + private String cardNo; + + /** + * 人员职称,主任医师:CHIEF_PHYSICIAN,副主任医师:DEPUTY_CHIEF_PHYSICIAN,主治医师:ATTENDING_DOCTOR,医师:PHYSICIAN,医士:HEALER,住院医师:RESIDENT_PHYSICIAN + */ + @ApiModelProperty(value = "人员职称,主任医师:CHIEF_PHYSICIAN,副主任医师:DEPUTY_CHIEF_PHYSICIAN,主治医师:ATTENDING_DOCTOR,医师:PHYSICIAN,医士:HEALER,住院医师:RESIDENT_PHYSICIAN") + private String academicTitle; + + /** + * 咨询费用 + */ + @ApiModelProperty(value = "咨询费用") + private BigDecimal consultingFee; + + /** + * 个人简介 + */ + @ApiModelProperty(value = "个人简介") + private String personIntroduce; + + /** + * 显示顺序 + */ + @ApiModelProperty(value = "显示顺序") + private Integer personSort; + + /** + * 科室人员头像地址 + */ + @ApiModelProperty(value = "科室人员头像地址") + private String personPictureUrl; + + /** + * 科室人员账号 + */ + @ApiModelProperty(value = "科室人员账号") + private String personAccount; + + /** + * 科室人员密码 + */ + @ApiModelProperty(value = "科室人员密码") + private String personPassword; + + /** + *1:家医医生 2:泉医医生 3:专病医生 + */ + @ApiModelProperty(value = "1:家医医生 2:泉医医生 3:专病医生") + private String status; + + /** + *1:家医机构编号 + */ + @ApiModelProperty(value = "家医机构编号") + private String orgCode; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/FDMessageDto.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/FDMessageDto.java new file mode 100644 index 0000000..5919e50 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/FDMessageDto.java @@ -0,0 +1,66 @@ +package com.xinelu.familydoctor.applet.pojo.dto; + +import com.xinelu.applet.dto.chatrecord.ChatRecordDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 发家医送订阅消息传输对象 + * @Date 2023-10-19 019 10:14 + * @Param + * @return + **/ +@ApiModel("发家医送订阅消息传输对象") +@Data +public class FDMessageDto extends FDMessageExtentDto { + + @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知") + private String messageCategory; + + @ApiModelProperty("通知适用人群(0:全部人群)") + private String crowds; + + @ApiModelProperty(value = "发送人编号", required = true) + private String senderNo; + + @ApiModelProperty("发送人身份证号") + private String senderIdentity; + + @ApiModelProperty("发送人姓名") + private String senderName; + + @ApiModelProperty(value = "发送时间(yyyy-MM-dd HH:mm:ss)", hidden = true) + private String sendTime; + + @ApiModelProperty(value = "接收人编号") + private String recipientNo; + + @ApiModelProperty("接收人身份证号") + private String recipientIdentity; + + @ApiModelProperty("接收人姓名") + private String recipientName; + + @ApiModelProperty("消息类型,1:健康推送,2:日常提醒, 3:风险评估完成, 4:推送筛查项目,5:预约筛查成功, 6:筛查完成,7:康复处方,8:随访提醒,9:纳入管理,10:申请转诊,11:转诊申请通过,12:申请会诊,13:会诊申请通过,14:处理异常") + private String messageType; + + @ApiModelProperty("标题") + private String title; + + @ApiModelProperty("消息内容") + private String content; + + @ApiModelProperty("消息内容Id用于点击跳转") + private String contentId; + + @ApiModelProperty("消息来源") + private String source; + + @ApiModelProperty(value = "模版类型(MessageTemplateType枚举)", required = true) + private String templateType; + + @ApiModelProperty("消息记录对象") + ChatRecordDTO chatRecord; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/FDMessageExtentDto.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/FDMessageExtentDto.java new file mode 100644 index 0000000..ce505f0 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/FDMessageExtentDto.java @@ -0,0 +1,43 @@ +package com.xinelu.familydoctor.applet.pojo.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 家医订阅消息请求参数扩展类 + * @Date 2023-10-19 019 10:15 + * @Param + * @return + **/ +@Data +public class FDMessageExtentDto { + + @ApiModelProperty("居民姓名") + private String residentName; + + @ApiModelProperty("医院名称") + private String hospitalName; + + @ApiModelProperty("医生名称") + private String doctorName; + + @ApiModelProperty("团队名称") + private String teamName; + + @ApiModelProperty("申请内容(比如:申请签约、申请随访、申请转诊等)") + private String applyContent; + + @ApiModelProperty("申请结果(比如:成功、失败、处理中等)") + private String applyResult; + + @ApiModelProperty("处理时间") + private String handleDate; + + @ApiModelProperty("药品名称") + private String drugName; + + @ApiModelProperty("药品用法") + private String drugUsage; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/PatientInfo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/PatientInfo.java index 1fd7df9..c73c8ca 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/PatientInfo.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/PatientInfo.java @@ -288,6 +288,23 @@ public class PatientInfo extends BaseEntity { @Excel(name = "当前是否选中(0: 否 1:是)") private String isChecked; + /** + * 与户主关系 (1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;) + */ + @ApiModelProperty(value = "与户主关系 (1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;与户主关系 1.户主本人;2.配偶;3.子女;4.(外)孙子女;5.父母;6.(外)祖父母;7.兄弟姐妹;8.儿媳;9.女婿;10.孙子女;11.侄子女;12.曾孙子女;13.祖父母;99.其他;)") + private String householdRelationship; + + /** + * 户主身份证号 + */ + @ApiModelProperty(value = "户主身份证号") + private String householdCardNo; + + /** + * 签约编号 + */ + @ApiModelProperty(value = "签约编号") + private String signNo; @Override public String toString() { @@ -331,6 +348,8 @@ public class PatientInfo extends BaseEntity { .append("cityCode", getCityCode()) .append("bindingTime", getBindingTime()) .append("isChecked", getIsChecked()) + .append("householdRelationship", getHouseholdRelationship()) + .append("householdCardNo", getHouseholdCardNo()) .toString(); } } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/DzsCodeQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/DzsCodeQuery.java new file mode 100644 index 0000000..57f35e9 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/DzsCodeQuery.java @@ -0,0 +1,36 @@ +package com.xinelu.familydoctor.applet.pojo.query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 德州市居民码查询对象 + * @Date 2023-06-09 9:45 + * @Param + * @return + **/ +@Data +@ApiModel("德州市居民码查询对象") +public class DzsCodeQuery { + + @ApiModelProperty(value = "接口名称(判断是否已注册居民码:isReg; 居民码用户注册:register; 根据UID获取居民码:getCodeByUid; 解析居民码二维码:parsingCode; 根据证件获取居民码:getCodeByCard; 获取用户信息:getUserInfo;)", required = true) + String interfaceName; + + @ApiModelProperty("省居民码授权码") + String jmmCode; + + @ApiModelProperty("用户标识") + String uid; + + @ApiModelProperty("证件类型(01:居民身份证; 03: 外国护照; 06: 港澳居民来往内地通行证; 07: 台湾居民来往内地通行证;)") + String cardType; + + @ApiModelProperty("证件号") + String cardNo; + + @ApiModelProperty("二维码") + String qrCode; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PatientInfoQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PatientInfoQuery.java index f004673..d8e4917 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PatientInfoQuery.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PatientInfoQuery.java @@ -71,4 +71,9 @@ public class PatientInfoQuery extends BaseEntity { @ApiModelProperty(value = "当前是否选中(0: 否 1:是)") private String isChecked; + /** + * 户主身份证号 + */ + @ApiModelProperty(value = "户主身份证号") + private String householdCardNo; } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ServiceRecordQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ServiceRecordQuery.java new file mode 100644 index 0000000..3a8998e --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/ServiceRecordQuery.java @@ -0,0 +1,74 @@ +package com.xinelu.familydoctor.applet.pojo.query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 服务记录查询类 + * @Date 2023-10-17 017 14:50 + * @Param + * @return + **/ +@Data +@ApiModel("服务记录查询类") +public class ServiceRecordQuery { + + /** + * 身份证号 + */ + @ApiModelProperty(value = "身份证号", hidden = true) + private String identity; + + /** + * 服务包编号 + */ + @ApiModelProperty(value = "服务包编号") + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称") + private String packageName; + + /** + * 服务项编号 + */ + @ApiModelProperty(value = "服务项编号") + private String formNo; + + /** + * 服务项名称 + */ + @ApiModelProperty(value = "服务项名称") + private String formName; + + /** + * 开始日期(yyyy-MM-dd) + */ + @ApiModelProperty(value = "开始日期(yyyy-MM-dd)") + private Date startDate; + + /** + * 结束日期(yyyy-MM-dd) + */ + @ApiModelProperty(value = "结束日期(yyyy-MM-dd)") + private Date endDate; + + /** + * 页码 + */ + @ApiModelProperty("页码") + private Integer pageNum; + + /** + * 页面大小 + */ + @ApiModelProperty("页面大小") + private Integer pageSize; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/DoctorDetailVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/DoctorDetailVo.java index 89e25e0..7f55739 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/DoctorDetailVo.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/DoctorDetailVo.java @@ -149,10 +149,10 @@ public class DoctorDetailVo { private String phOrgId; /** - * 公卫机构编号 + * 家医机构编号 */ - @ApiModelProperty("公卫机构编号") - private String phOrgCode; + @ApiModelProperty("家医机构编号") + private String orgCode; /** * 个人简介 diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrderEvaluateVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrderEvaluateVo.java new file mode 100644 index 0000000..9369245 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrderEvaluateVo.java @@ -0,0 +1,56 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 履约记录-小程序评价列表展示类 + * @Date 2023-10-18 16:43 + * @Param + * @return + **/ +@ApiModel("履约记录-小程序评价列表展示类") +@Data +public class OrderEvaluateVo { + + /** + * 居民身份证号 + */ + @ApiModelProperty(value = "居民身份证号") + private String cardNo; + + /** + * 订单编号 + */ + @ApiModelProperty(value = "订单编号") + private String orderNo; + + /** + * 订单状态 + */ + @ApiModelProperty(value = "订单状态") + private String orderStatus; + + /** + * 订单名称 + */ + @ApiModelProperty(value = "订单名称") + private String orderName; + + /** + * 订单类型 + */ + @ApiModelProperty(value = "订单类型") + private String orderType; + + /** + * 下单时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiModelProperty(value = "下单时间") + private String createTime; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrgDetailVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrgDetailVo.java index 36aad3d..9a1f327 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrgDetailVo.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/OrgDetailVo.java @@ -59,10 +59,10 @@ public class OrgDetailVo { private String phOrgId; /** - * 公卫机构编码 + * 家医机构编码 */ - @ApiModelProperty("公卫机构编码") - private String phOrgCode; + @ApiModelProperty("家医机构编码") + private String orgCode; /** * 机构类型(0:卫健委,1:卫健局,2:医院,3:乡镇卫生院,4:街道卫生服务中心,5:社区服务站,6:村卫生室) diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceApplyVo.java index 608a42a..ddaccc5 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 @@ -156,15 +156,38 @@ public class ResidentServiceApplyVo { private String signNo; /** - * 评价编号 + * 预约机构编号 */ - @ApiModelProperty("评价编号") - private String evaluateNo; + @ApiModelProperty(value = "预约机构编号", required = true) + private String orgNo; /** - * 服务评价对象 + * 预约机构名称 */ - @ApiModelProperty("服务评价对象") - OrderEvaluateInfoVo orderEvaluateInfo; + @ApiModelProperty(value = "预约机构名称", required = true) + private String orgName; + /** + * 预约团队编号 + */ + @ApiModelProperty(value = "预约团队编号", required = true) + private String teamNo; + + /** + * 预约团队名称 + */ + @ApiModelProperty(value = "预约团队名称", required = true) + private String teamName; + + /** + * 预约医生编号 + */ + @ApiModelProperty(value = "预约医生编号", required = true) + private String userNo; + + /** + * 预约医生姓名 + */ + @ApiModelProperty(value = "预约医生姓名", required = true) + private String userName; } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceRecordVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceRecordVo.java new file mode 100644 index 0000000..5aeecdd --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentServiceRecordVo.java @@ -0,0 +1,194 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.xinelu.manage.domain.orderevaluateinfo.OrderEvaluateInfo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 服务记录展示类 + * @Date 2023-10-17 017 11:32 + * @Param + * @return + **/ +@ApiModel("服务记录展示类") +@Data +public class ResidentServiceRecordVo { + + /** + * 履约业务主键 + */ + @ApiModelProperty(value = "履约业务主键") + private String performanceNo; + + /** + * 签约编号 + */ + @ApiModelProperty(value = "签约编号") + private String signNo; + + /** + * 居民编号 + */ + @ApiModelProperty(value = "居民编号") + private String residentNo; + + /** + * 居民身份证号 + */ + @ApiModelProperty(value = "居民身份证号") + private String identity; + + /** + * 居民姓名 + */ + @ApiModelProperty(value = "居民姓名") + private String residentName; + + + /** + * 履约明细业务主键 + */ + @ApiModelProperty(value = "履约明细业务主键") + private String performanceDetailNo; + + /** + * 服务包明细业务主键 + */ + @ApiModelProperty(value = "服务包明细业务主键") + private String packageDetailNo; + + /** + * 服务包编号 + */ + @ApiModelProperty(value = "服务包编号", required = true) + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称", required = true) + private String packageName; + + /** + * 服务项表单编号 + */ + @ApiModelProperty(value = "服务项表单编号") + private String formNo; + + /** + * 服务项表单名称 + */ + @ApiModelProperty(value = "服务项表单名称") + private String formName; + + /** + * 履约时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiModelProperty(value = "履约时间") + private Date performanceTime; + + /** + * 随访时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @ApiModelProperty(value = "随访时间") + private Date followupTime; + + /** + * 下次履约时间 + */ + @ApiModelProperty(value = "下次履约时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date performanceNextTime; + + /** + * 机构业务编号 + */ + @ApiModelProperty(value = "机构业务编号") + private String orgNo; + + /** + * 机构名称 + */ + @ApiModelProperty(value = "机构名称", required = true) + private String orgName; + + /** + * 团队业务编号 + */ + @ApiModelProperty(value = "团队业务编号", required = true) + private String teamNo; + + /** + * 团队名称 + */ + @ApiModelProperty(value = "团队名称", required = true) + private String teamName; + + /** + * 履约医生 + */ + @ApiModelProperty(value = "履约医生") + private String userNo; + + /** + * 履约医生名称 + */ + @ApiModelProperty(value = "履约医生名称") + private String userName; + + /** + * 下次随访日期 + */ + @ApiModelProperty(value = "下次随访日期") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + private Date followupNextTime; + + /** + * 履约方式(1:家庭,2:门诊,3:电话,99:其他) + */ + @ApiModelProperty(value = "履约方式(1:家庭,2:门诊,3:电话,99:其他)") + private String performanceWay; + + /** + * 履约方式名称(1:家庭,2:门诊,3:电话,99:其他) + */ + @ApiModelProperty(value = "履约方式(1:家庭,2:门诊,3:电话,99:其他)") + private String performanceWayName; + + /** + * 生成方式(1:手动添加 2:随访自动同步) + */ + @ApiModelProperty(value = "生成方式(1:手动添加 2:随访自动同步)") + private String generateWay; + + /** + * 生成方式名称(1:手动添加 2:随访自动同步) + */ + @ApiModelProperty(value = "生成方式(1:手动添加 2:随访自动同步)") + private String generateWayName; + + /** + * 应服务次数 + */ + @ApiModelProperty(value = "应服务次数") + private Integer serviceFreq; + + /** + * 已履约次数 + */ + @ApiModelProperty(value = "已履约次数") + private Integer performanceCount; + + /** + * 服务评价对象 + */ + @ApiModelProperty("服务评价对象") + OrderEvaluateInfo orderEvaluateInfo; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentSignAppletService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentSignAppletService.java index 8ebf01d..dab39ae 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentSignAppletService.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentSignAppletService.java @@ -3,6 +3,7 @@ package com.xinelu.familydoctor.applet.service; import com.github.pagehelper.PageInfo; import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody; +import com.xinelu.familydoctor.applet.pojo.body.SyncHospitalPersonInfoBody; import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo; 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 ffcee50..67fae22 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 @@ -8,16 +8,19 @@ import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.xinelu.applet.dto.appletlogin.AppletUserInfoDTO; import com.xinelu.common.config.AppletChatConfig; +import com.xinelu.common.core.domain.R; import com.xinelu.common.entity.AppletPhoneVO; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.http.HttpService; import com.xinelu.common.utils.http.HttpUtils; import com.xinelu.common.utils.http.SslUtils; +import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.familydoctor.applet.mapper.ResidentPatientInfoMapper; import com.xinelu.familydoctor.applet.pojo.body.PatientInfoBody; import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo; +import com.xinelu.familydoctor.applet.pojo.vo.SignInfoDetailVo; import com.xinelu.familydoctor.applet.service.IResidentPatientInfoService; import com.xinelu.familydoctor.applet.utils.AppletAccessTokenUtils; import com.xinelu.manage.domain.receiveAddressInfo.ReceiveAddressInfo; @@ -114,27 +117,27 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi **/ @Override public AppletPhoneVO getPhone(String code) throws Exception { - JSONObject result; - // 获取token - String token_url = String.format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", appletChatConfig.getAppletId(), appletChatConfig.getSecret()); - SslUtils.ignoreSsl(); - String tokenResult = HttpUtils.sendGet(token_url); - if (tokenResult == null) { - return null; - } - result = JSON.parseObject(tokenResult); - log.info("获取小程序token : {}", result.toJSONString()); - String accessToken = result.getString("access_token"); - if (StringUtils.isEmpty(accessToken)) { - return null; - } - //获取手机号 https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/user-info/phone-number/getPhoneNumber.html - String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber" + "?access_token=" + accessToken; - JSONObject params = new JSONObject(); - params.put("code", code); - SslUtils.ignoreSsl(); - result = httpService.post(url, null, params); - return JSON.parseObject(result.toString(), AppletPhoneVO.class); + JSONObject result; + // 获取token + String token_url = String.format("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=%s&secret=%s", appletChatConfig.getAppletId(), appletChatConfig.getSecret()); + SslUtils.ignoreSsl(); + String tokenResult = HttpUtils.sendGet(token_url); + if (tokenResult == null) { + return null; + } + result = JSON.parseObject(tokenResult); + log.info("获取小程序token : {}", result.toJSONString()); + String accessToken = result.getString("access_token"); + if (StringUtils.isEmpty(accessToken)) { + return null; + } + //获取手机号 https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/user-info/phone-number/getPhoneNumber.html + String url = "https://api.weixin.qq.com/wxa/business/getuserphonenumber" + "?access_token=" + accessToken; + JSONObject params = new JSONObject(); + params.put("code", code); + SslUtils.ignoreSsl(); + result = httpService.post(url, null, params); + return JSON.parseObject(result.toString(), AppletPhoneVO.class); } /** @@ -161,12 +164,16 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi if (ObjectUtils.isNotEmpty(body.getCardNo())) { PatientInfo patientInfo; // 修改 + if (!StringUtils.isBlank(body.getPatientCode())) { + PatientInfo patientInfo = residentPatientInfoMapper.getPatientInfoByPatientCode(body.getPatientCode()); if(!StringUtils.isBlank(body.getPatientCode())) { patientInfo = residentPatientInfoMapper.getPatientInfoByPatientCode(body.getPatientCode()); if (ObjectUtils.isNotEmpty(patientInfo)) { BeanUtils.copyBeanProp(patientInfo, body); if (body.getDiseaseList() != null) { patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); + } else { + patientInfo.setDisease("0"); } patientInfo.setLoginFlag(Long.valueOf(1)); updatePatientInfo(patientInfo); @@ -174,13 +181,17 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi // 注册 } else { // 获取当前微信绑定的居民 + List list = residentPatientInfoMapper.getList(body.getOpenid(), null); + PatientInfo patientInfo = residentPatientInfoMapper.isRegisterByCardNo(body.getCardNo()); List list = residentPatientInfoMapper.getList(body.getOpenid(), body.getCityCode()); patientInfo = residentPatientInfoMapper.isRegisterByCardNo(body.getCardNo()); if (patientInfo == null) { PatientInfo entity = new PatientInfo(); BeanUtils.copyBeanProp(entity, body); - if(body.getDiseaseList() != null) { + if (body.getDiseaseList() != null) { entity.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); + } else { + entity.setDisease("0"); } entity.setPatientCode(IdUtils.fastSimpleUUID()); entity.setBindingTime(new Date()); @@ -208,8 +219,10 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi patientInfo.setHeadPictureUrl(body.getHeadPictureUrl()); patientInfo.setDelFlag(0); patientInfo.setLoginFlag(Long.valueOf(1)); - if(body.getDiseaseList() != null) { + if (body.getDiseaseList() != null) { patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); + } else { + patientInfo.setDisease("0"); } residentPatientInfoMapper.updatePatientInfo(patientInfo); } @@ -245,6 +258,28 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi } } + // 获取签约信息 + private String getSignInfo(String region, String identity) { + if (!StringUtils.isBlank(region)) { + try { + // 查询签约信息 + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/detail/" + identity, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if ("1".equals(jsonObject.get("code"))) { + if (jsonObject.getJSONObject("data") != null) { + SignInfoDetailVo signInfo = JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDetailVo.class); + if (signInfo != null) { + return signInfo.getSignNo(); + } + } + } + } catch (Exception e) { + log.error("注册完善信息-更新签约标识出错:{}", e.getMessage()); + } + } + return null; + } + /** * @return void * @Author mengkuiliang @@ -285,6 +320,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi * @Param [registerCode] **/ @Override + @Transactional(rollbackFor = Exception.class) public PatientInfo switchResident(String openid, String patientCode) { PatientInfo register = residentPatientInfoMapper.selectPatientInfoByCode(patientCode); if (register == null) { @@ -301,6 +337,8 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi return residentPatientInfoMapper.selectPatientInfoByCode(patientCode); } + /** 判断2个参数是否一样 */ + /** * @return java.lang.String * @Author mengkuiliang @@ -310,29 +348,31 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi **/ @Override public PatientInfo getCurrentResident(String openid, String cityCode) { - List list = residentPatientInfoMapper.getList(openid, cityCode); + List list = residentPatientInfoMapper.getList(openid, null); if (list == null || list.size() == 0) { return null; } + PatientInfo patientInfo = null; // 获取当前选中的 List currentList = list.stream().filter(p -> p.getIsChecked().equals("1")).collect(Collectors.toList()); if (currentList.size() > 0) { - if(!StringUtils.isBlank(currentList.get(0).getDisease())) { + if (!StringUtils.isBlank(currentList.get(0).getDisease())) { currentList.get(0).setDiseaseList(Arrays.asList(currentList.get(0).getDisease().split(","))); } - return currentList.get(0); - } else { + patientInfo = currentList.get(0); // 没有已选择的,则取最新注册的一条数据 + } else { // 更新选择标识 residentPatientInfoMapper.updateChecked(list.get(0).getPatientCode(), "1"); - if(!StringUtils.isBlank(list.get(0).getDisease())) { + if (!StringUtils.isBlank(list.get(0).getDisease())) { list.get(0).setDiseaseList(Arrays.asList(list.get(0).getDisease().split(","))); } list.get(0).setIsChecked("1"); - return list.get(0); + patientInfo = list.get(0); } + return patientInfo; } /** @@ -360,7 +400,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi }*/ @Override - public HashMap login(String loginCode,String phoneCode) throws Exception { + public HashMap login(String loginCode, String phoneCode) throws Exception { HashMap HashMap = new HashMap<>(); try { SslUtils.ignoreSsl(); @@ -374,7 +414,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi throw new ServiceException(json.getString("errmsg")); } String openid = json.getString("openid"); - HashMap.put("openid",openid); + HashMap.put("openid", openid); } catch (Exception e) { throw new ServiceException(e.getMessage()); } @@ -383,17 +423,17 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi String cityCode = ""; AppletPhoneVO phone = getPhone(phoneCode); String phoneNumber = phone.getPhoneInfo().getPhoneNumber(); - HashMap.put("phone",phoneNumber); + HashMap.put("phone", phoneNumber); List infoList = residentPatientInfoMapper.selectPatientInfoByPhone(phoneNumber); - code = infoList.size()== 0 ? "0" : "1"; + code = infoList.size() == 0 ? "0" : "1"; //返回绑定城市 - if ("1".equals(code)){ + if ("1".equals(code)) { for (PatientInfo patientInfo : infoList) { cityCode = patientInfo.getCityCode(); } } - HashMap.put("code",code); - HashMap.put("cityCode",cityCode); + HashMap.put("code", code); + HashMap.put("cityCode", cityCode); return HashMap; } } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentRescindApplyServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentRescindApplyServiceImpl.java index ebf8ada..c71e69f 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentRescindApplyServiceImpl.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentRescindApplyServiceImpl.java @@ -1,11 +1,14 @@ package com.xinelu.familydoctor.applet.service.impl; +import com.alibaba.fastjson2.JSONObject; +import com.xinelu.applet.service.messagepush.MessagePushService; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.familydoctor.applet.mapper.ResidentRescindApplyMapper; import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; +import com.xinelu.familydoctor.applet.pojo.body.MessagePushBody; import com.xinelu.familydoctor.applet.pojo.body.ResidentRescindApplyBody; import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo; import com.xinelu.familydoctor.applet.pojo.entity.ResidentRescindApplyEntity; @@ -34,6 +37,8 @@ public class ResidentRescindApplyServiceImpl implements IResidentRescindApplySer private ResidentRescindApplyMapper residentRescindApplyMapper; @Resource private IResidentPatientInfoService patientInfoService; + @Resource + private MessagePushService messagePushService; @Override public List findList(ApplyQuery query) { @@ -61,11 +66,11 @@ public class ResidentRescindApplyServiceImpl implements IResidentRescindApplySer ResidentRescindApplyEntity entity = new ResidentRescindApplyEntity(); BeanUtils.copyProperties(body, entity); + PatientInfo patientInfo = patientInfoService.getByCardNo(body.getIdentity()); + if (patientInfo == null) { + throw new ServiceException("未查询到注册信息"); + } if(StringUtils.isBlank(body.getPatientId())) { - PatientInfo patientInfo = patientInfoService.getByCardNo(body.getIdentity()); - if (patientInfo == null) { - throw new ServiceException("未查询到注册信息"); - } entity.setPatientId(patientInfo.getPatientCode()); } @@ -74,6 +79,19 @@ public class ResidentRescindApplyServiceImpl implements IResidentRescindApplySer entity.setBookingStatus("0"); entity.setApprovalStatus("0"); residentRescindApplyMapper.insert(entity); + + MessagePushBody messagePushBody = new MessagePushBody(); + messagePushBody.setMessageCategory("4"); + messagePushBody.setBusType("10"); + messagePushBody.setOpenid(patientInfo.getOpenid()); + messagePushBody.setReceiveName(patientInfo.getPatientName()); + messagePushBody.setText1(body.getOrgName()); + messagePushBody.setText2("解约申请"); + messagePushBody.setSendTitle("解约申请"); + messagePushBody.setSendTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date())); + messagePushBody.setSendContent(patientInfo.getPatientName() + "已提交申请"); + messagePushBody.setCardNo(body.getIdentity()); + messagePushService.fdApprovePush(JSONObject.parseObject(JSONObject.toJSONString(messagePushBody))); } /** 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 388feea..5ddcdb6 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 @@ -2,6 +2,7 @@ package com.xinelu.familydoctor.applet.service.impl; import com.alibaba.fastjson2.JSONArray; import com.alibaba.fastjson2.JSONObject; +import com.xinelu.applet.service.messagepush.MessagePushService; import com.xinelu.common.core.domain.R; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.DateUtils; @@ -11,6 +12,7 @@ import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.familydoctor.applet.mapper.ResidentServiceApplyMapper; import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; +import com.xinelu.familydoctor.applet.pojo.body.MessagePushBody; import com.xinelu.familydoctor.applet.pojo.body.ResidentServiceApplyBody; import com.xinelu.familydoctor.applet.pojo.dto.ResidentServiceFormApplyDto; import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo; @@ -49,6 +51,8 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe private IHospitalInfoService hospitalInfoService; @Resource private IScreeningProjectService screeningProjectService; + @Resource + private MessagePushService messagePushService; /** * 新增服务申请 @@ -64,22 +68,20 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe applyQuery.setIdentity(body.getIdentity()); applyQuery.setBookingStatus("0"); applyQuery.setApprovalStatus("0"); + applyQuery.setFormNo(body.getFormNo()); List serviceBookingInfoVoList = residentServiceApplyMapper.findByBody(applyQuery); if (serviceBookingInfoVoList != null && serviceBookingInfoVoList.size() > 0) { - throw new ServiceException("已经提交服务申请,不能重复提交"); + throw new ServiceException("已提交该服务申请,不能重复提交"); } ResidentServiceApplyEntity entity; - PatientInfo patientInfo = null; - if (StringUtils.isBlank(body.getPatientId())) { - patientInfo = patientInfoService.getByCardNo(body.getIdentity()); - if (patientInfo == null) { - throw new ServiceException("未查询到注册信息"); - } + PatientInfo patientInfo = patientInfoService.getByCardNo(body.getIdentity()); + if (patientInfo == null) { + throw new ServiceException("未查询到注册信息"); } entity = new ResidentServiceApplyEntity(); BeanUtils.copyProperties(body, entity); - if (patientInfo != null) { + if (StringUtils.isBlank(entity.getPatientId())) { entity.setPatientId(patientInfo.getPatientCode()); } entity.setApplyTime(new Date()); @@ -92,6 +94,20 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe entity.setServiceWay("2"); } residentServiceApplyMapper.insert(entity); + + MessagePushBody messagePushBody = new MessagePushBody(); + messagePushBody.setMessageCategory("4"); + messagePushBody.setBusType("10"); + messagePushBody.setOpenid(patientInfo.getOpenid()); + messagePushBody.setReceiveName(patientInfo.getPatientName()); + messagePushBody.setText1(body.getOrgName()); + messagePushBody.setText2(body.getFormName().length() >= 20? body.getFormName().substring(0,17) + "...": body.getFormName()); + messagePushBody.setText3(body.getFormName()); + messagePushBody.setSendTitle("服务预约"); + messagePushBody.setSendTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date())); + messagePushBody.setSendContent(patientInfo.getPatientName() + "已提交服务申请"); + messagePushBody.setCardNo(body.getIdentity()); + messagePushService.fdApprovePush(JSONObject.parseObject(JSONObject.toJSONString(messagePushBody))); } /** @@ -263,7 +279,7 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe if (signInfo == null) { throw new ServiceException("未查询到签约信息!"); } - // 获取家医个性服务包 + // 1、获取家医个性服务包 result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/package/getPackageOfGX/" + identity + (!StringUtils.isBlank(projectName) ? ("?formName=" + projectName) : "?formName=null"), null, String.class); jsonObject = JSONObject.parseObject(result); if (!"1".equals(jsonObject.get("code"))) { @@ -286,46 +302,40 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe sp.setDiscountPrice(per.getPackSignCost()); sp.setServiceFreq(per.getServiceFreq()); sp.setPerformanceCount(per.getPerformanceCount()); + sp.setTeamNo(per.getTeamNo()); + sp.setTeamName(per.getTeamName()); + sp.setUserNo(per.getUserNo()); + sp.setUserName(per.getUserName()); projectList.add(sp); } } } - // 获取签约机构下的筛查项目 - // 获取家医机构详情 - result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/org/getOrgDetail/" + signInfo.getOrgNo(), null, String.class); - jsonObject = JSONObject.parseObject(result); - if ("1".equals(jsonObject.get("code"))) { - if (jsonObject.containsKey("data") && jsonObject.get("data") != null) { - OrgDetailVo org = JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), OrgDetailVo.class); - if (org != null && !StringUtils.isBlank(org.getPhOrgId())) { - // 根据机构编码获取筛查机构 - HospitalInfo Hospital = hospitalInfoService.getHosptalByOrgCode(org.getPhOrgId()); - if (Hospital != null) { - // 获取筛查项目 - ScreeningProject query = new ScreeningProject(); - query.setHospitalId(Hospital.getId()); - query.setProjectName(projectName); - List screeningProjectList = screeningProjectService.findList(query); - if (screeningProjectList != null && screeningProjectList.size() > 0) { - ScreeningProjectVo sp; - for (ScreeningProject project : screeningProjectList) { - sp = new ScreeningProjectVo(); - sp.setSourceType("2"); - sp.setHospitalId(String.valueOf(project.getHospitalId())); - sp.setHospitalName(project.getHospitalName()); - sp.setProjectId(project.getProjectId()); - sp.setProjectName(project.getProjectName()); - sp.setPrice(project.getPrice()); - sp.setDiscountPrice(project.getDiscountPrice()); - projectList.add(sp); - } - } - } - + // 2、获取签约机构下的筛查项目 + // 根据机构编码获取筛查机构 + HospitalInfo Hospital = hospitalInfoService.getHosptalByOrgCode(signInfo.getOrgNo()); + if (Hospital != null) { + // 获取筛查项目 + ScreeningProject query = new ScreeningProject(); + query.setHospitalId(Hospital.getId()); + query.setProjectName(projectName); + List screeningProjectList = screeningProjectService.findList(query); + if (screeningProjectList != null && screeningProjectList.size() > 0) { + ScreeningProjectVo sp; + for (ScreeningProject project : screeningProjectList) { + sp = new ScreeningProjectVo(); + sp.setSourceType("2"); + sp.setHospitalId(String.valueOf(project.getHospitalId())); + sp.setHospitalName(project.getHospitalName()); + sp.setProjectId(project.getProjectId()); + sp.setProjectName(project.getProjectName()); + sp.setPrice(project.getPrice()); + sp.setDiscountPrice(project.getDiscountPrice()); + projectList.add(sp); } } } + return projectList; } 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 0c6a1f9..b230a87 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 @@ -1,6 +1,7 @@ package com.xinelu.familydoctor.applet.service.impl; import com.alibaba.fastjson2.JSONObject; +import com.xinelu.applet.service.messagepush.MessagePushService; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.StringUtils; @@ -9,6 +10,7 @@ import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.familydoctor.applet.mapper.ResidentSignApplyMapper; import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; +import com.xinelu.familydoctor.applet.pojo.body.MessagePushBody; import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody; import com.xinelu.familydoctor.applet.pojo.dto.CrowdDto; import com.xinelu.familydoctor.applet.pojo.dto.PackageDto; @@ -45,6 +47,8 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService private HttpService httpService; @Resource private IResidentPatientInfoService patientInfoService; + @Resource + private MessagePushService messagePushService; /** * 新增签约申请 @@ -67,11 +71,11 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService ResidentSignApplyEntity entity = new ResidentSignApplyEntity(); BeanUtils.copyProperties(body, entity); - if(StringUtils.isBlank(body.getPatientId())) { - PatientInfo patientInfo = patientInfoService.getByCardNo(body.getIdentity()); - if (patientInfo == null) { - throw new ServiceException("未查询到注册信息"); - } + PatientInfo patientInfo = patientInfoService.getByCardNo(body.getIdentity()); + if (patientInfo == null) { + throw new ServiceException("未查询到注册信息"); + } + if (StringUtils.isBlank(body.getPatientId())) { entity.setPatientId(patientInfo.getPatientCode()); } @@ -81,10 +85,10 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService // 审批状态0:待批准 1:已同意 2:已拒绝 entity.setApprovalStatus("0"); entity.setBookingNo(IdUtils.simpleUUID()); - if(StringUtils.isBlank(entity.getNation())) { + if (StringUtils.isBlank(entity.getNation())) { entity.setNation("1"); } - if(entity.getSignYears() == null || entity.getSignYears() <= 0) { + if (entity.getSignYears() == null || entity.getSignYears() <= 0) { entity.setSignYears(1); } entity.setCrowdsNo(body.getCrowdList().stream().map(CrowdDto::getCrowdNo).collect(Collectors.joining(","))); @@ -92,6 +96,19 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService 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); + + MessagePushBody messagePushBody = new MessagePushBody(); + messagePushBody.setMessageCategory("4"); + messagePushBody.setBusType("10"); + messagePushBody.setOpenid(patientInfo.getOpenid()); + messagePushBody.setReceiveName(body.getResidentName()); + messagePushBody.setText1(body.getOrgName()); + messagePushBody.setText2("签约申请"); + messagePushBody.setSendTitle("签约申请"); + messagePushBody.setSendTime(DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date())); + messagePushBody.setSendContent(body.getResidentName() + "已提交申请"); + messagePushBody.setCardNo(body.getIdentity()); + messagePushService.fdApprovePush(JSONObject.parseObject(JSONObject.toJSONString(messagePushBody))); } /** diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBfRecord.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBfRecord.java index 89bbe02..726428b 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBfRecord.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBfRecord.java @@ -3,48 +3,61 @@ package com.xinelu.familydoctor.entity; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 血脂记录表 * @TableName device_bf_record */ +@ApiModel("血脂记录表") @Data public class DeviceBfRecord implements Serializable { /** * 自增主键 */ + @ApiModelProperty("自增主键") private Long id; /** * 居民身份证号 */ + @ApiModelProperty("居民身份证号") private String identity; /** * 血清总胆固醇(单位:mmol/L) */ + @ApiModelProperty("血清总胆固醇(单位:mmol/L)") private BigDecimal tc; /** * 甘油三酯(单位:mmol/L) */ + @ApiModelProperty("甘油三酯(单位:mmol/L)") private BigDecimal tg; /** * 高密度脂蛋白胆固醇(单位:mmol/L) */ + @ApiModelProperty("高密度脂蛋白胆固醇(单位:mmol/L)") private BigDecimal hdl; /** * 低密度脂蛋白胆固醇(单位:mmol/L) */ + @ApiModelProperty("低密度脂蛋白胆固醇(单位:mmol/L)") private BigDecimal ldl; /** * 测量时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @ApiModelProperty("测量时间") private Date measureTime; private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBgRecord.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBgRecord.java index ddfd25d..6fab43a 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBgRecord.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBgRecord.java @@ -3,43 +3,55 @@ package com.xinelu.familydoctor.entity; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 血糖记录表 * @TableName device_bg_record */ +@ApiModel("血糖记录表") @Data public class DeviceBgRecord implements Serializable { /** * 自增主键 */ + @ApiModelProperty("自增主键") private Long id; /** * 居民身份证号 */ + @ApiModelProperty("居民身份证号") private String identity; /** * 血糖值(单位:mmol/L) */ + @ApiModelProperty("血糖值(单位:mmol/L)") private BigDecimal bg; /** * 时间段1:凌晨2:早餐前3:早晨后4:午餐前5:午餐后6:晚餐前7:晚餐后8:睡前 */ + @ApiModelProperty("时间段1:凌晨2:早餐前3:早晨后4:午餐前5:午餐后6:晚餐前7:晚餐后8:睡前") private String bucket; /** * 测量时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @ApiModelProperty("测量时间") private Date measureTime; /** * 上传方式1:手动2:自动 */ + @ApiModelProperty("上传方式1:手动2:自动") private String uploadType; private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBindResident.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBindResident.java index a805ad2..0011b76 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBindResident.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBindResident.java @@ -34,9 +34,9 @@ public class DeviceBindResident implements Serializable { private String sn; /** - * 设备类型(0: 其他 1:血压计 2:血糖仪 3:血脂仪 4:血氧仪 5:体重秤 6:体温计) + * 设备类型(1:血压计 2:血糖仪 3:动态血压仪) */ - @ApiModelProperty("设备类型(0: 其他 1:血压计 2:血糖仪 3:血脂仪 4:血氧仪 5:体重秤 6:体温计)") + @ApiModelProperty("设备类型(1:血压计 2:血糖仪 3:动态血压仪)") private String deviceType; /** diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBmiRecord.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBmiRecord.java index 6b382a9..9dc2fb6 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBmiRecord.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBmiRecord.java @@ -3,33 +3,55 @@ package com.xinelu.familydoctor.entity; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * BMI记录表 * @TableName device_bmi_record */ +@ApiModel("BMI记录表") @Data public class DeviceBmiRecord implements Serializable { /** * 自增主键 */ + @ApiModelProperty("自增主键") private Long id; /** * 居民身份证号 */ + @ApiModelProperty("居民身份证号") private String identity; + /** + * 身高(cm) + */ + @ApiModelProperty("身高(cm)") + private BigDecimal height; + + /** + * 体重(kg) + */ + @ApiModelProperty("体重(kg)") + private BigDecimal weight; + /** * BMI(单位:kg/m^2) */ + @ApiModelProperty("BMI(单位:kg/m^2)") private BigDecimal bmi; /** * 测量时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @ApiModelProperty("测量时间") private Date measureTime; private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBoRecord.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBoRecord.java index 879080f..5fe559b 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBoRecord.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBoRecord.java @@ -2,38 +2,49 @@ package com.xinelu.familydoctor.entity; import java.io.Serializable; import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 血氧记录表 * @TableName device_bo_record */ +@ApiModel("血氧记录表") @Data public class DeviceBoRecord implements Serializable { /** * 自增主键 */ + @ApiModelProperty("自增主键") private Long id; /** * 居民身份证号 */ + @ApiModelProperty("居民身份证号") private String identity; /** * 血氧(单位:%) */ + @ApiModelProperty("血氧(单位:%)") private Integer spo2; /** * 脉搏(单位:次/分) */ + @ApiModelProperty("脉搏(单位:次/分)") private Integer pulse; /** * 测量时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @ApiModelProperty("测量时间") private Date measureTime; private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBpRecord.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBpRecord.java index c12925b..db10f3b 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBpRecord.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceBpRecord.java @@ -2,48 +2,61 @@ package com.xinelu.familydoctor.entity; import java.io.Serializable; import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 血压记录表 * @TableName device_bp_record */ +@ApiModel("血压记录表") @Data public class DeviceBpRecord implements Serializable { /** * 自增主键 */ + @ApiModelProperty("自增主键") private Long id; /** * 居民身份证号 */ + @ApiModelProperty("居民身份证号") private String identity; /** * 收缩压(单位:mmHg) */ + @ApiModelProperty("收缩压(单位:mmHg)") private Integer sbp; /** * 舒张压(单位:mmHg) */ + @ApiModelProperty("舒张压(单位:mmHg)") private Integer dbp; /** * 心率(单位:次/分) */ + @ApiModelProperty("心率(单位:次/分)") private Integer hr; /** * 测量时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @ApiModelProperty("测量时间") private Date measureTime; /** * 上传方式1:手动2:自动 */ + @ApiModelProperty("上传方式1:手动2:自动") private String uploadType; private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceHrRecord.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceHrRecord.java index 392635a..adfe60f 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceHrRecord.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceHrRecord.java @@ -2,38 +2,49 @@ package com.xinelu.familydoctor.entity; import java.io.Serializable; import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 心率记录表 * @TableName device_hr_record */ +@ApiModel("心率记录表") @Data public class DeviceHrRecord implements Serializable { /** * 自增主键 */ + @ApiModelProperty("自增主键") private Long id; /** * 居民身份证号 */ + @ApiModelProperty("居民身份证号") private String identity; /** * 心率(单位:次/分) */ + @ApiModelProperty("心率(单位:次/分)") private Integer hr; /** * 测量时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @ApiModelProperty("测量时间") private Date measureTime; /** * 上传方式1:手动2:自动 */ + @ApiModelProperty("上传方式1:手动2:自动") private String uploadType; private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceTempRecord.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceTempRecord.java index 32c4f35..462946d 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceTempRecord.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/DeviceTempRecord.java @@ -3,33 +3,43 @@ package com.xinelu.familydoctor.entity; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * 体温记录表 * @TableName device_temp_record */ +@ApiModel("体温记录表") @Data public class DeviceTempRecord implements Serializable { /** * 自增主键 */ + @ApiModelProperty("自增主键") private Long id; /** * 居民身份证号 */ + @ApiModelProperty("居民身份证号") private String identity; /** * 体温(单位:℃) */ + @ApiModelProperty("体温(单位:℃)") private BigDecimal temp; /** * 测量时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") + @ApiModelProperty("测量时间") private Date measureTime; private static final long serialVersionUID = 1L; -} \ No newline at end of file +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateAdviceTemplate.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateAdviceTemplate.java new file mode 100644 index 0000000..b784d2b --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateAdviceTemplate.java @@ -0,0 +1,71 @@ +package com.xinelu.familydoctor.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.Map; + +/** + * 自我评估健康处方模板表 + * @TableName evaluate_advice_template + */ +@Data +public class EvaluateAdviceTemplate implements Serializable { + /** + * 自增主键 + */ + private Long id; + + /** + * 模板类型 + */ + private String templateType; + + /** + * 模板内容 + */ + private String content; + + /** + * 模板状态1:启用2:停用 + */ + private String useFlag; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 更新人 + */ + private Long updateBy; + + /** + * 备注 + */ + private String remark; + + /** + * 删除标识1:正常2:删除 + */ + private String delFlag; + + /** + * 请求参数 + */ + private Map params; + + private static final long serialVersionUID = 1L; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateAnswer.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateAnswer.java new file mode 100644 index 0000000..a750fc9 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateAnswer.java @@ -0,0 +1,38 @@ +package com.xinelu.familydoctor.entity; + +import java.io.Serializable; +import lombok.Data; + +/** + * 自评问卷答案表 + * @TableName evaluate_answer + */ +@Data +public class EvaluateAnswer implements Serializable { + /** + * 自增主键 + */ + private Long id; + + /** + * 自评记录ID + */ + private Long recordId; + + /** + * 问题ID + */ + private Long questionId; + + /** + * 选项ID + */ + private Long optionId; + + /** + * 选项内容 + */ + private String optionContent; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateOption.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateOption.java new file mode 100644 index 0000000..e99dd03 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateOption.java @@ -0,0 +1,38 @@ +package com.xinelu.familydoctor.entity; + +import java.io.Serializable; +import lombok.Data; + +/** + * 自评问题选项表 + * @TableName evaluate_option + */ +@Data +public class EvaluateOption implements Serializable { + /** + * 自增主键 + */ + private Long id; + + /** + * 问题ID + */ + private Long questionId; + + /** + * 问卷ID + */ + private Long surveyId; + + /** + * 选项名称 + */ + private String optionName; + + /** + * 选项排序 + */ + private Integer optionSort; + + private static final long serialVersionUID = 1L; +} \ No newline at end of file diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateQuestion.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateQuestion.java new file mode 100644 index 0000000..f987fb5 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateQuestion.java @@ -0,0 +1,47 @@ +package com.xinelu.familydoctor.entity; + +import java.io.Serializable; +import java.util.List; + +import lombok.Data; + +/** + * 自评问题表 + * @TableName evaluate_question + */ +@Data +public class EvaluateQuestion implements Serializable { + /** + * 自增主键 + */ + private Long id; + + /** + * 问卷ID + */ + private Long surveyId; + + /** + * 问题主题 + */ + private String questionName; + + /** + * 问题类型1:单选2:多选3:填空 + */ + private String questionType; + + /** + * 问题排序 + */ + private Integer questionSort; + + /** + * 是否必填1:必填2:非必填 + */ + private String requiredFlag; + + private List options; + + private static final long serialVersionUID = 1L; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateRecord.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateRecord.java new file mode 100644 index 0000000..e020623 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateRecord.java @@ -0,0 +1,53 @@ +package com.xinelu.familydoctor.entity; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + +import lombok.Data; + +/** + * 自评记录表 + * @TableName evaluate_record + */ +@Data +public class EvaluateRecord implements Serializable { + /** + * 自增主键 + */ + private Long id; + + /** + * 用户ID + */ + private Long userId; + + /** + * 问卷ID + */ + private Long surveyId; + + /** + * 问卷主题 + */ + private String surveySubject; + + /** + * 评估结果 + */ + private String evaluateResult; + + /** + * 健康处方 + */ + private String advice; + + /** + * 创建时间 + */ + private Date createTime; + + private List answers; + + private static final long serialVersionUID = 1L; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateSurvey.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateSurvey.java new file mode 100644 index 0000000..1957da3 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/entity/EvaluateSurvey.java @@ -0,0 +1,70 @@ +package com.xinelu.familydoctor.entity; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 自评问卷表 + * @TableName evaluate_survey + */ +@Data +public class EvaluateSurvey implements Serializable { + /** + * 自增主键 + */ + private Long id; + + /** + * 问卷主题1001:高血压评估问卷,1002:糖尿病评估问卷,1003:脑卒中评估问卷,1004:慢阻肺评估问卷,1005:慢病评估问卷, + * 1006:糖尿病肾病评估问卷,1007:糖尿病眼病评估问卷,1008:糖尿病足病评估问卷 + */ + private String surveySubject; + + /** + * 问卷状态1:启用2:停用 + */ + private String useFlag; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 创建人 + */ + private Long createBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 更新人 + */ + private Long updateBy; + + /** + * 删除标识1:正常2:删除 + */ + private String delFlag; + + /** + * 备注 + */ + private String remark; + + private List questions; + + /** + * 请求参数 + */ + private Map params; + + private static final long serialVersionUID = 1L; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/DeviceBgRecordMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/DeviceBgRecordMapper.java index e8ddbfe..f0665ac 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/DeviceBgRecordMapper.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/DeviceBgRecordMapper.java @@ -2,6 +2,7 @@ package com.xinelu.familydoctor.mapper; import com.xinelu.familydoctor.entity.DeviceBgRecord; import com.xinelu.familydoctor.vo.BgCalcVO; +import com.xinelu.familydoctor.vo.PhysicalLastRecordVO; import org.apache.ibatis.annotations.Param; import java.util.List; @@ -38,4 +39,5 @@ public interface DeviceBgRecordMapper { int update(DeviceBgRecord record); + List getLastRecord(String identity); } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateAdviceTemplateMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateAdviceTemplateMapper.java new file mode 100644 index 0000000..437e255 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateAdviceTemplateMapper.java @@ -0,0 +1,23 @@ +package com.xinelu.familydoctor.mapper; + +import com.xinelu.familydoctor.entity.EvaluateAdviceTemplate; + +import java.util.List; + +/** +* @author gaoyu +* @description 针对表【evaluate_advice_template(自我评估健康处方模板表)】的数据库操作Mapper +* @createDate 2023-10-16 16:51:09 +* @Entity com.xinelu.familydoctor.entity.EvaluateAdviceTemplate +*/ +public interface EvaluateAdviceTemplateMapper { + + List findList(EvaluateAdviceTemplate record); + + EvaluateAdviceTemplate getTemplateByType(String templateType); + + int insert(EvaluateAdviceTemplate record); + + int update(EvaluateAdviceTemplate record); + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateAnswerMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateAnswerMapper.java new file mode 100644 index 0000000..32fe80b --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateAnswerMapper.java @@ -0,0 +1,21 @@ +package com.xinelu.familydoctor.mapper; + +import com.xinelu.familydoctor.entity.EvaluateAnswer; + +import java.util.List; + +/** +* @author gaoyu +* @description 针对表【evaluate_answer(自评问卷答案表)】的数据库操作Mapper +* @createDate 2023-10-11 09:51:39 +* @Entity com.xinelu.familydoctor.entity.EvaluateAnswer +*/ +public interface EvaluateAnswerMapper { + + List getAnswers(Long recordId); + + int insert(EvaluateAnswer record); + + int update(EvaluateAnswer recordId); + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateOptionMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateOptionMapper.java new file mode 100644 index 0000000..91d8cab --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateOptionMapper.java @@ -0,0 +1,32 @@ +package com.xinelu.familydoctor.mapper; + +import com.xinelu.familydoctor.entity.EvaluateOption; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** +* @author gaoyu +* @description 针对表【evaluate_option(自评问题选项表)】的数据库操作Mapper +* @createDate 2023-10-11 09:51:26 +* @Entity com.xinelu.familydoctor.entity.EvaluateOption +*/ +public interface EvaluateOptionMapper { + + List getOptions(Long questionId); + + int insert(EvaluateOption record); + + int update(EvaluateOption record); + + /** + * 清空问卷ID与wentiID + * @param questionId 问题ID + * @param surveyId 问卷ID + * @return {@link int} + * @author gaoyu + * @date 2023-10-11 17:31 + */ + int clearRelationId(@Param("questionId") Long questionId, @Param("surveyId") Long surveyId); + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateQuestionMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateQuestionMapper.java new file mode 100644 index 0000000..9e7a224 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateQuestionMapper.java @@ -0,0 +1,31 @@ +package com.xinelu.familydoctor.mapper; + +import com.xinelu.familydoctor.entity.EvaluateQuestion; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** +* @author gaoyu +* @description 针对表【evaluate_question(自评问题表)】的数据库操作Mapper +* @createDate 2023-10-11 09:51:20 +* @Entity com.xinelu.familydoctor.entity.EvaluateQuestion +*/ +public interface EvaluateQuestionMapper { + + List getQuestions(Long surveyId); + + int insert(EvaluateQuestion record); + + int update(EvaluateQuestion record); + + /** + * 清空问卷ID + * @param surveyId 问卷ID + * @return {@link int} + * @author gaoyu + * @date 2023-10-11 17:33 + */ + int clearSurveyId(@Param("surveyId") Long surveyId); + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateRecordMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateRecordMapper.java new file mode 100644 index 0000000..60c666f --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateRecordMapper.java @@ -0,0 +1,19 @@ +package com.xinelu.familydoctor.mapper; + +import com.xinelu.familydoctor.entity.EvaluateRecord; + +import java.util.List; + +/** +* @author gaoyu +* @description 针对表【evaluate_record(自评记录表)】的数据库操作Mapper +* @createDate 2023-10-11 09:51:34 +* @Entity com.xinelu.familydoctor.entity.EvaluateRecord +*/ +public interface EvaluateRecordMapper { + + List getTimeline(Long userId); + + int insert(EvaluateRecord record); + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateSurveyMapper.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateSurveyMapper.java new file mode 100644 index 0000000..fa84949 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/mapper/EvaluateSurveyMapper.java @@ -0,0 +1,30 @@ +package com.xinelu.familydoctor.mapper; + +import com.xinelu.familydoctor.entity.EvaluateSurvey; + +import java.util.List; + +/** +* @author gaoyu +* @description 针对表【evaluate_survey(自评问卷表)】的数据库操作Mapper +* @createDate 2023-10-11 09:51:11 +* @Entity com.xinelu.familydoctor.entity.EvaluateSurvey +*/ +public interface EvaluateSurveyMapper { + + List findList(EvaluateSurvey entity); + + /** + * 获取问卷 + * @param surveySubject 问卷主题 + * @return {@link com.xinelu.familydoctor.entity.EvaluateSurvey} + * @author gaoyu + * @date 2023-10-12 17:22 + */ + EvaluateSurvey getSurvey(String surveySubject); + + int insert(EvaluateSurvey record); + + int update(EvaluateSurvey record); + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateAdviceTemplateService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateAdviceTemplateService.java new file mode 100644 index 0000000..edd279d --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateAdviceTemplateService.java @@ -0,0 +1,13 @@ +package com.xinelu.familydoctor.service; + +import com.xinelu.familydoctor.entity.EvaluateAdviceTemplate; + +import java.util.List; + +public interface EvaluateAdviceTemplateService { + List findList(EvaluateAdviceTemplate entity); + EvaluateAdviceTemplate getTemplate(String templateType); + void save(EvaluateAdviceTemplate entity); + void changeStatus(EvaluateAdviceTemplate entity); + void delTemplate(Long id); +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateRecordService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateRecordService.java new file mode 100644 index 0000000..0009b70 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateRecordService.java @@ -0,0 +1,15 @@ +package com.xinelu.familydoctor.service; + +import com.xinelu.familydoctor.entity.EvaluateAnswer; +import com.xinelu.familydoctor.entity.EvaluateRecord; +import com.xinelu.familydoctor.vo.EvaluateRecordTimelineVO; + +import java.util.List; + +public interface EvaluateRecordService { + void submit(EvaluateRecord entity); + + List getEvaluateTimeline(Long userId); + + List getAnswers(Long recordId); +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateSurveyService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateSurveyService.java new file mode 100644 index 0000000..00c4ef1 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/EvaluateSurveyService.java @@ -0,0 +1,22 @@ +package com.xinelu.familydoctor.service; + +import com.xinelu.familydoctor.entity.EvaluateSurvey; + +import java.util.List; + +public interface EvaluateSurveyService { + List findList(EvaluateSurvey entity); + + /** + * 获取问卷 + * @param surveySubject 问卷主题 + * @return {@link com.xinelu.familydoctor.entity.EvaluateSurvey} + * @author gaoyu + * @date 2023-10-12 17:23 + */ + EvaluateSurvey getSurvey(String surveySubject); + + void insert(EvaluateSurvey entity); + + void update(EvaluateSurvey entity); +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/PhysicalSignService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/PhysicalSignService.java index e02cffc..8aae3f9 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/PhysicalSignService.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/PhysicalSignService.java @@ -1,7 +1,9 @@ package com.xinelu.familydoctor.service; import com.xinelu.familydoctor.entity.*; +import com.xinelu.familydoctor.vo.PhysicalLastRecordVO; +import java.util.List; import java.util.Map; public interface PhysicalSignService { @@ -22,4 +24,13 @@ public interface PhysicalSignService { * @date 2023-10-9 10:10 */ Map record(String identity, String type, String label); + + /** + * 获取最后一次记录 + * @param identity 身份证号 + * @return {@link java.util.List} + * @author gaoyu + * @date 2023-10-20 14:56 + */ + List getLastRecord(String identity); } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateAdviceTemplateServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateAdviceTemplateServiceImpl.java new file mode 100644 index 0000000..6b0b1d7 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateAdviceTemplateServiceImpl.java @@ -0,0 +1,63 @@ +package com.xinelu.familydoctor.service.impl; + +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.familydoctor.entity.EvaluateAdviceTemplate; +import com.xinelu.familydoctor.mapper.EvaluateAdviceTemplateMapper; +import com.xinelu.familydoctor.service.EvaluateAdviceTemplateService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * @author gaoyu + * @description 自我评估处方模板实现类 + * @date 2023-10-16 16:58 + */ +@Service +public class EvaluateAdviceTemplateServiceImpl implements EvaluateAdviceTemplateService { + @Resource + private EvaluateAdviceTemplateMapper evaluateAdviceTemplateMapper; + + @Override + public List findList(EvaluateAdviceTemplate entity) { + return evaluateAdviceTemplateMapper.findList(entity); + } + + @Override + public EvaluateAdviceTemplate getTemplate(String templateType) { + return evaluateAdviceTemplateMapper.getTemplateByType(templateType); + } + + @Override + public void save(EvaluateAdviceTemplate entity) { + if (entity.getId() == null) { + entity.setCreateTime(new Date()); + entity.setCreateBy(SecurityUtils.getUserId()); + entity.setDelFlag("1"); + evaluateAdviceTemplateMapper.insert(entity); + } else { + entity.setUpdateBy(SecurityUtils.getUserId()); + entity.setUpdateTime(new Date()); + evaluateAdviceTemplateMapper.update(entity); + } + } + + @Override + public void changeStatus(EvaluateAdviceTemplate entity) { + entity.setUpdateBy(SecurityUtils.getUserId()); + entity.setUpdateTime(new Date()); + evaluateAdviceTemplateMapper.update(entity); + } + + @Override + public void delTemplate(Long id) { + EvaluateAdviceTemplate entity = new EvaluateAdviceTemplate(); + entity.setId(id); + entity.setDelFlag("2"); + entity.setUpdateBy(SecurityUtils.getUserId()); + entity.setUpdateTime(new Date()); + evaluateAdviceTemplateMapper.update(entity); + } +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateRecordServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateRecordServiceImpl.java new file mode 100644 index 0000000..c4c5af3 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateRecordServiceImpl.java @@ -0,0 +1,79 @@ +package com.xinelu.familydoctor.service.impl; + +import com.xinelu.common.utils.DateUtils; +import com.xinelu.familydoctor.entity.EvaluateAnswer; +import com.xinelu.familydoctor.entity.EvaluateRecord; +import com.xinelu.familydoctor.mapper.EvaluateAnswerMapper; +import com.xinelu.familydoctor.mapper.EvaluateRecordMapper; +import com.xinelu.familydoctor.service.EvaluateRecordService; +import com.xinelu.familydoctor.vo.EvaluateRecordResultVO; +import com.xinelu.familydoctor.vo.EvaluateRecordTimelineVO; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.*; + +/** + * @author gaoyu + * @description 自评记录 + * @date 2023-10-16 9:23 + */ +@Service +public class EvaluateRecordServiceImpl implements EvaluateRecordService { + @Resource + private EvaluateRecordMapper evaluateRecordMapper; + @Resource + private EvaluateAnswerMapper evaluateAnswerMapper; + + @Override + public void submit(EvaluateRecord entity) { + entity.setCreateTime(new Date()); + evaluateRecordMapper.insert(entity); + List answers = entity.getAnswers(); + if (CollectionUtils.isNotEmpty(answers)) { + for (EvaluateAnswer answer : answers) { + answer.setRecordId(entity.getId()); + evaluateAnswerMapper.insert(answer); + } + } + } + + @Override + public List getEvaluateTimeline(Long userId) { + List records = evaluateRecordMapper.getTimeline(userId); + List timeline = new ArrayList<>(); + Map> map = new HashMap<>(); + if (CollectionUtils.isNotEmpty(records)) { + records.forEach(r -> { + List resultList; + if (!map.containsKey(DateUtils.formatDate(r.getCreateTime(), "yyyy-MM-dd"))) { + resultList = new ArrayList<>(); + } else { + resultList = map.get(DateUtils.formatDate(r.getCreateTime(), "yyyy-MM-dd")); + } + EvaluateRecordResultVO resultVO = new EvaluateRecordResultVO(); + resultVO.setRecordId(r.getId()); + resultVO.setEvaluateResult(r.getEvaluateResult()); + resultVO.setSurveySubject(r.getSurveySubject()); + resultVO.setAdvice(r.getAdvice()); + resultVO.setTime(DateUtils.formatDate(r.getCreateTime(), "HH:mm:ss")); + resultVO.setDate(DateUtils.formatDate(r.getCreateTime(), "yyyy-MM-dd")); + resultList.add(resultVO); + map.put(DateUtils.formatDate(r.getCreateTime(), "yyyy-MM-dd"), resultList); + }); + map.forEach((k, v) -> { + EvaluateRecordTimelineVO recordLine = new EvaluateRecordTimelineVO(); + recordLine.setDate(k); + recordLine.setRecords(v); + timeline.add(recordLine); + }); + } + return timeline; + } + + @Override + public List getAnswers(Long recordId) { + return evaluateAnswerMapper.getAnswers(recordId); + } +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateSurveyServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateSurveyServiceImpl.java new file mode 100644 index 0000000..b3bd420 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/EvaluateSurveyServiceImpl.java @@ -0,0 +1,106 @@ +package com.xinelu.familydoctor.service.impl; + +import com.xinelu.common.utils.SecurityUtils; +import com.xinelu.familydoctor.entity.EvaluateOption; +import com.xinelu.familydoctor.entity.EvaluateQuestion; +import com.xinelu.familydoctor.entity.EvaluateSurvey; +import com.xinelu.familydoctor.mapper.EvaluateOptionMapper; +import com.xinelu.familydoctor.mapper.EvaluateQuestionMapper; +import com.xinelu.familydoctor.mapper.EvaluateSurveyMapper; +import com.xinelu.familydoctor.service.EvaluateSurveyService; +import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.Objects; + +/** + * @author gaoyu + * @description 自评问卷业务实现类 + * @date 2023-10-11 13:24 + */ +@Service +public class EvaluateSurveyServiceImpl implements EvaluateSurveyService { + @Resource + private EvaluateSurveyMapper evaluateSurveyMapper; + @Resource + private EvaluateQuestionMapper evaluateQuestionMapper; + @Resource + private EvaluateOptionMapper evaluateOptionMapper; + + @Override + public List findList(EvaluateSurvey entity) { + return evaluateSurveyMapper.findList(entity); + } + + @Override + public EvaluateSurvey getSurvey(String surveySubject) { + return evaluateSurveyMapper.getSurvey(surveySubject); + } + + @Override + public void insert(EvaluateSurvey entity) { + entity.setCreateBy(SecurityUtils.getUserId()); + entity.setCreateTime(new Date()); + entity.setDelFlag("1"); + int row = evaluateSurveyMapper.insert(entity); + if (row > 0) { + List questions = entity.getQuestions(); + if (!CollectionUtils.isEmpty(questions)) { + for (EvaluateQuestion question : questions) { + question.setSurveyId(entity.getId()); + row = evaluateQuestionMapper.insert(question); + if (row > 0) { + List options = question.getOptions(); + if (!CollectionUtils.isEmpty(options)) { + for (EvaluateOption option : options) { + option.setSurveyId(entity.getId()); + option.setQuestionId(question.getId()); + evaluateOptionMapper.insert(option); + } + } + } + } + } + } + } + + @Override + public void update(EvaluateSurvey entity) { + entity.setUpdateBy(SecurityUtils.getUserId()); + entity.setUpdateTime(new Date()); + entity.setDelFlag("1"); + int row = evaluateSurveyMapper.update(entity); + if (row > 0) { + List questions = entity.getQuestions(); + if (!CollectionUtils.isEmpty(questions)) { + evaluateQuestionMapper.clearSurveyId(entity.getId()); + for (EvaluateQuestion question : questions) { + question.setSurveyId(entity.getId()); + if (Objects.isNull(question.getId())) { + row = evaluateQuestionMapper.insert(question); + } else { + row = evaluateQuestionMapper.update(question); + } + if (row > 0) { + List options = question.getOptions(); + if (!CollectionUtils.isEmpty(options)) { + evaluateOptionMapper.clearRelationId(question.getId(), entity.getId()); + for (EvaluateOption option : options) { + option.setSurveyId(entity.getId()); + option.setQuestionId(question.getId()); + if (Objects.isNull(option.getId())) { + evaluateOptionMapper.insert(option); + } else { + evaluateOptionMapper.update(option); + } + } + } + } + } + } + } + } +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/PhysicalSignServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/PhysicalSignServiceImpl.java index 5b07dce..5ed14e8 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/PhysicalSignServiceImpl.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/service/impl/PhysicalSignServiceImpl.java @@ -99,6 +99,11 @@ public class PhysicalSignServiceImpl implements PhysicalSignService { return map; } + @Override + public List getLastRecord(String identity) { + return deviceBgRecordMapper.getLastRecord(identity); + } + private Map bgRecord(String identity, String type) { Map map = new HashMap<>(); List list = deviceBgRecordMapper.getBgRecord(identity, type); diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/EvaluateRecordResultVO.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/EvaluateRecordResultVO.java new file mode 100644 index 0000000..b24ab3b --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/EvaluateRecordResultVO.java @@ -0,0 +1,20 @@ +package com.xinelu.familydoctor.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +/** + * @author gaoyu + * @description 自评记录结果视图 + * @date 2023-10-16 11:38 + */ +@ApiModel("自评记录结果视图") +@Data +public class EvaluateRecordResultVO { + private Long recordId; + private String surveySubject; + private String evaluateResult; + private String advice; + private String time; + private String date; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/EvaluateRecordTimelineVO.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/EvaluateRecordTimelineVO.java new file mode 100644 index 0000000..ec64ae6 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/EvaluateRecordTimelineVO.java @@ -0,0 +1,18 @@ +package com.xinelu.familydoctor.vo; + +import io.swagger.annotations.ApiModel; +import lombok.Data; + +import java.util.List; + +/** + * @author gaoyu + * @description 评估记录时间轴视图 + * @date 2023-10-16 11:30 + */ +@ApiModel("评估记录时间轴视图") +@Data +public class EvaluateRecordTimelineVO { + private String date; + private List records; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/PhysicalLastRecordVO.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/PhysicalLastRecordVO.java new file mode 100644 index 0000000..6e3c7f2 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/vo/PhysicalLastRecordVO.java @@ -0,0 +1,27 @@ +package com.xinelu.familydoctor.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @author gaoyu + * @description 体征检测最后一次记录 + * @date 2023-10-20 14:28 + */ +@ApiModel("体征检测最后一次记录") +@Data +public class PhysicalLastRecordVO { + @ApiModelProperty("类型1:血糖2:血压3:血脂4:bmi5:血氧6:心率7:体温") + private String type; + @ApiModelProperty("日期") + @JsonFormat(pattern = "yyyy/MM/dd", timezone = "GMT+8") + private Date date; + @ApiModelProperty("时间段1:凌晨2:早餐前3:早晨后4:午餐前5:午餐后6:晚餐前7:晚餐后8:睡前") + private String bucket; + @ApiModelProperty("值") + private String val; +} diff --git a/xinelu-familydoctor/src/main/resources/mapper/DeviceBgRecordMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/DeviceBgRecordMapper.xml index 65ff150..2ff4165 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/DeviceBgRecordMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/DeviceBgRecordMapper.xml @@ -105,4 +105,27 @@ where id = #{id,jdbcType=BIGINT} + + diff --git a/xinelu-familydoctor/src/main/resources/mapper/DeviceBmiRecordMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/DeviceBmiRecordMapper.xml index 6ce7de4..74efbf5 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/DeviceBmiRecordMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/DeviceBmiRecordMapper.xml @@ -7,13 +7,15 @@ + + - id,identity,bmi, - measure_time + id,identity,height, + weight,bmi,measure_time select ifnull(max(bmi), 0) "maxVal", - ifnull(min(bmi), 0) "minVal", - ifnull(avg(bmi), 0) "avgVal", - count(case when bmi >= 18.5 and bmi <= 23.9 then 1 else null end) "normalNum", - count(case when bmi < 18.5 or bmi >= 24 then 1 else null end) "overNum" + ifnull(min(bmi), 0) "minVal", + ifnull(avg(bmi), 0) "avgVal", + count(case when bmi >= 18.5 and bmi <= 23.9 then 1 else null end) "normalNum", + count(case when bmi < 18.5 or bmi >= 24 then 1 else null end) "overNum" from device_bmi_record where identity = #{identity} @@ -73,26 +75,33 @@ - insert into device_bmi_record - (identity,bmi - ,measure_time) - values (#{identity,jdbcType=VARCHAR},#{bmi,jdbcType=DECIMAL} - ,#{measureTime,jdbcType=TIMESTAMP}) + (identity,height + ,weight,bmi,measure_time + ) + values (#{identity,jdbcType=VARCHAR},#{height,jdbcType=DECIMAL} + ,#{weight,jdbcType=DECIMAL},#{bmi,jdbcType=DECIMAL},#{measureTime,jdbcType=TIMESTAMP} + ) update device_bmi_record - - identity = #{identity,jdbcType=VARCHAR}, - - - bmi = #{bmi,jdbcType=DECIMAL}, - - - measure_time = #{measureTime,jdbcType=TIMESTAMP}, - + + identity = #{identity,jdbcType=VARCHAR}, + + + height = #{height,jdbcType=DECIMAL}, + + + weight = #{weight,jdbcType=DECIMAL}, + + + bmi = #{bmi,jdbcType=DECIMAL}, + + + measure_time = #{measureTime,jdbcType=TIMESTAMP}, + where id = #{id,jdbcType=BIGINT} diff --git a/xinelu-familydoctor/src/main/resources/mapper/DeviceBpRecordMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/DeviceBpRecordMapper.xml index e3271ba..e1f307e 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/DeviceBpRecordMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/DeviceBpRecordMapper.xml @@ -51,7 +51,7 @@ select concat(sbp, '/', dbp) "maxSbpVal" from device_bp_record where sbp = (select max(sbp) from device_bp_record - and identity = #{identity} + where identity = #{identity} @@ -99,7 +99,7 @@ select concat(sbp, '/', dbp) "maxDbpVal" from device_bp_record where dbp = (select max(dbp) from device_bp_record - and identity = #{identity} + where identity = #{identity} @@ -147,7 +147,7 @@ select concat(sbp, '/', dbp) "minSbpVal" from device_bp_record where sbp = (select min(sbp) from device_bp_record - and identity = #{identity} + where identity = #{identity} @@ -195,7 +195,7 @@ select concat(sbp, '/', dbp) "minDbpVal" from device_bp_record where dbp = (select min(dbp) from device_bp_record - and identity = #{identity} + where identity = #{identity} diff --git a/xinelu-familydoctor/src/main/resources/mapper/EvaluateAdviceTemplateMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/EvaluateAdviceTemplateMapper.xml new file mode 100644 index 0000000..6f025ad --- /dev/null +++ b/xinelu-familydoctor/src/main/resources/mapper/EvaluateAdviceTemplateMapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + id,template_type,content, + use_flag,create_time,create_by, + update_time,update_by,remark, + del_flag + + + + + + + + insert into evaluate_advice_template + ( id,template_type,content + ,use_flag,create_time,create_by + ,update_time,update_by,remark + ,del_flag) + values (#{id,jdbcType=BIGINT},#{templateType,jdbcType=VARCHAR},#{content,jdbcType=VARCHAR} + ,#{useFlag,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP},#{createBy,jdbcType=BIGINT} + ,#{updateTime,jdbcType=TIMESTAMP},#{updateBy,jdbcType=BIGINT},#{remark,jdbcType=VARCHAR} + ,#{delFlag,jdbcType=VARCHAR}) + + + update evaluate_advice_template + + + template_type = #{templateType,jdbcType=VARCHAR}, + + + content = #{content,jdbcType=VARCHAR}, + + + use_flag = #{useFlag,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + create_by = #{createBy,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=BIGINT}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + diff --git a/xinelu-familydoctor/src/main/resources/mapper/EvaluateAnswerMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/EvaluateAnswerMapper.xml new file mode 100644 index 0000000..0289279 --- /dev/null +++ b/xinelu-familydoctor/src/main/resources/mapper/EvaluateAnswerMapper.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + id,record_id,question_id, + option_id,option_content + + + + + + insert into evaluate_answer + (record_id,question_id + ,option_id,option_content) + values (#{recordId,jdbcType=BIGINT},#{questionId,jdbcType=BIGINT} + ,#{optionId,jdbcType=BIGINT},#{optionContent,jdbcType=VARCHAR}) + + + update evaluate_answer + + + record_id = #{recordId,jdbcType=BIGINT}, + + + question_id = #{questionId,jdbcType=BIGINT}, + + + option_id = #{optionId,jdbcType=BIGINT}, + + + option_content = #{optionContent,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + diff --git a/xinelu-familydoctor/src/main/resources/mapper/EvaluateOptionMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/EvaluateOptionMapper.xml new file mode 100644 index 0000000..2a6d823 --- /dev/null +++ b/xinelu-familydoctor/src/main/resources/mapper/EvaluateOptionMapper.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + id,question_id,survey_id, + option_name,option_sort + + + + + + insert into evaluate_option + (question_id,survey_id + ,option_name,option_sort) + values (#{questionId,jdbcType=BIGINT},#{surveyId,jdbcType=BIGINT} + ,#{optionName,jdbcType=VARCHAR},#{optionSort,jdbcType=INTEGER}) + + + update evaluate_option + + + question_id = #{questionId,jdbcType=BIGINT}, + + + survey_id = #{surveyId,jdbcType=BIGINT}, + + + option_name = #{optionName,jdbcType=VARCHAR}, + + + option_sort = #{optionSort,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=BIGINT} + + + + update evaluate_option set question_id = null, survey_id = null + where question_id = #{questionId,jdbcType=BIGINT} and survey_id = #{surveyId,jdbcType=BIGINT} + + diff --git a/xinelu-familydoctor/src/main/resources/mapper/EvaluateQuestionMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/EvaluateQuestionMapper.xml new file mode 100644 index 0000000..8f91890 --- /dev/null +++ b/xinelu-familydoctor/src/main/resources/mapper/EvaluateQuestionMapper.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + id,survey_id,question_name, + question_type,question_sort,required_flag + + + + + + insert into evaluate_question + (survey_id,question_name + ,question_type,question_sort,required_flag) + values (#{surveyId,jdbcType=BIGINT},#{questionName,jdbcType=VARCHAR} + ,#{questionType,jdbcType=VARCHAR},#{questionSort,jdbcType=INTEGER},#{requiredFlag,jdbcType=VARCHAR}) + + + update evaluate_question + + + survey_id = #{surveyId,jdbcType=BIGINT}, + + + question_name = #{questionName,jdbcType=VARCHAR}, + + + question_type = #{questionType,jdbcType=VARCHAR}, + + + question_sort = #{questionSort,jdbcType=INTEGER}, + + + required_flag = #{requiredFlag,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update evaluate_question set survey_id = null where survey_id = #{surveyId,jdbcType=BIGINT} + + diff --git a/xinelu-familydoctor/src/main/resources/mapper/EvaluateRecordMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/EvaluateRecordMapper.xml new file mode 100644 index 0000000..2bfab9d --- /dev/null +++ b/xinelu-familydoctor/src/main/resources/mapper/EvaluateRecordMapper.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + id,user_id,survey_id,survey_subject, + evaluate_result,advice,create_time + + + + + + insert into evaluate_record + (user_id,survey_id,survey_subject + ,evaluate_result,advice,create_time + ) + values (#{userId,jdbcType=BIGINT},#{surveyId,jdbcType=BIGINT},#{surveySubject,jdbcType=VARCHAR} + ,#{evaluateResult,jdbcType=VARCHAR},#{advice,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP} + ) + + diff --git a/xinelu-familydoctor/src/main/resources/mapper/EvaluateSurveyMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/EvaluateSurveyMapper.xml new file mode 100644 index 0000000..efc198c --- /dev/null +++ b/xinelu-familydoctor/src/main/resources/mapper/EvaluateSurveyMapper.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + id,survey_subject,use_flag, + create_time,create_by,update_time, + update_by,del_flag,remark + + + + + + + + insert into evaluate_survey + (survey_subject,use_flag + ,create_time,create_by,update_time + ,update_by,del_flag,remark + ) + values (#{surveySubject,jdbcType=VARCHAR},#{useFlag,jdbcType=VARCHAR} + ,#{createTime,jdbcType=TIMESTAMP},#{createBy,jdbcType=BIGINT},#{updateTime,jdbcType=TIMESTAMP} + ,#{updateBy,jdbcType=BIGINT},#{delFlag,jdbcType=VARCHAR},#{remark,jdbcType=VARCHAR} + ) + + + update evaluate_survey + + + survey_subject = #{surveySubject,jdbcType=VARCHAR}, + + + use_flag = #{useFlag,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + create_by = #{createBy,jdbcType=BIGINT}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=BIGINT}, + + + del_flag = #{delFlag,jdbcType=VARCHAR}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + diff --git a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml index f3bed34..7c11c77 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/register/ResidentPatientInfoMapper.xml @@ -45,6 +45,9 @@ + + + @@ -87,7 +90,10 @@ disease, city_code, binding_time, - is_checked + is_checked, + household_relationship, + household_card_no, + sign_no from patient_info @@ -119,6 +125,9 @@ and is_checked = #{isChecked} + + and household_card_no = #{householdCardNo} + order by binding_time desc @@ -207,6 +216,15 @@ is_checked, + + household_relationship, + + + household_card_no, + + + sign_no, + #{areaCode}, @@ -286,6 +304,15 @@ #{isChecked}, + + #{householdRelationship}, + + + #{householdCardNo}, + + + #{signNo}, + @@ -406,6 +433,15 @@ is_checked = #{isChecked}, + + household_relationship = #{householdRelationship}, + + + household_card_no = #{householdCardNo}, + + + sign_no = #{signNo}, + where patient_code = #{patientCode} @@ -451,7 +487,6 @@ update patient_info set is_checked = #{isChecked} where patient_code = #{patientCode} - select ,p.address,p.phone from resident_service_apply s - left join patient_info p on p.patient_code = s.patient_id + left join patient_info p on p.card_no = s.identity where 1=1 and s.identity = #{identity} @@ -269,6 +273,9 @@ and s.user_no = #{userNo} + + and s.form_no = #{formNo} + and s.booking_time >= #{startDate} diff --git a/xinelu-nurse-applet/pom.xml b/xinelu-nurse-applet/pom.xml index f9d3d73..db781b7 100644 --- a/xinelu-nurse-applet/pom.xml +++ b/xinelu-nurse-applet/pom.xml @@ -53,4 +53,4 @@ wechatpay-apache-httpclient - \ No newline at end of file + 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 d1d6f24..7f9531a 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 @@ -1,6 +1,7 @@ package com.xinelu.applet.controller.appletscreeningrecord; import com.alibaba.fastjson2.JSONObject; +import com.xinelu.applet.service.messagepush.MessagePushService; import com.xinelu.common.annotation.RepeatSubmit; import com.xinelu.common.config.XinELuConfig; import com.xinelu.common.constant.ScreeningProjectConstants; @@ -19,6 +20,7 @@ import com.xinelu.manage.vo.screeningrecord.ScreeningRecordVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import java.io.File; +import java.util.Date; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletResponse; @@ -45,6 +47,9 @@ public class AppletScreeningRecordController extends BaseController { @Resource private IScreeningRecordService screeningRecordService; + @Resource + private MessagePushService messagePushService; + @GetMapping("/record") @ApiOperation(value = "获取筛查结果记录") public TableDataInfo record(ScreeningRecordDTO query) { @@ -83,7 +88,11 @@ public class AppletScreeningRecordController extends BaseController { if(!DateUtils.formatDate(body.getApplyStartTime(), "yyyy-MM-dd").equals(DateUtils.formatDate(body.getApplyEndTime(), "yyyy-MM-dd"))) { return R.fail("预约日期请选择在同一天"); } - return R.ok(screeningRecordService.save(body)); + JSONObject result = screeningRecordService.save(body); + if(result != null && result.containsKey("openid")) { + messagePushService.fdApprovePush(result); + } + return R.ok(result.getString("patientId")); } catch (Exception e) { return R.fail(e.getMessage()); } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/chatrecord/ChatRecordController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/chatrecord/ChatRecordController.java index 6b80fdd..81c117c 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/chatrecord/ChatRecordController.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/chatrecord/ChatRecordController.java @@ -4,12 +4,15 @@ import com.xinelu.applet.dto.chatrecord.ChatRecordDTO; import com.xinelu.applet.dto.chatrecord.MessageSearchDto; import com.xinelu.applet.service.chatRecord.IChatRecordService; import com.xinelu.applet.vo.chatrecord.MessageCenterVo; +import com.xinelu.applet.vo.chatrecord.MessageVo; import com.xinelu.common.annotation.Log; import com.xinelu.common.constant.Constants; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.core.domain.R; +import com.xinelu.common.core.page.TableDataInfo; import com.xinelu.common.enums.BusinessType; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.socket.WebSocketUtils; import com.xinelu.manage.domain.chatRecord.ChatRecord; import io.swagger.annotations.Api; @@ -101,6 +104,19 @@ public class ChatRecordController extends BaseController { return R.ok(chatRecordService.getMegVoList(messageDto)); } + @ApiOperation(value = "获取指定类型的消息记录", notes = "1:通知公告 2:健康推送 4:消息通知") + @GetMapping("/getMegList") + public TableDataInfo getMegList(MessageSearchDto messageDto) { + if (messageDto.getPatientId() == null) { + throw new ServiceException("居民业务主键不能为空"); + } + if (StringUtils.isBlank(messageDto.getMessageCategory())) { + throw new ServiceException("消息类型不能为空"); + } + startPage(); + return getDataTable(chatRecordService.getMegList(messageDto)); + } + @ApiOperation("删除消息") @GetMapping("/deleteMegs") public R deleteMegs(@RequestBody List ids) { diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java index 9ef0a75..49d59c9 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/apporderevaluate/OrderEvaluateAndPictureDTO.java @@ -2,6 +2,7 @@ package com.xinelu.applet.dto.apporderevaluate; import com.xinelu.common.custominterface.Insert; import com.xinelu.manage.domain.orderevaluatepictureinfo.OrderEvaluatePictureInfo; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotBlank; @@ -47,6 +48,12 @@ public class OrderEvaluateAndPictureDTO implements Serializable { @NotBlank(message = "请选择订单编号", groups = {Insert.class}) private String orderNo; + /** + * 服务编号 + */ + @ApiModelProperty(value = "服务编号") + private String serviceCode; + /** * 评价内容 */ @@ -69,6 +76,12 @@ public class OrderEvaluateAndPictureDTO implements Serializable { @NotNull(message = "请选择评分", groups = {Insert.class}) private Integer compositeScore; + /** + * 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR + */ + @ApiModelProperty(value = "订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR") + private String orderSource; + /** * 创建时间 */ @@ -84,8 +97,4 @@ public class OrderEvaluateAndPictureDTO implements Serializable { */ private List orderEvaluatePictureInfoList; - /** - * 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR - */ - private String orderSource; } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/ChatRecordDTO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/ChatRecordDTO.java index 229c4e4..f39a037 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/ChatRecordDTO.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/ChatRecordDTO.java @@ -32,12 +32,23 @@ public class ChatRecordDTO extends BaseEntity implements Serializable { @NotNull(message = "聊天记录业务主键不能为空", groups = {Insert.class}) private Long consultationId; + /** + * 消息业务主键 + */ + @NotNull(message = "消息业务主键", groups = {Insert.class}) + private String messageNo; + /** * 发送人 */ @NotNull(message = "发送人信息不能为空", groups = {Insert.class}) private Long senderId; + /** + * 发送人(家医医生编号) + */ + private String senderNo; + /** * 发送人姓名 */ @@ -66,7 +77,6 @@ public class ChatRecordDTO extends BaseEntity implements Serializable { @NotNull(message = "消息类型不能为空", groups = {Insert.class}) private String messageType; - /** * 消息内容,图片内容时内容为:图片路径 */ @@ -74,5 +84,15 @@ public class ChatRecordDTO extends BaseEntity implements Serializable { @Length(max = 400, message = "消息内容不能超过18位", groups = {Insert.class, Update.class}) private String content; + /** + * 标题 + */ + private String title; + + @ApiModelProperty("通知适用人群(0:全部人群)") + private String crowds; + + @ApiModelProperty("通知适用人群名称") + private String crowdsName; } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/MarkReadDto.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/MarkReadDto.java index a56809c..08a910e 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/MarkReadDto.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/MarkReadDto.java @@ -14,7 +14,7 @@ import lombok.Data; @ApiModel("标记为已读传输对象") public class MarkReadDto { - @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询") + @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知") private String messageCategory; @ApiModelProperty("绑定编号") diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/MessageSearchDto.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/MessageSearchDto.java index f585b5b..c63a489 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/MessageSearchDto.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/chatrecord/MessageSearchDto.java @@ -14,18 +14,21 @@ import lombok.Data; @Data public class MessageSearchDto { - @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询") + @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知") private String messageCategory; @ApiModelProperty("通知适用人群(0:全部人群)") private String crowds; @ApiModelProperty(value = "居民注册业务主键") - private String bindingNo; + private Long patientId; @ApiModelProperty("发送人编号") private Long senderId; + @ApiModelProperty("发送人编号(家医医生编号)") + private String senderNo; + @ApiModelProperty("接收人编号") private Long recipientId; @@ -47,6 +50,17 @@ public class MessageSearchDto { @ApiModelProperty(value = "居民绑定时间", hidden = true) private Date bindingTime; + /** + * 页码 + */ + @ApiModelProperty(value = "页码") + private Integer pageNum = 1; + /** + * 每页大小 + */ + @ApiModelProperty(value = "每页大小") + private Integer pageSize = 15; + @ApiModelProperty(value = "通知适用人群编号集合", hidden = true) private List crowdNoList; } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDMessageExtentDto.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDMessageExtentDto.java new file mode 100644 index 0000000..52419dd --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDMessageExtentDto.java @@ -0,0 +1,43 @@ +package com.xinelu.applet.dto.messagepush; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 家医订阅消息请求参数扩展类 + * @Date 2023-10-19 019 10:15 + * @Param + * @return + **/ +@Data +public class FDMessageExtentDto { + + @ApiModelProperty("居民姓名") + private String residentName; + + @ApiModelProperty("医院名称") + private String hospitalName; + + @ApiModelProperty("医生名称") + private String doctorName; + + @ApiModelProperty("团队名称") + private String teamName; + + @ApiModelProperty("申请内容(比如:申请签约、申请随访、申请转诊等)") + private String applyContent; + + @ApiModelProperty("申请结果(比如:成功、失败、处理中等)") + private String applyResult; + + @ApiModelProperty("处理时间") + private String handleDate; + + @ApiModelProperty("药品名称") + private String drugName; + + @ApiModelProperty("药品用法") + private String drugUsage; + +} diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDMessagePushDto.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDMessagePushDto.java new file mode 100644 index 0000000..8885af9 --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDMessagePushDto.java @@ -0,0 +1,66 @@ +package com.xinelu.applet.dto.messagepush; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 消息推送请求对象 + * @Date 2023-10-18 018 14:26 + * @Param + * @return + **/ +@Data +@ApiModel(value = "消息推送请求对象") +public class FDMessagePushDto extends FDMessageExtentDto{ + + @ApiModelProperty("业务主键") + private String messageNo; + + @ApiModelProperty(value = "消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知", required = true) + private String messageCategory; + + @ApiModelProperty("通知适用人群(0:全部人群)") + private String crowds; + + @ApiModelProperty("通知适用人群名称") + private String crowdsName; + + @ApiModelProperty("发送人编号") + private String senderNo; + + @ApiModelProperty("发送人姓名") + private String senderName; + + @ApiModelProperty("发送时间") + private String sendTime; + + @ApiModelProperty("接收人身份证号") + private String recipientIdentity; + + @ApiModelProperty("接收人编号") + private String recipientNo; + + @ApiModelProperty("接收人姓名") + private String recipientName; + + @ApiModelProperty("消息类型,1:健康推送,2:日常提醒, 3:风险评估完成, 4:推送筛查项目,5:预约筛查成功, 6:筛查完成,7:康复处方,8:随访提醒,9:纳入管理,10:申请转诊,11:转诊申请通过,12:申请会诊,13:会诊申请通过,14:处理异常") + private String messageType; + + @ApiModelProperty("标题") + private String title; + + @ApiModelProperty("消息内容") + private String content; + + @ApiModelProperty("消息内容Id用于点击跳转") + private String contentId; + + @ApiModelProperty("已读状态,0:未读,1:已读") + private String readStatus; + + @ApiModelProperty(value = "模版类型(MessageTemplateType枚举)", required = true) + private String templateType; + +} diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDWxMegDto.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDWxMegDto.java new file mode 100644 index 0000000..03672ca --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/FDWxMegDto.java @@ -0,0 +1,35 @@ +package com.xinelu.applet.dto.messagepush; + +import lombok.Data; + +import java.util.Map; + +/** + * @Author mengkuiliang + * @Description 小程序推送所需数据 + * @Date 2023-10-19 019 10:36 + * @Param + * @return + **/ +@Data +public class FDWxMegDto { + + /** + * 用户openid + * */ + private String touser; + + /** + * 订阅消息模版id + * */ + private String template_id; + + /** + * 默认跳到小程序首页 + * */ + private String page = "pages/index/index"; + /** + * 推送文字 + * */ + private Map data; +} diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/TemplateData.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/TemplateData.java new file mode 100644 index 0000000..2a79de4 --- /dev/null +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/dto/messagepush/TemplateData.java @@ -0,0 +1,17 @@ +package com.xinelu.applet.dto.messagepush; + +import lombok.AllArgsConstructor; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 消息的内容 + * @Date 2023-10-19 019 10:36 + * @Param + * @return + **/ +@Data +@AllArgsConstructor +public class TemplateData { + private String value; +} diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/chatrecord/ChatRecordMapper.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/chatrecord/ChatRecordMapper.java index 23412d5..68551d2 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/chatrecord/ChatRecordMapper.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/mapper/chatrecord/ChatRecordMapper.java @@ -18,6 +18,15 @@ public interface ChatRecordMapper { List selectMegVoList(MessageSearchDto messageDto); + /** + * @Author mengkuiliang + * @Description + * @Date 2023-10-25 025 15:25 + * @Param [bindingNo, doctorNo] + * @return com.xinelu.applet.vo.chatrecord.MessageCenterVo + **/ + List selectMegList(MessageSearchDto messageDto); + MessageCenterVo selectOneChatRecord(@Param("bindingNo")Long bindingNo, @Param("doctorNo")Long doctorNo); /** * 查询图文咨询-聊天记录 @@ -69,5 +78,42 @@ public interface ChatRecordMapper { Integer updateReadStatus(MarkReadDto markReadDto); - int deleteMegs(@Param("ids") List ids); + int deleteMegs(@Param("ids") List ids); + + /** + * @Author mengkuiliang + * @Description 查询健康知识推送列表 + * @Date 2023-10-25 025 11:27 + * @Param [messageDto] + * @return java.lang.Object + **/ + List getNoticList(MessageSearchDto messageDto); + + /** + * @Author mengkuiliang + * @Description 查询消息详情 + * @Date 2023-10-25 025 11:45 + * @Param [messageNo] + * @return com.xinelu.applet.vo.chatrecord.MessageVo + **/ + MessageVo getByNo(String messageNo); + + /** + * @Author mengkuiliang + * @Description 删除通知 + * @Date 2023-10-25 025 13:15 + * @Param [messageNo] + * @return void + **/ + void del(String messageNo); + + /** + * @Author mengkuiliang + * @Description 更新通知 + * @Date 2023-10-25 025 14:05 + * @Param [entity] + * @return void + **/ + void updateChatRecordOfNo(ChatRecord entity); + } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/chatRecord/IChatRecordService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/chatRecord/IChatRecordService.java index c096174..77fbc76 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/chatRecord/IChatRecordService.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/chatRecord/IChatRecordService.java @@ -1,8 +1,10 @@ package com.xinelu.applet.service.chatRecord; +import com.github.pagehelper.PageInfo; import com.xinelu.applet.dto.chatrecord.ChatRecordDTO; import com.xinelu.applet.dto.chatrecord.MessageSearchDto; import com.xinelu.applet.vo.chatrecord.MessageCenterVo; +import com.xinelu.applet.vo.chatrecord.MessageVo; import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.exception.file.InvalidExtensionException; import com.xinelu.manage.domain.chatRecord.ChatRecord; @@ -79,5 +81,52 @@ public interface IChatRecordService { List getMegVoList(MessageSearchDto messageDto); - Integer deleteMegs(List ids); + /** + * @Author mengkuiliang + * @Description 获取指定类型的消息记录 + * @Date 2023-10-25 025 15:22 + * @Param [messageDto] + * @return java.util.List + **/ + List getMegList(MessageSearchDto messageDto); + + + Integer deleteMegs(List ids); + + /** + * @Author mengkuiliang + * @Description 查询健康知识推送列表 + * @Date 2023-10-25 025 11:24 + * @Param [messageDto] + * @return com.github.pagehelper.PageInfo + **/ + PageInfo getNoticList(MessageSearchDto messageDto); + + /** + * @Author mengkuiliang + * @Description 查询健康知识推送详情 + * @Date 2023-02-18 14:58 + * @Param [messageNo] + * @return java.lang.Object + **/ + MessageVo getNoticDetail(String messageNo); + + /** + * @Author mengkuiliang + * @Description 删除通知 + * @Date 2023-10-25 025 13:15 + * @Param [messageNo] + * @return void + **/ + void del(String messageNo); + + /** + * @Author mengkuiliang + * @Description 更新通知 + * @Date 2023-10-25 025 14:04 + * @Param [entity] + * @return void + **/ + void updateChatRecordOfNo(ChatRecord entity); + } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/chatRecord/impl/ChatRecordServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/chatRecord/impl/ChatRecordServiceImpl.java index c538368..83363db 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/chatRecord/impl/ChatRecordServiceImpl.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/chatRecord/impl/ChatRecordServiceImpl.java @@ -1,5 +1,8 @@ package com.xinelu.applet.service.chatRecord.impl; +import com.alibaba.fastjson2.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import com.xinelu.applet.dto.chatrecord.ChatRecordDTO; import com.xinelu.applet.dto.chatrecord.MessageSearchDto; import com.xinelu.applet.mapper.chatrecord.ChatRecordMapper; @@ -8,6 +11,7 @@ import com.xinelu.applet.vo.chatrecord.MessageCenterVo; import com.xinelu.applet.vo.chatrecord.MessageVo; import com.xinelu.common.config.XinELuConfig; import com.xinelu.common.core.domain.AjaxResult; +import com.xinelu.common.core.domain.R; import com.xinelu.common.core.dto.MessageTemplate; import com.xinelu.common.enums.MessageContentType; import com.xinelu.common.exception.ServiceException; @@ -17,15 +21,20 @@ import com.xinelu.common.utils.DateUtils; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.file.FileUploadUtils; import com.xinelu.common.utils.file.MimeTypeUtils; +import com.xinelu.common.utils.http.HttpService; +import com.xinelu.common.utils.spring.SpringUtils; +import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.chatRecord.ChatRecord; import java.io.IOException; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import java.time.ZoneId; +import java.util.*; import java.util.stream.Collectors; import javax.annotation.Resource; + +import com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo; +import com.xinelu.manage.service.hospitalpersoninfo.IHospitalPersonInfoService; +import com.xinelu.manage.service.patientinfo.IPatientInfoService; +import com.xinelu.manage.vo.patientinfo.PatientInfoVO; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; @@ -43,6 +52,12 @@ public class ChatRecordServiceImpl implements IChatRecordService { private ChatRecordMapper chatRecordMapper; @Resource private XinELuConfig xinYiLuConfig; + @Resource + private IHospitalPersonInfoService hospitalPersonInfoService; + @Resource + private IPatientInfoService patientInfoService; + @Resource + private HttpService httpService; /** * 查询图文咨询-聊天记录 @@ -77,6 +92,7 @@ public class ChatRecordServiceImpl implements IChatRecordService { chatRecord.setCreateTime(DateUtils.getNowDate()); ChatRecord record = new ChatRecord(); BeanUtils.copyBeanProp(record, chatRecord); + record.setMessageNo(IdUtils.fastSimpleUUID()); record.setReadStatus("0"); record.setSendTime(new Date()); record.setDelFlag(0); @@ -215,7 +231,110 @@ public class ChatRecordServiceImpl implements IChatRecordService { return messageCenterVos; } - @Override public Integer deleteMegs(List ids) { - return chatRecordMapper.deleteMegs(ids); - } + /** + * @Author mengkuiliang + * @Description 获取指定类型的消息记录 + * @Date 2023-10-25 025 15:21 + * @Param [messageDto] + * @return java.util.List + **/ + @Override + public List getMegList(MessageSearchDto messageDto) { + // 获取注册信息 + PatientInfoVO patientInfo = patientInfoService.selectPatientInfoById(messageDto.getPatientId()); + if (patientInfo == null) { + throw new ServiceException("未查询到注册信息"); + } + String bindTimeStr = String.valueOf(patientInfo.getBindingTime().getYear()) + String.valueOf(patientInfo.getBindingTime().getMonthValue()) + String.valueOf(patientInfo.getBindingTime().getDayOfMonth()) + String.valueOf(patientInfo.getBindingTime().getHour()) + String.valueOf(patientInfo.getBindingTime().getMinute()) + String.valueOf(patientInfo.getBindingTime().getSecond()); + messageDto.setBindingTime(DateUtils.parseDate(bindTimeStr)); + + // 通知公告 + if(messageDto.getMessageCategory().equals("1")) { + return chatRecordMapper.selectMegList(messageDto); + // 健康推送 + } else if(messageDto.getMessageCategory().equals("2")) { + String result = (String) httpService.get(SpringUtils.getFdUrl(patientInfo.getCityCode()) + "/resident/signinfo/detail/" + patientInfo.getCardNo(), null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (!"1".equals(jsonObject.get("code"))) { + throw new ServiceException(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + throw new ServiceException("未查询到签约信息"); + } + JSONObject signInfoObject = jsonObject.getJSONObject("data"); + HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.getByPersonCode(signInfoObject.getString("userNo"), null); + if (hospitalPersonInfo == null) { + throw new ServiceException("未查询到医生信息"); + } + messageDto.setSenderId(hospitalPersonInfo.getId()); + messageDto.setCrowdNoList(Arrays.asList(signInfoObject.getString("crowdsNo").split(","))); + return chatRecordMapper.selectMegList(messageDto); + // 消息通知 + } else if(messageDto.getMessageCategory().equals("4")) { + messageDto.setRecipientId(patientInfo.getId()); + return chatRecordMapper.selectMegList(messageDto); + } else { + return new ArrayList<>(); + } + } + + @Override public Integer deleteMegs(List ids) { + return chatRecordMapper.deleteMegs(ids); + } + + /** + * @Author mengkuiliang + * @Description 查询健康知识推送列表 + * @Date 2023-10-25 025 11:24 + * @Param [messageDto] + * @return com.github.pagehelper.PageInfo + **/ + @Override + public PageInfo getNoticList(MessageSearchDto messageDto) { + // 根据发送人编号查询家医用户信息 + HospitalPersonInfo hospitalPersonInfo = hospitalPersonInfoService.getByPersonCode(messageDto.getSenderNo(), null); + if(hospitalPersonInfo == null) { + throw new ServiceException("未查询到医生信息"); + } + messageDto.setSenderId(hospitalPersonInfo.getId()); + PageHelper.startPage(messageDto.getPageNum(), messageDto.getPageSize()); + return PageInfo.of(chatRecordMapper.getNoticList(messageDto)); + } + + /** + * @return com.xinelu.mp.message.pojo.vo.MessageVo + * @Author mengkuiliang + * @Description 查询消息详情 + * @Date 2023-02-18 14:58 + * @Param [messageNo] + **/ + @Override + public MessageVo getNoticDetail(String messageNo) { + return chatRecordMapper.getByNo(messageNo); + } + + /** + * @Author mengkuiliang + * @Description 删除通知 + * @Date 2023-10-25 025 13:15 + * @Param [messageNo] + * @return void + **/ + @Override + public void del(String messageNo) { + chatRecordMapper.del(messageNo); + } + + /** + * @Author mengkuiliang + * @Description 更新通知 + * @Date 2023-10-25 025 14:05 + * @Param [entity] + * @return void + **/ + @Override + public void updateChatRecordOfNo(ChatRecord entity) { + chatRecordMapper.updateChatRecordOfNo(entity); + } + } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/messagepush/Impl/MessagePushServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/messagepush/Impl/MessagePushServiceImpl.java index 2647526..f235319 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/messagepush/Impl/MessagePushServiceImpl.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/messagepush/Impl/MessagePushServiceImpl.java @@ -1,23 +1,30 @@ package com.xinelu.applet.service.messagepush.Impl; import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; +import com.xinelu.applet.dto.chatrecord.ChatRecordDTO; +import com.xinelu.applet.dto.messagepush.FDMessagePushDto; +import com.xinelu.applet.dto.messagepush.FDWxMegDto; +import com.xinelu.applet.dto.messagepush.TemplateData; +import com.xinelu.applet.service.chatRecord.IChatRecordService; import com.xinelu.applet.service.messagepush.MessagePushService; import com.xinelu.common.config.AppletChatConfig; import com.xinelu.common.config.AppletPageConfig; import com.xinelu.common.constant.Constants; import com.xinelu.common.entity.AppletAccessToken; import com.xinelu.common.entity.MessageValueEntity; -import com.xinelu.common.enums.AppletSubscriptionMessageEnum; -import com.xinelu.common.enums.CouponTypeEnum; -import com.xinelu.common.enums.SettingsTypeEnum; -import com.xinelu.common.enums.SubscribeStatusEnum; +import com.xinelu.common.enums.*; import com.xinelu.common.utils.AppletChatUtil; import com.xinelu.common.utils.http.HttpUtils; +import com.xinelu.common.utils.map.MapUtil; +import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.manage.domain.subscribemessagerecord.SubscribeMessageRecord; import com.xinelu.manage.domain.systemsettingsinfo.SystemSettingsInfo; import com.xinelu.manage.mapper.subscribemessagerecord.SubscribeMessageRecordMapper; import com.xinelu.manage.mapper.systemsettingsinfo.SystemSettingsInfoMapper; +import com.xinelu.manage.service.patientinfo.IPatientInfoService; import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO; +import com.xinelu.manage.vo.patientinfo.PatientInfoVO; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.scheduling.annotation.Async; @@ -27,10 +34,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; import java.time.LocalDate; import java.time.format.DateTimeFormatter; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; +import java.util.*; /** * @Description 消息推送实现层 @@ -49,6 +53,10 @@ public class MessagePushServiceImpl implements MessagePushService { private SystemSettingsInfoMapper systemSettingsInfoMapper; @Resource private AppletPageConfig appletPageConfig; + @Resource + private IPatientInfoService patientInfoService; + @Resource + private IChatRecordService chatRecordService; /** * 微信消息推送url @@ -208,7 +216,7 @@ public class MessagePushServiceImpl implements MessagePushService { log.error("不合法的 template_id!"); break; case Constants.ARGUMENT_INVALID: - log.error("参数无效!"); + log.error("参数无效!{}", result); break; case Constants.DENY_SUBSCRIPTION: log.error("用户拒接订阅!"); @@ -218,4 +226,214 @@ public class MessagePushServiceImpl implements MessagePushService { } } } + + /** + * @return void + * @Author mengkuiliang + * @Description 家医申请审批结果订阅消息推送 + * @Date 2023-10-18 018 14:03 + * @Param [appletAccessToken, paramsMap, busType] + **/ + @Override + @Async("asyncThreadServiceExecutor") + public void fdApprovePush(JSONObject body) { + if (body.containsKey("cardNo") && !StringUtils.isBlank(body.getString("cardNo"))) { + PatientInfoVO patientInfo = patientInfoService.selectPatientInfoByCardNo(body.getString("cardNo")); + if (patientInfo == null) { + log.error("接收方未注册 {}", body.getString("cardNo")); + } + AppletAccessToken appletAccessToken = AppletChatUtil.getAppletAccessToken(appletChatConfig.getAppletId(), appletChatConfig.getSecret()); + if (Objects.isNull(appletAccessToken)) { + log.error("获取微信小程序accessToken信息失败!"); + } + if (Objects.nonNull(appletAccessToken.getErrcode()) && appletAccessToken.getErrcode() != AppletSubscriptionMessageEnum.SUCCESS_ERRCODE.getValue()) { + log.error("获取微信小程序accessToken信息失败,失败信息为:" + appletAccessToken.getErrmsg(), 201); + } + if (StringUtils.isBlank(appletAccessToken.getAccessToken())) { + log.error("accessToken信息为空!"); + } + ChatRecordDTO chatRecord = new ChatRecordDTO(); + // 查询居民注册信息 + if(!body.containsKey("patientId") || body.getLong("patientId") == null) { + chatRecord.setRecipientId(patientInfo.getId()); + } else { + chatRecord.setRecipientId(body.getLong("patientId")); + } + + //模板内容 + Map messageValueEntityMap = new LinkedHashMap<>(); + switch (body.getString("busType")) { + // 申请 + case "10": + messageValueEntityMap.put("name2", new MessageValueEntity(body.getString("receiveName"))); + messageValueEntityMap.put("thing6", new MessageValueEntity(body.getString("text1"))); + messageValueEntityMap.put("thing5", new MessageValueEntity(body.getString("text2"))); + messageValueEntityMap.put("thing8", new MessageValueEntity(body.getString("sendTime"))); + messageValueEntityMap.put("thing9", new MessageValueEntity(body.getString("sendContent"))); + chatRecord.setContent(body.getString("receiveName") + "在" + body.getString("text1") + "提交服务申请,服务内容:" + (body.containsKey("text3") && !StringUtils.isBlank(body.getString("text3"))? body.getString("text3"): body.getString("text2"))); + chatRecord.setRecipientName(body.getString("receiveName")); + chatRecord.setSenderName(body.getString("text1")); + break; + // 用药 + case "9": + messageValueEntityMap.put("thing1", new MessageValueEntity(body.getString("text1"))); + messageValueEntityMap.put("thing2", new MessageValueEntity(body.getString("text2"))); + messageValueEntityMap.put("time3", new MessageValueEntity(body.getString("sendTime"))); + messageValueEntityMap.put("thing4", new MessageValueEntity(body.getString("sendContent"))); + chatRecord.setContent(body.getString("sendContent")); + chatRecord.setRecipientName(body.getString("receiveName")); + chatRecord.setSenderName(body.getString("senderName")); + break; + // 默认 + default: + messageValueEntityMap.put("thing1", new MessageValueEntity(body.getString("senderName"))); + messageValueEntityMap.put("time2", new MessageValueEntity(body.getString("sendTime"))); + messageValueEntityMap.put("thing3", new MessageValueEntity(body.getString("sendContent"))); + chatRecord.setContent(body.getString("sendContent")); + chatRecord.setRecipientName(body.getString("receiveName")); + chatRecord.setSenderName(body.getString("senderName")); + break; + } + + Map paramsMap = new HashMap<>(); + paramsMap.put("touser", body.getString("openid")); + paramsMap.put("template_id", MessageTemplateType.getFolllowupTypeByCode(body.getString("busType")).getTemplateId()); + paramsMap.put("page", appletPageConfig.getIntegralPageUrl()); + paramsMap.put("data", messageValueEntityMap); + //发送 + this.sendPosts(appletAccessToken, paramsMap); + + // 记录通知消息 + if(body.containsKey("messageCategory") && !StringUtils.isBlank(body.getString("messageCategory"))) { + chatRecord.setMessageType("1"); + chatRecord.setTitle(body.getString("sendTitle")); + chatRecord.setMessageNo(IdUtils.fastSimpleUUID()); + chatRecord.setSendTime(new Date()); + chatRecord.setMessageCategory(body.getString("messageCategory")); + chatRecordService.insertChatRecord(chatRecord); + } + } + } + + /** + * @return void + * @Author mengkuiliang + * @Description 家医推送订阅消息 + * @Date 2023-10-19 019 10:20 + * @Param [body] + **/ + @Override + @Async("asyncThreadServiceExecutor") + public void FdPushMessage(JSONObject req) throws Exception { + log.info("订阅消息-请求参数:{}", JSON.toJSONString(req)); + FDMessagePushDto body = JSONObject.parseObject(req.toJSONString()).toJavaObject(FDMessagePushDto.class); + if (!StringUtils.isBlank(body.getRecipientIdentity())) { + PatientInfoVO patientInfo = patientInfoService.selectPatientInfoByCardNo(body.getRecipientIdentity()); + if (patientInfo == null) { + log.error("接收方未注册 {}", body.getRecipientIdentity()); + } + AppletAccessToken appletAccessToken = AppletChatUtil.getAppletAccessToken(appletChatConfig.getAppletId(), appletChatConfig.getSecret()); + if (Objects.isNull(appletAccessToken)) { + log.error("获取微信小程序accessToken信息失败!"); + } + if (Objects.nonNull(appletAccessToken.getErrcode()) && appletAccessToken.getErrcode() != AppletSubscriptionMessageEnum.SUCCESS_ERRCODE.getValue()) { + log.error("获取微信小程序accessToken信息失败,失败信息为:" + appletAccessToken.getErrmsg(), 201); + } + if (StringUtils.isBlank(appletAccessToken.getAccessToken())) { + log.error("accessToken信息为空!"); + } + ChatRecordDTO chatRecord = new ChatRecordDTO(); + // 查询居民注册信息 + if(!req.containsKey("patientId") || req.getLong("patientId") == null) { + chatRecord.setRecipientId(patientInfo.getId()); + } else { + chatRecord.setRecipientId(req.getLong("patientId")); + } + + FDWxMegDto wxMegDto = new FDWxMegDto(); + wxMegDto.setTouser(patientInfo.getOpenid()); + wxMegDto.setTemplate_id(MessageTemplateType.getFolllowupTypeByCode(body.getTemplateType()).getTemplateId()); + Map meg = new HashMap<>(); + switch (body.getTemplateType()) { + // 用药提醒 + case "9": + meg.put("thing1", new TemplateData(body.getDrugName())); + meg.put("thing2", new TemplateData(body.getDrugUsage())); + meg.put("time3", new TemplateData(body.getHandleDate())); + meg.put("thing4", new TemplateData((!StringUtils.isBlank(body.getRecipientName())? body.getRecipientName(): "") + body.getContent())); + break; + // 筛查预约成功 + case "10": + meg.put("name2", new TemplateData(body.getRecipientName())); + meg.put("thing5", new TemplateData(body.getApplyContent())); + meg.put("thing6", new TemplateData(body.getHospitalName())); + meg.put("thing8", new TemplateData(body.getHandleDate())); + meg.put("thing9", new TemplateData(body.getContent())); + break; + // 家庭医生消息通知 + default: + meg.put("thing1", new TemplateData(body.getDoctorName())); + meg.put("time2", new TemplateData(body.getSendTime())); + meg.put("thing3", new TemplateData(body.getContent())); + break; + } + wxMegDto.setPage(MessageTypePath.getPathByType(body.getMessageType()).getPath() + (StringUtils.isBlank(body.getContentId()) ? "" : body.getContentId())); + wxMegDto.setData(meg); + + //发送 + this.sendPosts(appletAccessToken, MapUtil.object2Map(wxMegDto)); + + // 记录通知消息 + if(req.containsKey("messageCategory") && !StringUtils.isBlank(req.getString("messageCategory")) && req.containsKey("chatRecord")) { + ChatRecordDTO chat = req.getJSONObject("chatRecord").toJavaObject(ChatRecordDTO.class); + if(chat != null) { + chatRecord.setMessageType("1"); + chatRecord.setMessageNo(IdUtils.fastSimpleUUID()); + chatRecord.setSendTime(new Date()); + chatRecord.setTitle(chat.getTitle()); + chatRecord.setContent(chat.getContent()); + chatRecord.setSenderName(chat.getSenderName()); + chatRecord.setRecipientName(patientInfo.getPatientName()); + chatRecord.setMessageCategory(req.getString("messageCategory")); + chatRecordService.insertChatRecord(chatRecord); + } + } + } + } + + /** + * 配置消息模版请求参数 + */ + private FDWxMegDto getTemplate(FDMessagePushDto message, String openid) { + FDWxMegDto wxMegDto = new FDWxMegDto(); + wxMegDto.setTouser(openid); + wxMegDto.setTemplate_id(MessageTemplateType.getFolllowupTypeByCode(message.getTemplateType()).getTemplateId()); + Map meg = new HashMap<>(); + switch (message.getTemplateType()) { + // 用药提醒 + case "9": + meg.put("thing1", new TemplateData(message.getDrugName())); + meg.put("thing2", new TemplateData(message.getDrugUsage())); + meg.put("time3", new TemplateData(message.getHandleDate())); + meg.put("thing4", new TemplateData((!StringUtils.isBlank(message.getRecipientName())? message.getRecipientName(): "") + message.getContent())); + break; + // 筛查预约成功 + case "10": + meg.put("name2", new TemplateData(message.getRecipientName())); + meg.put("thing5", new TemplateData(message.getApplyContent())); + meg.put("thing6", new TemplateData(message.getHospitalName())); + meg.put("thing8", new TemplateData(message.getHandleDate())); + meg.put("thing9", new TemplateData(message.getContent())); + break; + // 家庭医生消息通知 + default: + meg.put("thing1", new TemplateData(message.getDoctorName())); + meg.put("time2", new TemplateData(message.getSendTime())); + meg.put("thing3", new TemplateData(message.getContent())); + break; + } + wxMegDto.setPage(MessageTypePath.getPathByType(message.getMessageType()).getPath() + (StringUtils.isBlank(message.getContentId()) ? "" : message.getContentId())); + wxMegDto.setData(meg); + return wxMegDto; + } } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/messagepush/MessagePushService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/messagepush/MessagePushService.java index 92f823b..05cdac0 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/messagepush/MessagePushService.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/messagepush/MessagePushService.java @@ -1,6 +1,8 @@ package com.xinelu.applet.service.messagepush; +import com.alibaba.fastjson2.JSONObject; +import com.xinelu.applet.dto.messagepush.FDMessagePushDto; import com.xinelu.common.entity.AppletAccessToken; import com.xinelu.manage.domain.subscribemessagerecord.SubscribeMessageRecord; import com.xinelu.manage.vo.patientcouponreceive.PatientCouponReceiveInfoVO; @@ -38,4 +40,22 @@ public interface MessagePushService { * @param paramsMap 模板 **/ void sendPosts(AppletAccessToken appletAccessToken, Map paramsMap); + + /** + * @Author mengkuiliang + * @Description 家医申请审批结果消息推送 + * @Date 2023-10-18 018 13:58 + * @Param [appletAccessToken, paramsMap] + * @return void + **/ + void fdApprovePush(JSONObject body); + + /** + * @Author mengkuiliang + * @Description 家医推送订阅消息 + * @Date 2023-10-19 019 10:20 + * @Param [message] + * @return void + **/ + void FdPushMessage(JSONObject req) throws Exception; } diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java index d6511b6..1d665ac 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/impl/NurseAppLoginServiceImpl.java @@ -1,5 +1,6 @@ package com.xinelu.applet.service.nurseapplogin.impl; +import com.alibaba.fastjson2.JSONObject; import com.xinelu.applet.dto.appletlogin.StationItemInfoDTO; import com.xinelu.applet.mapper.appletlogin.AppletLoginMapper; import com.xinelu.applet.mapper.nurseapplogin.NurseAppLoginMapper; @@ -19,6 +20,8 @@ import com.xinelu.common.enums.OrderStatusEnum; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.AgeUtil; import com.xinelu.manage.domain.appointmentorder.AppointmentOrder; +import com.xinelu.common.utils.http.HttpService; +import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.manage.domain.goodsOrder.GoodsOrder; import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper; import com.xinelu.manage.mapper.sysarea.SysAreaMapper; @@ -59,7 +62,8 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService { private SysConfigMapper sysConfigMapper; @Resource private PatientInfoMapper patientInfoMapper; - + @Resource + private HttpService httpService; /** * 判断用户是否完善信息-微信小程序和APP共用 @@ -200,6 +204,9 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService { } else { patientDisease.setAreaName(""); } + // 更新签约编号 + setSignInfo(patientDisease); + //查询所有商品订单 List goodsOrders = nurseAppLoginMapper.selectGoodsOrderListByPatient(patientId); if (CollectionUtils.isEmpty(goodsOrders)) { @@ -217,6 +224,34 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService { return AjaxResult.success(patientDisease); } + // 更新签约编号 + private void setSignInfo(PatientAndDiseaseVO patientDisease) { + if (!StringUtils.isBlank(patientDisease.getCityCode())) { + try { + String result = (String) httpService.get(SpringUtils.getFdUrl(patientDisease.getCityCode()) + "/resident/signinfo/detail/" + patientDisease.getCardNo(), null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (jsonObject.getInteger("code") == 1) { + String signNo = ""; + if (jsonObject.getJSONObject("data") != null) { + JSONObject signInfo = jsonObject.getJSONObject("data"); + if (signInfo.containsKey("signNo")) { + signNo = signInfo.getString("signNo"); + } + } else { + signNo = null; + } + // 不一致才更新签约编号 + if(!String.valueOf(signNo).equals(String.valueOf(patientDisease.getSignNo()))) { + patientInfoMapper.updateSignNo(patientDisease.getPatientId(), signNo); + patientDisease.setSignNo(signNo); + } + } + } catch (Exception e) { + log.error("更新签约编号出错:{}", e.getMessage()); + } + } + } + /** * App查询预约服务订单 * diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/chatrecord/MessageCenterVo.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/chatrecord/MessageCenterVo.java index 4cdbb0f..dda4074 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/chatrecord/MessageCenterVo.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/chatrecord/MessageCenterVo.java @@ -15,7 +15,7 @@ import lombok.Data; @Data public class MessageCenterVo { - @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询") + @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知") private String messageCategory; @ApiModelProperty("通知适用人群(0:全部人群)") diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/chatrecord/MessageVo.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/chatrecord/MessageVo.java index b01cca9..a5a401e 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/chatrecord/MessageVo.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/chatrecord/MessageVo.java @@ -18,7 +18,7 @@ public class MessageVo { @ApiModelProperty("业务主键") private String messageNo; - @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询") + @ApiModelProperty("消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知") private String messageCategory; @ApiModelProperty("通知适用人群(0:全部人群)") @@ -30,6 +30,9 @@ public class MessageVo { @ApiModelProperty("发送人编号") private Long senderId; + @ApiModelProperty("发送人编号(家医医生编号)") + private String senderNo; + @ApiModelProperty("发送人姓名") private String senderName; diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java index 13c1dcd..6b3fe54 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/vo/nurseapplogin/PatientAndDiseaseVO.java @@ -161,6 +161,7 @@ public class PatientAndDiseaseVO implements Serializable { private String disease; private String signNo; + private String cityCode; /** * 基础疾病信息 */ diff --git a/xinelu-nurse-applet/src/main/resources/mapper/applet/appletlogin/AppletLoginMapper.xml b/xinelu-nurse-applet/src/main/resources/mapper/applet/appletlogin/AppletLoginMapper.xml index b18063c..ddb9d76 100644 --- a/xinelu-nurse-applet/src/main/resources/mapper/applet/appletlogin/AppletLoginMapper.xml +++ b/xinelu-nurse-applet/src/main/resources/mapper/applet/appletlogin/AppletLoginMapper.xml @@ -84,6 +84,7 @@ and openid = #{openId} + limit 1 + + + + + + + + + insert into chat_record message_category, + message_no, + consultation_id, crowds, @@ -165,6 +262,8 @@ #{messageCategory}, + #{messageNo}, + #{consultationId}, #{crowds}, @@ -286,6 +385,32 @@ where del_flag = 0 and read_status = '0' and recipient_id = #{recipientId} + + + update chat_record + + message_category = #{messageCategory}, + consultation_id = #{consultationId}, + crowds = #{crowds}, + crowds_name = #{crowdsName}, + sender_id = #{senderId}, + sender_name = #{senderName}, + send_time = #{sendTime}, + recipient_id = #{recipientId}, + recipient_name = #{recipientName}, + message_type = #{messageType}, + title = #{title}, + content = #{content}, + content_id = #{contentId}, + read_status = #{readStatus}, + read_time = #{readTime}, + del_flag =#{delFlag}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where message_no = #{messageNo} + + delete from chat_record @@ -299,6 +424,11 @@ + + + delete from chat_record where message_no = #{messageNo} + + update chat_record set del_flag = 1 @@ -310,4 +440,5 @@ + diff --git a/xinelu-nurse-applet/src/main/resources/mapper/applet/nurseapplogin/NurseAppLoginMapper.xml b/xinelu-nurse-applet/src/main/resources/mapper/applet/nurseapplogin/NurseAppLoginMapper.xml index 944cd69..8b75264 100644 --- a/xinelu-nurse-applet/src/main/resources/mapper/applet/nurseapplogin/NurseAppLoginMapper.xml +++ b/xinelu-nurse-applet/src/main/resources/mapper/applet/nurseapplogin/NurseAppLoginMapper.xml @@ -26,6 +26,7 @@ + @@ -85,6 +86,7 @@ pi.patient_code, pi.disease, pi.sign_no, + pi.city_code, pdi.id patientDiseaseId, pdi.disease_id, pdi.disease_name, diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/orderevaluateinfo/OrderEvaluateInfoController.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/orderevaluateinfo/OrderEvaluateInfoController.java index 6c33293..c0aa63c 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/orderevaluateinfo/OrderEvaluateInfoController.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/controller/orderevaluateinfo/OrderEvaluateInfoController.java @@ -88,4 +88,4 @@ public class OrderEvaluateInfoController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(orderEvaluateInfoService.deleteOrderEvaluateInfoByIds(ids)); } -} \ No newline at end of file +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/chatRecord/ChatRecord.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/chatRecord/ChatRecord.java index 664a888..39cb003 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/chatRecord/ChatRecord.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/chatRecord/ChatRecord.java @@ -34,6 +34,11 @@ public class ChatRecord extends BaseEntity implements Serializable { */ private Long id; + /** + * 消息业务主键 + */ + private String messageNo; + /** * 消息类别 1:通知公告,2:健康推送,3:在线咨询 4:消息通知 */ diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalinfo/HospitalInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalinfo/HospitalInfo.java index b03d980..fd4d15d 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalinfo/HospitalInfo.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalinfo/HospitalInfo.java @@ -85,6 +85,11 @@ public class HospitalInfo extends BaseDomain implements Serializable { @NotNull(message = "显示顺序不能为空", groups = {Insert.class, Update.class}) private Integer hospitalSort; + /** + * 家医机构编号 + */ + @ApiModelProperty(value = "家医机构编号") + private String orgCode; @Override public String toString() { @@ -100,6 +105,7 @@ public class HospitalInfo extends BaseDomain implements Serializable { .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) + .append("orgCode", getOrgCode()) .toString(); } } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalpersoninfo/HospitalPersonInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalpersoninfo/HospitalPersonInfo.java index 8a0f4e0..c4d7b0b 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalpersoninfo/HospitalPersonInfo.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/hospitalpersoninfo/HospitalPersonInfo.java @@ -6,10 +6,12 @@ import com.xinelu.common.custominterface.Insert; import com.xinelu.common.custominterface.Update; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; + import java.io.Serializable; import java.math.BigDecimal; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; + import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -64,7 +66,7 @@ public class HospitalPersonInfo extends BaseDomain implements Serializable { */ @ApiModelProperty(value = "科室人员名称") @Excel(name = "科室人员名称") - @NotBlank(message = "科室人员名称不能为空!", groups = { Insert.class, Update.class}) + @NotBlank(message = "科室人员名称不能为空!", groups = {Insert.class, Update.class}) @Length(max = 50, message = "科室人员名称不能超过50位", groups = {Insert.class, Update.class}) private String personName; @@ -130,16 +132,21 @@ public class HospitalPersonInfo extends BaseDomain implements Serializable { */ private String personPictureUrl; - /** - * 科室人员账号 - */ - private String personAccount; + /** + * 科室人员账号 + */ + private String personAccount; - /** - * 科室人员密码 - */ - private String personPassword; + /** + * 科室人员密码 + */ + private String personPassword; + /** + *1:家医医生 2:泉医医生 3:专病医生 + */ + @ApiModelProperty(value = "1:家医医生 2:泉医医生 3:专病医生") + private String status; @Override public String toString() { diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/orderevaluateinfo/OrderEvaluateInfo.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/orderevaluateinfo/OrderEvaluateInfo.java index f50aeaa..1923f9c 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/orderevaluateinfo/OrderEvaluateInfo.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/domain/orderevaluateinfo/OrderEvaluateInfo.java @@ -99,6 +99,8 @@ public class OrderEvaluateInfo extends BaseDomain implements Serializable { /** * 订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR */ + @ApiModelProperty(value = "订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR") + @Excel(name = "订单来源,泉医模块:SPRING_DOCTOR,家医模块:FAMILY_DOCTOR") private String orderSource; @Override diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/hospitalpersoninfo/HospitalPersonInfoMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/hospitalpersoninfo/HospitalPersonInfoMapper.java index 1a9e9ab..8de9b62 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/hospitalpersoninfo/HospitalPersonInfoMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/hospitalpersoninfo/HospitalPersonInfoMapper.java @@ -109,4 +109,22 @@ public interface HospitalPersonInfoMapper { * @return int **/ int selectHospitalPersonInfoByIdCount(Long id); + + /** + * @Author mengkuiliang + * @Description 根据科室人员编码查询人员信息 + * @Date 2023-10-20 020 14:37 + * @Param [personCode] + * @return com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo + **/ + HospitalPersonInfo getByPersonCode(@Param("personCode") String personCode, @Param("status") String status); + + /** + * @Author mengkuiliang + * @Description 根据科室人员编号更新 + * @Date 2023-10-20 020 15:03 + * @Param [hospitalPersonInfo] + * @return int + **/ + int updateByPersonCode(HospitalPersonInfo hospitalPersonInfo); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/orderevaluateinfo/OrderEvaluateInfoMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/orderevaluateinfo/OrderEvaluateInfoMapper.java index de78924..248c13b 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/orderevaluateinfo/OrderEvaluateInfoMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/orderevaluateinfo/OrderEvaluateInfoMapper.java @@ -62,4 +62,13 @@ public interface OrderEvaluateInfoMapper { * @return 结果 */ int deleteOrderEvaluateInfoByIds(Long[] ids); + + /** + * @Author mengkuiliang + * @Description 根据服务编号查询服务评价列表 + * @Date 2023-10-17 017 11:36 + * @Param [serviceNoList] + * @return java.util.List + **/ + List selectOrderEvaluateByServiceNos(@Param("orderNoList") List orderNoList, @Param("orderSource") String orderSource); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientInfoMapper.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientInfoMapper.java index ee23918..73012d8 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientInfoMapper.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/mapper/patientinfo/PatientInfoMapper.java @@ -141,4 +141,13 @@ public interface PatientInfoMapper { * @return 数量 */ int updatePersonalWeChatCodeUrl(@Param("id") Long id, @Param("personalWeChatCodeUrl") String personalWeChatCodeUrl); + + /** + * @Author mengkuiliang + * @Description 更新签约标识 + * @Date 2023-10-23 023 14:33 + * @Param [id, signInfo] + * @return void + **/ + void updateSignNo(@Param("patientId") Long patientId, @Param("signNo") String signNo); } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/IHospitalPersonInfoService.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/IHospitalPersonInfoService.java index f066d16..520950c 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/IHospitalPersonInfoService.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/hospitalpersoninfo/IHospitalPersonInfoService.java @@ -77,4 +77,31 @@ public interface IHospitalPersonInfoService { * @return */ int editHospitalPersonInfo(HospitalPersonInfoDtoo hospitalPersonInfo); + + /** + * @Author mengkuiliang + * @Description 根据科室人员编码查询人员信息 + * @Date 2023-10-20 020 14:34 + * @Param + * @return + **/ + HospitalPersonInfo getByPersonCode(String personCode, String status); + + /** + * @Author mengkuiliang + * @Description 新增 + * @Date 2023-10-20 020 14:42 + * @Param [body] + * @return void + **/ + int insert(HospitalPersonInfo body); + + /** + * @Author mengkuiliang + * @Description 根据科室人员编号更新 + * @Date 2023-10-20 020 15:02 + * @Param [hospitalPersonInfo] + * @return void + **/ + int updateByPersonCode(HospitalPersonInfo hospitalPersonInfo); } 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 3b2ac95..ee8ddfb 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 @@ -329,4 +329,41 @@ public class HospitalPersonInfoServiceImpl implements IHospitalPersonInfoService public int editHospitalPersonInfo(HospitalPersonInfoDtoo hospitalPersonInfo) { return hospitalPersonInfoMapper.editHospitalPersonInfo(hospitalPersonInfo); } + + /** + * @Author mengkuiliang + * @Description 根据科室人员编码查询人员信息 + * @Date 2023-10-20 020 14:37 + * @Param [personCode] + * @return com.xinelu.manage.domain.hospitalpersoninfo.HospitalPersonInfo + **/ + @Override + public HospitalPersonInfo getByPersonCode(String personCode, String status) { + return hospitalPersonInfoMapper.getByPersonCode(personCode, status); + } + + /** + * @Author mengkuiliang + * @Description 新增 + * @Date 2023-10-20 020 14:54 + * @Param [body] + * @return void + **/ + @Override + public int insert(HospitalPersonInfo body) { + return hospitalPersonInfoMapper.insertHospitalPersonInfo(body); + } + + /** + * @Author mengkuiliang + * @Description 根据科室人员编号更新 + * @Date 2023-10-20 020 15:02 + * @Param [hospitalPersonInfo] + * @return int + **/ + @Override + public int updateByPersonCode(HospitalPersonInfo hospitalPersonInfo) { + return hospitalPersonInfoMapper.updateByPersonCode(hospitalPersonInfo); + } + } diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/orderevaluateinfo/IOrderEvaluateInfoService.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/orderevaluateinfo/IOrderEvaluateInfoService.java index 6041ae8..5905a5e 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/orderevaluateinfo/IOrderEvaluateInfoService.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/orderevaluateinfo/IOrderEvaluateInfoService.java @@ -54,4 +54,13 @@ public interface IOrderEvaluateInfoService { */ int deleteOrderEvaluateInfoByIds(Long[] ids); -} \ No newline at end of file + /** + * @Author mengkuiliang + * @Description 根据服务编号查询服务评价列表 + * @Date 2023-10-17 017 11:35 + * @Param [orderEvaluateInfo] + * @return java.util.List + **/ + List selectOrderEvaluateByServiceNos(List orderNoList, String orderSource); + +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/orderevaluateinfo/impl/OrderEvaluateInfoServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/orderevaluateinfo/impl/OrderEvaluateInfoServiceImpl.java index c23801e..7bbfb0d 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/orderevaluateinfo/impl/OrderEvaluateInfoServiceImpl.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/orderevaluateinfo/impl/OrderEvaluateInfoServiceImpl.java @@ -77,4 +77,16 @@ public class OrderEvaluateInfoServiceImpl implements IOrderEvaluateInfoService { public int deleteOrderEvaluateInfoByIds(Long[] ids) { return orderEvaluateInfoMapper.deleteOrderEvaluateInfoByIds(ids); } -} \ No newline at end of file + + /** + * @Author mengkuiliang + * @Description 根据服务编号查询服务评价列表 + * @Date 2023-10-17 017 11:36 + * @Param [orderNoList] + * @return java.util.List + **/ + @Override + public List selectOrderEvaluateByServiceNos(List orderNoList, String orderSource) { + return orderEvaluateInfoMapper.selectOrderEvaluateByServiceNos(orderNoList, orderSource); + } +} diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/IScreeningRecordService.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/IScreeningRecordService.java index a5184ec..d0eb893 100644 --- a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/IScreeningRecordService.java +++ b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/IScreeningRecordService.java @@ -43,7 +43,7 @@ public interface IScreeningRecordService { * @Param [body] * @return void **/ - String save(ScreeningApplyDTO body) throws Exception; + JSONObject save(ScreeningApplyDTO body) throws Exception; /** * 修改 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 3f49e70..de76b4c 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 @@ -97,7 +97,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { **/ @Override @Transactional(rollbackFor = Exception.class) - public String save(ScreeningApplyDTO body) throws Exception { + public JSONObject save(ScreeningApplyDTO body) throws Exception { // 校验是否已经注册 PatientInfoVO registerVo = patientService.selectPatientInfoByCardNo(body.getIdentity()); if(registerVo == null) { @@ -130,24 +130,26 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { } catch (Exception e) { e.printStackTrace(); } + JSONObject result = new JSONObject(); + result.put("patientId", body.getPatientId()); int flag = screeningRecordMapper.insert(recordBody); if(flag > 0) { - // 推送消息 - //JSONObject jsonObject = new JSONObject(); - //jsonObject.fluentPut("recipientName", registerVo.getPatientName()) - // .fluentPut("handleDate", recordBody.getApplyStartTime()) - // .fluentPut("hospitalName", recordBody.getDeptName()) - // .fluentPut("applyContent", recordBody.getProjectName()) - // .fluentPut("recipientIdentity", registerVo.getIdentity()) - // .fluentPut("sendTime", DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm:ss")) - // .fluentPut("messageType", "5") - // .fluentPut("messageCategory", "1") - // .fluentPut("templateType", MessageTypeEnum.SCREENING_APPLY.getType()) - // .fluentPut("content", "预约成功,请准时赴约筛查!") - // .fluentPut("contentId", recordBody.getScreeningId()); - //FdmpPushMegUtil.sendPost(jsonObject); + // 组装发送消息通知参数 + result.put("busType", "10"); + result.put("openid", registerVo.getOpenid()); + result.put("receiveName", registerVo.getPatientName()); + result.put("text1", body.getHospitalName()); + result.put("text2", (body.getProjectName().length() >= 17? (body.getProjectName().substring(0, 17) + "..."): body.getProjectName())); + result.put("text3", body.getProjectName()); + result.put("sendTitle", "筛查预约"); + result.put("sendTime", DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", new Date())); + result.put("busType", "10"); + result.put("sendContent", registerVo.getPatientName() + "预约筛查成功"); + result.put("messageType", "5"); + result.put("messageCategory", "4"); + result.put("cardNo", registerVo.getCardNo()); } - return body.getPatientId(); + return result; } @Override 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 6cc5dec..3a9d51c 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 @@ -16,6 +16,7 @@ + @@ -29,7 +30,8 @@ create_by, create_time, update_by, - update_time + update_time, + org_code from hospital_info @@ -91,6 +93,9 @@ update_time, + + org_code, + #{hospitalName}, @@ -113,6 +118,9 @@ #{updateTime}, + + #{orgCode}, + @@ -149,6 +157,9 @@ update_time = #{updateTime}, + + org_code = #{orgCode}, + where id = #{id} @@ -183,6 +194,6 @@ diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalpersoninfo/HospitalPersonInfoMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalpersoninfo/HospitalPersonInfoMapper.xml index 9b6fd90..c3f2337 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalpersoninfo/HospitalPersonInfoMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/hospitalpersoninfo/HospitalPersonInfoMapper.xml @@ -24,6 +24,7 @@ + @@ -49,6 +50,7 @@ + @@ -81,7 +83,8 @@ create_by, create_time, update_by, - update_time + update_time, + status from hospital_person_info @@ -107,7 +110,8 @@ hpi.create_by, hpi.create_time, hpi.update_by, - hpi.update_time + hpi.update_time, + status FROM hospital_person_info hpi LEFT JOIN hospital_department_info hdi ON hpi.department_id = hdi.id @@ -145,6 +149,9 @@ and hpi.person_sort = #{personSort} + + and hpi.status = #{status} + ORDER BY id DESC @@ -165,7 +172,8 @@ hpi.create_by, hpi.create_time, hpi.update_by, - hpi.update_time + hpi.update_time, + status FROM hospital_person_info hpi @@ -183,6 +191,9 @@ and hpi.academic_title = #{academicTitle} + + and hpi.status = #{status} + ORDER BY id DESC @@ -211,6 +222,7 @@ hpi.create_time, hpi.update_by, hpi.update_time, + hpi.status, hpc.hospital_person_id, hpc.certificate_name, hpc.certificate_code, @@ -260,6 +272,9 @@ update_time, + + status, + #{hospitalId}, @@ -296,6 +311,9 @@ #{updateTime}, + + #{status}, + @@ -352,6 +370,9 @@ update_time = #{updateTime}, + + status = #{status}, + where id = #{id} @@ -409,6 +430,9 @@ update_time = #{updateTime}, + + status = #{status}, + where id = #{id} @@ -458,7 +482,8 @@ create_by, create_time, update_by, - update_time + update_time, + status from hospital_person_info @@ -495,4 +520,68 @@ + + + + + + + update hospital_person_info + + hospital_id = + #{hospitalId}, + + department_id = + #{departmentId}, + + person_name = + #{personName}, + + + person_phone = #{personPhone}, + + person_address = + #{personAddress}, + + + card_no = #{cardNo}, + + academic_title = + #{academicTitle}, + + consulting_fee = + #{consultingFee}, + + person_introduce = + #{personIntroduce}, + + person_sort = + #{personSort}, + + person_picture_url = + #{personPictureUrl}, + + person_account = + #{personAccount}, + + person_password = + #{personPassword}, + + update_by = + #{updateBy}, + + + status = #{status}, + + update_time = now(), + + where person_code = #{personCode} + diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/orderevaluateinfo/OrderEvaluateInfoMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/orderevaluateinfo/OrderEvaluateInfoMapper.xml index 430b20e..9267d9c 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/orderevaluateinfo/OrderEvaluateInfoMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/orderevaluateinfo/OrderEvaluateInfoMapper.xml @@ -66,6 +66,9 @@ and composite_score = #{compositeScore} + + and order_source = #{orderSource} + @@ -80,6 +83,16 @@ + + + insert into order_evaluate_info diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml index dc50793..d22a3ae 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/patientinfo/PatientInfoMapper.xml @@ -563,7 +563,9 @@ birth_date, personal_wechat_code_url, disabling_condition, - disabling_reason + disabling_reason, + city_code, + binding_time FROM patient_info WHERE id = #{id} and del_flag = 0 @@ -660,4 +662,10 @@ update_time = now() where id = #{id} + + + + update patient_info set sign_no = #{signNo} where id = #{patientId} + + diff --git a/xinelu-quartz/pom.xml b/xinelu-quartz/pom.xml index a493c74..13ea494 100644 --- a/xinelu-quartz/pom.xml +++ b/xinelu-quartz/pom.xml @@ -46,4 +46,4 @@ - \ No newline at end of file +