|
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.mooctest.service.AuditTaskService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.ui.Model;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -13,17 +14,20 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
@Controller
|
|
|
public class AuditController {
|
|
|
-
|
|
|
+ @Value("${report.host}")
|
|
|
+ String reportHost ;
|
|
|
@Autowired
|
|
|
AuditTaskService auditTaskService;
|
|
|
|
|
|
@GetMapping("/addTask")
|
|
|
public String gettest (Model model){
|
|
|
+ model.addAttribute("reportHost",reportHost);
|
|
|
return "addTask";
|
|
|
}
|
|
|
|
|
|
@GetMapping("/reloadTask")
|
|
|
public String reloadTask ( Model model ){
|
|
|
+ model.addAttribute("reportHost",reportHost);
|
|
|
return "addTask";
|
|
|
}
|
|
|
|
|
@@ -33,6 +37,7 @@ public class AuditController {
|
|
|
public String auditTask ( Model model){
|
|
|
JSONArray jsonArray = auditTaskService.getTaskData(); // 所有的数据。
|
|
|
model.addAttribute("tasks",jsonArray);
|
|
|
+ model.addAttribute("reportHost",reportHost);
|
|
|
return "audit_task_list";
|
|
|
}
|
|
|
|
|
@@ -40,6 +45,7 @@ public class AuditController {
|
|
|
public String changeTask ( Model model ,@RequestParam("id") String id ){
|
|
|
JSONObject data = auditTaskService.getSingleTask(id);
|
|
|
model.addAttribute("data",data);
|
|
|
+ model.addAttribute("reportHost",reportHost);
|
|
|
return "changeAuditTask";
|
|
|
}
|
|
|
|