Browse Source

fix:[试验管理]计划表单

master
15881625488@163.com 3 months ago
parent
commit
a486408abc
4 changed files with 90 additions and 5 deletions
  1. +27
    -3
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java
  2. +48
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java
  3. +13
    -0
      hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanJcgj.java
  4. +2
    -2
      hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanMapper.xml

+ 27
- 3
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/controller/StudyFormPlanController.java View File

@ -1,16 +1,17 @@
package com.hxhq.business.controller;
import java.util.List;
import com.hxhq.business.domain.StudyFormPlan;
import com.hxhq.business.domain.StudyFormPlanJcgj;
import com.hxhq.business.domain.StudyFormPlanQmxx;
import com.hxhq.business.domain.*;
import com.hxhq.business.dto.study.StudyFormPlanListDto;
import com.hxhq.business.form.study.StudyFormPlanSearchForm;
import com.hxhq.business.form.study.StudyFormUpdateForm;
import com.hxhq.business.service.IStudyFormPlanJcgjService;
import com.hxhq.business.service.IStudyFormPlanQmxxService;
import com.hxhq.business.utils.pdf.PdfExportUtil;
import com.hxhq.common.security.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
import com.hxhq.business.service.IStudyFormPlanService;
import com.hxhq.common.core.web.controller.BaseController;
@ -34,6 +35,16 @@ public class StudyFormPlanController extends BaseController
private IStudyFormPlanJcgjService studyFormPlanJcgjService;
@Autowired
private IStudyFormPlanQmxxService studyFormPlanQmxxService;
/**
* 上传文件存储在本地的根路径
*/
@Value("${file.path}")
private String localFilePath;
/**
* 资源映射路径 前缀
*/
@Value("${file.prefix}")
public String localFilePrefix;
/**
* 列表
@ -77,6 +88,19 @@ public class StudyFormPlanController extends BaseController
return AjaxResult.success(studyFormPlanService.queryInfo(id));
}
/**
* 导出
*/
@RequiresPermissions({"business:studyFormPlan:xq"})
@GetMapping(value = "/exportDetail")
public AjaxResult exportDetail(StudyFormPlanJcgj form) {
List<StudyFormPlanJcgj> studyFormPlanJcgjList = studyFormPlanJcgjService.queryList(form);
StudyFormPlanQmxx studyFormPlanQmxx = new StudyFormPlanQmxx();
studyFormPlanQmxx.setFormId(form.getFormId());
List<StudyFormPlanQmxx> studyFormPlanQmxxList = studyFormPlanQmxxService.queryList(studyFormPlanQmxx);
StudyFormPlan studyFormPlan=studyFormPlanService.queryInfo(form.getFormId());
return AjaxResult.success(localFilePrefix + PdfExportUtil.export(studyFormPlan.getTemplateExportClass(), studyFormPlan.getTemplateExportMethod(),studyFormPlan,studyFormPlanQmxxList,studyFormPlanJcgjList,form.getLang(),form.getJcgjlx(),localFilePath));
}
/**
* 更换归属人

+ 48
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlan.java View File

@ -89,10 +89,26 @@ public class StudyFormPlan extends MpBaseEntity
@Compare(name = "模板名称")
private String templateMc;
/** 模板名称-英文 */
@TableField(exist = false)
private String templateMcEn;
/** 模板编号 */
@TableField(exist = false)
private String templateSn;
/** 模板编号 */
@TableField(exist = false)
private String templateShowSn;
/** 模板导出类 */
@TableField(exist = false)
private String templateExportClass;
/** 模板导出方法 */
@TableField(exist = false)
private String templateExportMethod;
/** 试验编号 */
@TableField(exist = false)
private String studySn;
@ -101,6 +117,38 @@ public class StudyFormPlan extends MpBaseEntity
@TableField(exist = false)
private String studyMc;
public String getTemplateMcEn() {
return templateMcEn;
}
public void setTemplateMcEn(String templateMcEn) {
this.templateMcEn = templateMcEn;
}
public String getTemplateShowSn() {
return templateShowSn;
}
public void setTemplateShowSn(String templateShowSn) {
this.templateShowSn = templateShowSn;
}
public String getTemplateExportClass() {
return templateExportClass;
}
public void setTemplateExportClass(String templateExportClass) {
this.templateExportClass = templateExportClass;
}
public String getTemplateExportMethod() {
return templateExportMethod;
}
public void setTemplateExportMethod(String templateExportMethod) {
this.templateExportMethod = templateExportMethod;
}
public String getUserMcEn() {
return userMcEn;
}

+ 13
- 0
hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/domain/StudyFormPlanJcgj.java View File

@ -1,5 +1,6 @@
package com.hxhq.business.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hxhq.common.core.domain.MpBaseEntity;
@ -45,6 +46,18 @@ public class StudyFormPlanJcgj extends MpBaseEntity
/** 签名人名称-英文 */
private String qmrMcEn;
/** 语言 */
@TableField(exist = false)
private String lang;
public String getLang() {
return lang;
}
public void setLang(String lang) {
this.lang = lang;
}
public String getJcmcEn() {
return jcmcEn;
}

+ 2
- 2
hxhq-modules/hxhq-system/src/main/resources/mapper/business/StudyFormPlanMapper.xml View File

@ -15,8 +15,8 @@
</select>
<select id="queryInfo" resultType="com.hxhq.business.domain.StudyFormPlan">
select t.*,tm.name as templateMc,tm.sn as templateSn
,ts.sn as studySn,ts.name as studyMc
select t.*,tm.name as templateMc,tm.name_en as templateMcEn,tm.sn as templateSn,tm.show_sn as templateShowSn,tm.dept_id as templateDeptId
,ts.sn as studySn,ts.name as studyMc,tm.export_class as templateExportClass,tm.export_method as templateExportMethod
FROM `t_study_form_plan` t
join t_template tm on tm.id=t.template_id
join t_study ts on ts.id=t.study_id

Loading…
Cancel
Save