阳性统计
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
82957576d2
commit
0e2a385d1b
@ -83,7 +83,7 @@ public class PatientexamlistController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建PACS检查列表")
|
||||
// @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:create')")
|
||||
// @PreAuthorize("@ss.hasPermission('tblist:patientexamlist:create')")
|
||||
@LogRecord(type = "检查列表", subType = "创建", bizNo = "9999", success = "创建ID为{{#createReqVO.getId}}的患者")
|
||||
public CommonResult<String> createPatientexamlist(@Valid @RequestBody PatientexamlistSaveReqVO createReqVO) {
|
||||
return success(patientexamlistService.createPatientexamlist(createReqVO));
|
||||
@ -131,18 +131,16 @@ public class PatientexamlistController {
|
||||
|
||||
@GetMapping("/getplexamiddata")
|
||||
@Operation(summary = "根据examid获得PACS检查列表数据")
|
||||
public CommonResult<PatientexamlistRespVO> getkeyexamidPatientexamlist(@RequestParam("examid") String examid,@RequestParam("orgSN") String orgSN) {
|
||||
OrgUnitDO orgUnitDO= Service.getSnonekey(orgSN);
|
||||
if(orgUnitDO==null)
|
||||
{
|
||||
public CommonResult<PatientexamlistRespVO> getkeyexamidPatientexamlist(@RequestParam("examid") String examid, @RequestParam("orgSN") String orgSN) {
|
||||
OrgUnitDO orgUnitDO = Service.getSnonekey(orgSN);
|
||||
if (orgUnitDO == null) {
|
||||
return success(null);
|
||||
}
|
||||
PatientexamlistDO patientexamlist = patientexamlistService.getkeyexamidPatientexamlist(examid,orgUnitDO.getOrgID());
|
||||
PatientexamlistDO patientexamlist = patientexamlistService.getkeyexamidPatientexamlist(examid, orgUnitDO.getOrgID());
|
||||
return success(BeanUtils.toBean(patientexamlist, PatientexamlistRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得PACS检查列表分页")
|
||||
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
|
||||
@ -214,6 +212,15 @@ public class PatientexamlistController {
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/positiveStatistics")
|
||||
@Operation(summary = "阳性统计")
|
||||
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
|
||||
public CommonResult<List<Map<String, Object>>> getPositiveStatistics(@Valid PositiveStatisticsReqVO reqVO) {
|
||||
List<Map<String, Object>> result = patientexamlistService.getPositiveStatistics(reqVO);
|
||||
return success(result);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/dicomDataSync")
|
||||
@Operation(summary = "dicom数据同步")
|
||||
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
|
||||
@ -373,16 +380,17 @@ public class PatientexamlistController {
|
||||
patientexamlistService.updatePatientexamlist(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/Updatetblistwarning")
|
||||
@Operation(summary = "更新tblist危急值状态")
|
||||
public CommonResult<Boolean> Updatetblistwarning(@RequestParam("id") String id, @RequestParam("type") String type)
|
||||
{
|
||||
PatientexamlistDO patientexamlistDO=new PatientexamlistDO();
|
||||
public CommonResult<Boolean> Updatetblistwarning(@RequestParam("id") String id, @RequestParam("type") String type) {
|
||||
PatientexamlistDO patientexamlistDO = new PatientexamlistDO();
|
||||
patientexamlistDO.setId(id);
|
||||
patientexamlistDO.setWarning(type);
|
||||
patientexamlistMapper.updateById(patientexamlistDO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/GetAnalysisInfo")
|
||||
@Operation(summary = "获取报告信息")
|
||||
public CommonResult<String> GetAnalysisInfo(@RequestParam(value = "examId", required = false) String examId, @RequestParam("regId") String regId, @RequestParam("orgId") String orgId) {
|
||||
@ -503,7 +511,7 @@ public class PatientexamlistController {
|
||||
}
|
||||
}
|
||||
//获取配置项地址
|
||||
ConfigDO config= configService.getConfigByKey("url.ftpurl");
|
||||
ConfigDO config = configService.getConfigByKey("url.ftpurl");
|
||||
//上传成功
|
||||
//当前时间
|
||||
LocalDateTime dateTime = LocalDateTime.parse(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
||||
@ -511,7 +519,7 @@ public class PatientexamlistController {
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
PatientexamlistSaveReqVO updateReqVO = new PatientexamlistSaveReqVO();
|
||||
updateReqVO.setId(insimagescreenshotVO.getID());
|
||||
updateReqVO.setPdfurl(config.getValue()+"/" + insimagescreenshotVO.getID() + "/" + fileName);//https://pacs.gw12320.com/video https://114.55.171.231:48082
|
||||
updateReqVO.setPdfurl(config.getValue() + "/" + insimagescreenshotVO.getID() + "/" + fileName);//https://pacs.gw12320.com/video https://114.55.171.231:48082
|
||||
patientexamlistService.updatePatientexamlist(updateReqVO);
|
||||
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
package cn.iocoder.yudao.module.tblist.controller.admin.patientexamlist.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - PositiveStatisticsReqVO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class PositiveStatisticsReqVO {
|
||||
@Schema(description = "医生诊断开始日期:年月日时分秒")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime doctorDiagTime_ge;
|
||||
|
||||
@Schema(description = "医生诊断结束日期:年月日时分秒")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime doctorDiagTime_le;
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package cn.iocoder.yudao.module.tblist.controller.admin.positivestatistics;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
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 cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import cn.iocoder.yudao.module.tblist.controller.admin.positivestatistics.vo.*;
|
||||
import cn.iocoder.yudao.module.tblist.dal.dataobject.positivestatistics.PositivestatisticsDO;
|
||||
import cn.iocoder.yudao.module.tblist.service.positivestatistics.PositivestatisticsService;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.*;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
@Tag(name = "管理后台 - 阳性统计字典")
|
||||
@RestController
|
||||
@RequestMapping("/tblist/positivestatistics")
|
||||
@Validated
|
||||
public class PositivestatisticsController {
|
||||
|
||||
@Resource
|
||||
private PositivestatisticsService positivestatisticsService;
|
||||
@Resource
|
||||
private AdminUserService userService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建阳性统计字典")
|
||||
@PreAuthorize("@ss.hasPermission('tblist:positivestatistics:create')")
|
||||
public CommonResult<String> createPositivestatistics(@Valid @RequestBody PositivestatisticsSaveReqVO createReqVO) {
|
||||
createReqVO.setDiseaseName(createReqVO.getDiseaseName() == null ? "" : createReqVO.getDiseaseName().trim());
|
||||
createReqVO.setKeyWord(createReqVO.getKeyWord() == null ? "" : createReqVO.getKeyWord().trim());
|
||||
//当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
|
||||
if (positivestatisticsService.validatePositivestatisticsExists(user.getOrgId(), createReqVO.getDiseaseName())) {
|
||||
return success("-200");
|
||||
} else {
|
||||
return success(positivestatisticsService.createPositivestatistics(createReqVO));
|
||||
}
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新阳性统计字典")
|
||||
@PreAuthorize("@ss.hasPermission('tblist:positivestatistics:update')")
|
||||
public CommonResult<String> updatePositivestatistics(@Valid @RequestBody PositivestatisticsSaveReqVO updateReqVO) {
|
||||
updateReqVO.setDiseaseName(updateReqVO.getDiseaseName() == null ? "" : updateReqVO.getDiseaseName().trim());
|
||||
updateReqVO.setKeyWord(updateReqVO.getKeyWord() == null ? "" : updateReqVO.getKeyWord().trim());
|
||||
|
||||
PositivestatisticsDO positivestatistics = positivestatisticsService.getPositivestatistics(updateReqVO.getId());
|
||||
if (positivestatistics != null)
|
||||
positivestatistics.setDiseaseName(positivestatistics.getDiseaseName() == null ? "" : positivestatistics.getDiseaseName().trim());
|
||||
|
||||
if (positivestatistics == null ||
|
||||
(!positivestatistics.getDiseaseName().equals(updateReqVO.getDiseaseName()) &&
|
||||
positivestatisticsService.validatePositivestatisticsExists(updateReqVO.getOrgId(), updateReqVO.getDiseaseName()))) {
|
||||
return success("-200");
|
||||
} else {
|
||||
positivestatisticsService.updatePositivestatistics(updateReqVO);
|
||||
return success("");
|
||||
}
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除阳性统计字典")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('tblist:positivestatistics:delete')")
|
||||
public CommonResult<Boolean> deletePositivestatistics(@RequestParam("id") String id) {
|
||||
positivestatisticsService.deletePositivestatistics(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得阳性统计字典")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('tblist:positivestatistics:query')")
|
||||
public CommonResult<PositivestatisticsDO> getPositivestatistics(@RequestParam("id") String id) {
|
||||
PositivestatisticsDO positivestatistics = positivestatisticsService.getPositivestatistics(id);
|
||||
return success(positivestatistics);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得阳性统计字典分页")
|
||||
@PreAuthorize("@ss.hasPermission('tblist:positivestatistics:query')")
|
||||
public CommonResult<PageResult<PositivestatisticsDO>> getPositivestatisticsPage(@Valid PositivestatisticsPageReqVO pageReqVO) {
|
||||
PageResult<PositivestatisticsDO> pageResult = positivestatisticsService.getPositivestatisticsPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.tblist.controller.admin.positivestatistics.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(description = "管理后台 - 阳性统计字典分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PositivestatisticsPageReqVO extends PageParam {
|
||||
|
||||
/*******在用参数******/
|
||||
@Schema(description = "疾病名称", example = "芋艿")
|
||||
private String diseaseName;
|
||||
|
||||
@Schema(description = "关键词")
|
||||
private String keyWord;
|
||||
|
||||
@Schema(description = "机构ID", example = "23439")
|
||||
private String orgId;
|
||||
|
||||
/*******备选参数******/
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package cn.iocoder.yudao.module.tblist.controller.admin.positivestatistics.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 阳性统计字典新增/修改 Request VO")
|
||||
@Data
|
||||
public class PositivestatisticsSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", example = "375")
|
||||
private String id;
|
||||
|
||||
@Schema(description = "机构ID", example = "23439")
|
||||
private String orgId;
|
||||
|
||||
@Schema(description = "疾病名称", example = "芋艿")
|
||||
private String diseaseName;
|
||||
|
||||
@Schema(description = "关键词")
|
||||
private String keyWord;
|
||||
|
||||
}
|
@ -2,6 +2,7 @@ package cn.iocoder.yudao.module.tblist.dal.dataobject.ecganalysisparas;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
@ -9,6 +10,7 @@ import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
|
||||
@ -24,12 +26,12 @@ import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class EcganalysisparasDO {
|
||||
public class EcganalysisparasDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.INPUT)
|
||||
@TableId(value = "ID", type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 机构ID
|
||||
@ -152,7 +154,7 @@ public class EcganalysisparasDO {
|
||||
@TableField("DepartName")
|
||||
private String departName;
|
||||
/**
|
||||
* 是否删除: 1 为删除
|
||||
* 是否删除: 1 为删除
|
||||
*/
|
||||
@TableField("isDelete")
|
||||
private String isDelete;
|
||||
|
@ -0,0 +1,62 @@
|
||||
package cn.iocoder.yudao.module.tblist.dal.dataobject.positivestatistics;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
/**
|
||||
* 阳性统计字典 DO
|
||||
*
|
||||
* @author 李传洋
|
||||
*/
|
||||
@TableName("tb_positivestatistics")
|
||||
@KeySequence("tb_positivestatistics_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class PositivestatisticsDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "ID", type = IdType.INPUT)
|
||||
private String id;
|
||||
/**
|
||||
* 机构ID
|
||||
*/
|
||||
@TableField("orgId")
|
||||
private String orgId;
|
||||
/**
|
||||
* 疾病名称
|
||||
*/
|
||||
@TableField("diseaseName")
|
||||
private String diseaseName;
|
||||
/**
|
||||
* 关键词
|
||||
*/
|
||||
@TableField("keyWord")
|
||||
private String keyWord;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@TableField("createDate")
|
||||
private LocalDateTime createDate;
|
||||
/**
|
||||
* 删除标记:1为删除
|
||||
*/
|
||||
@TableField("isDelete")
|
||||
private String isDelete;
|
||||
/**
|
||||
* 删除操作人
|
||||
*/
|
||||
@TableField("deletePerson")
|
||||
private String deletePerson;
|
||||
/**
|
||||
* 删除时间
|
||||
*/
|
||||
@TableField("deleteDate")
|
||||
private LocalDateTime deleteDate;
|
||||
}
|
@ -1,5 +1,7 @@
|
||||
package cn.iocoder.yudao.module.tblist.dal.mysql.ecganalysisparas;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
@ -9,6 +11,8 @@ import cn.iocoder.yudao.module.tblist.dal.dataobject.ecganalysisparas.Ecganalysi
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import cn.iocoder.yudao.module.tblist.controller.admin.ecganalysisparas.vo.*;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 心电分析数据 Mapper
|
||||
@ -55,4 +59,33 @@ public interface EcganalysisparasMapper extends BaseMapperX<EcganalysisparasDO>
|
||||
.orderByDesc(EcganalysisparasDO::getId));
|
||||
}
|
||||
|
||||
default List<Map<String, Object>> selectList_positive(String orgId, LocalDateTime doctorDiagTimeStart, LocalDateTime doctorDiagTimeEnd, String[] keyWords) {
|
||||
if (orgId != null && !orgId.isEmpty() && keyWords != null && keyWords.length > 0) {
|
||||
//sql
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append(" SELECT t1.doctorDiagResult,t2.* ").append(System.lineSeparator());
|
||||
sql.append(" FROM tb_ecganalysisparas t1 ").append(System.lineSeparator());
|
||||
sql.append(" LEFT JOIN tb_patientexamlist t2 ON t1.regId=t2.regId AND t1.examId=t2.examId ").append(System.lineSeparator());
|
||||
sql.append(" WHERE 1=1 ").append(System.lineSeparator());
|
||||
sql.append(" AND t1.orgId='" + orgId.trim() + "' ").append(System.lineSeparator());
|
||||
if (doctorDiagTimeStart != null)
|
||||
sql.append(" AND t1.doctorDiagTime>=str_to_date('" + doctorDiagTimeStart.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 00:00:00','%Y-%m-%d %H:%i:%S') ").append(System.lineSeparator());
|
||||
if (doctorDiagTimeEnd != null)
|
||||
sql.append(" AND t1.doctorDiagTime<=DATE_ADD(str_to_date('" + doctorDiagTimeEnd.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")) + " 00:00:00','%Y-%m-%d %H:%i:%S'),INTERVAL 1 DAY) ").append(System.lineSeparator());
|
||||
//keyWords
|
||||
String[] doctorDiagResult_LIKE = Arrays.stream(keyWords).map(s -> ("t1.doctorDiagResult LIKE '%" + s + "%'")).toArray(String[]::new);
|
||||
sql.append(" AND (" + String.join(" or ", doctorDiagResult_LIKE) + ") ").append(System.lineSeparator());
|
||||
sql.append(" ORDER BY t2.regId,t2.examId,t1.doctorDiagTime ASC ").append(System.lineSeparator());
|
||||
return use_selectList(sql.toString());
|
||||
} else
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
//私有通用
|
||||
@Select(" ${sql} ")
|
||||
Map<String, Object> use_selectObject(@Param("sql") String sql);
|
||||
|
||||
@Select(" ${sql} ")
|
||||
List<Map<String, Object>> use_selectList(@Param("sql") String sql);
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package cn.iocoder.yudao.module.tblist.dal.mysql.positivestatistics;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
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.controller.admin.positivestatistics.vo.PositivestatisticsPageReqVO;
|
||||
import cn.iocoder.yudao.module.tblist.dal.dataobject.positivestatistics.PositivestatisticsDO;
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
/**
|
||||
* 阳性统计字典 Mapper
|
||||
*
|
||||
* @author 李传洋
|
||||
*/
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
@Mapper
|
||||
public interface PositivestatisticsMapper extends BaseMapperX<PositivestatisticsDO> {
|
||||
|
||||
default PageResult<PositivestatisticsDO> selectPage(PositivestatisticsPageReqVO reqVO) {
|
||||
return selectPage(reqVO, new LambdaQueryWrapperX<PositivestatisticsDO>()
|
||||
.neIfPresent(PositivestatisticsDO::getIsDelete, '1')
|
||||
.eqIfPresent(PositivestatisticsDO::getOrgId, reqVO.getOrgId())
|
||||
.likeIfPresent(PositivestatisticsDO::getDiseaseName, reqVO.getDiseaseName())
|
||||
.likeIfPresent(PositivestatisticsDO::getKeyWord, reqVO.getKeyWord())
|
||||
.orderByAsc(PositivestatisticsDO::getDiseaseName));
|
||||
}
|
||||
|
||||
default List<PositivestatisticsDO> selectbyDiseaseName(String orgId, String diseaseName) {
|
||||
return selectList(new LambdaQueryWrapperX<PositivestatisticsDO>()
|
||||
.neIfPresent(PositivestatisticsDO::getIsDelete, '1')
|
||||
.eqIfPresent(PositivestatisticsDO::getOrgId, orgId)
|
||||
.eqIfPresent(PositivestatisticsDO::getDiseaseName, diseaseName)
|
||||
.orderByAsc(PositivestatisticsDO::getDiseaseName));
|
||||
}
|
||||
|
||||
@Select(" SELECT t1.* FROM tb_positivestatistics t1 WHERE t1.isDelete!='1' and t1.orgId=#{orgId} ")
|
||||
List<Map<String, Object>> selectList_usable(@Param("orgId") String orgId);
|
||||
}
|
@ -55,9 +55,10 @@ public interface PatientexamlistService extends IService<PatientexamlistDO> {
|
||||
PatientexamlistDO getPatientexamlist(String id);
|
||||
|
||||
/*
|
||||
* 根据Examid查询表数据
|
||||
* */
|
||||
PatientexamlistDO getkeyexamidPatientexamlist(String examid,String orgid);
|
||||
* 根据Examid查询表数据
|
||||
* */
|
||||
PatientexamlistDO getkeyexamidPatientexamlist(String examid, String orgid);
|
||||
|
||||
/**
|
||||
* 获得PACS检查列表分页
|
||||
*
|
||||
@ -82,6 +83,15 @@ public interface PatientexamlistService extends IService<PatientexamlistDO> {
|
||||
*/
|
||||
PageResult<PatientexamlistDO> getReportPrintStatisticsPage(ReportPrintPageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 阳性统计
|
||||
*
|
||||
* @param reqVO 查询条件
|
||||
* @return List<Map < String, Object>>
|
||||
*/
|
||||
List<Map<String, Object>> getPositiveStatistics(PositiveStatisticsReqVO reqVO);
|
||||
|
||||
|
||||
/**
|
||||
* 同步dicom数据至tb_patientexamlist
|
||||
*
|
||||
|
@ -5,6 +5,8 @@ import cn.iocoder.yudao.module.system.dal.dataobject.dicomworklist.*;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import cn.iocoder.yudao.module.system.dal.mysql.dicomworklist.DicomworklistMapper;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import cn.iocoder.yudao.module.tblist.dal.mysql.ecganalysisparas.EcganalysisparasMapper;
|
||||
import cn.iocoder.yudao.module.tblist.dal.mysql.positivestatistics.PositivestatisticsMapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -43,6 +45,12 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
||||
@Resource
|
||||
private DicomworklistMapper dicomworklistMapper;
|
||||
|
||||
@Resource
|
||||
private PositivestatisticsMapper positivestatisticsMapper;
|
||||
|
||||
@Resource
|
||||
private EcganalysisparasMapper ecganalysisparasMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserService userService;
|
||||
|
||||
@ -128,6 +136,35 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
||||
return patientexamlistMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> getPositiveStatistics(PositiveStatisticsReqVO reqVO) {
|
||||
//当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
|
||||
String[] keyWords = null;
|
||||
List<Map<String, Object>> patients_positive = null;
|
||||
List<Map<String, Object>> positivestatisticsDict = positivestatisticsMapper.selectList_usable(user.getOrgId());
|
||||
if (positivestatisticsDict != null && positivestatisticsDict.size() > 0) {
|
||||
for (Map<String, Object> dict : positivestatisticsDict) {
|
||||
keyWords = null;
|
||||
if (dict.get("keyWord") != null && dict.get("keyWord").toString().trim().length() > 0)
|
||||
keyWords = dict.get("keyWord").toString().trim().split(",");
|
||||
patients_positive = ecganalysisparasMapper.selectList_positive(user.getOrgId(), reqVO.getDoctorDiagTime_ge(), reqVO.getDoctorDiagTime_le(), keyWords);
|
||||
if (patients_positive != null && patients_positive.size() > 0) {
|
||||
dict.put("items_count", patients_positive.size());
|
||||
dict.put("items", patients_positive);
|
||||
} else {
|
||||
dict.put("items_count", 0);
|
||||
dict.put("items", null);
|
||||
}
|
||||
}
|
||||
positivestatisticsDict.sort(Comparator.comparing(item -> Integer.parseInt(item.get("items_count").toString().trim()), Comparator.reverseOrder()));
|
||||
return positivestatisticsDict;
|
||||
} else
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<String> dicomDataSync() {
|
||||
|
||||
|
@ -0,0 +1,57 @@
|
||||
package cn.iocoder.yudao.module.tblist.service.positivestatistics;
|
||||
|
||||
import cn.iocoder.yudao.module.tblist.controller.admin.positivestatistics.vo.*;
|
||||
import cn.iocoder.yudao.module.tblist.dal.dataobject.positivestatistics.PositivestatisticsDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
import java.util.*;
|
||||
import javax.validation.*;
|
||||
|
||||
/**
|
||||
* 阳性统计字典 Service 接口
|
||||
*
|
||||
* @author 李传洋
|
||||
*/
|
||||
public interface PositivestatisticsService {
|
||||
|
||||
/**
|
||||
* 创建阳性统计字典
|
||||
*
|
||||
* @param createReqVO 创建信息
|
||||
* @return 编号
|
||||
*/
|
||||
String createPositivestatistics(@Valid PositivestatisticsSaveReqVO createReqVO);
|
||||
|
||||
/**
|
||||
* 更新阳性统计字典
|
||||
*
|
||||
* @param updateReqVO 更新信息
|
||||
*/
|
||||
void updatePositivestatistics(@Valid PositivestatisticsSaveReqVO updateReqVO);
|
||||
|
||||
/**
|
||||
* 删除阳性统计字典
|
||||
*
|
||||
* @param id 编号
|
||||
*/
|
||||
void deletePositivestatistics(String id);
|
||||
|
||||
/**
|
||||
* 获得阳性统计字典
|
||||
*
|
||||
* @param id 编号
|
||||
* @return 阳性统计字典
|
||||
*/
|
||||
PositivestatisticsDO getPositivestatistics(String id);
|
||||
|
||||
/**
|
||||
* 获得阳性统计字典分页
|
||||
*
|
||||
* @param pageReqVO 分页查询
|
||||
* @return 阳性统计字典分页
|
||||
*/
|
||||
PageResult<PositivestatisticsDO> getPositivestatisticsPage(PositivestatisticsPageReqVO pageReqVO);
|
||||
|
||||
boolean validatePositivestatisticsExists(String orgId, String diseaseName);
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package cn.iocoder.yudao.module.tblist.service.positivestatistics;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
||||
import cn.iocoder.yudao.module.system.service.user.AdminUserService;
|
||||
import cn.iocoder.yudao.module.tblist.controller.admin.positivestatistics.vo.*;
|
||||
import cn.iocoder.yudao.module.tblist.dal.dataobject.positivestatistics.PositivestatisticsDO;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.tblist.dal.mysql.positivestatistics.PositivestatisticsMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
/**
|
||||
* 阳性统计字典 Service 实现类
|
||||
*
|
||||
* @author 李传洋
|
||||
*/
|
||||
@Service
|
||||
@Validated
|
||||
public class PositivestatisticsServiceImpl implements PositivestatisticsService {
|
||||
|
||||
@Resource
|
||||
private PositivestatisticsMapper positivestatisticsMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserService userService;
|
||||
|
||||
@Override
|
||||
public String createPositivestatistics(PositivestatisticsSaveReqVO createReqVO) {
|
||||
//当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
//当前时间
|
||||
LocalDateTime dateTime = LocalDateTime.parse(
|
||||
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
|
||||
);
|
||||
//生成UUID
|
||||
UUID guid = UUID.randomUUID();
|
||||
//VO转DO
|
||||
PositivestatisticsDO positivestatistics = BeanUtils.toBean(createReqVO, PositivestatisticsDO.class);
|
||||
|
||||
positivestatistics.setId(guid.toString());
|
||||
positivestatistics.setOrgId(user.getOrgId());
|
||||
positivestatistics.setCreateDate(dateTime);
|
||||
positivestatistics.setIsDelete("0");
|
||||
|
||||
positivestatisticsMapper.insert(positivestatistics);
|
||||
return positivestatistics.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePositivestatistics(PositivestatisticsSaveReqVO updateReqVO) {
|
||||
// 校验存在
|
||||
validatePositivestatisticsExists(updateReqVO.getId());
|
||||
PositivestatisticsDO tempDO = getPositivestatistics(updateReqVO.getId());
|
||||
|
||||
//VO转DO
|
||||
PositivestatisticsDO updateObj = BeanUtils.toBean(updateReqVO, PositivestatisticsDO.class);
|
||||
|
||||
if (tempDO != null && updateObj != null) {
|
||||
updateObj.setCreateDate(tempDO.getCreateDate());
|
||||
updateObj.setIsDelete(tempDO.getIsDelete());
|
||||
}
|
||||
|
||||
positivestatisticsMapper.updateById(updateObj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deletePositivestatistics(String id) {
|
||||
// 校验存在
|
||||
validatePositivestatisticsExists(id);
|
||||
//当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
//当前时间
|
||||
LocalDateTime dateTime = LocalDateTime.parse(
|
||||
LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")),
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
|
||||
);
|
||||
PositivestatisticsDO tempDO = getPositivestatistics(id);
|
||||
|
||||
tempDO.setDeleteDate(dateTime);
|
||||
tempDO.setDeletePerson(user.getUsername());
|
||||
tempDO.setIsDelete("1");
|
||||
|
||||
positivestatisticsMapper.updateById(tempDO);
|
||||
}
|
||||
|
||||
private void validatePositivestatisticsExists(String id) {
|
||||
if (positivestatisticsMapper.selectById(id) == null) {
|
||||
throw exception(new ErrorCode(1, "ID为空"));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean validatePositivestatisticsExists(String orgId, String diseaseName) {
|
||||
List<PositivestatisticsDO> _temps = positivestatisticsMapper.selectbyDiseaseName(orgId, diseaseName);
|
||||
if (_temps != null && _temps.size() > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PositivestatisticsDO getPositivestatistics(String id) {
|
||||
return positivestatisticsMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<PositivestatisticsDO> getPositivestatisticsPage(PositivestatisticsPageReqVO pageReqVO) {
|
||||
//当前登陆用户
|
||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||
|
||||
if (pageReqVO != null) {
|
||||
pageReqVO.setOrgId(user.getOrgId());
|
||||
}
|
||||
|
||||
return positivestatisticsMapper.selectPage(pageReqVO);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user