|
|
@ -64,6 +64,7 @@ public class StudyFormFillController extends BaseController { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 开始配置 |
|
|
* 开始配置 |
|
|
|
|
|
* |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@PostMapping("/startConfiguration") |
|
|
@PostMapping("/startConfiguration") |
|
|
@ -77,6 +78,7 @@ public class StudyFormFillController extends BaseController { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 配置完成 |
|
|
* 配置完成 |
|
|
|
|
|
* |
|
|
* @param form |
|
|
* @param form |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@ -91,6 +93,7 @@ public class StudyFormFillController extends BaseController { |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 分装 |
|
|
* 分装 |
|
|
|
|
|
* |
|
|
* @param form |
|
|
* @param form |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
@ -141,26 +144,26 @@ public class StudyFormFillController extends BaseController { |
|
|
*/ |
|
|
*/ |
|
|
@GetMapping("/jcgjqmxxList") |
|
|
@GetMapping("/jcgjqmxxList") |
|
|
@RequiresPermissions(value = {"business:studyFormFill:xq", "business:nonTrialFormFill:xq", "business:drugFormFill:xq"}, logical = Logical.OR) |
|
|
@RequiresPermissions(value = {"business:studyFormFill:xq", "business:nonTrialFormFill:xq", "business:drugFormFill:xq"}, logical = Logical.OR) |
|
|
public AjaxResult jcgjqmxxList(Integer jcgjlx,Long id) { |
|
|
|
|
|
HashMap<String,Object> map=new HashMap<String,Object>(2); |
|
|
|
|
|
|
|
|
public AjaxResult jcgjqmxxList(Integer jcgjlx, Long id) { |
|
|
|
|
|
HashMap<String, Object> map = new HashMap<String, Object>(2); |
|
|
//稽查轨迹 |
|
|
//稽查轨迹 |
|
|
QueryWrapper<StudyFormFillJcgj> studyFormFillJcgjQueryWrapper = Wrappers.query(); |
|
|
QueryWrapper<StudyFormFillJcgj> studyFormFillJcgjQueryWrapper = Wrappers.query(); |
|
|
studyFormFillJcgjQueryWrapper.eq("form_id",id); |
|
|
|
|
|
if(jcgjlx!=null&&jcgjlx.intValue()>0){ |
|
|
|
|
|
Integer jcgjlxExport=999; |
|
|
|
|
|
if(jcgjlx.intValue()==jcgjlxExport){ |
|
|
|
|
|
|
|
|
studyFormFillJcgjQueryWrapper.eq("form_id", id); |
|
|
|
|
|
if (jcgjlx != null && jcgjlx.intValue() > 0) { |
|
|
|
|
|
Integer jcgjlxExport = 999; |
|
|
|
|
|
if (jcgjlx.intValue() == jcgjlxExport) { |
|
|
studyFormFillJcgjQueryWrapper.notIn("jcgjlx", JcgjlxEnum.xg.getValue()); |
|
|
studyFormFillJcgjQueryWrapper.notIn("jcgjlx", JcgjlxEnum.xg.getValue()); |
|
|
}else{ |
|
|
|
|
|
studyFormFillJcgjQueryWrapper.eq("jcgjlx",jcgjlx); |
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
studyFormFillJcgjQueryWrapper.eq("jcgjlx", jcgjlx); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
studyFormFillJcgjQueryWrapper.orderByDesc("create_time"); |
|
|
studyFormFillJcgjQueryWrapper.orderByDesc("create_time"); |
|
|
map.put("jcgj",studyFormFillJcgjService.list(studyFormFillJcgjQueryWrapper)); |
|
|
|
|
|
|
|
|
map.put("jcgj", studyFormFillJcgjService.list(studyFormFillJcgjQueryWrapper)); |
|
|
//签名信息 |
|
|
//签名信息 |
|
|
QueryWrapper<StudyFormFillQmxx> studyFormFillQmxxQueryWrapper = Wrappers.query(); |
|
|
QueryWrapper<StudyFormFillQmxx> studyFormFillQmxxQueryWrapper = Wrappers.query(); |
|
|
studyFormFillQmxxQueryWrapper.eq("form_id",id); |
|
|
|
|
|
|
|
|
studyFormFillQmxxQueryWrapper.eq("form_id", id); |
|
|
studyFormFillQmxxQueryWrapper.orderByDesc("create_time"); |
|
|
studyFormFillQmxxQueryWrapper.orderByDesc("create_time"); |
|
|
map.put("qmxx",studyFormFillQmxxService.list(studyFormFillQmxxQueryWrapper)); |
|
|
|
|
|
|
|
|
map.put("qmxx", studyFormFillQmxxService.list(studyFormFillQmxxQueryWrapper)); |
|
|
return AjaxResult.success(map); |
|
|
return AjaxResult.success(map); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -198,31 +201,30 @@ public class StudyFormFillController extends BaseController { |
|
|
StudyFormFill studyFormFill = studyFormFillService.queryInfo(form.getStudyFormFillId()); |
|
|
StudyFormFill studyFormFill = studyFormFillService.queryInfo(form.getStudyFormFillId()); |
|
|
Study study = studyService.getById(studyFormFill.getStudyId()); |
|
|
Study study = studyService.getById(studyFormFill.getStudyId()); |
|
|
//稽查轨迹 |
|
|
//稽查轨迹 |
|
|
QueryWrapper<StudyFormFillJcgj> studyFormFillJcgjQueryWrapper = Wrappers.query(); |
|
|
|
|
|
studyFormFillJcgjQueryWrapper.eq("form_id",studyFormFill.getId()); |
|
|
|
|
|
if(form.getJcgjlx()!=null&&form.getJcgjlx().intValue()>0){ |
|
|
|
|
|
Integer jcgjlxExport=999; |
|
|
|
|
|
if(form.getJcgjlx().intValue()==jcgjlxExport){ |
|
|
|
|
|
studyFormFillJcgjQueryWrapper.notIn("jcgjlx", JcgjlxEnum.xg.getValue()); |
|
|
|
|
|
}else{ |
|
|
|
|
|
studyFormFillJcgjQueryWrapper.eq("jcgjlx",form.getJcgjlx()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
List<StudyFormFillJcgj> jcgjList = new ArrayList<>(); |
|
|
|
|
|
Integer noExport=999; |
|
|
|
|
|
Boolean jcgj=false; |
|
|
|
|
|
if (form.getJcgjlx() != null && form.getJcgjlx().intValue() > 0&&!form.getJcgjlx().equals(noExport)) { |
|
|
|
|
|
QueryWrapper<StudyFormFillJcgj> studyFormFillJcgjQueryWrapper = Wrappers.query(); |
|
|
|
|
|
studyFormFillJcgjQueryWrapper.eq("form_id", studyFormFill.getId()); |
|
|
|
|
|
studyFormFillJcgjQueryWrapper.eq("jcgjlx", form.getJcgjlx()); |
|
|
|
|
|
studyFormFillJcgjQueryWrapper.orderByDesc("create_time"); |
|
|
|
|
|
jcgjList = studyFormFillJcgjService.list(studyFormFillJcgjQueryWrapper); |
|
|
|
|
|
jcgj=true; |
|
|
} |
|
|
} |
|
|
studyFormFillJcgjQueryWrapper.orderByDesc("create_time"); |
|
|
|
|
|
List<StudyFormFillJcgj> jcgjList=studyFormFillJcgjService.list(studyFormFillJcgjQueryWrapper); |
|
|
|
|
|
|
|
|
|
|
|
//签名信息 |
|
|
//签名信息 |
|
|
QueryWrapper<StudyFormFillQmxx> studyFormFillQmxxQueryWrapper = Wrappers.query(); |
|
|
QueryWrapper<StudyFormFillQmxx> studyFormFillQmxxQueryWrapper = Wrappers.query(); |
|
|
studyFormFillQmxxQueryWrapper.eq("form_id",studyFormFill.getId()); |
|
|
|
|
|
|
|
|
studyFormFillQmxxQueryWrapper.eq("form_id", studyFormFill.getId()); |
|
|
studyFormFillQmxxQueryWrapper.orderByDesc("create_time"); |
|
|
studyFormFillQmxxQueryWrapper.orderByDesc("create_time"); |
|
|
List<StudyFormFillQmxx> qmxxList=studyFormFillQmxxService.list(studyFormFillQmxxQueryWrapper); |
|
|
|
|
|
|
|
|
List<StudyFormFillQmxx> qmxxList = studyFormFillQmxxService.list(studyFormFillQmxxQueryWrapper); |
|
|
|
|
|
|
|
|
String fileUrl =form.getUrl(); |
|
|
|
|
|
|
|
|
String fileUrl = form.getUrl(); |
|
|
fileUrl = fileUrl.replaceFirst(localFilePrefix, ""); |
|
|
fileUrl = fileUrl.replaceFirst(localFilePrefix, ""); |
|
|
int indexOf = fileUrl.lastIndexOf("/"); |
|
|
int indexOf = fileUrl.lastIndexOf("/"); |
|
|
String path = fileUrl.substring(0, indexOf); |
|
|
String path = fileUrl.substring(0, indexOf); |
|
|
String exportFileName = StudyFormFillUtil.export(form.getVersion(),form.getLang(),study.getName() + "("+study.getSn()+") "+studyFormFill.getBdmc(), |
|
|
|
|
|
localFilePath + fileUrl, localFilePath + File.separator + path,jcgjList,qmxxList); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String exportFileName = StudyFormFillUtil.export(form.getVersion(), form.getLang(), study.getName() + "(" + study.getSn() + ") " + studyFormFill.getBdmc(), |
|
|
|
|
|
localFilePath + fileUrl, localFilePath + File.separator + path, jcgjList, qmxxList,jcgj); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return AjaxResult.success(localFilePrefix + path + File.separator + exportFileName); |
|
|
return AjaxResult.success(localFilePrefix + path + File.separator + exportFileName); |
|
|
|