From 9a50b807b8536bd802cfb12061d4b5c74cf7e40e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= <3226558941@qq.com> Date: Tue, 10 Oct 2023 14:48:35 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/manage/nursestationitem/NurseStationItemMapper.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestationitem/NurseStationItemMapper.xml b/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestationitem/NurseStationItemMapper.xml index a3b7813..c22ca2c 100644 --- a/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestationitem/NurseStationItemMapper.xml +++ b/xinelu-nurse-manage/src/main/resources/mapper/manage/nursestationitem/NurseStationItemMapper.xml @@ -135,10 +135,9 @@ + select + count(1) + from patient_disease_info + + + patient_id = #{patientId} + + + + + + delete + from patient_disease_info + where patient_id = #{patientId} + + + + + + + + and order_evaluate_id = #{orderEvaluateId} + + + and evaluate_picture_url = #{evaluatePictureUrl} + + + + + + + + insert into order_evaluate_picture_info + + order_evaluate_id, + + evaluate_picture_url, + + create_by, + + create_time, + + update_by, + + update_time, + + + + #{orderEvaluateId}, + + #{evaluatePictureUrl}, + + #{createBy}, + + #{createTime}, + + #{updateBy}, + + #{updateTime}, + + + + + + update order_evaluate_picture_info + + order_evaluate_id = + #{orderEvaluateId}, + + evaluate_picture_url = + #{evaluatePictureUrl}, + + create_by = + #{createBy}, + + create_time = + #{createTime}, + + update_by = + #{updateBy}, + + update_time = + #{updateTime}, + + + where id = #{id} + + + + delete + from order_evaluate_picture_info + where id = #{id} + + + + delete from order_evaluate_picture_info where id in + + #{id} + + + \ No newline at end of file From b2451f91e9ca08212b73e7883a4a4776f44ddf69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= <3226558941@qq.com> Date: Wed, 11 Oct 2023 11:26:05 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E7=AE=A1=E7=90=86=E7=AB=AF=E5=AF=8C?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E4=B8=8A=E4=BC=A0=E4=BB=A3=E7=A0=81=E7=A7=BB?= =?UTF-8?q?=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/common/CommonController.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/common/CommonController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/common/CommonController.java index 9cc6a93..ae2a4c1 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/common/CommonController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/common/CommonController.java @@ -6,6 +6,7 @@ import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.utils.StringUtils; import com.xinelu.common.utils.file.FileUploadUtils; import com.xinelu.common.utils.file.FileUtils; +import com.xinelu.common.utils.file.MimeTypeUtils; import com.xinelu.framework.config.ServerConfig; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; +import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; @@ -37,6 +39,8 @@ public class CommonController { @Autowired private ServerConfig serverConfig; + @Resource + private XinELuConfig xinELuConfig; private static final String FILE_DELIMETER = ","; @@ -147,4 +151,23 @@ public class CommonController { log.error("下载文件失败", e); } } + + /** + * 通用管理端富文本上传请求(单个) + */ + @PostMapping("/richTextPictureUrl") + public AjaxResult richTextPictureUrl(MultipartFile file) throws Exception { + // 上传文件路径 + String filePath = XinELuConfig.getProfile() + xinELuConfig.getRichTextPictureUrl(); + // 上传并返回新文件名称 + String fileName = FileUploadUtils.uploadNurseStationPath(filePath, file, MimeTypeUtils.IMAGE_EXTENSION); + //拼接路径 + String url = serverConfig.getUrl() + fileName; + AjaxResult ajax = AjaxResult.success(); + ajax.put("url", url); + ajax.put("fileName", fileName); + ajax.put("newFileName", FileUtils.getName(fileName)); + ajax.put("originalFilename", file.getOriginalFilename()); + return ajax; + } } From 9247d993a91e3c3d2495da01a78a7a9f921c7a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=81=92?= <3226558941@qq.com> Date: Wed, 11 Oct 2023 11:38:32 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../NurseAppLoginController.java | 27 -- .../nurseapplogin/NurseAppLoginService.java | 8 - .../impl/NurseAppLoginServiceImpl.java | 317 ------------------ 3 files changed, 352 deletions(-) diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nurseapplogin/NurseAppLoginController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nurseapplogin/NurseAppLoginController.java index 80e996a..57e073d 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nurseapplogin/NurseAppLoginController.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/nurseapplogin/NurseAppLoginController.java @@ -32,36 +32,9 @@ import java.util.Objects; @RequestMapping("/nurseApp/login") public class NurseAppLoginController extends BaseController { - @Resource - private RegexUtil regexUtil; @Resource private NurseAppLoginService nurseAppLoginService; - - /** - * 完善用户信息-App和微信小程序共用 - * - * @param appletUserInfoDTO 用户信息 - * @return 结果 - */ - @MobileRequestAuthorization - @PostMapping("/appInformation") - public AjaxResult information(@RequestBody @Validated(Insert.class) AppletUserInfoDTO appletUserInfoDTO, BindingResult bindingResult) { - if (bindingResult.hasErrors()) { - throw new ServiceException(bindingResult.getAllErrors().get(0).getDefaultMessage()); - } - if (Objects.isNull(appletUserInfoDTO.getPatientId())) { - return AjaxResult.error("当前用户信息不存在,无法完善信息!"); - } - if (StringUtils.isBlank(appletUserInfoDTO.getPhone())) { - return AjaxResult.error("请输入手机号!"); - } - if (StringUtils.isBlank(appletUserInfoDTO.getHomeLatitude()) && StringUtils.isBlank(appletUserInfoDTO.getHomeLongitude())) { - return AjaxResult.error("请输入位置信息!"); - } - return nurseAppLoginService.appInformation(appletUserInfoDTO); - } - /** * 查询护理人列表信息(会员小程序和App共用) * diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/NurseAppLoginService.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/NurseAppLoginService.java index 1c3bfa9..d0e8947 100644 --- a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/NurseAppLoginService.java +++ b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/service/nurseapplogin/NurseAppLoginService.java @@ -14,14 +14,6 @@ import java.util.List; */ public interface NurseAppLoginService { - /** - * 完善用户信息-App和微信小程序共用 - * - * @param appletUserInfoDTO 信息 - * @return 结果 - */ - AjaxResult appInformation(AppletUserInfoDTO appletUserInfoDTO); - /** * 查询护理人列表信息 * 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 abfd9f4..18f1336 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 @@ -78,95 +78,11 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService { @Resource private AppletLoginMapper appletLoginMapper; @Resource - private GenerateSystemCodeUtil generateSystemCodeUtil; - @Resource - private PatientInfoMapper patientInfoMapper; - @Resource - private PatientDiseaseInfoMapper patientDiseaseInfoMapper; - @Resource - private ReceiveAddressInfoMapper receiveAddressInfoMapper; - @Resource - private RegexUtil regexUtil; - @Resource private SysAreaMapper sysAreaMapper; @Resource private AppointmentTimeUtil appointmentTimeUtil; @Resource private SysConfigMapper sysConfigMapper; - @Resource - private PatientCouponReceiveMapper patientCouponReceiveMapper; - @Resource - private CouponMapper couponMapper; - @Resource - private SystemSettingsInfoMapper systemSettingsInfoMapper; - @Resource - private PatientIntegralChangeMapper patientIntegralChangeMapper; - @Resource - private PatientCenterMapper patientCenterMapper; - @Resource - private AppletChatConfig appletChatConfig; - @Resource - private SubscribeMessageRecordMapper subscribeMessageRecordMapper; - @Resource - private MessagePushService messagePushService; - - - /** - * 完善用户信息-App和微信小程序共用 - * - * @param appletUserInfoDTO 输入参数 - * @return 结果 - */ - @Transactional(rollbackFor = Exception.class) - @Override - public AjaxResult appInformation(AppletUserInfoDTO appletUserInfoDTO) { - //校验手机号 - boolean regexPhone = regexUtil.regexPhone(StringUtils.isBlank(appletUserInfoDTO.getPhone()) ? "" : appletUserInfoDTO.getPhone()); - if (BooleanUtils.isFalse(regexPhone)) { - return AjaxResult.error("您输入的手机号不正确,请重新输入!"); - } - //校验身份证号 - boolean cardNo = regexUtil.regexCardNo(StringUtils.isBlank(appletUserInfoDTO.getCardNo()) ? "" : appletUserInfoDTO.getCardNo()); - if (BooleanUtils.isFalse(cardNo)) { - return AjaxResult.error("您输入的身份证号不正确,请重新输入!"); - } - //修改护理人主表信息 - PatientInfo patient = patientInfoMapper.getPatientInfoById(appletUserInfoDTO.getPatientId()); - if (Objects.isNull(patient)) { - return AjaxResult.error("当前用户信息不存在,请先注册或登录!"); - } - if (StringUtils.isBlank(patient.getPatientCode())) { - appletUserInfoDTO.setPatientCode(Constants.PATIENT_PREFIX + generateSystemCodeUtil.generatePatientCode(Constants.PATIENT_PREFIX)); - } - this.updatePatientInfo(appletUserInfoDTO); - //新增会员疾病信息 - this.insertPatientDiseaseInfo(appletUserInfoDTO, appletUserInfoDTO.getPatientId()); - //新增收货人地址信息 - this.insertReceiveAddress(appletUserInfoDTO); - //判断是否是第一次完善,如果是则发放新人优惠券信息 - PatientCouponReceiveInfoVO receiveInfoVO = null; - if (Objects.isNull(patient.getLoginFlag())) { - receiveInfoVO = issueCoupons(patient, appletUserInfoDTO); - } - //删除原有头像信息 - if (StringUtils.isNotBlank(appletUserInfoDTO.getHeadPictureUrl()) && StringUtils.isNotBlank(patient.getHeadPictureUrl()) - && !patient.getHeadPictureUrl().equals(appletUserInfoDTO.getHeadPictureUrl())) { - this.deleteHeadPicture(StringUtils.isBlank(patient.getHeadPictureUrl()) ? "" : patient.getHeadPictureUrl()); - } - if (Objects.isNull(receiveInfoVO) || Objects.isNull(receiveInfoVO.getCouponId())) { - return AjaxResult.success(); - } - //查询微信小程序订阅消息记录表该会员是否已订阅 - SubscribeMessageRecord subscribeMessageRecord = subscribeMessageRecordMapper.selectSubscribeMessageRecordByPatientId(null, patient.getOpenid(), appletChatConfig.getCouponReceiveTemplateId()); - boolean subscribeMessage = Objects.nonNull(subscribeMessageRecord) - && StringUtils.isNotBlank(subscribeMessageRecord.getSubscribeStatus()) - && SubscribeStatusEnum.ACCEPT.getInfo().equals(subscribeMessageRecord.getSubscribeStatus()); - if (BooleanUtils.isTrue(subscribeMessage)) { - //完善用户信息领取优惠券异步发送信息 - messagePushService.messageCouponReceiveThread(subscribeMessageRecord, receiveInfoVO); - } - return AjaxResult.success(); - } /** * 查询护理人列表信息 @@ -312,237 +228,4 @@ public class NurseAppLoginServiceImpl implements NurseAppLoginService { } return nurseAppLoginMapper.selectAppointmentOrderDetailsByPatientId(patientId, orderStatus); } - - /** - * 修改会员信息 - * - * @param appletUserInfoDTO 输入参数 - */ - private void updatePatientInfo(AppletUserInfoDTO appletUserInfoDTO) { - PatientInfo patientInfo = new PatientInfo(); - appletUserInfoDTO.setUpdateTime(LocalDateTime.now()); - BeanUtils.copyProperties(appletUserInfoDTO, patientInfo); - patientInfo.setId(appletUserInfoDTO.getPatientId()); - patientInfo.setLoginFlag(new AtomicInteger(1).intValue()); - patientInfo.setUpdateTime(LocalDateTime.now()); - if (CollectionUtils.isNotEmpty(appletUserInfoDTO.getNurseTypeIdList())) { - String serviceIds = appletUserInfoDTO.getNurseTypeIdList().stream().map(String::valueOf).collect(Collectors.joining(",")); - patientInfo.setServiceIds(serviceIds); - } - //查询省份证号数量,根据数量判断是否为主账号 - int cardNoCount = nurseAppLoginMapper.getCardNoCount(appletUserInfoDTO.getCardNo()); - patientInfo.setPrimaryAccountFlag(cardNoCount == 0 ? 0 : 1); - if (StringUtils.isNotBlank(appletUserInfoDTO.getSource())) { - patientInfo.setSource(appletUserInfoDTO.getSource()); - } - if (Objects.nonNull(appletUserInfoDTO.getInvitationPatientId())) { - patientInfo.setInvitationPatientId(appletUserInfoDTO.getInvitationPatientId()); - } - if (StringUtils.isNotBlank(appletUserInfoDTO.getSex())) { - patientInfo.setSex(appletUserInfoDTO.getSex()); - } - if (Objects.nonNull(appletUserInfoDTO.getBirthDate())) { - patientInfo.setBirthDate(appletUserInfoDTO.getBirthDate()); - } - //修改 - int updatePatientInfoCount = patientInfoMapper.updatePatientInfo(patientInfo); - if (updatePatientInfoCount <= 0) { - throw new ServiceException("完善信息失败,请联系管理员!"); - } - //判断是否是通过邀请好友方式进行完善的,赠送邀请请人积分以及记录积分变更记录 - if (StringUtils.isNotBlank(appletUserInfoDTO.getSource()) && PatientSourceEnum.FRIEND_INVITATION.getInfo().equals(appletUserInfoDTO.getSource())) { - if (Objects.isNull(appletUserInfoDTO.getInvitationPatientId())) { - return; - } - //查询邀请人信息 - PatientInfoVO invitationPatientInfo = patientInfoMapper.getPatientInfoById(appletUserInfoDTO.getInvitationPatientId()); - if (Objects.isNull(invitationPatientInfo)) { - return; - } - SystemSettingsInfo settingsInfo = systemSettingsInfoMapper.getSystemSettingsInfoByType(SettingsTypeEnum.INVITE_FRIENDS.getInfo()); - //赠送积分值 - int changeIntegral = 0; - if (Objects.nonNull(settingsInfo) && Objects.nonNull(settingsInfo.getIntegralCount())) { - changeIntegral = settingsInfo.getIntegralCount(); - } - patientCenterMapper.updatePatientIntegral(invitationPatientInfo.getId(), changeIntegral); - //邀请人账户原始积分值 - int originalIntegral = Objects.isNull(invitationPatientInfo.getIntegral()) ? 0 : invitationPatientInfo.getIntegral(); - this.insertPatientIntegral(invitationPatientInfo.getId(), originalIntegral, changeIntegral); - } - } - - /** - * 新增会员疾病信息 - * - * @param appletUserInfoDTO 输入参数 - * @param patientId 被护理人Id - */ - private void insertPatientDiseaseInfo(AppletUserInfoDTO appletUserInfoDTO, Long patientId) { - //设置护理人疾病关系表信息 - if (CollectionUtils.isNotEmpty(appletUserInfoDTO.getDiseaseInfoList())) { - //剔除疾病名称重复的信息 - List otherDiseaseList = appletUserInfoDTO.getDiseaseInfoList().stream().filter(item -> Objects.isNull(item.getDiseaseId())).collect(Collectors.toList()); - List dictDiseaseList = appletUserInfoDTO.getDiseaseInfoList().stream().filter(item -> Objects.nonNull(item.getDiseaseId())).collect(Collectors.toList()); - List dataListTwo = otherDiseaseList.stream() - .filter(item -> StringUtils.isNotBlank(item.getDiseaseName())) - .filter(otherInfo -> !dictDiseaseList.stream().map(PatientDiseaseInfo::getDiseaseName).filter(StringUtils::isNotBlank).collect(Collectors.toList()).contains(otherInfo.getDiseaseName())).collect(Collectors.toList()); - if (CollectionUtils.isNotEmpty(dataListTwo)) { - dictDiseaseList.addAll(dataListTwo); - } - //根据id查询疾病信息表 - int diseaseInfoCount = nurseAppLoginMapper.selectPatientDiseaseInfo(patientId); - if (diseaseInfoCount > 0) { - long deletePatientDiseaseCount = nurseAppLoginMapper.deletePatientDiseaseInfo(patientId); - if (deletePatientDiseaseCount <= 0) { - log.warn("删除patient_disease_info信息失败,会员id:[{}]", patientId); - throw new ServiceException("完善信息失败,请联系管理员!"); - } - } - for (PatientDiseaseInfo patientDiseaseInfo : dictDiseaseList) { - patientDiseaseInfo.setPatientId(patientId); - patientDiseaseInfo.setDiseaseId(Objects.isNull(patientDiseaseInfo.getDiseaseId()) ? null : patientDiseaseInfo.getDiseaseId()); - patientDiseaseInfo.setDiseaseName(patientDiseaseInfo.getDiseaseName()); - patientDiseaseInfo.setCreateTime(LocalDateTime.now()); - } - //新增护理人疾病关系表信息 - int insertBatchCount = patientDiseaseInfoMapper.insertBatchPatientDiseaseInfo(dictDiseaseList); - if (insertBatchCount <= 0) { - log.info("新增护理人疾病关系表信息失败,输入参数[{}]", appletUserInfoDTO.getDiseaseInfoList()); - throw new ServiceException("完善信息失败,请联系管理员!"); - } - } - } - - /** - * 新增收货人地址信息 - * - * @param appletUserInfoDTO 输入参数 - */ - private void insertReceiveAddress(AppletUserInfoDTO appletUserInfoDTO) { - //判断当前收货地址信息是否存在 - int receiveCount = receiveAddressInfoMapper.getReceiveAddressInfo(appletUserInfoDTO.getPatientId(), appletUserInfoDTO.getPatientName(), appletUserInfoDTO.getPhone(), appletUserInfoDTO.getAddress()); - if (receiveCount > 0) { - return; - } - //添加收货人地址信息 - ReceiveAddressInfo receiveAddressInfo = new ReceiveAddressInfo(); - receiveAddressInfo.setReceiveAddress(appletUserInfoDTO.getAddress()); - receiveAddressInfo.setReceivePhone(appletUserInfoDTO.getPhone()); - receiveAddressInfo.setAreaCode(appletUserInfoDTO.getAreaCode()); - receiveAddressInfo.setPatientId(appletUserInfoDTO.getPatientId()); - receiveAddressInfo.setReceiveName(appletUserInfoDTO.getPatientName()); - int insertReceiveAddressInfo = receiveAddressInfoMapper.insertReceiveAddressInfo(receiveAddressInfo); - if (insertReceiveAddressInfo <= 0) { - throw new ServiceException("修改收货人地址信息失败,请联系管理员!"); - } - } - - /** - * 发放优惠券方法胡 - * - * @param patient 会员信息 - */ - public PatientCouponReceiveInfoVO issueCoupons(PatientInfo patient, AppletUserInfoDTO appletUserInfoDTO) { - PatientCouponReceiveInfoVO receiveInfoVO = new PatientCouponReceiveInfoVO(); - //查询新人福利的优惠券列表信息 - Coupon coupon = new Coupon(); - Long patientId = patient.getId(); - coupon.setReceiveType(CouponReceiveTypeEnum.NEW_PEOPLE_WELFARE.getInfo()); - List couponList = couponMapper.selectCouponList(coupon); - if (CollectionUtils.isEmpty(couponList)) { - return receiveInfoVO; - } - //组装优惠券信息 - List couponReceiveList = Lists.newArrayList(); - for (Coupon couponInfo : couponList) { - if (Objects.isNull(couponInfo.getId())) { - continue; - } - PatientCouponReceive couponReceive = new PatientCouponReceive(); - couponReceive.setPatientId(patientId); - couponReceive.setCouponId(couponInfo.getId()); - couponReceive.setReceiveSource(CouponReceiveTypeEnum.NEW_PEOPLE_WELFARE.getInfo()); - if (Objects.nonNull(appletUserInfoDTO.getCouponId()) && couponInfo.getId().equals(appletUserInfoDTO.getCouponId())) { - couponReceive.setUseStatus(CouponUseStatusEnum.NOT_USED.getInfo()); - couponReceive.setExpirationStartTime(LocalDateTime.now()); - couponReceive.setExpirationEndTime(LocalDate.now().plusDays(Objects.isNull(couponInfo.getCouponReductionDays()) ? 0 : couponInfo.getCouponReductionDays()).atTime(23, 59, 59)); - couponReceive.setReceiveTime(LocalDateTime.now()); - } else { - couponReceive.setUseStatus(CouponUseStatusEnum.WAIT_RECEIVE.getInfo()); - couponReceive.setExpirationStartTime(null); - couponReceive.setExpirationEndTime(null); - couponReceive.setReceiveTime(null); - } - couponReceive.setCouponReductionDays(Objects.isNull(couponInfo.getCouponReductionDays()) ? 0 : couponInfo.getCouponReductionDays()); - couponReceive.setCreateTime(LocalDateTime.now()); - couponReceive.setCouponTitle(StringUtils.isBlank(couponInfo.getCouponTitle()) ? "" : couponInfo.getCouponTitle()); - couponReceive.setCouponPrice(Objects.isNull(couponInfo.getCouponPrice()) ? BigDecimal.ZERO : couponInfo.getCouponPrice()); - couponReceive.setCouponConsumePrice(Objects.isNull(couponInfo.getCouponConsumePrice()) ? BigDecimal.ZERO : couponInfo.getCouponConsumePrice()); - couponReceive.setCouponDescription(StringUtils.isBlank(couponInfo.getCouponDescription()) ? "" : couponInfo.getCouponDescription()); - couponReceiveList.add(couponReceive); - } - if (CollectionUtils.isNotEmpty(couponReceiveList)) { - int insertCount = patientCouponReceiveMapper.insertBatchPatientReceive(couponReceiveList); - if (insertCount <= 0) { - log.error("完善用户信息接口-新人送券执行失败,输入参数[{}]", couponReceiveList); - throw new ServiceException("完善用户信息失败,请联系管理员!"); - } - } - //把要发放的优惠券数据塞入发送消息实体中 - Coupon couponMessagePush = couponList.stream().filter(Objects::nonNull) - .filter(couponInfo -> (Objects.nonNull(appletUserInfoDTO.getCouponId()) && couponInfo.getId().equals(appletUserInfoDTO.getCouponId()))) - .findFirst().orElse(new Coupon()); - BeanUtils.copyProperties(couponMessagePush, receiveInfoVO); - receiveInfoVO.setReceiveTime(LocalDateTime.now()); - receiveInfoVO.setCouponId(Objects.isNull(couponMessagePush.getId()) ? null : couponMessagePush.getId()); - receiveInfoVO.setCouponType(CouponTypeEnum.FULL_REDUCTION_COUPON.getInfo()); - return receiveInfoVO; - } - - - /** - * 删除个人头像图片 - * - * @param pictureUrl 图片路径 - */ - private void deleteHeadPicture(String pictureUrl) { - if (StringUtils.isBlank(pictureUrl)) { - return; - } - String picture = XinELuConfig.getProfile() + pictureUrl.replaceAll("/profile", ""); - File checkReportNameFile = new File(picture); - if (checkReportNameFile.exists()) { - //文件名称已存在,删除文件 - boolean delete = checkReportNameFile.delete(); - if (BooleanUtils.isFalse(delete)) { - throw new ServiceException("图片文件删除失败!"); - } - } - } - - - /** - * 生成积分积分信息 - * - * @param invitationPatientId 邀请人id - * @param originalIntegral 原始账户积分 - * @param changeIntegral 赠送变更积分 - */ - private void insertPatientIntegral(Long invitationPatientId, int originalIntegral, int changeIntegral) { - PatientIntegralChange integralChange = new PatientIntegralChange(); - integralChange.setPatientId(invitationPatientId); - integralChange.setOriginalIntegral(originalIntegral); - integralChange.setChangeIntegral(changeIntegral); - integralChange.setChangeTime(LocalDateTime.now()); - integralChange.setChangeType(IntegralChangeType.FRIEND_INVITATION.getInfo()); - integralChange.setChangeRemark("邀请好友赠送积分"); - integralChange.setChangeIntegralChannel(OrderChannelEnum.WECHAT_APPLET.getInfo()); - integralChange.setCreateTime(LocalDateTime.now()); - int insertCount = patientIntegralChangeMapper.insertPatientIntegralChange(integralChange); - if (insertCount <= 0) { - log.error("邀请好友-生成积分变更记录表信息失败,积分变更信息:{}", integralChange); - throw new ServiceException("完善用户信息失败,请联系管理员!"); - } - } } \ No newline at end of file From 31f7740e7cdf90279774af2b6f0baaadda06a703 Mon Sep 17 00:00:00 2001 From: mengkuiliang <1464081137@qq.com> Date: Wed, 11 Oct 2023 14:29:34 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E8=BF=87=E7=A8=8B=E4=B8=AD=E5=87=BA=E7=8E=B0=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applet/ResidentPatientInfoController.java | 42 ++++--- .../ResidentServiceApplyController.java | 6 +- .../applet/ResidentSignApplyController.java | 39 +++++++ .../controller/applet/SignInfoController.java | 17 ++- .../src/main/resources/application.yml | 6 +- .../xinelu/common/config/XinELuConfig.java | 13 +++ .../xinelu/common/enums/RegionKeyType.java | 3 +- .../common/utils/spring/SpringUtils.java | 1 + .../applet/pojo/vo/PerformancePackageVo.java | 104 ++++++++++++++++++ .../service/IResidentPatientInfoService.java | 9 ++ .../IResidentServiceAppletService.java | 2 +- .../impl/ResidentPatientInfoServiceImpl.java | 16 +++ .../impl/ResidentServiceApplyServiceImpl.java | 6 +- 13 files changed, 235 insertions(+), 29 deletions(-) create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PerformancePackageVo.java 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 652d66b..2ad4e55 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 @@ -127,6 +127,12 @@ public class ResidentPatientInfoController extends BaseController { return R.ok(residentPatientInfoService.getCurrentResident(openid, cityCode)); } + @ApiOperation("是否已注册") + @GetMapping(value = "/isRegistered/{code}") + public R isRegistered(@PathVariable("code") String code) { + return R.ok(residentPatientInfoService.isRegistered(code)); + } + /** * @Author mengkuiliang * @Description 居民头像上传 @@ -134,22 +140,22 @@ public class ResidentPatientInfoController extends BaseController { * @Param * @return **/ - @ApiOperation("居民头像上传") - @PostMapping(value = "/headPictureUpload") - public AjaxResult headPictureUpload(MultipartFile file) throws Exception { - if (StringUtils.isBlank(file.getOriginalFilename())) { - return AjaxResult.error("请选择所要上传的头像!"); - } - //获取路径名称 - String uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getHeadPictureUrl(); - //上传图片 - String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, file, MimeTypeUtils.IMAGE_EXTENSION); - if (StringUtils.isBlank(pictureName)) { - throw new ServiceException(pictureName + "居民头像上传失败!"); - } - //获取返回值 - AjaxResult ajax = AjaxResult.success("上传成功!"); - ajax.put("imgUrl", pictureName); - return ajax; - } +// @ApiOperation("居民头像上传") +// @PostMapping(value = "/headPictureUpload") +// public AjaxResult headPictureUpload(MultipartFile file) throws Exception { +// if (StringUtils.isBlank(file.getOriginalFilename())) { +// return AjaxResult.error("请选择所要上传的头像!"); +// } +// //获取路径名称 +// String uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getHeadPictureUrl(); +// //上传图片 +// String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, file, MimeTypeUtils.IMAGE_EXTENSION); +// if (StringUtils.isBlank(pictureName)) { +// throw new ServiceException(pictureName + "居民头像上传失败!"); +// } +// //获取返回值 +// AjaxResult ajax = AjaxResult.success("上传成功!"); +// ajax.put("imgUrl", pictureName); +// return ajax; +// } } 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 1ddc1d5..6f086d8 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 @@ -69,9 +69,9 @@ public class ResidentServiceApplyController extends BaseController { return R.ok(residentServiceAppletService.detail(bookingNo)); } - @ApiOperation(value = "获取服务预约列表", notes = "获取家医个性服务包和筛查项目") + @ApiOperation(value = "获取服务预约项目列表", notes = "获取家医个性服务包和筛查项目") @GetMapping("/getForm/{identity}") - public R> getForm(@PathVariable String identity, @RequestHeader("region") String region) { - return R.ok(residentServiceAppletService.getForm(identity, region)); + public R> getForm(@PathVariable String identity, String projectName, @RequestHeader("region") String region) { + return R.ok(residentServiceAppletService.getForm(identity, projectName,region)); } } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java index 2954542..283fd6d 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java @@ -1,9 +1,14 @@ package com.xinelu.web.controller.applet; +import com.xinelu.common.config.XinELuConfig; 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.exception.ServiceException; +import com.xinelu.common.utils.file.FileUploadUtils; +import com.xinelu.common.utils.file.FileUtils; +import com.xinelu.common.utils.file.MimeTypeUtils; import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody; import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo; @@ -12,6 +17,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; import java.util.List; @@ -30,6 +36,8 @@ public class ResidentSignApplyController extends BaseController { @Resource private IResidentSignAppletService residentSignAppletService; + @Resource + private XinELuConfig xinELuConfig; @ApiOperation("提交签约申请") @PostMapping("/save") @@ -80,4 +88,35 @@ public class ResidentSignApplyController extends BaseController { } } + + @ApiOperation("居民签字上传") + @PostMapping(value = "/residentSignatureUpload") + public AjaxResult headPictureUpload(MultipartFile file) throws Exception { + if (StringUtils.isBlank(file.getOriginalFilename())) { + return AjaxResult.error("请选择所要上传的居民签字!"); + } + //获取路径名称 + String uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getResidentSignatureUrl(); + //上传图片 + String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, file, MimeTypeUtils.IMAGE_EXTENSION); + if (StringUtils.isBlank(pictureName)) { + throw new ServiceException(pictureName + "居民头像上传失败!"); + } + //获取返回值 + AjaxResult ajax = AjaxResult.success("上传成功!"); + ajax.put("imgUrl", pictureName); + return ajax; + } + + @ApiOperation("获取居民签字(base64)") + @GetMapping( "/getResidentSignature/") + public AjaxResult getResidentSignature(String imgUrl) throws Exception { + //获取路径名称 + String pathUrl = XinELuConfig.getProfile() + imgUrl; + String base64 = FileUtils.PicToBase64(pathUrl); + AjaxResult ajax = AjaxResult.success("解析成功!"); + ajax.put("imgUrl", base64); + return ajax; + } + } 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 0494d33..eb44401 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 @@ -114,7 +114,7 @@ public class SignInfoController extends BaseController { return R.ok(JSONArray.parseArray(result.getJSONArray("data").toJSONString()).toJavaList(NearOrgVo.class)); } - @ApiOperation(value = "获取区划列表", notes = "山东省: 371400000000 德州市: 371400000000 东营市:370500000000") + @ApiOperation(value = "获取区划列表", notes = "山东省: 370000000000 德州市: 371400000000 东营市:370500000000") @GetMapping("/area/list/{pid}") public R> getPhArea(@PathVariable Long pid, @RequestHeader("region") String region) { String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/area/ph/list/" + pid, null, String.class); @@ -214,4 +214,19 @@ public class SignInfoController extends BaseController { } return R.ok(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), ProtocolContentVo.class)); } + + @ApiOperation(value = "获取居民履约情况") + @GetMapping("/getPerformance/{identity}") + public R> getPerformance(@PathVariable String identity, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/performance/getPerPackage/" + identity + "/0", null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if ("0".equals(jsonObject.get("code"))) { + return R.fail(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return R.ok(); + } + return R.ok(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(PerformancePackageVo.class)); + } + } diff --git a/xinelu-admin/src/main/resources/application.yml b/xinelu-admin/src/main/resources/application.yml index b226acc..6617333 100644 --- a/xinelu-admin/src/main/resources/application.yml +++ b/xinelu-admin/src/main/resources/application.yml @@ -82,6 +82,8 @@ xinelu: left-eye-piture-url: /leftEyePitureUrl #眼底病变筛查右眼图片地址 right-eye-piture-url: /rightEyePitureUrl + #居民签约申请签字图片地址 + resident-signature-url: /residentSignatureUrl # 开发环境配置 server: @@ -247,8 +249,8 @@ xss: fd: dy: http://192.168.124.6:8001/fd/mp dz: http://192.168.124.6:8001/fd/mp - # 签约附近的机构多少公里内 - distance: 100.00 + # 签约附近的机构多少公里内 <=0时不限制 + distance: 0 # 腾讯云音视频 trtc: diff --git a/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java b/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java index 3c14cfa..84f5a8f 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java +++ b/xinelu-common/src/main/java/com/xinelu/common/config/XinELuConfig.java @@ -241,6 +241,11 @@ public class XinELuConfig { */ private String chatRecordFileUrl; + /** + * 居民签约申请签字图片地址 + */ + private String residentSignatureUrl; + public String getConsultationFileUrl() { return consultationFileUrl; } @@ -257,6 +262,14 @@ public class XinELuConfig { this.chatRecordFileUrl = chatRecordFileUrl; } + public String getResidentSignatureUrl() { + return residentSignatureUrl; + } + + public void setResidentSignatureUrl(String residentSignatureUrl) { + this.residentSignatureUrl = residentSignatureUrl; + } + public String getStationWechatCodeUrl() { return stationWechatCodeUrl; } 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 bae845e..3aecc6a 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 @@ -1,5 +1,6 @@ package com.xinelu.common.enums; +import com.xinelu.common.exception.ServiceException; import lombok.Getter; /** @@ -34,6 +35,6 @@ public enum RegionKeyType { return uploadType; } } - return null; + throw new ServiceException("获取区域配置出错"); } } diff --git a/xinelu-common/src/main/java/com/xinelu/common/utils/spring/SpringUtils.java b/xinelu-common/src/main/java/com/xinelu/common/utils/spring/SpringUtils.java index 1840b51..59792bc 100644 --- a/xinelu-common/src/main/java/com/xinelu/common/utils/spring/SpringUtils.java +++ b/xinelu-common/src/main/java/com/xinelu/common/utils/spring/SpringUtils.java @@ -1,6 +1,7 @@ package com.xinelu.common.utils.spring; import com.xinelu.common.enums.RegionKeyType; +import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.StringUtils; import org.springframework.aop.framework.AopContext; import org.springframework.beans.BeansException; diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PerformancePackageVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PerformancePackageVo.java new file mode 100644 index 0000000..43b3b61 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/PerformancePackageVo.java @@ -0,0 +1,104 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 履约明细服务包集合展示类 + * @Date 2023-10-11 011 9:19 + * @Param + * @return + **/ +@ApiModel("履约明细服务包集合展示类") +@Data +public class PerformancePackageVo { + + /** + * 履约明细业务主键 + */ + @ApiModelProperty(value = "履约明细业务主键") + private String performanceDetailNo; + + /** + * 服务包明细编号 + */ + @ApiModelProperty("服务包明细编号") + private String packageDetailNo; + /** + * 服务包编号 + */ + @ApiModelProperty("服务包编号") + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty("服务包名称") + private String packageName; + + /** + * 价格(单位:元,#0.00) + */ + @ApiModelProperty(value = "价格(单位:元,#0.00)") + private BigDecimal packCost; + + /** + * 优惠价格(单位:元,#0.00) + */ + @ApiModelProperty(value = "优惠价格(单位:元,#0.00)") + private BigDecimal packCostCheap; + + /** + * 签约价格(单位:元,#0.00) + */ + @ApiModelProperty(value = "签约价格(单位:元,#0.00)") + private BigDecimal packSignCost; + + /** + * 服务周期 + */ + @ApiModelProperty(value = "服务周期") + private Integer servicePeriod; + + /** + * 单位(D:天,W:周,M:月,Y:年) + */ + @ApiModelProperty(value = "单位(D:天,W:周,M:月,Y:年)") + private String unit; + + /** + * 是否公共(市级机构才可创建) + * */ + @ApiModelProperty(value = "是否公共(市级机构才可创建)") + private Boolean common; + + /** + * 服务包类型(0:基本公共卫生服务包 1:家医服务包 2:精细化服务包) + */ + @ApiModelProperty(value = "服务包类型(0:基本公共卫生服务包 1:家医服务包 2:精细化服务包)") + private String packType; + + /** + * 服务包类别(0:基础服务包 1:个性化服务包) + * */ + @ApiModelProperty(value = "服务包类别(0:基础服务包 1:个性化服务包)") + private String packCategory; + + /** + * 服务包内容 + */ + @ApiModelProperty(value = "服务包内容") + private String packageContent; + + /** + * 服务项集合 + */ + @ApiModelProperty(value = "服务项集合") + private List formList; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentPatientInfoService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentPatientInfoService.java index f3561c8..2f8f316 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentPatientInfoService.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentPatientInfoService.java @@ -114,4 +114,13 @@ public interface IResidentPatientInfoService { * @return void **/ PatientInfo getByCardNo(String cardNo); + + /** + * @Author mengkuiliang + * @Description 是否已注册 + * @Date 2023-10-11 011 10:45 + * @Param [code] + * @return java.lang.Object + **/ + PatientInfo isRegistered(String code); } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentServiceAppletService.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentServiceAppletService.java index 9ed4fa4..f8893f5 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentServiceAppletService.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/IResidentServiceAppletService.java @@ -104,5 +104,5 @@ public interface IResidentServiceAppletService { * @Param [identity] * @return java.lang.Object **/ - List getForm(String identity, String region); + List getForm(String identity, String projectName, String region); } 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 56642db..82bb98a 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,6 +8,7 @@ import java.util.stream.Collectors; import com.alibaba.fastjson2.JSON; import com.alibaba.fastjson2.JSONObject; import com.xinelu.common.config.AppletChatConfig; +import com.xinelu.common.core.domain.AjaxResult; import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.bean.BeanUtils; import com.xinelu.common.utils.http.HttpService; @@ -168,6 +169,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi if(body.getDiseaseList() != null) { patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); } + patientInfo.setLoginFlag(Long.valueOf(1)); updatePatientInfo(patientInfo); // 注册 } else { @@ -185,6 +187,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi entity.setIsChecked((list == null || list.size() == 0) ? "1" : "0"); entity.setCreateTime(new Date()); entity.setCreateBy(body.getCardNo()); + entity.setLoginFlag(Long.valueOf(1)); residentPatientInfoMapper.insertPatientInfo(entity); } else { if (!StringUtils.isBlank(patientInfo.getOpenid())) { @@ -200,6 +203,7 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi patientInfo.setUpdateBy(body.getCardNo()); patientInfo.setHeadPictureUrl(body.getHeadPictureUrl()); patientInfo.setDelFlag(0); + patientInfo.setLoginFlag(Long.valueOf(1)); if(body.getDiseaseList() != null) { patientInfo.setDisease(body.getDiseaseList().stream().collect(Collectors.joining(","))); } @@ -310,4 +314,16 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi public PatientInfo getByCardNo(String cardNo) { return residentPatientInfoMapper.getByCardNo(cardNo); } + + /** + * @Author mengkuiliang + * @Description 是否已注册 + * @Date 2023-10-11 011 10:46 + * @Param [code] + * @return com.xinelu.familydoctor.applet.pojo.entity.PatientInfo + **/ + @Override + public PatientInfo isRegistered(String code) { + return getCurrentResident(getOpenId(code), null); + } } 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 3e76322..208dcbd 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 @@ -258,9 +258,8 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe * @Param [identity] **/ @Override - public List getForm(String identity, String region) { + public List getForm(String identity, String projectName, String region) { List projectList = new ArrayList<>(); - // 获取签约信息 String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/detail/" + identity, null, String.class); JSONObject jsonObject = JSONObject.parseObject(result); @@ -275,7 +274,7 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe throw new ServiceException("未查询到签约信息!"); } // 获取家医个性服务包 - result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/package/getPackageOfGX/" + identity, null, String.class); + 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"))) { throw new ServiceException(jsonObject.get("msg").toString()); @@ -316,6 +315,7 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe // 获取筛查项目 ScreeningProject query = new ScreeningProject(); query.setHospitalId(Hospital.getId()); + query.setProjectName(projectName); List screeningProjectList = screeningProjectService.findList(query); if(screeningProjectList != null && screeningProjectList.size() > 0) { ScreeningProjectVo sp; From c21c7373b5c528fcc30217c671702c5244efc5ac Mon Sep 17 00:00:00 2001 From: mengkuiliang <1464081137@qq.com> Date: Wed, 11 Oct 2023 16:08:54 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ResidentServiceApplyController.java | 4 +- .../pojo/body/ResidentServiceApplyBody.java | 3 +- .../impl/ResidentServiceApplyServiceImpl.java | 43 +++++++------------ .../impl/ResidentSignApplyServiceImpl.java | 3 ++ .../impl/ScreeningRecordServiceImpl.java | 8 +++- 5 files changed, 28 insertions(+), 33 deletions(-) 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 6f086d8..085b97a 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java @@ -32,10 +32,10 @@ public class ResidentServiceApplyController extends BaseController { @Resource private IResidentServiceAppletService residentServiceAppletService; - @ApiOperation("提交服务申请(批量)") + @ApiOperation("提交服务申请") @PostMapping("/save") public R save(@RequestBody ResidentServiceApplyBody body) { - if (body == null || body.getFormList() == null || body.getFormList().size() == 0) { + if (body == null || StringUtils.isBlank(body.getPackageNo()) || StringUtils.isBlank(body.getFormNo())) { return R.fail("请求参数不能为空"); } residentServiceAppletService.insert(body); diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentServiceApplyBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentServiceApplyBody.java index 31d3dbb..3b66212 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentServiceApplyBody.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentServiceApplyBody.java @@ -17,7 +17,7 @@ import java.util.List; **/ @Data @ApiModel("居民服务申请请求对象") -public class ResidentServiceApplyBody { +public class ResidentServiceApplyBody extends ResidentServiceFormApplyDto{ /** * 居民编号 @@ -94,6 +94,7 @@ public class ResidentServiceApplyBody { /** * 服务项集合 */ + @ApiModelProperty(value = "服务项集合", hidden = true) List formList; } 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 208dcbd..85007c0 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 @@ -77,31 +77,18 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe } } - List serviceApplyList = new ArrayList<>(); - for (ResidentServiceFormApplyDto form : body.getFormList()) { - if (!StringUtils.isBlank(form.getFormNo())) { - entity = new ResidentServiceApplyEntity(); - BeanUtils.copyProperties(body, entity); - if (patientInfo != null) { - entity.setPatientId(patientInfo.getPatientCode()); - } - entity.setApplyTime(new Date()); - // 预约状态0:已申请1:已完成2:已取消 - entity.setBookingStatus("0"); - // 审批状态0:待批准 1:已同意 2:已拒绝 - entity.setApprovalStatus("0"); - entity.setBookingNo(IdUtils.simpleUUID()); - entity.setPackageNo(form.getPackageNo()); - entity.setPackageName(form.getPackageName()); - entity.setFormNo(form.getFormNo()); - entity.setFormName(form.getFormName()); - serviceApplyList.add(entity); - } + entity = new ResidentServiceApplyEntity(); + BeanUtils.copyProperties(body, entity); + if (patientInfo != null) { + entity.setPatientId(patientInfo.getPatientCode()); } - if (serviceApplyList.size() == 0) { - throw new ServiceException("服务项目不能为空"); - } - residentServiceApplyMapper.batchInsert(serviceApplyList); + entity.setApplyTime(new Date()); + // 预约状态0:已申请1:已完成2:已取消 + entity.setBookingStatus("0"); + // 审批状态0:待批准 1:已同意 2:已拒绝 + entity.setApprovalStatus("0"); + entity.setBookingNo(IdUtils.simpleUUID()); + residentServiceApplyMapper.insert(entity); } /** @@ -274,7 +261,7 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe throw new ServiceException("未查询到签约信息!"); } // 获取家医个性服务包 - result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/package/getPackageOfGX/" + identity + (!StringUtils.isBlank(projectName)? ("?formName=" + projectName): "?formName=null"), null, String.class); + 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"))) { throw new ServiceException(jsonObject.get("msg").toString()); @@ -311,15 +298,15 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe if (org != null && !StringUtils.isBlank(org.getPhOrgId())) { // 根据机构编码获取筛查机构 HospitalInfo Hospital = hospitalInfoService.getHosptalByOrgCode(org.getPhOrgId()); - if(Hospital != null) { + 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) { + if (screeningProjectList != null && screeningProjectList.size() > 0) { ScreeningProjectVo sp; - for(ScreeningProject project: screeningProjectList) { + for (ScreeningProject project : screeningProjectList) { sp = new ScreeningProjectVo(); sp.setSourceType("2"); sp.setHospitalId(String.valueOf(project.getHospitalId())); 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 9f0aad8..eb23725 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 @@ -78,6 +78,9 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService // 审批状态0:待批准 1:已同意 2:已拒绝 entity.setApprovalStatus("0"); entity.setBookingNo(IdUtils.simpleUUID()); + if(StringUtils.isBlank(entity.getNation())) { + entity.setNation("1"); + } residentSignApplyMapper.insert(entity); } 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 5b2cb40..1de2a81 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 @@ -127,8 +127,12 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { recordBody.setScreeningStatus("1"); recordBody.setApplyCode(generateCode()); recordBody.setScreeningType("1"); - // 预约条码 - recordBody.setApplyBarcode(generateBarcode(xinELuConfig.getApplyBarcodePitureUrl(), recordBody.getScreeningId(), recordBody.getApplyCode())); + try { + // 预约条码 + recordBody.setApplyBarcode(generateBarcode(xinELuConfig.getApplyBarcodePitureUrl(), recordBody.getScreeningId(), recordBody.getApplyCode())); + } catch (Exception e) { + + } int flag = screeningRecordMapper.insert(recordBody); if(flag > 0) { // 推送消息 From 87cd1582704577d670263f835548b0bd743b18b7 Mon Sep 17 00:00:00 2001 From: mengkuiliang <1464081137@qq.com> Date: Thu, 12 Oct 2023 17:34:47 +0800 Subject: [PATCH 7/8] =?UTF-8?q?1=E3=80=81=E6=B7=BB=E5=8A=A0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E5=AE=B6=E5=8C=BB=E4=BA=BA=E7=BE=A4=E3=80=81=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E4=BA=BA=E7=BE=A4=E8=8E=B7=E5=8F=96=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E5=8C=85=E3=80=81=E8=8E=B7=E5=8F=96=E7=AD=BE=E7=BA=A6=E5=8D=8F?= =?UTF-8?q?=E8=AE=AE=E6=8E=A5=E5=8F=A3=EF=BC=9B=202=E3=80=81=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=AD=BE=E7=BA=A6=E7=94=B3=E8=AF=B7=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E7=AD=BE=E5=AD=97=E4=B8=8A=E4=BC=A0=E6=8E=A5=E5=8F=A3=EF=BC=9B?= =?UTF-8?q?=203=E3=80=81=E6=B7=BB=E5=8A=A0=E7=AD=BE=E7=BA=A6=E5=91=A8?= =?UTF-8?q?=E6=9C=9F=E5=AD=97=E6=AE=B5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../applet/ResidentPatientInfoController.java | 1 + .../ResidentRescindApplyController.java | 2 + .../ResidentServiceApplyController.java | 4 ++ .../applet/ResidentSignApplyController.java | 59 +++++++++++------ .../controller/applet/SignInfoController.java | 51 +++++++++++++++ .../applet/pojo/body/FileUploadBody.java | 27 ++++++++ .../pojo/body/ResidentSignApplyBody.java | 27 ++++++-- .../applet/pojo/dto/CrowdDto.java | 30 +++++++++ .../applet/pojo/dto/PackageDto.java | 33 ++++++++++ .../pojo/entity/ResidentSignApplyEntity.java | 3 + .../applet/pojo/query/PackageQuery.java | 32 ++++++++++ .../applet/pojo/vo/ResidentSignApplyVo.java | 3 + .../applet/pojo/vo/SignInfoDataVo.java | 64 +++++++++++++++++++ .../impl/ResidentSignApplyServiceImpl.java | 16 ++++- .../mapper/sign/ResidentSignApplyMapper.xml | 11 +++- .../AppletScreeningRecordController.java | 3 + .../impl/ScreeningRecordServiceImpl.java | 5 +- 17 files changed, 341 insertions(+), 30 deletions(-) create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/CrowdDto.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PackageDto.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PackageQuery.java create mode 100644 xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDataVo.java 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 2ad4e55..4705a3a 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 @@ -108,6 +108,7 @@ public class ResidentPatientInfoController extends BaseController { try { return R.ok(residentPatientInfoService.switchResident(openid, patientCode)); } catch (Exception e) { + e.printStackTrace(); return R.fail(e.getMessage()); } } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentRescindApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentRescindApplyController.java index 37981ad..03552aa 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentRescindApplyController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentRescindApplyController.java @@ -53,6 +53,7 @@ public class ResidentRescindApplyController extends BaseController { List list = rescindApplyService.findList(query); return getDataTable(list); } catch (Exception e) { + e.printStackTrace(); throw new ServiceException(e.getMessage()); } } @@ -63,6 +64,7 @@ public class ResidentRescindApplyController extends BaseController { try { return R.ok(rescindApplyService.detail(applyNo)); } catch (Exception e) { + e.printStackTrace(); return R.fail(e.getMessage()); } } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java index 085b97a..dec5de9 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentServiceApplyController.java @@ -38,6 +38,9 @@ public class ResidentServiceApplyController extends BaseController { if (body == null || StringUtils.isBlank(body.getPackageNo()) || StringUtils.isBlank(body.getFormNo())) { return R.fail("请求参数不能为空"); } + if(StringUtils.isBlank(body.getIdentity())) { + return R.fail("居民身份证号不能为空"); + } residentServiceAppletService.insert(body); return R.ok(); } @@ -59,6 +62,7 @@ public class ResidentServiceApplyController extends BaseController { startPage(); return getDataTable(residentServiceAppletService.findList(query)); } catch (Exception e) { + e.printStackTrace(); throw new ServiceException(e.getMessage()); } } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java index 283fd6d..49ec8d1 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java @@ -1,5 +1,6 @@ package com.xinelu.web.controller.applet; +import com.alibaba.fastjson2.JSONObject; import com.xinelu.common.config.XinELuConfig; import com.xinelu.common.core.controller.BaseController; import com.xinelu.common.core.domain.AjaxResult; @@ -9,6 +10,9 @@ import com.xinelu.common.exception.ServiceException; import com.xinelu.common.utils.file.FileUploadUtils; import com.xinelu.common.utils.file.FileUtils; import com.xinelu.common.utils.file.MimeTypeUtils; +import com.xinelu.common.utils.http.HttpService; +import com.xinelu.common.utils.spring.SpringUtils; +import com.xinelu.familydoctor.applet.pojo.body.FileUploadBody; import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody; import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo; @@ -16,10 +20,12 @@ import com.xinelu.familydoctor.applet.service.IResidentSignAppletService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; +import org.aspectj.weaver.loadtime.Aj; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.annotation.Resource; +import java.util.Base64; import java.util.List; /** @@ -37,14 +43,20 @@ public class ResidentSignApplyController extends BaseController { @Resource private IResidentSignAppletService residentSignAppletService; @Resource - private XinELuConfig xinELuConfig; + private HttpService httpService; @ApiOperation("提交签约申请") @PostMapping("/save") public R save(@RequestBody ResidentSignApplyBody body) { - if(StringUtils.isBlank(body.getIdentity())) { + if (StringUtils.isBlank(body.getIdentity())) { return R.fail("身份证号不能为空"); } + if (body.getCrowdList() == null || body.getCrowdList().size() == 0) { + return R.fail("人群不能为空"); + } + if (body.getPackageList() == null || body.getPackageList().size() == 0) { + return R.fail("服务包不能为空"); + } residentSignAppletService.insert(body); return R.ok(); } @@ -62,6 +74,7 @@ public class ResidentSignApplyController extends BaseController { try { return R.ok(residentSignAppletService.checkSignApply(identity, region)); } catch (Exception e) { + e.printStackTrace(); return R.fail(e.getMessage()); } } @@ -74,6 +87,7 @@ public class ResidentSignApplyController extends BaseController { List list = residentSignAppletService.findList(query); return getDataTable(list); } catch (Exception e) { + e.printStackTrace(); throw new ServiceException(e.getMessage()); } } @@ -84,6 +98,7 @@ public class ResidentSignApplyController extends BaseController { try { return R.ok(residentSignAppletService.detail(bookingNo)); } catch (Exception e) { + e.printStackTrace(); return R.fail(e.getMessage()); } } @@ -91,32 +106,36 @@ public class ResidentSignApplyController extends BaseController { @ApiOperation("居民签字上传") @PostMapping(value = "/residentSignatureUpload") - public AjaxResult headPictureUpload(MultipartFile file) throws Exception { + public AjaxResult headPictureUpload(MultipartFile file, @RequestHeader("region") String region) throws Exception { if (StringUtils.isBlank(file.getOriginalFilename())) { return AjaxResult.error("请选择所要上传的居民签字!"); } - //获取路径名称 - String uploadPathUrl = XinELuConfig.getProfile() + xinELuConfig.getResidentSignatureUrl(); - //上传图片 - String pictureName = FileUploadUtils.uploadNurseStationPath(uploadPathUrl, file, MimeTypeUtils.IMAGE_EXTENSION); - if (StringUtils.isBlank(pictureName)) { - throw new ServiceException(pictureName + "居民头像上传失败!"); + FileUploadBody body = new FileUploadBody(); + body.setOriginalFilename(file.getOriginalFilename()); + body.setCode("1001"); + body.setFile(Base64.getEncoder().encodeToString(file.getBytes())); + // 上传家医 + JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/resident/signinfo/uploadBase64", null, JSONObject.parseObject(JSONObject.toJSONString(body))); + if ("0".equals(result.get("code"))) { + return AjaxResult.error(result.get("msg").toString()); } - //获取返回值 AjaxResult ajax = AjaxResult.success("上传成功!"); - ajax.put("imgUrl", pictureName); + ajax.put("imgUrl", result.getString("data")); return ajax; } - @ApiOperation("获取居民签字(base64)") - @GetMapping( "/getResidentSignature/") - public AjaxResult getResidentSignature(String imgUrl) throws Exception { - //获取路径名称 - String pathUrl = XinELuConfig.getProfile() + imgUrl; - String base64 = FileUtils.PicToBase64(pathUrl); - AjaxResult ajax = AjaxResult.success("解析成功!"); - ajax.put("imgUrl", base64); - return ajax; + @ApiOperation("获取居民签字") + @GetMapping(value = "/getResidentSignature/{fileNo}") + public AjaxResult getResidentSignature(@PathVariable String fileNo, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getSignBase64/" + fileNo, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if (!"1".equals(jsonObject.get("code"))) { + return AjaxResult.error(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return AjaxResult.success(); + } + return AjaxResult.success("查询成功", jsonObject.getString("data")); } } diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SignInfoController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SignInfoController.java index eb44401..134d953 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SignInfoController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/SignInfoController.java @@ -10,10 +10,12 @@ import com.xinelu.common.utils.http.HttpService; import com.xinelu.common.utils.spring.SpringUtils; import com.xinelu.familydoctor.applet.pojo.query.DoctorListQuery; import com.xinelu.familydoctor.applet.pojo.query.NearbyOrgQuery; +import com.xinelu.familydoctor.applet.pojo.query.PackageQuery; import com.xinelu.familydoctor.applet.pojo.query.TeamListQuery; import com.xinelu.familydoctor.applet.pojo.vo.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; @@ -229,4 +231,53 @@ public class SignInfoController extends BaseController { return R.ok(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(PerformancePackageVo.class)); } + @ApiOperation(value = "获取家医人群") + @GetMapping("/getCrowd/{identity}") + public R> getCrowd(@PathVariable String identity, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getCrowd/" + identity, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if ("0".equals(jsonObject.get("code"))) { + return R.fail(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return R.ok(); + } + return R.ok(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(CrowdVo.class)); + } + + @ApiOperation("根据人群获取服务包") + @PostMapping("/getPackageByCrowdNo") + public R> getPackageByCrowdNo(@RequestBody PackageQuery query, @RequestHeader("region") String region) { + if (query == null) { + return R.fail("请求参数不能为空"); + } + if (StringUtils.isBlank(query.getOrgNo())) { + return R.fail("机构编号不能为空"); + } + if (query.getCrowdNoList() == null || query.getCrowdNoList().size() == 0) { + return R.fail("人群编号不能为空"); + } + JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/package/getPackageByCrowdNoList", null, JSONObject.parseObject(JSONObject.toJSONString(query))); + if ("0".equals(result.get("code"))) { + return R.fail(result.get("msg").toString()); + } + if (result.containsKey("data") && result.get("data") != null) { + return R.ok(JSONArray.parseArray(result.getJSONArray("data").toJSONString()).toJavaList(PackageDetailVo.class)); + } + return R.ok(); + } + + @ApiOperation(value = "获取签约协议") + @GetMapping("/getSignProtocol/{cardNo}") + public R getSignProtocol(@PathVariable String cardNo, @RequestHeader("region") String region) { + String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/resident/signinfo/getSignProtocol/" + cardNo, null, String.class); + JSONObject jsonObject = JSONObject.parseObject(result); + if ("0".equals(jsonObject.get("code"))) { + return R.fail(jsonObject.get("msg").toString()); + } + if (!jsonObject.containsKey("data") || jsonObject.get("data") == null) { + return R.ok(); + } + return R.ok(JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDataVo.class)); + } } diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java new file mode 100644 index 0000000..3113596 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java @@ -0,0 +1,27 @@ +package com.xinelu.familydoctor.applet.pojo.body; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description base64文件上传请求类 + * @Date 2023-10-12 012 11:37 + * @Param + * @return + **/ +@ApiModel("base64文件上传请求类") +@Data +public class FileUploadBody { + + @ApiModelProperty("文件(base64)") + private String file; + + @ApiModelProperty("文件类型编码") + private String code; + + @ApiModelProperty("文件名称") + private String originalFilename; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentSignApplyBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentSignApplyBody.java index fb8ffd8..9918d0b 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentSignApplyBody.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/ResidentSignApplyBody.java @@ -1,10 +1,14 @@ package com.xinelu.familydoctor.applet.pojo.body; +import com.xinelu.familydoctor.applet.pojo.dto.CrowdDto; +import com.xinelu.familydoctor.applet.pojo.dto.PackageDto; +import com.xinelu.familydoctor.applet.pojo.vo.CrowdVo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.Date; +import java.util.List; /** * @Author mengkuiliang @@ -133,27 +137,39 @@ public class ResidentSignApplyBody { /** * 所属人群编号 */ - @ApiModelProperty(value = "所属人群编号", required = true) + @ApiModelProperty(value = "所属人群编号", hidden = true) private String crowdsNo; /** * 所属人群名称 */ - @ApiModelProperty(value = "所属人群名称", required = true) + @ApiModelProperty(value = "所属人群名称", hidden = true) private String crowdsName; + /** + * 人群对象集合 + */ + @ApiModelProperty(value = "人群对象集合", required = true) + private List crowdList; + /** * 选择服务包编号 */ - @ApiModelProperty(value = "选择服务包编号", required = true) + @ApiModelProperty(value = "选择服务包编号", hidden = true) private String packagesNo; /** * 选择服务包名称 */ - @ApiModelProperty(value = "选择服务包名称", required = true) + @ApiModelProperty(value = "选择服务包名称", hidden = true) private String packagesName; + /** + * 服务包对象集合 + */ + @ApiModelProperty(value = "服务包对象集合", required = true) + private List packageList; + /** * 签约机构编号 */ @@ -196,6 +212,9 @@ public class ResidentSignApplyBody { @ApiModelProperty(value = "签约时间", required = true) private Date signTime; + @ApiModelProperty("签约年数") + private Integer signYears; + /** * 居民头像照片 */ diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/CrowdDto.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/CrowdDto.java new file mode 100644 index 0000000..acd87ac --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/CrowdDto.java @@ -0,0 +1,30 @@ +package com.xinelu.familydoctor.applet.pojo.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author mengkuiliang + * @Description 人群对象dto + * @Date 2023-10-11 011 16:35 + * @Param + * @return + **/ +@ApiModel("人群对象dto") +@Data +public class CrowdDto { + + /** + * 人群编号 + */ + @ApiModelProperty("人群编号") + private String crowdNo; + + /** + * 人群名称 + */ + @ApiModelProperty("人群名称") + private String crowdName; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PackageDto.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PackageDto.java new file mode 100644 index 0000000..36bd9a9 --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/dto/PackageDto.java @@ -0,0 +1,33 @@ +package com.xinelu.familydoctor.applet.pojo.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @Author mengkuiliang + * @Description 服务包Dto + * @Date 2023-10-11 011 16:37 + * @Param + * @return + **/ +@ApiModel("服务包Dto") +@Data +public class PackageDto { + + /** + * 服务包业务主键 + */ + @ApiModelProperty(value = "服务包业务主键") + private String packageNo; + + /** + * 服务包名称 + */ + @ApiModelProperty(value = "服务包名称") + private String packageName; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/ResidentSignApplyEntity.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/ResidentSignApplyEntity.java index 730d83f..e0701d7 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/ResidentSignApplyEntity.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/entity/ResidentSignApplyEntity.java @@ -205,6 +205,9 @@ public class ResidentSignApplyEntity implements Serializable { @ApiModelProperty(value = "签约时间") private Date signTime; + @ApiModelProperty("签约年数") + private Integer signYears; + /** * 居民头像照片 */ diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PackageQuery.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PackageQuery.java new file mode 100644 index 0000000..e6acd2b --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/query/PackageQuery.java @@ -0,0 +1,32 @@ +package com.xinelu.familydoctor.applet.pojo.query; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 查询服务包对象(根据人群) + * @Date 2023-10-11 011 16:15 + * @Param + * @return + **/ +@ApiModel("查询服务包对象(根据人群)") +@Data +public class PackageQuery { + + /** + * 机构编号 + */ + @ApiModelProperty(value = "机构编号", required = true) + private String orgNo; + + /** + * 人群编号集合 + */ + @ApiModelProperty(value = "人群编号集合", required = true) + private List crowdNoList; + +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentSignApplyVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentSignApplyVo.java index f78efd8..33f137e 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentSignApplyVo.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/ResidentSignApplyVo.java @@ -201,6 +201,9 @@ public class ResidentSignApplyVo extends BaseEntity { @JsonFormat(pattern ="yyyy-MM-dd", timezone = "GMT+8") private Date signTime; + @ApiModelProperty("签约年数") + private Integer signYears; + /** * 居民签字 */ diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDataVo.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDataVo.java new file mode 100644 index 0000000..a8d677e --- /dev/null +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/vo/SignInfoDataVo.java @@ -0,0 +1,64 @@ +package com.xinelu.familydoctor.applet.pojo.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +/** + * @Author mengkuiliang + * @Description 签约信息详情类 + * @Date 2023-10-12 012 15:02 + * @Param + * @return + **/ +@Data +public class SignInfoDataVo { + + /** 签约对象 */ + @ApiModelProperty(value = "签约对象") + private SignInfoDetailVo signInfo; + + /** 基础服务包名称 */ + @ApiModelProperty(value = "基础服务包名称") + private String basePackagesName; + + /** 个性化服务包名称 */ + @ApiModelProperty(value = "个性化服务包名称") + private String specialPackagesName; + + /** 个性化服务包内容 */ + @ApiModelProperty(value = "个性化服务包内容") + private List specialPackageContentList; + + /** 是否存在履约记录 */ + @ApiModelProperty(value = "是否存在履约记录") + private Boolean existPerformance; + + /** 协议模版内容对象 */ + @ApiModelProperty(value = "协议模版内容对象") + private ProtocolContentVo protocolContent; + /** + * 人群分类1:一般人群2:次重点人群3:重点人群9:未分类 + */ + @ApiModelProperty(value = "人群分类1:一般人群2:次重点人群3:重点人群9:未分类") + private String category; + + /** + * 居民签名照片Base64 + */ + @ApiModelProperty(value = "居民签名照片Base64") + private String residentBase64; + + /** + * 医生签名照片Base64 + */ + @ApiModelProperty(value = "医生签名照片Base64") + private String doctorBase64; + + /** + * 机构公章照片Base64 + */ + @ApiModelProperty(value = "机构公章照片Base64") + private String orgBase64; +} diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentSignApplyServiceImpl.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentSignApplyServiceImpl.java index eb23725..0c6a1f9 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentSignApplyServiceImpl.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/service/impl/ResidentSignApplyServiceImpl.java @@ -10,6 +10,8 @@ import com.xinelu.common.utils.uuid.IdUtils; import com.xinelu.familydoctor.applet.mapper.ResidentSignApplyMapper; import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody; import com.xinelu.familydoctor.applet.pojo.body.ResidentSignApplyBody; +import com.xinelu.familydoctor.applet.pojo.dto.CrowdDto; +import com.xinelu.familydoctor.applet.pojo.dto.PackageDto; import com.xinelu.familydoctor.applet.pojo.entity.PatientInfo; import com.xinelu.familydoctor.applet.pojo.entity.ResidentSignApplyEntity; import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery; @@ -25,6 +27,7 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * @Author mengkuiliang @@ -81,6 +84,13 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService if(StringUtils.isBlank(entity.getNation())) { entity.setNation("1"); } + if(entity.getSignYears() == null || entity.getSignYears() <= 0) { + entity.setSignYears(1); + } + entity.setCrowdsNo(body.getCrowdList().stream().map(CrowdDto::getCrowdNo).collect(Collectors.joining(","))); + entity.setCrowdsName(body.getCrowdList().stream().map(CrowdDto::getCrowdName).collect(Collectors.joining(","))); + entity.setPackagesNo(body.getPackageList().stream().map(PackageDto::getPackageNo).collect(Collectors.joining(","))); + entity.setPackagesName(body.getPackageList().stream().map(PackageDto::getPackageName).collect(Collectors.joining(","))); residentSignApplyMapper.insert(entity); } @@ -192,7 +202,7 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService // 查询未完成的签约申请 ResidentSignApplyVo signBookingInfoVo = getSignBookingByIdentity(identity); if (signBookingInfoVo != null) { - retMap.put("code", 01); + retMap.put("code", "01"); retMap.put("info", DateUtils.parseDateToStr("yyyy年MM月dd日", signBookingInfoVo.getSignTime()) + "已在【" + signBookingInfoVo.getOrgName() + "】【" + signBookingInfoVo.getTeamName() + "】【" + signBookingInfoVo.getUserName() + "】申请签约"); return retMap; } @@ -205,11 +215,11 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService // 已签约 if (jsonObject.containsKey("data") && jsonObject.get("data") != null) { SignInfoDetailVo signInfoDetailVo = JSONObject.parseObject(jsonObject.getJSONObject("data").toJSONString(), SignInfoDetailVo.class); - retMap.put("code", 02); + retMap.put("code", "02"); retMap.put("info", DateUtils.parseDateToStr("yyyy年MM月dd日", signInfoDetailVo.getSignTime()) + "已在【" + signInfoDetailVo.getOrgName() + "】【" + signInfoDetailVo.getTeamName() + "】【" + signInfoDetailVo.getUserName() + "】签约"); return retMap; } else { - retMap.put("code", 0); + retMap.put("code", "0"); retMap.put("info", "未签约"); } return retMap; diff --git a/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml b/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml index f8d8632..d1116c1 100644 --- a/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml +++ b/xinelu-familydoctor/src/main/resources/mapper/sign/ResidentSignApplyMapper.xml @@ -36,6 +36,7 @@ + @@ -61,7 +62,7 @@ crowds_name,packages_no,packages_name, org_no,org_name,team_no, team_name,user_no,user_name, - sign_time,resident_autograph_path,relationship_with_householder, + sign_time,sign_years,resident_autograph_path,relationship_with_householder, householder_name,householder_identity,apply_time, booking_status,cancel_time,approval_status, refuse_reason,approval_time,remark @@ -78,7 +79,7 @@ p.crowds_name,p.packages_no,p.packages_name, p.org_no,p.org_name,p.team_no, p.team_name,p.user_no,p.user_name, - p.sign_time,p.resident_autograph_path,p.relationship_with_householder, + p.sign_time,p.sign_years,p.resident_autograph_path,p.relationship_with_householder, p.householder_name,p.householder_identity,p.apply_time, p.booking_status,p.cancel_time,p.approval_status, p.refuse_reason,p.approval_time,p.remark @@ -148,6 +149,9 @@ sign_time, + + sign_years, + resident_autograph_path, resident_avatar, @@ -235,6 +239,9 @@ #{signTime}, + + #{signYears}, + #{residentAutographPath}, #{residentAvatar}, diff --git a/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java b/xinelu-nurse-applet/src/main/java/com/xinelu/applet/controller/appletscreeningrecord/AppletScreeningRecordController.java index f6ee977..cde74d6 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 @@ -75,6 +75,9 @@ public class AppletScreeningRecordController extends BaseController { @ApiOperation(value = "预约") @RepeatSubmit(interval = 2000, message = "请求过于频繁") public R save(@RequestBody ScreeningApplyDTO body) { + if(org.apache.commons.lang3.StringUtils.isBlank(body.getIdentity())) { + return R.fail("居民身份证号不能为空"); + } try { if(!DateUtils.formatDate(body.getApplyStartTime(), "yyyy-MM-dd").equals(DateUtils.formatDate(body.getApplyEndTime(), "yyyy-MM-dd"))) { return R.fail("预约日期请选择在同一天"); diff --git a/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java b/xinelu-nurse-manage/src/main/java/com/xinelu/manage/service/screeningrecord/impl/ScreeningRecordServiceImpl.java index 1de2a81..f70df62 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 @@ -109,6 +109,9 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { if(registerVo == null) { throw new Exception("用户未注册"); } + if(StringUtils.isBlank(body.getPatientId())) { + body.setPatientId(String.valueOf(registerVo.getId())); + } // 查询 同一机构的同一筛查项目在同一天是否有预约 ScreeningRecordDTO query = new ScreeningRecordDTO(); query.setPatientId(body.getPatientId()); @@ -131,7 +134,7 @@ public class ScreeningRecordServiceImpl implements IScreeningRecordService { // 预约条码 recordBody.setApplyBarcode(generateBarcode(xinELuConfig.getApplyBarcodePitureUrl(), recordBody.getScreeningId(), recordBody.getApplyCode())); } catch (Exception e) { - + e.printStackTrace(); } int flag = screeningRecordMapper.insert(recordBody); if(flag > 0) { From 25bcc18232cc9d9a4c1708eb77d5f6d4b31a8f5f Mon Sep 17 00:00:00 2001 From: mengkuiliang <1464081137@qq.com> Date: Fri, 13 Oct 2023 09:09:29 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E7=AD=BE=E7=BA=A6=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E4=B8=8A=E4=BC=A0=E6=8E=A5=E5=8F=A3=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/controller/applet/ResidentSignApplyController.java | 2 ++ .../familydoctor/applet/pojo/body/FileUploadBody.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java index 49ec8d1..dbb2d61 100644 --- a/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java +++ b/xinelu-admin/src/main/java/com/xinelu/web/controller/applet/ResidentSignApplyController.java @@ -113,6 +113,8 @@ public class ResidentSignApplyController extends BaseController { FileUploadBody body = new FileUploadBody(); body.setOriginalFilename(file.getOriginalFilename()); body.setCode("1001"); + body.setContentType(file.getContentType()); + body.setSuffix(body.getOriginalFilename().substring(body.getOriginalFilename().lastIndexOf(".") + 1)); body.setFile(Base64.getEncoder().encodeToString(file.getBytes())); // 上传家医 JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/resident/signinfo/uploadBase64", null, JSONObject.parseObject(JSONObject.toJSONString(body))); diff --git a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java index 3113596..8f40a48 100644 --- a/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java +++ b/xinelu-familydoctor/src/main/java/com/xinelu/familydoctor/applet/pojo/body/FileUploadBody.java @@ -24,4 +24,10 @@ public class FileUploadBody { @ApiModelProperty("文件名称") private String originalFilename; + @ApiModelProperty("文件类型") + private String contentType; + + @ApiModelProperty("文件后缀") + private String suffix; + }