update
This commit is contained in:
@@ -270,6 +270,7 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
|
||||
if (!StringUtils.equals(requestStatus, ExperimentReportStatus.PROOFREAD_PASS)) {
|
||||
report.setStatus(ExperimentReportStatus.REJECT);
|
||||
report.setProofreaderMemo(experimentReport.getMemo());
|
||||
report.setProofreaderTime(DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm"));
|
||||
}
|
||||
report.setStatus(requestStatus);
|
||||
}
|
||||
@@ -281,6 +282,8 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
|
||||
if (!StringUtils.equals(requestStatus, ExperimentReportStatus.AUDIT_PASS)) {
|
||||
report.setStatus(ExperimentReportStatus.REJECT);
|
||||
report.setAuditorMemo(experimentReport.getMemo());
|
||||
report.setAuditorTime(DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm"));
|
||||
|
||||
}
|
||||
report.setStatus(requestStatus);
|
||||
}
|
||||
@@ -293,6 +296,7 @@ public class ExperimentReportController extends JeecgController<ExperimentReport
|
||||
if (!StringUtils.equals(requestStatus, ExperimentReportStatus.PASSED)) {
|
||||
report.setStatus(ExperimentReportStatus.REJECT);
|
||||
report.setConfirmerMemo(experimentReport.getMemo());
|
||||
report.setConfirmerTime(DateUtils.formatDate(new Date(), "yyyy-MM-dd HH:mm"));
|
||||
}
|
||||
report.setStatus(requestStatus);
|
||||
} else {
|
||||
|
||||
@@ -3,6 +3,8 @@ package org.jeecg.modules.database.entity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
@@ -10,14 +12,8 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Description: 试验报告
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-10-23
|
||||
* @Version: V1.0
|
||||
* @Description: 试验报告 @Author: jeecg-boot @Date: 2024-10-23 @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("experiment_report")
|
||||
@@ -25,126 +21,124 @@ import java.util.Date;
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Schema(description = "试验报告")
|
||||
public class ExperimentReport implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "创建日期")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
@Schema(description = "更新人")
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新日期
|
||||
*/
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
@Schema(description = "更新日期")
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@Schema(description = "所属部门")
|
||||
private String sysOrgCode;
|
||||
/**
|
||||
* 试验ID
|
||||
*/
|
||||
@Excel(name = "试验ID", width = 15)
|
||||
@Schema(description = "试验ID")
|
||||
private String experimentId;
|
||||
/**
|
||||
* 样品信息
|
||||
*/
|
||||
@Excel(name = "样品信息", width = 15)
|
||||
@Schema(description = "样品信息")
|
||||
private String sampleInfo;
|
||||
/**
|
||||
* 偏置原理图
|
||||
*/
|
||||
@Excel(name = "偏置原理图", width = 15)
|
||||
@Schema(description = "偏置原理图")
|
||||
private String imgUrls;
|
||||
/**
|
||||
* 偏置原理说明
|
||||
*/
|
||||
@Excel(name = "偏置原理说明", width = 15)
|
||||
@Schema(description = "偏置原理说明")
|
||||
private String description;
|
||||
/**
|
||||
* 审核员
|
||||
*/
|
||||
@Excel(name = "审核员", width = 15)
|
||||
@Schema(description = "审核员")
|
||||
private String auditor;
|
||||
/**
|
||||
* 校对员
|
||||
*/
|
||||
@Excel(name = "校对员", width = 15)
|
||||
@Schema(description = "校对员")
|
||||
private String proofreader;
|
||||
/**
|
||||
* 确认员
|
||||
*/
|
||||
@Excel(name = "确认员", width = 15)
|
||||
@Schema(description = "确认员")
|
||||
private String confirmer;
|
||||
/**
|
||||
* 报告名称
|
||||
*/
|
||||
@Excel(name = "报告名称", width = 15)
|
||||
@Schema(description = "报告名称")
|
||||
private String reportName;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Excel(name = "状态", width = 15)
|
||||
@Schema(description = "状态(申请中待校对:INIT,不合格:REJECT ,校对通过待审核:PROOFREAD_PASS,审核通过待批准:AUDIT_PASS,批准通过:PASSED)")
|
||||
private String status;
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description = "主键")
|
||||
private String id;
|
||||
|
||||
@Excel(name = "审批意见", width = 15)
|
||||
@Schema(description = "审批意见")
|
||||
private String auditorMemo;
|
||||
/** 创建人 */
|
||||
@Schema(description = "创建人")
|
||||
private String createBy;
|
||||
|
||||
@Excel(name = "校对意见", width = 15)
|
||||
@Schema(description = "校对意见")
|
||||
private String proofreaderMemo;
|
||||
/** 创建日期 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||
@Schema(description = "创建日期")
|
||||
private Date createTime;
|
||||
|
||||
@Excel(name = "确认意见", width = 15)
|
||||
@Schema(description = "确认意见")
|
||||
private String confirmerMemo;
|
||||
/** 更新人 */
|
||||
@Schema(description = "更新人")
|
||||
private String updateBy;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String fileUrl;
|
||||
/** 更新日期 */
|
||||
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm")
|
||||
@Schema(description = "更新日期")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String memo;
|
||||
/** 所属部门 */
|
||||
@Schema(description = "所属部门")
|
||||
private String sysOrgCode;
|
||||
|
||||
public String getMemo() {
|
||||
if (StringUtils.isNotBlank(proofreaderMemo)) {
|
||||
return proofreaderMemo;
|
||||
}
|
||||
if (StringUtils.isNotBlank(auditorMemo)) {
|
||||
return auditorMemo;
|
||||
}
|
||||
if (StringUtils.isNotBlank(confirmerMemo)) {
|
||||
return confirmerMemo;
|
||||
}
|
||||
return null;
|
||||
/** 试验ID */
|
||||
@Excel(name = "试验ID", width = 15)
|
||||
@Schema(description = "试验ID")
|
||||
private String experimentId;
|
||||
|
||||
/** 样品信息 */
|
||||
@Excel(name = "样品信息", width = 15)
|
||||
@Schema(description = "样品信息")
|
||||
private String sampleInfo;
|
||||
|
||||
/** 偏置原理图 */
|
||||
@Excel(name = "偏置原理图", width = 15)
|
||||
@Schema(description = "偏置原理图")
|
||||
private String imgUrls;
|
||||
|
||||
/** 偏置原理说明 */
|
||||
@Excel(name = "偏置原理说明", width = 15)
|
||||
@Schema(description = "偏置原理说明")
|
||||
private String description;
|
||||
|
||||
/** 审核员 */
|
||||
@Excel(name = "审核员", width = 15)
|
||||
@Schema(description = "审核员")
|
||||
private String auditor;
|
||||
|
||||
/** 校对员 */
|
||||
@Excel(name = "校对员", width = 15)
|
||||
@Schema(description = "校对员")
|
||||
private String proofreader;
|
||||
|
||||
/** 确认员 */
|
||||
@Excel(name = "确认员", width = 15)
|
||||
@Schema(description = "确认员")
|
||||
private String confirmer;
|
||||
|
||||
/** 报告名称 */
|
||||
@Excel(name = "报告名称", width = 15)
|
||||
@Schema(description = "报告名称")
|
||||
private String reportName;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态", width = 15)
|
||||
@Schema(
|
||||
description =
|
||||
"状态(申请中待校对:INIT,不合格:REJECT ,校对通过待审核:PROOFREAD_PASS,审核通过待批准:AUDIT_PASS,批准通过:PASSED)")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "审批意见", width = 15)
|
||||
@Schema(description = "审批意见")
|
||||
private String auditorMemo;
|
||||
|
||||
@Excel(name = "校对意见", width = 15)
|
||||
@Schema(description = "校对意见")
|
||||
private String proofreaderMemo;
|
||||
|
||||
@Excel(name = "批准意见", width = 15)
|
||||
@Schema(description = "批准意见")
|
||||
private String confirmerMemo;
|
||||
|
||||
@Excel(name = "审批时间", width = 15)
|
||||
@Schema(description = "审批时间")
|
||||
private String auditorTime;
|
||||
|
||||
@Excel(name = "校对时间", width = 15)
|
||||
@Schema(description = "校对时间")
|
||||
private String proofreaderTime;
|
||||
|
||||
@Excel(name = "批准时间", width = 15)
|
||||
@Schema(description = "批准时间")
|
||||
private String confirmerTime;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String fileUrl;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String memo;
|
||||
|
||||
public String getMemo() {
|
||||
if (StringUtils.isNotBlank(proofreaderMemo)) {
|
||||
return proofreaderMemo;
|
||||
}
|
||||
if (StringUtils.isNotBlank(auditorMemo)) {
|
||||
return auditorMemo;
|
||||
}
|
||||
if (StringUtils.isNotBlank(confirmerMemo)) {
|
||||
return confirmerMemo;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,12 @@ import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.Tables;
|
||||
import com.deepoove.poi.data.style.BorderStyle;
|
||||
import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.xwpf.usermodel.*;
|
||||
@@ -28,13 +34,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.math.BigInteger;
|
||||
import java.nio.file.Path;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 试验文档
|
||||
* @Author: jeecg-boot
|
||||
@@ -292,7 +291,9 @@ public class ExperimentDocServiceImpl extends ServiceImpl<ExperimentDocMapper, E
|
||||
params.put("批准人员姓名", Optional.ofNullable(sysUserService.getById(latestReport.getConfirmer())).map(SysUser::getRealname)
|
||||
.orElse(""));
|
||||
params.put("报告生成日期", formatDate(latestReport.getCreateTime()));
|
||||
params.put("最后批准完成的日期", DateUtils.formatDate(latestReport.getUpdateTime(), "yyyy年MM月dd日"));
|
||||
params.put("批准日期",latestReport.getConfirmerTime());
|
||||
params.put("校对日期",latestReport.getProofreaderTime());
|
||||
params.put("审核日期",latestReport.getAuditorTime());
|
||||
|
||||
}
|
||||
params.put("试验报告名称", experiment.getName());
|
||||
@@ -423,8 +424,9 @@ public class ExperimentDocServiceImpl extends ServiceImpl<ExperimentDocMapper, E
|
||||
|
||||
params.put("试验报告名称", experiment.getName());
|
||||
params.put("试验编号", experiment.getExperimentNo());
|
||||
params.put("驳回意见", "");
|
||||
params.put("驳回意见2", Optional.ofNullable(latestReport).map(v -> v.getMemo()).orElse(""));
|
||||
params.put("校对驳回意见",Optional.ofNullable(latestReport).map(ExperimentReport::getProofreaderMemo).orElse(""));
|
||||
params.put("审核驳回意见", Optional.ofNullable(latestReport).map(ExperimentReport::getAuditorMemo).orElse(""));
|
||||
params.put("批准驳回意见", Optional.ofNullable(latestReport).map(ExperimentReport::getConfirmerMemo).orElse(""));
|
||||
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user