Compare commits
No commits in common. "f2eb35fc585246442570cab58c60a9e49b9f6be2" and "4f3d1693b40f00c9836cb672155951af42934a92" have entirely different histories.
f2eb35fc58
...
4f3d1693b4
@ -21,27 +21,18 @@ RUN mkdir -p /root/.m2 && \
|
||||
|
||||
# 复制项目代码
|
||||
COPY pom.xml .
|
||||
COPY sa-admin ./sa-admin
|
||||
COPY sa-common ./sa-common
|
||||
COPY src ./src
|
||||
|
||||
# 构建项目
|
||||
RUN mvn clean package -Dmaven.test.skip=true -P dev
|
||||
RUN mvn clean package -DskipTests
|
||||
|
||||
# 第二阶段:使用更小的 Java8 JDK 镜像运行
|
||||
FROM eclipse-temurin:8-jdk-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# ✅ 安装字体 & libgcc 等依赖
|
||||
RUN apk add --no-cache \
|
||||
libstdc++ \
|
||||
libgcc \
|
||||
fontconfig \
|
||||
freetype \
|
||||
ttf-dejavu
|
||||
|
||||
# 复制构建产物
|
||||
COPY --from=builder /app/sa-admin/target/*.jar app.jar
|
||||
COPY --from=builder /app/target/*.jar app.jar
|
||||
|
||||
# 暴露端口(请替换成你实际应用端口)
|
||||
EXPOSE 5477
|
||||
@ -1,50 +0,0 @@
|
||||
# 第一阶段:使用 Maven + Java8 构建 JAR 包
|
||||
FROM maven:3.9.2-eclipse-temurin-8-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 添加国内 Maven 镜像源
|
||||
RUN mkdir -p /root/.m2 && \
|
||||
echo '<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" \
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" \
|
||||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 \
|
||||
https://maven.apache.org/xsd/settings-1.0.0.xsd"> \
|
||||
<mirrors> \
|
||||
<mirror> \
|
||||
<id>aliyun</id> \
|
||||
<mirrorOf>*</mirrorOf> \
|
||||
<name>aliyun maven</name> \
|
||||
<url>https://maven.aliyun.com/repository/public</url> \
|
||||
</mirror> \
|
||||
</mirrors> \
|
||||
</settings>' > /root/.m2/settings.xml
|
||||
|
||||
# 复制项目代码
|
||||
COPY pom.xml .
|
||||
COPY sa-admin ./sa-admin
|
||||
COPY sa-common ./sa-common
|
||||
|
||||
# 构建项目
|
||||
RUN mvn clean package -Dmaven.test.skip=true -P prod
|
||||
|
||||
# 第二阶段:使用更小的 Java8 JDK 镜像运行
|
||||
FROM eclipse-temurin:8-jdk-alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# ✅ 安装字体 & libgcc 等依赖
|
||||
RUN apk add --no-cache \
|
||||
libstdc++ \
|
||||
libgcc \
|
||||
fontconfig \
|
||||
freetype \
|
||||
ttf-dejavu
|
||||
|
||||
# 复制构建产物
|
||||
COPY --from=builder /app/sa-admin/target/*.jar app.jar
|
||||
|
||||
# 暴露端口(请替换成你实际应用端口)
|
||||
EXPOSE 5477
|
||||
|
||||
# 启动应用
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
2
pom.xml
2
pom.xml
@ -24,7 +24,7 @@
|
||||
<mybatis-plus.version>3.5.2</mybatis-plus.version>
|
||||
<p6spy.version>3.8.6</p6spy.version>
|
||||
<swagger.version>2.7.0</swagger.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<fastjson.version>2.0.16</fastjson.version>
|
||||
<druid.version>1.2.14</druid.version>
|
||||
<google-linkedhashmap.version>1.4.2</google-linkedhashmap.version>
|
||||
<google-guava.version>20.0</google-guava.version>
|
||||
|
||||
@ -33,11 +33,6 @@
|
||||
<artifactId>weixin-java-miniapp</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.baidu.aip</groupId>
|
||||
<artifactId>java-sdk</artifactId>
|
||||
<version>4.16.22</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@ -60,7 +60,7 @@ public class AdminSwaggerTagConst extends SwaggerTagConst {
|
||||
public static final String Expert = "前端-登录、注册、首页";
|
||||
public static final String ExpertSign = "前端-医生签名";
|
||||
|
||||
public static final String OSS = "前端-文件";
|
||||
public static final String OSS = "前端-oss";
|
||||
public static final String WX_MINI = "前端-微信小程序";
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.baidubce;
|
||||
|
||||
import com.baidu.aip.ocr.AipOcr;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
@Slf4j
|
||||
@Getter
|
||||
@Component("baiducebase")
|
||||
public class Base {
|
||||
@Value("${baiduce.app-id}")
|
||||
private String appId;
|
||||
|
||||
@Value("${baiduce.app-key}")
|
||||
private String appkey;
|
||||
|
||||
@Value("${baiduce.app-secret}")
|
||||
private String appSecret;
|
||||
|
||||
// AipOcr 实例
|
||||
protected AipOcr ocrClient;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
ocrClient = new AipOcr(appId, appkey, appSecret);
|
||||
ocrClient.setConnectionTimeoutInMillis(2000);
|
||||
ocrClient.setSocketTimeoutInMillis(60000);
|
||||
}
|
||||
|
||||
// 注意:项目使用log4j2,百度AI SDK会自动检测log4j2配置文件
|
||||
// 如果确实需要手动指定log4j2配置文件路径,可以使用以下方式:
|
||||
// System.setProperty("log4j.configurationFile", "classpath:dev/log4j2.xml");
|
||||
// 或者完全移除这行配置,让log4j2自动检测
|
||||
// }
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.baidubce;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import com.baidu.aip.ocr.AipOcr;
|
||||
import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
// 通用文字识别
|
||||
@Component
|
||||
public class Ocr extends Base {
|
||||
|
||||
/**
|
||||
* 身份证识别
|
||||
*/
|
||||
public JSONObject idCard(byte[] imageBytes,String idCardSide) {
|
||||
try {
|
||||
HashMap<String, String> options = new HashMap<>();
|
||||
options.put("detect_direction", "true");
|
||||
options.put("detect_risk", "true");
|
||||
|
||||
return ocrClient.idcard(imageBytes, idCardSide, options);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("OCR识别失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 文字识别
|
||||
*/
|
||||
public JSONObject image(byte[] imageBytes) {
|
||||
try {
|
||||
HashMap<String, String> options = new HashMap<>();
|
||||
options.put("language_type", "CHN_ENG");
|
||||
options.put("detect_direction", "true");
|
||||
options.put("detect_language", "true");
|
||||
options.put("probability", "true");
|
||||
|
||||
return ocrClient.basicGeneral(imageBytes, options);
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("OCR识别失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,113 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.json.JSONObject;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.Getter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Slf4j
|
||||
@Component("fangxinqianbase")
|
||||
@Getter
|
||||
public class Base {
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
@Value("${fxq.client-id}")
|
||||
private String clientId;
|
||||
|
||||
@Value("${fxq.client-secret}")
|
||||
private String clientSecret;
|
||||
|
||||
@Value("${fxq.client-url}")
|
||||
private String clientUrl;
|
||||
|
||||
@Resource
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
|
||||
/**
|
||||
* 发送 POST JSON 请求
|
||||
* @param url 请求地址
|
||||
* @param jsonData JSON 字符串
|
||||
* @param headers 请求头
|
||||
* @return 响应字符串
|
||||
*/
|
||||
public String postJson(String url, String jsonData, Map<String, String> headers) {
|
||||
// 获取token
|
||||
String tokenKey = "fangxinqian:" + clientId;
|
||||
String token = redisTemplate.opsForValue().get(tokenKey);
|
||||
if (token == null) {
|
||||
token = getAccessToken();
|
||||
}
|
||||
|
||||
// 刷新token
|
||||
HttpRequest request = HttpRequest.post(url)
|
||||
.body(jsonData)
|
||||
.header("Content-Type", "application/json")
|
||||
.header("Authorization", String.format("Bearer %s",token));
|
||||
|
||||
if (headers != null) {
|
||||
headers.forEach(request::header);
|
||||
}
|
||||
|
||||
log.info("获取app数据参数:{}",jsonData);
|
||||
|
||||
try (HttpResponse response = request.execute()) {
|
||||
JSONObject json = JSONUtil.parseObj(response.body());
|
||||
|
||||
log.info("获取app数据返回:{}",json);
|
||||
|
||||
int code = json.getInt("code", -1);
|
||||
if (code == 10005) {
|
||||
// token 失效,重新获取
|
||||
getAccessToken();
|
||||
|
||||
return postJson(url,jsonData,headers);
|
||||
}
|
||||
|
||||
return response.body();
|
||||
}
|
||||
}
|
||||
|
||||
public String getAccessToken(){
|
||||
String url = String.format("%s?grant_type=client_credentials&client_id=%s&client_secret=%s",
|
||||
"https://saasapi.fangxinqian.cn/oauth/token", clientId, clientSecret);
|
||||
|
||||
HttpRequest request = HttpRequest.post(url);
|
||||
|
||||
try (HttpResponse response = request.execute()) {
|
||||
if (response.getStatus() != 200) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
JSONObject json = JSONUtil.parseObj(response.body());
|
||||
|
||||
log.info("获取app数据返回:{}",json);
|
||||
|
||||
String accessToken = json.getStr("access_token");
|
||||
if (accessToken == null || accessToken.isEmpty()) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
Integer expiresIn = json.getInt("expires_in");
|
||||
if (expiresIn == null || expiresIn <= 0) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
String tokenKey = "fangxinqian:" + clientId;
|
||||
redisTemplate.opsForValue().set(tokenKey,accessToken,(expiresIn - 120), TimeUnit.SECONDS);
|
||||
|
||||
return accessToken;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.auth;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.Base;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.company.RegisterPResponse;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class Auth extends Base {
|
||||
/**
|
||||
* 获取静默签署的授权
|
||||
*/
|
||||
public GetAuthorizeResponse getAuthorize(String unionId){
|
||||
// 处理参数
|
||||
Map<String, Object> requestData = new HashMap<>();
|
||||
requestData.put("signerUnionId", unionId); // 个人/企业主体在放心签平台与接入方关联的唯一性标识
|
||||
requestData.put("notifyUrl", "www.baidu.com"); // 授权结果通知地址
|
||||
requestData.put("notifyWay", "2");
|
||||
|
||||
String url = getClientUrl() + "authorize/silent/sign";
|
||||
String jsonBody = JSONUtil.toJsonStr(requestData);
|
||||
log.info("获取app数据参数:{}",jsonBody);
|
||||
|
||||
String response = postJson(url,jsonBody,null);
|
||||
GetAuthorizeResponse result = JSONUtil.toBean(response, GetAuthorizeResponse.class);
|
||||
if (result.getCode() != 10000){
|
||||
if (!Objects.equals(result.getMessage(), "")){
|
||||
throw new BusinessException(result.getMessage());
|
||||
}else{
|
||||
throw new BusinessException("失败");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.auth;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class GetAuthorizeResponse {
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private GetAuthorizeData data;
|
||||
|
||||
private String requestId;
|
||||
|
||||
/**
|
||||
* 根据统一标签列表 - 详细数据
|
||||
*/
|
||||
@Data
|
||||
public static class GetAuthorizeData {
|
||||
private String unionId;
|
||||
|
||||
private String pcUrl;
|
||||
|
||||
private String h5Url;
|
||||
}
|
||||
}
|
||||
@ -1,49 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.company;
|
||||
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.Base;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 企业账号
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class Company extends Base {
|
||||
/**
|
||||
* 添加账号(个人账号已创建)-企业
|
||||
*/
|
||||
public RegisterPResponse registerCResponse(String managerUnionId){
|
||||
// 处理参数
|
||||
Map<String, Object> requestData = new HashMap<>();
|
||||
requestData.put("uid", "bjyykxjsfzxh"); // 接入方系统中用户的标识
|
||||
requestData.put("managerUnionId", managerUnionId); // 个人唯一性标识
|
||||
requestData.put("orgName", "北京医药科学技术发展协会");
|
||||
requestData.put("creditNo", "51110000500308634E");
|
||||
requestData.put("legalName", "侯新晖");
|
||||
|
||||
String url = getClientUrl() + "company/register";
|
||||
String jsonBody = JSONUtil.toJsonStr(requestData);
|
||||
log.info("获取app数据参数:{}",jsonBody);
|
||||
|
||||
String response = postJson(url,jsonBody,null);
|
||||
RegisterPResponse result = JSONUtil.toBean(response, RegisterPResponse.class);
|
||||
if (result.getCode() != 10000){
|
||||
if (!Objects.equals(result.getMessage(), "")){
|
||||
throw new BusinessException(result.getMessage());
|
||||
}else{
|
||||
throw new BusinessException("失败");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.company;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class RegisterPResponse {
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private GetRegisterPData data;
|
||||
|
||||
private String requestId;
|
||||
|
||||
/**
|
||||
* 根据统一标签列表 - 详细数据
|
||||
*/
|
||||
@Data
|
||||
public static class GetRegisterPData {
|
||||
|
||||
/**
|
||||
* 接入方用户唯一标识
|
||||
*/
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 企业主体在放心签平台与接入方关联的唯一性标识
|
||||
*/
|
||||
@JsonProperty("unionId")
|
||||
private String unionId;
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.personal;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.Base;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 个人账号
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
public class Personal extends Base {
|
||||
/**
|
||||
* 添加账号
|
||||
*/
|
||||
public RegisterResponse register(RegisterRequest r){
|
||||
String url = getClientUrl() + "personal/register";
|
||||
String jsonBody = JSONUtil.toJsonStr(r);
|
||||
log.info("获取app数据参数:{}",jsonBody);
|
||||
|
||||
String response = postJson(url,jsonBody,null);
|
||||
RegisterResponse result = JSONUtil.toBean(response, RegisterResponse.class);
|
||||
if (result.getCode() != 10000){
|
||||
if (result.getCode() == 50005){
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!Objects.equals(result.getMessage(), "")){
|
||||
throw new BusinessException(result.getMessage());
|
||||
}else{
|
||||
throw new BusinessException("失败");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询账号
|
||||
*/
|
||||
public QueryResponse query(String uid,String mobile){
|
||||
String url = getClientUrl() + "personal/query";
|
||||
Map<String, Object> requestData = new HashMap<>();
|
||||
requestData.put("uid", uid); // 接入方系统中用户的标识
|
||||
requestData.put("mobile", mobile); // 接入方系统中用户的标识
|
||||
|
||||
String jsonBody = JSONUtil.toJsonStr(requestData);
|
||||
log.info("获取app数据参数:{}",jsonBody);
|
||||
|
||||
String response = postJson(url,jsonBody,null);
|
||||
QueryResponse result = JSONUtil.toBean(response, QueryResponse.class);
|
||||
if (result.getCode() != 10000){
|
||||
if (!Objects.equals(result.getMessage(), "")){
|
||||
throw new BusinessException(result.getMessage());
|
||||
}else{
|
||||
throw new BusinessException("失败");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.personal;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QueryResponse {
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private queryData data;
|
||||
|
||||
private String requestId;
|
||||
|
||||
/**
|
||||
* 根据统一标签列表 - 详细数据
|
||||
*/
|
||||
@Data
|
||||
public static class queryData {
|
||||
|
||||
/**
|
||||
* 实名注册H5链接
|
||||
*/
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 实名注册PC链接
|
||||
*/
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 认证状态:认证成功/认证中
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 认证状态码:
|
||||
* 0-未认证
|
||||
* 1-认证中
|
||||
* 2-已认证
|
||||
*/
|
||||
private String statusCode;
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.personal;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RegisterRequest {
|
||||
/**
|
||||
* 接入方系统中用户的标识,需保证在接入方系统内唯一(长度为:8-20个字符)
|
||||
*/
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 创建账号所用的手机号码
|
||||
*/
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 个人实名认证方案,默认为1
|
||||
* 1:全网三要素(姓名、身份证号、实名手机号)
|
||||
* 2:银行卡四要素(姓名、身份证号、银行卡号、银行预留手机号)
|
||||
* -1:创建账号时不实名认证,平台会在其签署前触发实名认证,也可以请求"独立认证页获取"接口来进行实名认证
|
||||
*/
|
||||
private String authType = "1";
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
private String identNo;
|
||||
|
||||
/**
|
||||
* 真实姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 是否允许用户修改认证页代入信息:
|
||||
* 0:不允许
|
||||
* 1:允许(默认)
|
||||
*/
|
||||
private String allowModify = "0";
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.personal;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RegisterResponse {
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private GetRegisterData data;
|
||||
|
||||
private String requestId;
|
||||
|
||||
/**
|
||||
* 根据统一标签列表 - 详细数据
|
||||
*/
|
||||
@Data
|
||||
public static class GetRegisterData {
|
||||
|
||||
/**
|
||||
* 实名注册H5链接
|
||||
*/
|
||||
private String h5Url;
|
||||
|
||||
/**
|
||||
* 实名注册PC链接
|
||||
*/
|
||||
private String pcUrl;
|
||||
|
||||
/**
|
||||
* 接入方用户唯一标识
|
||||
*/
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 个人在放心签平台与接入方关联的唯一性标识
|
||||
*/
|
||||
private String unionId;
|
||||
}
|
||||
}
|
||||
@ -1,84 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.task;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AddTemplateTaskRequest {
|
||||
/**
|
||||
* 个人/企业主体在放心签平台与接入方关联的唯一性标识(发起方账号)
|
||||
*/
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 签署模板编号
|
||||
*/
|
||||
private String templateNo;
|
||||
|
||||
/**
|
||||
* 签署完成回调推送地址,
|
||||
* 签署任务中的每一位签署方签署成功以后都会推送。
|
||||
*/
|
||||
private String notifyUrl = "www.baidu.com";
|
||||
|
||||
/**
|
||||
* 签署方列表
|
||||
*/
|
||||
private List<signersData> signers;
|
||||
|
||||
/**
|
||||
* 通知,默认为0
|
||||
* 0:接口返回,不直接通知用户
|
||||
* 1:短信通知。如果选择1,则放心签会将签署链接通过短信的方式发送至签署方的手机当中
|
||||
*/
|
||||
private String notifyType = "0";
|
||||
|
||||
/**
|
||||
* 签署任务标题(长度最大值默认为50字符)
|
||||
*/
|
||||
private String taskTitle = "合作协议";
|
||||
|
||||
/**
|
||||
* 签署完成后跳转地址。不传则停留在放心签的页面。
|
||||
*/
|
||||
private String redirectUrl = "switchTab:/pages/index/index";
|
||||
|
||||
/**
|
||||
* 关键词替换
|
||||
*/
|
||||
private List<componentsData> components;
|
||||
|
||||
/**
|
||||
* 详细数据-签署方列表
|
||||
*/
|
||||
@Data
|
||||
public static class signersData {
|
||||
/**
|
||||
* 参与方别名标识(从"获取已配置的签署模版"接口返回参数中获取)
|
||||
*/
|
||||
private String signerNo;
|
||||
|
||||
/**
|
||||
* 个人/企业主体在放心签平台与接入方关联的唯一性标识 (签署方账号)
|
||||
*/
|
||||
private String signerUnionId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 详细数据-关键词替换
|
||||
*/
|
||||
@Data
|
||||
public static class componentsData {
|
||||
/**
|
||||
* 替换参数,对应saas平台控件编码
|
||||
*/
|
||||
private String fileKey;
|
||||
|
||||
/**
|
||||
* 替换内容
|
||||
*/
|
||||
private String fileValue;
|
||||
}
|
||||
}
|
||||
@ -1,28 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.task;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class AddTemplateTaskResponse {
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private AddTemplateTaskData data;
|
||||
|
||||
private String requestId;
|
||||
|
||||
/**
|
||||
* 详细数据
|
||||
*/
|
||||
@Data
|
||||
public static class AddTemplateTaskData {
|
||||
/**
|
||||
* 签署任务编号
|
||||
*/
|
||||
private String taskNo;
|
||||
}
|
||||
}
|
||||
@ -1,113 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.task;
|
||||
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.Base;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
public class FxqTask extends Base {
|
||||
/**
|
||||
* 获取已配置的签署模版
|
||||
*/
|
||||
public GetTemplateListResponse getTemplateList(String unionId){
|
||||
String url = getClientUrl() + "file/templates";
|
||||
|
||||
Map<String, Object> requestData = new HashMap<>();
|
||||
requestData.put("unionId", unionId); // 个人/企业主体在放心签平台与接入方关联的唯一性标识(发起方账号)
|
||||
|
||||
String jsonBody = JSONUtil.toJsonStr(requestData);
|
||||
|
||||
String response = postJson(url,jsonBody,null);
|
||||
GetTemplateListResponse result = JSONUtil.toBean(response, GetTemplateListResponse.class);
|
||||
if (result.getCode() != 10000){
|
||||
if (!Objects.equals(result.getMessage(), "")){
|
||||
throw new BusinessException(result.getMessage());
|
||||
}else{
|
||||
throw new BusinessException("失败");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取签署链接
|
||||
*/
|
||||
public GetTaskLinkResponse getTaskLink(String taskNo, String unionId){
|
||||
String url = getClientUrl() + "sign/task/link";
|
||||
|
||||
Map<String, Object> requestData = new HashMap<>();
|
||||
requestData.put("taskNo", taskNo); // 签署任务编号,创建签署任务时生成
|
||||
requestData.put("unionId", unionId); // 个人/企业在放心签平台的唯一性标识(签署方账号)
|
||||
|
||||
String jsonBody = JSONUtil.toJsonStr(requestData);
|
||||
log.info("获取app数据参数:{}",jsonBody);
|
||||
|
||||
String response = postJson(url,jsonBody,null);
|
||||
GetTaskLinkResponse result = JSONUtil.toBean(response, GetTaskLinkResponse.class);
|
||||
if (result.getCode() != 10000){
|
||||
if (!Objects.equals(result.getMessage(), "")){
|
||||
throw new BusinessException(result.getMessage());
|
||||
}else{
|
||||
throw new BusinessException("失败");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模版签署任务创建
|
||||
*/
|
||||
public AddTemplateTaskResponse addTemplateTask(AddTemplateTaskRequest r){
|
||||
String url = getClientUrl() + "sign/template_task/create";
|
||||
|
||||
String jsonBody = JSONUtil.toJsonStr(r);
|
||||
log.info("获取app数据参数:{}",jsonBody);
|
||||
|
||||
String response = postJson(url,jsonBody,null);
|
||||
AddTemplateTaskResponse result = JSONUtil.toBean(response, AddTemplateTaskResponse.class);
|
||||
if (result.getCode() != 10000){
|
||||
if (!Objects.equals(result.getMessage(), "")){
|
||||
throw new BusinessException(result.getMessage());
|
||||
}else{
|
||||
throw new BusinessException("失败");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 签署任务详情查询
|
||||
*/
|
||||
public GetTaskDetailResponse getTaskDetail(String taskNo, String unionId){
|
||||
String url = getClientUrl() + "sign/task/detail";
|
||||
|
||||
Map<String, Object> requestData = new HashMap<>();
|
||||
requestData.put("taskNo", taskNo); // 签署任务编号,创建签署任务时生成
|
||||
requestData.put("unionId", unionId); // 个人/企业在放心签平台的唯一性标识(签署方账号)
|
||||
|
||||
String jsonBody = JSONUtil.toJsonStr(requestData);
|
||||
log.info("获取app数据参数:{}",jsonBody);
|
||||
|
||||
String response = postJson(url,jsonBody,null);
|
||||
GetTaskDetailResponse result = JSONUtil.toBean(response, GetTaskDetailResponse.class);
|
||||
if (result.getCode() != 10000){
|
||||
if (!Objects.equals(result.getMessage(), "")){
|
||||
throw new BusinessException(result.getMessage());
|
||||
}else{
|
||||
throw new BusinessException("失败");
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.task;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GetTaskDetailResponse {
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private GetTaskDetailData data;
|
||||
|
||||
private String requestId;
|
||||
|
||||
/**
|
||||
* 详细数据
|
||||
*/
|
||||
@Data
|
||||
public static class GetTaskDetailData {
|
||||
|
||||
/**
|
||||
* 签署详情
|
||||
*/
|
||||
private List<contractsData> contracts;
|
||||
|
||||
/**
|
||||
* 签署任务编号,创建签署任务时接口返回
|
||||
*/
|
||||
private String taskNo;
|
||||
|
||||
/**
|
||||
* 签署任务状态:
|
||||
* -30:已过期
|
||||
* -20:已撤销
|
||||
* -10:已拒签
|
||||
* 0:发起签署
|
||||
* 5:待编辑
|
||||
* 10:待签署
|
||||
* 20:已完成
|
||||
*/
|
||||
private Integer taskStatus;
|
||||
}
|
||||
|
||||
/**
|
||||
* 详细数据-合同文件信息
|
||||
*/
|
||||
@Data
|
||||
public static class contractsData {
|
||||
/**
|
||||
* 签署任务编号
|
||||
*/
|
||||
private String contractNo;
|
||||
|
||||
/**
|
||||
* 签署文件预览地址
|
||||
*/
|
||||
private String contractUrl;
|
||||
|
||||
/**
|
||||
* 签署人信息
|
||||
*/
|
||||
private List<T> signers;
|
||||
}
|
||||
}
|
||||
@ -1,77 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.task;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GetTaskLinkResponse {
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private GetTaskLinkData data;
|
||||
|
||||
private String requestId;
|
||||
|
||||
/**
|
||||
* 详细数据
|
||||
*/
|
||||
@Data
|
||||
public static class GetTaskLinkData {
|
||||
|
||||
/**
|
||||
* 签署详情
|
||||
*/
|
||||
private List<taskDetailsData> taskDetails;
|
||||
|
||||
/**
|
||||
* 签署任务编号
|
||||
*/
|
||||
private String taskNo;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 详细数据-签署详情
|
||||
*/
|
||||
@Data
|
||||
public static class taskDetailsData {
|
||||
/**
|
||||
* 签署链接(H5)
|
||||
*/
|
||||
private String signH5Url;
|
||||
|
||||
/**
|
||||
* 签署链接(PC)
|
||||
*/
|
||||
private String signPCUrl;
|
||||
|
||||
/**
|
||||
* 签署状态:
|
||||
* 1:可签署
|
||||
* 2:已签署
|
||||
* 3:拒绝签署
|
||||
* 9:不可签署(用于顺序签)
|
||||
*/
|
||||
private String signStatus;
|
||||
|
||||
/**
|
||||
* 签署顺序
|
||||
*/
|
||||
private String sortNum;
|
||||
|
||||
/**
|
||||
* 签署顺序模式:
|
||||
* 1:有序
|
||||
* 2:无序
|
||||
*/
|
||||
private String sortType;
|
||||
|
||||
/**
|
||||
* 个人/企业在放心签平台的唯一性标识(签署方账号)
|
||||
*/
|
||||
private String unionId;
|
||||
}
|
||||
}
|
||||
@ -1,85 +0,0 @@
|
||||
package net.lab1024.sa.admin.extend.fangxinqian.task;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GetTemplateListResponse {
|
||||
private int code;
|
||||
|
||||
private String message;
|
||||
|
||||
private List<GetTemplateListData> data;
|
||||
|
||||
private String requestId;
|
||||
|
||||
/**
|
||||
* 详细数据
|
||||
*/
|
||||
@Data
|
||||
public static class GetTemplateListData {
|
||||
|
||||
/**
|
||||
* 参与方
|
||||
*/
|
||||
private List<signersData> signers;
|
||||
|
||||
/**
|
||||
* 签署模板编号
|
||||
*/
|
||||
private String templateNo;
|
||||
|
||||
/**
|
||||
* 签署模板标题
|
||||
*/
|
||||
private String title;
|
||||
}
|
||||
|
||||
/**
|
||||
* 详细数据 -参与方
|
||||
*/
|
||||
@Data
|
||||
public static class signersData {
|
||||
/**
|
||||
* 编辑顺序
|
||||
*/
|
||||
private Integer fillOrder;
|
||||
|
||||
/**
|
||||
* 编辑权限 true or false
|
||||
*/
|
||||
private boolean fillRole;
|
||||
|
||||
/**
|
||||
* 参与方别名
|
||||
*/
|
||||
private String label;
|
||||
|
||||
/**
|
||||
* 是否平台自动落章 true or false
|
||||
*/
|
||||
private boolean platFormSign;
|
||||
|
||||
/**
|
||||
* 签署顺序
|
||||
*/
|
||||
private Integer signOrder;
|
||||
|
||||
/**
|
||||
* 签署权限 true or false
|
||||
*/
|
||||
private boolean signRole;
|
||||
|
||||
/**
|
||||
* 参与方别名标识
|
||||
*/
|
||||
private String signerNo;
|
||||
|
||||
/**
|
||||
* 参与方类型: 1-个人;2-企业
|
||||
*/
|
||||
private Integer type;
|
||||
}
|
||||
}
|
||||
@ -6,13 +6,10 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 专家表-白名单实体类
|
||||
*/
|
||||
@TableName("`t_caseplatform_expert_white`") // 指定数据库表名
|
||||
@Data
|
||||
public class ExpertWhiteEntity {
|
||||
/**
|
||||
* 主键
|
||||
@ -20,12 +17,6 @@ public class ExpertWhiteEntity {
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@ -33,10 +24,22 @@ public class ExpertWhiteEntity {
|
||||
private String mobile;
|
||||
|
||||
/**
|
||||
* 状态(1:正常 2:无效)
|
||||
* 姓名
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
@TableField("photo")
|
||||
private String photo;
|
||||
|
||||
/**
|
||||
* 医院uuid
|
||||
*/
|
||||
@TableField("hospital_uuid")
|
||||
private String hospitalUuid;
|
||||
|
||||
/**
|
||||
* 医院名称
|
||||
@ -45,33 +48,21 @@ public class ExpertWhiteEntity {
|
||||
private String hospitalName;
|
||||
|
||||
/**
|
||||
* 省(行政区划代码)
|
||||
* 省ID
|
||||
*/
|
||||
@TableField("prov")
|
||||
private String prov;
|
||||
@TableField("prov_id")
|
||||
private Integer provinceId;
|
||||
|
||||
/**
|
||||
* 科室
|
||||
* 市ID
|
||||
*/
|
||||
@TableField("department")
|
||||
private String department;
|
||||
@TableField("city_id")
|
||||
private Integer cityId;
|
||||
|
||||
/**
|
||||
* 职称
|
||||
* 区ID
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 导入的json数据
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
@TableField("county_id")
|
||||
private Integer countyId;
|
||||
|
||||
}
|
||||
|
||||
@ -3,27 +3,17 @@ package net.lab1024.sa.admin.module.app.expert.controller;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.*;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.CasePlatformBankDao;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.CasePlatformBankEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqExpertTaskEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.vo.CasePlatformBankVo;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.vo.GetExpertSignVo;
|
||||
import net.lab1024.sa.admin.module.app.expert.service.ExpertService;
|
||||
import net.lab1024.sa.admin.module.app.expert.service.ExpertWhiteEntityService;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.dao.MedicalRecorDao;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.area.domain.vo.ProvVO;
|
||||
import net.lab1024.sa.admin.module.business.area.service.AreaService;
|
||||
import net.lab1024.sa.admin.module.business.bankcard.domain.form.CaseplatformBankAddForm;
|
||||
import net.lab1024.sa.admin.module.business.bankcard.service.CaseplatformBankService;
|
||||
import net.lab1024.sa.admin.module.business.captcha.service.CaptchaService;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.entity.CaseplatformAcAppEntity;
|
||||
import net.lab1024.sa.admin.module.system.login.service.LoginService;
|
||||
import net.lab1024.sa.common.common.annoation.NoNeedLogin;
|
||||
import net.lab1024.sa.common.common.constant.RequestHeaderConst;
|
||||
@ -31,14 +21,19 @@ import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.common.common.util.Sha256Util;
|
||||
import net.lab1024.sa.common.common.util.SmartBeanUtil;
|
||||
import net.lab1024.sa.common.common.util.SmartRequestUtil;
|
||||
import net.lab1024.sa.common.common.wangyi.yidun.sdk.BankCardCheckAPI;
|
||||
import net.lab1024.sa.common.module.support.captcha.domain.CaptchaVO;
|
||||
import net.lab1024.sa.common.module.support.config.ConfigKeyEnum;
|
||||
import net.lab1024.sa.common.module.support.config.ConfigService;
|
||||
import net.lab1024.sa.common.module.support.config.domain.ConfigVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@ -120,12 +115,6 @@ public class ExpertController {
|
||||
@Autowired
|
||||
private ExpertWhiteEntityService expertWhiteEntityService;
|
||||
|
||||
@Autowired
|
||||
private CasePlatformBankDao casePlatformBankDao;
|
||||
|
||||
@Autowired
|
||||
private CaseplatformBankService caseplatformBankService;
|
||||
|
||||
@ApiOperation("获取验证码")
|
||||
@GetMapping("/user/getCaptcha")
|
||||
@NoNeedLogin
|
||||
@ -238,9 +227,10 @@ public class ExpertController {
|
||||
Integer city_id = (Integer) data.get("city_id");
|
||||
|
||||
// 获取白名单用户-姓名、医院名称
|
||||
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(mobile,name,hospital_name);
|
||||
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(name,hospital_name);
|
||||
if (expertWhiteEntity == null) {
|
||||
return ResponseDTO.error(NO_AUTH);
|
||||
responseDTO.setMsg("暂无登录权限");
|
||||
return responseDTO;
|
||||
}
|
||||
|
||||
ExpertEntity expert = new ExpertEntity();
|
||||
@ -260,14 +250,11 @@ public class ExpertController {
|
||||
ExpertEntity expertVO = expertService.addExpert(expert);
|
||||
ExpertLoginVO expertLoginVO = SmartBeanUtil.copy(expertVO, ExpertLoginVO.class);
|
||||
return ResponseDTO.app_ok(expertLoginVO);
|
||||
}
|
||||
|
||||
if (responseDTO.getMsg() == null){
|
||||
responseDTO.setMsg("登录失败");
|
||||
}
|
||||
|
||||
}else{
|
||||
responseDTO.setMsg("账号未注册,请您注册后登陆");
|
||||
return responseDTO;
|
||||
}
|
||||
}
|
||||
|
||||
@NoNeedLogin
|
||||
@ApiOperation("获取省市区")
|
||||
@ -483,9 +470,10 @@ public class ExpertController {
|
||||
Integer city_id = (Integer) data.get("city_id");
|
||||
|
||||
// 获取白名单用户-姓名、医院名称
|
||||
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(mobile,name,hospital_name);
|
||||
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(name,hospital_name);
|
||||
if (expertWhiteEntity == null) {
|
||||
return ResponseDTO.error(NO_AUTH);
|
||||
responseDTO.setMsg("暂无登录权限");
|
||||
return responseDTO;
|
||||
}
|
||||
|
||||
ExpertEntity expert = new ExpertEntity();
|
||||
@ -506,14 +494,10 @@ public class ExpertController {
|
||||
|
||||
ExpertLoginVO expertLoginVO = SmartBeanUtil.copy(expertVO, ExpertLoginVO.class);
|
||||
return ResponseDTO.app_ok(expertLoginVO);
|
||||
}
|
||||
|
||||
if (responseDTO.getMsg() == null){
|
||||
responseDTO.setMsg("登录失败");
|
||||
}
|
||||
|
||||
}else{
|
||||
return responseDTO;
|
||||
}
|
||||
}
|
||||
|
||||
@NoNeedLogin
|
||||
@ApiOperation(value = "获取待补充资料时候-HCP详情")
|
||||
@ -601,66 +585,4 @@ public class ExpertController {
|
||||
ResponseDTO responseDTO = JSON.parseObject(result, ResponseDTO.class);
|
||||
return responseDTO;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取专家银行卡数据
|
||||
*/
|
||||
@ApiOperation(value = "获取专家银行卡数据")
|
||||
@GetMapping("/user/getBank")
|
||||
public ResponseDTO<CasePlatformBankVo> getExpertSign() {
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
if (expertId == null) {
|
||||
return ResponseDTO.error(LOGIN_STATE_INVALID);
|
||||
}
|
||||
|
||||
// 获取银行卡数据
|
||||
LambdaQueryWrapper<CasePlatformBankEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CasePlatformBankEntity::getExpertId, expertId);
|
||||
CasePlatformBankEntity casePlatformBank = casePlatformBankDao.selectOne(queryWrapper);
|
||||
CasePlatformBankVo g = SmartBeanUtil.copy(casePlatformBank, CasePlatformBankVo.class);
|
||||
|
||||
return ResponseDTO.app_ok(g);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加专家银行卡数据
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加专家银行卡数据")
|
||||
@PostMapping("/user/addBank")
|
||||
public ResponseDTO<String> bankVerify(@RequestBody @Valid CaseplatformBankAddForm addForm) {
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
if (expertId == null) {
|
||||
return ResponseDTO.error(LOGIN_STATE_INVALID);
|
||||
}
|
||||
|
||||
boolean check = BankCardCheckAPI.check(addForm.getIdCardName(), addForm.getIdCardNo(), addForm.getBankCardNo());
|
||||
if(check){
|
||||
return caseplatformBankService.add(addForm);
|
||||
}else {
|
||||
return ResponseDTO.error(ExpertBankVerifyFail);
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("专家活动申请")
|
||||
@PostMapping("/caseplatformCase/activity")
|
||||
public ResponseDTO<String> addCaseplatformAcApp() {
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
if (expertId == null) {
|
||||
return ResponseDTO.error(LOGIN_STATE_INVALID);
|
||||
}
|
||||
|
||||
return expertService.addCaseplatformAcApp(expertId);
|
||||
}
|
||||
|
||||
@ApiOperation("专家活动申请查询")
|
||||
@GetMapping("/caseplatformCase/activity")
|
||||
public ResponseDTO<CaseplatformAcAppEntity> getCaseplatformAcApp() {
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
if (expertId == null) {
|
||||
return ResponseDTO.error(LOGIN_STATE_INVALID);
|
||||
}
|
||||
|
||||
return expertService.getCaseplatformAcApp(expertId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,204 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.controller;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.auth.GetAuthorizeResponse;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.task.GetTaskLinkResponse;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.*;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.*;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.*;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.vo.AddFxqVo;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.vo.GetExpertSignVo;
|
||||
import net.lab1024.sa.admin.module.app.expert.service.ExpertFxqService;
|
||||
import net.lab1024.sa.admin.module.app.expert.service.ExpertService;
|
||||
import net.lab1024.sa.admin.module.app.expert.service.ExpertWhiteEntityService;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.dao.MedicalRecorDao;
|
||||
import net.lab1024.sa.admin.module.business.area.domain.vo.ProvVO;
|
||||
import net.lab1024.sa.admin.module.business.area.service.AreaService;
|
||||
import net.lab1024.sa.admin.module.business.bankcard.domain.form.CaseplatformBankAddForm;
|
||||
import net.lab1024.sa.admin.module.business.captcha.service.CaptchaService;
|
||||
import net.lab1024.sa.admin.module.system.login.service.LoginService;
|
||||
import net.lab1024.sa.common.common.annoation.NoNeedLogin;
|
||||
import net.lab1024.sa.common.common.constant.RequestHeaderConst;
|
||||
import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import net.lab1024.sa.common.common.util.Sha256Util;
|
||||
import net.lab1024.sa.common.common.util.SmartBeanUtil;
|
||||
import net.lab1024.sa.common.common.util.SmartRequestUtil;
|
||||
import net.lab1024.sa.common.module.support.captcha.domain.CaptchaVO;
|
||||
import net.lab1024.sa.common.module.support.config.ConfigKeyEnum;
|
||||
import net.lab1024.sa.common.module.support.config.ConfigService;
|
||||
import net.lab1024.sa.common.module.support.config.domain.ConfigVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.io.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import static net.lab1024.sa.common.common.code.UserErrorCode.*;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@Api(tags = {AdminSwaggerTagConst.App.Expert})
|
||||
public class ExpertFxqController {
|
||||
@Resource
|
||||
private FxqExpertTaskDao fxqExpertTaskDao;
|
||||
|
||||
@Resource
|
||||
private ExpertFxqService expertFxqService;
|
||||
|
||||
@Resource
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
|
||||
@Resource
|
||||
private FxqUserDao fxqUserDao;
|
||||
|
||||
@Resource
|
||||
private FxqTemplateDao fxqTemplateDao;
|
||||
|
||||
@Resource
|
||||
private ExpertDao expertDao;
|
||||
|
||||
@Resource
|
||||
private FxqSignDao fxqSignDao;
|
||||
|
||||
/**
|
||||
* 获取专家协议签署详情
|
||||
*/
|
||||
@ApiOperation(value = "获取专家协议签署详情")
|
||||
@GetMapping("/expert/sign")
|
||||
public ResponseDTO<GetExpertSignVo> getExpertSign() {
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
if (expertId == null) {
|
||||
return ResponseDTO.error(LOGIN_STATE_INVALID);
|
||||
}
|
||||
|
||||
GetExpertSignVo g = new GetExpertSignVo();
|
||||
g.setTaskStatus(2);
|
||||
|
||||
// 获取专家协议签署详情
|
||||
LambdaQueryWrapper<FxqSignEntity> signQueryWrapper = new LambdaQueryWrapper<>();
|
||||
signQueryWrapper.eq(FxqSignEntity::getExpertId,expertId);
|
||||
signQueryWrapper.last("LIMIT 1");
|
||||
FxqSignEntity fxqSign = fxqSignDao.selectOne(signQueryWrapper);
|
||||
if (fxqSign == null) {
|
||||
return ResponseDTO.app_ok(g);
|
||||
}
|
||||
|
||||
// 已签署
|
||||
if (fxqSign.getSignStatus() == 1) {
|
||||
g.setTaskStatus(1);
|
||||
g.setTaskFileUrl(fxqSign.getSignLinkH5());
|
||||
return ResponseDTO.app_ok(g);
|
||||
}
|
||||
|
||||
// 签署任务详情查询
|
||||
FxqExpertTaskEntity fxqExpertTask = expertFxqService.getTaskDetail(fxqSign.getTaskId());
|
||||
if (fxqExpertTask == null) {
|
||||
return ResponseDTO.app_ok(g);
|
||||
}
|
||||
|
||||
// 已签署
|
||||
if (Objects.equals(fxqExpertTask.getTaskStatus(), "20")) {
|
||||
g.setTaskStatus(1);
|
||||
g.setTaskFileUrl(fxqExpertTask.getTaskLinkH5());
|
||||
return ResponseDTO.app_ok(g);
|
||||
}
|
||||
|
||||
return ResponseDTO.app_ok(g);
|
||||
}
|
||||
|
||||
/**
|
||||
* 放心签认证
|
||||
*/
|
||||
@ApiOperation(value = "放心签认证")
|
||||
@PostMapping("/expert/fxq")
|
||||
public ResponseDTO<AddFxqVo> addFxq() {
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
if (expertId == null) {
|
||||
return ResponseDTO.error(LOGIN_STATE_INVALID);
|
||||
}
|
||||
|
||||
// 获取专家数据
|
||||
ExpertEntity expert = expertDao.getExpert(expertId);
|
||||
if (expert == null) {
|
||||
return ResponseDTO.userErrorParam("操作失败");
|
||||
}
|
||||
|
||||
// 获取企业实名认证数据-个人
|
||||
LambdaQueryWrapper<FxqSignEntity> signQueryWrapper = new LambdaQueryWrapper<>();
|
||||
signQueryWrapper.eq(FxqSignEntity::getExpertId,expertId);
|
||||
signQueryWrapper.last("LIMIT 1");
|
||||
FxqSignEntity fxqSign = fxqSignDao.selectOne(signQueryWrapper);
|
||||
if (fxqSign != null) {
|
||||
if (fxqSign.getSignStatus() == 1) {
|
||||
return ResponseDTO.userErrorParam("您已签订协议,无需再次签订");
|
||||
}
|
||||
|
||||
// 其余状态下去查询签署任务详情获取状态
|
||||
// 签署任务详情查询
|
||||
FxqExpertTaskEntity fxqExpertTask = expertFxqService.getTaskDetail(fxqSign.getTaskId());
|
||||
if (fxqExpertTask != null) {
|
||||
if (Objects.equals(fxqExpertTask.getTaskStatus(), "20")) {
|
||||
// 已签署
|
||||
return ResponseDTO.userErrorParam("您已签订协议,无需再次签订");
|
||||
}
|
||||
|
||||
if (Objects.equals(fxqExpertTask.getTaskStatus(), "10")) {
|
||||
AddFxqVo g = new AddFxqVo();
|
||||
g.setTaskStatus(2);
|
||||
g.setLinkUrl(fxqSign.getSignLinkH5());
|
||||
return ResponseDTO.app_ok(g);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 获取企业放心签实名认证数据
|
||||
FxqCompanyEntity company = expertFxqService.getCompany();
|
||||
|
||||
// 获取个人放心签实名认证数据
|
||||
FxqUserEntity fxqUser = expertFxqService.getPersonal(expertId);
|
||||
|
||||
// 获取签署的模版数据
|
||||
FxqTemplateEntity fxqTemplate = expertFxqService.getTemplate(company.getId());
|
||||
|
||||
// 模版签署任务创建
|
||||
AddFxqVo g = expertFxqService.addTemplateTask(company,fxqUser,fxqTemplate,expert);
|
||||
|
||||
return ResponseDTO.app_ok(g);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取企业授权地址
|
||||
*/
|
||||
@ApiOperation(value = "获取企业授权地址")
|
||||
@GetMapping("/expert/auth")
|
||||
public ResponseDTO<String> getCompanyAuth() {
|
||||
|
||||
return ResponseDTO.app_ok();
|
||||
|
||||
// 以下暂不开放,过期时解开授权
|
||||
// // 获取静默签署的授权
|
||||
// GetAuthorizeResponse.GetAuthorizeData auth = expertFxqService.getAuthorize("56447a9865aa488caf6036fd00ddcbed");
|
||||
//
|
||||
// return ResponseDTO.app_ok(auth.getH5Url());
|
||||
}
|
||||
}
|
||||
@ -31,6 +31,7 @@ public class ExpertSignController {
|
||||
|
||||
/**
|
||||
* 获取专家 签名
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "获取专家 签名")
|
||||
@GetMapping("/user/getSign")
|
||||
@ -38,4 +39,21 @@ public class ExpertSignController {
|
||||
ExpertSignVO expertSign = expertSignService.getExpertSign();
|
||||
return ResponseDTO.app_ok(expertSign);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加专家 签名
|
||||
* 认证银行卡
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "添加专家 签名 & 认证银行卡")
|
||||
@PostMapping("/user/addBank")
|
||||
public ResponseDTO<String> bankVerify(@RequestBody @Valid CaseplatformBankAddForm addForm) {
|
||||
boolean check = BankCardCheckAPI.check(addForm.getName(), addForm.getIdCardNo(), addForm.getBankCardNo());
|
||||
if(check){
|
||||
return caseplatformBankService.add(addForm);
|
||||
}else {
|
||||
return ResponseDTO.error(ExpertBankVerifyFail);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.CasePlatformBankEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqExpertTaskEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface CasePlatformBankDao extends BaseMapper<CasePlatformBankEntity> {
|
||||
|
||||
}
|
||||
@ -1,19 +1,13 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertWhiteEntity;
|
||||
import net.lab1024.sa.admin.module.business.area.domain.vo.ProvVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformExpertWhiteQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.GetCaseplatformExpertWhitePageVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface ExpertWhiteEntityDao extends BaseMapper<ExpertWhiteEntity> {
|
||||
@ -22,13 +16,4 @@ public interface ExpertWhiteEntityDao extends BaseMapper<ExpertWhiteEntity> {
|
||||
|
||||
@Select("SELECT * FROM t_caseplatform_expert_white WHERE name = #{name} AND hospital_name = #{hospitalName}")
|
||||
ExpertWhiteEntity getExpertWhiteByNameAndHospital(@Param("name")String name, @Param("hospitalName")String hospitalName);
|
||||
|
||||
/**
|
||||
* 分页 查询
|
||||
*
|
||||
* @param page
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
List<GetCaseplatformExpertWhitePageVo> queryPage(Page page, @Param("queryForm") CaseplatformExpertWhiteQueryForm queryForm);
|
||||
}
|
||||
|
||||
@ -1,14 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertSignVO;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertWhiteEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqCompanyEntity;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface FxqCompanyDao extends BaseMapper<FxqCompanyEntity> {
|
||||
|
||||
}
|
||||
@ -1,12 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqExpertTaskEntity;
|
||||
import org.apache.ibatis.annotations.*;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface FxqExpertTaskDao extends BaseMapper<FxqExpertTaskEntity> {
|
||||
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqCompanyEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqSignEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface FxqSignDao extends BaseMapper<FxqSignEntity> {
|
||||
@Update("UPDATE t_caseplatform_fxq_sign " +
|
||||
"SET sign_status = #{signStatus}, update_time = NOW() " +
|
||||
"WHERE expert_id = #{expertId} AND task_id = #{taskId}")
|
||||
int updateSignStatus(@Param("expertId") Long expertId,
|
||||
@Param("taskId") Long taskId,
|
||||
@Param("signStatus") Integer signStatus);
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqCompanyEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqTemplateEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface FxqTemplateDao extends BaseMapper<FxqTemplateEntity> {
|
||||
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqCompanyEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqUserEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface FxqUserDao extends BaseMapper<FxqUserEntity> {
|
||||
|
||||
}
|
||||
@ -1,76 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.entity;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 病例平台-专家银行卡信息实体类
|
||||
*/
|
||||
@TableName("`t_caseplatform_bank`") // 对应数据库表名
|
||||
@Data
|
||||
public class CasePlatformBankEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 专家id
|
||||
*/
|
||||
@TableField("expert_id")
|
||||
private Long expertId;
|
||||
|
||||
/**
|
||||
* 身份证姓名
|
||||
*/
|
||||
@TableField("id_card_name")
|
||||
private String idCardName;
|
||||
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
@TableField("id_card_no")
|
||||
private String idCardNo;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
@TableField("bank_card_no")
|
||||
private String bankCardNo;
|
||||
|
||||
/**
|
||||
* 开户行名称
|
||||
*/
|
||||
@TableField("bank_name")
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 省ID
|
||||
*/
|
||||
@TableField("prov_id")
|
||||
private Integer provId;
|
||||
|
||||
/**
|
||||
* 市ID
|
||||
*/
|
||||
@TableField("city_id")
|
||||
private Integer cityId;
|
||||
|
||||
/**
|
||||
* 区ID
|
||||
*/
|
||||
@TableField("county_id")
|
||||
private Integer countyId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.entity;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 病例-放心签-公司主体实体类
|
||||
*/
|
||||
@TableName("`t_caseplatform_fxq_company`")
|
||||
@Data
|
||||
public class FxqCompanyEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 注册名
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 接入方用户唯一标识
|
||||
*/
|
||||
@TableField("uid")
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 企业主体在放心签平台与接入方关联的唯一性标识
|
||||
*/
|
||||
@TableField("union_id")
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 授权状态(1:已授权 2:未授权)
|
||||
*/
|
||||
@TableField("auth_status")
|
||||
private Integer authStatus;
|
||||
|
||||
/**
|
||||
* 授权过期日期
|
||||
*/
|
||||
@TableField("auth_expire_date")
|
||||
private LocalDateTime authExpireDate;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,89 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.entity;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 病例-放心签-签署任务实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName("`t_caseplatform_fxq_expert_task`") // 指定数据库表名
|
||||
public class FxqExpertTaskEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 专家id
|
||||
*/
|
||||
@TableField("expert_id")
|
||||
private Long expertId;
|
||||
|
||||
/**
|
||||
* 签署编号
|
||||
*/
|
||||
@TableField("task_no")
|
||||
private String taskNo;
|
||||
|
||||
/**
|
||||
* 签署模板id
|
||||
*/
|
||||
@TableField("template_id")
|
||||
private Long templateId;
|
||||
|
||||
/**
|
||||
* 签署任务状态:
|
||||
* -30:已过期
|
||||
* -20:已撤销
|
||||
* -10:已拒签
|
||||
* 0:发起签署
|
||||
* 5:待编辑
|
||||
* 10:待签署
|
||||
* 20:已完成
|
||||
*/
|
||||
@TableField("task_status")
|
||||
private String taskStatus;
|
||||
|
||||
/**
|
||||
* 签署状态(1:已签署 2:未签署)
|
||||
*/
|
||||
@TableField("sign_status")
|
||||
private Integer signStatus;
|
||||
|
||||
/**
|
||||
* 签署完成时间
|
||||
*/
|
||||
@TableField("sign_time")
|
||||
private LocalDateTime signTime;
|
||||
|
||||
/**
|
||||
* 协议地址-h5
|
||||
*/
|
||||
@TableField("task_link_h5")
|
||||
private String taskLinkH5;
|
||||
|
||||
/**
|
||||
* 协议地址-pc
|
||||
*/
|
||||
@TableField("task_link_pc")
|
||||
private String taskLinkPc;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,64 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.entity;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 病例-放心签-签署实体类
|
||||
*/
|
||||
@TableName("`t_caseplatform_fxq_sign`")
|
||||
@Data
|
||||
public class FxqSignEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 专家id
|
||||
*/
|
||||
@TableField("expert_id")
|
||||
private Long expertId;
|
||||
|
||||
/**
|
||||
* 任务编号
|
||||
*/
|
||||
@TableField("task_id")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 签署状态(1:已签署 2:未签署)
|
||||
*/
|
||||
@TableField("sign_status")
|
||||
private Integer signStatus;
|
||||
|
||||
/**
|
||||
* 协议地址-h5
|
||||
*/
|
||||
@TableField("sign_link_h5")
|
||||
private String signLinkH5;
|
||||
|
||||
/**
|
||||
* 协议地址-pc
|
||||
*/
|
||||
@TableField("sign_link_pc")
|
||||
private String signLinkPc;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,70 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.entity;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 病例-放心签-签署模板实体类
|
||||
*/
|
||||
@TableName("`t_caseplatform_fxq_template`")
|
||||
@Data
|
||||
public class FxqTemplateEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 公司id
|
||||
*/
|
||||
@TableField("company_id")
|
||||
private Long companyId;
|
||||
|
||||
/**
|
||||
* 签署模板编号
|
||||
*/
|
||||
@TableField("template_no")
|
||||
private String templateNo;
|
||||
|
||||
/**
|
||||
* 签署模板标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 参与方别名标识-企业
|
||||
*/
|
||||
@TableField("company_signer_no")
|
||||
private String companySignerNo;
|
||||
|
||||
/**
|
||||
* 参与方别名标识-个人
|
||||
*/
|
||||
@TableField("personal_signer_no")
|
||||
private String personalSignerNo;
|
||||
|
||||
/**
|
||||
* 模板数据
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.entity;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 病例-放心签-签署专家主体实体类
|
||||
*/
|
||||
@TableName("`t_caseplatform_fxq_user`")
|
||||
@Data
|
||||
public class FxqUserEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 专家id
|
||||
*/
|
||||
@TableField("expert_id")
|
||||
private Long expertId;
|
||||
|
||||
/**
|
||||
* 注册名
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 接入方用户唯一标识
|
||||
*/
|
||||
@TableField("uid")
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 个人在放心签平台与接入方关联的唯一性标识
|
||||
*/
|
||||
@TableField("union_id")
|
||||
private String unionId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@TableField("update_time")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
public class AddFxqForm {
|
||||
@ApiModelProperty("UUID")
|
||||
@NotBlank(message = "UUID 不能为空")
|
||||
private String uuid;
|
||||
|
||||
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AddFxqVo {
|
||||
/**
|
||||
* 签署状态(1:已签署 2:未签署)
|
||||
*/
|
||||
@ApiModelProperty(value = "签署状态", required = true)
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty(value = "链接地址", required = true)
|
||||
private String linkUrl;
|
||||
}
|
||||
@ -1,46 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.vo;
|
||||
|
||||
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.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class CasePlatformBankVo {
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "专家id")
|
||||
private Long expertId;
|
||||
|
||||
@ApiModelProperty(value = "身份证姓名")
|
||||
private String idCardName;
|
||||
|
||||
@ApiModelProperty(value = "身份证")
|
||||
private String idCardNo;
|
||||
|
||||
@ApiModelProperty(value = "银行卡")
|
||||
private String bankCardNo;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "开户行")
|
||||
private String bankName;
|
||||
|
||||
@ApiModelProperty(value = "省")
|
||||
private Integer provId;
|
||||
|
||||
@ApiModelProperty(value = "市")
|
||||
private Integer cityId;
|
||||
|
||||
@ApiModelProperty(value = "区")
|
||||
@JsonProperty("countyId")
|
||||
private Integer countyId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class FxqCompanyVo {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "注册名")
|
||||
private String name;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "接入方用户唯一标识")
|
||||
private String uid;
|
||||
|
||||
@ApiModelProperty(value = "企业主体在放心签平台与接入方关联的唯一性标识")
|
||||
private String unionId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "授权状态(1:已授权 2:未授权)")
|
||||
private Integer authStatus;
|
||||
|
||||
@ApiModelProperty(value = "授权过期日期")
|
||||
private LocalDateTime authExpireDate;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class FxqExpertTaskVo {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "专家id")
|
||||
private Long expertId;
|
||||
|
||||
@ApiModelProperty(value = "签署编号")
|
||||
private String taskNo;
|
||||
|
||||
@ApiModelProperty(value = "签署模板id")
|
||||
private Long templateId;
|
||||
|
||||
@ApiModelProperty(value = "签署任务状态:-30已过期,-20已撤销,-10已拒签,0发起签署,5待编辑,10待签署,20已完成")
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty(value = "签署状态(1:已签署 2:未签署)")
|
||||
private String signStatus;
|
||||
|
||||
@ApiModelProperty(value = "签署完成时间")
|
||||
private LocalDateTime signTime;
|
||||
|
||||
@ApiModelProperty(value = "签署协议的预览地址(只有签署成功后才存在)")
|
||||
private String taskFileUrl;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,37 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class FxqTemplateVo {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "公司id")
|
||||
private Long companyId;
|
||||
|
||||
@ApiModelProperty(value = "签署模板编号")
|
||||
private String templateNo;
|
||||
|
||||
@ApiModelProperty(value = "签署模板标题")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "参与方别名标识")
|
||||
private String signerNo;
|
||||
|
||||
@ApiModelProperty(value = "模板数据")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,33 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class FxqUserVo {
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "专家id")
|
||||
private Long expertId;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "注册名")
|
||||
private String name;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "接入方用户唯一标识")
|
||||
private String uid;
|
||||
|
||||
@ApiModelProperty(value = "个人在放心签平台与接入方关联的唯一性标识")
|
||||
private String unionId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class GetExpertSignVo {
|
||||
/**
|
||||
* 签署状态(1:已签署 2:未签署)
|
||||
*/
|
||||
@ApiModelProperty(value = "签署状态", required = true)
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty(value = "签署协议的预览地址(只有签署成功后才存在)", required = true)
|
||||
private String taskFileUrl;
|
||||
}
|
||||
@ -1,522 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.auth.Auth;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.auth.GetAuthorizeResponse;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.company.Company;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.company.RegisterPResponse;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.personal.Personal;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.personal.QueryResponse;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.personal.RegisterRequest;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.personal.RegisterResponse;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.task.*;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.*;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.*;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.vo.AddFxqVo;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.vo.GetExpertSignVo;
|
||||
import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.interceptor.TransactionAspectSupport;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service
|
||||
public class ExpertFxqService {
|
||||
@Resource
|
||||
private FxqCompanyDao fxqCompanyDao;
|
||||
|
||||
@Resource
|
||||
private ExpertDao expertDao;
|
||||
|
||||
@Resource
|
||||
private FxqUserDao fxqUserDao;
|
||||
|
||||
@Resource
|
||||
private FxqSignDao fxqSignDao;
|
||||
|
||||
@Resource
|
||||
private Company company;
|
||||
|
||||
@Resource
|
||||
private Personal personal;
|
||||
|
||||
@Resource
|
||||
private CasePlatformBankDao casePlatformBankDao;
|
||||
|
||||
@Resource
|
||||
private FxqTemplateDao fxqTemplateDao;
|
||||
|
||||
@Resource
|
||||
private FxqTask fxqTask;
|
||||
|
||||
@Resource
|
||||
private Auth auth;
|
||||
|
||||
@Resource
|
||||
private FxqExpertTaskDao fxqExpertTaskDao;
|
||||
|
||||
/**
|
||||
* 获取企业放心签实名认证数据
|
||||
*/
|
||||
@Transactional
|
||||
public FxqCompanyEntity getCompany(){
|
||||
try {
|
||||
// 获取企业实名认证数据-个人
|
||||
LambdaQueryWrapper<FxqCompanyEntity> personalQueryWrapper = new LambdaQueryWrapper<>();
|
||||
personalQueryWrapper.eq(FxqCompanyEntity::getUid, "houxinhui");
|
||||
FxqCompanyEntity personalFxqCompany = fxqCompanyDao.selectOne(personalQueryWrapper);
|
||||
if (personalFxqCompany == null) {
|
||||
// 个人实名认证
|
||||
RegisterRequest r = new RegisterRequest();
|
||||
r.setUid("houxinhui");
|
||||
r.setName("侯新晖");
|
||||
r.setMobile("18610396804");
|
||||
r.setIdentNo("412901197202131005");
|
||||
RegisterResponse personalRegister = personal.register(r);
|
||||
if (personalRegister.getData() == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
// 添加数据库
|
||||
FxqCompanyEntity fxqCompanyData = new FxqCompanyEntity();
|
||||
fxqCompanyData.setName("侯新晖");
|
||||
fxqCompanyData.setUid("houxinhui");
|
||||
fxqCompanyData.setUnionId(personalRegister.getData().getUnionId());
|
||||
fxqCompanyData.setCreateTime(LocalDateTime.now());
|
||||
int res = fxqCompanyDao.insert(fxqCompanyData);
|
||||
if (res <= 0){
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
personalFxqCompany = fxqCompanyData;
|
||||
}
|
||||
|
||||
// 获取企业实名认证数据-公司
|
||||
LambdaQueryWrapper<FxqCompanyEntity> companyQueryWrapper = new LambdaQueryWrapper<>();
|
||||
companyQueryWrapper.eq(FxqCompanyEntity::getUid, "bjyykxjsfzxh");
|
||||
FxqCompanyEntity companyFxqCompany = fxqCompanyDao.selectOne(companyQueryWrapper);
|
||||
if (companyFxqCompany == null) {
|
||||
RegisterPResponse registerP = company.registerCResponse(personalFxqCompany.getUnionId());
|
||||
if (registerP.getData() == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
// 添加数据库
|
||||
FxqCompanyEntity fxqCompanyData = new FxqCompanyEntity();
|
||||
fxqCompanyData.setName("北京医药科学技术发展协会");
|
||||
fxqCompanyData.setUid("bjyykxjsfzxh");
|
||||
fxqCompanyData.setUnionId(registerP.getData().getUnionId());
|
||||
fxqCompanyData.setCreateTime(LocalDateTime.now());
|
||||
int res = fxqCompanyDao.insert(fxqCompanyData);
|
||||
if (res <= 0){
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
companyFxqCompany = fxqCompanyData;
|
||||
}
|
||||
|
||||
return companyFxqCompany;
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取个人放心签实名认证数据
|
||||
*/
|
||||
@Transactional
|
||||
public FxqUserEntity getPersonal(Long expertId){
|
||||
try {
|
||||
// 获取专家信息
|
||||
ExpertEntity expert = expertDao.getExpert(expertId);
|
||||
if (expert == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
// 获取个人实名认证数据
|
||||
LambdaQueryWrapper<FxqUserEntity> personalQueryWrapper = new LambdaQueryWrapper<>();
|
||||
personalQueryWrapper.eq(FxqUserEntity::getExpertId, expertId);
|
||||
FxqUserEntity fxqUser = fxqUserDao.selectOne(personalQueryWrapper);
|
||||
if (fxqUser == null) {
|
||||
// 获取个人银行卡信息
|
||||
LambdaQueryWrapper<CasePlatformBankEntity> bankQueryWrapper = new LambdaQueryWrapper<>();
|
||||
bankQueryWrapper.eq(CasePlatformBankEntity::getExpertId, expertId);
|
||||
CasePlatformBankEntity casePlatformBank = casePlatformBankDao.selectOne(bankQueryWrapper);
|
||||
if (casePlatformBank == null) {
|
||||
throw new BusinessException("请绑定银行卡后重试");
|
||||
}
|
||||
|
||||
RegisterRequest r = new RegisterRequest();
|
||||
String uid = String.format("%010d",casePlatformBank.getExpertId());
|
||||
|
||||
r.setUid(uid);
|
||||
r.setName(casePlatformBank.getIdCardName());
|
||||
r.setMobile(expert.getMobile());
|
||||
r.setIdentNo(casePlatformBank.getIdCardNo());
|
||||
RegisterResponse personalRegister = personal.register(r);
|
||||
|
||||
String unionId = "";
|
||||
if (personalRegister.getCode() == 50005){
|
||||
// 账号在放心签已存在
|
||||
QueryResponse personalQuery = personal.query(uid,expert.getMobile());
|
||||
if (personalQuery.getData() == null) {
|
||||
throw new BusinessException("实名认证失败");
|
||||
}
|
||||
|
||||
unionId = personalQuery.getData().getUnionId();
|
||||
}else{
|
||||
if (personalRegister.getData() == null) {
|
||||
throw new BusinessException("实名认证失败");
|
||||
}
|
||||
|
||||
unionId = personalRegister.getData().getUnionId();
|
||||
}
|
||||
|
||||
// 添加数据库
|
||||
FxqUserEntity fxqUserData = new FxqUserEntity();
|
||||
fxqUserData.setExpertId(casePlatformBank.getExpertId());
|
||||
fxqUserData.setName(casePlatformBank.getIdCardName());
|
||||
fxqUserData.setUid(uid);
|
||||
fxqUserData.setUnionId(unionId);
|
||||
fxqUserData.setCreateTime(LocalDateTime.now());
|
||||
int res = fxqUserDao.insert(fxqUserData);
|
||||
if (res <= 0){
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return null;
|
||||
}
|
||||
|
||||
fxqUser = fxqUserData;
|
||||
}
|
||||
|
||||
return fxqUser;
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取签署的模版数据
|
||||
* 这里只会有一个模版,获取第一个
|
||||
*/
|
||||
@Transactional
|
||||
public FxqTemplateEntity getTemplate(Long companyId){
|
||||
try {
|
||||
// 获取企业实名认证数据-公司
|
||||
LambdaQueryWrapper<FxqCompanyEntity> companyQueryWrapper = new LambdaQueryWrapper<>();
|
||||
companyQueryWrapper.eq(FxqCompanyEntity::getUid, "bjyykxjsfzxh");
|
||||
FxqCompanyEntity companyFxqCompany = fxqCompanyDao.selectOne(companyQueryWrapper);
|
||||
if (companyFxqCompany == null) {
|
||||
throw new BusinessException("操作失败4");
|
||||
}
|
||||
|
||||
// 获取数据库模版数据
|
||||
LambdaQueryWrapper<FxqTemplateEntity> templateQueryWrapper = new LambdaQueryWrapper<>();
|
||||
templateQueryWrapper.eq(FxqTemplateEntity::getCompanyId, companyId);
|
||||
List<FxqTemplateEntity> fxqTemplates = fxqTemplateDao.selectList(templateQueryWrapper);
|
||||
if (fxqTemplates == null || fxqTemplates.isEmpty()){
|
||||
// 获取企业模版数据
|
||||
GetTemplateListResponse templateList = fxqTask.getTemplateList(companyFxqCompany.getUnionId());
|
||||
if (templateList.getData() == null || templateList.getData().isEmpty()) {
|
||||
throw new BusinessException("操作失败3");
|
||||
}
|
||||
|
||||
for (GetTemplateListResponse.GetTemplateListData data : templateList.getData()) {
|
||||
if (data.getSigners() == null || data.getSigners().isEmpty()) {
|
||||
throw new BusinessException("操作失败2");
|
||||
}
|
||||
|
||||
String companySignerNo = "";
|
||||
String personalSignerNo = "";
|
||||
// 获取参与方别名标识
|
||||
for (GetTemplateListResponse.signersData signersData : data.getSigners()) {
|
||||
if (signersData.getType() == 2){
|
||||
companySignerNo = signersData.getSignerNo();
|
||||
}
|
||||
|
||||
if (signersData.getType() == 1){
|
||||
personalSignerNo = signersData.getSignerNo();
|
||||
}
|
||||
}
|
||||
|
||||
if (Objects.equals(companySignerNo, "") || Objects.equals(personalSignerNo, "")){
|
||||
throw new BusinessException("操作失败1");
|
||||
}
|
||||
|
||||
// 检测是否存在
|
||||
LambdaQueryWrapper<FxqTemplateEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(FxqTemplateEntity::getTemplateNo, data.getTemplateNo());
|
||||
FxqTemplateEntity fxqTemplate = fxqTemplateDao.selectOne(queryWrapper);
|
||||
if (fxqTemplate == null) {
|
||||
FxqTemplateEntity fxqTemplateData = new FxqTemplateEntity();
|
||||
fxqTemplateData.setCompanyId(companyId);
|
||||
fxqTemplateData.setTemplateNo(data.getTemplateNo());
|
||||
fxqTemplateData.setTitle(data.getTitle());
|
||||
fxqTemplateData.setCompanySignerNo(companySignerNo);
|
||||
fxqTemplateData.setPersonalSignerNo(personalSignerNo);
|
||||
fxqTemplateData.setContent(templateList.getData().toString());
|
||||
fxqTemplateData.setCreateTime(LocalDateTime.now());
|
||||
int res = fxqTemplateDao.insert(fxqTemplateData);
|
||||
if (res <= 0){
|
||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fxqTemplates = fxqTemplateDao.selectList(templateQueryWrapper);
|
||||
if (fxqTemplates == null || fxqTemplates.isEmpty()) {
|
||||
throw new BusinessException("操作失败:未找到合适模版");
|
||||
}
|
||||
|
||||
FxqTemplateEntity fxqTemplate = null;
|
||||
for (FxqTemplateEntity m : fxqTemplates) {
|
||||
if (m.getTemplateNo().equals("FT1751936689226311")) {
|
||||
fxqTemplate = m;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (fxqTemplate == null) {
|
||||
throw new BusinessException("操作失败:未找到合适模版");
|
||||
}
|
||||
|
||||
return fxqTemplate;
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取签署链接
|
||||
*/
|
||||
public GetTaskLinkResponse.taskDetailsData getTaskLink(String taskNo, String unionId){
|
||||
GetTaskLinkResponse taskLink = fxqTask.getTaskLink(taskNo,unionId);
|
||||
if (taskLink.getData() == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
if (taskLink.getData().getTaskDetails() == null || taskLink.getData().getTaskDetails().isEmpty()) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
return taskLink.getData().getTaskDetails().get(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* 模版签署任务创建
|
||||
*/
|
||||
@Transactional
|
||||
public AddFxqVo addTemplateTask(FxqCompanyEntity company, FxqUserEntity fxqUser, FxqTemplateEntity fxqTemplate,ExpertEntity expert){
|
||||
try {
|
||||
// 授权处理
|
||||
if (company.getAuthStatus() == 1){
|
||||
if (company.getAuthExpireDate() != null && company.getAuthExpireDate().isBefore(LocalDateTime.now())) {
|
||||
// 已授权但已过期
|
||||
throw new BusinessException("操作失败:请联系客服人员更换授权");
|
||||
}
|
||||
}else{
|
||||
// 未授权
|
||||
throw new BusinessException("操作失败:请联系客服人员更换授权");
|
||||
}
|
||||
|
||||
// 需创建模版任务
|
||||
AddTemplateTaskRequest r = new AddTemplateTaskRequest();
|
||||
r.setUnionId(company.getUnionId());
|
||||
r.setTemplateNo(fxqTemplate.getTemplateNo());
|
||||
|
||||
// 初始化 signers 列表
|
||||
List<AddTemplateTaskRequest.signersData> signersList = new ArrayList<>();
|
||||
|
||||
AddTemplateTaskRequest.signersData signer = new AddTemplateTaskRequest.signersData();
|
||||
signer.setSignerNo(fxqTemplate.getCompanySignerNo());
|
||||
signer.setSignerUnionId(company.getUnionId());
|
||||
signersList.add(signer);
|
||||
|
||||
signer = new AddTemplateTaskRequest.signersData();
|
||||
signer.setSignerNo(fxqTemplate.getPersonalSignerNo());
|
||||
signer.setSignerUnionId(fxqUser.getUnionId());
|
||||
signersList.add(signer);
|
||||
|
||||
r.setSigners(signersList);
|
||||
|
||||
// 初始化 components 列表
|
||||
List<AddTemplateTaskRequest.componentsData> componentsList = new ArrayList<>();
|
||||
|
||||
// 乙方姓名
|
||||
AddTemplateTaskRequest.componentsData name = new AddTemplateTaskRequest.componentsData();
|
||||
name.setFileKey("name");
|
||||
name.setFileValue(fxqUser.getName());
|
||||
componentsList.add(name);
|
||||
|
||||
// 乙方工作单位
|
||||
AddTemplateTaskRequest.componentsData work = new AddTemplateTaskRequest.componentsData();
|
||||
work.setFileKey("work");
|
||||
work.setFileValue(expert.getHospitalName());
|
||||
componentsList.add(work);
|
||||
|
||||
// 乙方联系电话
|
||||
AddTemplateTaskRequest.componentsData mobile = new AddTemplateTaskRequest.componentsData();
|
||||
mobile.setFileKey("mobile");
|
||||
mobile.setFileValue(expert.getMobile());
|
||||
componentsList.add(mobile);
|
||||
|
||||
r.setComponents(componentsList);
|
||||
|
||||
AddTemplateTaskResponse templateTask = fxqTask.addTemplateTask(r);
|
||||
if (templateTask.getData() == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
if (templateTask.getData().getTaskNo() == null || templateTask.getData().getTaskNo().isEmpty()) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
// 获取签署链接
|
||||
GetTaskLinkResponse.taskDetailsData fxqLink = getTaskLink(templateTask.getData().getTaskNo(),fxqUser.getUnionId());
|
||||
if (fxqLink == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
if (!Objects.equals(fxqLink.getSignStatus(), "1")) {
|
||||
throw new BusinessException("签署状态错误");
|
||||
}
|
||||
|
||||
// 添加数据库-签署任务
|
||||
FxqExpertTaskEntity fxqExpertTaskData = new FxqExpertTaskEntity();
|
||||
fxqExpertTaskData.setExpertId(fxqUser.getExpertId());
|
||||
fxqExpertTaskData.setTaskNo(templateTask.getData().getTaskNo());
|
||||
fxqExpertTaskData.setTemplateId(fxqTemplate.getId());
|
||||
fxqExpertTaskData.setTaskStatus("10");
|
||||
fxqExpertTaskData.setSignStatus(2);
|
||||
fxqExpertTaskData.setTaskLinkH5(fxqLink.getSignH5Url());
|
||||
fxqExpertTaskData.setTaskLinkPc(fxqLink.getSignPCUrl());
|
||||
fxqExpertTaskData.setCreateTime(LocalDateTime.now());
|
||||
int res = fxqExpertTaskDao.insert(fxqExpertTaskData);
|
||||
if (res <= 0){
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<FxqSignEntity> signQueryWrapper = new LambdaQueryWrapper<>();
|
||||
signQueryWrapper.eq(FxqSignEntity::getExpertId,fxqUser.getExpertId());
|
||||
FxqSignEntity fxqSign = fxqSignDao.selectOne(signQueryWrapper);
|
||||
if (fxqSign == null) {
|
||||
// 添加数据库-签署
|
||||
FxqSignEntity fxqSignData = new FxqSignEntity();
|
||||
fxqSignData.setExpertId(fxqUser.getExpertId());
|
||||
fxqSignData.setTaskId(fxqExpertTaskData.getId());
|
||||
fxqSignData.setSignStatus(2);
|
||||
fxqSignData.setSignLinkH5(fxqLink.getSignH5Url());
|
||||
fxqSignData.setSignLinkPc(fxqLink.getSignPCUrl());
|
||||
fxqSignData.setCreateTime(LocalDateTime.now());
|
||||
res = fxqSignDao.insert(fxqSignData);
|
||||
if (res <= 0){
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
}else{
|
||||
if (fxqSign.getSignStatus() == 1){
|
||||
// 已签署
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
fxqSign.setTaskId(fxqExpertTaskData.getId());
|
||||
fxqSign.setSignLinkH5(fxqLink.getSignH5Url());
|
||||
fxqSign.setSignLinkPc(fxqLink.getSignPCUrl());
|
||||
fxqSignDao.updateById(fxqSign);
|
||||
}
|
||||
|
||||
if (Objects.equals(templateTask.getData().getTaskNo(), "")){
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
AddFxqVo g = new AddFxqVo();
|
||||
g.setTaskStatus(2);
|
||||
g.setLinkUrl(fxqLink.getSignH5Url());
|
||||
return g;
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 签署任务详情查询
|
||||
*/
|
||||
public FxqExpertTaskEntity getTaskDetail(Long taskId){
|
||||
// 获取签署任务
|
||||
// LambdaQueryWrapper<FxqExpertTaskEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
// queryWrapper.eq(FxqExpertTaskEntity::getExpertId, expertId);
|
||||
// queryWrapper.in(FxqExpertTaskEntity::getTaskStatus, "0","10","20");
|
||||
FxqExpertTaskEntity fxqExpertTask = fxqExpertTaskDao.selectById(taskId);
|
||||
if (fxqExpertTask == null){
|
||||
// 未签署
|
||||
return null;
|
||||
}
|
||||
|
||||
// 已完成
|
||||
if (Objects.equals(fxqExpertTask.getTaskStatus(), "20")) {
|
||||
return fxqExpertTask;
|
||||
}
|
||||
|
||||
// 获取企业实名认证数据-公司
|
||||
LambdaQueryWrapper<FxqCompanyEntity> companyQueryWrapper = new LambdaQueryWrapper<>();
|
||||
companyQueryWrapper.eq(FxqCompanyEntity::getUid, "bjyykxjsfzxh");
|
||||
FxqCompanyEntity companyFxqCompany = fxqCompanyDao.selectOne(companyQueryWrapper);
|
||||
if (companyFxqCompany == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
GetTaskDetailResponse taskLink = fxqTask.getTaskDetail(fxqExpertTask.getTaskNo(),companyFxqCompany.getUnionId());
|
||||
if (taskLink.getData() == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
// 修改签署状态
|
||||
if (taskLink.getData().getTaskNo() == null || taskLink.getData().getTaskNo().isEmpty()) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
if (!taskLink.getData().getTaskNo().equals(fxqExpertTask.getTaskNo())){
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
// 修改状态-签署任务
|
||||
fxqExpertTask.setTaskStatus(String.valueOf(taskLink.getData().getTaskStatus()));
|
||||
|
||||
// 修改专家签署任务表
|
||||
if (taskLink.getData().getTaskStatus() == 20){
|
||||
int rows = fxqSignDao.updateSignStatus(fxqExpertTask.getExpertId(), taskId,1);
|
||||
if (rows == 0) {
|
||||
throw new BusinessException("更新失败,未找到符合条件的记录");
|
||||
}
|
||||
|
||||
fxqExpertTask.setSignStatus(1);
|
||||
}
|
||||
|
||||
fxqExpertTaskDao.updateById(fxqExpertTask);
|
||||
|
||||
return fxqExpertTask;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取静默签署的授权
|
||||
*/
|
||||
public GetAuthorizeResponse.GetAuthorizeData getAuthorize(String unionId){
|
||||
GetAuthorizeResponse result = auth.getAuthorize(unionId);
|
||||
if (result.getData() == null) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
if (result.getData().getH5Url() == null || result.getData().getH5Url().isEmpty()) {
|
||||
throw new BusinessException("操作失败");
|
||||
}
|
||||
|
||||
return result.getData();
|
||||
}
|
||||
}
|
||||
@ -1,14 +1,10 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertVO;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.ExpertDao;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.dao.MedicalRecorDao;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordEntity;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseStatusEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.dao.CaseplatformAcAppDao;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.entity.CaseplatformAcAppEntity;
|
||||
import net.lab1024.sa.admin.module.business.token.service.TokenService;
|
||||
import net.lab1024.sa.admin.module.system.login.service.LoginService;
|
||||
import net.lab1024.sa.common.common.domain.RequestUser;
|
||||
@ -21,9 +17,6 @@ import net.lab1024.sa.common.module.support.token.LoginDeviceEnum;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Service
|
||||
public class ExpertService {
|
||||
|
||||
@ -38,11 +31,6 @@ public class ExpertService {
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private CaseplatformAcAppDao caseplatformAcAppDao;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据id 查询
|
||||
@ -90,42 +78,5 @@ public class ExpertService {
|
||||
return addForm;
|
||||
}
|
||||
|
||||
/**
|
||||
* 专家活动申请
|
||||
*/
|
||||
public ResponseDTO<String> addCaseplatformAcApp(Long expertId) {
|
||||
LambdaQueryWrapper<CaseplatformAcAppEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CaseplatformAcAppEntity::getExpertId,expertId);
|
||||
CaseplatformAcAppEntity caseplatformAcApp = caseplatformAcAppDao.selectOne(queryWrapper);
|
||||
if (caseplatformAcApp != null) {
|
||||
return ResponseDTO.app_ok();
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<MedicalRecordEntity> caseCountQueryWrapper = new LambdaQueryWrapper<>();
|
||||
caseCountQueryWrapper.eq(MedicalRecordEntity::getExpertId,expertId);
|
||||
caseCountQueryWrapper.eq(MedicalRecordEntity::getStatus, 1);
|
||||
Long caseCount = medicalRecorDao.selectCount(caseCountQueryWrapper);
|
||||
if (caseCount < 2){
|
||||
return ResponseDTO.userErrorParam("病例审核通过2份及以上可申请病例交流活动");
|
||||
}
|
||||
|
||||
CaseplatformAcAppEntity caseplatformAcAppData = new CaseplatformAcAppEntity();
|
||||
caseplatformAcAppData.setExpertId(expertId);
|
||||
caseplatformAcAppData.setStatus(2);
|
||||
caseplatformAcAppData.setCreateTime(LocalDateTime.now());
|
||||
caseplatformAcAppDao.insert(caseplatformAcAppData);
|
||||
|
||||
return ResponseDTO.app_ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 专家活动申请-查询
|
||||
*/
|
||||
public ResponseDTO<CaseplatformAcAppEntity> getCaseplatformAcApp(Long expertId) {
|
||||
LambdaQueryWrapper<CaseplatformAcAppEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CaseplatformAcAppEntity::getExpertId,expertId);
|
||||
CaseplatformAcAppEntity caseplatformAcApp = caseplatformAcAppDao.selectOne(queryWrapper);
|
||||
|
||||
return ResponseDTO.app_ok(caseplatformAcApp);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,12 +1,10 @@
|
||||
package net.lab1024.sa.admin.module.app.expert.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertVO;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertWhiteEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.ExpertDao;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.ExpertWhiteEntityDao;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.CasePlatformBankEntity;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.dao.MedicalRecorDao;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseStatusEnum;
|
||||
import net.lab1024.sa.admin.module.business.token.service.TokenService;
|
||||
@ -28,26 +26,12 @@ public class ExpertWhiteEntityService {
|
||||
* @param hospitalName 专家所属医院名称
|
||||
* @return 白名单类
|
||||
*/
|
||||
public ExpertWhiteEntity getExpertWhiteEntityByNameAndHospitalName(String mobile,String name, String hospitalName) {
|
||||
if ((name == null || hospitalName == null) && mobile == null) {
|
||||
public ExpertWhiteEntity getExpertWhiteEntityByNameAndHospitalName(String name, String hospitalName) {
|
||||
if (name == null || hospitalName == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (mobile != null){
|
||||
LambdaQueryWrapper<ExpertWhiteEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ExpertWhiteEntity::getMobile, mobile);
|
||||
queryWrapper.eq(ExpertWhiteEntity::getStatus, 1);
|
||||
ExpertWhiteEntity expertWhite = expertWhiteEntityDao.selectOne(queryWrapper);
|
||||
if (expertWhite != null) {
|
||||
return expertWhite;
|
||||
}
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<ExpertWhiteEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(ExpertWhiteEntity::getName, name);
|
||||
queryWrapper.eq(ExpertWhiteEntity::getHospitalName, hospitalName);
|
||||
queryWrapper.eq(ExpertWhiteEntity::getStatus, 1);
|
||||
return expertWhiteEntityDao.selectOne(queryWrapper);
|
||||
return expertWhiteEntityDao.getExpertWhiteByNameAndHospital(name, hospitalName);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,72 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.file.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
import net.lab1024.sa.admin.extend.baidubce.Ocr;
|
||||
import net.lab1024.sa.admin.module.app.file.domain.form.GetIdCardOcrForm;
|
||||
import net.lab1024.sa.admin.module.app.file.domain.form.GetImageOcrForm;
|
||||
import net.lab1024.sa.admin.module.app.file.domain.vo.GetIdCardOcrVo;
|
||||
import net.lab1024.sa.admin.module.app.file.domain.vo.GetImageOcrVo;
|
||||
import net.lab1024.sa.admin.module.app.file.service.OcrService;
|
||||
import net.lab1024.sa.admin.module.business.bankcard.domain.form.CaseplatformBankAddForm;
|
||||
import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.util.Base64;
|
||||
|
||||
@RestController
|
||||
@Api(tags = {AdminSwaggerTagConst.App.OSS})
|
||||
public class ImageController {
|
||||
|
||||
@Resource
|
||||
private OcrService ocrService;
|
||||
|
||||
@ApiOperation(value = "身份证识别-ocr")
|
||||
@PostMapping("/ocr/idCard")
|
||||
public ResponseDTO<GetIdCardOcrVo> getIdCardOcr(
|
||||
@RequestBody @Valid GetIdCardOcrForm form
|
||||
){
|
||||
if (form.getFrontBase64() == null || form.getFrontBase64().isEmpty()) {
|
||||
return ResponseDTO.userErrorParam("参数错误");
|
||||
}
|
||||
|
||||
try {
|
||||
// 解码 Base64 字符串为字节数组
|
||||
byte[] frontBytes = Base64.getDecoder().decode(form.getFrontBase64());
|
||||
|
||||
// 调用 Service
|
||||
GetIdCardOcrVo result = ocrService.getIdCardOcr(frontBytes);
|
||||
return ResponseDTO.app_ok(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
return ResponseDTO.userErrorParam("识别失败:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "通用文字识别-ocr")
|
||||
@PostMapping("/ocr/image")
|
||||
public ResponseDTO<GetImageOcrVo> getImageOcr(
|
||||
@RequestBody @Valid GetImageOcrForm form
|
||||
){
|
||||
if (form.getImageBase64() == null || form.getImageBase64().isEmpty()) {
|
||||
return ResponseDTO.userErrorParam("参数错误");
|
||||
}
|
||||
|
||||
try {
|
||||
// 解码 Base64 字符串为字节数组
|
||||
byte[] imageBytes = Base64.getDecoder().decode(form.getImageBase64());
|
||||
|
||||
// 调用 Service
|
||||
GetImageOcrVo result = ocrService.getImageOcr(imageBytes);
|
||||
return ResponseDTO.app_ok(result);
|
||||
|
||||
} catch (Exception e) {
|
||||
return ResponseDTO.userErrorParam("识别失败:" + e.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -46,8 +46,7 @@ public class OSSFileController {
|
||||
public ResponseDTO<OSSPolicyVO> getOSSPolicy(@PathVariable int type){
|
||||
OSSFileTypeEnum ossFileType = OSSFileTypeEnum.getByVal(type);
|
||||
Long requestUserId = SmartRequestUtil.getRequestUserId();
|
||||
String dir = ossFileType.getDesc() + File.separator + "images/";
|
||||
// String dir = ossFileType.getDesc() + File.separator + requestUserId + File.separator;
|
||||
String dir = ossFileType.getDesc() + File.separator + requestUserId + File.separator;
|
||||
// callbackUrl为 上传回调服务器的URL,请将下面的IP和Port配置为您自己的真实信息。
|
||||
OSSClient client = new OSSClient(endpoint, accessKey, secretKey);
|
||||
try {
|
||||
@ -71,35 +70,4 @@ public class OSSFileController {
|
||||
return ResponseDTO.userErrorParam();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取上传文件 Policy ", notes="type==1 普通;type==2 签名图片")
|
||||
@GetMapping("/file/getOSSPolicy/admin/{type}")
|
||||
public ResponseDTO<OSSPolicyVO> getOSSPolicyAdmin(@PathVariable int type){
|
||||
OSSFileTypeEnum ossFileType = OSSFileTypeEnum.getByVal(type);
|
||||
Long requestUserId = SmartRequestUtil.getRequestUserId();
|
||||
String dir = ossFileType.getDesc() + File.separator + "images/";
|
||||
// String dir = ossFileType.getDesc() + File.separator + requestUserId + File.separator;
|
||||
// callbackUrl为 上传回调服务器的URL,请将下面的IP和Port配置为您自己的真实信息。
|
||||
OSSClient client = new OSSClient(endpoint, accessKey, secretKey);
|
||||
try {
|
||||
long expireTime = 30;
|
||||
long expireEndTime = System.currentTimeMillis() + expireTime * 1000;
|
||||
Date expiration = new Date(expireEndTime);
|
||||
PolicyConditions policyConds = new PolicyConditions();
|
||||
policyConds.addConditionItem(PolicyConditions.COND_CONTENT_LENGTH_RANGE, 0, 10*1024*1024);// 最大 10 M
|
||||
policyConds.addConditionItem(MatchMode.StartWith, PolicyConditions.COND_KEY, ossFileType.getDesc());
|
||||
|
||||
String postPolicy = client.generatePostPolicy(expiration, policyConds);
|
||||
byte[] binaryData = postPolicy.getBytes("utf-8");
|
||||
String encodedPolicy = BinaryUtil.toBase64String(binaryData);
|
||||
String postSignature = client.calculatePostSignature(postPolicy);
|
||||
|
||||
|
||||
OSSPolicyVO policyVO = new OSSPolicyVO(accessKey, encodedPolicy, postSignature, dir, host, String.valueOf(expireEndTime / 1000));
|
||||
return ResponseDTO.ok(policyVO);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return ResponseDTO.userErrorParam();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.file.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
public class GetIdCardOcrForm {
|
||||
@ApiModelProperty("身份证正面")
|
||||
@NotBlank(message = "身份证正面 不能为空")
|
||||
private String frontBase64;
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.file.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Data
|
||||
public class GetImageOcrForm {
|
||||
@ApiModelProperty("图片")
|
||||
@NotBlank(message = "图片 不能为空")
|
||||
private String imageBase64;
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.file.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class GetIdCardOcrVo {
|
||||
@ApiModelProperty(value = "身份证姓名")
|
||||
private String idCardName;
|
||||
|
||||
@ApiModelProperty(value = "身份证号")
|
||||
private String idCardNo;
|
||||
}
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.file.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class GetImageOcrVo {
|
||||
@ApiModelProperty(value = "识别结果数,表示words_result的元素个数")
|
||||
private String wordsResultNum;
|
||||
|
||||
@ApiModelProperty(value = "定位和识别结果数组")
|
||||
private List<wordsResultData> wordsResult;
|
||||
|
||||
@Data
|
||||
public static class wordsResultData {
|
||||
@JsonProperty("words")
|
||||
private String words; // 识别结果字符串
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,122 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.file.service;
|
||||
|
||||
import net.lab1024.sa.admin.extend.baidubce.Ocr;
|
||||
import net.lab1024.sa.admin.extend.fangxinqian.company.Company;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertSignVO;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.ExpertSignDao;
|
||||
import net.lab1024.sa.admin.module.app.file.domain.vo.GetIdCardOcrVo;
|
||||
import net.lab1024.sa.admin.module.app.file.domain.vo.GetImageOcrVo;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import net.lab1024.sa.common.common.util.SmartRequestUtil;
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class OcrService {
|
||||
|
||||
@Resource
|
||||
private Ocr ocr;
|
||||
|
||||
/**
|
||||
* 身份证识别
|
||||
*/
|
||||
public GetIdCardOcrVo getIdCardOcr(byte[] frontBytes) {
|
||||
try {
|
||||
// 正面
|
||||
JSONObject result = ocr.idCard(frontBytes,"front");
|
||||
|
||||
String imageStatus = result.getString("image_status");
|
||||
switch (imageStatus) {
|
||||
case "normal":
|
||||
// 识别正常,继续处理
|
||||
break;
|
||||
case "reversed_side":
|
||||
throw new BusinessException("身份证未摆正,请重新上传");
|
||||
case "non_idcard":
|
||||
throw new BusinessException("上传的图片中不包含身份证,请上传正确图片");
|
||||
case "blurred":
|
||||
throw new BusinessException("身份证模糊,请重新上传清晰图片");
|
||||
case "over_exposure":
|
||||
throw new BusinessException("身份证关键字段反光或过曝,请重新拍摄");
|
||||
case "unknown":
|
||||
default:
|
||||
throw new BusinessException("无法识别身份证,请重新上传");
|
||||
}
|
||||
|
||||
if (result.has("risk_type")) {
|
||||
String riskType = result.getString("risk_type");
|
||||
if (!"normal".equals(riskType)) {
|
||||
switch (riskType) {
|
||||
case "copy":
|
||||
throw new BusinessException("检测到复印件身份证,请上传原件");
|
||||
case "temporary":
|
||||
throw new BusinessException("检测到临时身份证,请上传正式身份证");
|
||||
case "screen":
|
||||
throw new BusinessException("检测到翻拍身份证,请上传原件照片");
|
||||
case "unknow":
|
||||
default:
|
||||
throw new BusinessException("身份证真实性存疑,请重新上传");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 解析识别结果
|
||||
String name = result.getJSONObject("words_result").getJSONObject("姓名").getString("words");
|
||||
String idNo = result.getJSONObject("words_result").getJSONObject("公民身份号码").getString("words");
|
||||
|
||||
// 构建返回对象
|
||||
GetIdCardOcrVo vo = new GetIdCardOcrVo();
|
||||
vo.setIdCardName(name);
|
||||
vo.setIdCardNo(idNo);
|
||||
return vo;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 通用文字识别
|
||||
*/
|
||||
public GetImageOcrVo getImageOcr(byte[] imageBytes) {
|
||||
try {
|
||||
JSONObject result = ocr.image(imageBytes);
|
||||
|
||||
// 校验返回是否包含识别内容
|
||||
int resultNum = result.optInt("words_result_num", 0);
|
||||
if (resultNum == 0 || !result.has("words_result")) {
|
||||
throw new BusinessException("识别失败:未检测到有效文字");
|
||||
}
|
||||
|
||||
JSONArray wordsArray = result.getJSONArray("words_result");
|
||||
List<GetImageOcrVo.wordsResultData> wordList = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < wordsArray.length(); i++) {
|
||||
JSONObject wordObj = wordsArray.getJSONObject(i);
|
||||
String word = wordObj.optString("words", "");
|
||||
if (!word.isEmpty()) {
|
||||
GetImageOcrVo.wordsResultData data = new GetImageOcrVo.wordsResultData();
|
||||
data.setWords(word);
|
||||
wordList.add(data);
|
||||
}
|
||||
}
|
||||
|
||||
if (wordList.isEmpty()) {
|
||||
throw new BusinessException("识别失败:没有提取到有效文字");
|
||||
}
|
||||
|
||||
GetImageOcrVo vo = new GetImageOcrVo();
|
||||
vo.setWordsResultNum(String.valueOf(wordList.size()));
|
||||
vo.setWordsResult(wordList);
|
||||
|
||||
return vo;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,19 +3,23 @@ package net.lab1024.sa.admin.module.app.medicalrecord.controller;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import net.lab1024.sa.admin.constant.AdminSwaggerTagConst;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.*;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordAddForm;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordDetailVO;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordListVO;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordQueryForm;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordUpdateForm;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.service.MedicalRecordService;
|
||||
import net.lab1024.sa.common.common.domain.PageResult;
|
||||
import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.common.common.util.SmartRequestUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static net.lab1024.sa.common.common.code.UserErrorCode.LOGIN_STATE_INVALID;
|
||||
|
||||
@RestController
|
||||
@Api(tags = {AdminSwaggerTagConst.App.MedicalRecord})
|
||||
public class MedicalRecordController {
|
||||
@ -42,7 +46,7 @@ public class MedicalRecordController {
|
||||
|
||||
@ApiOperation(value = "添加病历")
|
||||
@PostMapping("/medicalRecord/add")
|
||||
public ResponseDTO<String> add(@RequestBody @Validated() MedicalRecordAddForm addForm) {
|
||||
public ResponseDTO<String> add(@RequestBody @Valid MedicalRecordAddForm addForm) {
|
||||
return medicalRecordService.add(addForm);
|
||||
}
|
||||
|
||||
@ -52,14 +56,4 @@ public class MedicalRecordController {
|
||||
return medicalRecordService.update(updateForm);
|
||||
}
|
||||
|
||||
@ApiOperation("获取有效病例数量")
|
||||
@GetMapping("/medicalRecord/count")
|
||||
public ResponseDTO<Long> getMedicalRecordCount(@Valid @ModelAttribute GetMedicalRecordCountForm form) {
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
if (expertId == null) {
|
||||
return ResponseDTO.error(LOGIN_STATE_INVALID);
|
||||
}
|
||||
|
||||
return medicalRecordService.getMedicalRecordCount(form,expertId);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,16 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.medicalrecord.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordAbstracEntity;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordPrognosisEntity;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface MedicalRecorPrognosisDao extends BaseMapper<MedicalRecordPrognosisEntity> {
|
||||
|
||||
@Delete("delete from t_caseplatform_case_prognosis where case_id=#{medicalRecordId}")
|
||||
int deleteByCaseId(Long medicalRecordId);
|
||||
}
|
||||
@ -9,11 +9,6 @@ import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class DpmsAddForm {
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
private Long dpmasId;
|
||||
|
||||
@ApiModelProperty(value = "治疗时间", required = true)
|
||||
@NotNull(message = "治疗时间 不能为空")
|
||||
@ -23,9 +18,4 @@ public class DpmsAddForm {
|
||||
@NotNull(message = "治疗图片 不能为空")
|
||||
@Length(min = 1, max = 1000, message = "治疗图片 不能为空")
|
||||
private String dpmasImg;
|
||||
|
||||
@ApiModelProperty(value = "治疗内容", required = true)
|
||||
@NotNull(message = "治疗内容 不能为空")
|
||||
@Length(min = 1, max = 1000, message = "治疗内容 不能为空")
|
||||
private String content;
|
||||
}
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.medicalrecord.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Data
|
||||
public class GetMedicalRecordCountForm {
|
||||
@ApiModelProperty(value = "类型", required = true)
|
||||
@NotNull(message = "类型 不能为空")
|
||||
private Integer type = 1;
|
||||
}
|
||||
@ -34,6 +34,11 @@ public class MedicalRecordAbstracEntity {
|
||||
*/
|
||||
private String abstractStr;
|
||||
|
||||
/**
|
||||
* 病历摘要 图片
|
||||
*/
|
||||
private String abstractImg;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ -44,10 +49,10 @@ public class MedicalRecordAbstracEntity {
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
// public MedicalRecordAbstracEntity(Long caseId, String abstractStr, String abstractImg, LocalDateTime createTime) {
|
||||
// this.caseId = caseId;
|
||||
// this.abstractStr = abstractStr;
|
||||
// this.abstractImg = abstractImg;
|
||||
// this.createTime = createTime;
|
||||
// }
|
||||
public MedicalRecordAbstracEntity(Long caseId, String abstractStr, String abstractImg, LocalDateTime createTime) {
|
||||
this.caseId = caseId;
|
||||
this.abstractStr = abstractStr;
|
||||
this.abstractImg = abstractImg;
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,6 @@ import lombok.Data;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseStatusEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CasetypeEnum;
|
||||
import net.lab1024.sa.common.common.domain.PageParam;
|
||||
import net.lab1024.sa.common.common.enumeration.DischargeStatusEnum;
|
||||
import net.lab1024.sa.common.common.enumeration.GenderEnum;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
import net.lab1024.sa.common.common.validator.enumeration.CheckEnum;
|
||||
@ -14,9 +13,7 @@ import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@ -28,19 +25,18 @@ public class MedicalRecordAddForm {
|
||||
|
||||
/*************************基本信息***************************/
|
||||
@ApiModelProperty(value = "患者姓名", required = true)
|
||||
@NotBlank(message = "患者姓名 不能为空")
|
||||
@NotNull(message = "患者姓名 不能为空")
|
||||
@Length(min = 1, max = 20, message = "患者姓名 的长度为在1-20")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "患者id", required = true)
|
||||
@NotBlank(message = "患者id 不能为空")
|
||||
@NotNull(message = "患者id 不能为空")
|
||||
@Length(min = 1, max = 100, message = "患者id 的长度为在1-100")
|
||||
private String uid;
|
||||
|
||||
@ApiModelPropertyEnum(GenderEnum.class)
|
||||
@CheckEnum(value = GenderEnum.class, message = "性别错误")
|
||||
@NotBlank(message = "患者性别 不能为空")
|
||||
private String sex;
|
||||
private Integer sex;
|
||||
|
||||
@ApiModelProperty(value = "年龄", required = true)
|
||||
@NotNull(message = "年龄 不能为空")
|
||||
@ -51,128 +47,58 @@ public class MedicalRecordAddForm {
|
||||
@NotNull(message = "入院时间 不能为空")
|
||||
private LocalDateTime admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "治疗类型", required = true)
|
||||
@NotNull(message = "治疗类型 不能为空")
|
||||
private String caseType;
|
||||
@ApiModelPropertyEnum(value = CasetypeEnum.class, desc = "病历类型")
|
||||
@CheckEnum(value = CasetypeEnum.class, message = "病历类型 错误", required = true)
|
||||
private Integer caseType;
|
||||
|
||||
@ApiModelProperty(value = "主要诊断", required = true)
|
||||
@NotBlank(message = "主要诊断 不能为空")
|
||||
private String mainDiagnose;
|
||||
|
||||
@ApiModelProperty(value = "患者病因", required = true)
|
||||
@NotBlank(message = "患者病因 不能为空")
|
||||
private String diseaseCause;
|
||||
|
||||
@ApiModelProperty(value = "诱因", required = true)
|
||||
private String seductionReason;
|
||||
@ApiModelProperty(value = "基本信息图片", required = true)
|
||||
@NotNull(message = "基本信息图片 不能为空")
|
||||
@Length(min = 1, max = 1000, message = "基本信息图片 不能为空")
|
||||
private String baseImg;
|
||||
|
||||
/*************************临床资料 病历摘要***************************/
|
||||
@ApiModelProperty(value = "临床资料 病历摘要 文字", required = true)
|
||||
@NotBlank(message = "临床资料 病历摘要 不能为空")
|
||||
private String abstractStr;
|
||||
|
||||
@ApiModelProperty(value = "临床资料 病历摘要 图片", required = true)
|
||||
private String abstractImg;
|
||||
|
||||
|
||||
/*************************DPMAS***************************/
|
||||
@ApiModelProperty(value = "人工肝治疗", required = true)
|
||||
@ApiModelProperty(value = "DPMAS", required = true)
|
||||
@NotNull(message = "DPMAS 不能为空")
|
||||
@Valid
|
||||
private List<DpmsAddForm> dpmas;
|
||||
|
||||
|
||||
/*************************实验室数据***************************/
|
||||
@ApiModelProperty(value = "首次人工肝治疗前检测时间", required = true)
|
||||
@NotNull(message = "首次人工肝治疗前检测时间 不能为空")
|
||||
@ApiModelProperty(value = "治疗前 检测时间", required = true)
|
||||
@NotNull(message = "治疗前 检测时间 不能为空")
|
||||
private LocalDateTime headTime;
|
||||
|
||||
/**
|
||||
* 治疗后 检测时间
|
||||
*/
|
||||
@ApiModelProperty(value = "首次人工肝治疗后检测时间 ", required = true)
|
||||
@NotNull(message = "首次人工肝治疗后检测时间 不能为空")
|
||||
@ApiModelProperty(value = "治疗后 检测时间 ", required = true)
|
||||
@NotNull(message = "治疗后 检测时间 不能为空")
|
||||
private LocalDateTime afterTime;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 检测时间
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次人工肝治疗后检测时间 检测时间 ", required = true)
|
||||
private LocalDateTime lastTime;
|
||||
|
||||
/**
|
||||
* 治疗前 总胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 总胆红素", required = true)
|
||||
@NotBlank(message = "治疗前 总胆红素 不能为空")
|
||||
@NotNull(message = "治疗前 总胆红素 不能为空")
|
||||
@Length(min = 1, max = 10, message = "治疗前 总胆红素 输入不合法")
|
||||
private String headTb;
|
||||
|
||||
/**
|
||||
* 治疗后 总胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 总胆红素 ", required = true)
|
||||
@NotBlank(message = "治疗后 总胆红素 不能为空")
|
||||
@NotNull(message = "治疗后 总胆红素 不能为空")
|
||||
@Length(min = 1, max = 10, message = "治疗后 总胆红素 输入不合法")
|
||||
private String afterTb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 总胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 总胆红素 ", required = true)
|
||||
private String lastTb;
|
||||
|
||||
/**
|
||||
* 治疗前 直接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 直接胆红素", required = true)
|
||||
private String headDb;
|
||||
|
||||
/**
|
||||
* 治疗后 直接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 直接胆红素 ", required = true)
|
||||
private String afterDb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 直接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 直接胆红素 ", required = true)
|
||||
private String lastDb;
|
||||
|
||||
/**
|
||||
* 治疗前 丙氨酸氨基转移酶(U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 丙氨酸氨基转移酶", required = true)
|
||||
@NotBlank(message = "治疗前 丙氨酸氨基转移酶 不能为空")
|
||||
private String headAlt;
|
||||
|
||||
/**
|
||||
* 治疗后 丙氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 丙氨酸氨基转移酶 ", required = true)
|
||||
@NotBlank(message = "治疗后 丙氨酸氨基转移酶 不能为空")
|
||||
private String afterAlt;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 丙氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 丙氨酸氨基转移酶 ", required = true)
|
||||
private String lastAlt;
|
||||
|
||||
/**
|
||||
* 治疗前 天门冬氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 天门冬氨酸氨基转移酶", required = true)
|
||||
@NotBlank(message = "治疗前 天门冬氨酸氨基转移酶 不能为空")
|
||||
private String headAst;
|
||||
|
||||
/**
|
||||
* 治疗后 天门冬氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 天门冬氨酸氨基转移酶 ", required = true)
|
||||
private String afterAst;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 天门冬氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 天门冬氨酸氨基转移酶 ", required = true)
|
||||
private String lastAst;
|
||||
|
||||
/**
|
||||
* 治疗前 白蛋白(g/L)
|
||||
*/
|
||||
@ -186,10 +112,16 @@ public class MedicalRecordAddForm {
|
||||
private String afterAlb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 白蛋白(g/L)
|
||||
* 治疗前 直接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 白蛋白 ", required = true)
|
||||
private String lastAlb;
|
||||
@ApiModelProperty(value = "治疗前 直接胆红素", required = true)
|
||||
private String headDb;
|
||||
|
||||
/**
|
||||
* 治疗后 直接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 直接胆红素 ", required = true)
|
||||
private String afterDb;
|
||||
|
||||
/**
|
||||
* 治疗前 凝血酶原活动度 (%)
|
||||
@ -204,48 +136,48 @@ public class MedicalRecordAddForm {
|
||||
private String afterPta;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 凝血酶原活动度 (%)
|
||||
* 治疗前 间接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 凝血酶原活动度 ", required = true)
|
||||
private String lastPta;
|
||||
@ApiModelProperty(value = "治疗前 间接胆红素", required = true)
|
||||
private String headIb;
|
||||
|
||||
/**
|
||||
* 治疗后 间接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 间接胆红素 ", required = true)
|
||||
private String afterIb;
|
||||
|
||||
/**
|
||||
* 治疗前 国际标准化比值 (INR)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 国际标准化比值", required = true)
|
||||
@NotBlank(message = "治疗前 国际标准化比值 不能为空")
|
||||
@NotNull(message = "治疗前 国际标准化比值 不能为空")
|
||||
@Length(min = 1, max = 10, message = "治疗前 国际标准化比值 输入不合法")
|
||||
private String headInr;
|
||||
|
||||
/**
|
||||
* 治疗后 国际标准化比值 (INR)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 国际标准化比值 ", required = true)
|
||||
@NotBlank(message = "治疗后 国际标准化比值 不能为空")
|
||||
@NotNull(message = "治疗后 国际标准化比值 不能为空")
|
||||
@Length(min = 1, max = 10, message = "治疗后 国际标准化比值 输入不合法")
|
||||
private String afterInr;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 国际标准化比值 (INR)
|
||||
* 治疗前 谷丙转氨 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 国际标准化比值 ", required = true)
|
||||
private String lastInr;
|
||||
@ApiModelProperty(value = "治疗前 谷丙转氨", required = true)
|
||||
@NotNull(message = "治疗前 谷丙转氨 不能为空")
|
||||
@Length(min = 1, max = 10, message = "治疗前 谷丙转氨 输入不合法")
|
||||
private String headAlt;
|
||||
|
||||
/**
|
||||
* 治疗前 C反应蛋白(mg/L)
|
||||
* 治疗后 谷丙转氨 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 C反应蛋白", required = true)
|
||||
private String headCrp;
|
||||
|
||||
/**
|
||||
* 治疗后 C反应蛋白(mg/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 C反应蛋白 ", required = true)
|
||||
private String afterCrp;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 C反应蛋白(mg/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 C反应蛋白 ", required = true)
|
||||
private String lastCrp;
|
||||
@ApiModelProperty(value = "治疗后 谷丙转氨 ", required = true)
|
||||
@NotNull(message = "治疗后 谷丙转氨 不能为空")
|
||||
@Length(min = 1, max = 10, message = "治疗后 谷丙转氨 输入不合法")
|
||||
private String afterAlt;
|
||||
|
||||
/**
|
||||
* 治疗前 白介素6(ng/L)
|
||||
@ -260,16 +192,20 @@ public class MedicalRecordAddForm {
|
||||
private String afterIl6;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 白介素6(ng/L)
|
||||
* 治疗前 谷草转氨酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 白介素6 ", required = true)
|
||||
private String lastIl6;
|
||||
@ApiModelProperty(value = "治疗前 谷草转氨酶", required = true)
|
||||
@NotNull(message = "治疗前 谷草转氨酶 不能为空")
|
||||
@Length(min = 1, max = 10, message = "治疗前 谷草转氨酶 输入不合法")
|
||||
private String headAst;
|
||||
|
||||
/**
|
||||
* 白介素单位
|
||||
* 治疗后 谷草转氨酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "白介素单位")
|
||||
private String il6Unit;
|
||||
@ApiModelProperty(value = "治疗后 谷草转氨酶 ", required = true)
|
||||
@NotNull(message = "治疗后 谷草转氨酶 不能为空")
|
||||
@Length(min = 1, max = 10, message = "治疗后 谷草转氨酶 输入不合法")
|
||||
private String afterAst;
|
||||
|
||||
/**
|
||||
* 治疗前 肿瘤坏死因子α(μg/L)
|
||||
@ -283,43 +219,8 @@ public class MedicalRecordAddForm {
|
||||
@ApiModelProperty(value = "治疗后 肿瘤坏死因子α ", required = true)
|
||||
private String afterTnf;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 肿瘤坏死因子α(μg/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 肿瘤坏死因子α ", required = true)
|
||||
private String lastTnf;
|
||||
|
||||
/**
|
||||
* 肿瘤坏死因子α单位
|
||||
*/
|
||||
@ApiModelProperty(value = "肿瘤坏死因子α单位")
|
||||
private String tnfUnit;
|
||||
|
||||
@ApiModelProperty(value = "生化指标 图片", required = true)
|
||||
@NotBlank(message = "报告单 生化指标 不能为空")
|
||||
private String bioImg;
|
||||
|
||||
@ApiModelProperty(value = "凝血功能指标 图片", required = true)
|
||||
@NotBlank(message = "报告单 凝血功能指标 不能为空")
|
||||
private String coaImg;
|
||||
|
||||
@ApiModelProperty(value = "炎症因子指标 图片")
|
||||
private String infImg;
|
||||
|
||||
/*************************疾病转归***************************/
|
||||
@ApiModelProperty(value = "疾病转归 出院时间", required = true)
|
||||
@NotNull(message = "疾病转归 出院时间 不能为空")
|
||||
private LocalDateTime dischargeTime;
|
||||
|
||||
@ApiModelProperty(value = "住院天数", required = true)
|
||||
@NotBlank(message = "住院天数 不能为空")
|
||||
private String day;
|
||||
|
||||
@ApiModelPropertyEnum(DischargeStatusEnum.class)
|
||||
@CheckEnum(value = DischargeStatusEnum.class, message = "出院状态 错误")
|
||||
private String dischargeStatus;
|
||||
|
||||
@ApiModelProperty(value = "疾病转归 出院情况", required = true)
|
||||
@NotBlank(message = "疾病转归 出院情况 不能为空")
|
||||
private String dischargeSituation;
|
||||
@ApiModelProperty(value = "实验室检测 图片 图片", required = true)
|
||||
@NotNull(message = "实验室检测 图片 不能为空")
|
||||
@Length(min = 1, max = 1000, message = "实验室检测 图片 不能为空")
|
||||
private String checkImg;
|
||||
}
|
||||
|
||||
@ -5,7 +5,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
||||
@ -19,6 +18,7 @@ import lombok.Data;
|
||||
|
||||
@Data
|
||||
@TableName("t_caseplatform_case_checkdata")
|
||||
@Builder
|
||||
public class MedicalRecordCheckdataEntity {
|
||||
|
||||
/**
|
||||
@ -42,11 +42,6 @@ public class MedicalRecordCheckdataEntity {
|
||||
*/
|
||||
private LocalDateTime afterTime;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 检测时间
|
||||
*/
|
||||
private LocalDateTime lastTime;
|
||||
|
||||
/**
|
||||
* 治疗前 总胆红素(umol/L)
|
||||
*/
|
||||
@ -57,11 +52,6 @@ public class MedicalRecordCheckdataEntity {
|
||||
*/
|
||||
private String afterTb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 总胆红素(umol/L)
|
||||
*/
|
||||
private String lastTb;
|
||||
|
||||
/**
|
||||
* 治疗前 白蛋白(g/L)
|
||||
*/
|
||||
@ -72,11 +62,6 @@ public class MedicalRecordCheckdataEntity {
|
||||
*/
|
||||
private String afterAlb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 白蛋白(g/L)
|
||||
*/
|
||||
private String lastAlb;
|
||||
|
||||
/**
|
||||
* 治疗前 直接胆红素(umol/L)
|
||||
*/
|
||||
@ -87,11 +72,6 @@ public class MedicalRecordCheckdataEntity {
|
||||
*/
|
||||
private String afterDb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 直接胆红素(umol/L)
|
||||
*/
|
||||
private String lastDb;
|
||||
|
||||
/**
|
||||
* 治疗前 凝血酶原活动度 (%)
|
||||
*/
|
||||
@ -103,9 +83,14 @@ public class MedicalRecordCheckdataEntity {
|
||||
private String afterPta;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 凝血酶原活动度 (%)
|
||||
* 治疗前 间接胆红素(umol/L)
|
||||
*/
|
||||
private String lastPta;
|
||||
private String headIb;
|
||||
|
||||
/**
|
||||
* 治疗后 间接胆红素(umol/L)
|
||||
*/
|
||||
private String afterIb;
|
||||
|
||||
/**
|
||||
* 治疗前 国际标准化比值 (INR)
|
||||
@ -117,11 +102,6 @@ public class MedicalRecordCheckdataEntity {
|
||||
*/
|
||||
private String afterInr;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 国际标准化比值 (INR)
|
||||
*/
|
||||
private String lastInr;
|
||||
|
||||
/**
|
||||
* 治疗前 谷丙转氨 (U/L)
|
||||
*/
|
||||
@ -132,31 +112,6 @@ public class MedicalRecordCheckdataEntity {
|
||||
*/
|
||||
private String afterAlt;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 谷丙转氨 (U/L)
|
||||
*/
|
||||
private String lastAlt;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 治疗前 C反应蛋白(mg/L)
|
||||
*/
|
||||
private String headCrp;
|
||||
|
||||
/**
|
||||
* 治疗后 C反应蛋白(mg/L)
|
||||
*/
|
||||
private String afterCrp;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 C反应蛋白(mg/L)
|
||||
*/
|
||||
private String lastCrp;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 治疗前 白介素6(ng/L)
|
||||
*/
|
||||
@ -167,16 +122,6 @@ public class MedicalRecordCheckdataEntity {
|
||||
*/
|
||||
private String afterIl6;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 白介素6(ng/L)
|
||||
*/
|
||||
private String lastIl6;
|
||||
|
||||
/**
|
||||
* 白介素单位
|
||||
*/
|
||||
private String il6Unit;
|
||||
|
||||
/**
|
||||
* 治疗前 谷草转氨酶 (U/L)
|
||||
*/
|
||||
@ -187,11 +132,6 @@ public class MedicalRecordCheckdataEntity {
|
||||
*/
|
||||
private String afterAst;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 谷草转氨酶 (U/L)
|
||||
*/
|
||||
private String lastAst;
|
||||
|
||||
/**
|
||||
* 治疗前 肿瘤坏死因子α(μg/L)
|
||||
*/
|
||||
@ -203,30 +143,9 @@ public class MedicalRecordCheckdataEntity {
|
||||
private String afterTnf;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 肿瘤坏死因子α(μg/L)
|
||||
* 图片
|
||||
*/
|
||||
private String lastTnf;
|
||||
|
||||
/**
|
||||
* 肿瘤坏死因子α单位
|
||||
*/
|
||||
private String tnfUnit;
|
||||
|
||||
|
||||
/**
|
||||
* 生化指标图片
|
||||
*/
|
||||
private String bioImg;
|
||||
|
||||
/**
|
||||
* 凝血功能指标图片
|
||||
*/
|
||||
private String coaImg;
|
||||
|
||||
/**
|
||||
* 炎症因子指标图片
|
||||
*/
|
||||
private String infImg;
|
||||
private String checkImg;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
|
||||
@ -3,12 +3,10 @@ package net.lab1024.sa.admin.module.app.medicalrecord.domain;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CasetypeEnum;
|
||||
import net.lab1024.sa.common.common.enumeration.DischargeStatusEnum;
|
||||
import net.lab1024.sa.common.common.enumeration.GenderEnum;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
import net.lab1024.sa.common.common.validator.enumeration.CheckEnum;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
@ -40,21 +38,13 @@ public class MedicalRecordDetailVO {
|
||||
@NotNull(message = "入院时间 不能为空")
|
||||
private LocalDateTime admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "治疗类型", required = true)
|
||||
@NotNull(message = "治疗类型 不能为空")
|
||||
private String caseType;
|
||||
@ApiModelPropertyEnum(value = CasetypeEnum.class, desc = "病历类型")
|
||||
@CheckEnum(value = CasetypeEnum.class, message = "病历类型 错误", required = true)
|
||||
private Integer caseType;
|
||||
|
||||
@ApiModelProperty(value = "主要诊断", required = true)
|
||||
@NotNull(message = "主要诊断 不能为空")
|
||||
private String mainDiagnose;
|
||||
|
||||
@ApiModelProperty(value = "患者病因", required = true)
|
||||
@NotNull(message = "患者病因 不能为空")
|
||||
private String diseaseCause;
|
||||
|
||||
@ApiModelProperty(value = "诱因", required = true)
|
||||
@NotNull(message = "诱因 不能为空")
|
||||
private String seductionReason;
|
||||
@ApiModelProperty(value = "基本信息图片", required = true)
|
||||
@NotNull(message = "基本信息图片 不能为空")
|
||||
private String baseImg;
|
||||
|
||||
@ApiModelProperty(value = "病例状态", required = true)
|
||||
private Integer status;
|
||||
@ -64,9 +54,14 @@ public class MedicalRecordDetailVO {
|
||||
@NotNull(message = "临床资料 病历摘要 文字 不能为空")
|
||||
private String abstractStr;
|
||||
|
||||
@ApiModelProperty(value = "临床资料 病历摘要 图片", required = true)
|
||||
@NotNull(message = "临床资料 病历摘要 图片 不能为空")
|
||||
private String abstractImg;
|
||||
|
||||
|
||||
/*************************DPMAS***************************/
|
||||
@ApiModelProperty(value = "人工肝治疗", required = true)
|
||||
@NotNull(message = "人工肝治疗 不能为空")
|
||||
@ApiModelProperty(value = "临床资料 病历摘要 图片", required = true)
|
||||
@NotNull(message = "临床资料 病历摘要 图片 不能为空")
|
||||
private List<DpmsAddForm> dpmas;
|
||||
|
||||
|
||||
@ -82,13 +77,6 @@ public class MedicalRecordDetailVO {
|
||||
@NotNull(message = "治疗后 检测时间 不能为空")
|
||||
private LocalDateTime afterTime;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 检测时间
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 检测时间 ", required = true)
|
||||
@NotNull(message = "最后一次治疗后 检测时间 不能为空")
|
||||
private LocalDateTime lastTime;
|
||||
|
||||
/**
|
||||
* 治疗前 总胆红素(umol/L)
|
||||
*/
|
||||
@ -104,11 +92,16 @@ public class MedicalRecordDetailVO {
|
||||
private String afterTb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 总胆红素(umol/L)
|
||||
* 治疗前 白蛋白(g/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 总胆红素 ", required = true)
|
||||
@NotNull(message = "最后一次治疗后 总胆红素 不能为空")
|
||||
private String lastTb;
|
||||
@ApiModelProperty(value = "治疗前 白蛋白", required = true)
|
||||
private String headAlb;
|
||||
|
||||
/**
|
||||
* 治疗后 白蛋白(g/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 白蛋白 ", required = true)
|
||||
private String afterAlb;
|
||||
|
||||
/**
|
||||
* 治疗前 直接胆红素(umol/L)
|
||||
@ -122,72 +115,6 @@ public class MedicalRecordDetailVO {
|
||||
@ApiModelProperty(value = "治疗后 直接胆红素 ", required = true)
|
||||
private String afterDb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 直接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 直接胆红素 ", required = true)
|
||||
private String lastDb;
|
||||
|
||||
/**
|
||||
* 治疗前 丙氨酸氨基转移酶(U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 丙氨酸氨基转移酶", required = true)
|
||||
@NotNull(message = "治疗前 丙氨酸氨基转移酶 不能为空")
|
||||
private String headAlt;
|
||||
|
||||
/**
|
||||
* 治疗后 丙氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 丙氨酸氨基转移酶 ", required = true)
|
||||
@NotNull(message = "治疗后 丙氨酸氨基转移酶 不能为空")
|
||||
private String afterAlt;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 丙氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 丙氨酸氨基转移酶 ", required = true)
|
||||
@NotNull(message = "最后一次治疗后 丙氨酸氨基转移酶 不能为空")
|
||||
private String lastAlt;
|
||||
|
||||
/**
|
||||
* 治疗前 天门冬氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 天门冬氨酸氨基转移酶", required = true)
|
||||
@NotNull(message = "治疗前 天门冬氨酸氨基转移酶 不能为空")
|
||||
private String headAst;
|
||||
|
||||
/**
|
||||
* 治疗后 天门冬氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 天门冬氨酸氨基转移酶 ", required = true)
|
||||
@NotNull(message = "治疗后 天门冬氨酸氨基转移酶 不能为空")
|
||||
private String afterAst;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 天门冬氨酸氨基转移酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 天门冬氨酸氨基转移酶 ", required = true)
|
||||
@NotNull(message = "最后一次治疗后 天门冬氨酸氨基转移酶 不能为空")
|
||||
private String lastAst;
|
||||
|
||||
/**
|
||||
* 治疗前 白蛋白(g/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 白蛋白", required = true)
|
||||
private String headAlb;
|
||||
|
||||
/**
|
||||
* 治疗后 白蛋白(g/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 白蛋白 ", required = true)
|
||||
private String afterAlb;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 白蛋白(g/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 白蛋白 ", required = true)
|
||||
private String lastAlb;
|
||||
|
||||
/**
|
||||
* 治疗前 凝血酶原活动度 (%)
|
||||
*/
|
||||
@ -201,10 +128,16 @@ public class MedicalRecordDetailVO {
|
||||
private String afterPta;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 凝血酶原活动度 (%)
|
||||
* 治疗前 间接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 凝血酶原活动度 ", required = true)
|
||||
private String lastPta;
|
||||
@ApiModelProperty(value = "治疗前 间接胆红素", required = true)
|
||||
private String headIb;
|
||||
|
||||
/**
|
||||
* 治疗后 间接胆红素(umol/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 间接胆红素 ", required = true)
|
||||
private String afterIb;
|
||||
|
||||
/**
|
||||
* 治疗前 国际标准化比值 (INR)
|
||||
@ -221,32 +154,18 @@ public class MedicalRecordDetailVO {
|
||||
private String afterInr;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 国际标准化比值 (INR)
|
||||
* 治疗前 谷丙转氨 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 国际标准化比值 ", required = true)
|
||||
@NotNull(message = "最后一次治疗后 国际标准化比值 不能为空")
|
||||
private String lastInr;
|
||||
@ApiModelProperty(value = "治疗前 谷丙转氨", required = true)
|
||||
@NotNull(message = "治疗前 谷丙转氨 不能为空")
|
||||
private String headAlt;
|
||||
|
||||
/**
|
||||
* 治疗前 C反应蛋白(mg/L)
|
||||
* 治疗后 谷丙转氨 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗前 C反应蛋白", required = true)
|
||||
@NotNull(message = "治疗前 C反应蛋白 不能为空")
|
||||
private String headCrp;
|
||||
|
||||
/**
|
||||
* 治疗后 C反应蛋白(mg/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "治疗后 C反应蛋白 ", required = true)
|
||||
@NotNull(message = "治疗后 C反应蛋白 不能为空")
|
||||
private String afterCrp;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 C反应蛋白(mg/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 C反应蛋白 ", required = true)
|
||||
@NotNull(message = "最后一次治疗后 C反应蛋白 不能为空")
|
||||
private String lastCrp;
|
||||
@ApiModelProperty(value = "治疗后 谷丙转氨 ", required = true)
|
||||
@NotNull(message = "治疗后 谷丙转氨 不能为空")
|
||||
private String afterAlt;
|
||||
|
||||
/**
|
||||
* 治疗前 白介素6(ng/L)
|
||||
@ -261,16 +180,18 @@ public class MedicalRecordDetailVO {
|
||||
private String afterIl6;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 白介素6(ng/L)
|
||||
* 治疗前 谷草转氨酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 白介素6 ", required = true)
|
||||
private String lastIl6;
|
||||
@ApiModelProperty(value = "治疗前 谷草转氨酶", required = true)
|
||||
@NotNull(message = "治疗前 谷草转氨酶 不能为空")
|
||||
private String headAst;
|
||||
|
||||
/**
|
||||
* 白介素单位
|
||||
* 治疗后 谷草转氨酶 (U/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "白介素单位")
|
||||
private String il6Unit;
|
||||
@ApiModelProperty(value = "治疗后 谷草转氨酶 ", required = true)
|
||||
@NotNull(message = "治疗后 谷草转氨酶 不能为空")
|
||||
private String afterAst;
|
||||
|
||||
/**
|
||||
* 治疗前 肿瘤坏死因子α(μg/L)
|
||||
@ -284,43 +205,7 @@ public class MedicalRecordDetailVO {
|
||||
@ApiModelProperty(value = "治疗后 肿瘤坏死因子α ", required = true)
|
||||
private String afterTnf;
|
||||
|
||||
/**
|
||||
* 最后一次治疗后 肿瘤坏死因子α(μg/L)
|
||||
*/
|
||||
@ApiModelProperty(value = "最后一次治疗后 肿瘤坏死因子α ", required = true)
|
||||
private String lastTnf;
|
||||
|
||||
/**
|
||||
* 肿瘤坏死因子α单位
|
||||
*/
|
||||
@ApiModelProperty(value = "肿瘤坏死因子α单位")
|
||||
private String tnfUnit;
|
||||
|
||||
@ApiModelProperty(value = "生化指标 图片", required = true)
|
||||
@NotNull(message = "报告单 生化指标 不能为空")
|
||||
private String bioImg;
|
||||
|
||||
@ApiModelProperty(value = "凝血功能指标 图片", required = true)
|
||||
@NotNull(message = "报告单 凝血功能指标 不能为空")
|
||||
private String coaImg;
|
||||
|
||||
@ApiModelProperty(value = "炎症因子指标 图片")
|
||||
private String infImg;
|
||||
|
||||
/*************************疾病转归***************************/
|
||||
@ApiModelProperty(value = "疾病转归 出院时间", required = true)
|
||||
@NotNull(message = "疾病转归 出院时间 不能为空")
|
||||
private LocalDateTime dischargeTime;
|
||||
|
||||
@ApiModelProperty(value = "住院天数", required = true)
|
||||
@NotNull(message = "住院天数 不能为空")
|
||||
private Integer day;
|
||||
|
||||
@ApiModelPropertyEnum(DischargeStatusEnum.class)
|
||||
@CheckEnum(value = DischargeStatusEnum.class, message = "出院状态 错误")
|
||||
private String dischargeStatus;
|
||||
|
||||
@ApiModelProperty(value = "疾病转归 出院情况", required = true)
|
||||
@NotNull(message = "疾病转归 出院情况 不能为空")
|
||||
private String dischargeSituation;
|
||||
@ApiModelProperty(value = "实验室检测 病历摘要 图片", required = true)
|
||||
@NotNull(message = "实验室检测 图片 不能为空")
|
||||
private String checkImg;
|
||||
}
|
||||
|
||||
@ -39,9 +39,4 @@ public class MedicalRecordDpmsEntity {
|
||||
*/
|
||||
private String dpmasImg;
|
||||
|
||||
/**
|
||||
* 内容(json)
|
||||
*/
|
||||
private String content;
|
||||
|
||||
}
|
||||
@ -4,12 +4,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 病历表 实体类
|
||||
*
|
||||
@ -33,25 +29,20 @@ public class MedicalRecordEntity {
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String baseImg;
|
||||
|
||||
/**
|
||||
* 入院时间
|
||||
*/
|
||||
private LocalDateTime admissionTime;
|
||||
|
||||
/**
|
||||
* 治疗类型
|
||||
* 病历类型
|
||||
*/
|
||||
private String caseType;
|
||||
|
||||
/**
|
||||
* 0待审核 1审核通过 2审核不通过
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 审核不通过原因
|
||||
*/
|
||||
private String reason;
|
||||
private Integer caseType;
|
||||
|
||||
/**
|
||||
* 统计 天
|
||||
@ -84,43 +75,29 @@ public class MedicalRecordEntity {
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 主要诊断
|
||||
*/
|
||||
private String mainDiagnose;
|
||||
|
||||
/**
|
||||
* 患者病因
|
||||
*/
|
||||
private String diseaseCause;
|
||||
|
||||
/**
|
||||
* 诱因
|
||||
*/
|
||||
private String seductionReason;
|
||||
|
||||
private Integer status;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
// public MedicalRecordEntity(Long userId, String baseImg, LocalDateTime admissionTime, Integer caseType, Long expertId, LocalDateTime createTime) {
|
||||
// this.userId = userId;
|
||||
// this.admissionTime = admissionTime;
|
||||
// this.caseType = caseType;
|
||||
// this.baseImg = baseImg;
|
||||
// this.expertId = expertId;
|
||||
// this.createTime = createTime;
|
||||
// }
|
||||
|
||||
// public MedicalRecordEntity(Long id, Long userId, String baseImg, LocalDateTime admissionTime, Integer caseType, Long expertId, Integer status, LocalDateTime updateTime) {
|
||||
// this.id = id;
|
||||
// this.userId = userId;
|
||||
// this.admissionTime = admissionTime;
|
||||
// this.caseType = caseType;
|
||||
// this.baseImg = baseImg;
|
||||
// this.expertId = expertId;
|
||||
// this.status = status;
|
||||
// this.updateTime = updateTime;
|
||||
// }
|
||||
public MedicalRecordEntity(Long userId, String baseImg, LocalDateTime admissionTime, Integer caseType, Long expertId, LocalDateTime createTime) {
|
||||
this.userId = userId;
|
||||
this.admissionTime = admissionTime;
|
||||
this.caseType = caseType;
|
||||
this.baseImg = baseImg;
|
||||
this.expertId = expertId;
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public MedicalRecordEntity(Long id, Long userId, String baseImg, LocalDateTime admissionTime, Integer caseType, Long expertId, Integer status, LocalDateTime updateTime) {
|
||||
this.id = id;
|
||||
this.userId = userId;
|
||||
this.admissionTime = admissionTime;
|
||||
this.caseType = caseType;
|
||||
this.baseImg = baseImg;
|
||||
this.expertId = expertId;
|
||||
this.status = status;
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.app.medicalrecord.domain;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 病历摘要表 实体类
|
||||
*
|
||||
* @Author HMM
|
||||
* @Date 2024-01-11 15:18:32
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
|
||||
/**
|
||||
* 病例-疾病转归实体类
|
||||
*/
|
||||
@Data
|
||||
@TableName("`t_caseplatform_case_prognosis`") // 指定数据库表名
|
||||
public class MedicalRecordPrognosisEntity {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 疾病id
|
||||
*/
|
||||
@TableField("case_id")
|
||||
private Long caseId;
|
||||
|
||||
/**
|
||||
* 出院时间
|
||||
*/
|
||||
@TableField("discharge_time")
|
||||
private LocalDateTime dischargeTime;
|
||||
|
||||
/**
|
||||
* 住院天数
|
||||
*/
|
||||
@TableField("day")
|
||||
private Integer day;
|
||||
|
||||
/**
|
||||
* 出院状态(1:好转 2:痊愈 3:恶化 4:死亡 5:移植)
|
||||
*/
|
||||
@TableField("discharge_status")
|
||||
private Integer dischargeStatus;
|
||||
|
||||
/**
|
||||
* 出院情况
|
||||
*/
|
||||
@TableField("discharge_situation")
|
||||
private String dischargeSituation;
|
||||
|
||||
// public MedicalRecordAbstracEntity(Long caseId, String abstractStr, String abstractImg, LocalDateTime createTime) {
|
||||
// this.caseId = caseId;
|
||||
// this.abstractStr = abstractStr;
|
||||
// this.abstractImg = abstractImg;
|
||||
// this.createTime = createTime;
|
||||
// }
|
||||
}
|
||||
@ -8,8 +8,6 @@ import net.lab1024.sa.common.common.domain.PageParam;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
import net.lab1024.sa.common.common.validator.enumeration.CheckEnum;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 前端请求列表的 from
|
||||
*/
|
||||
@ -19,7 +17,8 @@ public class MedicalRecordQueryForm extends PageParam {
|
||||
@ApiModelProperty(value = "name")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "治疗类型", required = true)
|
||||
@ApiModelPropertyEnum(value = CasetypeEnum.class, desc = "病历类型")
|
||||
@CheckEnum(value = CasetypeEnum.class, message = "病历类型 错误")
|
||||
private Integer caseType;
|
||||
|
||||
@ApiModelPropertyEnum(value = CaseStatusEnum.class, desc = "病例状态(0待审核 1审核通过 2审核不通过)")
|
||||
|
||||
@ -39,6 +39,8 @@ public class MedicalRecordUserEntity {
|
||||
*/
|
||||
private String uid;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@ -59,12 +61,12 @@ public class MedicalRecordUserEntity {
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
// public MedicalRecordUserEntity(Long expertId, String name, String uid, Integer sex, Integer age, LocalDateTime createTime) {
|
||||
// this.expertId = expertId;
|
||||
// this.name = name;
|
||||
// this.uid = uid;
|
||||
// this.sex = sex;
|
||||
// this.age = age;
|
||||
// this.createTime = createTime;
|
||||
// }
|
||||
public MedicalRecordUserEntity(Long expertId, String name, String uid, Integer sex, Integer age, LocalDateTime createTime) {
|
||||
this.expertId = expertId;
|
||||
this.name = name;
|
||||
this.uid = uid;
|
||||
this.sex = sex;
|
||||
this.age = age;
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -29,11 +29,6 @@ public class CaseplatformBankEntity {
|
||||
*/
|
||||
private Long expertId;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
private String idCardName;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
|
||||
@ -15,7 +15,7 @@ import net.lab1024.sa.admin.module.app.expert.admin.ExpertSignAddForm;
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CaseplatformBankAddForm {
|
||||
public class CaseplatformBankAddForm extends ExpertSignAddForm {
|
||||
|
||||
@ApiModelProperty(value = "身份证", required = true)
|
||||
@NotBlank(message = "身份证 不能为空")
|
||||
@ -23,7 +23,7 @@ public class CaseplatformBankAddForm {
|
||||
|
||||
@ApiModelProperty(value = "姓名", required = true)
|
||||
@NotBlank(message = "姓名 不能为空")
|
||||
private String idCardName;
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "开户行", required = true)
|
||||
@NotBlank(message = "开户行 不能为空")
|
||||
|
||||
@ -21,9 +21,6 @@ public class CaseplatformBankVO {
|
||||
@ApiModelProperty(value = "专家id")
|
||||
private Long expertId;
|
||||
|
||||
@ApiModelProperty(value = "身份证")
|
||||
private String idCardName;
|
||||
|
||||
@ApiModelProperty(value = "身份证")
|
||||
private String idCardNo;
|
||||
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
package net.lab1024.sa.admin.module.business.bankcard.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertSignVO;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.ExpertDao;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.ExpertSignDao;
|
||||
import net.lab1024.sa.admin.module.business.bankcard.dao.CaseplatformBankDao;
|
||||
import net.lab1024.sa.admin.module.business.bankcard.domain.entity.CaseplatformBankEntity;
|
||||
@ -20,7 +18,6 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* 银行卡 Service
|
||||
@ -39,9 +36,6 @@ public class CaseplatformBankService {
|
||||
@Autowired
|
||||
private ExpertSignDao expertSignDao;
|
||||
|
||||
@Autowired
|
||||
private ExpertDao expertDao;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@ -62,17 +56,6 @@ public class CaseplatformBankService {
|
||||
public synchronized ResponseDTO<String> add(CaseplatformBankAddForm addForm) {
|
||||
CaseplatformBankEntity caseplatformBankEntity = SmartBeanUtil.copy(addForm, CaseplatformBankEntity.class);
|
||||
Long expertId = SmartRequestUtil.getRequestUserId();
|
||||
|
||||
// 获取专家数据
|
||||
ExpertEntity expert = expertDao.getExpert(expertId);
|
||||
if (expert == null) {
|
||||
return ResponseDTO.userErrorParam("操作失败");
|
||||
}
|
||||
|
||||
if (!Objects.equals(expert.getName(), addForm.getIdCardName())){
|
||||
return ResponseDTO.userErrorParam("登录用户名与银行卡姓名不一致");
|
||||
}
|
||||
|
||||
caseplatformBankEntity.setExpertId(expertId);
|
||||
|
||||
CaseplatformBankVO expertBank = caseplatformBankDao.getExpertBank(expertId);
|
||||
@ -83,6 +66,15 @@ public class CaseplatformBankService {
|
||||
caseplatformBankDao.updateById(caseplatformBankEntity);
|
||||
}
|
||||
|
||||
|
||||
String signImg = addForm.getSignImg();
|
||||
ExpertSignVO expertSign = expertSignDao.getExpertSign(expertId);
|
||||
if(expertSign == null){
|
||||
expertSignDao.addExpertSign(expertId, signImg);
|
||||
return ResponseDTO.app_ok();
|
||||
}else{
|
||||
expertSignDao.updateById(expertSign.getId(), signImg);
|
||||
}
|
||||
return ResponseDTO.app_ok();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,26 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.lab1024.sa.common.common.enumeration.BaseEnum;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum CaseAcAppStatusEnum implements BaseEnum {
|
||||
DEFAULT(1, "审核通过"),
|
||||
BEFORE(2, "审核中"),
|
||||
;
|
||||
|
||||
private final Integer value;
|
||||
|
||||
private final String desc;
|
||||
|
||||
public static CaseAcAppStatusEnum getByVal(int val){
|
||||
for (CaseAcAppStatusEnum type: CaseAcAppStatusEnum.values()){
|
||||
if(type.getValue() == val){
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,26 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.constant;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
import net.lab1024.sa.common.common.enumeration.BaseEnum;
|
||||
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum CaseplatformExpertWhiteStatusEnum implements BaseEnum {
|
||||
DEFAULT(1, "正常"),
|
||||
BEFORE(2, "无效"),
|
||||
;
|
||||
|
||||
private final Integer value;
|
||||
|
||||
private final String desc;
|
||||
|
||||
public static CaseplatformExpertWhiteStatusEnum getByVal(int val){
|
||||
for (CaseplatformExpertWhiteStatusEnum type: CaseplatformExpertWhiteStatusEnum.values()){
|
||||
if(type.getValue() == val){
|
||||
return type;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -5,7 +5,7 @@ import lombok.Getter;
|
||||
import net.lab1024.sa.common.common.enumeration.BaseEnum;
|
||||
|
||||
/**
|
||||
* 治疗类型
|
||||
* 病历类型
|
||||
*
|
||||
* @Author HMM
|
||||
* @Date 2024-01-11T15:18:32
|
||||
@ -15,8 +15,8 @@ import net.lab1024.sa.common.common.enumeration.BaseEnum;
|
||||
@AllArgsConstructor
|
||||
@Getter
|
||||
public enum CasetypeEnum implements BaseEnum {
|
||||
DEFAULT(1, "DPMAS及联合模式"),
|
||||
BEFORE(2, "CA280及联合模式"),
|
||||
DEFAULT(1, "四次及以上疗程化"),
|
||||
BEFORE(2, "早前期(INR≤1.5)"),
|
||||
;
|
||||
|
||||
private final Integer value;
|
||||
|
||||
@ -4,8 +4,9 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordDetailVO;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.service.MedicalRecordService;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.*;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformAcAppVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CancelExamineForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformCaseQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformCaseUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformCaseDetailVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformCaseVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.service.CaseplatformCaseService;
|
||||
@ -15,7 +16,11 @@ import net.lab1024.sa.common.common.util.SmartEasyPoiExcelUtil;
|
||||
import net.lab1024.sa.common.module.support.operatelog.annoation.OperateLog;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
@ -64,14 +69,16 @@ public class CaseplatformCaseController {
|
||||
@GetMapping("/caseplatformCase/examine/{caseId}/{status}")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:examine')")
|
||||
public ResponseDTO<String> examine(@PathVariable("caseId") Long caseId, @PathVariable("status") int status) {
|
||||
return caseplatformCaseService.examine(caseId, status);
|
||||
caseplatformCaseService.examine(caseId, status);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("结算 @author HMM")
|
||||
@GetMapping("/caseplatformCase/settlement/{caseId}")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:settlement')")
|
||||
public ResponseDTO<String> settlement(@PathVariable("caseId") Long caseId) {
|
||||
return caseplatformCaseService.settlement(caseId);
|
||||
caseplatformCaseService.settlement(caseId);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("审核拒绝 @author HMM")
|
||||
@ -82,62 +89,22 @@ public class CaseplatformCaseController {
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
// @ApiOperation("导出excle @author HMM")
|
||||
// @GetMapping("/caseplatformCase/exportExcel")
|
||||
// @PreAuthorize("@saAuth.checkPermission('case-system:case:excle')")
|
||||
// public void exportExcel(HttpServletResponse response, @RequestBody @Valid CaseplatformCaseQueryForm queryForm) {
|
||||
// try {
|
||||
// List<CaseplatformCaseVO> data = caseplatformCaseService.queryList(queryForm);
|
||||
// List<CaseplatformCaseDetailVO> list = new ArrayList<>();
|
||||
// for(CaseplatformCaseVO vv:data){
|
||||
// ResponseDTO<CaseplatformCaseDetailVO> detail = caseplatformCaseService.getDetail(vv.getId());
|
||||
// CaseplatformCaseDetailVO data1 = detail.getData();
|
||||
// list.add(data1);
|
||||
// }
|
||||
// SmartEasyPoiExcelUtil.exportExcel(list, "qwe", "病例", CaseplatformCaseDetailVO.class, "病例导出数据", response);
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
|
||||
@ApiOperation("出院诊断修改")
|
||||
@PutMapping("/caseplatformCase/mainDiagnose")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:mainDiagnose')")
|
||||
public ResponseDTO<String> caseMainDiagnose(@RequestBody @Valid CaseMainDiagnoseForm form) {
|
||||
return caseplatformCaseService.caseMainDiagnose(form);
|
||||
@ApiOperation("导出excle @author HMM")
|
||||
@GetMapping("/caseplatformCase/exportExcel")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:excle')")
|
||||
public void exportExcel(HttpServletResponse response, @RequestBody @Valid CaseplatformCaseQueryForm queryForm) {
|
||||
try {
|
||||
List<CaseplatformCaseVO> data = caseplatformCaseService.queryList(queryForm);
|
||||
List<CaseplatformCaseDetailVO> list = new ArrayList<>();
|
||||
for(CaseplatformCaseVO vv:data){
|
||||
ResponseDTO<CaseplatformCaseDetailVO> detail = caseplatformCaseService.getDetail(vv.getId());
|
||||
CaseplatformCaseDetailVO data1 = detail.getData();
|
||||
list.add(data1);
|
||||
}
|
||||
SmartEasyPoiExcelUtil.exportExcel(list, "qwe", "病例", CaseplatformCaseDetailVO.class, "病例导出数据", response);
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("人工肝治疗图片修改")
|
||||
@PutMapping("/caseplatformCase/dpmasImg")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:checkPermission')")
|
||||
public ResponseDTO<String> caseDpmasImg(@RequestBody @Valid CaseDpmasImgForm form) {
|
||||
return caseplatformCaseService.caseDpmasImg(form);
|
||||
}
|
||||
|
||||
@ApiOperation("实验室检测图片修改")
|
||||
@PutMapping("/caseplatformCase/checkdataImg")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:checkdataImg')")
|
||||
public ResponseDTO<String> caseCheckdataImg(@RequestBody @Valid CaseCheckdataImgForm form) {
|
||||
return caseplatformCaseService.caseCheckdataImg(form);
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询-活动申请")
|
||||
@PostMapping("/caseplatformCase/activity/queryPage")
|
||||
public ResponseDTO<PageResult<CaseplatformAcAppVO>> CaseplatformAcAppQueryPage(@RequestBody @Valid CaseplatformAcAppQueryForm queryForm) {
|
||||
return caseplatformCaseService.caseplatformAcAppQueryPage(queryForm);
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/caseplatformCase/activity/delete/{id}")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:deleteCaseplatformAcApp')")
|
||||
public ResponseDTO<String> deleteCaseplatformAcApp(@PathVariable("id") Long id) {
|
||||
return caseplatformCaseService.deleteCaseplatformAcApp(id);
|
||||
}
|
||||
|
||||
@ApiOperation("活动申请-状态修改")
|
||||
@PutMapping("/caseplatformCase/activity/status/{id}")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:updateCaseplatformAcApp')")
|
||||
public ResponseDTO<String> updateCaseplatformAcApp(@PathVariable("id") Long id,@RequestBody @Valid CaseplatformAcAppUpdateForm form) {
|
||||
return caseplatformCaseService.updateCaseplatformAcApp(id,form);
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,25 +11,18 @@ import io.swagger.annotations.ApiOperation;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.service.MedicalRecordService;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformCaseQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.EasyExcelCaseDetailVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.ExportExpertCaseExcelVo;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.service.CaseplatformCaseService;
|
||||
import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import net.lab1024.sa.common.module.support.operatelog.annoation.OperateLog;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.ss.util.CellRangeAddress;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
import org.apache.poi.ss.usermodel.VerticalAlignment;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.FileOutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 病历表 Controller
|
||||
@ -39,27 +32,16 @@ import java.util.*;
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
|
||||
@RestController
|
||||
@Controller
|
||||
@Api(tags = "")
|
||||
@OperateLog
|
||||
public class CaseplatformCaseExcelController {
|
||||
@Autowired
|
||||
private CaseplatformCaseService caseplatformCaseService;
|
||||
|
||||
// 病例管理导出
|
||||
@ApiOperation("病例管理导出")
|
||||
@GetMapping("/caseplatformCase/exportEasyExcel")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:excle')")
|
||||
public void exportEasyExcel(HttpServletResponse response, @Valid CaseplatformCaseQueryForm queryForm) {
|
||||
try {
|
||||
List<EasyExcelCaseDetailVO> list = caseplatformCaseService.excelList(queryForm);
|
||||
|
||||
// 处理数据
|
||||
for (EasyExcelCaseDetailVO m : list) {
|
||||
// 治疗类型
|
||||
m.setCaseType(caseplatformCaseService.convertCaseTypeToLabel(m.getCaseType()));
|
||||
}
|
||||
|
||||
// 1设置表头样式
|
||||
WriteCellStyle headStyle = new WriteCellStyle();
|
||||
// 1.1设置表头数据居中
|
||||
@ -93,247 +75,4 @@ public class CaseplatformCaseExcelController {
|
||||
}
|
||||
}
|
||||
|
||||
// 结算导出
|
||||
@ApiOperation("结算导出")
|
||||
@GetMapping("/caseplatformCase/settlementExcel")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:exportExpertCaseExceli')")
|
||||
public void exportExpertCaseExceli(HttpServletResponse response, @Valid CaseplatformCaseQueryForm queryForm) {
|
||||
try {
|
||||
List<ExportExpertCaseExcelVo> list = caseplatformCaseService.exportExpertCaseExcel(queryForm);
|
||||
List<ExportExpertCaseExcelVo> processedList = caseplatformCaseService.exportExpertCaseExcelProcess(list);
|
||||
|
||||
// 总计
|
||||
double totalActual = processedList.stream().mapToDouble(e -> Optional.ofNullable(e.getActualAmount()).orElse(0.0)).sum();
|
||||
double totalTax = processedList.stream().mapToDouble(e -> Optional.ofNullable(e.getTaxAmount()).orElse(0.0)).sum();
|
||||
double totalTotal = processedList.stream().mapToDouble(e -> Optional.ofNullable(e.getTotalAmount()).orElse(0.0)).sum();
|
||||
|
||||
String filePath = "./人工肝诊疗专家劳务费.xlsx";
|
||||
FileOutputStream outputStream = new FileOutputStream(filePath);
|
||||
|
||||
// 字段标题
|
||||
List<List<String>> head = Arrays.asList(
|
||||
Collections.singletonList("序号"),
|
||||
Collections.singletonList("银行"),
|
||||
Collections.singletonList("账号所在省份"),
|
||||
Collections.singletonList("账户所在地市"),
|
||||
Collections.singletonList("卡号"),
|
||||
Collections.singletonList("姓名"),
|
||||
Collections.singletonList("实发"),
|
||||
Collections.singletonList("备注"),
|
||||
Collections.singletonList("个税"),
|
||||
Collections.singletonList("应发"),
|
||||
Collections.singletonList("单位"),
|
||||
Collections.singletonList("电话"),
|
||||
Collections.singletonList("身份证号"),
|
||||
Collections.singletonList("关联病例")
|
||||
);
|
||||
|
||||
WriteCellStyle headStyle = new WriteCellStyle();
|
||||
headStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
headStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
headStyle.setFillPatternType(FillPatternType.SOLID_FOREGROUND);
|
||||
headStyle.setBorderBottom(BorderStyle.THIN);
|
||||
headStyle.setBorderTop(BorderStyle.THIN);
|
||||
headStyle.setBorderLeft(BorderStyle.THIN);
|
||||
headStyle.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
WriteCellStyle contentStyle = new WriteCellStyle();
|
||||
contentStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
contentStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
contentStyle.setBorderBottom(BorderStyle.THIN);
|
||||
contentStyle.setBorderTop(BorderStyle.THIN);
|
||||
contentStyle.setBorderLeft(BorderStyle.THIN);
|
||||
contentStyle.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
// ExcelWriter writer = EasyExcel.write(outputStream, ExportExpertCaseExcelVo.class)
|
||||
ExcelWriter writer = EasyExcel.write(response.getOutputStream(), ExportExpertCaseExcelVo.class)
|
||||
.head(head)
|
||||
.excelType(ExcelTypeEnum.XLSX)
|
||||
.registerWriteHandler(new HorizontalCellStyleStrategy(headStyle, contentStyle))
|
||||
.build();
|
||||
|
||||
WriteSheet writeSheet = EasyExcel.writerSheet("劳务费明细")
|
||||
.needHead(true)
|
||||
.relativeHeadRowIndex(1) // 数据从第3行开始,前2行为标题
|
||||
.build();
|
||||
|
||||
// 写数据
|
||||
writer.write(processedList, writeSheet);
|
||||
|
||||
// 合并大标题
|
||||
Workbook workbook = (Workbook) writer.writeContext().writeWorkbookHolder().getWorkbook();
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, head.size() - 1));
|
||||
Row titleRow = sheet.createRow(0);
|
||||
titleRow.setHeightInPoints(30); // 设置标题行高
|
||||
Cell titleCell = titleRow.createCell(0);
|
||||
titleCell.setCellValue("人工肝诊疗病例征集项目专家劳务费表");
|
||||
CellStyle titleStyle = workbook.createCellStyle();
|
||||
Font font = workbook.createFont();
|
||||
font.setFontHeightInPoints((short) 16);
|
||||
font.setBold(true);
|
||||
titleStyle.setFont(font);
|
||||
titleStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
titleStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
titleStyle.setBorderRight(BorderStyle.THIN); // 最后一格加右边框
|
||||
titleCell.setCellStyle(titleStyle);
|
||||
|
||||
// === 设置行高 ===
|
||||
sheet.getRow(1).setHeightInPoints(25); // 表头行
|
||||
for (int i = 2; i <= processedList.size() + 2; i++) {
|
||||
Row row = sheet.getRow(i);
|
||||
if (row != null) {
|
||||
row.setHeightInPoints(22);
|
||||
}
|
||||
}
|
||||
|
||||
// === 设置列宽 ===
|
||||
int[] columnWidths = {
|
||||
6, 25, 15, 15, 25, 10, 10, 30, 8, 8, 30, 25, 30, 15
|
||||
};
|
||||
for (int i = 0; i < columnWidths.length; i++) {
|
||||
sheet.setColumnWidth(i, columnWidths[i] * 256); // 乘 256 为 Excel 单位
|
||||
}
|
||||
|
||||
// 写合计行
|
||||
int totalRowIndex = processedList.size() + 2; // +1是数据从第3行开始,+2是表头行数
|
||||
Row totalRow = sheet.createRow(totalRowIndex);
|
||||
totalRow.setHeightInPoints(22);
|
||||
|
||||
// 合计行样式(黑底白字)
|
||||
CellStyle totalStyle = workbook.createCellStyle();
|
||||
Font totalFont = workbook.createFont();
|
||||
totalFont.setBold(true);
|
||||
totalFont.setColor(IndexedColors.WHITE.getIndex());
|
||||
totalStyle.setFont(totalFont);
|
||||
totalStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
|
||||
totalStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
totalStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
totalStyle.setBorderTop(BorderStyle.THIN);
|
||||
totalStyle.setBorderBottom(BorderStyle.THIN);
|
||||
totalStyle.setBorderLeft(BorderStyle.THIN);
|
||||
totalStyle.setBorderRight(BorderStyle.THIN);
|
||||
|
||||
// 合并前3列,写“合计”
|
||||
sheet.addMergedRegion(new CellRangeAddress(totalRowIndex, totalRowIndex, 0, 5));
|
||||
Cell cell0 = totalRow.createCell(0);
|
||||
cell0.setCellValue("合计");
|
||||
|
||||
// 设置边框样式
|
||||
CellStyle borderStyle = workbook.createCellStyle();
|
||||
borderStyle.setBorderBottom(BorderStyle.THIN);
|
||||
borderStyle.setBorderTop(BorderStyle.THIN);
|
||||
borderStyle.setBorderLeft(BorderStyle.THIN);
|
||||
borderStyle.setBorderRight(BorderStyle.THIN);
|
||||
borderStyle.setAlignment(HorizontalAlignment.CENTER);
|
||||
|
||||
// 创建合计单元格并添加边框
|
||||
for (int i = 0; i < head.size(); i++) {
|
||||
Cell cell = totalRow.getCell(i);
|
||||
if (cell == null) {
|
||||
cell = totalRow.createCell(i);
|
||||
}
|
||||
cell.setCellStyle(borderStyle);
|
||||
}
|
||||
|
||||
// 实发(列 G = index 6)、个税(I = 8)、应发(J = 9)
|
||||
totalRow.getCell(6).setCellValue(totalActual);
|
||||
totalRow.getCell(8).setCellValue(totalTax);
|
||||
totalRow.getCell(9).setCellValue(totalTotal);
|
||||
|
||||
// 6通知浏览器以附件的形式下载处理,设置返回头要注意文件名有中文
|
||||
String fileName = URLEncoder.encode("病例数据", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
response.setContentType("multipart/form-data");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
writer.finish();
|
||||
|
||||
outputStream.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// 结算导出
|
||||
@ApiOperation("结算导出")
|
||||
@GetMapping("/caseplatformCase/settlementExcel1")
|
||||
public void exportExpertCaseExcel(HttpServletResponse response, @Valid CaseplatformCaseQueryForm queryForm) {
|
||||
try {
|
||||
List<ExportExpertCaseExcelVo> list = caseplatformCaseService.exportExpertCaseExcel(queryForm);
|
||||
List<ExportExpertCaseExcelVo> processedList = caseplatformCaseService.exportExpertCaseExcelProcess(list);
|
||||
|
||||
// 设置本地文件路径
|
||||
String filePath = "./病例数据.xlsx";
|
||||
FileOutputStream outputStream = new FileOutputStream(filePath);
|
||||
|
||||
// 字段标题
|
||||
List<List<String>> head = Arrays.asList(
|
||||
Collections.singletonList("序号"),
|
||||
Collections.singletonList("银行"),
|
||||
Collections.singletonList("账号所在省份"),
|
||||
Collections.singletonList("账户所在地市"),
|
||||
Collections.singletonList("卡号"),
|
||||
Collections.singletonList("姓名"),
|
||||
Collections.singletonList("实发"),
|
||||
Collections.singletonList("备注"),
|
||||
Collections.singletonList("个税"),
|
||||
Collections.singletonList("应发"),
|
||||
Collections.singletonList("单位"),
|
||||
Collections.singletonList("电话"),
|
||||
Collections.singletonList("身份证号"),
|
||||
Collections.singletonList("关联病例")
|
||||
);
|
||||
|
||||
// 1设置表头样式
|
||||
WriteCellStyle headStyle = new WriteCellStyle();
|
||||
// 1.1设置表头数据居中
|
||||
headStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
|
||||
// 2设置表格内容样式
|
||||
WriteCellStyle bodyStyle = new WriteCellStyle();
|
||||
// 2.1设置表格内容水平居中
|
||||
bodyStyle.setHorizontalAlignment(HorizontalAlignment.CENTER);
|
||||
// 2.2设置表格内容垂直居中
|
||||
bodyStyle.setVerticalAlignment(VerticalAlignment.CENTER);
|
||||
|
||||
// 3设置表格sheet样式
|
||||
WriteSheet sheet = EasyExcel.writerSheet().sheetNo(1).build();
|
||||
// 4拿到表格处理对象
|
||||
// ExcelWriter writer = EasyExcel.write(response.getOutputStream()).needHead(true).excelType(ExcelTypeEnum.XLSX)
|
||||
ExcelWriter writer = EasyExcel.write(outputStream).needHead(true).excelType(ExcelTypeEnum.XLSX)
|
||||
// 设置单元格的风格样式
|
||||
.head(head)
|
||||
.registerWriteHandler(new HorizontalCellStyleStrategy(headStyle, bodyStyle))
|
||||
.build();
|
||||
|
||||
// 5写入excel数据
|
||||
writer.write(processedList, sheet);
|
||||
// 6通知浏览器以附件的形式下载处理,设置返回头要注意文件名有中文
|
||||
String fileName = URLEncoder.encode("结算导出", "UTF-8").replaceAll("\\+", "%20");
|
||||
response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
|
||||
response.setContentType("multipart/form-data");
|
||||
response.setCharacterEncoding("utf-8");
|
||||
writer.finish();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
@ApiOperation("结算导入")
|
||||
@PostMapping("/caseplatformCase/settlementImport")
|
||||
@PreAuthorize("@saAuth.checkPermission('case-system:case:caseplatformCaseSettlementImport')")
|
||||
public ResponseDTO<T> caseplatformCaseSettlementImport(@RequestParam("file") MultipartFile file) {
|
||||
try {
|
||||
caseplatformCaseService.caseplatformCaseSettlementImport(file);
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformAcAppUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformCaseQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformExpertWhiteQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.UpdateCaseplatformExpertWhiteForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformCaseVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.GetCaseplatformExpertWhitePageVo;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.service.CaseplatformCaseService;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.service.CaseplatformExpertWhiteService;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcaseabstrac.service.CaseplatformCaseAbstracService;
|
||||
import net.lab1024.sa.common.common.domain.PageResult;
|
||||
import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import net.lab1024.sa.common.module.support.operatelog.annoation.OperateLog;
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@RestController
|
||||
@Api(tags = "")
|
||||
@OperateLog
|
||||
public class CaseplatformExpertWhiteController {
|
||||
|
||||
@Autowired
|
||||
private CaseplatformExpertWhiteService caseplatformExpertWhiteService;
|
||||
|
||||
@ApiOperation("医生管理导入")
|
||||
@PostMapping("/caseplatformExpertWhite/import")
|
||||
public ResponseDTO<T> caseplatformExpertWhiteImport(@RequestParam("file") MultipartFile file) {
|
||||
try {
|
||||
caseplatformExpertWhiteService.importExperts(file);
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException(e.getMessage());
|
||||
}
|
||||
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
@PostMapping("/caseplatformExpertWhite/queryPage")
|
||||
public ResponseDTO<PageResult<GetCaseplatformExpertWhitePageVo>> getCaseplatformExpertWhitePage(@RequestBody @Valid CaseplatformExpertWhiteQueryForm queryForm) {
|
||||
return caseplatformExpertWhiteService.queryPage(queryForm);
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
@DeleteMapping("/caseplatformExpertWhite/delete/{id}")
|
||||
public ResponseDTO<String> deleteCaseplatformExpertWhite(@PathVariable("id") Long id) {
|
||||
return caseplatformExpertWhiteService.delete(id);
|
||||
}
|
||||
|
||||
@ApiOperation("修改状态")
|
||||
@PutMapping("/caseplatformExpertWhite/update/{id}")
|
||||
public ResponseDTO<String> updateCaseplatformExpertWhite(@PathVariable("id") Long id,@RequestBody @Valid UpdateCaseplatformExpertWhiteForm form) {
|
||||
return caseplatformExpertWhiteService.updateCaseplatformAcApp(id,form);
|
||||
}
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.lab1024.sa.admin.module.business.area.domain.vo.ProvVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.entity.CaseplatformAcAppEntity;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformAcAppQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformCaseQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformAcAppVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformCaseVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.EasyExcelCaseDetailVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface CaseplatformAcAppDao extends BaseMapper<CaseplatformAcAppEntity> {
|
||||
|
||||
/**
|
||||
* 分页 查询
|
||||
*
|
||||
* @param page
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
List<CaseplatformAcAppVO> queryPage(Page page, @Param("queryForm") CaseplatformAcAppQueryForm queryForm, @Param("provList")List<ProvVO> provList);
|
||||
|
||||
}
|
||||
@ -9,7 +9,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformCaseDetailVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformCaseVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.EasyExcelCaseDetailVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.ExportExpertCaseExcelVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Update;
|
||||
@ -40,8 +39,6 @@ public interface CaseplatformCaseDao extends BaseMapper<CaseplatformCaseEntity>
|
||||
|
||||
List<EasyExcelCaseDetailVO> excelList(@Param("queryForm") CaseplatformCaseQueryForm queryForm, @Param("provList")List<ProvVO> provList);
|
||||
|
||||
List<ExportExpertCaseExcelVo> getExportExpertCaseExcelList(@Param("queryForm") CaseplatformCaseQueryForm queryForm, @Param("provList")List<ProvVO> provList);
|
||||
|
||||
/**
|
||||
* 获取详情
|
||||
* @param case_id
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.entity;
|
||||
|
||||
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 lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 活动申请表实体类
|
||||
*/
|
||||
@TableName("`t_caseplatform_activity_application`")
|
||||
@Data
|
||||
public class CaseplatformAcAppEntity {
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 专家id
|
||||
*/
|
||||
@TableField("expert_id")
|
||||
private Long expertId;
|
||||
|
||||
/**
|
||||
* 状态(1:审核通过 2:审核中)
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField("create_time")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -37,7 +37,7 @@ public class CaseplatformCaseEntity {
|
||||
/**
|
||||
* 病历类型
|
||||
*/
|
||||
private String caseType;
|
||||
private Integer caseType;
|
||||
|
||||
/**
|
||||
* 专家 id
|
||||
@ -54,9 +54,6 @@ public class CaseplatformCaseEntity {
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
// 审核通过时间
|
||||
private LocalDateTime examineTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ -67,19 +64,4 @@ public class CaseplatformCaseEntity {
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 主要诊断
|
||||
*/
|
||||
private String mainDiagnose;
|
||||
|
||||
/**
|
||||
* 患者病因
|
||||
*/
|
||||
private String diseaseCause;
|
||||
|
||||
/**
|
||||
* 诱因
|
||||
*/
|
||||
private String seductionReason;
|
||||
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class CaseCheckdataImgForm {
|
||||
@ApiModelProperty(value = "病例", required = true)
|
||||
@NotNull(message = "病例 不能为空")
|
||||
private String caseId;
|
||||
|
||||
@ApiModelProperty(value = "生化指标 图片")
|
||||
private String bioImg;
|
||||
|
||||
@ApiModelProperty(value = "凝血功能指标 图片")
|
||||
private String coaImg;
|
||||
|
||||
@ApiModelProperty(value = "炎症因子指标 图片")
|
||||
private String infImg;
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class CaseDpmasImgForm {
|
||||
@ApiModelProperty(value = "病例", required = true)
|
||||
@NotNull(message = "病例 不能为空")
|
||||
private String dmpsId;
|
||||
|
||||
@ApiModelProperty(value = "病例", required = true)
|
||||
@NotNull(message = "病例 不能为空")
|
||||
private String caseId;
|
||||
|
||||
@ApiModelProperty(value = "记录图片", required = true)
|
||||
@NotNull(message = "记录图片 不能为空")
|
||||
private String dpmasImg;
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Data
|
||||
public class CaseMainDiagnoseForm {
|
||||
@ApiModelProperty(value = "病例", required = true)
|
||||
@NotNull(message = "病例 不能为空")
|
||||
private String caseId;
|
||||
|
||||
@ApiModelProperty(value = "出院诊断", required = true)
|
||||
@NotNull(message = "出院诊断 不能为空")
|
||||
private String mainDiagnose;
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseAcAppStatusEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseSettlementEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseStatusEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CasetypeEnum;
|
||||
import net.lab1024.sa.common.common.domain.PageParam;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
import net.lab1024.sa.common.common.validator.enumeration.CheckEnum;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class CaseplatformAcAppQueryForm extends PageParam{
|
||||
|
||||
@ApiModelProperty(value = "专家姓名")
|
||||
private String expertName;
|
||||
|
||||
@ApiModelProperty(value = "省份")
|
||||
private Long provId;
|
||||
|
||||
@ApiModelProperty(value = "市区")
|
||||
private Long cityId;
|
||||
|
||||
@ApiModelProperty(value = "医院")
|
||||
private String hospitalUuid;
|
||||
|
||||
@ApiModelPropertyEnum(value = CaseAcAppStatusEnum.class, desc = "审核状态")
|
||||
@CheckEnum(value = CaseAcAppStatusEnum.class, message = "审核状态 错误")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "申请时间")
|
||||
private List<LocalDateTime> createTime;
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseAcAppStatusEnum;
|
||||
import net.lab1024.sa.common.common.domain.PageParam;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
import net.lab1024.sa.common.common.validator.enumeration.CheckEnum;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class CaseplatformAcAppUpdateForm{
|
||||
@ApiModelPropertyEnum(value = CaseAcAppStatusEnum.class, desc = "审核状态")
|
||||
@CheckEnum(value = CaseAcAppStatusEnum.class, message = "审核状态 错误")
|
||||
private Integer status;
|
||||
}
|
||||
@ -33,9 +33,9 @@ public class CaseplatformCaseAddForm {
|
||||
@NotNull(message = "入院时间 不能为空")
|
||||
private LocalDateTime admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "病历类型", required = true)
|
||||
@NotNull(message = "病历类型 不能为空")
|
||||
private String caseType;
|
||||
@ApiModelPropertyEnum(value = CasetypeEnum.class, desc = "病历类型")
|
||||
@CheckEnum(value = CasetypeEnum.class, message = "病历类型 错误", required = true)
|
||||
private Integer caseType;
|
||||
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
@NotNull(message = "创建时间 不能为空")
|
||||
|
||||
@ -9,9 +9,6 @@ import lombok.Data;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
import net.lab1024.sa.common.common.validator.enumeration.CheckEnum;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 病历表 分页查询表单
|
||||
*
|
||||
@ -38,12 +35,6 @@ public class CaseplatformCaseQueryForm extends PageParam{
|
||||
@CheckEnum(value = CaseStatusEnum.class, message = "0待审核 1审核通过 2审核不通过 错误")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
private List<LocalDateTime> examineTime;
|
||||
|
||||
@ApiModelProperty(hidden = true)
|
||||
private List<String> examineTimeFormatted;
|
||||
|
||||
@ApiModelProperty(value = "省份")
|
||||
private Long provId;
|
||||
|
||||
|
||||
@ -1,34 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.form;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseSettlementEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseStatusEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CasetypeEnum;
|
||||
import net.lab1024.sa.common.common.domain.PageParam;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
import net.lab1024.sa.common.common.validator.enumeration.CheckEnum;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 病历表 分页查询表单
|
||||
*
|
||||
* @Author HMM
|
||||
* @Date 2024-01-11 15:18:32
|
||||
* @Copyright gdxz
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class CaseplatformExpertWhiteQueryForm extends PageParam{
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "医院名称")
|
||||
private String hospitalName;
|
||||
}
|
||||
@ -1,15 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.form;
|
||||
|
||||
import lombok.Data;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseAcAppStatusEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseplatformExpertWhiteStatusEnum;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
import net.lab1024.sa.common.common.validator.enumeration.CheckEnum;
|
||||
|
||||
|
||||
@Data
|
||||
public class UpdateCaseplatformExpertWhiteForm {
|
||||
@ApiModelPropertyEnum(value = CaseplatformExpertWhiteStatusEnum.class, desc = "状态")
|
||||
@CheckEnum(value = CaseplatformExpertWhiteStatusEnum.class, message = "状态 错误")
|
||||
private Integer status;
|
||||
}
|
||||
@ -1,45 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseAcAppStatusEnum;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.constant.CaseStatusEnum;
|
||||
import net.lab1024.sa.common.common.swagger.ApiModelPropertyEnum;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
public class CaseplatformAcAppVO {
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "专家id")
|
||||
private Long expertId;
|
||||
|
||||
@ApiModelProperty(value = "专家姓名")
|
||||
private String expertName;
|
||||
|
||||
@ApiModelProperty(value = "专家手机号")
|
||||
private String expertMobile;
|
||||
|
||||
@ApiModelProperty(value = "专家所在医院")
|
||||
private String expertHospitalName;
|
||||
|
||||
@ApiModelProperty(value = "专家所在省份名称")
|
||||
private String expertProvName;
|
||||
|
||||
@ApiModelProperty(value = "专家所在城市名称")
|
||||
private String expertCityName;
|
||||
|
||||
@ApiModelPropertyEnum(value = CaseAcAppStatusEnum.class, desc = "状态(1:审核通过 2:审核中)")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "已审核通过病例数")
|
||||
private Integer caseNum = 0;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -34,8 +34,8 @@ public class CaseplatformCaseVO {
|
||||
@ApiModelProperty(value = "入院时间")
|
||||
private LocalDateTime admissionTime;
|
||||
|
||||
@ApiModelProperty(value = "治疗类型")
|
||||
private String caseType;
|
||||
@ApiModelPropertyEnum(value = CasetypeEnum.class, desc = "病历类型")
|
||||
private Integer caseType;
|
||||
|
||||
@ApiModelProperty(value = "专家姓名")
|
||||
private String expertName;
|
||||
@ -49,9 +49,6 @@ public class CaseplatformCaseVO {
|
||||
@ApiModelPropertyEnum(value = CaseStatusEnum.class, desc = "0待审核 1审核通过 2审核不通过")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "审核通过时间")
|
||||
private LocalDateTime examineTime;
|
||||
|
||||
@ApiModelProperty(value = "专家所在城市医院")
|
||||
private String expertHospitalName;
|
||||
|
||||
@ -67,9 +64,4 @@ public class CaseplatformCaseVO {
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "签署状态(1:已签署 2:未签署)")
|
||||
private Integer signStatus = 2;
|
||||
|
||||
@ApiModelProperty(value = "协议地址")
|
||||
private String signLinkPc = "";
|
||||
}
|
||||
@ -59,9 +59,9 @@ public class EasyExcelCaseDetailVO {
|
||||
@ExcelProperty("患者ID")
|
||||
private String uid;
|
||||
|
||||
@ApiModelProperty(value = "治疗类型")
|
||||
@ExcelProperty("治疗类型")
|
||||
private String caseType;
|
||||
@ApiModelPropertyEnum(value = CasetypeEnum.class, desc = "病历类型")
|
||||
@ExcelProperty(value = "病历类型", converter = CasetypeConverter.class)
|
||||
private Integer caseType;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@ExcelProperty("提交时间")
|
||||
|
||||
@ -1,63 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnore;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@EqualsAndHashCode
|
||||
public class ExportExpertCaseExcelVo {
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("专家id")
|
||||
private Long expertId;
|
||||
|
||||
@ExcelIgnore
|
||||
@ExcelProperty("病例id")
|
||||
private Long caseId;
|
||||
|
||||
@ExcelProperty("序号")
|
||||
private Integer index;
|
||||
|
||||
@ExcelProperty("银行")
|
||||
private String bankName;
|
||||
|
||||
@ExcelProperty("账号所在省份")
|
||||
private String prov;
|
||||
|
||||
@ExcelProperty("账户所在地市")
|
||||
private String city;
|
||||
|
||||
@ExcelProperty("卡号")
|
||||
private String bankCardNo;
|
||||
|
||||
@ExcelProperty("姓名")
|
||||
private String idCardName;
|
||||
|
||||
@ExcelProperty("实发")
|
||||
private Double actualAmount = 0.00;
|
||||
|
||||
@ExcelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
@ExcelProperty("个税")
|
||||
private Double taxAmount = 0.00;
|
||||
|
||||
@ExcelProperty("应发")
|
||||
private Double totalAmount = 0.00;
|
||||
|
||||
@ExcelProperty("单位")
|
||||
private String hospitalName;
|
||||
|
||||
@ExcelProperty("电话")
|
||||
private String mobile;
|
||||
|
||||
@ExcelProperty("身份证号")
|
||||
private String idCardNo;
|
||||
|
||||
@ExcelProperty("关联病例")
|
||||
private String relatedCaseId;
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
@Data
|
||||
public class GetCaseplatformExpertWhitePageVo {
|
||||
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "姓名")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "医院名称")
|
||||
private String hospitalName;
|
||||
|
||||
@ApiModelProperty(value = "省")
|
||||
private String prov;
|
||||
|
||||
@ApiModelProperty(value = "科室")
|
||||
private String department;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "职称")
|
||||
private String title;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
}
|
||||
@ -1,69 +1,34 @@
|
||||
package net.lab1024.sa.admin.module.business.caseplatformcase.service;
|
||||
|
||||
import cn.hutool.poi.excel.ExcelReader;
|
||||
import cn.hutool.poi.excel.ExcelUtil;
|
||||
// import com.alibaba.fastjson.JSON;
|
||||
// import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import net.lab1024.sa.admin.module.app.expert.admin.ExpertWhiteEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.CasePlatformBankDao;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.ExpertWhiteEntityDao;
|
||||
import net.lab1024.sa.admin.module.app.expert.dao.FxqSignDao;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.CasePlatformBankEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.domain.entity.FxqSignEntity;
|
||||
import net.lab1024.sa.admin.module.app.expert.service.ExpertWhiteEntityService;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.dao.MedicalRecorCheckDataDao;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.dao.MedicalRecorDao;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.dao.MedicalRecorDpmasDao;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordCheckdataEntity;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordDpmsEntity;
|
||||
import net.lab1024.sa.admin.module.app.medicalrecord.domain.MedicalRecordEntity;
|
||||
import net.lab1024.sa.admin.module.business.area.domain.vo.ProvVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.dao.CaseplatformAcAppDao;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.dao.CaseplatformCaseDao;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.entity.CaseplatformAcAppEntity;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.entity.CaseplatformCaseEntity;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.*;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.*;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CancelExamineForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformCaseAddForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformCaseQueryForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.form.CaseplatformCaseUpdateForm;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformCaseDetailVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.CaseplatformCaseVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcase.domain.vo.EasyExcelCaseDetailVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcaseabstrac.domain.vo.CaseplatformCaseAbstracVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcaseabstrac.service.CaseplatformCaseAbstracService;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcasecheckdata.dao.CaseplatformCaseCheckdataDao;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcasecheckdata.domain.entity.CaseplatformCaseCheckdataEntity;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcasecheckdata.domain.vo.CaseplatformCaseCheckdataVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcasecheckdata.service.CaseplatformCaseCheckdataService;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcasedpms.dao.CaseplatformCaseDpmsDao;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcasedpms.domain.entity.CaseplatformCaseDpmsEntity;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcasedpms.domain.vo.CaseplatformCaseDpmsVO;
|
||||
import net.lab1024.sa.admin.module.business.caseplatformcasedpms.service.CaseplatformCaseDpmsService;
|
||||
import net.lab1024.sa.admin.module.system.login.domain.LoginEmployeeDetail;
|
||||
import net.lab1024.sa.common.common.domain.PageResult;
|
||||
import net.lab1024.sa.common.common.domain.RequestUser;
|
||||
import net.lab1024.sa.common.common.domain.ResponseDTO;
|
||||
import net.lab1024.sa.common.common.exception.BusinessException;
|
||||
import net.lab1024.sa.common.common.util.SmartBeanUtil;
|
||||
import net.lab1024.sa.common.common.util.SmartPageUtil;
|
||||
import net.lab1024.sa.common.common.util.SmartRequestUtil;
|
||||
import org.apache.poi.ss.usermodel.Row;
|
||||
import org.apache.poi.ss.usermodel.Sheet;
|
||||
import org.apache.poi.ss.usermodel.Workbook;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
import static net.lab1024.sa.common.common.code.UserErrorCode.NO_AUTH;
|
||||
import static net.lab1024.sa.common.common.code.UserErrorCode.NO_PERMISSION;
|
||||
|
||||
/**
|
||||
@ -89,33 +54,6 @@ public class CaseplatformCaseService {
|
||||
@Autowired
|
||||
private CaseplatformCaseCheckdataService checkdataService;
|
||||
|
||||
@Autowired
|
||||
private ExpertWhiteEntityDao expertWhiteDao;
|
||||
|
||||
@Autowired
|
||||
private CasePlatformBankDao casePlatformBankDao;
|
||||
|
||||
@Autowired
|
||||
private MedicalRecorDpmasDao medicalRecorDpmasDao;
|
||||
|
||||
@Autowired
|
||||
private MedicalRecorCheckDataDao medicalRecorCheckDataDao;
|
||||
|
||||
@Autowired
|
||||
private MedicalRecorDao medicalRecorDao;
|
||||
|
||||
@Autowired
|
||||
private CaseplatformAcAppDao caseplatformAcAppDao;
|
||||
|
||||
@Resource
|
||||
private FxqSignDao fxqSignDao;
|
||||
|
||||
@Resource
|
||||
private ExpertWhiteEntityService expertWhiteEntityService;
|
||||
|
||||
// 创建 ObjectMapper 实例(建议使用 Spring 注入或静态常量)
|
||||
private static final ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
@ -134,25 +72,6 @@ public class CaseplatformCaseService {
|
||||
return ResponseDTO.ok(SmartPageUtil.emptyResult(page));
|
||||
}
|
||||
}
|
||||
|
||||
// 时间处理
|
||||
if (queryForm.getExamineTime() != null && queryForm.getExamineTime().size() == 2) {
|
||||
LocalDateTime start = queryForm.getExamineTime().get(0)
|
||||
.withHour(0).withMinute(0).withSecond(0).withNano(0);
|
||||
LocalDateTime end = queryForm.getExamineTime().get(1)
|
||||
.withHour(23).withMinute(59).withSecond(59).withNano(0);
|
||||
|
||||
queryForm.getExamineTime().set(0, start);
|
||||
queryForm.getExamineTime().set(1, end);
|
||||
|
||||
// 格式化后的字符串列表
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
List<String> formattedList = new ArrayList<>();
|
||||
formattedList.add(start.format(formatter));
|
||||
formattedList.add(end.format(formatter));
|
||||
queryForm.setExamineTimeFormatted(formattedList);
|
||||
}
|
||||
|
||||
List<CaseplatformCaseVO> list = caseplatformCaseDao.queryPage(page, queryForm, provList);
|
||||
PageResult<CaseplatformCaseVO> pageResult = SmartPageUtil.convert2PageResult(page, list);
|
||||
return ResponseDTO.ok(pageResult);
|
||||
@ -168,24 +87,6 @@ public class CaseplatformCaseService {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (queryForm.getExamineTime() != null && queryForm.getExamineTime().size() == 2) {
|
||||
LocalDateTime start = queryForm.getExamineTime().get(0)
|
||||
.withHour(0).withMinute(0).withSecond(0).withNano(0);
|
||||
LocalDateTime end = queryForm.getExamineTime().get(1)
|
||||
.withHour(23).withMinute(59).withSecond(59).withNano(0);
|
||||
|
||||
queryForm.getExamineTime().set(0, start);
|
||||
queryForm.getExamineTime().set(1, end);
|
||||
|
||||
// 格式化后的字符串列表
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||
List<String> formattedList = new ArrayList<>();
|
||||
formattedList.add(start.format(formatter));
|
||||
formattedList.add(end.format(formatter));
|
||||
queryForm.setExamineTimeFormatted(formattedList);
|
||||
}
|
||||
|
||||
List<CaseplatformCaseVO> list = caseplatformCaseDao.queryPage(null, queryForm, provList);
|
||||
return list;
|
||||
}
|
||||
@ -209,204 +110,6 @@ public class CaseplatformCaseService {
|
||||
return list;
|
||||
}
|
||||
|
||||
// 结算导出
|
||||
public List<ExportExpertCaseExcelVo> exportExpertCaseExcel(CaseplatformCaseQueryForm queryForm) {
|
||||
LoginEmployeeDetail requestUser = (LoginEmployeeDetail)SmartRequestUtil.getRequestUser();
|
||||
List<ProvVO> provList = requestUser.getProvList();
|
||||
Long provId = queryForm.getProvId();
|
||||
if(provId != null){
|
||||
boolean match = provList.stream().anyMatch(item -> item.getId().equals(provId));
|
||||
if(!match){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
List<ExportExpertCaseExcelVo> list = caseplatformCaseDao.getExportExpertCaseExcelList(queryForm, provList);
|
||||
return list;
|
||||
}
|
||||
|
||||
// 处理 结算导出 数据
|
||||
public List<ExportExpertCaseExcelVo> exportExpertCaseExcelProcess(List<ExportExpertCaseExcelVo> list) {
|
||||
// 存放 expertId -> ExportExpertCaseExcelVo 列表
|
||||
Map<Long, List<ExportExpertCaseExcelVo>> expertMap = new HashMap<>();
|
||||
|
||||
// 第一次遍历:按 expertId 分组
|
||||
for (ExportExpertCaseExcelVo vo : list) {
|
||||
Long expertId = vo.getExpertId();
|
||||
if (!expertMap.containsKey(expertId)) {
|
||||
expertMap.put(expertId, new ArrayList<>());
|
||||
}
|
||||
expertMap.get(expertId).add(vo);
|
||||
}
|
||||
|
||||
// 最终结果列表
|
||||
List<ExportExpertCaseExcelVo> result = new ArrayList<>();
|
||||
|
||||
// 第二次遍历:处理每组数据
|
||||
Integer index = 1;
|
||||
for (List<ExportExpertCaseExcelVo> group : expertMap.values()) {
|
||||
// 构建一个新的 ExportExpertCaseExcelVo 对象
|
||||
ExportExpertCaseExcelVo newItem = new ExportExpertCaseExcelVo();
|
||||
|
||||
// 取第一个对象的基础信息(假设同一个人信息一致)
|
||||
ExportExpertCaseExcelVo first = group.get(0);
|
||||
|
||||
newItem.setIndex(index);
|
||||
newItem.setExpertId(first.getExpertId());
|
||||
newItem.setBankName(first.getBankName());
|
||||
newItem.setProv(first.getProv());
|
||||
newItem.setCity(first.getCity());
|
||||
newItem.setBankCardNo(first.getBankCardNo());
|
||||
newItem.setIdCardName(first.getIdCardName());
|
||||
newItem.setRemark(first.getRemark());
|
||||
newItem.setHospitalName(first.getHospitalName());
|
||||
newItem.setMobile(first.getMobile());
|
||||
newItem.setIdCardNo(first.getIdCardNo());
|
||||
|
||||
// 病例数量
|
||||
int caseCount = group.size();
|
||||
|
||||
// relatedCaseId 拼接
|
||||
StringBuilder relatedCaseIds = new StringBuilder();
|
||||
for (ExportExpertCaseExcelVo vo : group) {
|
||||
if (relatedCaseIds.length() > 0) {
|
||||
relatedCaseIds.append(",");
|
||||
}
|
||||
relatedCaseIds.append(vo.getCaseId());
|
||||
}
|
||||
|
||||
// 应发金额 = 数量 × 500
|
||||
double totalAmount = caseCount * 500.0;
|
||||
|
||||
// 实发金额 = 应发 − 个税(暂时用10元代替)
|
||||
double taxAmount = computeIndividualIncomeTax(totalAmount);
|
||||
double actualAmount = totalAmount - taxAmount;
|
||||
|
||||
// 设置金额字段
|
||||
newItem.setRelatedCaseId(relatedCaseIds.toString());
|
||||
newItem.setTotalAmount(totalAmount);
|
||||
newItem.setTaxAmount(taxAmount);
|
||||
newItem.setActualAmount(actualAmount);
|
||||
|
||||
// 加入最终结果
|
||||
result.add(newItem);
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// 结算导入
|
||||
public void caseplatformCaseSettlementImport(MultipartFile file) throws Exception {
|
||||
try (InputStream is = file.getInputStream();
|
||||
Workbook workbook = WorkbookFactory.create(is)) { // 自动识别 .xls 或 .xlsx
|
||||
|
||||
Sheet sheet = workbook.getSheetAt(0);
|
||||
|
||||
// 获取最后一行的行号(从 0 开始)
|
||||
int lastRowNum = sheet.getLastRowNum();
|
||||
|
||||
// 从第 1 行开始读取(跳过标题行)
|
||||
int rowNum = 0;
|
||||
for (Iterator<Row> it = sheet.rowIterator(); it.hasNext();) {
|
||||
Row row = it.next();
|
||||
|
||||
// 跳过第一行/二行
|
||||
if (rowNum <= 1) {
|
||||
rowNum++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// 跳过最后一行
|
||||
if (lastRowNum == rowNum) {
|
||||
rowNum++;
|
||||
continue;
|
||||
}
|
||||
|
||||
// 判断整行是否为空
|
||||
boolean isEmptyRow = true;
|
||||
for (Cell cell : row) {
|
||||
if (cell != null && cell.getCellType() != CellType.BLANK) {
|
||||
isEmptyRow = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (isEmptyRow) {
|
||||
rowNum++;
|
||||
continue; // 跳过空行
|
||||
}
|
||||
|
||||
String index = "";
|
||||
String name = "";
|
||||
String bankName = "";
|
||||
String prov = "";
|
||||
String city = "";
|
||||
String bankCardNo = "";
|
||||
String actualAmountStr = "";
|
||||
String remark = "";
|
||||
String taxAmountStr = "";
|
||||
String totalAmountStr = "";
|
||||
String hospitalName = "";
|
||||
String mobile = "";
|
||||
String idCardNo = "";
|
||||
String relatedCaseId = "";
|
||||
|
||||
DataFormatter dataFormatter = new DataFormatter();
|
||||
|
||||
Cell cell0 = row.getCell(0); if (cell0 != null) index = cell0.toString().trim();
|
||||
Cell cell1 = row.getCell(1); if (cell1 != null) bankName = cell1.toString().trim();
|
||||
Cell cell2 = row.getCell(2); if (cell2 != null) prov = cell2.toString().trim();
|
||||
Cell cell3 = row.getCell(3); if (cell3 != null) city = cell3.toString().trim();
|
||||
Cell cell4 = row.getCell(4); if (cell4 != null) bankCardNo = cell4.toString().trim();
|
||||
Cell cell5 = row.getCell(5); if (cell5 != null) name = cell5.toString().trim();
|
||||
Cell cell6 = row.getCell(6); if (cell6 != null) actualAmountStr = dataFormatter.formatCellValue(cell6).trim();
|
||||
Cell cell7 = row.getCell(7); if (cell7 != null) remark = cell7.toString().trim();
|
||||
Cell cell8 = row.getCell(8); if (cell8 != null) taxAmountStr = dataFormatter.formatCellValue(cell8).trim();
|
||||
Cell cell9 = row.getCell(9); if (cell9 != null) totalAmountStr = dataFormatter.formatCellValue(cell9).trim();
|
||||
Cell cell10 = row.getCell(10); if (cell10 != null) hospitalName = cell10.toString().trim();
|
||||
Cell cell11 = row.getCell(11); if (cell11 != null) mobile = dataFormatter.formatCellValue(cell11).trim();
|
||||
Cell cell12 = row.getCell(12); if (cell12 != null) idCardNo = dataFormatter.formatCellValue(cell12).trim();
|
||||
Cell cell13 = row.getCell(13); if (cell13 != null) relatedCaseId = dataFormatter.formatCellValue(cell13).trim();
|
||||
|
||||
// 病例id
|
||||
String[] caseIdList = relatedCaseId.split(",");
|
||||
for (String id : caseIdList) {
|
||||
CaseplatformCaseEntity caseplatformCase = caseplatformCaseDao.selectById(id);
|
||||
if (caseplatformCase == null) {
|
||||
throw new BusinessException("处理失败: 存在非法病例 " + id);
|
||||
}
|
||||
|
||||
// 已经结算
|
||||
if (caseplatformCase.getSettlementFlag() == 1){
|
||||
continue;
|
||||
}
|
||||
|
||||
// 获取专家银行卡
|
||||
LambdaQueryWrapper<CasePlatformBankEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(CasePlatformBankEntity::getExpertId, caseplatformCase.getExpertId());
|
||||
CasePlatformBankEntity casePlatformBank = casePlatformBankDao.selectOne(queryWrapper);
|
||||
if (casePlatformBank == null) {
|
||||
throw new BusinessException("处理失败: 存在非法病例 " + id);
|
||||
}
|
||||
|
||||
if (!Objects.equals(casePlatformBank.getBankCardNo(), bankCardNo)){
|
||||
throw new BusinessException("处理失败: 存在非法病例 " + id);
|
||||
}
|
||||
|
||||
// 修改病例结算状态
|
||||
caseplatformCase.setSettlementFlag(1);
|
||||
caseplatformCase.setUpdateTime(LocalDateTime.now());
|
||||
caseplatformCaseDao.updateById(caseplatformCase);
|
||||
}
|
||||
|
||||
rowNum++;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("文件读取失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*/
|
||||
@ -433,58 +136,16 @@ public class CaseplatformCaseService {
|
||||
* @param case_id
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<String> examine(Long case_id, int status){
|
||||
// 获取病例数据
|
||||
CaseplatformCaseEntity caseplatformCase = caseplatformCaseDao.selectById(case_id);
|
||||
if (caseplatformCase == null) {
|
||||
return ResponseDTO.userErrorParam("病例不存在");
|
||||
}
|
||||
|
||||
// 获取用户签署协议状态
|
||||
LambdaQueryWrapper<FxqSignEntity> signQueryWrapper = new LambdaQueryWrapper<>();
|
||||
signQueryWrapper.eq(FxqSignEntity::getExpertId,caseplatformCase.getExpertId());
|
||||
FxqSignEntity fxqSign = fxqSignDao.selectOne(signQueryWrapper);
|
||||
if (fxqSign == null) {
|
||||
return ResponseDTO.userErrorParam("该用户未签署协议");
|
||||
}
|
||||
|
||||
if (fxqSign.getSignStatus() != 1){
|
||||
return ResponseDTO.userErrorParam("该用户未签署协议");
|
||||
}
|
||||
|
||||
caseplatformCase.setStatus(status);
|
||||
caseplatformCase.setExamineTime(LocalDateTime.now());
|
||||
caseplatformCaseDao.updateById(caseplatformCase);
|
||||
|
||||
return ResponseDTO.ok();
|
||||
public void examine(Long case_id, int status){
|
||||
caseplatformCaseDao.examine(case_id, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 结算
|
||||
* @param case_id
|
||||
*/
|
||||
public ResponseDTO<String> settlement(Long case_id){
|
||||
// 获取病例数据
|
||||
CaseplatformCaseEntity caseplatformCase = caseplatformCaseDao.selectById(case_id);
|
||||
if (caseplatformCase == null) {
|
||||
return ResponseDTO.userErrorParam("病例不存在");
|
||||
}
|
||||
|
||||
// 获取用户签署协议状态
|
||||
LambdaQueryWrapper<FxqSignEntity> signQueryWrapper = new LambdaQueryWrapper<>();
|
||||
signQueryWrapper.eq(FxqSignEntity::getExpertId,caseplatformCase.getExpertId());
|
||||
FxqSignEntity fxqSign = fxqSignDao.selectOne(signQueryWrapper);
|
||||
if (fxqSign == null) {
|
||||
return ResponseDTO.userErrorParam("该用户未签署协议");
|
||||
}
|
||||
|
||||
if (fxqSign.getSignStatus() != 1){
|
||||
return ResponseDTO.userErrorParam("该用户未签署协议");
|
||||
}
|
||||
|
||||
public void settlement(Long case_id){
|
||||
caseplatformCaseDao.settlement(case_id);
|
||||
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -505,243 +166,4 @@ public class CaseplatformCaseService {
|
||||
detail.setDpmsList(dpmsVOS);
|
||||
return ResponseDTO.ok(detail);
|
||||
}
|
||||
|
||||
/**
|
||||
* 将类似 ["2","1"] 格式的字符串转换为换行分隔的中文含义
|
||||
* @param caseTypeJson 数据库存储的字符串,比如 ["2","1"]
|
||||
* @return 转换后的字符串,比如:
|
||||
* CA280及联合模式
|
||||
* DPMAS及联合模式
|
||||
*/
|
||||
public String convertCaseTypeToLabel(String caseTypeJson) {
|
||||
if (caseTypeJson == null || caseTypeJson.isEmpty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
try {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
String[] caseTypes = objectMapper.readValue(caseTypeJson, String[].class);
|
||||
|
||||
StringBuilder result = new StringBuilder();
|
||||
for (String code : caseTypes) {
|
||||
if (Objects.equals(code, "1")){
|
||||
result.append("DPMAS及联合模式\n");
|
||||
}else if (Objects.equals(code, "2")){
|
||||
result.append("CA280及联合模式\n");
|
||||
}else{
|
||||
result.append("未知类型: ").append(code).append("\n");
|
||||
}
|
||||
}
|
||||
|
||||
// 去掉末尾换行
|
||||
if (result.length() > 0) {
|
||||
result.setLength(result.length() - 1);
|
||||
}
|
||||
|
||||
return result.toString();
|
||||
|
||||
} catch (Exception e) {
|
||||
System.err.println("解析 caseTypeJson 出错:" + caseTypeJson);
|
||||
return "解析失败";
|
||||
}
|
||||
}
|
||||
|
||||
// 计算个税
|
||||
public double computeIndividualIncomeTax(double income) {
|
||||
if (income <= 800) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (income <= 4000) {
|
||||
income -= 800;
|
||||
} else {
|
||||
income *= 0.8;
|
||||
}
|
||||
|
||||
double taxRate;
|
||||
double quickDeduction;
|
||||
|
||||
if (income <= 20000) {
|
||||
taxRate = 0.2;
|
||||
quickDeduction = 0;
|
||||
} else if (income <= 50000) {
|
||||
taxRate = 0.3;
|
||||
quickDeduction = 2000;
|
||||
} else {
|
||||
taxRate = 0.4;
|
||||
quickDeduction = 7000;
|
||||
}
|
||||
|
||||
double incomeTax = income * taxRate - quickDeduction;
|
||||
|
||||
return Math.max(incomeTax, 0); // 防止负值
|
||||
}
|
||||
|
||||
/**
|
||||
* 出院诊断修改
|
||||
*
|
||||
*/
|
||||
public ResponseDTO<String> caseMainDiagnose(CaseMainDiagnoseForm form) {
|
||||
LambdaQueryWrapper<MedicalRecordEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MedicalRecordEntity::getId,form.getCaseId());
|
||||
MedicalRecordEntity caseplatformCase = medicalRecorDao.selectOne(queryWrapper);
|
||||
if (caseplatformCase == null) {
|
||||
return ResponseDTO.userErrorParam("病例不存在");
|
||||
}
|
||||
|
||||
if (caseplatformCase.getStatus() == 1){
|
||||
return ResponseDTO.userErrorParam("已通过审核,不允许修改");
|
||||
}
|
||||
|
||||
if (!Objects.equals(caseplatformCase.getMainDiagnose(), form.getMainDiagnose())){
|
||||
caseplatformCase.setMainDiagnose(form.getMainDiagnose());
|
||||
medicalRecorDao.updateById(caseplatformCase);
|
||||
}
|
||||
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 人工肝治疗图片修改
|
||||
*/
|
||||
public ResponseDTO<String> caseDpmasImg(CaseDpmasImgForm form) {
|
||||
LambdaQueryWrapper<MedicalRecordEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MedicalRecordEntity::getId,form.getCaseId());
|
||||
MedicalRecordEntity caseplatformCase = medicalRecorDao.selectOne(queryWrapper);
|
||||
if (caseplatformCase == null) {
|
||||
return ResponseDTO.userErrorParam("病例不存在");
|
||||
}
|
||||
|
||||
if (caseplatformCase.getStatus() == 1){
|
||||
return ResponseDTO.userErrorParam("已通过审核,不允许修改");
|
||||
}
|
||||
|
||||
// 获取人工肝治疗信息
|
||||
MedicalRecordDpmsEntity caseplatformCaseDpm = medicalRecorDpmasDao.selectById(form.getDmpsId());
|
||||
if (caseplatformCaseDpm == null) {
|
||||
return ResponseDTO.userErrorParam("病例不存在");
|
||||
}
|
||||
|
||||
if (!Objects.equals(caseplatformCaseDpm.getDpmasImg(), form.getDpmasImg())){
|
||||
caseplatformCaseDpm.setDpmasImg(form.getDpmasImg());
|
||||
medicalRecorDpmasDao.updateById(caseplatformCaseDpm);
|
||||
}
|
||||
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 实验室检测图片修改
|
||||
*/
|
||||
public ResponseDTO<String> caseCheckdataImg(CaseCheckdataImgForm form) {
|
||||
LambdaQueryWrapper<MedicalRecordEntity> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(MedicalRecordEntity::getId,form.getCaseId());
|
||||
MedicalRecordEntity caseplatformCase = medicalRecorDao.selectOne(queryWrapper);
|
||||
if (caseplatformCase == null) {
|
||||
return ResponseDTO.userErrorParam("病例不存在");
|
||||
}
|
||||
|
||||
if (caseplatformCase.getStatus() == 1){
|
||||
return ResponseDTO.userErrorParam("已通过审核,不允许修改");
|
||||
}
|
||||
|
||||
// 获取实验室检测数据
|
||||
LambdaQueryWrapper<MedicalRecordCheckdataEntity> checkDataQueryWrapper = new LambdaQueryWrapper<>();
|
||||
checkDataQueryWrapper.eq(MedicalRecordCheckdataEntity::getCaseId,form.getCaseId());
|
||||
MedicalRecordCheckdataEntity caseplatformCaseCheckdata = medicalRecorCheckDataDao.selectOne(checkDataQueryWrapper);
|
||||
if (caseplatformCaseCheckdata == null) {
|
||||
return ResponseDTO.userErrorParam("病例不存在");
|
||||
}
|
||||
|
||||
if (form.getBioImg() != null){
|
||||
if (!Objects.equals(caseplatformCaseCheckdata.getBioImg(), form.getBioImg())){
|
||||
caseplatformCaseCheckdata.setBioImg(form.getBioImg());
|
||||
}
|
||||
}
|
||||
|
||||
if (form.getCoaImg() != null){
|
||||
if (!Objects.equals(caseplatformCaseCheckdata.getCoaImg(), form.getCoaImg())){
|
||||
caseplatformCaseCheckdata.setCoaImg(form.getCoaImg());
|
||||
}
|
||||
}
|
||||
|
||||
if (form.getInfImg() != null) {
|
||||
if (!Objects.equals(caseplatformCaseCheckdata.getInfImg(), form.getInfImg())){
|
||||
caseplatformCaseCheckdata.setInfImg(form.getInfImg());
|
||||
}
|
||||
}
|
||||
|
||||
medicalRecorCheckDataDao.updateById(caseplatformCaseCheckdata);
|
||||
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询-病例活动申请
|
||||
*
|
||||
* @param queryForm
|
||||
* @return
|
||||
*/
|
||||
public ResponseDTO<PageResult<CaseplatformAcAppVO>> caseplatformAcAppQueryPage(CaseplatformAcAppQueryForm queryForm) {
|
||||
Page<?> page = SmartPageUtil.convert2PageQuery(queryForm);
|
||||
|
||||
LoginEmployeeDetail requestUser = (LoginEmployeeDetail)SmartRequestUtil.getRequestUser();
|
||||
List<ProvVO> provList = requestUser.getProvList();
|
||||
Long provId = queryForm.getProvId();
|
||||
if(provId != null){
|
||||
boolean match = provList.stream().anyMatch(item -> item.getId().equals(provId));
|
||||
if(!match){
|
||||
return ResponseDTO.ok(SmartPageUtil.emptyResult(page));
|
||||
}
|
||||
}
|
||||
|
||||
// 时间处理
|
||||
if (queryForm.getCreateTime() != null && queryForm.getCreateTime().size() == 2) {
|
||||
LocalDateTime start = queryForm.getCreateTime().get(0).withHour(0).withMinute(0).withSecond(0).withNano(0);
|
||||
LocalDateTime end = queryForm.getCreateTime().get(1).withHour(23).withMinute(59).withSecond(59).withNano(999_999_999);
|
||||
queryForm.getCreateTime().set(0, start);
|
||||
queryForm.getCreateTime().set(1, end);
|
||||
}
|
||||
|
||||
List<CaseplatformAcAppVO> list = caseplatformAcAppDao.queryPage(page, queryForm, provList);
|
||||
PageResult<CaseplatformAcAppVO> pageResult = SmartPageUtil.convert2PageResult(page, list);
|
||||
for (CaseplatformAcAppVO vo : pageResult.getList()) {
|
||||
// 获取白名单用户-姓名、医院名称
|
||||
ExpertWhiteEntity expertWhiteEntity = expertWhiteEntityService.getExpertWhiteEntityByNameAndHospitalName(vo.getExpertMobile(),vo.getExpertName(),vo.getExpertHospitalName());
|
||||
if (expertWhiteEntity != null) {
|
||||
vo.setExpertMobile(expertWhiteEntity.getMobile());
|
||||
}
|
||||
}
|
||||
return ResponseDTO.ok(pageResult);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除-病例活动申请
|
||||
*/
|
||||
public ResponseDTO<String> deleteCaseplatformAcApp(Long id) {
|
||||
caseplatformAcAppDao.deleteById(id);
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改-活动申请状态
|
||||
*/
|
||||
public ResponseDTO<String> updateCaseplatformAcApp(Long id,CaseplatformAcAppUpdateForm form) {
|
||||
// 检测申请是否存在
|
||||
CaseplatformAcAppEntity caseplatformAcApp = caseplatformAcAppDao.selectById(id);
|
||||
if (caseplatformAcApp == null){
|
||||
return ResponseDTO.userErrorParam("操作失败");
|
||||
}
|
||||
|
||||
if (caseplatformAcApp.getStatus() == 1){
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
|
||||
if (!caseplatformAcApp.getStatus().equals(form.getStatus())){
|
||||
caseplatformAcApp.setStatus(form.getStatus());
|
||||
caseplatformAcAppDao.updateById(caseplatformAcApp);
|
||||
}
|
||||
|
||||
return ResponseDTO.ok();
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user