diff --git a/pom.xml b/pom.xml index 0b6c308bd..e785e6689 100644 --- a/pom.xml +++ b/pom.xml @@ -17,7 +17,7 @@ yudao-module-infra yudao-module-tblist yudao-module-applyregistration - ultrasonicCom + yudao-module-ultrasoniccom diff --git a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/controller/admin/applyform/ApplyformController.java b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/controller/admin/applyform/ApplyformController.java index 6f8ef40f3..6affab1be 100644 --- a/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/controller/admin/applyform/ApplyformController.java +++ b/yudao-module-applyregistration/yudao-module-applyregistration-biz/src/main/java/cn/iocoder/yudao/module/applyregistration/controller/admin/applyform/ApplyformController.java @@ -177,7 +177,7 @@ public class ApplyformController { @Operation(summary = "批量分检更新") @Parameter(name = "id", description = "机构ID", required = true, example = "1024") @PreAuthorize("@ss.hasPermission('applyregistration:applyform:update')") - public CommonResult batchupdateFJApplyform( @RequestBody List deviceVOList) { + public CommonResult batchupdateFJApplyform(@RequestBody List deviceVOList) { if (!deviceVOList.isEmpty()) { diff --git a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java index 2f22f4fb9..b7fc273cb 100644 --- a/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java +++ b/yudao-module-infra/yudao-module-infra-biz/src/main/java/cn/iocoder/yudao/module/infra/framework/security/config/SecurityConfiguration.java @@ -39,6 +39,7 @@ public class SecurityConfiguration { .antMatchers(adminSeverContextPath + "/**").anonymous(); // 文件读取 registry.antMatchers(buildAdminApi("/infra/file/*/get/**")).permitAll(); + } }; diff --git a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistRespVO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistRespVO.java index 7d7d1fb79..6b6612116 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistRespVO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/controller/admin/patientexamlist/vo/PatientexamlistRespVO.java @@ -1,5 +1,6 @@ package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo; +import com.baomidou.mybatisplus.annotation.TableField; import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; @@ -106,4 +107,16 @@ public class PatientexamlistRespVO { @Schema(description = "框架需要:创建时间") private LocalDateTime createTime; + @Schema(description = "检查项目代码") + private String examItemCode; + + @Schema(description = "登记单号") + private String regId; + + @Schema(description = "影像设备名称") + private String deviceName; + + @Schema(description = "阴性阳性标记:0 为阴性, 1为阳性") + private String diagFlag; + } \ 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/dataobject/patientexamlist/PatientexamlistDO.java b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java index d30be4dc1..166ddb14e 100644 --- a/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java +++ b/yudao-module-tblist/yudao-module-tblist-biz/src/main/java/cn/iocoder/yudao/module/tblist/dal/dataobject/patientexamlist/PatientexamlistDO.java @@ -146,4 +146,15 @@ public class PatientexamlistDO extends BaseDO { @TableField(value = "thumbnailImgUrl") private String thumbnailImgUrl; + @TableField(value = "examItemCode") + private String examItemCode; + + @TableField(value = "regId") + private String regId; + + @TableField(value = "deviceName") + private String deviceName; + + @TableField(value = "diagFlag") + private String diagFlag; } \ No newline at end of file diff --git a/ultrasonicCom/pom.xml b/yudao-module-ultrasoniccom/pom.xml similarity index 80% rename from ultrasonicCom/pom.xml rename to yudao-module-ultrasoniccom/pom.xml index 2dca3e831..064f0eedb 100644 --- a/ultrasonicCom/pom.xml +++ b/yudao-module-ultrasoniccom/pom.xml @@ -8,7 +8,7 @@ yudao ${revision} - ultrasonicCom + yudao-module-ultrasoniccom pom ${project.artifactId} @@ -17,8 +17,8 @@ demo 模块,主要实现 XXX、YYY、ZZZ 等功能。 - ultrasonic-api - ultrasonic-biz + yudao-module-ultrasoniccom-api + yudao-module-ultrasoniccom-biz diff --git a/ultrasonicCom/ultrasonic-api/pom.xml b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-api/pom.xml similarity index 89% rename from ultrasonicCom/ultrasonic-api/pom.xml rename to yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-api/pom.xml index bac88d46b..b52322f8d 100644 --- a/ultrasonicCom/ultrasonic-api/pom.xml +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-api/pom.xml @@ -4,11 +4,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> cn.iocoder.boot - ultrasonicCom + yudao-module-ultrasoniccom ${revision} 4.0.0 - ultrasonicCom-api + yudao-module-ultrasoniccom-api jar ${project.artifactId} diff --git a/ultrasonicCom/ultrasonic-biz/pom.xml b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/pom.xml similarity index 88% rename from ultrasonicCom/ultrasonic-biz/pom.xml rename to yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/pom.xml index b2f1691ef..19e9714da 100644 --- a/ultrasonicCom/ultrasonic-biz/pom.xml +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/pom.xml @@ -4,11 +4,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> cn.iocoder.boot - ultrasonicCom + yudao-module-ultrasoniccom ${revision} 4.0.0 - ultrasonicCom-biz + yudao-module-ultrasoniccom-biz jar ${project.artifactId} @@ -20,7 +20,12 @@ cn.iocoder.boot - ultrasonicCom-api + yudao-module-applyregistration-biz + ${revision} + + + cn.iocoder.boot + yudao-module-ultrasoniccom-api ${revision} @@ -120,6 +125,11 @@ com.xingyuv spring-boot-starter-captcha-plus + + cn.iocoder.boot + yudao-spring-boot-starter-excel + 2.1.0-jdk8-snapshot + diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/Tree.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/Tree.java new file mode 100644 index 000000000..f975d544b --- /dev/null +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/Tree.java @@ -0,0 +1,25 @@ +package cn.iocoder.yudao.module.ultrasoniccom.controller.admin.ultrasonic; + +import lombok.Data; + +import java.util.List; + +@Data +public class Tree { + + public String id; + public String cname; + public String pid; + public String tempname; + public String examDescription; + public String diagResults; + public List children; +// public Tree(String id, String cname, String pid,String tempname,String examDescription,String diagResults) { +// this.id = id; +// this.pid = pid; +// this.cname = cname; +// this.tempname = tempname; +// this.examDescription = examDescription; +// this.diagResults = diagResults; +// } +} diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/ultrasonicController.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/ultrasonicController.java new file mode 100644 index 000000000..f116e175f --- /dev/null +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/controller/admin/ultrasonic/ultrasonicController.java @@ -0,0 +1,128 @@ +package cn.iocoder.yudao.module.ultrasoniccom.controller.admin.ultrasonic; + +import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicDO; +import cn.iocoder.yudao.module.ultrasoniccom.service.ultrasonic.ultrasonicService; +import cn.iocoder.yudao.framework.common.pojo.CommonResult; +import cn.iocoder.yudao.framework.datapermission.core.annotation.DataPermission; +import cn.iocoder.yudao.module.applyregistration.controller.admin.applyform.ApplyformController; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.node.ObjectNode; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import javax.annotation.Resource; +import java.nio.charset.StandardCharsets; +import java.util.*; +import java.util.stream.Collectors; + +import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; +@Tag(name = "管理后台 - 超声科组件") +@RestController +@RequestMapping("/ultrasoniccom/ultrasonic") +@Validated +public class ultrasonicController { + + private static final Logger log = LoggerFactory.getLogger(ApplyformController.class); + @Resource + private ultrasonicService ultrasonicService; + + + @GetMapping("/reporttemplatetlist") + @Operation(summary = "获取模版表数据") + @DataPermission(enable = false) + @PreAuthorize("@ss.hasPermission('ultrasoniccom:ultrasonic:create')") + public CommonResult> getreporttemplatelist(@RequestParam("orgID") String orgID,@RequestParam("type") String type,@RequestParam("isprivate") String isprivate) throws Exception { + List devicelist = ultrasonicService.getreporttemplate(); + List filteredList=new ArrayList<>(); + + if (!orgID.isEmpty()) + { + filteredList = devicelist.stream() + .filter(ultrasonicDO -> (ultrasonicDO.getOrgId().equals(orgID))) + .collect(Collectors.toList()); + } + if(filteredList.isEmpty()) + { + filteredList=devicelist; + } + if (!type.isEmpty()&&!type.equals("undefined")) + { + // 筛选条件: + filteredList = filteredList.stream() + .filter(ultrasonicDO -> (ultrasonicDO.getTemplateType().equals(type))) + .collect(Collectors.toList()); + } + if(isprivate.equals("1")) + { + // 筛选条件: + filteredList = filteredList.stream() + .filter(ultrasonicDO -> (ultrasonicDO.getPrivateDoctorId()!=null)) + .collect(Collectors.toList()); + } + + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(filteredList); + + List tree = convertJsonToTree(json); + + return success(tree); + } + + + //返回树结构 + private List convertJsonToTree(String jsonData) { + List> dataList; + try { + ObjectMapper objectMapper = new ObjectMapper(); + dataList = objectMapper.readValue(jsonData, List.class); + } catch (JsonProcessingException e) { + e.printStackTrace(); + return new ArrayList<>(); + } + + Map treeMap = new HashMap<>(); + + for (Map data : dataList) { + String pid = (String) data.get("pid"); + String id = (String) data.get("id"); + + Tree tree = new Tree(); + tree.id = id; + tree.cname = (String) data.get("examPart"); + tree.pid = pid; + tree.tempname = (String) data.get("templateName"); + tree.examDescription = (String) data.get("examDescription"); + tree.diagResults = (String) data.get("diagResults"); + + treeMap.put(id, tree); + if (pid != null && treeMap.containsKey(pid)) { + Tree parent = treeMap.get(pid); + if (parent.children == null) { + parent.children = new ArrayList<>(); // 初始化 parent.children 列表 + } + parent.children.add(tree); + } + } + + List treeList = new ArrayList<>(); + for (Tree tree : treeMap.values()) { + if ("0".equals(tree.pid)) { + treeList.add(tree); + } + } + + return treeList; + } + + +} diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/ultrasonicDO.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/ultrasonicDO.java new file mode 100644 index 000000000..3eabd3bfb --- /dev/null +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/ultrasonicDO.java @@ -0,0 +1,108 @@ +package cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.*; + +import java.time.LocalDateTime; + +@TableName("tb_reporttemplate") +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ultrasonicDO { + + @TableId(type = IdType.INPUT) + private String ID; + + /** + * 下拉框:体检模板,住院模板,门诊模板 + */ + @TableField("templateType") + private String templateType; + + + /** + * 检查部位代码 + */ + @TableField("examPartCode") + private String examPartCode; + /** + * 检查部位名称 + */ + @TableField("examPart") + private String examPart; + /** + * 模板名称 + */ + @TableField("templateName") + private String templateName; + /** + * 检查所见 + */ + @TableField("examDescription") + private String examDescription; + + /** + * 诊断结论 + */ + @TableField("diagResults") + private String diagResults; + + /** + * 机构ID + */ + @TableField("orgId") + private String orgId; + + /** + * 创建人 + */ + @TableField("createPerson") + private String createPerson; + + + /** + * 创建时间 + */ + @JsonIgnore + @TableField("createDate") + private LocalDateTime createDate; + + /** + * 删除标记:1为删除,NULL或者0 为未删除 + */ + @TableField("isdelete") + private String isdelete; + + + /** + * 删除时间 + */ + @JsonIgnore + @TableField("deleteDate") + private LocalDateTime deleteDate; + + /** + * + */ + @TableField("deletePerson") + private String deletePerson; + + /** + *私有模板的归属医生ID + */ + @TableField("privateDoctorId") + private String privateDoctorId; + + /** + *父id + */ + @TableField("pid") + private String pid; +} diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/ultrasonicMapper.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/ultrasonicMapper.java new file mode 100644 index 000000000..bf200bca8 --- /dev/null +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/dal/ultrasonic/ultrasonicMapper.java @@ -0,0 +1,14 @@ +package cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic; + +import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; +import com.baomidou.mybatisplus.annotation.InterceptorIgnore; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +@InterceptorIgnore(tenantLine = "true") +@Mapper +public interface ultrasonicMapper extends BaseMapperX { + + List getreporttemplist(); +} diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicService.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicService.java new file mode 100644 index 000000000..33f1231fd --- /dev/null +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicService.java @@ -0,0 +1,17 @@ +package cn.iocoder.yudao.module.ultrasoniccom.service.ultrasonic; + +import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicDO; + +import java.util.List; + + +public interface ultrasonicService { + + + /** + * 获得模版表数据 + * + * @return 申请登记记录 + */ + List getreporttemplate(); +} diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicServiceImpl.java b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicServiceImpl.java new file mode 100644 index 000000000..03f69d950 --- /dev/null +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/java/cn/iocoder/yudao/module/ultrasoniccom/service/ultrasonic/ultrasonicServiceImpl.java @@ -0,0 +1,22 @@ +package cn.iocoder.yudao.module.ultrasoniccom.service.ultrasonic; + +import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicDO; +import cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicMapper; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + +import javax.annotation.Resource; +import java.util.List; + +@Service +@Validated +public class ultrasonicServiceImpl implements ultrasonicService{ + + @Resource + private ultrasonicMapper ultrasonicMapper; + + @Override + public List getreporttemplate() { + return ultrasonicMapper.getreporttemplist(); + } +} diff --git a/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/resources/mapper/ultrasonic/ultrasonicMapper.xml b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/resources/mapper/ultrasonic/ultrasonicMapper.xml new file mode 100644 index 000000000..fd27f06d6 --- /dev/null +++ b/yudao-module-ultrasoniccom/yudao-module-ultrasoniccom-biz/src/main/resources/mapper/ultrasonic/ultrasonicMapper.xml @@ -0,0 +1,14 @@ + + + + + + + \ No newline at end of file diff --git a/yudao-server/pom.xml b/yudao-server/pom.xml index b276e8f11..06e89b1d0 100644 --- a/yudao-server/pom.xml +++ b/yudao-server/pom.xml @@ -23,7 +23,7 @@ cn.iocoder.boot - ultrasonicCom-biz + yudao-module-ultrasoniccom-biz ${revision}