|
@@ -6,6 +6,24 @@
|
|
|
package com.minto.app.task.controller;
|
|
|
|
|
|
|
|
|
+import java.io.*;
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
+import java.text.ParseException;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.util.*;
|
|
|
+import java.util.function.Function;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+import java.util.zip.ZipEntry;
|
|
|
+import java.util.zip.ZipOutputStream;
|
|
|
+import javax.servlet.ServletOutputStream;
|
|
|
+import javax.servlet.http.Cookie;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.Valid;
|
|
|
+import javax.validation.constraints.NotBlank;
|
|
|
+
|
|
|
import com.google.common.collect.Lists;
|
|
|
import com.google.common.collect.Maps;
|
|
|
import com.google.common.collect.Sets;
|
|
@@ -112,24 +130,6 @@ import org.springframework.util.CollectionUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
|
|
|
-import javax.servlet.ServletOutputStream;
|
|
|
-import javax.servlet.http.Cookie;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.validation.Valid;
|
|
|
-import javax.validation.constraints.NotBlank;
|
|
|
-import java.io.*;
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
-import java.text.ParseException;
|
|
|
-import java.text.SimpleDateFormat;
|
|
|
-import java.time.LocalDate;
|
|
|
-import java.time.LocalDateTime;
|
|
|
-import java.util.*;
|
|
|
-import java.util.function.Function;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-import java.util.zip.ZipEntry;
|
|
|
-import java.util.zip.ZipOutputStream;
|
|
|
-
|
|
|
import static com.minto.app.project.controller.ProjectController.createTaskMemberBean;
|
|
|
|
|
|
@Controller
|
|
@@ -1251,6 +1251,60 @@ public class TaskController extends BaseController {
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 暂存批示留言
|
|
|
+ * @param id
|
|
|
+ * @param request
|
|
|
+ * @param response
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/task/{id}/bbs/", method = RequestMethod.POST, params = { "m=tempSaveTaskProcess" })
|
|
|
+ public void saveTaskProcessTemp(@PathVariable("id") Long id , HttpServletRequest request,
|
|
|
+ HttpServletResponse response) throws Exception {
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ try{
|
|
|
+ TaskProcessSummaryTempBean tempBean = new TaskProcessSummaryTempBean();
|
|
|
+ tempBean.setTaskId(id);
|
|
|
+ tempBean.setPersonId(AppContext.currentUserId());
|
|
|
+ tempBean.setData(ReqUtil.getString(request, "data", ""));
|
|
|
+ taskManager.saveOrUpdateTaskProcessTemp(tempBean);
|
|
|
+ result.put("state", "success");
|
|
|
+ } catch(Exception e){
|
|
|
+ result.put("state", "error");
|
|
|
+ result.put("message", e.getMessage());
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ } finally{
|
|
|
+ RespUtil.rendJson(response, result);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 撤回批示留言
|
|
|
+ * @param id
|
|
|
+ * @param request
|
|
|
+ * @param response
|
|
|
+ * @return
|
|
|
+ * @throws Exception
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/task/{id}/bbs/", method = RequestMethod.POST, params = { "m=withdrawTaskProcess" })
|
|
|
+ public void withdrawTaskProcess(@PathVariable("id") Long id , HttpServletRequest request,HttpServletResponse response) throws Exception {
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ try{
|
|
|
+ Long itemId = ReqUtil.getLong(request, "itemId");
|
|
|
+ Long pid = AppContext.getCurrentUser().getId();
|
|
|
+ taskManager.deleteTaskProcess(itemId,pid);
|
|
|
+ result.put("state", "success");
|
|
|
+ } catch(Exception e){
|
|
|
+ result.put("state", "error");
|
|
|
+ result.put("message", e.getMessage());
|
|
|
+ log.error(e.getMessage(), e);
|
|
|
+ } finally{
|
|
|
+ RespUtil.rendJson(response, result);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
//汇报留言保存
|
|
|
@RequestMapping(value = "/task/{id}/saveReportLeave")
|
|
@@ -3645,7 +3699,8 @@ public class TaskController extends BaseController {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-
|
|
|
+ //移除暂存信息
|
|
|
+ taskManager.deleteTaskProcessTempByTaskAndPerson(Long.parseLong(id), pid);
|
|
|
} catch (Exception e) {
|
|
|
log.error(ExceptionUtil.printExceptionStackTrace(e));
|
|
|
result.put("state", "error");
|