提交 2adfc90f authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 25ec4f3c
......@@ -15,7 +15,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zrqx.core.enums.ResourceStatusEnum;
import com.zrqx.core.enums.ResponseCodeEnum;
import com.zrqx.core.exception.BaseException;
import com.zrqx.core.form.resource.bg.BatchUpdateForm;
......@@ -25,14 +24,11 @@ import com.zrqx.core.form.resource.bg.clauseLibrary.QueryClauseLibraryForm;
import com.zrqx.core.form.resource.bg.clauseLibrary.SaveUpdateClauseLibraryForm;
import com.zrqx.core.form.resource.bg.recycleBin.SaveResourceForm;
import com.zrqx.core.mapper.BaseMapper;
import com.zrqx.core.model.resource.achievementLibrary.AchievementLibrary;
import com.zrqx.core.model.resource.achievementLibrary.AchievementLibraryDiyType;
import com.zrqx.core.model.resource.audiolibrary.AudioGoods;
import com.zrqx.core.model.resource.audiolibrary.AudioLibrary;
import com.zrqx.core.model.resource.audiolibrary.AudioLibraryDiyType;
import com.zrqx.core.model.resource.authorLibrary.AuthorLibrary;
import com.zrqx.core.model.resource.clauseLibrary.ClauseLibrary;
import com.zrqx.core.model.resource.clauseLibrary.ClauseGoods;
import com.zrqx.core.model.resource.clauseLibrary.ClauseLibrary;
import com.zrqx.core.model.resource.clauseLibrary.ClauseLibraryDiyType;
import com.zrqx.core.model.resource.clauseLibrary.ClauseLibraryLabel;
import com.zrqx.core.model.resource.copyright.Copyright;
......@@ -52,10 +48,10 @@ import com.zrqx.core.vo.resource.clauseLibrary.ClauseLibraryListVo;
import com.zrqx.resource.bg.mapper.audiolibrary.AudioGoodsMapper;
import com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryDiyTypeMapper;
import com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryMapper;
import com.zrqx.resource.bg.mapper.clauseLibrary.ClauseLibraryMapper;
import com.zrqx.resource.bg.mapper.clauseLibrary.ClauseGoodsMapper;
import com.zrqx.resource.bg.mapper.clauseLibrary.ClauseLibraryDiyTypeMapper;
import com.zrqx.resource.bg.mapper.clauseLibrary.ClauseLibraryLabelMapper;
import com.zrqx.resource.bg.mapper.clauseLibrary.ClauseLibraryMapper;
import com.zrqx.resource.bg.mapper.pdflibrary.PdfGoodsMapper;
import com.zrqx.resource.bg.mapper.pdflibrary.PdfLibraryDiyTypeMapper;
import com.zrqx.resource.bg.mapper.pdflibrary.PdfLibraryMapper;
......@@ -78,6 +74,8 @@ public class ClauseLibraryServiceImpl extends BaseServiceImpl<ClauseLibrary, Int
@Autowired
private ClauseLibraryMapper mapper;
@Autowired
private ClauseLibraryService clauseLibraryService;
@Autowired
private ClauseLibraryDiyTypeMapper diyTypeMapper;
@Autowired
private ClauseLibraryDiyTypeService diyTypeService;
......@@ -429,9 +427,10 @@ public class ClauseLibraryServiceImpl extends BaseServiceImpl<ClauseLibrary, Int
}
List<ClauseLibrary> list = new ArrayList<ClauseLibrary>();
for (int i = 0; i < form.getToken().size(); i++) {
ClauseLibrary obj = new ClauseLibrary();
Integer countName = mapper.isRepeat(form.getNames().get(i),"");
if(countName==0){
ClauseLibrary obj = new ClauseLibrary();
obj.setContent(form.getNames().get(i));
obj.setPdf(form.getToken().get(i));
obj.setUploadTime(new Date());
......@@ -444,8 +443,10 @@ public class ClauseLibraryServiceImpl extends BaseServiceImpl<ClauseLibrary, Int
list.add(obj);
}else{
//循环添加当前对象与自定义分类的关系
clauseLibraryService.createCriteria().andEqualTo("name", form.getNames().get(i));
ClauseLibrary library = clauseLibraryService.selectOneByCriteria();
ClauseLibraryDiyType type = new ClauseLibraryDiyType();
type.setObjectId(obj.getId());
type.setObjectId(library.getId());
type.setDtId(form.getDiyTypeId());
type.setCode(form.getDiyTypeCode());
diyTypeMapper.insert(type);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论