医院版本
This commit is contained in:
parent
108066fab2
commit
c662bb03bc
@ -16,6 +16,11 @@
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.21</version> <!-- 请确认使用最新版本 -->
|
||||
</dependency>
|
||||
<!--腾讯短信-->
|
||||
<dependency>
|
||||
<groupId>com.tencentcloudapi</groupId>
|
||||
|
@ -12,6 +12,11 @@ import com.ruoyi.script.mapper.PatientScriptMapper;
|
||||
import com.ruoyi.script.service.PatientScriptService;
|
||||
import com.ruoyi.script.util.ShellUtil;
|
||||
import lombok.SneakyThrows;
|
||||
import org.apache.commons.compress.archivers.ArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
|
||||
import org.apache.commons.compress.archivers.zip.ZipArchiveInputStream;
|
||||
import org.apache.commons.compress.archivers.zip.ZipFile;
|
||||
import org.apache.commons.compress.utils.IOUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.RandomUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -20,10 +25,10 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.*;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
@ -51,6 +56,42 @@ public class PatientScriptServiceImpl implements PatientScriptService {
|
||||
return scriptMapper.selectList(patientScript);
|
||||
}
|
||||
|
||||
/**
|
||||
* 解压 ZIP 文件到指定文件夹
|
||||
*
|
||||
* @param zipFilePath 源文件 ZIP 路径
|
||||
* @param destDir 解压的文件夹路径
|
||||
* @throws IOException 如果发生 I/O 错误
|
||||
*/
|
||||
public static void unzip(String zipFilePath, String destDir) throws IOException {
|
||||
File zipFile = new File(zipFilePath);
|
||||
File destDirectory = new File(destDir);
|
||||
|
||||
if (!destDirectory.exists()) {
|
||||
destDirectory.mkdirs();
|
||||
}
|
||||
|
||||
try (ZipFile zip = new ZipFile(zipFile)) {
|
||||
Enumeration<ZipArchiveEntry> entries = zip.getEntries();
|
||||
while (entries.hasMoreElements()){
|
||||
ZipArchiveEntry zipArchiveEntry = entries.nextElement();
|
||||
if (!zipArchiveEntry.isDirectory()) {
|
||||
File outFile = new File(destDirectory, zipArchiveEntry.getName());
|
||||
File parent = outFile.getParentFile();
|
||||
if (!parent.exists()) {
|
||||
parent.mkdirs();
|
||||
}
|
||||
try (InputStream in = zip.getInputStream((ZipArchiveEntry) zipArchiveEntry)) {
|
||||
Files.copy(in, outFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("解压文件时出错: " + zipArchiveEntry.getName(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean save(PatientScript patientScript) throws IOException, InterruptedException {
|
||||
patientScript.setCreateId(1110L);
|
||||
@ -65,31 +106,33 @@ public class PatientScriptServiceImpl implements PatientScriptService {
|
||||
public void run() {
|
||||
if (!patientScript.getType().equals("mri")){
|
||||
String unique_id = generateOtp();
|
||||
String playground = "playground"+patientScript.getPatientName()+unique_id;
|
||||
String playground = "playground"+unique_id;
|
||||
String format = DateUtil.format(new Date(), "yyyy-MM-dd");
|
||||
unzip(patientScript.getFilePath(),"/data/" +format+"/"+ playground);
|
||||
Map<String, Object> shMap = new LinkedHashMap<>();
|
||||
shMap.put("outPath",format+"/output-"+unique_id);
|
||||
shMap.put("filePath", patientScript.getFilePath());
|
||||
shMap.put("subId",unique_id);
|
||||
shMap.put("fmriFileMb",format+"/"+playground+"/preprocessed/sub001/func/sub-001_task-rest_space-MNI152NLin2009cAsym_boldref.nii");
|
||||
shMap.put("playground",format+"/"+playground);
|
||||
shMap.put("fmriFileMb",format+"/"+playground+"/preprocessed/sub-001/func/sub-001_task-rest_space-MNI152NLin2009cAsym_boldref.nii.gz");
|
||||
shMap.put("fmriRegOutFile",format+"/output-"+unique_id+"/bold_2_struct.mat");
|
||||
shMap.put("fmriFileDpp",format+"/"+playground+"/preprocessed/sub001/func/sub-001_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii");
|
||||
shMap.put("fmriFileDpp",format+"/"+playground+"/preprocessed/sub-001/func/sub-001_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii.gz");
|
||||
shMap.put("fmriR2t1OutFile",format+"/output-"+unique_id+"/reg2_Template.nii.gz");
|
||||
shMap.put("smriFileMb",format+"/"+playground+"/preprocessed/sub001/anat/sub-001_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz");
|
||||
shMap.put("smriOutFile",format+"/output-"+unique_id+"/anat2_Template.nii");
|
||||
shMap.put("smriFileMb",format+"/"+playground+"/preprocessed/sub-001/anat/sub-001_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz");
|
||||
shMap.put("smriOutFile",format+"/output-"+unique_id+"/anat2_Template.nii.gz");
|
||||
String fmriOutPath = "/data/"+format+"/output-"+unique_id+"/fmriOut/";
|
||||
shMap.put("fmriOutPath",fmriOutPath);
|
||||
shMap.put("matrixPath","/data/"+format+"/output-"+unique_id+"/");
|
||||
shMap.put("tr",patientScript.getRepetitionTime());
|
||||
String shPath="/data/"+format+"/cpac"+"-"+unique_id+".sh";
|
||||
String dealDataSh="/data/"+format+"/dealData"+"-"+unique_id+".sh";
|
||||
String imgPath="/data/"+format+"/img"+"-"+unique_id+".sh";
|
||||
String alignPath="/data/"+format+"/align"+"-"+unique_id+".py";
|
||||
shMap.put("alignPath",alignPath);
|
||||
shMap.put("fucDataPath",format+"/output-"+unique_id+"/reg2_Template.nii.gz");
|
||||
//创建alignPy
|
||||
createFile(shMap, alignPath,"alignTemplate.ftl");
|
||||
//创建总脚本
|
||||
createFile(shMap, shPath,"cpacSh.ftl");
|
||||
//创建处理数据脚本
|
||||
createFile(shMap, dealDataSh,"dealData.ftl");
|
||||
//创建图片生成脚本
|
||||
createFile(shMap, imgPath,"imgSh.ftl");
|
||||
//创建路径
|
||||
@ -104,13 +147,21 @@ public class PatientScriptServiceImpl implements PatientScriptService {
|
||||
} else {
|
||||
System.out.println("文件夹已存在,无需再次创建!");
|
||||
}
|
||||
//处理数据处理格式
|
||||
ShellUtil.execCmd("dos2unix "+dealDataSh);
|
||||
shUtil(dealDataSh,patientScript);
|
||||
shMap.put("tr",patientScript.getRepetitionTime());
|
||||
//创建总脚本
|
||||
createFile(shMap, shPath,"cpacSh.ftl");
|
||||
|
||||
//处理脚本文件格式
|
||||
ShellUtil.execCmd("dos2unix "+shPath);
|
||||
ShellUtil.execCmd("dos2unix "+imgPath);
|
||||
String status=shUtil(shPath,patientScript);
|
||||
|
||||
//再处理图片的生成
|
||||
//处理脚本文件格式
|
||||
ShellUtil.execCmd("dos2unix "+imgPath);
|
||||
|
||||
ShellUtil.execCmd("sh "+imgPath);
|
||||
//处理脑区信息
|
||||
patientScript.setResImage("/data/"+format+"/output-"+unique_id+"/Net.jpg");
|
||||
@ -852,7 +903,7 @@ public class PatientScriptServiceImpl implements PatientScriptService {
|
||||
|
||||
p = new Paragraph();
|
||||
ph = new Phrase();
|
||||
ph.add(new Chunk("---------------------------------------------------------------------------------------------------------------", titleFont));//前缀
|
||||
ph.add(new Chunk("---------------------------------------------------------------------------------------------", titleFont));//前缀
|
||||
p.add(ph);
|
||||
p.setAlignment(Element.ALIGN_LEFT);//设置对齐方式
|
||||
p.setLeading(30);
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.script.util;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.script.entity.PatientScript;
|
||||
|
||||
import java.io.*;
|
||||
@ -11,15 +12,19 @@ public class ShellUtil {
|
||||
System.out.println("commandStr: " + commandStr);
|
||||
ProcessBuilder processBuilder = new ProcessBuilder(commandStr);
|
||||
Process process = processBuilder.start();
|
||||
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
System.out.println(line);
|
||||
if (line.contains("\"tr\"")&&line.contains("{")&&line.contains("}")){
|
||||
System.out.println(line+"tr11111111************************************************************");
|
||||
JSONObject jsonObject = JSONObject.parseObject(line);
|
||||
patientScript.setRepetitionTime(jsonObject.get("tr").toString());
|
||||
}
|
||||
|
||||
if (line.contains("brain_regions")&&line.contains("correlation")){
|
||||
patientScript.setResInfo(line);
|
||||
}
|
||||
|
||||
if (line.contains("result===")){
|
||||
System.out.println(line+"result1************************************************************");
|
||||
if (line.contains("1")){
|
||||
@ -28,14 +33,6 @@ public class ShellUtil {
|
||||
resInfo= "正常";
|
||||
}
|
||||
}
|
||||
if (line.contains("top n connect")){
|
||||
System.out.println(line+"top n connect************************************************************");
|
||||
if (line.contains("1")){
|
||||
resInfo= "异常";
|
||||
}else {
|
||||
resInfo= "正常";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -53,15 +50,25 @@ public class ShellUtil {
|
||||
|
||||
try {
|
||||
proc = run.exec(cmd, null, null);
|
||||
in = proc.getInputStream();
|
||||
br = new BufferedReader(new InputStreamReader(in));
|
||||
|
||||
String result;
|
||||
while ((result = br.readLine()) != null) {
|
||||
System.out.println("job result [" + result + "]");
|
||||
// 获取日志流
|
||||
BufferedReader reader = new BufferedReader(new InputStreamReader(proc.getInputStream()));
|
||||
String line2;
|
||||
while ((line2 = reader.readLine()) != null) {
|
||||
// 打印日志
|
||||
System.err.println("log:"+line2);
|
||||
}
|
||||
// 获取错误流
|
||||
BufferedReader errorReader = new BufferedReader(new InputStreamReader(proc.getErrorStream()));
|
||||
String line;
|
||||
while ((line = errorReader.readLine()) != null) {
|
||||
// 打印错误流的内容
|
||||
System.err.println("error:"+line);
|
||||
}
|
||||
|
||||
proc.waitFor();
|
||||
|
||||
// 等待进程结束并获取退出码(可选)
|
||||
int exitCode = proc.waitFor();
|
||||
System.out.println("Exited with code: " + exitCode);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
|
@ -45,7 +45,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
||||
@Slf4j
|
||||
public class NotifyController {
|
||||
|
||||
@Resource
|
||||
|
||||
private WechatPayConfig wechatPayConfig;
|
||||
|
||||
@Autowired
|
||||
@ -53,8 +53,7 @@ public class NotifyController {
|
||||
@Autowired
|
||||
private UserPayInfoService payInfoService;
|
||||
|
||||
@Resource
|
||||
private Verifier verifier;
|
||||
|
||||
|
||||
private final ReentrantLock lock = new ReentrantLock();
|
||||
|
||||
|
@ -16,7 +16,7 @@ import com.ruoyi.system.service.ISysDeptService;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import com.ruoyi.system.service.UserPayInfoService;
|
||||
import com.ruoyi.system.utils.WechatPayConfig;
|
||||
import com.ruoyi.system.utils.WechatPayRequest;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -44,11 +44,10 @@ import java.util.*;
|
||||
@Slf4j
|
||||
public class PayController {
|
||||
|
||||
@Resource
|
||||
|
||||
private WechatPayConfig wechatPayConfig;
|
||||
|
||||
@Resource
|
||||
private WechatPayRequest wechatPayRequest;
|
||||
|
||||
@Autowired
|
||||
private ISysConfigService configService;
|
||||
@Autowired
|
||||
@ -141,7 +140,7 @@ public class PayController {
|
||||
params.put("scene_info", sceneInfoMap);
|
||||
String paramsStr = JSON.toJSONString(params);
|
||||
log.info("请求参数 ===> {}" + paramsStr);
|
||||
String resStr = wechatPayRequest.wechatHttpPost("https://api.mch.weixin.qq.com/v3/pay/transactions/jsapi",paramsStr);
|
||||
String resStr = "121212";
|
||||
Map<String, Object> resMap = JSONObject.parseObject(resStr, new TypeReference<Map<String, Object>>(){});
|
||||
Map<String, Object> signMap = paySignMsg(resMap, WechatPayUrlEnum.JSAPI.getType());
|
||||
//增加购买信息
|
||||
|
@ -49,10 +49,9 @@ public class DeptBuyRecordServiceImpl implements IDeptBuyRecordService
|
||||
private DeptBuyRecordMapper deptBuyRecordMapper;
|
||||
@Autowired
|
||||
private IPurchasePackageService purchasePackageService;
|
||||
@Resource
|
||||
private WechatPayConfig wechatPayConfig;
|
||||
@Resource
|
||||
private WechatPayRequest wechatPayRequest;
|
||||
|
||||
// @Resource
|
||||
// private WechatPayRequest wechatPayRequest;
|
||||
@Autowired
|
||||
private ISysConfigService sysConfigService;
|
||||
@Autowired
|
||||
@ -193,8 +192,7 @@ public class DeptBuyRecordServiceImpl implements IDeptBuyRecordService
|
||||
DeptBuyRecord orderInfo = this.selectDeptBuyRecordById(orderId);
|
||||
// 统一参数封装
|
||||
Map<String, Object> params = new HashMap<>(8);
|
||||
params.put("appid", wechatPayConfig.getAppId());
|
||||
params.put("mchid", wechatPayConfig.getMchId());
|
||||
|
||||
params.put("description", "问卷调查购买费用");
|
||||
params.put("out_trade_no", orderInfo.getOrderNo());
|
||||
params.put("notify_url", "https://www.xishuibeishan.com/asdProject/system/buyRecord/payNotify");
|
||||
@ -205,7 +203,7 @@ public class DeptBuyRecordServiceImpl implements IDeptBuyRecordService
|
||||
amountMap.put("currency", "CNY");
|
||||
params.put("amount", amountMap);
|
||||
String paramsStr = JSON.toJSONString(params);
|
||||
String resStr = wechatPayRequest.wechatHttpPost("https://api.mch.weixin.qq.com/v3/pay/transactions/native",paramsStr);
|
||||
String resStr = "12121";
|
||||
Map<String, Object> resMap = JSONObject.parseObject(resStr, new TypeReference<Map<String, Object>>(){});
|
||||
return resMap;
|
||||
}
|
||||
@ -214,8 +212,7 @@ public class DeptBuyRecordServiceImpl implements IDeptBuyRecordService
|
||||
DeptBuyRecord orderInfo = this.selectDeptBuyRecordById(orderId);
|
||||
// 统一参数封装
|
||||
Map<String, Object> params = new HashMap<>(8);
|
||||
params.put("appid", wechatPayConfig.getAppId());
|
||||
params.put("mchid", wechatPayConfig.getMchId());
|
||||
|
||||
params.put("description", "问卷调查续费");
|
||||
params.put("out_trade_no", orderInfo.getOrderNo());
|
||||
params.put("notify_url", "https://www.xishuibeishan.com/asdProject/system/buyRecord/chargeNotify");
|
||||
@ -226,7 +223,7 @@ public class DeptBuyRecordServiceImpl implements IDeptBuyRecordService
|
||||
amountMap.put("currency", "CNY");
|
||||
params.put("amount", amountMap);
|
||||
String paramsStr = JSON.toJSONString(params);
|
||||
String resStr = wechatPayRequest.wechatHttpPost("https://api.mch.weixin.qq.com/v3/pay/transactions/native",paramsStr);
|
||||
String resStr = "12121";
|
||||
Map<String, Object> resMap = JSONObject.parseObject(resStr, new TypeReference<Map<String, Object>>(){});
|
||||
return resMap;
|
||||
}
|
||||
@ -240,7 +237,7 @@ public class DeptBuyRecordServiceImpl implements IDeptBuyRecordService
|
||||
@Override
|
||||
public Map<String, String> payNotify(JSONObject jsonObject) {
|
||||
try {
|
||||
String key = wechatPayConfig.getApiV3Key();
|
||||
String key = "1111";
|
||||
String json = jsonObject.toString();
|
||||
String associated_data = (String) JSONUtil.getByPath(JSONUtil.parse(json), "resource.associated_data");
|
||||
String ciphertext = (String) JSONUtil.getByPath(JSONUtil.parse(json), "resource.ciphertext");
|
||||
@ -318,7 +315,7 @@ public class DeptBuyRecordServiceImpl implements IDeptBuyRecordService
|
||||
@Override
|
||||
public Map<String, String> chargeNotify(JSONObject jsonObject) {
|
||||
try {
|
||||
String key = wechatPayConfig.getApiV3Key();
|
||||
String key = "1212";
|
||||
String json = jsonObject.toString();
|
||||
String associated_data = (String) JSONUtil.getByPath(JSONUtil.parse(json), "resource.associated_data");
|
||||
String ciphertext = (String) JSONUtil.getByPath(JSONUtil.parse(json), "resource.ciphertext");
|
||||
|
@ -27,10 +27,10 @@ import java.security.PrivateKey;
|
||||
* @Author:
|
||||
* @Description:
|
||||
**/
|
||||
@Component
|
||||
//@Component
|
||||
@Data
|
||||
@Slf4j
|
||||
@ConfigurationProperties(prefix = "wxpay")
|
||||
//@ConfigurationProperties(prefix = "wxpay")
|
||||
public class WechatPayConfig {
|
||||
/**
|
||||
* 应用编号
|
||||
@ -92,69 +92,69 @@ public class WechatPayConfig {
|
||||
return PemUtil.loadPrivateKey(inputStream);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取证书管理器实例
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public Verifier getVerifier() throws GeneralSecurityException, IOException, HttpCodeException, NotFoundException {
|
||||
|
||||
log.info("获取证书管理器实例");
|
||||
|
||||
//获取商户私钥
|
||||
PrivateKey privateKey = getPrivateKey(keyPemPath);
|
||||
|
||||
//私钥签名对象
|
||||
PrivateKeySigner privateKeySigner = new PrivateKeySigner(serialNo, privateKey);
|
||||
|
||||
//身份认证对象
|
||||
WechatPay2Credentials wechatPay2Credentials = new WechatPay2Credentials(mchId, privateKeySigner);
|
||||
|
||||
// 使用定时更新的签名验证器,不需要传入证书
|
||||
CertificatesManager certificatesManager = CertificatesManager.getInstance();
|
||||
certificatesManager.putMerchant(mchId,wechatPay2Credentials,apiV3Key.getBytes(StandardCharsets.UTF_8));
|
||||
|
||||
return certificatesManager.getVerifier(mchId);
|
||||
}
|
||||
// /**
|
||||
// * 获取证书管理器实例
|
||||
// * @return
|
||||
// */
|
||||
// @Bean
|
||||
// public Verifier getVerifier() throws GeneralSecurityException, IOException, HttpCodeException, NotFoundException {
|
||||
//
|
||||
// log.info("获取证书管理器实例");
|
||||
//
|
||||
// //获取商户私钥
|
||||
// PrivateKey privateKey = getPrivateKey(keyPemPath);
|
||||
//
|
||||
// //私钥签名对象
|
||||
// PrivateKeySigner privateKeySigner = new PrivateKeySigner(serialNo, privateKey);
|
||||
//
|
||||
// //身份认证对象
|
||||
// WechatPay2Credentials wechatPay2Credentials = new WechatPay2Credentials(mchId, privateKeySigner);
|
||||
//
|
||||
// // 使用定时更新的签名验证器,不需要传入证书
|
||||
// CertificatesManager certificatesManager = CertificatesManager.getInstance();
|
||||
// certificatesManager.putMerchant(mchId,wechatPay2Credentials,apiV3Key.getBytes(StandardCharsets.UTF_8));
|
||||
//
|
||||
// return certificatesManager.getVerifier(mchId);
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
* 获取支付http请求对象
|
||||
* @param verifier
|
||||
* @return
|
||||
*/
|
||||
@Bean(name = "wxPayClient")
|
||||
public CloseableHttpClient getWxPayClient(Verifier verifier) {
|
||||
// /**
|
||||
// * 获取支付http请求对象
|
||||
// * @param verifier
|
||||
// * @return
|
||||
// */
|
||||
// @Bean(name = "wxPayClient")
|
||||
// public CloseableHttpClient getWxPayClient(Verifier verifier) {
|
||||
//
|
||||
// //获取商户私钥
|
||||
// PrivateKey privateKey = getPrivateKey(keyPemPath);
|
||||
//
|
||||
// WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
|
||||
// .withMerchant(mchId, serialNo, privateKey)
|
||||
// .withValidator(new WechatPay2Validator(verifier));
|
||||
//
|
||||
// // 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
|
||||
// return builder.build();
|
||||
// }
|
||||
|
||||
//获取商户私钥
|
||||
PrivateKey privateKey = getPrivateKey(keyPemPath);
|
||||
|
||||
WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
|
||||
.withMerchant(mchId, serialNo, privateKey)
|
||||
.withValidator(new WechatPay2Validator(verifier));
|
||||
|
||||
// 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取HttpClient,无需进行应答签名验证,跳过验签的流程
|
||||
*/
|
||||
@Bean(name = "wxPayNoSignClient")
|
||||
public CloseableHttpClient getWxPayNoSignClient(){
|
||||
|
||||
//获取商户私钥
|
||||
PrivateKey privateKey = getPrivateKey(keyPemPath);
|
||||
|
||||
//用于构造HttpClient
|
||||
WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
|
||||
//设置商户信息
|
||||
.withMerchant(mchId, serialNo, privateKey)
|
||||
//无需进行签名验证、通过withValidator((response) -> true)实现
|
||||
.withValidator((response) -> true);
|
||||
|
||||
// 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
|
||||
return builder.build();
|
||||
}
|
||||
// /**
|
||||
// * 获取HttpClient,无需进行应答签名验证,跳过验签的流程
|
||||
// */
|
||||
// @Bean(name = "wxPayNoSignClient")
|
||||
// public CloseableHttpClient getWxPayNoSignClient(){
|
||||
//
|
||||
// //获取商户私钥
|
||||
// PrivateKey privateKey = getPrivateKey(keyPemPath);
|
||||
//
|
||||
// //用于构造HttpClient
|
||||
// WechatPayHttpClientBuilder builder = WechatPayHttpClientBuilder.create()
|
||||
// //设置商户信息
|
||||
// .withMerchant(mchId, serialNo, privateKey)
|
||||
// //无需进行签名验证、通过withValidator((response) -> true)实现
|
||||
// .withValidator((response) -> true);
|
||||
//
|
||||
// // 通过WechatPayHttpClientBuilder构造的HttpClient,会自动的处理签名和验签,并进行证书自动更新
|
||||
// return builder.build();
|
||||
// }
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ import java.io.IOException;
|
||||
* @Author:
|
||||
* @Description:
|
||||
**/
|
||||
@Component
|
||||
|
||||
@Slf4j
|
||||
public class WechatPayRequest {
|
||||
@Resource
|
||||
|
@ -6,13 +6,13 @@ spring:
|
||||
druid:
|
||||
# 主库数据源
|
||||
master:
|
||||
url: jdbc:mysql://81.70.190.166:3306/asd-project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
url: jdbc:mysql://127.0.0.1:3306/asd-project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# username: root
|
||||
# password: qqzcy@1014
|
||||
# url: jdbc:mysql://81.70.190.166:3306/asd-project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
# url: jdbc:mysql://81.70.190.166:3306/asd-project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: qqzcy@1014
|
||||
username: mysqlRoot
|
||||
password: QQzcy@1014
|
||||
# 从库数据源
|
||||
# slave:
|
||||
# # 从数据源开关/默认关闭
|
||||
|
@ -64,9 +64,9 @@ spring:
|
||||
servlet:
|
||||
multipart:
|
||||
# 单个文件大小
|
||||
max-file-size: 50MB
|
||||
max-file-size: 5000000MB
|
||||
# 设置总上传的文件大小
|
||||
max-request-size: 100MB
|
||||
max-request-size: 5000000MB
|
||||
# 服务模块
|
||||
devtools:
|
||||
restart:
|
||||
|
@ -53,7 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="scanDoctor != null and scanDoctor != ''"> and scan_doctor like concat('%',#{scanDoctor},'%') </if>
|
||||
<if test="isAll != null and isAll != ''"> and is_all= #{isAll} </if>
|
||||
</where>
|
||||
order by scan_time desc
|
||||
order by create_time desc
|
||||
</select>
|
||||
<select id="getById" resultMap="PatientScriptResult">
|
||||
select * from patient_script
|
||||
|
@ -1,28 +1,6 @@
|
||||
#!/bin/bash
|
||||
echo "Hello, output-43207!"
|
||||
cd /data
|
||||
source ~/.bashrc
|
||||
mkdir ${playground}
|
||||
|
||||
|
||||
echo "复制源文件到指定个体下"
|
||||
cp ${filePath} ${playground}/file.zip
|
||||
echo "解压源文件"
|
||||
cd ${playground}
|
||||
unzip file.zip
|
||||
|
||||
cd /data
|
||||
echo "执行源文件处理脚本"
|
||||
python dealTest.py --base_dir ${playground} --output_dir ${playground}/BIDS_output
|
||||
|
||||
echo "通过源文件进行二次处理"
|
||||
fmriprep-docker ${playground}/BIDS_output/sub-001 ${playground}/preprocessed/ participant --participant-label 001 --fs-license-file /data/license.txt --fs-no-reconall
|
||||
|
||||
echo "激活py环境"
|
||||
export PYTHONPATH=/usr/local/python3/lib/python3.8/site-packages:$PYTHONPATH
|
||||
echo "cpac handle end!"
|
||||
conda activate myenv
|
||||
export PYTHONPATH=/root/anaconda3/envs/myenv/lib/python3.7/site-packages:$PYTHONPATH
|
||||
|
||||
|
||||
python ${alignPath}
|
||||
|
10
ruoyi-admin/src/main/resources/static/dealData.ftl
Normal file
10
ruoyi-admin/src/main/resources/static/dealData.ftl
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
cd /data
|
||||
|
||||
cd /data
|
||||
echo "执行源文件处理脚本"
|
||||
python dealTest.py --base_dir ${playground} --output_dir ${playground}/BIDS_output --json_dir ${playground}/BIDS_output/sub-001/func/sub-001_task-rest_bold.json
|
||||
rm -rf ./${playground}/BIDS_output/config.json
|
||||
cp ./README ${playground}/BIDS_output/
|
||||
echo "通过源文件进行二次处理"
|
||||
docker run --rm -e DOCKER_VERSION_8395080871=27.3.1 -v /data/license.txt:/opt/freesurfer/license.txt:ro -v /data/${playground}/BIDS_output:/data:ro -v /data/${playground}/preprocessed:/out nipreps/fmriprep:23.2.3 /data /out participant --participant-label 001 --fs-no-reconall
|
@ -1,8 +1,7 @@
|
||||
#!/bin/bash
|
||||
echo "Hello, output-43207!"
|
||||
source ~/.bashrc
|
||||
|
||||
cd ${matrixPath}
|
||||
rmatlab -nodesktop -nodisplay -r rtmalbFile
|
||||
matlab -nodesktop -nodisplay -r rtmalbFile
|
||||
|
||||
echo "main handle end!"
|
||||
|
@ -26,7 +26,7 @@ public class FileUploadUtils
|
||||
/**
|
||||
* 默认大小 50M
|
||||
*/
|
||||
public static final long DEFAULT_MAX_SIZE = 50 * 1024 * 1024;
|
||||
public static final long DEFAULT_MAX_SIZE = 5000 * 1024 * 1024;
|
||||
|
||||
/**
|
||||
* 默认的文件名最大长度 100
|
||||
|
@ -45,7 +45,7 @@
|
||||
// 大小限制(MB)
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default: 50,
|
||||
default: 50000000,
|
||||
},
|
||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||
fileType: {
|
||||
|
@ -120,9 +120,9 @@
|
||||
<el-form-item label="审核医生" prop="shDoctor">
|
||||
<el-input v-model="form.shDoctor" placeholder="审核医生" />
|
||||
</el-form-item>
|
||||
<el-form-item label="TR" prop="repetitionTime">
|
||||
<el-input v-model="form.repetitionTime" placeholder="TR" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="TR" prop="repetitionTime">-->
|
||||
<!-- <el-input v-model="form.repetitionTime" placeholder="TR" />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
<!-- <el-form-item label="扫描顺序" prop="scanningOrder">-->
|
||||
<!-- <el-select v-model="form.scanningOrder" placeholder="请选择扫描顺序">-->
|
||||
@ -390,13 +390,13 @@
|
||||
if (this.form.recordId != null) {
|
||||
updateRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
//this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("提交成功,请耐心等待结果");
|
||||
this.open = false;
|
||||
//this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user