|
|
|
@ -155,6 +155,7 @@ public class SysPrintTemplateNodeServiceImpl implements ISysPrintTemplateNodeSer
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public int updateNode(List<SysPrintTemplateNodeBo> bos) {
|
|
|
|
|
int i = 1;
|
|
|
|
|
for (SysPrintTemplateNodeBo bo : bos) {
|
|
|
|
|
String id = bo.getId();
|
|
|
|
|
if (StringUtils.isEmpty(id)) {
|
|
|
|
@ -166,7 +167,10 @@ public class SysPrintTemplateNodeServiceImpl implements ISysPrintTemplateNodeSer
|
|
|
|
|
if (nodeVos.isEmpty()) {
|
|
|
|
|
throw new ServiceException(bo.getId() + "节点不存在!");
|
|
|
|
|
}
|
|
|
|
|
baseMapper.deleteById(nodeVos.get(0).getTemplateNodeId());
|
|
|
|
|
if (i == 1){
|
|
|
|
|
baseMapper.deleteById(nodeVos.get(0).getTemplateNodeId());
|
|
|
|
|
}
|
|
|
|
|
i++;
|
|
|
|
|
this.insertByBo(bo);
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|