诊断模板
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
Some checks are pending
Java CI with Maven / build (11) (push) Waiting to run
Java CI with Maven / build (17) (push) Waiting to run
Java CI with Maven / build (8) (push) Waiting to run
yudao-ui-admin CI / build (14.x) (push) Waiting to run
yudao-ui-admin CI / build (16.x) (push) Waiting to run
This commit is contained in:
parent
81f3d9f2ec
commit
a6fd0ef154
@ -42,6 +42,7 @@ import cn.iocoder.yudao.module.tblist.dal.dataobject.patientexamlist.Patientexam
|
|||||||
import cn.iocoder.yudao.module.tblist.service.patientexamlist.PatientexamlistService;
|
import cn.iocoder.yudao.module.tblist.service.patientexamlist.PatientexamlistService;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import javax.annotation.security.PermitAll;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
|
||||||
@ -173,6 +174,19 @@ public class PatientexamlistController {
|
|||||||
return success(_out);
|
return success(_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getCheckRecord")
|
||||||
|
@Operation(summary = "云胶片-getCheckRecord")
|
||||||
|
public CommonResult<Map<String, Object>> getCheckRecord(@RequestParam("no") String no, @RequestParam("orgId") String orgId) {
|
||||||
|
Map<String, Object> _out = null;
|
||||||
|
try {
|
||||||
|
_out = patientexamlistService.getCheckRecord(no, orgId);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_out = new HashMap<>();
|
||||||
|
_out.put("code", "error");
|
||||||
|
}
|
||||||
|
return success(_out);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/dicomDataRefresh")
|
@GetMapping("/dicomDataRefresh")
|
||||||
@Operation(summary = "dicomj检查后数据刷新")
|
@Operation(summary = "dicomj检查后数据刷新")
|
||||||
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
|
@PreAuthorize("@ss.hasPermission('tblist:patientexamlist:query')")
|
||||||
|
@ -102,5 +102,27 @@ public interface PatientexamlistMapper extends BaseMapperX<PatientexamlistDO> {
|
|||||||
+ " ORDER BY date")
|
+ " ORDER BY date")
|
||||||
List<PatientexamlistCountVO> GetDateYYZDCount(@Param("orgId") String orgId);
|
List<PatientexamlistCountVO> GetDateYYZDCount(@Param("orgId") String orgId);
|
||||||
|
|
||||||
|
//云胶片功能
|
||||||
|
@Select(" SELECT\n" +
|
||||||
|
" t1.ID as id, \n" +
|
||||||
|
" t1.examId as checkNumber, \n" +
|
||||||
|
" t1.pName as patientName, \n" +
|
||||||
|
" t1.gender as patientSex, \n" +
|
||||||
|
" '' as patientAge,t1.birthday as patientBirthday, \n" +
|
||||||
|
" '' as phone, \n" +
|
||||||
|
" t1.examItemCode as checkModuleId, \n" +
|
||||||
|
" t1.examItemName as checkModuleName, \n" +
|
||||||
|
" t1.examDescription as itemResult, \n" +
|
||||||
|
" t1.diagResults as diagResult, \n" +
|
||||||
|
" t1.examDate as checkDate, \n" +
|
||||||
|
" t1.diagDoctor as doctor, \n" +
|
||||||
|
" t1.orgId as orgId,\n" +
|
||||||
|
" t2.orgName as orgName, \n" +
|
||||||
|
" t2.dcmprefix as hostUrl \n" +
|
||||||
|
"FROM tb_patientexamlist t1\n" +
|
||||||
|
"LEFT JOIN tb_org t2 ON t1.orgId=t2.orgID AND t2.isdelete!=1\n" +
|
||||||
|
"WHERE 1=1\n" +
|
||||||
|
"AND t1.regId=#{regId}\n" +
|
||||||
|
"AND t1.orgId=#{orgId} ")
|
||||||
|
List<Map<String, Object>> getCheckRecord(@Param("regId") String regId, @Param("orgId") String orgId);
|
||||||
}
|
}
|
@ -92,9 +92,16 @@ public interface PatientexamlistService extends IService<PatientexamlistDO> {
|
|||||||
boolean dicomDataRefresh(String orgId);
|
boolean dicomDataRefresh(String orgId);
|
||||||
|
|
||||||
boolean insertbatch(List<PatientexamlistDO> doList);
|
boolean insertbatch(List<PatientexamlistDO> doList);
|
||||||
// 获取已检查的阴性阳性重大阳性统计
|
|
||||||
PatientexamlistCountVO GetWholeDiagFlagCount(String orgId);
|
|
||||||
|
|
||||||
// 获取一周已检查的阴性阳性重大阳性统计
|
//获取已检查的阴性阳性重大阳性统计
|
||||||
|
PatientexamlistCountVO GetWholeDiagFlagCount(String orgId);
|
||||||
|
|
||||||
|
//获取一周已检查的阴性阳性重大阳性统计
|
||||||
List<PatientexamlistCountVO> GetDateWholeDiagFlagCount(String orgId);
|
List<PatientexamlistCountVO> GetDateWholeDiagFlagCount(String orgId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 云胶片功能
|
||||||
|
* getCheckRecord
|
||||||
|
*/
|
||||||
|
Map<String, Object> getCheckRecord(String regId, String orgId);
|
||||||
}
|
}
|
@ -272,4 +272,25 @@ public class PatientexamlistServiceImpl extends ServiceImpl<PatientexamlistMappe
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> getCheckRecord(String regId, String orgId) {
|
||||||
|
Map<String, Object> _out = new HashMap<>();
|
||||||
|
|
||||||
|
List<Map<String, Object>> _list = patientexamlistMapper.getCheckRecord(regId, orgId);
|
||||||
|
|
||||||
|
if (_list != null && _list.size() > 0) {
|
||||||
|
_out.put("code", "success");
|
||||||
|
_out.put("items", _list);
|
||||||
|
_out.put("no", regId);
|
||||||
|
_out.put("name", _list.get(0).get("patientName"));
|
||||||
|
_out.put("orgId", orgId);
|
||||||
|
_out.put("orgName", _list.get(0).get("orgName"));
|
||||||
|
_out.put("title", (_list.get(0).get("patientName") != null ? _list.get(0).get("patientName").toString().trim() : "") + " CT影像检查报告单和云胶片");
|
||||||
|
} else {
|
||||||
|
_out.put("code", "empty");
|
||||||
|
}
|
||||||
|
|
||||||
|
return _out;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -68,6 +68,23 @@ public class ReporttemplateController {
|
|||||||
return success(reporttemplate);
|
return success(reporttemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/hasChildren")
|
||||||
|
@Operation(summary = "诊断模板是否存在子数据")
|
||||||
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:reporttemplate:query')")
|
||||||
|
public CommonResult<Boolean> hasReporttemplateChildren(@RequestParam("id") String id) {
|
||||||
|
boolean _out = reporttemplateService.hasReporttemplateChildren(id);
|
||||||
|
return success(_out);
|
||||||
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getroot")
|
||||||
|
@Operation(summary = "获得诊断模板root节点")
|
||||||
|
@PreAuthorize("@ss.hasPermission('system:reporttemplate:query')")
|
||||||
|
public CommonResult<List<ReporttemplateTreeView>> getReporttemplateRoot() {
|
||||||
|
List<ReporttemplateTreeView> reporttemplates = reporttemplateService.getReporttemplateRoot();
|
||||||
|
return success(reporttemplates);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/getlist")
|
@GetMapping("/getlist")
|
||||||
@Operation(summary = "获得诊断模板list")
|
@Operation(summary = "获得诊断模板list")
|
||||||
@PreAuthorize("@ss.hasPermission('system:reporttemplate:query')")
|
@PreAuthorize("@ss.hasPermission('system:reporttemplate:query')")
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
package cn.iocoder.yudao.module.ultrasoniccom.dal.reporttemplate;
|
package cn.iocoder.yudao.module.ultrasoniccom.dal.reporttemplate;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
|
||||||
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.reporttemplate.vo.*;
|
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.reporttemplate.vo.*;
|
||||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import org.apache.ibatis.annotations.*;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@ -20,30 +18,31 @@ import java.util.*;
|
|||||||
public interface ReporttemplateMapper extends BaseMapperX<ReporttemplateDO> {
|
public interface ReporttemplateMapper extends BaseMapperX<ReporttemplateDO> {
|
||||||
|
|
||||||
//查询
|
//查询
|
||||||
default List<ReporttemplateDO> selectList(String pid, String orgId) {
|
|
||||||
return selectList(new LambdaQueryWrapperX<ReporttemplateDO>()
|
|
||||||
.neIfPresent(ReporttemplateDO::getIsdelete, '1')
|
|
||||||
.eq(ReporttemplateDO::getPid, pid)
|
|
||||||
.eqIfPresent(ReporttemplateDO::getOrgId, orgId)
|
|
||||||
.orderByAsc(ReporttemplateDO::getTemplateName));
|
|
||||||
}
|
|
||||||
|
|
||||||
default List<ReporttemplateDO> selectNodes(ReporttemplatePageReqVO reqVO) {
|
|
||||||
return selectList(new LambdaQueryWrapperX<ReporttemplateDO>()
|
|
||||||
.neIfPresent(ReporttemplateDO::getIsdelete, '1')
|
|
||||||
.eq(ReporttemplateDO::getOrgId, reqVO.getOrgId())
|
|
||||||
.likeIfPresent(ReporttemplateDO::getTemplateName, reqVO.getTemplateName())
|
|
||||||
.isNull(reqVO.getTemplateLimitsType() != null && reqVO.getTemplateLimitsType().trim().equals("1"),
|
|
||||||
ReporttemplateDO::getPrivateDoctorId)
|
|
||||||
.isNotNull(reqVO.getTemplateLimitsType() != null && reqVO.getTemplateLimitsType().trim().equals("2"),
|
|
||||||
ReporttemplateDO::getPrivateDoctorId)
|
|
||||||
.orderByAsc(ReporttemplateDO::getTemplateName));
|
|
||||||
}
|
|
||||||
|
|
||||||
default List<ReporttemplateDO> selectNodes(String orgId) {
|
default List<ReporttemplateDO> selectNodes(String orgId) {
|
||||||
return selectList(new LambdaQueryWrapperX<ReporttemplateDO>()
|
return selectList(new LambdaQueryWrapperX<ReporttemplateDO>()
|
||||||
.neIfPresent(ReporttemplateDO::getIsdelete, '1')
|
.neIfPresent(ReporttemplateDO::getIsdelete, '1')
|
||||||
.eq(ReporttemplateDO::getOrgId, orgId)
|
.eq(ReporttemplateDO::getOrgId, orgId)
|
||||||
.orderByAsc(ReporttemplateDO::getTemplateName));
|
.orderByAsc(ReporttemplateDO::getTemplateName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default List<ReporttemplateDO> selectNodes(String orgId, String Pid) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<ReporttemplateDO>()
|
||||||
|
.neIfPresent(ReporttemplateDO::getIsdelete, '1')
|
||||||
|
.eq(ReporttemplateDO::getOrgId, orgId)
|
||||||
|
.isNotNull(ReporttemplateDO::getPid)
|
||||||
|
.eq(ReporttemplateDO::getPid, (Pid == null ? "" : Pid.trim()))
|
||||||
|
.orderByAsc(ReporttemplateDO::getTemplateName));
|
||||||
|
}
|
||||||
|
|
||||||
|
default List<ReporttemplateDO> selectNodes_Root(String orgId) {
|
||||||
|
return selectList(new LambdaQueryWrapperX<ReporttemplateDO>()
|
||||||
|
.neIfPresent(ReporttemplateDO::getIsdelete, '1')
|
||||||
|
.eq(ReporttemplateDO::getDataType, '1')
|
||||||
|
.eq(ReporttemplateDO::getOrgId, orgId)
|
||||||
|
.orderByAsc(ReporttemplateDO::getTemplateName));
|
||||||
|
}
|
||||||
|
|
||||||
|
//私有通用
|
||||||
|
@Select(" ${sql} ")
|
||||||
|
List<ReporttemplateDO> use_selectList(@Param("sql") String sql);
|
||||||
}
|
}
|
@ -27,6 +27,8 @@ public interface ReporttemplateService {
|
|||||||
|
|
||||||
PageResult<ReporttemplateTreeView> getReporttemplatePage(ReporttemplatePageReqVO pageReqVO);
|
PageResult<ReporttemplateTreeView> getReporttemplatePage(ReporttemplatePageReqVO pageReqVO);
|
||||||
|
|
||||||
List<ReporttemplateTreeView> getReporttemplatelist();
|
List<ReporttemplateTreeView> getReporttemplateRoot();
|
||||||
|
|
||||||
|
boolean hasReporttemplateChildren(String id);
|
||||||
|
|
||||||
}
|
}
|
@ -1,24 +1,20 @@
|
|||||||
package cn.iocoder.yudao.module.ultrasoniccom.service.reporttemplate;
|
package cn.iocoder.yudao.module.ultrasoniccom.service.reporttemplate;
|
||||||
|
|
||||||
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
|
||||||
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
|
import cn.iocoder.yudao.module.system.dal.dataobject.user.*;
|
||||||
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
|
import cn.iocoder.yudao.module.system.service.user.*;
|
||||||
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.reporttemplate.vo.*;
|
import cn.iocoder.yudao.module.ultrasoniccom.controller.admin.reporttemplate.vo.*;
|
||||||
import cn.iocoder.yudao.module.ultrasoniccom.dal.reporttemplate.*;
|
import cn.iocoder.yudao.module.ultrasoniccom.dal.reporttemplate.*;
|
||||||
import cn.iocoder.yudao.module.system.service.user.*;
|
import cn.iocoder.yudao.framework.common.pojo.*;
|
||||||
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.framework.common.util.object.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.util.StringUtils;
|
import org.springframework.util.StringUtils;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.*;
|
||||||
import java.util.stream.Stream;
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception;
|
||||||
@ -110,83 +106,187 @@ public class ReporttemplateServiceImpl implements ReporttemplateService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageResult<ReporttemplateTreeView> getReporttemplatePage(ReporttemplatePageReqVO pageReqVO) {
|
public PageResult<ReporttemplateTreeView> getReporttemplatePage(ReporttemplatePageReqVO pageReqVO) {
|
||||||
|
|
||||||
List<ReporttemplateTreeView> _viewPage = Collections.emptyList();
|
List<ReporttemplateTreeView> _viewPage = Collections.emptyList();
|
||||||
List<ReporttemplateTreeView> _view = null;
|
List<ReporttemplateTreeView> _view = null;
|
||||||
|
|
||||||
//当前登陆用户
|
|
||||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||||
pageReqVO.setOrgId(user.getOrgId());
|
pageReqVO.setOrgId(user.getOrgId());
|
||||||
//全部数据(缓存)
|
List<ReporttemplateDO> Nodes_all = reporttemplateMapper.selectNodes(pageReqVO.getOrgId());
|
||||||
List<ReporttemplateDO> _tempAll = reporttemplateMapper.selectNodes(user.getOrgId());
|
List<ReporttemplateDO> Nodes_res = null;
|
||||||
List<ReporttemplateTreeView> _tempVAll = null;
|
|
||||||
//直接符合的叶和根
|
|
||||||
List<ReporttemplateDO> _temp = reporttemplateMapper.selectNodes(pageReqVO);
|
|
||||||
List<ReporttemplateTreeView> _tempV = null;
|
|
||||||
//经推导符合的根
|
|
||||||
List<ReporttemplateDO> _tempOther = null;
|
|
||||||
List<ReporttemplateTreeView> _tempVOther = null;
|
|
||||||
|
|
||||||
if (_temp != null && _temp.size() > 0) {
|
//计算Nodes_res
|
||||||
//计算_tempOther
|
if (isEmptyList(Nodes_all) ||
|
||||||
ReporttemplateDO _tempDO = null;
|
(pageReqVO.getTemplateName() == null || pageReqVO.getTemplateName().trim().equals("")) &&
|
||||||
ReporttemplateDO _tempDO2 = null;
|
(pageReqVO.getTemplateLimitsType() == null || !new ArrayList<String>(Arrays.asList("1", "2")).contains(pageReqVO.getTemplateLimitsType().trim())) &&
|
||||||
boolean doNext = true;
|
(pageReqVO.getTemplateType() == null || pageReqVO.getTemplateType().trim().equals(""))) {
|
||||||
_tempOther = new ArrayList<>();
|
Nodes_res = Nodes_all;
|
||||||
for (ReporttemplateDO item : _temp) {
|
} else {
|
||||||
_tempDO = item;
|
Nodes_res = null;
|
||||||
doNext = true;
|
List<ReporttemplateDO> Nodes_select_name = null;
|
||||||
while (doNext) {
|
List<ReporttemplateDO> Nodes_select_private = null;
|
||||||
_tempDO2 = null;
|
List<ReporttemplateDO> Nodes_select_Type = null;
|
||||||
final String pid = _tempDO.getPid();
|
|
||||||
_tempDO = _tempAll.stream().filter(it -> it.getId() != null && pid != null && !pid.trim().equals("0") && it.getId().equals(pid))
|
//姓名
|
||||||
.findFirst().orElse(null);
|
if (pageReqVO.getTemplateName() != null && !pageReqVO.getTemplateName().trim().equals("")) {
|
||||||
if (_tempDO == null || _tempDO.getId() == null || _tempDO.getPid() == null)
|
Nodes_select_name = Collections.emptyList();
|
||||||
doNext = false;
|
List<ReporttemplateDO> Nodes_name = Nodes_all.stream().filter(it -> it.getId() != null && it.getTemplateName() != null && it.getTemplateName().trim().contains(pageReqVO.getTemplateName().trim()))
|
||||||
else {
|
.collect(Collectors.toList());
|
||||||
final String id = _tempDO.getId();
|
|
||||||
_tempDO2 = _temp.stream().filter(it -> it.getId() != null && it.getId().equals(id))
|
if (!isEmptyList(Nodes_name)) {
|
||||||
.findFirst().orElse(null);
|
List<ReporttemplateDO> Nodes_name_tree = new ArrayList<>(Nodes_name);
|
||||||
if (_tempDO2 != null)
|
List<ReporttemplateDO> Nodes_name_temp = null;
|
||||||
doNext = false;
|
List<ReporttemplateDO> Nodes_name_temp2 = null;
|
||||||
else if (_tempOther.contains(_tempDO))
|
List<ReporttemplateDO> Nodes_name_temp3 = null;
|
||||||
doNext = false;
|
|
||||||
else {
|
Nodes_name_temp = Nodes_name_tree.stream().filter(it -> it.getId() != null && it.getDataType() != null && it.getDataType().trim().equals("1"))
|
||||||
_tempOther.add(_tempDO);
|
.collect(Collectors.toList());
|
||||||
if (_tempDO.getPid().trim().equals("0"))
|
while (!isEmptyList(Nodes_name_temp)) {
|
||||||
doNext = false;
|
Nodes_name_temp2 = new ArrayList<>();
|
||||||
|
for (ReporttemplateDO item : Nodes_name_temp) {
|
||||||
|
String id = (item.getId() == null ? "" : item.getId().trim());
|
||||||
|
Nodes_name_temp3 = Nodes_all.stream().filter(it -> it.getId() != null && it.getPid() != null && it.getPid().trim().equals(id))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!isEmptyList(Nodes_name_temp3)) {
|
||||||
|
for (ReporttemplateDO item2 : Nodes_name_temp3) {
|
||||||
|
if (item2 != null && !Nodes_name_tree.contains(item2)) {
|
||||||
|
Nodes_name_tree.add(item2);
|
||||||
|
if (item2.getDataType() != null && item2.getDataType().trim().equals("1") && !Nodes_name_temp2.contains(item2))
|
||||||
|
Nodes_name_temp2.add(item2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Nodes_name_temp = Nodes_name_temp2;
|
||||||
|
}
|
||||||
|
|
||||||
|
Nodes_select_name = Nodes_name_tree.stream().filter(it -> it.getId() != null && (it.getDataType() == null || it.getDataType().trim().equals("0")))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
if (isEmptyList(Nodes_select_name))
|
||||||
|
Nodes_select_name = Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
//权限
|
||||||
|
if (pageReqVO.getTemplateLimitsType() != null && new ArrayList<String>(Arrays.asList("1", "2")).contains(pageReqVO.getTemplateLimitsType().trim())) {
|
||||||
|
Nodes_select_private = Nodes_all.stream().filter(it -> it.getId() != null && it.getDataType() != null && it.getDataType().trim().equals("0") &&
|
||||||
|
(pageReqVO.getTemplateLimitsType().trim().equals("1") ? (it.getPrivateDoctorId() == null || it.getPrivateDoctorId().trim().equals("")) : (it.getPrivateDoctorId() != null && !it.getPrivateDoctorId().trim().equals(""))))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (isEmptyList(Nodes_select_private))
|
||||||
|
Nodes_select_private = Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
//类型
|
||||||
|
if (pageReqVO.getTemplateType() != null && !pageReqVO.getTemplateType().trim().equals("")) {
|
||||||
|
Nodes_select_Type = Nodes_all.stream().filter(it -> it.getId() != null && it.getTemplateType() != null && it.getTemplateType().trim().equals(pageReqVO.getTemplateType().trim()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
List<ReporttemplateDO> Nodes_type_tree = null;
|
||||||
|
if (!isEmptyList(Nodes_select_Type))
|
||||||
|
Nodes_type_tree = Nodes_select_Type.stream().filter(it -> it.getPid() != null && it.getPid().trim().equals("0") && it.getDataType() != null && it.getDataType().trim().equals("1"))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!isEmptyList(Nodes_select_Type) && !isEmptyList(Nodes_type_tree)) {
|
||||||
|
|
||||||
|
List<ReporttemplateDO> Nodes_type_temp = null;
|
||||||
|
List<ReporttemplateDO> Nodes_type_temp2 = null;
|
||||||
|
List<ReporttemplateDO> Nodes_type_temp3 = null;
|
||||||
|
|
||||||
|
Nodes_type_temp = new ArrayList<>(Nodes_type_tree);
|
||||||
|
while (!isEmptyList(Nodes_type_temp)) {
|
||||||
|
Nodes_type_temp2 = new ArrayList<>();
|
||||||
|
for (ReporttemplateDO item : Nodes_type_temp) {
|
||||||
|
String id = (item.getId() == null ? "" : item.getId().trim());
|
||||||
|
Nodes_type_temp3 = Nodes_select_Type.stream().filter(it -> it.getId() != null && it.getPid() != null && it.getPid().trim().equals(id))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (!isEmptyList(Nodes_type_temp3)) {
|
||||||
|
for (ReporttemplateDO item2 : Nodes_type_temp3) {
|
||||||
|
if (item2 != null && !Nodes_type_tree.contains(item2)) {
|
||||||
|
Nodes_type_tree.add(item2);
|
||||||
|
if (item2.getDataType() != null && item2.getDataType().trim().equals("1") && !Nodes_type_temp2.contains(item2))
|
||||||
|
Nodes_type_temp2.add(item2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Nodes_type_temp = Nodes_type_temp2;
|
||||||
|
}
|
||||||
|
|
||||||
|
Nodes_select_Type = Nodes_type_tree.stream().filter(it -> it.getId() != null && (it.getDataType() == null || it.getDataType().trim().equals("0")))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
} else
|
||||||
|
Nodes_select_Type = Collections.emptyList();
|
||||||
|
if (isEmptyList(Nodes_select_Type))
|
||||||
|
Nodes_select_Type = Collections.emptyList();
|
||||||
|
}
|
||||||
|
|
||||||
|
//整理Nodes_res
|
||||||
|
if (Nodes_select_name == null && Nodes_select_private == null && Nodes_select_Type == null) {
|
||||||
|
Nodes_res = Nodes_all;
|
||||||
|
} else if ((Nodes_select_name != null && Nodes_select_name.size() <= 0) ||
|
||||||
|
(Nodes_select_private != null && Nodes_select_private.size() <= 0) ||
|
||||||
|
(Nodes_select_Type != null && Nodes_select_Type.size() <= 0)) {
|
||||||
|
Nodes_res = null;
|
||||||
|
} else {
|
||||||
|
Nodes_res = new ArrayList<>();
|
||||||
|
boolean canAdd = false;
|
||||||
|
for (ReporttemplateDO it : Nodes_all) {
|
||||||
|
canAdd = false;
|
||||||
|
if (it != null && it.getDataType() != null && it.getDataType().trim().equals("0")) {
|
||||||
|
if ((Nodes_select_name == null || Nodes_select_name.contains(it)) &&
|
||||||
|
(Nodes_select_private == null || Nodes_select_private.contains(it)) &&
|
||||||
|
(Nodes_select_Type == null || Nodes_select_Type.contains(it))) {
|
||||||
|
canAdd = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (canAdd && !Nodes_res.contains(it))
|
||||||
|
Nodes_res.add(it);
|
||||||
|
}
|
||||||
|
if(!isEmptyList(Nodes_res))
|
||||||
|
{
|
||||||
|
List<ReporttemplateDO> Nodes_name_temp = null;
|
||||||
|
List<ReporttemplateDO> Nodes_name_temp2 = null;
|
||||||
|
ReporttemplateDO Node_temp = null;
|
||||||
|
|
||||||
|
Nodes_name_temp = new ArrayList<>(Nodes_res);
|
||||||
|
while (!isEmptyList(Nodes_name_temp)) {
|
||||||
|
Nodes_name_temp2 = new ArrayList<>();
|
||||||
|
for (ReporttemplateDO item : Nodes_name_temp) {
|
||||||
|
String Pid = (item.getPid() == null ? "" : item.getPid().trim());
|
||||||
|
Node_temp = Nodes_all.stream().filter(it -> it.getId() != null && it.getId().trim().equals(Pid) && it.getDataType() != null && it.getDataType().trim().equals("1"))
|
||||||
|
.findFirst().orElse(null);
|
||||||
|
if (Node_temp != null && !Nodes_res.contains(Node_temp)) {
|
||||||
|
Nodes_res.add(Node_temp);
|
||||||
|
if (!Nodes_name_temp2.contains(Node_temp))
|
||||||
|
Nodes_name_temp2.add(Node_temp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Nodes_name_temp = Nodes_name_temp2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//计算_tempV
|
|
||||||
if (!(pageReqVO.getTemplateLimitsType() != null && (pageReqVO.getTemplateLimitsType().trim().equals("1") || pageReqVO.getTemplateLimitsType().trim().equals("2"))) &&
|
|
||||||
!StringUtils.hasText(pageReqVO.getTemplateName())) {
|
|
||||||
//判断查询条件优化渲染速度
|
|
||||||
_tempV = treeViewBuild(null, "0", user.getOrgId());
|
|
||||||
_tempVOther = new ArrayList<>();
|
|
||||||
} else {
|
|
||||||
_tempV = BeanUtils.toBean(_temp, ReporttemplateTreeView.class);
|
|
||||||
for (ReporttemplateTreeView item : _tempV) {
|
|
||||||
if (item != null && item.getDataType() != null && item.getDataType().trim().equals("1"))
|
|
||||||
treeViewBuild(item, item.getId(), item.getOrgId());
|
|
||||||
}
|
|
||||||
_tempVOther = BeanUtils.toBean(_tempOther, ReporttemplateTreeView.class);
|
|
||||||
}
|
|
||||||
_tempVAll = Stream.concat(_tempV.stream(), _tempVOther.stream())
|
|
||||||
.distinct().collect(Collectors.toList());
|
|
||||||
//计算_view
|
|
||||||
_view = _tempVAll.stream().filter(it -> it.getId() != null && it.getPid() != null && it.getPid().trim().equals("0"))
|
|
||||||
.sorted(Comparator.comparing(ReporttemplateTreeView::getTemplateName)).collect(Collectors.toList());
|
|
||||||
if (_view != null && _view.size() > 0) {
|
|
||||||
for (ReporttemplateTreeView item : _view) {
|
|
||||||
if (item != null && item.getDataType() != null && item.getDataType().trim().equals("1"))
|
|
||||||
treeViewBuild(item, item.getId(), _tempVAll);
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
_view = null;
|
|
||||||
}
|
}
|
||||||
//结果
|
|
||||||
if (_view != null && _view.size() > 0) {
|
//计算_view
|
||||||
|
if (!isEmptyList(Nodes_res)) {
|
||||||
|
List<ReporttemplateTreeView> _viewTemp = relationViewBuild(BeanUtils.toBean(Nodes_res, ReporttemplateTreeView.class));
|
||||||
|
if (!isEmptyList(_viewTemp)) {
|
||||||
|
for (ReporttemplateTreeView item : _viewTemp) {
|
||||||
|
if (isEmptyList(item.children))
|
||||||
|
item.children = null;
|
||||||
|
else {
|
||||||
|
item.children.sort(Comparator.comparing(ReporttemplateTreeView::getTemplateName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_view = _viewTemp.stream().filter(it -> it.getId() != null && it.getPid() != null && it.getPid().trim().equals("0"))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
if (isEmptyList(_view))
|
||||||
|
_view = null;
|
||||||
|
else
|
||||||
|
_view.sort(Comparator.comparing(ReporttemplateTreeView::getTemplateName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//计算_viewPage
|
||||||
|
if (!isEmptyList(_view)) {
|
||||||
if (!PageParam.PAGE_SIZE_NONE.equals(pageReqVO.getPageSize())) {
|
if (!PageParam.PAGE_SIZE_NONE.equals(pageReqVO.getPageSize())) {
|
||||||
int index_start = (pageReqVO.getPageNo() - 1) * pageReqVO.getPageSize();
|
int index_start = (pageReqVO.getPageNo() - 1) * pageReqVO.getPageSize();
|
||||||
int index_end = pageReqVO.getPageNo() * pageReqVO.getPageSize() - 1;
|
int index_end = pageReqVO.getPageNo() * pageReqVO.getPageSize() - 1;
|
||||||
@ -199,20 +299,50 @@ public class ReporttemplateServiceImpl implements ReporttemplateService {
|
|||||||
_viewPage = _view;
|
_viewPage = _view;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return new PageResult<>(_viewPage, Long.valueOf(_view == null ? 0 : _view.size()));
|
|
||||||
|
return new PageResult<>(_viewPage, Long.valueOf(isEmptyList(_view) ? 0 : _view.size()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ReporttemplateTreeView> getReporttemplatelist() {
|
public List<ReporttemplateTreeView> getReporttemplateRoot() {
|
||||||
List<ReporttemplateTreeView> _out = null;
|
List<ReporttemplateTreeView> _view = null;
|
||||||
|
|
||||||
//当前登陆用户
|
|
||||||
AdminUserDO user = userService.getUser(getLoginUserId());
|
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||||
|
List<ReporttemplateDO> _viewDO = reporttemplateMapper.selectNodes_Root(user.getOrgId());
|
||||||
|
|
||||||
_out = treeViewBuild(null, "0", user.getOrgId());
|
if (!isEmptyList(_viewDO)) {
|
||||||
|
List<ReporttemplateTreeView> _viewTemp = relationViewBuild(BeanUtils.toBean(_viewDO, ReporttemplateTreeView.class));
|
||||||
|
if (!isEmptyList(_viewTemp)) {
|
||||||
|
for (ReporttemplateTreeView item : _viewTemp) {
|
||||||
|
if (isEmptyList(item.children))
|
||||||
|
item.children = null;
|
||||||
|
else {
|
||||||
|
item.children.sort(Comparator.comparing(ReporttemplateTreeView::getTemplateName));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
_view = _viewTemp.stream().filter(it -> it.getId() != null && it.getPid() != null && it.getPid().trim().equals("0"))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isEmptyList(_view))
|
||||||
|
_view = Collections.emptyList();
|
||||||
|
else
|
||||||
|
_view.sort(Comparator.comparing(ReporttemplateTreeView::getTemplateName));
|
||||||
|
|
||||||
|
return _view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasReporttemplateChildren(String id) {
|
||||||
|
boolean _out = false;
|
||||||
|
|
||||||
|
AdminUserDO user = userService.getUser(getLoginUserId());
|
||||||
|
List<ReporttemplateDO> _viewDO = reporttemplateMapper.selectNodes(user.getOrgId(), id);
|
||||||
|
|
||||||
|
if (!isEmptyList(_viewDO))
|
||||||
|
_out = true;
|
||||||
|
|
||||||
if (!(_out != null && _out.size() > 0))
|
|
||||||
_out = Collections.emptyList();
|
|
||||||
return _out;
|
return _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,46 +353,39 @@ public class ReporttemplateServiceImpl implements ReporttemplateService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<ReporttemplateTreeView> treeViewBuild(ReporttemplateTreeView view, String pid, List<ReporttemplateTreeView> source) {
|
private List<ReporttemplateTreeView> relationViewBuild(List<ReporttemplateTreeView> source) {
|
||||||
List<ReporttemplateTreeView> _out = null;
|
List<ReporttemplateTreeView> _out = null;
|
||||||
|
|
||||||
if (view != null && view.children != null)
|
if (!isEmptyList(source)) {
|
||||||
return view.children;
|
ReporttemplateTreeView temp = null;
|
||||||
|
for (ReporttemplateTreeView item : source) {
|
||||||
if (source != null && source.size() > 0)
|
temp = null;
|
||||||
_out = source.stream().filter(it -> it.getId() != null && it.getPid() != null && it.getPid().trim().equals(pid))
|
if (item != null) {
|
||||||
.sorted(Comparator.comparing(ReporttemplateTreeView::getTemplateName)).collect(Collectors.toList());
|
String Pid = item.getPid() != null ? item.getPid().trim() : "";
|
||||||
if (_out != null && _out.size() > 0) {
|
temp = source.stream().filter(it -> it.getId() != null && it.getId().trim().equals(Pid) &&
|
||||||
if (view != null)
|
it.getDataType() != null && it.getDataType().trim().equals("1"))
|
||||||
view.children = _out;
|
.findFirst().orElse(null);
|
||||||
for (ReporttemplateTreeView item : _out) {
|
if (temp != null) {
|
||||||
if (item != null && item.getDataType() != null && item.getDataType().trim().equals("1") && item.children == null)
|
if (temp.children == null)
|
||||||
treeViewBuild(item, item.getId(), source);
|
temp.children = new ArrayList<>();
|
||||||
|
if (!temp.children.contains(item))
|
||||||
|
temp.children.add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
_out = source;
|
||||||
|
} else
|
||||||
|
_out = null;
|
||||||
|
|
||||||
if (!(_out != null && _out.size() > 0))
|
if (isEmptyList(_out))
|
||||||
_out = null;
|
_out = null;
|
||||||
return _out;
|
return _out;
|
||||||
}
|
}
|
||||||
|
|
||||||
private List<ReporttemplateTreeView> treeViewBuild(ReporttemplateTreeView view, String pid, String orgId) {
|
private <T> boolean isEmptyList(List<T> list) {
|
||||||
List<ReporttemplateTreeView> _out = null;
|
if (list != null && list.size() > 0)
|
||||||
List<ReporttemplateDO> _temp = null;
|
return false;
|
||||||
|
else
|
||||||
_temp = reporttemplateMapper.selectList(pid, orgId);
|
return true;
|
||||||
if (_temp != null && _temp.size() > 0) {
|
|
||||||
_out = BeanUtils.toBean(_temp, ReporttemplateTreeView.class);
|
|
||||||
if (view != null)
|
|
||||||
view.children = _out;
|
|
||||||
for (ReporttemplateTreeView item : _out) {
|
|
||||||
if (item != null && item.getDataType() != null && item.getDataType().trim().equals("1"))
|
|
||||||
treeViewBuild(item, item.getId(), item.getOrgId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(_out != null && _out.size() > 0))
|
|
||||||
_out = null;
|
|
||||||
return _out;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -17,8 +17,8 @@ spring:
|
|||||||
mvc:
|
mvc:
|
||||||
pathmatch:
|
pathmatch:
|
||||||
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
matching-strategy: ANT_PATH_MATCHER # 解决 SpringFox 与 SpringBoot 2.6.x 不兼容的问题,参见 SpringFoxHandlerProviderBeanPostProcessor 类
|
||||||
# throw-exception-if-no-handler-found: true # 404 错误时抛出异常,方便统一处理
|
# throw-exception-if-no-handler-found: true # 404 错误时抛出异常,方便统一处理
|
||||||
# static-path-pattern: /static/** # 静态资源路径; 注意:如果不配置,则 throw-exception-if-no-handler-found 不生效!!! TODO 芋艿:不能配置,会导致 swagger 不生效
|
# static-path-pattern: /static/** # 静态资源路径; 注意:如果不配置,则 throw-exception-if-no-handler-found 不生效!!! TODO 芋艿:不能配置,会导致 swagger 不生效
|
||||||
|
|
||||||
# Jackson 配置项
|
# Jackson 配置项
|
||||||
jackson:
|
jackson:
|
||||||
@ -68,9 +68,9 @@ mybatis-plus:
|
|||||||
global-config:
|
global-config:
|
||||||
db-config:
|
db-config:
|
||||||
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
id-type: NONE # “智能”模式,基于 IdTypeEnvironmentPostProcessor + 数据源的类型,自动适配成 AUTO、INPUT 模式。
|
||||||
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
# id-type: AUTO # 自增 ID,适合 MySQL 等直接自增的数据库
|
||||||
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
# id-type: INPUT # 用户输入 ID,适合 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库
|
||||||
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
# id-type: ASSIGN_ID # 分配 ID,默认使用雪花算法。注意,Oracle、PostgreSQL、Kingbase、DB2、H2 数据库时,需要去除实体类上的 @KeySequence 注解
|
||||||
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
logic-delete-value: 1 # 逻辑已删除值(默认为 1)
|
||||||
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
logic-not-delete-value: 0 # 逻辑未删除值(默认为 0)
|
||||||
banner: false # 关闭控制台的 Banner 打印
|
banner: false # 关闭控制台的 Banner 打印
|
||||||
@ -152,10 +152,12 @@ yudao:
|
|||||||
admin-ui:
|
admin-ui:
|
||||||
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
url: http://dashboard.yudao.iocoder.cn # Admin 管理后台 UI 的地址
|
||||||
security:
|
security:
|
||||||
permit-all_urls:
|
permit-all-urls:
|
||||||
- /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,不需要登录
|
- /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,不需要登录
|
||||||
|
# 自定义接口
|
||||||
- /admin-api/ultrasoniccom/ultrasonic/getdcm
|
- /admin-api/ultrasoniccom/ultrasonic/getdcm
|
||||||
- /admin-api/org/org/getone
|
- /admin-api/org/org/getone
|
||||||
|
- /admin-api/tblist/patientexamlist/getCheckRecord
|
||||||
websocket:
|
websocket:
|
||||||
enable: true # websocket的开关
|
enable: true # websocket的开关
|
||||||
path: /infra/ws # 路径
|
path: /infra/ws # 路径
|
||||||
@ -195,6 +197,10 @@ yudao:
|
|||||||
- /admin-api/pay/notify/** # 支付回调通知,不携带租户编号
|
- /admin-api/pay/notify/** # 支付回调通知,不携带租户编号
|
||||||
- /jmreport/* # 积木报表,无法携带租户编号
|
- /jmreport/* # 积木报表,无法携带租户编号
|
||||||
- /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,无法携带租户编号
|
- /admin-api/mp/open/** # 微信公众号开放平台,微信回调接口,无法携带租户编号
|
||||||
|
# 自定义接口
|
||||||
|
- /admin-api/ultrasoniccom/ultrasonic/getdcm
|
||||||
|
- /admin-api/org/org/getone
|
||||||
|
- /admin-api/tblist/patientexamlist/getCheckRecord
|
||||||
ignore-tables:
|
ignore-tables:
|
||||||
- system_tenant
|
- system_tenant
|
||||||
- system_tenant_package
|
- system_tenant_package
|
||||||
|
Loading…
Reference in New Issue
Block a user