|
@@ -5,13 +5,12 @@ import com.migao.config.response.PageBean;
|
|
|
import com.migao.config.response.ResponseBean;
|
|
|
import com.migao.config.validation.Insert;
|
|
|
import com.migao.config.validation.Update;
|
|
|
-import com.migao.entity.vo.req.MilestoneInsertReq;
|
|
|
-import com.migao.entity.vo.req.MilestonePageQueryReq;
|
|
|
-import com.migao.entity.vo.req.MilestoneQueryReq;
|
|
|
-import com.migao.entity.vo.req.MilestoneUpdateReq;
|
|
|
+import com.migao.entity.vo.req.*;
|
|
|
import com.migao.entity.vo.res.MilestoneQueryRes;
|
|
|
+import com.migao.entity.vo.res.ProjectQueryRes;
|
|
|
import com.migao.service.MilestoneService;
|
|
|
|
|
|
+import com.migao.service.PurchasingApprovalService;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiOperationSupport;
|
|
@@ -28,6 +27,9 @@ public class MilestoneController {
|
|
|
@Resource
|
|
|
private MilestoneService milestoneService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private PurchasingApprovalService purchasingApprovalService;
|
|
|
+
|
|
|
@ApiOperationSupport(order = 2)
|
|
|
@ApiOperation("新增")
|
|
|
@PostMapping(value = "/insert")
|
|
@@ -64,12 +66,31 @@ public class MilestoneController {
|
|
|
return milestoneService.update(milestoneUpdateReq);
|
|
|
}
|
|
|
|
|
|
- @ApiOperationSupport(order =1)
|
|
|
- @ApiOperation("分页查")
|
|
|
+ @ApiOperationSupport(order = 1)
|
|
|
+ @ApiOperation("分页查询(所有子项目)")
|
|
|
@PostMapping(value = "/pageQuery")
|
|
|
- public ResponseBean<PageBean<MilestoneQueryRes>> pageQuery(
|
|
|
+ public ResponseBean<PageBean<ProjectQueryRes>> pageQuery(
|
|
|
+ @RequestBody PurchasingApprovalPageQueryReq purchasingApprovalPageQueryReq
|
|
|
+ ) {
|
|
|
+ return purchasingApprovalService.pageQuery(purchasingApprovalPageQueryReq);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
+ @ApiOperation("导入")
|
|
|
+ @PostMapping(value = "/importData")
|
|
|
+ public ResponseBean<?> importData(
|
|
|
+ @RequestParam("fileId") String fileId
|
|
|
+ ) {
|
|
|
+ return milestoneService.importData(fileId);
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperationSupport(order = 9)
|
|
|
+ @ApiOperation("导出")
|
|
|
+ @PostMapping(value = "/export")
|
|
|
+ public ResponseBean<?> export(
|
|
|
@RequestBody MilestonePageQueryReq milestonePageQueryReq
|
|
|
) {
|
|
|
- return milestoneService.pageQuery(milestonePageQueryReq);
|
|
|
+ return milestoneService.export(milestonePageQueryReq);
|
|
|
}
|
|
|
}
|