添加签约审核、解约审核、解约申请列表家医调用接口;
修改字段名;
This commit is contained in:
parent
60ac53e173
commit
e42bc824da
@ -7,7 +7,7 @@ import com.xinelu.common.exception.ServiceException;
|
||||
import com.xinelu.familydoctor.applet.pojo.body.ResidentRescindApplyBody;
|
||||
import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery;
|
||||
import com.xinelu.familydoctor.applet.pojo.vo.ResidentRescindApplyVo;
|
||||
import com.xinelu.familydoctor.applet.service.ResidentRescindApplyService;
|
||||
import com.xinelu.familydoctor.applet.service.IResidentRescindApplyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -29,7 +29,7 @@ import java.util.List;
|
||||
public class ResidentRescindApplyController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private ResidentRescindApplyService rescindApplyService;
|
||||
private IResidentRescindApplyService rescindApplyService;
|
||||
|
||||
@ApiOperation("提交解约申请")
|
||||
@PostMapping("save")
|
||||
@ -39,9 +39,9 @@ public class ResidentRescindApplyController extends BaseController {
|
||||
}
|
||||
|
||||
@ApiOperation("取消解约申请")
|
||||
@GetMapping("cancel/{rescindCode}")
|
||||
public R<String> cancel(@PathVariable String rescindCode) {
|
||||
rescindApplyService.cancel(rescindCode);
|
||||
@GetMapping("cancel/{applyNo}")
|
||||
public R<String> cancel(@PathVariable String applyNo) {
|
||||
rescindApplyService.cancel(applyNo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ -58,10 +58,10 @@ public class ResidentRescindApplyController extends BaseController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取解约申请详情")
|
||||
@GetMapping("/detail/{rescindCode}")
|
||||
public R<ResidentRescindApplyVo> getRescindApply(@PathVariable String rescindCode) {
|
||||
@GetMapping("/detail/{applyNo}")
|
||||
public R<ResidentRescindApplyVo> getRescindApply(@PathVariable String applyNo) {
|
||||
try {
|
||||
return R.ok(rescindApplyService.detail(rescindCode));
|
||||
return R.ok(rescindApplyService.detail(applyNo));
|
||||
} catch (Exception e) {
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
|
||||
@ -42,9 +42,9 @@ public class ResidentSignApplyController extends BaseController {
|
||||
}
|
||||
|
||||
@ApiOperation("取消签约申请")
|
||||
@PostMapping("/cancel/{signCode}")
|
||||
public R<String> cancel(@PathVariable String signCode) {
|
||||
residentSignAppletService.cancel(signCode);
|
||||
@PostMapping("/cancel/{bookingNo}")
|
||||
public R<String> cancel(@PathVariable String bookingNo) {
|
||||
residentSignAppletService.cancel(bookingNo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ -71,10 +71,10 @@ public class ResidentSignApplyController extends BaseController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取签约申请详情")
|
||||
@GetMapping("/detail/{signCode}")
|
||||
public R<ResidentSignApplyVo> getSignApply(@PathVariable String signCode) {
|
||||
@GetMapping("/detail/{bookingNo}")
|
||||
public R<ResidentSignApplyVo> getSignApply(@PathVariable String bookingNo) {
|
||||
try {
|
||||
return R.ok(residentSignAppletService.detail(signCode));
|
||||
return R.ok(residentSignAppletService.detail(bookingNo));
|
||||
} catch (Exception e) {
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
|
||||
@ -128,24 +128,24 @@ public class SignInfoController extends BaseController {
|
||||
return R.ok(JSONArray.parseArray(jsonObject.getJSONArray("data").toJSONString()).toJavaList(AreaListVo.class));
|
||||
}
|
||||
|
||||
// @ApiOperation("获取区划详情")
|
||||
// @GetMapping("/area/getAreaById/{id}")
|
||||
// public R<AreaListVo> getAreaById(@PathVariable Long id, @RequestHeader("region") String region) {
|
||||
// String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/area/ph/getAreaById/" + id, 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(), AreaListVo.class));
|
||||
// }
|
||||
@ApiOperation("获取区划详情")
|
||||
@GetMapping("/area/getAreaById/{id}")
|
||||
public R<AreaListVo> getAreaById(@PathVariable Long id, @RequestHeader("region") String region) {
|
||||
String result = (String) httpService.get(SpringUtils.getFdUrl(region) + "/area/ph/getAreaById/" + id, 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(), AreaListVo.class));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取附近机构列表", notes = "lng:经度 lat:纬度")
|
||||
@GetMapping("/getNearbyOrg")
|
||||
public TableDataInfo getNearbyOrg(NearbyOrgQuery query, @RequestHeader("region") String region) {
|
||||
if (query.getDistance() == null || query.getDistance().compareTo(new BigDecimal("0")) == 0) {
|
||||
if (query.getDistance() != null && query.getDistance().compareTo(new BigDecimal("0")) < 0) {
|
||||
query.setDistance(DISTANCE);
|
||||
}
|
||||
JSONObject result = httpService.post(SpringUtils.getFdUrl(region) + "/org/getNearbyOrg/", null, JSONObject.parseObject(JSONObject.toJSONString(query)));
|
||||
|
||||
@ -0,0 +1,118 @@
|
||||
package com.xinelu.web.controller.fd;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.xinelu.common.core.domain.R;
|
||||
import com.xinelu.familydoctor.applet.pojo.body.ApprovalBody;
|
||||
import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery;
|
||||
import com.xinelu.familydoctor.applet.pojo.vo.ResidentRescindApplyVo;
|
||||
import com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo;
|
||||
import com.xinelu.familydoctor.applet.service.IResidentRescindApplyService;
|
||||
import com.xinelu.familydoctor.applet.service.IResidentSignAppletService;
|
||||
import com.xinelu.manage.service.patientinfo.IPatientInfoService;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Api(tags = "家医调用接口")
|
||||
@RestController
|
||||
@RequestMapping("/applet/fd")
|
||||
public class FDController {
|
||||
@Resource
|
||||
private IResidentRescindApplyService residentRescindApplyService;
|
||||
@Resource
|
||||
private IResidentSignAppletService residentSignAppletService;
|
||||
@Resource
|
||||
private IPatientInfoService patientInfoService;
|
||||
|
||||
|
||||
// @ApiOperation("履约申请列表")
|
||||
// @PostMapping("/performanceBooking/list")
|
||||
// public R<PageInfo<PerformanceBookingVo>> performanceBookingList(@RequestBody ApplyQuery query) {
|
||||
// return R.ok(performanceBookingService.findByBody(query));
|
||||
// }
|
||||
// @ApiOperation("履约申请详情")
|
||||
// @GetMapping("/performanceBooking/detail/{bookingNo}")
|
||||
// public R<PerformanceBookingVo> performanceBookingDetail(@PathVariable String bookingNo) {
|
||||
// return R.ok(performanceBookingService.detail(bookingNo));
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("更新履约申请审批结果")
|
||||
// @PostMapping("/performanceBooking/approval")
|
||||
// public R<?> performanceBookingApproval(@RequestBody ApprovalBody body) {
|
||||
// if (body == null) {
|
||||
// return R.fail("请求参数不能为空");
|
||||
// }
|
||||
// performanceBookingService.updateFd(body);
|
||||
// return R.ok();
|
||||
// }
|
||||
//
|
||||
// @ApiOperation("更新履约完成时间")
|
||||
// @GetMapping("/performanceBooking/approval/complete/{bookingNo}")
|
||||
// public R<?> performanceBookingApprovalComplete(@PathVariable String bookingNo) {
|
||||
// performanceBookingService.updateComplete(bookingNo);
|
||||
// return R.ok();
|
||||
// }
|
||||
|
||||
@ApiOperation("解约申请列表")
|
||||
@PostMapping("/rescindApply/list")
|
||||
public R<PageInfo<ResidentRescindApplyVo>> rescindApplyList(@RequestBody ApplyQuery query) {
|
||||
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||
return R.ok(PageInfo.of(residentRescindApplyService.findList(query)));
|
||||
}
|
||||
@ApiOperation("解约申请详情")
|
||||
@GetMapping("/rescindApply/detail/{applyNo}")
|
||||
public R<ResidentRescindApplyVo> rescindApplyDetail(@PathVariable String applyNo) {
|
||||
return R.ok(residentRescindApplyService.detail(applyNo));
|
||||
}
|
||||
|
||||
@ApiOperation("更新解约申请审批结果")
|
||||
@PostMapping("/rescindApply/approval")
|
||||
public R<?> rescindApplyApproval(@RequestBody ApprovalBody body) {
|
||||
if (body == null || StringUtils.isBlank(body.getApplyNo())) {
|
||||
return R.fail("请求参数不能为空");
|
||||
}
|
||||
residentRescindApplyService.updateFd(body);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("签约申请列表")
|
||||
@PostMapping("/signBooking/list")
|
||||
public R<PageInfo<ResidentSignApplyVo>> signBookingList(@RequestBody ApplyQuery query) {
|
||||
PageHelper.startPage(query.getPageNum(), query.getPageSize());
|
||||
return R.ok(PageInfo.of(residentSignAppletService.findList(query)));
|
||||
}
|
||||
|
||||
@ApiOperation("签约申请详情")
|
||||
@GetMapping("/signBooking/detail/{signCode}")
|
||||
public R<ResidentSignApplyVo> signBookingDetail(@PathVariable String signCode) {
|
||||
return R.ok(residentSignAppletService.detail(signCode));
|
||||
}
|
||||
|
||||
@ApiOperation("更新签约申请审批结果")
|
||||
@PostMapping("/signBooking/approval")
|
||||
public R<?> signBookingApproval(@RequestBody ApprovalBody body) {
|
||||
if (body == null) {
|
||||
return R.fail("请求参数不能为空");
|
||||
}
|
||||
residentSignAppletService.updateFd(body);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("根据签约主键查询绑定编号")
|
||||
@GetMapping("/signBooking/getBySignNo/{cardNo}")
|
||||
public R<JSONObject> getBySignNo(@PathVariable String cardNo) {
|
||||
JSONObject retObj = new JSONObject();
|
||||
PatientInfoVO patientInfo = patientInfoService.selectPatientInfoByCardNo(cardNo);
|
||||
if (patientInfo != null) {
|
||||
retObj.fluentPut("bindingNo", patientInfo.getPatientCode())
|
||||
.fluentPut("openid", patientInfo.getOpenid());
|
||||
}
|
||||
return R.ok(retObj);
|
||||
}
|
||||
}
|
||||
@ -37,10 +37,10 @@ public interface ResidentRescindApplyMapper {
|
||||
* @Author mengkuiliang
|
||||
* @Description 解约申请详情
|
||||
* @Date 2022-11-23 10:03
|
||||
* @Param [rescindCode]
|
||||
* @Param [applyNo]
|
||||
* @return com.xinelu.mp.sign.pojo.vo.FdResidentRescindApplyVo
|
||||
**/
|
||||
ResidentRescindApplyVo detail(String rescindCode);
|
||||
ResidentRescindApplyVo detail(String applyNo);
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
|
||||
@ -50,7 +50,7 @@ public interface ResidentSignApplyMapper {
|
||||
* @Param [bookingNo]
|
||||
* @return com.xinelu.mp.sign.pojo.vo.FdSignBookingVo
|
||||
**/
|
||||
ResidentSignApplyVo detail(String signCode);
|
||||
ResidentSignApplyVo detail(String bookingNo);
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
@ -59,7 +59,7 @@ public interface ResidentSignApplyMapper {
|
||||
* @Param [bookingNo]
|
||||
* @return void
|
||||
**/
|
||||
void cancel(String signCode);
|
||||
void cancel(String bookingNo);
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
|
||||
@ -20,12 +20,27 @@ import javax.validation.constraints.NotNull;
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ResidentRescindApplyBody extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 解约申请业务主键
|
||||
*/
|
||||
@ApiModelProperty(value = "解约申请业务主键")
|
||||
private String applyNo;
|
||||
|
||||
/**
|
||||
* 居民编号
|
||||
*/
|
||||
@ApiModelProperty(value = "居民业务主键", required = true)
|
||||
private String patientId;
|
||||
|
||||
/**
|
||||
* 签约编号
|
||||
*/
|
||||
@NotNull(message = "签约编号不能为空")
|
||||
@NotBlank(message = "签约编号不能为空")
|
||||
@ApiModelProperty(value = "签约编号")
|
||||
private String signNo;
|
||||
|
||||
/**
|
||||
* 居民身份证号
|
||||
*/
|
||||
|
||||
@ -21,7 +21,7 @@ public class ResidentSignApplyBody {
|
||||
* 签约申请编号
|
||||
*/
|
||||
@ApiModelProperty("签约申请编号")
|
||||
private String signCode;
|
||||
private String bookingNo;
|
||||
|
||||
/**
|
||||
* 居民注册业务主键
|
||||
|
||||
@ -25,7 +25,7 @@ public class ResidentRescindApplyEntity implements Serializable {
|
||||
* 申请编号
|
||||
*/
|
||||
@ApiModelProperty(value = "申请编号")
|
||||
private String rescindCode;
|
||||
private String applyNo;
|
||||
|
||||
/**
|
||||
* 居民编号
|
||||
@ -33,6 +33,12 @@ public class ResidentRescindApplyEntity implements Serializable {
|
||||
@ApiModelProperty(value = "居民编号")
|
||||
private String patientId;
|
||||
|
||||
/**
|
||||
* 签约编号
|
||||
*/
|
||||
@ApiModelProperty(value = "签约编号")
|
||||
private String signNo;
|
||||
|
||||
/**
|
||||
* 居民身份证号
|
||||
*/
|
||||
|
||||
@ -29,7 +29,7 @@ public class ResidentSignApplyEntity implements Serializable {
|
||||
* 签约申请编号
|
||||
*/
|
||||
@ApiModelProperty(value = "签约申请编号")
|
||||
private String signCode;
|
||||
private String bookingNo;
|
||||
|
||||
/**
|
||||
* 居民编号
|
||||
|
||||
@ -121,4 +121,10 @@ public class ApplyQuery {
|
||||
*/
|
||||
@ApiModelProperty(value = "是否已完成(1: 是 2: 否)")
|
||||
private String completed;
|
||||
|
||||
/**
|
||||
* 数据范围过滤SQL
|
||||
*/
|
||||
@ApiModelProperty(value = "数据范围过滤SQL", hidden = true)
|
||||
private String dataScope;
|
||||
}
|
||||
|
||||
@ -21,15 +21,21 @@ public class ResidentRescindApplyVo {
|
||||
/**
|
||||
* 申请编号
|
||||
*/
|
||||
@ApiModelProperty("申请编号")
|
||||
private String rescindCode;
|
||||
@ApiModelProperty(value = "申请编号")
|
||||
private String applyNo;
|
||||
|
||||
/**
|
||||
* 居民编号
|
||||
*/
|
||||
@ApiModelProperty(value = "居民业务主键", required = true)
|
||||
@ApiModelProperty(value = "居民业务主键")
|
||||
private String patientId;
|
||||
|
||||
/**
|
||||
* 签约编号
|
||||
*/
|
||||
@ApiModelProperty("签约编号")
|
||||
private String signNo;
|
||||
|
||||
/**
|
||||
* 居民姓名
|
||||
*/
|
||||
@ -141,12 +147,6 @@ public class ResidentRescindApplyVo {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date approvalTime;
|
||||
|
||||
/**
|
||||
* 签约编号
|
||||
*/
|
||||
@ApiModelProperty("签约编号")
|
||||
private String signNo;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
|
||||
@ -18,11 +18,12 @@ import java.util.Date;
|
||||
@Data
|
||||
@ApiModel("居民签约申请展示类")
|
||||
public class ResidentSignApplyVo extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 签约申请编号
|
||||
*/
|
||||
@ApiModelProperty("签约申请编号")
|
||||
private String signCode;
|
||||
private String bookingNo;
|
||||
|
||||
/**
|
||||
* 居民注册业务主键
|
||||
|
||||
@ -14,7 +14,7 @@ import java.util.List;
|
||||
* @Param
|
||||
* @return
|
||||
**/
|
||||
public interface ResidentRescindApplyService {
|
||||
public interface IResidentRescindApplyService {
|
||||
|
||||
List<ResidentRescindApplyVo> findList(ApplyQuery query);
|
||||
|
||||
@ -37,14 +37,14 @@ public interface ResidentRescindApplyService {
|
||||
* @Date 2022-11-23 10:03
|
||||
* @Param [applyNo]
|
||||
**/
|
||||
ResidentRescindApplyVo detail(String rescindCode);
|
||||
ResidentRescindApplyVo detail(String applyNo);
|
||||
|
||||
/**
|
||||
* @return void
|
||||
* @Author mengkuiliang
|
||||
* @Description 取消解约申请
|
||||
* @Date 2022-11-23 14:41
|
||||
* @Param [rescindCode]
|
||||
* @Param [applyNo]
|
||||
**/
|
||||
void cancel(String rescindCode);
|
||||
void cancel(String applyNo);
|
||||
}
|
||||
@ -29,11 +29,11 @@ public interface IResidentSignAppletService {
|
||||
/**
|
||||
* 取消
|
||||
* @author lixinying
|
||||
* @param signCode:
|
||||
* @param bookingNo:
|
||||
* @return Integer
|
||||
* @date 2022/11/21 10:10
|
||||
*/
|
||||
Integer delete(String signCode);
|
||||
Integer delete(String bookingNo);
|
||||
/**
|
||||
* fd查找
|
||||
* @author lixinying
|
||||
@ -68,7 +68,7 @@ public interface IResidentSignAppletService {
|
||||
* @Param [bookingNo]
|
||||
* @return java.lang.Object
|
||||
**/
|
||||
ResidentSignApplyVo detail(String signCode);
|
||||
ResidentSignApplyVo detail(String bookingNo);
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
@ -77,7 +77,7 @@ public interface IResidentSignAppletService {
|
||||
* @Param [bookingNo]
|
||||
* @return void
|
||||
**/
|
||||
void cancel(String signCode);
|
||||
void cancel(String bookingNo);
|
||||
|
||||
/**
|
||||
* @Author mengkuiliang
|
||||
|
||||
@ -165,9 +165,9 @@ public class ResidentPatientInfoServiceImpl implements IResidentPatientInfoServi
|
||||
**/
|
||||
@Override
|
||||
public void register(PatientInfoBody body) {
|
||||
if (ObjectUtils.isNotEmpty(body.getCardNo())) {
|
||||
// 获取当前微信绑定的居民
|
||||
List<PatientInfo> list = residentPatientInfoMapper.getList(body.getOpenid(), body.getCityCode());
|
||||
if (ObjectUtils.isNotEmpty(body.getCardNo())) {
|
||||
PatientInfo patientInfo = residentPatientInfoMapper.isRegisterByCardNo(body.getCardNo());
|
||||
if (patientInfo == null) {
|
||||
PatientInfo entity = new PatientInfo();
|
||||
|
||||
@ -12,7 +12,7 @@ import com.xinelu.familydoctor.applet.pojo.entity.ResidentRescindApplyEntity;
|
||||
import com.xinelu.familydoctor.applet.pojo.query.ApplyQuery;
|
||||
import com.xinelu.familydoctor.applet.pojo.vo.ResidentRescindApplyVo;
|
||||
import com.xinelu.familydoctor.applet.service.IResidentPatientInfoService;
|
||||
import com.xinelu.familydoctor.applet.service.ResidentRescindApplyService;
|
||||
import com.xinelu.familydoctor.applet.service.IResidentRescindApplyService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -28,7 +28,7 @@ import java.util.List;
|
||||
* @return
|
||||
**/
|
||||
@Service
|
||||
public class ResidentRescindApplyServiceImpl implements ResidentRescindApplyService {
|
||||
public class ResidentRescindApplyServiceImpl implements IResidentRescindApplyService {
|
||||
|
||||
@Resource
|
||||
private ResidentRescindApplyMapper residentRescindApplyMapper;
|
||||
@ -69,7 +69,7 @@ public class ResidentRescindApplyServiceImpl implements ResidentRescindApplyServ
|
||||
entity.setPatientId(patientInfo.getPatientCode());
|
||||
}
|
||||
|
||||
entity.setRescindCode(IdUtils.simpleUUID());
|
||||
entity.setApplyNo(IdUtils.simpleUUID());
|
||||
entity.setApplyTime(new Date());
|
||||
entity.setBookingStatus("0");
|
||||
entity.setApprovalStatus("0");
|
||||
@ -97,11 +97,11 @@ public class ResidentRescindApplyServiceImpl implements ResidentRescindApplyServ
|
||||
* @Author mengkuiliang
|
||||
* @Description 解约申请详情
|
||||
* @Date 2022-11-23 10:03
|
||||
* @Param [rescindCode]
|
||||
* @Param [applyNo]
|
||||
**/
|
||||
@Override
|
||||
public ResidentRescindApplyVo detail(String rescindCode) {
|
||||
return residentRescindApplyMapper.detail(rescindCode);
|
||||
public ResidentRescindApplyVo detail(String applyNo) {
|
||||
return residentRescindApplyMapper.detail(applyNo);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -109,11 +109,11 @@ public class ResidentRescindApplyServiceImpl implements ResidentRescindApplyServ
|
||||
* @Author mengkuiliang
|
||||
* @Description 取消解约申请
|
||||
* @Date 2022-11-23 14:41
|
||||
* @Param [rescindCode]
|
||||
* @Param [applyNo]
|
||||
**/
|
||||
@Override
|
||||
public void cancel(String rescindCode) {
|
||||
ResidentRescindApplyVo residentRescindApplyVo = residentRescindApplyMapper.detail(rescindCode);
|
||||
public void cancel(String applyNo) {
|
||||
ResidentRescindApplyVo residentRescindApplyVo = residentRescindApplyMapper.detail(applyNo);
|
||||
if(residentRescindApplyVo == null) {
|
||||
throw new ServiceException("未查询到解约申请记录");
|
||||
}
|
||||
@ -127,7 +127,7 @@ public class ResidentRescindApplyServiceImpl implements ResidentRescindApplyServ
|
||||
throw new ServiceException("已拒绝,不能取消");
|
||||
}
|
||||
}
|
||||
residentRescindApplyMapper.cancel(rescindCode);
|
||||
residentRescindApplyMapper.cancel(applyNo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService
|
||||
entity.setBookingStatus("0");
|
||||
// 审批状态0:待批准 1:已同意 2:已拒绝
|
||||
entity.setApprovalStatus("0");
|
||||
entity.setSignCode(IdUtils.simpleUUID());
|
||||
entity.setBookingNo(IdUtils.simpleUUID());
|
||||
residentSignApplyMapper.insert(entity);
|
||||
}
|
||||
|
||||
@ -146,8 +146,8 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService
|
||||
* @Param [bookingNo]
|
||||
**/
|
||||
@Override
|
||||
public ResidentSignApplyVo detail(String signCode) {
|
||||
return residentSignApplyMapper.detail(signCode);
|
||||
public ResidentSignApplyVo detail(String bookingNo) {
|
||||
return residentSignApplyMapper.detail(bookingNo);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -158,8 +158,8 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService
|
||||
* @Param [bookingNo]
|
||||
**/
|
||||
@Override
|
||||
public void cancel(String signCode) {
|
||||
ResidentSignApplyVo residentSignApplyVo = residentSignApplyMapper.detail(signCode);
|
||||
public void cancel(String bookingNo) {
|
||||
ResidentSignApplyVo residentSignApplyVo = residentSignApplyMapper.detail(bookingNo);
|
||||
if (residentSignApplyVo == null) {
|
||||
throw new ServiceException("未查询到申请记录");
|
||||
}
|
||||
@ -174,7 +174,7 @@ public class ResidentSignApplyServiceImpl implements IResidentSignAppletService
|
||||
throw new ServiceException("已拒绝,不能取消");
|
||||
}
|
||||
}
|
||||
residentSignApplyMapper.cancel(signCode);
|
||||
residentSignApplyMapper.cancel(bookingNo);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -6,8 +6,9 @@
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xinelu.familydoctor.applet.pojo.entity.ResidentRescindApplyEntity">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="rescindCode" column="rescind_code" jdbcType="VARCHAR"/>
|
||||
<result property="applyNo" column="apply_no" jdbcType="VARCHAR"/>
|
||||
<result property="patientId" column="patient_id" jdbcType="VARCHAR"/>
|
||||
<result property="signNo" column="sign_no" jdbcType="VARCHAR"/>
|
||||
<result property="identity" column="identity" jdbcType="VARCHAR"/>
|
||||
<result property="orgNo" column="org_no" jdbcType="VARCHAR"/>
|
||||
<result property="orgName" column="org_name" jdbcType="VARCHAR"/>
|
||||
@ -26,14 +27,14 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,rescind_code,patient_id,identity,
|
||||
id,apply_no,patient_id,sign_no,identity,
|
||||
org_no,org_name,team_no,
|
||||
team_name,user_no,user_name,
|
||||
apply_time,booking_status,cancel_time,rescind_type,rescind_reason,
|
||||
approval_status,refuse_reason,approval_time
|
||||
</sql>
|
||||
<sql id="Base_Column_List_fd">
|
||||
p.id,p.rescind_code,p.patient_id,p.identity,
|
||||
p.id,p.apply_no,p.patient_id,sign_no,p.identity,
|
||||
p.org_no,p.org_name,p.team_no,
|
||||
p.team_name,p.user_no,p.user_name,
|
||||
p.apply_time,booking_status,cancel_time,p.rescind_type,p.rescind_reason,
|
||||
@ -42,11 +43,11 @@
|
||||
|
||||
<!-- 取消解约申请 -->
|
||||
<update id="cancel">
|
||||
update resident_rescind_apply set booking_status = '1', cancel_time = now() where rescind_code = #{rescindCode}
|
||||
update resident_rescind_apply set booking_status = '1', cancel_time = now() where apply_no = #{applyNo}
|
||||
</update>
|
||||
|
||||
<select id="findByBody" resultType="com.xinelu.familydoctor.applet.pojo.vo.ResidentRescindApplyVo">
|
||||
select <include refid="Base_Column_List_fd"></include>,b.patient_name,b.address,b.phone
|
||||
select <include refid="Base_Column_List_fd"></include>,b.patient_name as residentName,b.address,b.phone
|
||||
from resident_rescind_apply p
|
||||
left join patient_info b on p.identity = b.card_no
|
||||
where 1=1
|
||||
@ -54,7 +55,7 @@
|
||||
and p.identity = #{identity}
|
||||
</if>
|
||||
<if test="residentName != null and residentName != ''">
|
||||
and b.resident_name like concat(#{residentName},'%')
|
||||
and b.patient_name like concat(#{residentName},'%')
|
||||
</if>
|
||||
<if test="orgNo != null and orgNo != ''">
|
||||
and p.org_no = #{orgNo}
|
||||
@ -83,21 +84,26 @@
|
||||
<if test="address != null and address != ''">
|
||||
and b.address like concat('%', #{address},'%')
|
||||
</if>
|
||||
<if test="dataScope != null and dataScope != ''">
|
||||
${dataScope}
|
||||
</if>
|
||||
order by p.apply_time desc
|
||||
</select>
|
||||
|
||||
<!-- 解约申请详情 -->
|
||||
<select id="detail" resultType="com.xinelu.familydoctor.applet.pojo.vo.ResidentRescindApplyVo">
|
||||
select <include refid="Base_Column_List"></include> from resident_rescind_apply where rescind_code = #{rescindCode} limit 1
|
||||
select <include refid="Base_Column_List"></include> from resident_rescind_apply where apply_no = #{applyNo} limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insert">
|
||||
insert into resident_rescind_apply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="rescindCode != null">rescind_code,
|
||||
<if test="applyNo != null">apply_no,
|
||||
</if>
|
||||
<if test="patientId != null and patientId != ''">patient_id,
|
||||
</if>
|
||||
<if test="signNo != null and signNo != ''">sign_no,
|
||||
</if>
|
||||
<if test="identity != null and identity != ''">identity,
|
||||
</if>
|
||||
<if test="orgNo != null and orgNo != ''">org_no,
|
||||
@ -130,10 +136,12 @@
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="rescindCode != null">#{rescindCode},
|
||||
<if test="applyNo != null">#{applyNo},
|
||||
</if>
|
||||
<if test="patientId != null and patientId != ''">#{patientId},
|
||||
</if>
|
||||
<if test="signNo != null and signNo != ''">#{signNo},
|
||||
</if>
|
||||
<if test="identity != null and identity != ''">#{identity},
|
||||
</if>
|
||||
<if test="orgNo != null and orgNo != ''">#{orgNo},
|
||||
@ -173,6 +181,8 @@
|
||||
<if test="patientId != null and patientId != ''">patient_id =
|
||||
#{patientId},
|
||||
</if>
|
||||
<if test="signNo != null and signNo != ''">sign_no = #{signNo}
|
||||
</if>
|
||||
<if test="identity != null and identity != ''">identity =
|
||||
#{identity},
|
||||
</if>
|
||||
@ -219,7 +229,7 @@
|
||||
#{approvalTime},
|
||||
</if>
|
||||
</trim>
|
||||
where rescind_code = #{rescindCode}
|
||||
where apply_no = #{applyNo}
|
||||
</update>
|
||||
|
||||
<update id="updateEx">
|
||||
@ -233,6 +243,6 @@
|
||||
</if>
|
||||
approval_time = now()
|
||||
</set>
|
||||
where rescind_code = #{rescindCode};
|
||||
where apply_no = #{applyNo};
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.xinelu.familydoctor.applet.pojo.entity.ResidentSignApplyEntity">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="signCode" column="sign_code" jdbcType="VARCHAR"/>
|
||||
<result property="bookingNo" column="booking_no" jdbcType="VARCHAR"/>
|
||||
<result property="patientId" column="patient_id" jdbcType="VARCHAR"/>
|
||||
<result property="residentName" column="resident_name" jdbcType="VARCHAR"/>
|
||||
<result property="gender" column="gender" jdbcType="VARCHAR"/>
|
||||
@ -51,7 +51,7 @@
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id
|
||||
,sign_code,patient_id,
|
||||
,booking_no,patient_id,
|
||||
resident_name,gender,birthday,
|
||||
nation,identity,phone,
|
||||
province,province_name,city,
|
||||
@ -68,7 +68,7 @@
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_fd">
|
||||
p.id,p.sign_code,p.patient_id,
|
||||
p.id,p.booking_no,p.patient_id,
|
||||
p.resident_name,p.gender,p.birthday,
|
||||
p.nation,p.identity,p.phone,
|
||||
p.province,p.province_name,p.city,
|
||||
@ -88,7 +88,7 @@
|
||||
<insert id="insert">
|
||||
insert into resident_sign_apply
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="signCode != null and signCode != ''">sign_code,
|
||||
<if test="bookingNo != null and bookingNo != ''">booking_no,
|
||||
</if>
|
||||
<if test="patientId != null and patientId != ''">patient_id,
|
||||
</if>
|
||||
@ -175,7 +175,7 @@
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="signCode != null and signCode != ''">#{signCode},
|
||||
<if test="bookingNo != null and bookingNo != ''">#{bookingNo},
|
||||
</if>
|
||||
<if test="patientId != null and patientId != ''">#{patientId},
|
||||
</if>
|
||||
@ -268,13 +268,12 @@
|
||||
update resident_sign_apply
|
||||
set booking_status = '1',
|
||||
cancel_time = now()
|
||||
where sign_code = #{signCode}
|
||||
where booking_no = #{bookingNo}
|
||||
</update>
|
||||
|
||||
<select id="findByBody" resultType="com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo">
|
||||
select <include refid="Base_Column_List_fd"></include>,b.patient_name,b.address,b.phone
|
||||
select <include refid="Base_Column_List_fd"></include>
|
||||
from resident_sign_apply p
|
||||
left join patient_info b on p.identity = b.card_no
|
||||
where 1=1
|
||||
<if test="identity != null and identity != ''">
|
||||
and p.identity = #{identity}
|
||||
@ -319,6 +318,9 @@
|
||||
<otherwise></otherwise>
|
||||
</choose>
|
||||
</if>
|
||||
<if test="dataScope != null and dataScope != ''">
|
||||
${dataScope}
|
||||
</if>
|
||||
order by p.apply_time desc
|
||||
</select>
|
||||
|
||||
@ -330,7 +332,7 @@
|
||||
|
||||
<!-- 签约申请详情 -->
|
||||
<select id="detail" resultType="com.xinelu.familydoctor.applet.pojo.vo.ResidentSignApplyVo">
|
||||
select <include refid="Base_Column_List"></include> from resident_sign_apply where sign_code = #{signCode}
|
||||
select <include refid="Base_Column_List"></include> from resident_sign_apply where booking_no = #{bookingNo}
|
||||
</select>
|
||||
|
||||
<update id="updateEx">
|
||||
@ -344,7 +346,7 @@
|
||||
</if>
|
||||
approval_time = now()
|
||||
</set>
|
||||
where sign_code = #{signCode};
|
||||
where booking_no = #{applyNo};
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user