use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class PlanAction method delete.
@AuthPassport(validate = true)
@RequestMapping(value = "delete", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> delete(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
Long id = json.getLong("id");
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestPlan po = planService.delete(id, userVo.getId());
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class ReportAction method project.
@AuthPassport(validate = true)
@RequestMapping(value = "project", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> project(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
Map<String, Object> data = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
Long id = json.getLong("projectId");
TestProject prj = (TestProject) reportService.get(TestProject.class, id);
Map<String, List<Object>> designReport = reportService.chart_design_progress_by_project(id, prj.getType(), 14);
Map<String, List<Object>> exeReport = reportService.chart_excution_process_by_project(id, prj.getType(), 14);
data.put("design", designReport);
data.put("exe", exeReport);
ret.put("data", data);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class RunAction method close.
@AuthPassport(validate = true)
@RequestMapping(value = "close", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> close(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
Long id = json.getLong("id");
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestRun po = runService.closePers(id, userVo.getId());
runService.closePlanIfAllRunClosedPers(po.getPlanId());
TestRunVo vo = runService.genVo(po);
ret.put("data", vo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class RunAction method delete.
@AuthPassport(validate = true)
@RequestMapping(value = "delete", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> delete(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
Long id = json.getLong("id");
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestRun po = runService.delete(id, userVo.getId());
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
use of com.ngtesting.platform.vo.UserVo in project ngtesting-platform by aaronchen2k.
the class RunAction method save.
@AuthPassport(validate = true)
@RequestMapping(value = "save", method = RequestMethod.POST)
@ResponseBody
public Map<String, Object> save(HttpServletRequest request, @RequestBody JSONObject json) {
Map<String, Object> ret = new HashMap<String, Object>();
UserVo userVo = (UserVo) request.getSession().getAttribute(Constant.HTTP_SESSION_USER_KEY);
TestRun po = runService.save(json, userVo);
TestRunVo vo = runService.genVo(po);
optFacade.opt(WsConstant.WS_TODO, userVo.getId().toString());
ret.put("data", vo);
ret.put("code", Constant.RespCode.SUCCESS.getCode());
return ret;
}
Aggregations