|
@@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
+import java.util.ArrayList;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -46,25 +48,22 @@ public class ReportController {
|
|
|
return reportService.getReport(date, request);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* 新增或编辑报告
|
|
|
- * id 报告id 编辑时传
|
|
|
- * projectId 报告相关项目id 新增时不可为空
|
|
|
- * createDate 报告创建时间 新增时不可为空 yyyy-MM-dd
|
|
|
- * workingTime 工作时间
|
|
|
- * content 工作内容
|
|
|
+ * id 报告id 数组 编辑时需要指定
|
|
|
+ * projectId 报告相关项目id 数组 新增时需要指定
|
|
|
+ * workingTime 工作时间 数组
|
|
|
+ * content 工作内容 数组
|
|
|
+ * createDate 报告日期 传一个即可
|
|
|
*/
|
|
|
- @RequestMapping("/editReport")
|
|
|
- public HttpRespMsg editReport(Report[] report) {
|
|
|
- return reportService.editReport(report, request);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
// @RequestMapping("/editReport")
|
|
|
-// public HttpRespMsg editReport2(
|
|
|
-// String[] id, Integer[] projectId, String createTime, Double[] workingTime, String[] content) {
|
|
|
-// Report[] reportList = new
|
|
|
+// public HttpRespMsg editReport2(Integer[] id, Integer[] projectId, Double[] workingTime, String[] content,
|
|
|
+// String createDate) {
|
|
|
+// List<Report> reportList = new ArrayList<>();
|
|
|
+// for (int i = 0; i < reportList.projectId; i++) {
|
|
|
+// reportList[i].setId(id[i]).setCreatorId(request.getHeader("Token")).setContent();
|
|
|
+// }
|
|
|
+//
|
|
|
// return reportService.editReport(reportList, request);
|
|
|
// }
|
|
|
|