|
@@ -12,6 +12,7 @@ import api.common.pojo.param.system.DictParam;
|
|
|
import api.common.pojo.po.project.*;
|
|
|
import api.common.pojo.po.scene.ScenePackageSublistPO;
|
|
|
import api.common.pojo.vo.project.*;
|
|
|
+import api.common.pojo.vo.scene.RunProjectVO;
|
|
|
import api.common.util.JsonUtil;
|
|
|
import api.common.util.ObjectUtil;
|
|
|
import api.common.util.TimeUtil;
|
|
@@ -32,6 +33,7 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.io.*;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
@@ -45,7 +47,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
@Autowired
|
|
|
private SimulationProjectMapper simulationProjectMapper;
|
|
|
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private KafkaService kafkaService;
|
|
|
|
|
|
@Autowired
|
|
@@ -111,7 +113,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
}
|
|
|
if(!isEmpty(param.getCreateEndDate())){
|
|
|
String createEndDate = param.getCreateEndDate();
|
|
|
- Date endDate = getDate(createEndDate + " 11:59:59",1);
|
|
|
+ Date endDate = getDate(createEndDate + " 23:59:59",1);
|
|
|
if(endDate == null){
|
|
|
return new ResponseBodyVO(ResponseBodyVO.Response.CLIENT_FAILURE);
|
|
|
}
|
|
@@ -129,7 +131,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
}
|
|
|
if(!isEmpty(param.getFinishDateEnd())){
|
|
|
String finishDateEnd = param.getFinishDateEnd();
|
|
|
- Date enddate = getDate(finishDateEnd + " 11:59:59",1);
|
|
|
+ Date enddate = getDate(finishDateEnd + " 23:59:59",1);
|
|
|
if(enddate == null){
|
|
|
return new ResponseBodyVO(ResponseBodyVO.Response.CLIENT_FAILURE);
|
|
|
}
|
|
@@ -1475,7 +1477,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
/*
|
|
|
*//**
|
|
|
* 查询所有指标和得分
|
|
|
- * @param scenePackageId
|
|
|
+ * @param
|
|
|
*//*
|
|
|
private void selectScenePackageSubListAndSetScore(String pId, String scenePackageId, List<List<String>> resultArr, List<ScenePackageSubListVO> single){
|
|
|
|
|
@@ -1783,6 +1785,57 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
cloums.add(map);
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ //运行项目统计-折线图
|
|
|
+ @Override
|
|
|
+ public ResponseBodyVO selectRunProjectBySy() {
|
|
|
+ List<RunProjectVO> list=new ArrayList();
|
|
|
+ for(Integer i=6;i>-1;i--) {
|
|
|
+ RunProjectVO vo=new RunProjectVO();
|
|
|
+ Map<String,Object> params = TimeUtil.getPastTime(i);
|
|
|
+ params.put("createUserId", AuthUtil.getCurrentUserId());
|
|
|
+ Integer num = simulationProjectMapper.selectRunProjectBySy(params);
|
|
|
+ vo.setToDate(params.get("toDate").toString());
|
|
|
+ vo.setNum(num);
|
|
|
+ list.add(vo);
|
|
|
+ }
|
|
|
+ return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS,list);
|
|
|
+ }
|
|
|
+ //运行任务统计-折线图
|
|
|
+ @Override
|
|
|
+ public ResponseBodyVO selectRunTaskBySy() {
|
|
|
+ List<RunProjectVO> list=new ArrayList();
|
|
|
+ for(Integer i=6;i>-1;i--) {
|
|
|
+ RunProjectVO vo=new RunProjectVO();
|
|
|
+ Map<String,Object> params = TimeUtil.getPastTime(i);
|
|
|
+ params.put("createUserId", AuthUtil.getCurrentUserId());
|
|
|
+ Integer num = simulationProjectMapper.selectRunTaskBySy(params);
|
|
|
+ vo.setToDate(params.get("toDate").toString());
|
|
|
+ vo.setNum(num);
|
|
|
+ list.add(vo);
|
|
|
+ }
|
|
|
+ return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS,list);
|
|
|
+ }
|
|
|
+ //任务运行状态统计-饼图
|
|
|
+ @Override
|
|
|
+ public ResponseBodyVO selectRunTaskByState() {
|
|
|
+ Map<String,Object> params =new HashMap<>();
|
|
|
+ params.put("createUserId", AuthUtil.getCurrentUserId());
|
|
|
+ return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS, simulationProjectMapper.selectRunTaskByState(params));
|
|
|
+ }
|
|
|
+ //项目运行状态统计-饼图
|
|
|
+ @Override
|
|
|
+ public ResponseBodyVO selectRunProjectByState() {
|
|
|
+ Map<String,Object> params =new HashMap<>();
|
|
|
+ params.put("createUserId", AuthUtil.getCurrentUserId());
|
|
|
+ //10:未执行,20:执行中,30:执行完成,40:已中止
|
|
|
+ List list=simulationProjectMapper.selectRunProjectByState(params);
|
|
|
+ return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS, list);
|
|
|
+ }
|
|
|
+ //评测等级分布-饼图
|
|
|
+ @Override
|
|
|
+ public ResponseBodyVO selectEvaluationLevel() {
|
|
|
+ Map<String,Object> params =new HashMap<>();
|
|
|
+ params.put("createUserId", AuthUtil.getCurrentUserId());
|
|
|
+ return new ResponseBodyVO(ResponseBodyVO.Response.SUCCESS, simulationProjectMapper.selectEvaluationLevel(params));
|
|
|
+ }
|
|
|
}
|