Merge remote-tracking branch 'origin/main'

This commit is contained in:
lxd 2025-03-04 09:50:32 +08:00
commit 6427c74cce
5 changed files with 28 additions and 0 deletions

View File

@ -53,6 +53,15 @@ public class CheckUpResultController {
return success(BeanUtils.toBean(list, InspectPatientitemsRespVO.class));
}
@GetMapping("/groupNameItemsOfMedicalSn")
@Operation(summary = "获得患者体检项目")
@Parameter(name = "id", description = "编号", required = true, example = "1024")
public CommonResult<List<InspectPatientitemsRespVO>> groupNameItemsOfMedicalSn(@RequestParam("medicalSn") String medicalSn) {
List<InspectPatientitemsDO> list = patientitemsService.groupNameItemsOfMedicalSn(medicalSn);
return success(BeanUtils.toBean(list, InspectPatientitemsRespVO.class));
}
@PutMapping("/updatePatient")
@Operation(summary = "更新患者汇总结果分析")
public CommonResult<Boolean> updatePatient(@Valid @RequestBody InspectPatientSaveReqVO updateReqVO) {

View File

@ -9,6 +9,7 @@ import cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatientitems.Inspec
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.inspect.controller.admin.inspectpatientitems.vo.*;
import org.apache.ibatis.annotations.Param;
/**
* 患者体检项目 Mapper
@ -38,4 +39,6 @@ public interface InspectPatientitemsMapper extends BaseMapperX<InspectPatientite
.orderByDesc(InspectPatientitemsDO::getId));
}
List<InspectPatientitemsDO> groupNameItems( @Param("medicalSn")String medicalSn );
}

View File

@ -74,5 +74,7 @@ public interface InspectPatientitemsService {
//患者是否存在未检或者待查
Boolean isExistUncheck(String medicalSn);
List<InspectPatientitemsDO> groupNameItemsOfMedicalSn( String medicalSn );
}

View File

@ -144,4 +144,9 @@ public class InspectPatientitemsServiceImpl implements InspectPatientitemsServic
return !list.isEmpty();
}
@Override
public List<InspectPatientitemsDO> groupNameItemsOfMedicalSn(String medicalSn) {
return patientitemsMapper.groupNameItems(medicalSn);
}
}

View File

@ -9,4 +9,13 @@
文档可见https://www.iocoder.cn/MyBatis/x-plugins/
-->
<select id="groupNameItems" resultType="cn.iocoder.yudao.module.inspect.dal.dataobject.inspectpatientitems.InspectPatientitemsDO" >
SELECT
*
FROM
( SELECT *, ROW_NUMBER() OVER ( PARTITION BY groupname ORDER BY ID ) AS rn FROM tb_patientitems WHERE medicalSn = #{medicalSn} AND positive = "1" ) AS subquery
WHERE
subquery.rn = 1
</select>
</mapper>