|
@@ -4,6 +4,7 @@ import com.bofeng.entity.QzTask;
|
|
|
import com.bofeng.entity.QzTaskReply;
|
|
|
import com.bofeng.entity.SysUptownHouse;
|
|
|
import com.bofeng.entity.sysUptownUnit;
|
|
|
+import com.bofeng.service.HomeService;
|
|
|
import com.bofeng.service.QzTaskReplyService;
|
|
|
import com.bofeng.service.QzTaskService;
|
|
|
import com.bofeng.service.RbService;
|
|
@@ -14,7 +15,6 @@ import com.yvan.ModelOps;
|
|
|
import com.yvan.mvc.Pd;
|
|
|
import com.yvan.platform.JsonWapper;
|
|
|
import com.yvan.platform.YvanUtil;
|
|
|
-import org.apache.ibatis.annotations.Param;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.ui.ModelMap;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
@@ -37,6 +37,9 @@ public class YeWeiHuiController {
|
|
|
@Autowired
|
|
|
private QzTaskReplyService qzTaskReplyService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private HomeService homeService;
|
|
|
+
|
|
|
@GetMapping("/yeweihui/home.html")
|
|
|
public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId", required = false,defaultValue = "0") Long userId) {
|
|
|
|
|
@@ -44,7 +47,7 @@ public class YeWeiHuiController {
|
|
|
queryParam.put("userId", "12345677");
|
|
|
queryParam.put("statistics", "M");
|
|
|
|
|
|
- List<QzTask> taskList = qzTaskService.selectAll();
|
|
|
+ List<QzTask> taskList = qzTaskService.selectAll(2L);
|
|
|
List<sysUptownUnit> rbList = rbService.selectAll(1224706869998772226L);
|
|
|
model.put("taskList", YvanUtil.toJsonPretty(taskList));
|
|
|
model.put("rbList", YvanUtil.toJsonPretty(rbList));
|
|
@@ -53,7 +56,7 @@ public class YeWeiHuiController {
|
|
|
}
|
|
|
|
|
|
@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);
|
|
|
// A业委会,B居委会,C物业,D志愿者
|
|
@@ -90,6 +93,7 @@ public class YeWeiHuiController {
|
|
|
|
|
|
model.put("taskJson", new JsonWapper(task));
|
|
|
model.put("task", task);
|
|
|
+ model.put("userId", "\""+userId+"\"");
|
|
|
|
|
|
return new ModelAndView("/yeweihui/qiuzhuDetail.ftl", model);
|
|
|
}
|
|
@@ -97,12 +101,12 @@ public class YeWeiHuiController {
|
|
|
@PostMapping("/yeweihui/qiuzhu/queryTasksByStatus.json")
|
|
|
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) {
|
|
|
|
|
|
Integer success = qzTaskReplyService.insertQzTaskReply(qzTaskReply);
|
|
@@ -124,9 +128,13 @@ public class YeWeiHuiController {
|
|
|
}
|
|
|
|
|
|
@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);
|
|
|
}
|
|
|
|