详情页增加检测记录

This commit is contained in:
liang.chao 2024-12-20 17:15:04 +08:00
parent 6e87427cfa
commit d5986d572a
5 changed files with 23 additions and 10 deletions

View File

@ -19,10 +19,18 @@ import java.util.List;
@Data @Data
@ToString @ToString
@Accessors(chain = true) @Accessors(chain = true)
public class BmFileInfo extends BaseEntity { public class BmFileInfo extends BaseEntity implements Cloneable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Override
public BmFileInfo clone() {
try {
BmFileInfo cloned = (BmFileInfo) super.clone();
return cloned;
} catch (CloneNotSupportedException e) {
throw new AssertionError();
}
}
/** 主键id */ /** 主键id */
private Long id; private Long id;

View File

@ -36,8 +36,8 @@ public class MaDevQc extends BaseEntity implements Serializable {
private String deviceName; private String deviceName;
@ApiModelProperty(value = "下次检验日期") @ApiModelProperty(value = "下次检验日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date nextCheckTime; private Date nextCheckTime;
@ApiModelProperty(value = "质检编码") @ApiModelProperty(value = "质检编码")

View File

@ -24,13 +24,13 @@ public class Table {
private String checkMan; private String checkMan;
@ApiModelProperty(value = "检测日期") @ApiModelProperty(value = "检测日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date checkDate; private Date checkDate;
@ApiModelProperty(value = "下次检测日期") @ApiModelProperty(value = "下次检测日期")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd")
private Date nextCheckDate; private Date nextCheckDate;
@ApiModelProperty(value = "检测证明pdf") @ApiModelProperty(value = "检测证明pdf")

View File

@ -1,6 +1,7 @@
package com.bonus.material.device.service.impl; package com.bonus.material.device.service.impl;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
import com.bonus.common.biz.constant.MaterialConstants; import com.bonus.common.biz.constant.MaterialConstants;
import com.bonus.common.biz.domain.*; import com.bonus.common.biz.domain.*;
import com.bonus.common.biz.enums.MaStatusEnum; import com.bonus.common.biz.enums.MaStatusEnum;
@ -398,10 +399,14 @@ public class DevInfoServiceImpl implements DevInfoService {
}); });
fileInfoList.addAll(devInfo.getTableList().get(i).getExaminationPdf()); fileInfoList.addAll(devInfo.getTableList().get(i).getExaminationPdf());
List<BmFileInfo> examinationPdf = devInfo.getTableList().get(i).getExaminationPdf();
ArrayList<BmFileInfo> copiedList = examinationPdf.stream()
.map(BmFileInfo::clone)
.collect(Collectors.toCollection(ArrayList::new));
// 新增检测证明 // 新增检测证明
MaDevQc maDevQc = new MaDevQc(); MaDevQc maDevQc = new MaDevQc();
maDevQc.setMaId(devInfo.getMaId().intValue()); maDevQc.setMaId(devInfo.getMaId().intValue());
maDevQc.setFileInfoList(devInfo.getTableList().get(i).getExaminationPdf()); maDevQc.setFileInfoList(copiedList);
maDevQc.setNextCheckTime(table.getNextCheckDate()); maDevQc.setNextCheckTime(table.getNextCheckDate());
maDevQc.setQcUser(table.getCheckMan()); maDevQc.setQcUser(table.getCheckMan());
maDevQc.setQcTime(table.getCheckDate()); maDevQc.setQcTime(table.getCheckDate());

View File

@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into ma_dev_qc insert into ma_dev_qc
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="maId != null">ma_id,</if> <if test="maId != null">ma_id,</if>
<if test="nextCheckTime != null and nextCheckTime != ''">next_check_time,</if> <if test="nextCheckTime != null">next_check_time,</if>
<if test="qcCode != null and qcCode != ''">qc_code,</if> <if test="qcCode != null and qcCode != ''">qc_code,</if>
<if test="qcUser != null and qcUser != ''">qc_user,</if> <if test="qcUser != null and qcUser != ''">qc_user,</if>
<if test="qcCom != null and qcCom != ''">qc_com,</if> <if test="qcCom != null and qcCom != ''">qc_com,</if>