|
|
@@ -125,8 +125,6 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
|
|
|
@Override
|
|
|
public Long createIotRdDailyReport(IotRdDailyReportSaveReqVO createReqVO) {
|
|
|
-
|
|
|
-
|
|
|
// 插入
|
|
|
IotRdDailyReportDO iotRdDailyReport = BeanUtils.toBean(createReqVO, IotRdDailyReportDO.class);
|
|
|
// 如果没有传递 deptId 则默认使用当前登录人的 部门
|
|
|
@@ -137,8 +135,8 @@ public class IotRdDailyReportServiceImpl implements IotRdDailyReportService {
|
|
|
}
|
|
|
}
|
|
|
LocalDateTime createTime = createReqVO.getCreateTime();
|
|
|
- // 根据部门名称 当前日期 生成日报标题
|
|
|
- if (ObjUtil.isNotEmpty(createReqVO.getDeptId())) {
|
|
|
+ // 根据部门名称 当前日期 生成日报标题 新增日报时生成标题 编辑时标题不变
|
|
|
+ if (ObjUtil.isNotEmpty(createReqVO.getDeptId()) && ObjUtil.isEmpty(createReqVO.getId())) {
|
|
|
DeptDO dept = deptService.getDept(createReqVO.getDeptId());
|
|
|
LocalDateTime tempDateTime = ObjUtil.isEmpty(createTime) ? LocalDateTime.now() : createTime;
|
|
|
if (ObjUtil.isNotEmpty(dept)) {
|