|
@@ -2,10 +2,15 @@ package com.usky.oa.controller.web;
|
|
|
|
|
|
|
|
|
|
import com.usky.common.core.bean.CommonPage;
|
|
import com.usky.common.core.bean.CommonPage;
|
|
|
|
+import com.usky.common.log.annotation.Log;
|
|
|
|
+import com.usky.common.log.enums.BusinessType;
|
|
|
|
+import com.usky.common.mybatis.core.CrudService;
|
|
import com.usky.oa.domain.OaDocument;
|
|
import com.usky.oa.domain.OaDocument;
|
|
import com.usky.oa.service.OaDocumentService;
|
|
import com.usky.oa.service.OaDocumentService;
|
|
import com.usky.oa.service.vo.OaApprovalCountVO;
|
|
import com.usky.oa.service.vo.OaApprovalCountVO;
|
|
|
|
+import org.apache.poi.ss.formula.functions.T;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.http.ResponseEntity;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
@@ -27,10 +32,11 @@ public class OaDocumentController {
|
|
@Autowired
|
|
@Autowired
|
|
private OaDocumentService oaDocumentService;
|
|
private OaDocumentService oaDocumentService;
|
|
|
|
|
|
|
|
+ // 我的申请
|
|
@GetMapping("/myApplication")
|
|
@GetMapping("/myApplication")
|
|
public CommonPage<OaDocument> myApplication(@RequestParam(value = "docNo", required = false) String docNo,
|
|
public CommonPage<OaDocument> myApplication(@RequestParam(value = "docNo", required = false) String docNo,
|
|
@RequestParam(value = "type", required = false) String type,
|
|
@RequestParam(value = "type", required = false) String type,
|
|
- @RequestParam(value = "status", required = false) Integer status,
|
|
|
|
|
|
+ @RequestParam(value = "docStatus", required = false) Integer status,
|
|
@RequestParam(value = "startTime", required = false) String startTime,
|
|
@RequestParam(value = "startTime", required = false) String startTime,
|
|
@RequestParam(value = "endTime", required = false) String endTime,
|
|
@RequestParam(value = "endTime", required = false) String endTime,
|
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
|
@RequestParam(value = "pageNum", required = false, defaultValue = "1") Integer pageNum,
|
|
@@ -38,16 +44,37 @@ public class OaDocumentController {
|
|
return oaDocumentService.myApplication(docNo, type, status, startTime, endTime, pageNum, pageSize);
|
|
return oaDocumentService.myApplication(docNo, type, status, startTime, endTime, pageNum, pageSize);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Log(title = "新增单据", businessType = BusinessType.INSERT)
|
|
|
|
+ @PostMapping("/add")
|
|
|
|
+ public void addDocument(@RequestBody Object oaDocument) {
|
|
|
|
+ oaDocumentService.addDoc(oaDocument);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 删除单据
|
|
|
|
+ @Log(title = "删除单据", businessType = BusinessType.DELETE)
|
|
|
|
+ @DeleteMapping("/delDoc/{docNo}")
|
|
|
|
+ public void delDocument(@PathVariable(value = "docNo") String docNo) {
|
|
|
|
+ oaDocumentService.delDocument(docNo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 单据详情
|
|
@GetMapping("/documentDetails")
|
|
@GetMapping("/documentDetails")
|
|
- public Object documentDetails(@RequestParam(value = "docNo") String docNo,
|
|
|
|
- @RequestParam(value = "type") String type) {
|
|
|
|
- return oaDocumentService.documentDetails(docNo, type);
|
|
|
|
|
|
+ public Object documentDetails(@RequestParam(value = "docNo") String docNo) {
|
|
|
|
+ return oaDocumentService.documentDetails(docNo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Log(title = "更新单据", businessType = BusinessType.UPDATE)
|
|
|
|
+ @GetMapping("/update")
|
|
|
|
+ public OaDocument approvalCount(@RequestBody OaDocument oaDocument) {
|
|
|
|
+ return oaDocumentService.updateDoc(oaDocument);
|
|
}
|
|
}
|
|
|
|
|
|
- @DeleteMapping("/delDocument")
|
|
|
|
- public void delDocument(@RequestParam(value = "type") String type,
|
|
|
|
- @RequestParam(value = "docNo") String docNo) {
|
|
|
|
- oaDocumentService.delDocument(type, docNo);
|
|
|
|
|
|
+ // 提交单据
|
|
|
|
+ @Log(title = "提交单据", businessType = BusinessType.UPDATE)
|
|
|
|
+ @PutMapping("/submit")
|
|
|
|
+ public void submit(@RequestParam(value = "docNo") String docNo,
|
|
|
|
+ @RequestParam(value = "docStatus") Integer status){
|
|
|
|
+ oaDocumentService.submit(docNo, status);
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|