| | |
| | | } |
| | | if (group.getTemplateId() == null) |
| | | { |
| | | throw new ServiceException("模板不能为空"); |
| | | if (group.getTemplateFieldRelations() != null && !group.getTemplateFieldRelations().isEmpty()) |
| | | { |
| | | throw new ServiceException("未选择模板时不能配置模板字段"); |
| | | } |
| | | return; |
| | | } |
| | | if (batteryGroupMapper.selectTemplate(group.getTemplateId()) == null) |
| | | { |
| | |
| | | batteries.add(item); |
| | | } |
| | | batteryGroupMapper.batchInsertBatteries(batteries); |
| | | if (group.getTemplateId() == null) |
| | | { |
| | | return; |
| | | } |
| | | List<TBatteryGroupRelationField> relations = group.getTemplateFieldRelations(); |
| | | if (relations == null || relations.isEmpty()) |
| | | { |