diff --git a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java index f45c9b9271..8d0eb4e8b7 100644 --- a/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java +++ b/epmet-module/epmet-heart/epmet-heart-client/src/main/java/com/epmet/dto/form/ServiceProjectFeedbackFormDTO.java @@ -2,7 +2,6 @@ package com.epmet.dto.form; import lombok.Data; -import javax.validation.constraints.NotBlank; import java.util.List; @Data @@ -23,10 +22,10 @@ public class ServiceProjectFeedbackFormDTO { private String longitude; private String latitude; private String address; - private List attachmentList; + private List attachmentList; @Data - public static class Feedback { + public static class Attachment { private String attachmentName; private String attachmentFormat; private String attachmentType; diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java index 3238791176..c6a2858c86 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/IcServiceProjectAttachmentEntity.java @@ -1,5 +1,7 @@ package com.epmet.entity; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.epmet.commons.mybatis.entity.BaseEpmetEntity; @@ -24,6 +26,7 @@ public class IcServiceProjectAttachmentEntity extends BaseEpmetEntity { /** * 客户ID */ + @TableField(fill = FieldFill.INSERT) private String customerId; /** diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java index 0d91f722ad..69c421e262 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcServiceRecordServiceImpl.java @@ -36,7 +36,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; /** * @@ -200,7 +199,7 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl attachmentList = feedbackDto.getAttachmentList(); + List attachmentList = feedbackDto.getAttachmentList(); if (CollectionUtils.isNotEmpty(attachmentList)) { - attachmentList.forEach(a -> { + for (int i = 0; i < attachmentList.size(); i++) { + ServiceProjectFeedbackFormDTO.Attachment a = attachmentList.get(i); + IcServiceProjectAttachmentEntity at = new IcServiceProjectAttachmentEntity(); at.setAttachmentFormat(a.getAttachmentFormat()); at.setAttachmentName(a.getAttachmentName()); @@ -229,11 +230,12 @@ public class IcServiceRecordServiceImpl extends BaseServiceImpl