|
@@ -7,9 +7,11 @@ import com.sooka.common.core.controller.BaseController;
|
|
|
import com.sooka.common.core.domain.AjaxResult;
|
|
|
import com.sooka.framework.util.ShiroUtils;
|
|
|
import com.sooka.system.domain.SysDept;
|
|
|
+import com.sooka.system.domain.SysDictData;
|
|
|
import com.sooka.system.domain.TUInterfaceinfo;
|
|
|
import com.sooka.system.service.ISysDeptService;
|
|
|
import com.sooka.system.service.ITUInterfaceinfoService;
|
|
|
+import com.sooka.system.utils.DictUtils;
|
|
|
import com.util.StaticScheduleTask;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -55,6 +57,8 @@ public class VisualizationController extends BaseController {
|
|
|
/**查询接口数量**/
|
|
|
TUInterfaceinfo shareCount = interfaceinfoService.getShareCountByDeptId(id.toString());
|
|
|
|
|
|
+ /**查询归集数据分析**/
|
|
|
+
|
|
|
mmap.put("deptId",sysDept.getDeptId());
|
|
|
mmap.put("deptName",sysDept.getDeptName());
|
|
|
mmap.put("interfaceList",interfaceList);
|
|
@@ -63,6 +67,55 @@ public class VisualizationController extends BaseController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 查询 接口接口占比-子页
|
|
|
+ * */
|
|
|
+ @PostMapping("subPercent")
|
|
|
+ @ResponseBody
|
|
|
+ public JSONObject getSubPercent(String deptId,String year){
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ List<TUInterfaceinfo> list_percent = interfaceinfoService.getSubPercent(deptId,year);
|
|
|
+ jsonObject.put("percent",list_percent);
|
|
|
+ return jsonObject;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询 接口审批分析-子页 自动获取近三年
|
|
|
+ * */
|
|
|
+ @PostMapping("subJkspfx")
|
|
|
+ @ResponseBody
|
|
|
+ public JSONObject subJkspfx(String deptId){
|
|
|
+ JSONObject jsonObject = new JSONObject();
|
|
|
+ //年份数据
|
|
|
+ jsonObject.put("years",getYears());
|
|
|
+ //类别数组
|
|
|
+ List<SysDictData> list = DictUtils.getDictCache("share_type");
|
|
|
+ String[] types = new String[list.size()];
|
|
|
+ for(int i=0;i<list.size();i++){
|
|
|
+ types[i] = list.get(i).getDictLabel();
|
|
|
+ }
|
|
|
+ jsonObject.put("types",types);
|
|
|
+ for(int i=0;i<getYears().length;i++){
|
|
|
+ TUInterfaceinfo subJkspfx = interfaceinfoService.getSubJkspfx(deptId,getYears()[i]);
|
|
|
+ String[] jkspfxData = new String[4];
|
|
|
+ jkspfxData[0] = subJkspfx.getShareType1();
|
|
|
+ jkspfxData[1] = subJkspfx.getShareType2();
|
|
|
+ jkspfxData[2] = subJkspfx.getShareType3();
|
|
|
+ jkspfxData[3] = subJkspfx.getShareType4();
|
|
|
+ jsonObject.put(getYears()[i],jkspfxData);
|
|
|
+ }
|
|
|
+ return jsonObject;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**获取当前年和前两年的年份**/
|
|
|
+ private String[] getYears() {
|
|
|
+ String[] arr = new String[3];
|
|
|
+ for(int i=0;i<arr.length;i++){
|
|
|
+ arr[i] = StaticScheduleTask.getYears(i-2);
|
|
|
+ }
|
|
|
+ return arr;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 查询 接口数量和接口占比
|
|
|
* */
|
|
|
@PostMapping("countAndPercent")
|