| | |
| | | prescriptionNumber = prescriptionNumber.substring(prescriptionNumber.length() - 6); |
| | | prescriptionNumber = String.format("%06d", Integer.parseInt(prescriptionNumber) + 1); |
| | | dto.setPrescriptionNumber(prescriptionNumber); |
| | | dto.setHospitalizationNumber(prescriptionNumber); |
| | | }else{ |
| | | dto.setPrescriptionNumber("000001"); |
| | | dto.setHospitalizationNumber("000001"); |
| | | } |
| | | dto.setInspectionType(1); |
| | | return R.ok(sysInspectionService.save(dto)); |
| | |
| | | @GetMapping(value = "/exportInspection") |
| | | public R<String> exportInspection(@RequestParam String id) { |
| | | TSysInspection sysInspection = sysInspectionService.getById(id); |
| | | if(StringUtils.hasLength(sysInspection.getDetectionPdf())){ |
| | | return R.ok(sysInspection.getDetectionPdf()); |
| | | } |
| | | // 查询诊所信息 |
| | | TCrmClinic crmClinic = crmClinicService.getById(sysInspection.getClinicId()); |
| | | if(Objects.isNull(crmClinic)){ |
| | |
| | | if(StringUtils.hasLength(sysInspection.getPastMedicalHistory())){ |
| | | fill(templateParam, "pastMedicalHistory", sysInspection.getPastMedicalHistory()); |
| | | } |
| | | // 个人史 |
| | | if(StringUtils.hasLength(sysInspection.getPersonalHistory())){ |
| | | fill(templateParam, "personalHistory", sysInspection.getPersonalHistory()); |
| | | } |
| | | // 月经史 |
| | | if(StringUtils.hasLength(sysInspection.getMenstrualHistory())){ |
| | | fill(templateParam, "menstrualHistory", sysInspection.getMenstrualHistory()); |
| | |
| | | // templateParam, |
| | | // "病历-样例-temp", |
| | | // "E:\\WXWork\\1688857451467088\\Cache\\File\\2026-01\\"); |
| | | sysInspection.setDetectionPdf(url); |
| | | sysInspectionService.updateById(sysInspection); |
| | | return R.ok(url); |
| | | } |
| | | |
| | |
| | | @GetMapping(value = "/exportPrescription") |
| | | public R<String> exportPrescription(@RequestParam String id) { |
| | | TSysInspection sysInspection = sysInspectionService.getById(id); |
| | | if(StringUtils.hasLength(sysInspection.getPrescriptionPdf())){ |
| | | return R.ok(sysInspection.getPrescriptionPdf()); |
| | | } |
| | | // 查询诊所信息 |
| | | TCrmClinic crmClinic = crmClinicService.getById(sysInspection.getClinicId()); |
| | | if(Objects.isNull(crmClinic)){ |
| | |
| | | // templateParam, |
| | | // "处方单-"+sysInspection.getNickName(), |
| | | // "E:\\WXWork\\1688857451467088\\Cache\\File\\2026-01\\"); |
| | | sysInspection.setPrescriptionPdf(url); |
| | | sysInspectionService.updateById(sysInspection); |
| | | return R.ok(url); |
| | | } |
| | | |