1、添加获取家医人群、根据人群获取服务包、获取签约协议接口;
2、添加签约申请居民签字上传接口; 3、添加签约周期字段;
This commit is contained in:
parent
76f2680694
commit
87cd158270
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,6 +53,7 @@ public class ResidentRescindApplyController extends BaseController {
|
||||
List<ResidentRescindApplyVo> 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());
|
||||
}
|
||||
}
|
||||
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
@ -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<String> 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<ResidentSignApplyVo> 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"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -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<List<CrowdVo>> 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<List<PackageDetailVo>> 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<SignInfoDataVo> 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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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<CrowdDto> 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<PackageDto> packageList;
|
||||
|
||||
/**
|
||||
* 签约机构编号
|
||||
*/
|
||||
@ -196,6 +212,9 @@ public class ResidentSignApplyBody {
|
||||
@ApiModelProperty(value = "签约时间", required = true)
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("签约年数")
|
||||
private Integer signYears;
|
||||
|
||||
/**
|
||||
* 居民头像照片
|
||||
*/
|
||||
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -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;
|
||||
|
||||
}
|
||||
@ -205,6 +205,9 @@ public class ResidentSignApplyEntity implements Serializable {
|
||||
@ApiModelProperty(value = "签约时间")
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("签约年数")
|
||||
private Integer signYears;
|
||||
|
||||
/**
|
||||
* 居民头像照片
|
||||
*/
|
||||
|
||||
@ -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<String> crowdNoList;
|
||||
|
||||
}
|
||||
@ -201,6 +201,9 @@ public class ResidentSignApplyVo extends BaseEntity {
|
||||
@JsonFormat(pattern ="yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date signTime;
|
||||
|
||||
@ApiModelProperty("签约年数")
|
||||
private Integer signYears;
|
||||
|
||||
/**
|
||||
* 居民签字
|
||||
*/
|
||||
|
||||
@ -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<String> 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;
|
||||
}
|
||||
@ -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;
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
<result property="userNo" column="user_no" jdbcType="VARCHAR"/>
|
||||
<result property="userName" column="user_name" jdbcType="VARCHAR"/>
|
||||
<result property="signTime" column="sign_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="signYears" column="sign_years" jdbcType="INTEGER"/>
|
||||
<result property="residentAutographPath" column="resident_autograph_path" jdbcType="VARCHAR"/>
|
||||
<result property="relationshipWithHouseholder" column="relationship_with_householder" jdbcType="VARCHAR"/>
|
||||
<result property="householderName" column="householder_name" jdbcType="VARCHAR"/>
|
||||
@ -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 @@
|
||||
</if>
|
||||
<if test="signTime != null">sign_time,
|
||||
</if>
|
||||
<if test="signYears != null">
|
||||
sign_years,
|
||||
</if>
|
||||
<if test="residentAutographPath != null">resident_autograph_path,
|
||||
</if>
|
||||
<if test="residentAvatar != null">resident_avatar,
|
||||
@ -235,6 +239,9 @@
|
||||
</if>
|
||||
<if test="signTime != null">#{signTime},
|
||||
</if>
|
||||
<if test="signYears != null">
|
||||
#{signYears},
|
||||
</if>
|
||||
<if test="residentAutographPath != null">#{residentAutographPath},
|
||||
</if>
|
||||
<if test="residentAvatar != null">#{residentAvatar},
|
||||
|
||||
@ -75,6 +75,9 @@ public class AppletScreeningRecordController extends BaseController {
|
||||
@ApiOperation(value = "预约")
|
||||
@RepeatSubmit(interval = 2000, message = "请求过于频繁")
|
||||
public R<String> 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("预约日期请选择在同一天");
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user