diff --git a/asd-wx/common/utils/config.js b/asd-wx/common/utils/config.js index 14a9584..21e9ddd 100644 --- a/asd-wx/common/utils/config.js +++ b/asd-wx/common/utils/config.js @@ -2,8 +2,8 @@ // const baseUrl = "https://www.jieyi-autism.com/asdProject" //const baseUrl = "https://www.jieyi-autism.com/asdProject" //const baseUrl = "http://192.168.31.25:8082/asdProject" - const baseUrl = "https://www.jieyi-autism.com/asdProject" -//const baseUrl = "http://192.168.31.25:8082/asdProject" +// const baseUrl = "https://www.jieyi-autism.com/asdProject" +const baseUrl = "http://127.0.0.1:8082/asdProject" // const baseUrl = "https://localhost/asdProject" // const baseUrl = "https://43.140.199.34/jeecg-boot" // const baseUrl = "http://43.140.199.34:8080/jeecg-boot" diff --git a/asd-wx/util/config.js b/asd-wx/util/config.js index 760c4c4..9cb5923 100644 --- a/asd-wx/util/config.js +++ b/asd-wx/util/config.js @@ -1,7 +1,7 @@ // const baseUrl = "http://localhost:8080/asdProject" -const baseUrl = "https://www.jieyi-autism.com/asdProject" -//const baseUrl = "http://192.168.31.25:8082/asdProject" +//const baseUrl = "https://www.jieyi-autism.com/asdProject" +const baseUrl = "http://127.0.0.1:8082/asdProject" export { baseUrl } \ No newline at end of file diff --git a/ruoyi-admin/src/main/java/com/ruoyi/script/entity/PatientScript.java b/ruoyi-admin/src/main/java/com/ruoyi/script/entity/PatientScript.java index c4b7fa0..2005570 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/script/entity/PatientScript.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/script/entity/PatientScript.java @@ -34,10 +34,9 @@ public class PatientScript extends BaseEntity { private String scanPosition; //扫描医生 private String scanDoctor; - //结构像地址 - private String structureImage; + //功能像地址 - private String featureImage; + private String filePath; //TR private String repetitionTime; //扫描顺序 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/script/service/impl/PatientScriptServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/script/service/impl/PatientScriptServiceImpl.java index 11c88a1..11b27ab 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/script/service/impl/PatientScriptServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/script/service/impl/PatientScriptServiceImpl.java @@ -63,29 +63,20 @@ public class PatientScriptServiceImpl implements PatientScriptService { @SneakyThrows @Override public void run() { - if (!patientScript.getType().equals("dti")){ - //准备动态yml + if (!patientScript.getType().equals("mri")){ String unique_id = generateOtp(); + String playground = "playground"+patientScript.getPatientName()+unique_id; String format = DateUtil.format(new Date(), "yyyy-MM-dd"); - Map yamlMap = new LinkedHashMap<>(); - yamlMap.put("uniqueId", "'"+unique_id+"'"); - yamlMap.put("anatPath", patientScript.getStructureImage()); - yamlMap.put("scanPath", patientScript.getFeatureImage()); - //扫描顺序 - yamlMap.put("scanningOrder", patientScript.getScanningOrder()); - yamlMap.put("sliceNumber", patientScript.getSliceNumber()); - yamlMap.put("repetitionTime", patientScript.getRepetitionTime()); - String dataYmlPath ="/data/"+format+"/config/datainfo"+"-"+unique_id+".yml"; - Boolean flag = createFile(yamlMap, dataYmlPath,"yml.ftl"); - if (flag){ Map shMap = new LinkedHashMap<>(); shMap.put("outPath",format+"/output-"+unique_id); - shMap.put("dataInfoPath",dataYmlPath); + shMap.put("filePath", patientScript.getFilePath()); shMap.put("subId",unique_id); - shMap.put("fmriFileMb",format+"/output-"+unique_id+"/output/pipeline_cpac-default-pipeline/sub/ses-"+unique_id+"/func/sub-sub_ses-"+unique_id+"_task-scan_desc-mean_bold.nii.gz"); + shMap.put("fmriFileMb",format+"/"+playground+"/preprocessed/sub001/func/sub-001_task-rest_space-MNI152NLin2009cAsym_boldref.nii"); shMap.put("fmriRegOutFile",format+"/output-"+unique_id+"/bold_2_struct.mat"); - shMap.put("fmriFileDpp",format+"/output-"+unique_id+"/output/pipeline_cpac-default-pipeline/sub/ses-"+unique_id+"/func/sub-sub_ses-"+unique_id+"_task-scan_reg-default_desc-preproc_bold.nii.gz"); + shMap.put("fmriFileDpp",format+"/"+playground+"/preprocessed/sub001/func/sub-001_task-rest_space-MNI152NLin2009cAsym_desc-preproc_bold.nii"); 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"); String fmriOutPath = "/data/"+format+"/output-"+unique_id+"/fmriOut/"; shMap.put("fmriOutPath",fmriOutPath); shMap.put("matrixPath","/data/"+format+"/output-"+unique_id+"/"); @@ -95,9 +86,6 @@ public class PatientScriptServiceImpl implements PatientScriptService { String alignPath="/data/"+format+"/align"+"-"+unique_id+".py"; shMap.put("alignPath",alignPath); shMap.put("fucDataPath",format+"/output-"+unique_id+"/reg2_Template.nii.gz"); - shMap.put("anatPath",patientScript.getStructureImage()); - shMap.put("smriFileMb",format+"/output-"+unique_id+"/output/pipeline_cpac-default-pipeline/sub/ses-"+unique_id+"/anat/sub-sub_ses-"+unique_id+"_desc-preproc_T1w.nii.gz"); - shMap.put("smriOutFile",format+"/output-"+unique_id+"/anat2_Template.nii"); //创建alignPy createFile(shMap, alignPath,"alignTemplate.ftl"); //创建总脚本 @@ -131,8 +119,6 @@ public class PatientScriptServiceImpl implements PatientScriptService { } - } - } }); @@ -156,8 +142,7 @@ public class PatientScriptServiceImpl implements PatientScriptService { String format = DateUtil.format(new Date(), "yyyy-MM-dd"); Map yamlMap = new LinkedHashMap<>(); yamlMap.put("uniqueId", "'"+unique_id+"'"); - yamlMap.put("anatPath", patientScript.getStructureImage()); - yamlMap.put("scanPath", patientScript.getFeatureImage()); + //扫描顺序 yamlMap.put("scanningOrder", patientScript.getScanningOrder()); yamlMap.put("sliceNumber", patientScript.getSliceNumber()); @@ -182,7 +167,7 @@ public class PatientScriptServiceImpl implements PatientScriptService { String alignPath="/data/"+format+"/align"+"-"+unique_id+".py"; shMap.put("alignPath",alignPath); shMap.put("fucDataPath",format+"/output-"+unique_id+"/reg2_Template.nii.gz"); - shMap.put("anatPath",patientScript.getStructureImage()); + shMap.put("smriFileMb",format+"/output-"+unique_id+"/output/pipeline_cpac-default-pipeline/sub/ses-"+unique_id+"/anat/sub-sub_ses-"+unique_id+"_desc-preproc_T1w.nii.gz"); shMap.put("smriOutFile",format+"/output-"+unique_id+"/anat2_Template.nii"); //创建alignPy diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index 0a4d516..0f657c3 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,7 +6,7 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://127.0.0.1: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 # url: jdbc:mysql://81.70.190.166:3306/asd-project?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 diff --git a/ruoyi-admin/src/main/resources/mapper/system/PatientScriptMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/PatientScriptMapper.xml index f638c34..5fac43f 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/PatientScriptMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/PatientScriptMapper.xml @@ -13,9 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - - - + @@ -79,8 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" scan_time, scan_position, scan_doctor, - structure_image, - feature_image, + file_path, repetition_time, scanning_order, bl_order, @@ -108,8 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{scanTime}, #{scanPosition}, #{scanDoctor}, - #{structureImage}, - #{featureImage}, + #{filePath}, #{repetitionTime}, #{scanningOrder}, #{blOrder}, diff --git a/ruoyi-admin/src/main/resources/static/cpacSh.ftl b/ruoyi-admin/src/main/resources/static/cpacSh.ftl index 1240433..c63d066 100644 --- a/ruoyi-admin/src/main/resources/static/cpacSh.ftl +++ b/ruoyi-admin/src/main/resources/static/cpacSh.ftl @@ -2,18 +2,32 @@ 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 -cpac run /data/ABIDEII-EMC_1 ${outPath} participant --pipeline_file /data/config/default.yml --data_config_file ${dataInfoPath} --mem_gb 10 --platform docker - echo "cpac handle end!" - conda activate myenv - export PYTHONPATH=/root/anaconda3/envs/myenv/lib/python3.7/site-packages:$PYTHONPATH + python ${alignPath} -python /data/test2.py --sub_id ${subId} --TR ${tr} --root_dir ${fucDataPath} --out_dir ${fmriOutPath} --anat_dir ${anatPath} +python /data/test2.py --sub_id ${subId} --TR ${tr} --root_dir ${fmriR2t1OutFile} --out_dir ${fmriOutPath} --anat_dir ${smriOutFile} echo "fmri handle end!" diff --git a/ruoyi-ui/.env.development b/ruoyi-ui/.env.development index 4ee7b20..8354fa2 100644 --- a/ruoyi-ui/.env.development +++ b/ruoyi-ui/.env.development @@ -5,8 +5,8 @@ VUE_APP_TITLE = 北京北山医疗科技有限公司 ENV = 'development' # 孑医测评管理系统/开发环境 -#VUE_APP_BASE_API = 'https://www.jieyi-autism.com/asdProject' -VUE_APP_BASE_API = 'http://127.0.0.1:8082/asdProject' +VUE_APP_BASE_API = 'https://www.jieyi-autism.com/asdProject' +#VUE_APP_BASE_API = 'http://127.0.0.1:8082/asdProject' # 路由懒加载 VUE_CLI_BABEL_TRANSPILE_MODULES = true diff --git a/ruoyi-ui/.env.production b/ruoyi-ui/.env.production index a8a80ce..113fab2 100644 --- a/ruoyi-ui/.env.production +++ b/ruoyi-ui/.env.production @@ -6,4 +6,5 @@ VUE_APP_TITLE = 北京北山医疗科技有限公司 ENV = 'production' # ASD小程序管理系统/生产环境 -VUE_APP_BASE_API = 'https://www.jieyi-autism.com/asdProject' +#VUE_APP_BASE_API = 'https://www.jieyi-autism.com/asdProject' +VUE_APP_BASE_API = 'http://192.168.1.71:8082/asdProject' diff --git a/ruoyi-ui/src/components/BrainUpload/index.vue b/ruoyi-ui/src/components/BrainUpload/index.vue index 68ac248..322a146 100644 --- a/ruoyi-ui/src/components/BrainUpload/index.vue +++ b/ruoyi-ui/src/components/BrainUpload/index.vue @@ -50,7 +50,7 @@ // 文件类型, 例如['png', 'jpg', 'jpeg'] fileType: { type: Array, - default: () => ["gz"], + default: () => ["zip"], }, // 是否显示提示 isShowTip: { diff --git a/ruoyi-ui/src/views/system/shMenu/index.vue b/ruoyi-ui/src/views/system/shMenu/index.vue index 375ef87..e77fc59 100644 --- a/ruoyi-ui/src/views/system/shMenu/index.vue +++ b/ruoyi-ui/src/views/system/shMenu/index.vue @@ -115,35 +115,32 @@ - + - + - - - - - - - - - - - + + + + + + + + + + + + + + + - - - @@ -228,7 +225,99 @@ scanTime: '' }, // 表单校验 - rules: {}, + rules: { + patientName: [ + { + required: true, + message: "患者姓名不能为空", + trigger: "blur", + }, + ], + patientAge: [ + { + required: true, + message: "患者年龄不能为空", + trigger: "blur", + }, + ], + patientCard: [ + { + required: true, + message: "证件信息号不能为空", + trigger: "blur", + }, + ], + scanTime: [ + { + required: true, + message: "扫描时间不能为空", + trigger: "blur", + }, + ], + blOrder: [ + { + required: true, + message: "病历号不能为空", + trigger: "blur", + }, + ], + scanPosition: [ + { + required: true, + message: "扫描地点不能为空", + trigger: "blur", + }, + ], + scanDoctor: [ + { + required: true, + message: "扫描医生不能为空", + trigger: "blur", + }, + ], + zdDoctor: [ + { + required: true, + message: "诊断医师不能为空", + trigger: "blur", + }, + ], + shDoctor: [ + { + required: true, + message: "审核医生不能为空", + trigger: "blur", + }, + ], + repetitionTime: [ + { + required: true, + message: "TR不能为空", + trigger: "blur", + }, + ], + scanningOrder: [ + { + required: true, + message: "扫描顺序不能为空", + trigger: "blur", + }, + ], + sliceNumber: [ + { + required: true, + message: "参考切片层数不能为空", + trigger: "blur", + }, + ], + filePath: [ + { + required: true, + message: "扫描文件不能为空", + trigger: "blur", + }, + ], + }, jsonOpen: false, jsonData: {}, jsonType: ''