数据同步
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:
旺仔 2024-10-31 21:57:37 +08:00
parent 501b1f132f
commit 22eeb255dc
9 changed files with 177 additions and 32 deletions

View File

@ -46,7 +46,6 @@
<dependency> <dependency>
<groupId>com.microsoft.sqlserver</groupId> <groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId> <artifactId>mssql-jdbc</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.dameng</groupId> <groupId>com.dameng</groupId>

View File

@ -0,0 +1,64 @@
package cn.iocoder.yudao.module.system.controller.admin.outapi;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.system.controller.admin.outapi.vo.*;
import cn.iocoder.yudao.module.system.dal.dataobject.contrastorg.ContrastOrgDO;
import cn.iocoder.yudao.module.system.dal.mysql.contrastorg.*;
import io.swagger.v3.oas.annotations.*;
import io.swagger.v3.oas.annotations.tags.*;
import org.springframework.validation.annotation.*;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.UUID;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.error;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Tag(name = "管理后台 - OutApiController")
@RestController
@RequestMapping("/system/outapi")
@Validated
public class OutApiController {
@Resource
private ContrastOrgMapper contrastOrgMapper;
@PostMapping("/addContrastOrg")
@Operation(summary = "addContrastOrg")
public CommonResult<String> addContrastOrg(@RequestBody ContrastOrgSaveReqVO createReqVO) {
String _out = "";
try {
if ((createReqVO.getRegid() != null && !createReqVO.getRegid().isEmpty()) &&
(createReqVO.getOrgid() != null && !createReqVO.getOrgid().isEmpty())) {
ContrastOrgDO contrastOrgDO = null;
contrastOrgDO = contrastOrgMapper.selectOne(new LambdaQueryWrapperX<ContrastOrgDO>()
.eq(ContrastOrgDO::getRegid, createReqVO.getRegid().trim()));
if (contrastOrgDO == null) {
UUID guid = UUID.randomUUID();
contrastOrgDO = BeanUtils.toBean(createReqVO, ContrastOrgDO.class);
contrastOrgDO.setId(guid.toString());
contrastOrgDO.setRegid(contrastOrgDO.getRegid().trim());
contrastOrgDO.setOrgid(contrastOrgDO.getOrgid().trim());
contrastOrgMapper.insert(contrastOrgDO);
_out = "成功";
} else
_out = "失败参数regid对应的数据已存在";
} else
_out = "失败参数regid、orgid都不能为空";
} catch (Exception ex) {
_out = "失败," + ex.getMessage();
}
if (_out.equals("成功"))
return success(_out);
else
return error(400, _out);
}
}

View File

@ -0,0 +1,22 @@
package cn.iocoder.yudao.module.system.controller.admin.outapi.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import java.util.*;
import javax.validation.constraints.*;
@Schema(description = "管理后台 - tb_contrast_org新增/修改 Request VO")
@Data
public class ContrastOrgSaveReqVO {
@Schema(description = "ID", example = "30850")
private String id;
@Schema(description = "regid", example = "32407")
private String regid;
@Schema(description = "orgid", example = "17889")
private String orgid;
}

View File

