diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java index edecd43..e71228d 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/Template.java @@ -55,8 +55,11 @@ public class Template extends MpBaseEntity /** 填报显示药剂存储按钮:1:否;10:显示 */ private Integer showYjcc; - /** 所属试验类型:1试验,5非试验表单,10麻精药表单,20全部 */ - private Integer studyType; + /** 所属试验类型:1试验,5非试验表单,10麻精药表单 */ + private String studyType; + + /** 所属试验表单类型:1预填表单,5填报表单,10,配置计划表,15,麻精药领取申请 */ + private String studyFormType; /** 显示的编号 */ private String showSn; @@ -71,6 +74,14 @@ public class Template extends MpBaseEntity @TableField(exist = false) private String deptName; + public String getStudyFormType() { + return studyFormType; + } + + public void setStudyFormType(String studyFormType) { + this.studyFormType = studyFormType; + } + public Integer getShowYjcc() { return showYjcc; } @@ -79,11 +90,11 @@ public class Template extends MpBaseEntity this.showYjcc = showYjcc; } - public Integer getStudyType() { + public String getStudyType() { return studyType; } - public void setStudyType(Integer studyType) { + public void setStudyType(String studyType) { this.studyType = studyType; } diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java index 4312c07..5eb899c 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/TemplateServiceImpl.java @@ -50,8 +50,11 @@ public class TemplateServiceImpl extends ServiceImpl i if(template.getStatus()!=null && template.getStatus().intValue()>0){ queryWrapper.eq("t.status",template.getStatus()); } - if(template.getStudyType()!=null&&template.getStudyType().intValue()>0){ - queryWrapper.eq("t.study_type",template.getStudyType()); + if(StringUtils.isNoneBlank(template.getStudyType())){ + queryWrapper.and(p -> p.apply("find_in_set( {0},t.study_type)", template.getStudyType())); + } + if(StringUtils.isNoneBlank(template.getStudyFormType())){ + queryWrapper.and(p -> p.apply("find_in_set( {0},t.study_form_type)", template.getStudyFormType())); } queryWrapper.orderByAsc("t.sn"); return baseMapper.queryList(queryWrapper);