完善超声模块相关内容
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
Some checks failed
Java CI with Maven / build (11) (push) Has been cancelled
Java CI with Maven / build (17) (push) Has been cancelled
Java CI with Maven / build (8) (push) Has been cancelled
yudao-ui-admin CI / build (14.x) (push) Has been cancelled
yudao-ui-admin CI / build (16.x) (push) Has been cancelled
This commit is contained in:
parent
c633781c14
commit
7e59d751dc
2
pom.xml
2
pom.xml
@ -17,7 +17,7 @@
|
||||
<module>yudao-module-infra</module>
|
||||
<module>yudao-module-tblist</module>
|
||||
<module>yudao-module-applyregistration</module>
|
||||
<module>ultrasonicCom</module>
|
||||
<module>yudao-module-ultrasoniccom</module>
|
||||
<!-- <module>yudao-module-member</module>-->
|
||||
<!-- <module>yudao-module-bpm</module>-->
|
||||
<!-- <module>yudao-module-report</module>-->
|
||||
|
@ -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<Boolean> batchupdateFJApplyform( @RequestBody List<deviceupVO> deviceVOList) {
|
||||
public CommonResult<Boolean> batchupdateFJApplyform(@RequestBody List<deviceupVO> deviceVOList) {
|
||||
|
||||
if (!deviceVOList.isEmpty())
|
||||
{
|
||||
|
@ -39,6 +39,7 @@ public class SecurityConfiguration {
|
||||
.antMatchers(adminSeverContextPath + "/**").anonymous();
|
||||
// 文件读取
|
||||
registry.antMatchers(buildAdminApi("/infra/file/*/get/**")).permitAll();
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
@ -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;
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
@ -8,7 +8,7 @@
|
||||
<artifactId>yudao</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<artifactId>ultrasonicCom</artifactId>
|
||||
<artifactId>yudao-module-ultrasoniccom</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
@ -17,8 +17,8 @@
|
||||
demo 模块,主要实现 XXX、YYY、ZZZ 等功能。
|
||||
</description>
|
||||
<modules>
|
||||
<module>ultrasonic-api</module>
|
||||
<module>ultrasonic-biz</module>
|
||||
<module>yudao-module-ultrasoniccom-api</module>
|
||||
<module>yudao-module-ultrasoniccom-biz</module>
|
||||
</modules>
|
||||
|
||||
|
@ -4,11 +4,11 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>ultrasonicCom</artifactId>
|
||||
<artifactId>yudao-module-ultrasoniccom</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>ultrasonicCom-api</artifactId>
|
||||
<artifactId>yudao-module-ultrasoniccom-api</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
@ -4,11 +4,11 @@
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>ultrasonicCom</artifactId>
|
||||
<artifactId>yudao-module-ultrasoniccom</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>ultrasonicCom-biz</artifactId>
|
||||
<artifactId>yudao-module-ultrasoniccom-biz</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>${project.artifactId}</name>
|
||||
@ -20,7 +20,12 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>ultrasonicCom-api</artifactId>
|
||||
<artifactId>yudao-module-applyregistration-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-module-ultrasoniccom-api</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
@ -120,6 +125,11 @@
|
||||
<groupId>com.xingyuv</groupId>
|
||||
<artifactId>spring-boot-starter-captcha-plus</artifactId> <!-- 验证码,一般用于登录使用 -->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>yudao-spring-boot-starter-excel</artifactId>
|
||||
<version>2.1.0-jdk8-snapshot</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -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<Tree> 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;
|
||||
// }
|
||||
}
|
@ -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<List<Tree>> getreporttemplatelist(@RequestParam("orgID") String orgID,@RequestParam("type") String type,@RequestParam("isprivate") String isprivate) throws Exception {
|
||||
List<ultrasonicDO> devicelist = ultrasonicService.getreporttemplate();
|
||||
List<ultrasonicDO> 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> tree = convertJsonToTree(json);
|
||||
|
||||
return success(tree);
|
||||
}
|
||||
|
||||
|
||||
//返回树结构
|
||||
private List<Tree> convertJsonToTree(String jsonData) {
|
||||
List<Map<String, Object>> dataList;
|
||||
try {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
dataList = objectMapper.readValue(jsonData, List.class);
|
||||
} catch (JsonProcessingException e) {
|
||||
e.printStackTrace();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
Map<String, Tree> treeMap = new HashMap<>();
|
||||
|
||||
for (Map<String, Object> 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<Tree> treeList = new ArrayList<>();
|
||||
for (Tree tree : treeMap.values()) {
|
||||
if ("0".equals(tree.pid)) {
|
||||
treeList.add(tree);
|
||||
}
|
||||
}
|
||||
|
||||
return treeList;
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
@ -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<ultrasonicDO> {
|
||||
|
||||
List<ultrasonicDO> getreporttemplist();
|
||||
}
|
@ -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<ultrasonicDO> getreporttemplate();
|
||||
}
|
@ -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<ultrasonicDO> getreporttemplate() {
|
||||
return ultrasonicMapper.getreporttemplist();
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicMapper">
|
||||
|
||||
<!--
|
||||
一般情况下,尽可能使用 Mapper 进行 CRUD 增删改查即可。
|
||||
无法满足的场景,例如说多表关联查询,才使用 XML 编写 SQL。
|
||||
代码生成器暂时只生成 Mapper XML 文件本身,更多推荐 MybatisX 快速开发插件来生成查询。
|
||||
文档可见:https://www.iocoder.cn/MyBatis/x-plugins/
|
||||
-->
|
||||
<select id="getreporttemplist" resultType="cn.iocoder.yudao.module.ultrasoniccom.dal.ultrasonic.ultrasonicDO">
|
||||
select * from tb_reporttemplate where isdelete!='1' OR isdelete IS NULL
|
||||
</select>
|
||||
</mapper>
|
@ -23,7 +23,7 @@
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.iocoder.boot</groupId>
|
||||
<artifactId>ultrasonicCom-biz</artifactId>
|
||||
<artifactId>yudao-module-ultrasoniccom-biz</artifactId>
|
||||
<version>${revision}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
Loading…
Reference in New Issue
Block a user