@ -0,0 +1,38 @@
package cn.iocoder.yudao.module.system.dal.dataobject.contrastorg;
import lombok.*;
import com.baomidou.mybatisplus.annotation.*;
/**
* tb_contrast_org DO
*
* @author 李传洋
*/
@TableName("tb_contrast_org")
@KeySequence("tb_contrast_org_seq") // 用于 OraclePostgreSQLKingbaseDB2H2 数据库的主键自增如果是 MySQL 等数据库可不写
@Data
@ToString(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ContrastOrgDO {
/**
* ID
*/
@TableId(value = "ID", type = IdType.INPUT)
private String id;
/**
* regid
*/
@TableField("regid")
private String regid;
/**
* orgid
*/
@TableField("orgid")
private String orgid;
}

View File

@ -0,0 +1,23 @@
package cn.iocoder.yudao.module.system.dal.mysql.contrastorg;
import java.util.*;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.dal.dataobject.contrastorg.*;
import com.baomidou.mybatisplus.annotation.*;
import org.apache.ibatis.annotations.*;
/**
* tb_contrast_org Mapper
*
* @author 李传洋
*/
@InterceptorIgnore(tenantLine = "true")
@Mapper
public interface ContrastOrgMapper extends BaseMapperX<ContrastOrgDO> {
@Select(" SELECT t1.ID AS ID,t1.orgid AS orgid,t1.regid AS regid,t2.orgName FROM tb_contrast_org t1 LEFT JOIN tb_org t2 ON t1.orgid=t2.orgID WHERE t1.regid=#{regid} ")
List<Map<String, Object>> selectInfo(@Param("regid") String regid);
}

View File

@ -81,11 +81,11 @@ public interface DicomworklistMapper extends BaseMapperX<DicomworklistDO> {
List<DicomSeriesDO> GetDicomSeriesByStudyInsta(@Param("studyInsta") String studyInsta); List<DicomSeriesDO> GetDicomSeriesByStudyInsta(@Param("studyInsta") String studyInsta);
@Select(" SELECT CONCAT(\n" + @Select(" SELECT CONCAT(\n" +
"(SELECT CAST(COUNT(*) AS CHAR) FROM dicomstudies t1\n" + "(SELECT TRIM(CAST(COUNT(*) AS CHAR)) FROM dicomstudies t1\n" +
" LEFT JOIN dicomseries t2 ON t1.StudyInsta=t2.StudyInsta\n" + " LEFT JOIN dicomseries t2 ON t1.StudyInsta=t2.StudyInsta\n" +
" WHERE t1.PatientID=#{patientID} AND t1.StudyInsta=#{studyInsta} and t2.BodyPartEx is not null )\n" + " WHERE t1.PatientID=#{patientID} AND t1.StudyInsta=#{studyInsta} and t2.BodyPartEx is not null )\n" +
",'/',\n" + ",'/',\n" +
"(SELECT CAST(COUNT(*) AS CHAR) FROM dicomstudies t1\n" + "(SELECT TRIM(CAST(COUNT(*) AS CHAR)) FROM dicomstudies t1\n" +
" LEFT JOIN dicomseries t2 ON t1.StudyInsta=t2.StudyInsta\n" + " LEFT JOIN dicomseries t2 ON t1.StudyInsta=t2.StudyInsta\n" +
" LEFT JOIN dicomimages t3 ON t2.SeriesInst=t3.SeriesInst\n" + " LEFT JOIN dicomimages t3 ON t2.SeriesInst=t3.SeriesInst\n" +
" WHERE t1.PatientID=#{patientID} AND t1.StudyInsta=#{studyInsta})) ") " WHERE t1.PatientID=#{patientID} AND t1.StudyInsta=#{studyInsta})) ")

View File

@ -188,6 +188,7 @@ public class PatientexamlistController {
ids = patientexamlistService.dicomDataSync(); ids = patientexamlistService.dicomDataSync();
_out.put("code", "success"); _out.put("code", "success");
} catch (Exception ex) { } catch (Exception ex) {
System.out.println(ex.getMessage());
ids = null; ids = null;
_out.put("code", "error"); _out.put("code", "error");
} }
@ -398,21 +399,15 @@ public class PatientexamlistController {
public void FtpPdf(@RequestBody inspdfscreenshotVO insimagescreenshotVO) { public void FtpPdf(@RequestBody inspdfscreenshotVO insimagescreenshotVO) {
String base64String = insimagescreenshotVO.getImagebase(); String base64String = insimagescreenshotVO.getImagebase();
String fileName = System.currentTimeMillis() + ".pdf"; String fileName = System.currentTimeMillis() + ".pdf";
if(insimagescreenshotVO.getModel().equals("0")) if (insimagescreenshotVO.getModel().equals("0")) {
{
// 解码Base64字符串 // 解码Base64字符串
String base64Image = base64String.split(",")[1]; String base64Image = base64String.split(",")[1];
try try {
{
FileUtils.saveBase64ToFile(base64Image, insimagescreenshotVO.getFolderPath(), fileName.split("\\.")[0], "pdf"); FileUtils.saveBase64ToFile(base64Image, insimagescreenshotVO.getFolderPath(), fileName.split("\\.")[0], "pdf");
} } catch (Exception ignored) {
catch (Exception ignored)
{
System.out.println("文件上传失败" + ignored.getMessage()); System.out.println("文件上传失败" + ignored.getMessage());
} }
} } else {
else
{
String ftpServer = "114.55.171.231"; String ftpServer = "114.55.171.231";
int ftpPort = 21; // FTP端口默认为21 int ftpPort = 21; // FTP端口默认为21
String ftpUser = "pacs"; String ftpUser = "pacs";
@ -471,7 +466,6 @@ public class PatientexamlistController {
patientexamlistService.updatePatientexamlist(updateReqVO); patientexamlistService.updatePatientexamlist(updateReqVO);
} }
} }

View File

@ -40,7 +40,8 @@ spring:
time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒 time-between-eviction-runs-millis: 60000 # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位:毫秒
min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒 min-evictable-idle-time-millis: 300000 # 配置一个连接在池中最小生存的时间,单位:毫秒
max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒 max-evictable-idle-time-millis: 900000 # 配置一个连接在池中最大生存的时间,单位:毫秒
validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效 #validation-query: SELECT 1 FROM DUAL # 配置检测连接是否有效
validation-query: SELECT 1 # 配置检测连接是否有效
test-while-idle: true test-while-idle: true
test-on-borrow: false test-on-borrow: false
test-on-return: false test-on-return: false

View File

@ -165,6 +165,8 @@ yudao:
- /admin-api/system/jwtToken/getToken - /admin-api/system/jwtToken/getToken
- /admin-api/applyregistration/applyform/GetPatientPDFDcm - /admin-api/applyregistration/applyform/GetPatientPDFDcm
- /admin-api/ultrasoniccom/ultrasonic/ftpimage - /admin-api/ultrasoniccom/ultrasonic/ftpimage
- /admin-api/ultrasoniccom/ultrasonic/SaveFileBase64
- /admin-api/system/outapi/addContrastOrg
websocket: websocket:
enable: true # websocket的开关 enable: true # websocket的开关
path: /infra/ws # 路径 path: /infra/ws # 路径
@ -215,6 +217,8 @@ yudao:
- /admin-api/system/jwtToken/getToken - /admin-api/system/jwtToken/getToken
- /admin-api/applyregistration/applyform/GetPatientPDFDcm - /admin-api/applyregistration/applyform/GetPatientPDFDcm
- /admin-api/ultrasoniccom/ultrasonic/ftpimage - /admin-api/ultrasoniccom/ultrasonic/ftpimage
- /admin-api/ultrasoniccom/ultrasonic/SaveFileBase64
- /admin-api/system/outapi/addContrastOrg
ignore-tables: ignore-tables:
- system_tenant - system_tenant
- system_tenant_package - system_tenant_package