|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package org.dromara.system.service.impl;
|
|
|
|
|
|
|
|
|
|
import org.dromara.common.core.exception.ServiceException;
|
|
|
|
|
import org.dromara.common.core.utils.MapstructUtils;
|
|
|
|
|
import org.dromara.common.core.utils.StringUtils;
|
|
|
|
|
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
|
|
|
@ -15,6 +16,7 @@ import org.dromara.system.domain.vo.SysPrintTemplateNodeVo;
|
|
|
|
|
import org.dromara.system.domain.SysPrintTemplateNode;
|
|
|
|
|
import org.dromara.system.mapper.SysPrintTemplateNodeMapper;
|
|
|
|
|
import org.dromara.system.service.ISysPrintTemplateNodeService;
|
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
@ -139,4 +141,29 @@ public class SysPrintTemplateNodeServiceImpl implements ISysPrintTemplateNodeSer
|
|
|
|
|
}
|
|
|
|
|
return baseMapper.deleteByIds(ids) > 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新节点信息列表
|
|
|
|
|
* @param bos
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Override
|
|
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
|
|
public int updateNode(List<SysPrintTemplateNodeBo> bos) {
|
|
|
|
|
for (SysPrintTemplateNodeBo bo : bos) {
|
|
|
|
|
String id = bo.getId();
|
|
|
|
|
if (StringUtils.isEmpty(id)) {
|
|
|
|
|
throw new ServiceException(bo.getId() + "节点不可为空!");
|
|
|
|
|
}
|
|
|
|
|
SysPrintTemplateNodeBo selectNodeBo = new SysPrintTemplateNodeBo();
|
|
|
|
|
selectNodeBo.setId(bo.getId());
|
|
|
|
|
List<SysPrintTemplateNodeVo> nodeVos = this.queryList(selectNodeBo);
|
|
|
|
|
if (nodeVos.isEmpty()) {
|
|
|
|
|
throw new ServiceException(bo.getId() + "节点不存在!");
|
|
|
|
|
}
|
|
|
|
|
baseMapper.deleteById(bo.getTemplateNodeId());
|
|
|
|
|
this.insertByBo(bo);
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|