|
@@ -8,10 +8,7 @@ import io.swagger.annotations.ApiImplicitParam
|
|
|
import io.swagger.annotations.ApiImplicitParams
|
|
|
import io.swagger.annotations.ApiOperation
|
|
|
import org.springframework.beans.factory.annotation.Autowired
|
|
|
-import org.springframework.web.bind.annotation.PostMapping
|
|
|
-import org.springframework.web.bind.annotation.RequestBody
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping
|
|
|
-import org.springframework.web.bind.annotation.RestController
|
|
|
+import org.springframework.web.bind.annotation.*
|
|
|
|
|
|
@Api(tags = ["分计划"])
|
|
|
@RestController
|
|
@@ -35,6 +32,21 @@ class PlanningItemAction {
|
|
|
return Reply(result)
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("更新子计划项")
|
|
|
+ @PostMapping("update")
|
|
|
+ fun update(id: Long, name: String, content: String, status: Int,
|
|
|
+ @RequestParam(required = false) remark: String?): Reply<Any> {
|
|
|
+ val result = planningItemService.update(id, name, content, status, remark)
|
|
|
+ return Reply(result)
|
|
|
+ }
|
|
|
+
|
|
|
+ @ApiOperation("更新子计划状态")
|
|
|
+ @PostMapping("evaluate")
|
|
|
+ fun evaluate(id: Long, evaluation: String): Reply<Any> {
|
|
|
+ val result = planningItemService.evaluate(id,evaluation)
|
|
|
+ return Reply(result)
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation("查找给定年度计划或者季度计划的所有分计划")
|
|
|
@PostMapping("findByPlanningIdAndType")
|
|
|
fun findByPlanningIdAndType(planningId: Long, type: Int): Reply<List<PlanningItem>> {
|
|
@@ -58,8 +70,10 @@ class PlanningItemAction {
|
|
|
|
|
|
@ApiOperation("删除给定年度计划或者季度计划的所有分计划")
|
|
|
@PostMapping("deleteByPlanningIdAndType")
|
|
|
- @ApiImplicitParams(ApiImplicitParam(name = "planningId", value = "计划Id", paramType = "query"),
|
|
|
- ApiImplicitParam(name = "type", value = "计划类型", paramType = "query"))
|
|
|
+ @ApiImplicitParams(
|
|
|
+ ApiImplicitParam(name = "planningId", value = "计划Id", paramType = "query"),
|
|
|
+ ApiImplicitParam(name = "type", value = "计划类型", paramType = "query")
|
|
|
+ )
|
|
|
fun deleteItem(planningId: Long, type: Int): Reply<Any> {
|
|
|
val result = planningItemService.deleteByPlanningIdAndType(planningId, type)
|
|
|
return Reply(result)
|