This commit is contained in:
许允枞 2025-03-12 14:44:33 +08:00
parent 6e18a910b8
commit ec8b8c2a96

View File

@ -26,6 +26,7 @@ import javax.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@ -61,6 +62,8 @@ public class WorkReportServiceImpl extends ServiceImpl<WorkReportMapper, WorkRep
public Integer createReport(WorkReportSaveReqVO createReqVO) {
// 插入
WorkReport report = BeanUtils.toBean(createReqVO, WorkReport.class);
// 设置汇报时间位当前时间
report.setReportTime(LocalDateTime.now());
// 将汇报对象集合转换为字符串
report.setReportTo(createReqVO.getReportTos().stream().map(String::valueOf).collect(Collectors.joining(",")));