|
|
@ -9,14 +9,12 @@ import com.hankcs.hanlp.corpus.document.sentence.word.Word;
|
|
|
|
import com.hankcs.hanlp.dictionary.CustomDictionary;
|
|
|
|
import com.hankcs.hanlp.dictionary.CustomDictionary;
|
|
|
|
import com.hankcs.hanlp.seg.Segment;
|
|
|
|
import com.hankcs.hanlp.seg.Segment;
|
|
|
|
import com.hankcs.hanlp.seg.common.Term;
|
|
|
|
import com.hankcs.hanlp.seg.common.Term;
|
|
|
|
import com.ruoyi.biemo.business.domain.Category;
|
|
|
|
import com.ruoyi.biemo.business.domain.*;
|
|
|
|
import com.ruoyi.biemo.business.domain.DocInfo;
|
|
|
|
|
|
|
|
import com.ruoyi.biemo.business.domain.EmotionResult;
|
|
|
|
|
|
|
|
import com.ruoyi.biemo.business.domain.WordCloudItem;
|
|
|
|
|
|
|
|
import com.ruoyi.biemo.business.service.CategoryService;
|
|
|
|
import com.ruoyi.biemo.business.service.CategoryService;
|
|
|
|
import com.ruoyi.biemo.business.service.DocInfoService;
|
|
|
|
import com.ruoyi.biemo.business.service.DocInfoService;
|
|
|
|
import com.ruoyi.biemo.core.page.Page;
|
|
|
|
import com.ruoyi.biemo.core.page.Page;
|
|
|
|
import com.ruoyi.biemo.core.page.PageFactory;
|
|
|
|
import com.ruoyi.biemo.core.page.PageFactory;
|
|
|
|
|
|
|
|
import com.ruoyi.biemo.mongodb.utils.MongoHelper;
|
|
|
|
import com.ruoyi.biemo.nlp.DependencyParserUtils;
|
|
|
|
import com.ruoyi.biemo.nlp.DependencyParserUtils;
|
|
|
|
import com.ruoyi.biemo.nlp.TextClassificationUtils;
|
|
|
|
import com.ruoyi.biemo.nlp.TextClassificationUtils;
|
|
|
|
import com.ruoyi.biemo.utils.MyObjects;
|
|
|
|
import com.ruoyi.biemo.utils.MyObjects;
|
|
|
@ -34,6 +32,7 @@ import org.springframework.data.mongodb.core.query.Update;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
import javax.swing.plaf.synth.SynthOptionPaneUI;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.io.IOException;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
@ -56,6 +55,27 @@ public class DocInfoController extends BaseController {
|
|
|
|
private DocInfoService docInfoService;
|
|
|
|
private DocInfoService docInfoService;
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private CategoryService categoryService;
|
|
|
|
private CategoryService categoryService;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private MongoHelper mongoHelper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/test")
|
|
|
|
|
|
|
|
public void test(){
|
|
|
|
|
|
|
|
List<Report> all2 = mongoHelper.findAll(Report.class);
|
|
|
|
|
|
|
|
System.out.println("ZZZ1:"+all2.size());
|
|
|
|
|
|
|
|
System.out.println("ZZZ11:"+all2.get(0).getId());
|
|
|
|
|
|
|
|
List<Category> all1 = mongoHelper.findAll(Category.class);
|
|
|
|
|
|
|
|
System.out.println("ZZZ2:"+all1.size());
|
|
|
|
|
|
|
|
System.out.println("ZZZ22:"+all1.get(0).getId());
|
|
|
|
|
|
|
|
List<DocInfo> all = mongoHelper.findAll(DocInfo.class);
|
|
|
|
|
|
|
|
System.out.println("ZZZ3:"+all.size());
|
|
|
|
|
|
|
|
System.out.println("ZZZ33:"+all.get(0).getId());
|
|
|
|
|
|
|
|
DocInfo byId1 = mongoTemplate.findById("648c3996656fae4c70ccde97", DocInfo.class);
|
|
|
|
|
|
|
|
System.out.println("BBBDDD:"+byId1);
|
|
|
|
|
|
|
|
System.out.println("BBBDDD:"+byId1.getId());
|
|
|
|
|
|
|
|
DocInfo byId = mongoHelper.findById("648c3996656fae4c70ccde97", DocInfo.class);
|
|
|
|
|
|
|
|
System.out.println("bbb:"+byId);
|
|
|
|
|
|
|
|
System.out.println("bbb:"+byId.getId());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询文章管理列表
|
|
|
|
* 查询文章管理列表
|
|
|
@ -65,6 +85,8 @@ public class DocInfoController extends BaseController {
|
|
|
|
public Page<DocInfo> list(DocInfo docInfo)
|
|
|
|
public Page<DocInfo> list(DocInfo docInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Page<DocInfo> page = docInfoService.selectDocInfoPage(docInfo,PageFactory.defaultPage());
|
|
|
|
Page<DocInfo> page = docInfoService.selectDocInfoPage(docInfo,PageFactory.defaultPage());
|
|
|
|
|
|
|
|
System.out.println(page.getRows().get(0));
|
|
|
|
|
|
|
|
List<DocInfo> rows = page.getRows();
|
|
|
|
page.getRows().forEach(doc->{
|
|
|
|
page.getRows().forEach(doc->{
|
|
|
|
Category category = new Category();
|
|
|
|
Category category = new Category();
|
|
|
|
category = categoryService.selectCategoryById(doc.getCateId());
|
|
|
|
category = categoryService.selectCategoryById(doc.getCateId());
|
|
|
|