|
@ -61,13 +61,14 @@ public class DfDangerousProjectService extends BaseService<DfDangerousProjectMap |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public DfDangerousProjectItemDto addOrModifyItem(DfDangerousProjectItem item) { |
|
|
public DfDangerousProjectItemDto addOrModifyItem(DfDangerousProjectItemDto item) { |
|
|
|
|
|
DfDangerousProjectItem projectItem = BeanCopyUtils.copy(item, DfDangerousProjectItem.class); |
|
|
if (item.getId() == null) { |
|
|
if (item.getId() == null) { |
|
|
projectItemMapper.insert(item); |
|
|
projectItemMapper.insert(projectItem); |
|
|
} else { |
|
|
} else { |
|
|
projectItemMapper.updateById(item); |
|
|
projectItemMapper.updateById(projectItem); |
|
|
} |
|
|
} |
|
|
return BeanCopyUtils.copy(item, DfDangerousProjectItemDto.class); |
|
|
return BeanCopyUtils.copy(projectItem, DfDangerousProjectItemDto.class); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|