增加体检机构
This commit is contained in:
parent
28c7cc3ba4
commit
fd4922540c
@ -42,14 +42,12 @@ public class InspectOrgController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建机构")
|
||||
@PreAuthorize("@ss.hasPermission('tb:inspect-org:create')")
|
||||
public CommonResult<Long> createInspectOrg(@Valid @RequestBody InspectOrgSaveReqVO createReqVO) {
|
||||
return success(inspectOrgService.createInspectOrg(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新机构")
|
||||
@PreAuthorize("@ss.hasPermission('tb:inspect-org:update')")
|
||||
public CommonResult<Boolean> updateInspectOrg(@Valid @RequestBody InspectOrgSaveReqVO updateReqVO) {
|
||||
inspectOrgService.updateInspectOrg(updateReqVO);
|
||||
return success(true);
|
||||
@ -58,7 +56,6 @@ public class InspectOrgController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除机构")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('tb:inspect-org:delete')")
|
||||
public CommonResult<Boolean> deleteInspectOrg(@RequestParam("id") Long id) {
|
||||
inspectOrgService.deleteInspectOrg(id);
|
||||
return success(true);
|
||||
@ -67,7 +64,6 @@ public class InspectOrgController {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得机构")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('tb:inspect-org:query')")
|
||||
public CommonResult<InspectOrgRespVO> getInspectOrg(@RequestParam("id") Long id) {
|
||||
InspectOrgDO inspectOrg = inspectOrgService.getInspectOrg(id);
|
||||
return success(BeanUtils.toBean(inspectOrg, InspectOrgRespVO.class));
|
||||
@ -75,14 +71,12 @@ public class InspectOrgController {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得机构分页")
|
||||
@PreAuthorize("@ss.hasPermission('tb:inspect-org:query')")
|
||||
public CommonResult<PageResult<InspectOrgRespVO>> getInspectOrgPage(@Valid InspectOrgPageReqVO pageReqVO) {
|
||||
PageResult<InspectOrgDO> pageResult = inspectOrgService.getInspectOrgPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, InspectOrgRespVO.class));
|
||||
}
|
||||
@GetMapping("/all")
|
||||
@Operation(summary = "获得所有机构信息")
|
||||
@PreAuthorize("@ss.hasPermission('tb:inspect-org:query')")
|
||||
public CommonResult<PageResult<InspectOrgRespVO>> getInspectOrgList(@Valid InspectOrgPageReqVO pageReqVO) {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
PageResult<InspectOrgDO> pageResult = inspectOrgService.getInspectOrgPage(pageReqVO);
|
||||
@ -91,7 +85,6 @@ public class InspectOrgController {
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出机构 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('tb:inspect-org:export')")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportInspectOrgExcel(@Valid InspectOrgPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
|
@ -1979,4 +1979,13 @@ public class InspectPatientController {
|
||||
patientService.updateBarcodeTime(medicalSn, barcodetime);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PutMapping("/updatePatientOrg")
|
||||
@Operation(summary = "根据体检编号更新患者归属医院")
|
||||
public CommonResult<Boolean> updatePatientOrg(@RequestParam("medicalSn") String medicalSn,
|
||||
@RequestParam("examhoscode") String examhoscode,
|
||||
@RequestParam("examhosname") String examhosname) {
|
||||
patientService.updatePatientOrg(medicalSn, examhoscode, examhosname);
|
||||
return success(true);
|
||||
}
|
||||
}
|
@ -70,4 +70,10 @@ public class InspectPatientInfoVO {
|
||||
|
||||
@Schema(description = "总检医生")
|
||||
private String chiefinspector;
|
||||
|
||||
@Schema(description = "体检医院编码")
|
||||
private String examhoscode;
|
||||
|
||||
@Schema(description = "体检医院名称")
|
||||
private String examhosname;
|
||||
}
|
||||
|
@ -145,4 +145,10 @@ public class InspectPatientPageReqVO extends PageParam {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ", timezone = "GMT+8")
|
||||
private LocalDateTime barcodetime;
|
||||
|
||||
@Schema(description = "体检医院编码")
|
||||
private String examhoscode;
|
||||
|
||||
@Schema(description = "体检医院名称")
|
||||
private String examhosname;
|
||||
|
||||
}
|
@ -155,4 +155,10 @@ public class InspectPatientRespVO {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss ", timezone = "GMT+8")
|
||||
private LocalDateTime barcodetime;
|
||||
|
||||
@Schema(description = "体检医院编码")
|
||||
private String examhoscode;
|
||||
|
||||
@Schema(description = "体检医院名称")
|
||||
private String examhosname;
|
||||
|
||||
}
|
@ -128,4 +128,10 @@ public class InspectPatientSaveReqVO {
|
||||
|
||||
@Schema(description = "报告地址")
|
||||
private String pdfurl;
|
||||
|
||||
@Schema(description = "体检医院编码")
|
||||
private String examhoscode;
|
||||
|
||||
@Schema(description = "体检医院名称")
|
||||
private String examhosname;
|
||||
}
|
@ -260,7 +260,15 @@ public class InspectPatientDO {
|
||||
*/
|
||||
@TableField("pulflag")
|
||||
private String pulflag;
|
||||
|
||||
|
||||
/**
|
||||
* 体检医院编码
|
||||
*/
|
||||
@TableField("examhoscode")
|
||||
private String examhoscode;
|
||||
/**
|
||||
* 体检医院名称
|
||||
*/
|
||||
@TableField("examhosname")
|
||||
private String examhosname;
|
||||
|
||||
}
|
@ -58,6 +58,11 @@ public interface InspectPatientService {
|
||||
* */
|
||||
void isprintupdate(String medicalSn, Date printtime);
|
||||
|
||||
/*
|
||||
* 根据体检编号更新患者归属医院信息
|
||||
*/
|
||||
void updatePatientOrg(String medicalSn, String examhoscode, String examhosname);
|
||||
|
||||
/**
|
||||
* 删除患者信息
|
||||
*
|
||||
|
@ -138,6 +138,14 @@ public class InspectPatientServiceImpl implements InspectPatientService {
|
||||
patientMapper.update(null, updateWrapper);
|
||||
}
|
||||
@Override
|
||||
public void updatePatientOrg(String medicalSn, String examhoscode, String examhosname) {
|
||||
LambdaUpdateWrapper<InspectPatientDO> updateWrapper = new LambdaUpdateWrapper<>();
|
||||
updateWrapper.eq(InspectPatientDO::getMedicalSn, medicalSn)
|
||||
.set(InspectPatientDO::getExamhoscode, examhoscode)
|
||||
.set(InspectPatientDO::getExamhosname, examhosname);
|
||||
patientMapper.update(null, updateWrapper);
|
||||
}
|
||||
@Override
|
||||
public void deletePatient(Integer id) {
|
||||
// 校验存在
|
||||
validatePatientExists(id);
|
||||
|
Loading…
Reference in New Issue
Block a user