diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java index 2e9fd60a0..db4a2dbaf 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/PatientexamlistController.java @@ -26,11 +26,13 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.util.object.BeanUtils; + import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog; + import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*; import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId; @@ -60,7 +62,7 @@ public class PatientexamlistController { @PostMapping("/create") @Operation(summary = "创建PACS检查列表") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:create')") - @LogRecord(type = "检查列表", subType = "创建", bizNo ="{{#createReqVO.getId}}" , success = "创建ID为{{#createReqVO.getId}}的患者") + @LogRecord(type = "检查列表", subType = "创建", bizNo = "{{#createReqVO.getId}}", success = "创建ID为{{#createReqVO.getId}}的患者") public CommonResult createPatientexamlist(@Valid @RequestBody PatientexamlistSaveReqVO createReqVO) { return success(patientexamlistService.createPatientexamlist(createReqVO)); } @@ -73,6 +75,14 @@ public class PatientexamlistController { return success(true); } + @PutMapping("/updateExamItemName") + @Operation(summary = "更新ExamItemName") + @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')") + public CommonResult updateExamItemNameById(@RequestParam("id") String id, @RequestParam("examItemName") String examItemName) { + patientexamlistService.updateExamItemNameById(id, examItemName); + return success(true); + } + @DeleteMapping("/delete") @Operation(summary = "删除PACS检查列表") @Parameter(name = "id", description = "编号", required = true) @@ -98,28 +108,26 @@ public class PatientexamlistController { //获取当前登陆用户 AdminUserDO user = userService.getUser(getLoginUserId()); - pageReqVO.setOrgId(user.getOrgId()) ; + pageReqVO.setOrgId(user.getOrgId()); PageResult pageResult = patientexamlistService.getPatientexamlistPage(pageReqVO); - List doList=new ArrayList<>(); - String devicetype=pageReqVO.getDeviceType(); - if(devicetype!=null&&devicetype.contains("US"))//表示只查询超声的数据 + List doList = new ArrayList<>(); + String devicetype = pageReqVO.getDeviceType(); + if (devicetype != null && devicetype.contains("US"))//表示只查询超声的数据 { // 筛选条件: - doList = pageResult.getList().stream() + doList = pageResult.getList().stream() .filter(PatientexamlistDO -> (PatientexamlistDO.getDeviceType().contains("US"))) .collect(Collectors.toList()); - } - else if(devicetype!=null&&!devicetype.trim().isEmpty())//表示只查询影像的数据 + } else if (devicetype != null && !devicetype.trim().isEmpty())//表示只查询影像的数据 { // 筛选条件: - doList = pageResult.getList().stream() + doList = pageResult.getList().stream() .filter(PatientexamlistDO -> !(PatientexamlistDO.getDeviceType().contains("US"))) .collect(Collectors.toList()); - } - else //devicetype为空,查询全部数据 + } else //devicetype为空,查询全部数据 { - doList=pageResult.getList(); + doList = pageResult.getList(); } pageResult.setList(doList); @@ -150,6 +158,7 @@ public class PatientexamlistController { patientexamlistService.dicomDataSync(); return success(true); } + @GetMapping("/dicomDataRefresh") @Operation(summary = "dicomj检查后数据刷新") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')") @@ -165,12 +174,12 @@ public class PatientexamlistController { @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:export')") @ApiAccessLog(operateType = EXPORT) public void exportPatientexamlistExcel(@Valid PatientexamlistPageReqVO pageReqVO, - HttpServletResponse response) throws IOException { + HttpServletResponse response) throws IOException { pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); List list = patientexamlistService.getPatientexamlistPage(pageReqVO).getList(); // 导出 Excel ExcelUtils.write(response, "PACS检查列表.xls", "数据", PatientexamlistRespVO.class, - BeanUtils.toBean(list, PatientexamlistRespVO.class)); + BeanUtils.toBean(list, PatientexamlistRespVO.class)); } @@ -179,20 +188,19 @@ public class PatientexamlistController { @Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "orgId", description = "机构编号", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')") - @LogRecord(type = "检查列表", subType = "申请", bizNo ="{{#id}}" , success = "ID为{{#id}}的患者申请") - public void UPDATEHigOrg(@RequestParam("id") String id,@RequestParam("orgId") String orgId) { + @LogRecord(type = "检查列表", subType = "申请", bizNo = "{{#id}}", success = "ID为{{#id}}的患者申请") + public void UPDATEHigOrg(@RequestParam("id") String id, @RequestParam("orgId") String orgId) { //先拿orgid查询出来对应的org表的上级机构代码 - String hiorgid= OrgService.GetOrgHiORGId(orgId); - log.debug("查询出来对应的org表的上级机构代码"+hiorgid); - if (!hiorgid.isEmpty()) - { - PatientexamlistSaveReqVO updateReqVO=new PatientexamlistSaveReqVO(); + String hiorgid = OrgService.GetOrgHiORGId(orgId); + log.debug("查询出来对应的org表的上级机构代码" + hiorgid); + if (!hiorgid.isEmpty()) { + PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO(); updateReqVO.setId(id); updateReqVO.setHighLevelOrgId(hiorgid); updateReqVO.setReportstatus("已申请"); updateReqVO.setApplicationDate(LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), - DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); patientexamlistService.updatePatientexamlist(updateReqVO); } @@ -201,10 +209,10 @@ public class PatientexamlistController { @PutMapping("/examineupdate") @Operation(summary = "超声保存更新数据") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')") - @LogRecord(type = "超声保存", subType = "保存", bizNo ="{{#updateReqVO.getId}}" , success = "保存ID为{{#updateReqVO.getId}}的患者") + @LogRecord(type = "超声保存", subType = "保存", bizNo = "{{#updateReqVO.getId}}", success = "保存ID为{{#updateReqVO.getId}}的患者") public CommonResult updateexaminelist(@Valid @RequestBody PatientexamlistSaveReqVO updateReqVO) { - LocalDateTime dateTime= LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), + LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); updateReqVO.setDiagDate(dateTime); patientexamlistService.updatePatientexamlist(updateReqVO); @@ -214,18 +222,18 @@ public class PatientexamlistController { @GetMapping("/examine") @Operation(summary = "超声保存更新数据") @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:update')") - @LogRecord(type = "超声审核", subType = "审核", bizNo ="{{#updateReqVO.getId}}" , success = "审核ID为{{#id}}的患者") + @LogRecord(type = "超声审核", subType = "审核", bizNo = "{{#updateReqVO.getId}}", success = "审核ID为{{#id}}的患者") public CommonResult examine(@RequestParam("id") String id) { - LocalDateTime dateTime= LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), + LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); //获取当前登陆用户 AdminUserDO user = userService.getUser(getLoginUserId()); - PatientexamlistSaveReqVO updateReqVO=new PatientexamlistSaveReqVO(); + PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO(); updateReqVO.setId(id); updateReqVO.setReviewDoctorId(String.valueOf(user.getId())); updateReqVO.setReviewDoctor(user.getUsername()); - updateReqVO.setReviewDate(dateTime); + updateReqVO.setReviewDate(dateTime); updateReqVO.setReviewStatus("1"); updateReqVO.setReportstatus("已审核"); patientexamlistService.updatePatientexamlist(updateReqVO); @@ -233,6 +241,4 @@ public class PatientexamlistController { } - - } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java index 8bd2326fa..8c899378c 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/mysql/patientexamlist/PatientexamlistMapper.java @@ -6,10 +6,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.PatientexamlistDO; -import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.*; import cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo.*; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; /** * PACS检查列表 Mapper @@ -18,6 +16,9 @@ import org.apache.ibatis.annotations.Select; */ @Mapper public interface PatientexamlistMapper extends BaseMapperX { + //更新 + @Update(" UPDATE tb_patientexamlist t1 SET t1.examItemName=#{examItemName} WHERE t1.ID=#{id} ") + int updateExamItemNameById(@Param("id") String id, @Param("examItemName") String examItemName); //IllnessCasePageReqVO分页 default PageResult selectPage(IllnessCasePageReqVO reqVO) { diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java index ffbd6d580..76669545d 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistService.java @@ -77,10 +77,19 @@ public interface PatientexamlistService extends IService { * @return */ void dicomDataSync(); + + /** + * 更新examItemName + * + * @param + * @return + */ + void updateExamItemNameById(String id, String examItemName); + /** * 刷新dicom分检数据至tb_patientexamlist - * */ boolean dicomDataRefresh(String orgId); + boolean insertbatch(List doList); } \ No newline at end of file diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java index 0e39f3c88..eab08f3d3 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/service/patientexamlist/PatientexamlistServiceImpl.java @@ -35,7 +35,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti */ @Service @Validated -public class PatientexamlistServiceImpl extends ServiceImpl implements PatientexamlistService { +public class PatientexamlistServiceImpl extends ServiceImpl implements PatientexamlistService { @Resource private PatientexamlistMapper patientexamlistMapper; @@ -142,7 +142,7 @@ public class PatientexamlistServiceImpl extends ServiceImpl 0) { @@ -163,21 +163,24 @@ public class PatientexamlistServiceImpl extends ServiceImpl doList= patientexamlistMapper.GetSortingDataList(orgId); - boolean bol=false; - if(!doList.isEmpty()) - { //更新数据集合 - List aDo = new ArrayList<>(); - for (PatientexamlistDO patientexamlistDO:doList) - { - List dicomstudiesDOS= dicomworklistMapper.GetInstaDicomStudiesData(patientexamlistDO.getRegId(),patientexamlistDO.getExamId(),orgId); - if(!dicomstudiesDOS.isEmpty()) - { - String seim= dicomworklistMapper.GetSeDcByPatientIDAndStudyInsta(dicomstudiesDOS.get(0).getPatientID(),dicomstudiesDOS.get(0).getStudyInsta()); - PatientexamlistDO examdo=new PatientexamlistDO(); + List doList = patientexamlistMapper.GetSortingDataList(orgId); + boolean bol = false; + if (!doList.isEmpty()) { //更新数据集合 + List aDo = new ArrayList<>(); + for (PatientexamlistDO patientexamlistDO : doList) { + List dicomstudiesDOS = dicomworklistMapper.GetInstaDicomStudiesData(patientexamlistDO.getRegId(), patientexamlistDO.getExamId(), orgId); + if (!dicomstudiesDOS.isEmpty()) { + String seim = dicomworklistMapper.GetSeDcByPatientIDAndStudyInsta(dicomstudiesDOS.get(0).getPatientID(), dicomstudiesDOS.get(0).getStudyInsta()); + PatientexamlistDO examdo = new PatientexamlistDO(); examdo.setId(patientexamlistDO.getId()); examdo.setExamDate(formatLocalDateTime2(String.valueOf(dicomstudiesDOS.get(0).getAccessTime()))); examdo.setSeDc(seim); @@ -185,9 +188,8 @@ public class PatientexamlistServiceImpl extends ServiceImpl doList) { - boolean bol=false; - bol= patientexamlistMapper.insertBatch(doList); + boolean bol = false; + bol = patientexamlistMapper.insertBatch(doList); return bol; }