修改意向、撤销意向、修改签约。
This commit is contained in:
parent
0438ebe861
commit
7b2b6d4675
@ -11,6 +11,7 @@ import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto;
|
||||
import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientPortaitVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.IntentionalSignVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
||||
@ -63,6 +64,50 @@ public class SignPatientRecordController extends BaseController {
|
||||
return flag > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 查询意向签约
|
||||
* @param id 签约记录表主键
|
||||
* @return 意向签约详情
|
||||
* @Author haown
|
||||
* @Date 2024-08-08 11:00
|
||||
*/
|
||||
@ApiOperation("查询意向签约")
|
||||
@PreAuthorize("@ss.hasPermi('manage:signRecord:list')")
|
||||
@PostMapping("/getIntentionalSign/{id}")
|
||||
public R<IntentionalSignVo> getIntentionalSign(@PathVariable("id") Long id) {
|
||||
return R.ok(signPatientRecordService.getIntentionalSign(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 修改意向签约
|
||||
* @param body 意向签约传输对象
|
||||
* @return 结果
|
||||
* @Author haown
|
||||
* @Date 2024-08-07 14:35
|
||||
*/
|
||||
@ApiOperation("修改意向签约")
|
||||
@PreAuthorize("@ss.hasPermi('manage:signRecord:edit')")
|
||||
@PostMapping("/updateIntentionalSign")
|
||||
public R<String> updateIntentionalSign(@Valid @RequestBody IntentionalSignDto body) {
|
||||
int flag = signPatientRecordService.updateIntentionalSign(body);
|
||||
return flag > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 撤销意向签约
|
||||
* @param patientId 患者主键
|
||||
* @return 结果
|
||||
* @Author haown
|
||||
* @Date 2024-08-07 14:34
|
||||
*/
|
||||
@ApiOperation("撤销意向签约")
|
||||
@PreAuthorize("@ss.hasPermi('manage:signRecord:add')")
|
||||
@GetMapping("/cancelIntentionalSign/{patientId}")
|
||||
public R<String> cancelIntentionalSign(@PathVariable("patientId") Long patientId) {
|
||||
int flag = signPatientRecordService.cancelIntentionalSign(patientId);
|
||||
return flag > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 签约
|
||||
*/
|
||||
@ -74,6 +119,17 @@ public class SignPatientRecordController extends BaseController {
|
||||
return flag > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改签约信息
|
||||
*/
|
||||
@ApiOperation("修改签约信息")
|
||||
@PreAuthorize("@ss.hasPermi('manage:signRecord:edit')")
|
||||
@PostMapping("/updateSign")
|
||||
public R<String> updateSign(@Valid @RequestBody SignPatientAddDto body) {
|
||||
int flag = signPatientRecordService.edit(body);
|
||||
return flag > 0 ? R.ok() : R.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据患者主键查询签约记录
|
||||
*/
|
||||
|
||||
@ -0,0 +1,44 @@
|
||||
package com.xinelu.manage.dto.signpatientrecord;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientinformed.SignPatientInformed;
|
||||
import com.xinelu.manage.domain.signpatientmanageroute.SignPatientManageRoute;
|
||||
import com.xinelu.manage.domain.signpatientpackagehardware.SignPatientPackageHardware;
|
||||
import com.xinelu.manage.dto.signpatientpackage.SignPatientPackageSaveDto;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.List;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 患者签约记录修改传输对象
|
||||
* @author: haown
|
||||
* @create: 2024-08-07 15:54
|
||||
**/
|
||||
@Data
|
||||
public class SignPatientUpdateDto {
|
||||
|
||||
private Long signPatientRecordId;
|
||||
|
||||
/**
|
||||
* 服务包
|
||||
*/
|
||||
@ApiModelProperty("服务包对象")
|
||||
private SignPatientPackageSaveDto signPackage;
|
||||
|
||||
/**
|
||||
* 管理路径
|
||||
*/
|
||||
@ApiModelProperty("管理路径")
|
||||
private SignPatientManageRoute route;
|
||||
|
||||
/**
|
||||
* 硬件设备
|
||||
*/
|
||||
@ApiModelProperty("硬件设备列表")
|
||||
private List<SignPatientPackageHardware> devices;
|
||||
|
||||
/**
|
||||
* 签约知情书
|
||||
*/
|
||||
@ApiModelProperty("签约知情书列表")
|
||||
private List<SignPatientInformed> informeds;
|
||||
}
|
||||
@ -2,6 +2,7 @@ package com.xinelu.manage.mapper.signpatientrecord;
|
||||
|
||||
import com.xinelu.manage.domain.signpatientrecord.SignPatientRecord;
|
||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
||||
import com.xinelu.manage.vo.signpatientrecord.IntentionalSignVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
||||
@ -33,4 +34,12 @@ public interface SignPatientRecordMapper {
|
||||
|
||||
List<SignPatientRecordVo> getByPatient(Long patientId);
|
||||
|
||||
/**
|
||||
* @description 查询意向签约
|
||||
* @param id 签约记录表主键
|
||||
* @return 意向签约详情
|
||||
* @Author haown
|
||||
* @Date 2024-08-08 11:00
|
||||
*/
|
||||
IntentionalSignVo getIntentionalSign(Long id);
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@ import com.xinelu.manage.dto.signpatientrecord.SignPatientAddDto;
|
||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientListDto;
|
||||
import com.xinelu.manage.dto.signpatientrecord.SignPatientStatusDto;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientPortaitVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.IntentionalSignVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
||||
@ -41,6 +42,13 @@ public interface ISignPatientRecordService {
|
||||
*/
|
||||
int add(SignPatientAddDto body);
|
||||
|
||||
/**
|
||||
* 修改签约信息
|
||||
* @param body 修改签约信息传输对象
|
||||
* @return 结果
|
||||
*/
|
||||
int edit(SignPatientAddDto body);
|
||||
|
||||
int updateSignStatus(SignPatientStatusDto patientCancelSignDto);
|
||||
|
||||
/**
|
||||
@ -50,6 +58,33 @@ public interface ISignPatientRecordService {
|
||||
*/
|
||||
int intentionalSign(IntentionalSignDto intentionalSignDto);
|
||||
|
||||
/**
|
||||
* @description 查询意向签约
|
||||
* @param id 签约记录表主键
|
||||
* @return 意向签约详情
|
||||
* @Author haown
|
||||
* @Date 2024-08-08 11:00
|
||||
*/
|
||||
IntentionalSignVo getIntentionalSign(Long id);
|
||||
|
||||
/**
|
||||
* @description 修改意向签约
|
||||
* @param intentionalSignDto 意向签约传输对象
|
||||
* @return 结果
|
||||
* @Author haown
|
||||
* @Date 2024-08-07 14:35
|
||||
*/
|
||||
int updateIntentionalSign(IntentionalSignDto intentionalSignDto);
|
||||
|
||||
/**
|
||||
* @description 撤销意向签约
|
||||
* @param patientId 患者主键
|
||||
* @return 结果
|
||||
* @Author haown
|
||||
* @Date 2024-08-07 11:16
|
||||
*/
|
||||
int cancelIntentionalSign(Long patientId);
|
||||
|
||||
PatientPortaitVo getPortaitInfo(Long patientId);
|
||||
/**
|
||||
* 画像审核
|
||||
|
||||
@ -33,6 +33,7 @@ import com.xinelu.manage.mapper.labelfieldcontent.LabelFieldContentMapper;
|
||||
import com.xinelu.manage.mapper.patientinfo.PatientInfoMapper;
|
||||
import com.xinelu.manage.mapper.patientnodeparamslcurrent.PatientNodeParamsCurrentMapper;
|
||||
import com.xinelu.manage.mapper.patientnodeparamslog.PatientNodeParamsLogMapper;
|
||||
import com.xinelu.manage.mapper.patientvisitrecord.PatientVisitRecordMapper;
|
||||
import com.xinelu.manage.mapper.signpatientinformed.SignPatientInformedMapper;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroute.SignPatientManageRouteMapper;
|
||||
import com.xinelu.manage.mapper.signpatientmanageroutenode.SignPatientManageRouteNodeMapper;
|
||||
@ -47,6 +48,7 @@ import com.xinelu.manage.service.signpatientrecord.ISignPatientRecordService;
|
||||
import com.xinelu.manage.vo.labelfieldcontent.LabelField;
|
||||
import com.xinelu.manage.vo.labelfieldcontent.LabelFieldInfoContentVo;
|
||||
import com.xinelu.manage.vo.patientinfo.PatientPortaitVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.IntentionalSignVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientInfoVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientListVo;
|
||||
import com.xinelu.manage.vo.signpatientrecord.SignPatientRecordVo;
|
||||
@ -55,6 +57,7 @@ import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.annotation.Resource;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
@ -106,6 +109,8 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
private LabelFieldContentMapper labelFieldContentMapper;
|
||||
@Resource
|
||||
private ILabelFieldContentService labelFieldContentService;
|
||||
@Resource
|
||||
private PatientVisitRecordMapper patientVisitRecordMapper;
|
||||
|
||||
@Override
|
||||
@DataScope(agencyAlias = "sign", deptAlias = "sign", userAlias = "sign.billing_doctor_id")
|
||||
@ -229,7 +234,98 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int edit(SignPatientAddDto body) {
|
||||
SignPatientPackageSaveDto signPatientPackageDto = body.getSignPackage();
|
||||
if (ObjectUtils.isEmpty(signPatientPackageDto) || signPatientPackageDto.getServicePackageId() == null) {
|
||||
throw new ServiceException("请选择服务包");
|
||||
}
|
||||
SignPatientRecord record = body.getRecord();
|
||||
if (record.getId() == null) {
|
||||
throw new ServiceException("数据传输错误");
|
||||
}
|
||||
SignPatientRecord signPatientRecord = signPatientRecordMapper.selectByPrimaryKey(record.getId());
|
||||
BeanUtils.copyBeanProp(signPatientRecord, record);
|
||||
// 修改签约记录表
|
||||
int flag = signPatientRecordMapper.updateByPrimaryKeySelective(signPatientRecord);
|
||||
if (flag > 0) {
|
||||
// 修改签约服务包信息
|
||||
SignPatientPackage signPatientPackage = new SignPatientPackage();
|
||||
// 服务开始时间、服务结束时间
|
||||
BeanUtils.copyBeanProp(signPatientPackage, signPatientPackageDto);
|
||||
signPatientPackage.setSignPatientRecordId(signPatientRecord.getId());
|
||||
signPatientPackage.setPatientId(signPatientRecord.getPatientId());
|
||||
signPatientPackage.setServiceStartTime(signPatientPackageDto.getServiceStartTime().atStartOfDay());
|
||||
signPatientPackage.setServiceEndTime(signPatientPackageDto.getServiceEndTime().atTime(23,59,59));
|
||||
signPatientPackage.setUpdateTime(LocalDateTime.now());
|
||||
signPatientPackage.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
signPatientPackageMapper.updateSignPatientPackage(signPatientPackage);
|
||||
|
||||
if (ObjectUtils.isEmpty(body.getRoute()) || body.getRoute().getRouteId() == null) {
|
||||
throw new ServiceException("请选择管理路径");
|
||||
}
|
||||
// 修改签约路径信息,判断签约路径是否修改,修改:删除未执行的任务、路径审核状态改为未审核,未修改:不做处理
|
||||
SignPatientManageRoute signRouteQuery = new SignPatientManageRoute();
|
||||
signRouteQuery.setSignPatientRecordId(record.getId());
|
||||
signRouteQuery.setTaskCreateType(TaskCreateTypeConstant.MANUAL_MATCHE);
|
||||
List<SignPatientManageRoute> signPatientManageRouteList = signPatientManageRouteMapper.selectSignPatientManageRouteList(signRouteQuery);
|
||||
if (!CollectionUtils.isEmpty(signPatientManageRouteList) && Objects.equals(signPatientManageRouteList.get(0).getRouteId(), body.getRoute().getRouteId())) {
|
||||
|
||||
} else {
|
||||
SignPatientManageRouteNodeDto signPatientManageRouteNodeDto = new SignPatientManageRouteNodeDto();
|
||||
signPatientManageRouteNodeDto.setManageRouteId(signPatientManageRouteList.get(0).getId());
|
||||
List<SignPatientManageRouteNode> nodeList = signPatientManageRouteNodeService.selectSignPatientManageRouteNodeList(signPatientManageRouteNodeDto);
|
||||
if (!CollectionUtils.isEmpty(nodeList)) {
|
||||
// 删除未执行的任务
|
||||
List<Long> ids = nodeList.stream()
|
||||
.filter(node -> !StringUtils.equals(NodeExecuteStatusEnum.EXECUTED.getInfo(), node.getNodeExecuteStatus()))
|
||||
.map(SignPatientManageRouteNode::getId).collect(Collectors.toList());
|
||||
signPatientManageRouteNodeService.deleteSignPatientManageRouteNodeByIds(ids.toArray(new Long[0]));
|
||||
|
||||
// 路径改为未审核
|
||||
signPatientRecord.setRouteCheckStatus(null);
|
||||
signPatientRecord.setRouteCheckDate(null);
|
||||
signPatientRecord.setRouteCheckPerson(null);
|
||||
signPatientRecord.setRouteCheckRemark(null);
|
||||
signPatientRecordMapper.updateByPrimaryKey(signPatientRecord);
|
||||
}
|
||||
}
|
||||
// 修改硬件
|
||||
if (!CollectionUtils.isEmpty(body.getDevices())) {
|
||||
SignPatientPackageHardware signPatientPackageHardware = new SignPatientPackageHardware();
|
||||
signPatientPackageHardware.setSignPatientRecordId(signPatientRecord.getId());
|
||||
List<SignPatientPackageHardware> hardwareList = hardwareMapper.selectSignPatientPackageHardwareList(signPatientPackageHardware);
|
||||
if (!CollectionUtils.isEmpty(hardwareList)) {
|
||||
List<Long> hardwareIds = hardwareList.stream().map(SignPatientPackageHardware::getId).collect(Collectors.toList());
|
||||
hardwareMapper.deleteSignPatientPackageHardwareByIds(hardwareIds.toArray(new Long[0]));
|
||||
}
|
||||
for(SignPatientPackageHardware hardware : body.getDevices()) {
|
||||
hardware.setSignPatientRecordId(signPatientRecord.getId());
|
||||
hardwareMapper.insertSignPatientPackageHardware(hardware);
|
||||
}
|
||||
}
|
||||
|
||||
// 修改告知书
|
||||
if (!CollectionUtils.isEmpty(body.getInformeds())) {
|
||||
SignPatientInformed signPatientInformed = new SignPatientInformed();
|
||||
signPatientInformed.setSignPatientRecordId(signPatientRecord.getId());
|
||||
List<SignPatientInformed> signPatientInformedList = informedMapper.selectSignPatientInformedList(signPatientInformed);
|
||||
if (!CollectionUtils.isEmpty(signPatientInformedList)) {
|
||||
List<Long> informedIds = signPatientInformedList.stream().map(SignPatientInformed::getId).collect(Collectors.toList());
|
||||
informedMapper.deleteSignPatientInformedByIds(informedIds.toArray(new Long[0]));
|
||||
}
|
||||
for (SignPatientInformed informed : body.getInformeds()) {
|
||||
informed.setSignPatientRecordId(signPatientRecord.getId());
|
||||
informed.setPatientId(signPatientRecord.getPatientId());
|
||||
informedMapper.insertSignPatientInformed(informed);
|
||||
}
|
||||
}
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateSignStatus(SignPatientStatusDto patientCancelSignDto) {
|
||||
if (patientCancelSignDto.getPatientId() == null) {
|
||||
@ -322,6 +418,63 @@ public class SignPatientRecordServiceImpl implements ISignPatientRecordService {
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override public IntentionalSignVo getIntentionalSign(Long id) {
|
||||
return signPatientRecordMapper.getIntentionalSign(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int updateIntentionalSign(IntentionalSignDto intentionalSignDto) {
|
||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(intentionalSignDto.getPatientId());
|
||||
if (ObjectUtils.isEmpty(patientInfo)) {
|
||||
throw new ServiceException("未找到该居民");
|
||||
}
|
||||
|
||||
patientInfo.setServiceStatus(SignRecordServiceStatusConstants.INTENTIONAL_SIGNING);
|
||||
SignPatientRecord signRecord = new SignPatientRecord();
|
||||
signRecord.setId(patientInfo.getSignPatientRecordId());
|
||||
// 患者信息保存到签约表
|
||||
signRecord.setBillingDoctorId(intentionalSignDto.getBillingDoctorId());
|
||||
signRecord.setBillingDoctorName(intentionalSignDto.getBillingDoctorName());
|
||||
signRecord.setIntentionalSource(intentionalSignDto.getIntentionalSource());
|
||||
signRecord.setUpdateBy(SecurityUtils.getLoginUser().getUser().getNickName());
|
||||
signRecord.setUpdateTime(LocalDateTime.now());
|
||||
signRecord.setId(signRecord.getId());
|
||||
int flag = signPatientRecordMapper.updateByPrimaryKeySelective(signRecord);
|
||||
if (flag > 0) {
|
||||
patientInfo.setSignPatientRecordId(signRecord.getId());
|
||||
patientInfoMapper.updatePatientInfoSelective(patientInfo);
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 撤销意向签约
|
||||
* @param patientId 患者主键
|
||||
* @return 结果
|
||||
* @Author haown
|
||||
* @Date 2024-08-07 11:16
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int cancelIntentionalSign(Long patientId) {
|
||||
PatientInfo patientInfo = patientInfoMapper.selectPatientInfoById(patientId);
|
||||
if (ObjectUtils.isEmpty(patientInfo)) {
|
||||
throw new ServiceException("未找到该居民");
|
||||
}
|
||||
patientInfo.setServiceStatus(null);
|
||||
// 删除签约记录
|
||||
signPatientRecordMapper.deleteByPrimaryKey(patientInfo.getSignPatientRecordId());
|
||||
// 患者信息表设置最新一条签约记录id
|
||||
List<SignPatientRecordVo> signPatientRecords = signPatientRecordMapper.getByPatient(patientId);
|
||||
if (CollectionUtils.isEmpty(signPatientRecords)) {
|
||||
patientInfo.setSignPatientRecordId(null);
|
||||
} else {
|
||||
patientInfo.setSignPatientRecordId(signPatientRecords.get(0).getId());
|
||||
}
|
||||
return patientInfoMapper.updatePatientInfo(patientInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务审核页面左侧画像信息
|
||||
* @param patientId 患者主键
|
||||
|
||||
@ -189,6 +189,11 @@ public class PatientInfoVo {
|
||||
*/
|
||||
private Integer routeNodeDay;
|
||||
|
||||
/**
|
||||
* 患者签约状态
|
||||
*/
|
||||
private String patientSignStatus;
|
||||
|
||||
/**
|
||||
* 任务执行时间
|
||||
*/
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
package com.xinelu.manage.vo.signpatientrecord;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description: 意向签约查询视图类
|
||||
* @author: haown
|
||||
* @create: 2024-08-08 11:01
|
||||
**/
|
||||
@Data
|
||||
public class IntentionalSignVo {
|
||||
|
||||
/**
|
||||
* 签约记录表主键
|
||||
*/
|
||||
@ApiModelProperty("签约记录表主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 患者主键
|
||||
*/
|
||||
@ApiModelProperty("患者主键")
|
||||
private Long patientId;
|
||||
|
||||
/**
|
||||
* 意向来源(意向签约,字典枚举)
|
||||
*/
|
||||
@ApiModelProperty(value = "意向来源(意向签约,字典枚举),DOCTOR_BILLING:医生开单")
|
||||
private String intentionalSource;
|
||||
|
||||
/**
|
||||
* 加入意向时间(意向签约)
|
||||
*/
|
||||
@ApiModelProperty(value = "加入意向时间(意向签约)")
|
||||
private LocalDateTime intentionalTime;
|
||||
|
||||
/**
|
||||
* 开单医生id(意向签约)
|
||||
*/
|
||||
@ApiModelProperty(value = "开单医生id(意向签约)")
|
||||
private Long billingDoctorId;
|
||||
|
||||
/**
|
||||
* 开单医生姓名(意向签约)
|
||||
*/
|
||||
@ApiModelProperty(value = "开单医生姓名(意向签约)")
|
||||
private String billingDoctorName;
|
||||
}
|
||||
@ -172,8 +172,14 @@
|
||||
<select id="getPatientList" parameterType="com.xinelu.manage.dto.patientinfo.PatientInfoDto"
|
||||
resultType="com.xinelu.manage.vo.patientinfo.PatientInfoVo">
|
||||
select p.*, count(p.manage_route_node_id) as taskNum, SUM(p.task_finish_status) as taskFinishNum, SUM(p.task_execute_status) as taskExecuteNum,
|
||||
ROUND(SUM(p.task_finish_status) / count(p.manage_route_node_id) * 100, 2) as taskFinishRate,
|
||||
ROUND(SUM(p.task_execute_status) / count(p.manage_route_node_id) * 100, 2) as taskExecuteRate
|
||||
case
|
||||
when count(p.manage_route_node_id) = 0 then 0
|
||||
else
|
||||
ROUND(SUM(p.task_finish_status) / count(p.manage_route_node_id) * 100, 2) end as taskFinishRate,
|
||||
case
|
||||
when count(p.manage_route_node_id) = 0 then 0
|
||||
else
|
||||
ROUND(SUM(p.task_execute_status) / count(p.manage_route_node_id) * 100, 2) end as taskExecuteRate
|
||||
from
|
||||
patient_task_view p
|
||||
<where>
|
||||
|
||||
@ -74,7 +74,7 @@
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from sign_patient_record
|
||||
update sign_patient_record set del_flag = 1
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</delete>
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.xinelu.manage.domain.signpatientrecord.SignPatientRecord" useGeneratedKeys="true">
|
||||
@ -518,4 +518,9 @@
|
||||
</where>
|
||||
order by sign.sign_time desc
|
||||
</select>
|
||||
|
||||
<select id="getIntentionalSign" parameterType="java.lang.Long" resultType="com.xinelu.manage.vo.signpatientrecord.IntentionalSignVo">
|
||||
select id, patient_id, intentional_source ,intentional_time, billing_doctor_id, billing_doctor_name
|
||||
from sign_patient_record where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user