Browse Source

fix:[模板管理]优化

master
15881625488@163.com 2 months ago
parent
commit
c50957db23
2 changed files with 10 additions and 1 deletions
  1. +7
    -1
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java
  2. +3
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java

+ 7
- 1
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPreController.java View File

@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.hxhq.business.domain.*;
import com.hxhq.business.dto.study.StudyFormPreListDto;
import com.hxhq.business.enums.study.StudyStatusEnum;
import com.hxhq.business.enums.study.StudyTypeEnum;
import com.hxhq.business.form.study.StudyFormPreAuditForm;
import com.hxhq.business.form.study.StudyFormPreSearchForm;
import com.hxhq.business.form.study.StudyFormUpdateForm;
@ -53,8 +54,13 @@ public class StudyFormPreController extends BaseController
@RequiresPermissions(value={"business:studyFormPre:bj","business:studyFormPre:xz",
"business:nonTrialFormPre:bj","business:nonTrialFormPre:xz",
"business:drugFormPre:bj","business:drugFormPre:xz"}, logical= Logical.OR)
public AjaxResult studyList() {
public AjaxResult studyList(Integer type) {
QueryWrapper<Study> queryWrapper = Wrappers.query();
if(type!=null){
queryWrapper.eq("type",type);
}else{
queryWrapper.in("type", StudyTypeEnum.fsy.getValue(), StudyTypeEnum.sy.getValue());
}
queryWrapper.in("status", StudyStatusEnum.syz.getValue(),StudyStatusEnum.ysd.getValue());
return AjaxResult.success(studyService.list(queryWrapper));
}

+ 3
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java View File

@ -49,6 +49,9 @@ public class TemplateServiceImpl extends ServiceImpl i
if(template.getStatus()!=null && template.getStatus().intValue()>0){
queryWrapper.eq("t.status",template.getStatus());
}
if(template.getStudyType()!=null){
queryWrapper.eq("t.study_type",template.getStudyType());
}
queryWrapper.orderByAsc("t.sn");
return baseMapper.queryList(queryWrapper);
}

Loading…
Cancel
Save