Commit f89308cd authored by frank.xa.zhang's avatar frank.xa.zhang

fixed copy report template issue

parent ba31817d
......@@ -390,12 +390,14 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
templateGroup.setId(newGroupID);
templateGroup.setCreateTime(now);
templateGroup.setUpdateTime(now);
templateGroup.setName(templateGroupDto.getName());
templateGroupMapper.insertSelective(templateGroup);
List<Template> templateList = templateDao.getByGroupID(groupID);
templateList.stream().forEach(item -> {
Long itemID = item.getId();
Long newItemID = distributedIDService.nextId();
item.setId(newItemID);
item.setTemplateGroupId(newGroupID);
item.setCreateTime(now);
item.setUpdateTime(now);
templateMapper.insertSelective(item);
......@@ -412,7 +414,7 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
idMapper.put(cellID, newCellID);
return cell;
}).collect(Collectors.toList()), CommonUtils.BATCH_NUM);
tmpList.forEach(list -> cellTemplateMapper.batchInsert(list));
tmpList.forEach(list -> cellTemplateMapper.batchInsert2(list));
List<CellTemplateConfig> configList = cellTemplateConfigDao.getByTemplateID(itemID);
List<List<CellTemplateConfig>> tmpConfigList = CommonUtils.subListWithLen(configList.stream().map(cell -> {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment