mirror of
https://codeup.aliyun.com/64f7d6b8ce01efaafef1e678/coal/coal.git
synced 2026-01-24 23:41:21 +08:00
feat(smartCamCompare): 添加详情列表并优化创建逻辑
- 在 SmartCamCompareDto 中添加 details 字段,用于存储详情信息 - 在 SmartCamCompareService 中,为创建的实体的每个详情项设置对应的 SmartCamCompare 实体
This commit is contained in:
BIN
jrebel-classpath-12052.jar
Normal file
BIN
jrebel-classpath-12052.jar
Normal file
Binary file not shown.
@@ -9,6 +9,7 @@ import lombok.Data;
|
||||
import org.hibernate.annotations.Comment;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SmartCamCompareDto extends OrgCommonDto {
|
||||
@@ -50,4 +51,7 @@ public class SmartCamCompareDto extends OrgCommonDto {
|
||||
|
||||
@Comment("出场差值")
|
||||
private Integer exitDiff;
|
||||
|
||||
|
||||
private List<String> details;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,11 @@ public class SmartCamCompareService
|
||||
public SmartCamCompareDto create(CreateSmartCamCompareDto request) {
|
||||
SmartCamCompareEntity entity = mapper.toEntity(request);
|
||||
|
||||
entity.getDetails().forEach(
|
||||
detail -> {
|
||||
detail.setSmartCamCompare(entity);
|
||||
});
|
||||
|
||||
this.repository.save(entity);
|
||||
return getById(entity.getId());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user