|
@@ -3,7 +3,7 @@ package com.bofeng.wx.controller;
|
|
import com.bofeng.entity.QzTask;
|
|
import com.bofeng.entity.QzTask;
|
|
import com.bofeng.entity.QzTaskReply;
|
|
import com.bofeng.entity.QzTaskReply;
|
|
import com.bofeng.entity.SysUptownHouse;
|
|
import com.bofeng.entity.SysUptownHouse;
|
|
-import com.bofeng.entity.sysUptownUnit;
|
|
|
|
|
|
+import com.bofeng.service.HomeService;
|
|
import com.bofeng.service.QzTaskReplyService;
|
|
import com.bofeng.service.QzTaskReplyService;
|
|
import com.bofeng.service.QzTaskService;
|
|
import com.bofeng.service.QzTaskService;
|
|
import com.bofeng.service.RbService;
|
|
import com.bofeng.service.RbService;
|
|
@@ -37,6 +37,9 @@ public class YeWeiHuiController {
|
|
@Autowired
|
|
@Autowired
|
|
private QzTaskReplyService qzTaskReplyService;
|
|
private QzTaskReplyService qzTaskReplyService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private HomeService homeService;
|
|
|
|
+
|
|
@GetMapping("/yeweihui/home.html")
|
|
@GetMapping("/yeweihui/home.html")
|
|
public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId", required = false,defaultValue = "0") Long userId) {
|
|
public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId", required = false,defaultValue = "0") Long userId) {
|
|
|
|
|
|
@@ -53,7 +56,7 @@ public class YeWeiHuiController {
|
|
}
|
|
}
|
|
|
|
|
|
@GetMapping("/yeweihui/qiuzhuDetail.html")
|
|
@GetMapping("/yeweihui/qiuzhuDetail.html")
|
|
- public ModelAndView qiuzhudetail(@Pd(name = "taskId") Long taskId, ModelMap model) throws JsonProcessingException {
|
|
|
|
|
|
+ public ModelAndView qiuzhudetail(@Pd(name = "taskId") Long taskId,@Pd(name = "userId") Long userId, ModelMap model) throws JsonProcessingException {
|
|
|
|
|
|
QzTask task = qzTaskService.queryByTaskId(taskId);
|
|
QzTask task = qzTaskService.queryByTaskId(taskId);
|
|
// A业委会,B居委会,C物业,D志愿者
|
|
// A业委会,B居委会,C物业,D志愿者
|
|
@@ -90,6 +93,7 @@ public class YeWeiHuiController {
|
|
|
|
|
|
model.put("taskJson", new JsonWapper(task));
|
|
model.put("taskJson", new JsonWapper(task));
|
|
model.put("task", task);
|
|
model.put("task", task);
|
|
|
|
+ model.put("userId", "\""+userId+"\"");
|
|
|
|
|
|
return new ModelAndView("/yeweihui/qiuzhuDetail.ftl", model);
|
|
return new ModelAndView("/yeweihui/qiuzhuDetail.ftl", model);
|
|
}
|
|
}
|
|
@@ -97,12 +101,12 @@ public class YeWeiHuiController {
|
|
@PostMapping("/yeweihui/qiuzhu/queryTasksByStatus.json")
|
|
@PostMapping("/yeweihui/qiuzhu/queryTasksByStatus.json")
|
|
public Model queryTasksByStatus(@Pd(name = "status") Integer status) {
|
|
public Model queryTasksByStatus(@Pd(name = "status") Integer status) {
|
|
|
|
|
|
- // List<QzTask> taskList = qzTaskService.queryQzTask(status);
|
|
|
|
|
|
+ List<QzTask> taskList = qzTaskService.queryQzTaskByStatus(status);
|
|
|
|
|
|
- return Model.newSuccess(null);
|
|
|
|
|
|
+ return Model.newSuccess(taskList);
|
|
}
|
|
}
|
|
|
|
|
|
- @PostMapping("/yeweihui/qiuzhu/reply/add.json")
|
|
|
|
|
|
+ @PostMapping("/yeweihui/qiuzhu/reply/add.json")
|
|
public ModelOps replyQiuzhuInsert(QzTaskReply qzTaskReply) {
|
|
public ModelOps replyQiuzhuInsert(QzTaskReply qzTaskReply) {
|
|
|
|
|
|
Integer success = qzTaskReplyService.insertQzTaskReply(qzTaskReply);
|
|
Integer success = qzTaskReplyService.insertQzTaskReply(qzTaskReply);
|
|
@@ -124,9 +128,13 @@ public class YeWeiHuiController {
|
|
}
|
|
}
|
|
|
|
|
|
@PostMapping("/yeweihui/qiuzhu/list.json")
|
|
@PostMapping("/yeweihui/qiuzhu/list.json")
|
|
- public Model queryByHouseNumber(@Pd(name = "houseNumber") String houseNumber, @Pd(name = "status") Integer status) {
|
|
|
|
- List<QzTask> list = qzTaskService.queryByHouseNumber(houseNumber, status);
|
|
|
|
|
|
+ public Model queryByHouseNumber(String houseNumber, @Pd(name = "status") Integer status) {
|
|
|
|
|
|
|
|
+ if (houseNumber.length() <= 0) {
|
|
|
|
+ return Model.newSuccess(qzTaskService.queryQzTaskByStatus(status));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ List<QzTask> list = qzTaskService.queryByHouseNumber(houseNumber, status);
|
|
return Model.newSuccess(list);
|
|
return Model.newSuccess(list);
|
|
}
|
|
}
|
|
|
|
|