解决调试过程中出现的问题;
This commit is contained in:
parent
d7e5267293
commit
31f7740e7c
@ -127,6 +127,12 @@ public class ResidentPatientInfoController extends BaseController {
|
||||
return R.ok(residentPatientInfoService.getCurrentResident(openid, cityCode));
|
||||
}
|
||||
|
||||
@ApiOperation("是否已注册")
|
||||
@GetMapping(value = "/isRegistered/{code}")
|
||||
public R<PatientInfo> 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;
|
||||
// }
|
||||
}
|
||||
|
||||
@ -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<List<ScreeningProjectVo>> getForm(@PathVariable String identity, @RequestHeader("region") String region) {
|
||||
return R.ok(residentServiceAppletService.getForm(identity, region));
|
||||
public R<List<ScreeningProjectVo>> getForm(@PathVariable String identity, String projectName, @RequestHeader("region") String region) {
|
||||
return R.ok(residentServiceAppletService.getForm(identity, projectName,region));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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<List<AreaListVo>> 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<List<PerformancePackageVo>> 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));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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("获取区域配置出错");
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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<PerformanceDetailVo> formList;
|
||||
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -104,5 +104,5 @@ public interface IResidentServiceAppletService {
|
||||
* @Param [identity]
|
||||
* @return java.lang.Object
|
||||
**/
|
||||
List<ScreeningProjectVo> getForm(String identity, String region);
|
||||
List<ScreeningProjectVo> getForm(String identity, String projectName, String region);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -258,9 +258,8 @@ public class ResidentServiceApplyServiceImpl implements IResidentServiceAppletSe
|
||||
* @Param [identity]
|
||||
**/
|
||||
@Override
|
||||
public List<ScreeningProjectVo> getForm(String identity, String region) {
|
||||
public List<ScreeningProjectVo> getForm(String identity, String projectName, String region) {
|
||||
List<ScreeningProjectVo> 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<ScreeningProject> screeningProjectList = screeningProjectService.findList(query);
|
||||
if(screeningProjectList != null && screeningProjectList.size() > 0) {
|
||||
ScreeningProjectVo sp;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user