|
@@ -7,6 +7,7 @@ import com.redxun.common.base.entity.JsonPageResult;
|
|
|
import com.redxun.common.base.entity.JsonResult;
|
|
|
import com.redxun.common.base.entity.QueryData;
|
|
|
|
|
|
+import com.redxun.knowledge.analysis.entity.dto.PersonVisitDto;
|
|
|
import com.redxun.knowledge.analysis.entity.page.MyJsonResult;
|
|
|
import com.redxun.knowledge.analysis.entity.vo.*;
|
|
|
import com.redxun.knowledge.analysis.service.*;
|
|
@@ -14,8 +15,12 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.BindingResult;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.validation.Valid;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -104,8 +109,23 @@ public class AnalysisCommonController {
|
|
|
|
|
|
@ApiOperation("组织创建知识数量(新)")
|
|
|
@GetMapping("organizationKnowledge")
|
|
|
- public JsonResult organizationKnowledge(@RequestParam("type") String type, @RequestParam("organizationId") String organizationId) {
|
|
|
- KnowledgeCompanyVo result = analysisCommonService.organizationKnowledge(type, organizationId);
|
|
|
+ public JsonResult organizationKnowledge(@RequestParam(value = "type",required = false) String type,
|
|
|
+ @RequestParam("organizationId") String organizationId,
|
|
|
+ @RequestParam(value = "createTime",required = false) String createTime,
|
|
|
+ @RequestParam(value = "endTime",required = false) String endTime) {
|
|
|
+ KnowledgeCompanyVo result = analysisCommonService.organizationKnowledge(type, organizationId,createTime,endTime,null);
|
|
|
+ return JsonResult.getSuccessResult(result);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperation("人员创建知识数量")
|
|
|
+ @PostMapping("personKnowledge")
|
|
|
+ public JsonResult personKnowledge(@RequestBody @Valid PersonVisitDto personVisitDto,BindingResult validResult) {
|
|
|
+ JsonResult jsonResult = JsonResult.getSuccessResult("");
|
|
|
+ if (validResult.hasErrors()) {
|
|
|
+ return jsonResult.setMessage("组织Id不能为空");
|
|
|
+ }
|
|
|
+ KnowledgeCompanyVo result = analysisCommonService.personKnowledge(personVisitDto);
|
|
|
return JsonResult.getSuccessResult(result);
|
|
|
}
|
|
|
|
|
@@ -143,9 +163,22 @@ public class AnalysisCommonController {
|
|
|
|
|
|
@ApiOperation("组织创建和访问专辑数量(新)")
|
|
|
@GetMapping("organizationAlbum")
|
|
|
- public JsonResult organizationAlbum(@RequestParam("type") String type,
|
|
|
- @RequestParam("organizationId") String organizationId) {
|
|
|
- AlbumCompanyVo result = analysisAlbumService.organizationAlbum(type, organizationId);
|
|
|
+ public JsonResult organizationAlbum(@RequestParam(value = "type",required = false) String type,
|
|
|
+ @RequestParam("organizationId") String organizationId,
|
|
|
+ @RequestParam(value = "createTime",required = false) String createTime,
|
|
|
+ @RequestParam(value = "endTime",required = false) String endTime) {
|
|
|
+ AlbumCompanyVo result = analysisAlbumService.organizationAlbum(type, organizationId,createTime,endTime,null);
|
|
|
+ return JsonResult.getSuccessResult(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("人员创建和访问专辑数量")
|
|
|
+ @PostMapping("personAlbum")
|
|
|
+ public JsonResult personAlbum(@RequestBody @Valid PersonVisitDto personVisitDto,BindingResult validResult) {
|
|
|
+ JsonResult jsonResult = JsonResult.getSuccessResult("");
|
|
|
+ if (validResult.hasErrors()) {
|
|
|
+ return jsonResult.setMessage("组织Id不能为空");
|
|
|
+ }
|
|
|
+ AlbumCompanyVo result = analysisAlbumService.personAlbum(personVisitDto);
|
|
|
return JsonResult.getSuccessResult(result);
|
|
|
}
|
|
|
|
|
@@ -181,8 +214,22 @@ public class AnalysisCommonController {
|
|
|
|
|
|
@ApiOperation("组织创建和访问地图数量(新)")
|
|
|
@GetMapping("organizationMap")
|
|
|
- public JsonResult organizationMap(@RequestParam("type") String type, @RequestParam("organizationId") String organizationId) {
|
|
|
- MapCompanyVo result = analysisMapService.organizationMap(type, organizationId);
|
|
|
+ public JsonResult organizationMap(@RequestParam(value = "type",required = false) String type,
|
|
|
+ @RequestParam("organizationId") String organizationId,
|
|
|
+ @RequestParam(value = "createTime",required = false) String createTime,
|
|
|
+ @RequestParam(value = "endTime",required = false) String endTime) {
|
|
|
+ MapCompanyVo result = analysisMapService.organizationMap(type, organizationId,createTime,endTime,null);
|
|
|
+ return JsonResult.getSuccessResult(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("人员创建和访问地图数量")
|
|
|
+ @PostMapping("personMap")
|
|
|
+ public JsonResult personMap(@RequestBody @Valid PersonVisitDto personVisitDto,BindingResult validResult) {
|
|
|
+ JsonResult jsonResult = JsonResult.getSuccessResult("");
|
|
|
+ if (validResult.hasErrors()) {
|
|
|
+ return jsonResult.setMessage("组织Id不能为空");
|
|
|
+ }
|
|
|
+ MapCompanyVo result = analysisMapService.personMap(personVisitDto);
|
|
|
return JsonResult.getSuccessResult(result);
|
|
|
}
|
|
|
|
|
@@ -205,8 +252,22 @@ public class AnalysisCommonController {
|
|
|
|
|
|
@ApiOperation("组织访问量(新)")
|
|
|
@GetMapping("organizationSearch")
|
|
|
- public JsonResult organizationSearch(@RequestParam("type") String type, @RequestParam("organizationId") String organizationId) {
|
|
|
- OrganizationSearchVo result = analysisSearchService.organizationSearch(type, organizationId);
|
|
|
+ public JsonResult organizationSearch(@RequestParam(value = "type",required = false) String type,
|
|
|
+ @RequestParam("organizationId") String organizationId,
|
|
|
+ @RequestParam(value = "createTime",required = false) String createTime,
|
|
|
+ @RequestParam(value = "endTime",required = false) String endTime) {
|
|
|
+ OrganizationSearchVo result = analysisSearchService.organizationSearch(type, organizationId,createTime,endTime,null);
|
|
|
+ return JsonResult.getSuccessResult(result);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("人员访问量")
|
|
|
+ @PostMapping("personSearch")
|
|
|
+ public JsonResult personSearch(@RequestBody @Valid PersonVisitDto personVisitDto,BindingResult validResult) {
|
|
|
+ JsonResult jsonResult = JsonResult.getSuccessResult("");
|
|
|
+ if (validResult.hasErrors()) {
|
|
|
+ return jsonResult.setMessage("组织Id不能为空");
|
|
|
+ }
|
|
|
+ OrganizationSearchVo result = analysisSearchService.personSearch(personVisitDto);
|
|
|
return JsonResult.getSuccessResult(result);
|
|
|
}
|
|
|
|
|
@@ -243,8 +304,22 @@ public class AnalysisCommonController {
|
|
|
|
|
|
@ApiOperation("组织访问量(新)")
|
|
|
@GetMapping("organizationVisit")
|
|
|
- public JsonResult organizationVisit(@RequestParam("type") String type, @RequestParam("organizationId") String organizationId) {
|
|
|
- SynthesizeCompanyVo result = analysisSynthesizeService.organizationVisit(type, organizationId);
|
|
|
+ public JsonResult organizationVisit(@RequestParam(value = "type",required = false) String type,
|
|
|
+ @RequestParam("organizationId") String organizationId,
|
|
|
+ @RequestParam(value = "createTime",required = false) String createTime,
|
|
|
+ @RequestParam(value = "endTime",required = false) String endTime) {
|
|
|
+ SynthesizeCompanyVo result = analysisSynthesizeService.organizationVisit(type, organizationId,createTime,endTime,null);
|
|
|
return JsonResult.getSuccessResult(result);
|
|
|
}
|
|
|
+
|
|
|
+ @ApiOperation("人员访问量")
|
|
|
+ @PostMapping("personVisit")
|
|
|
+ public JsonResult personVisit(@RequestBody @Valid PersonVisitDto personVisitDto, BindingResult validResult) {
|
|
|
+ JsonResult jsonResult = JsonResult.getSuccessResult("");
|
|
|
+ if (validResult.hasErrors()) {
|
|
|
+ return jsonResult.setMessage("组织Id不能为空");
|
|
|
+ }
|
|
|
+ SynthesizeCompanyVo result = analysisSynthesizeService.personVisit(personVisitDto);
|
|
|
+ return jsonResult.setData(result);
|
|
|
+ }
|
|
|
}
|