|
@@ -0,0 +1,74 @@
|
|
|
+package com.imed.costaccount.web;
|
|
|
+
|
|
|
+import com.imed.costaccount.common.util.Result;
|
|
|
+import com.imed.costaccount.model.CostCostingCollection;
|
|
|
+import com.imed.costaccount.model.User;
|
|
|
+import com.imed.costaccount.service.CostCostingCollectionService;
|
|
|
+import org.apache.shiro.SecurityUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.Arrays;
|
|
|
+
|
|
|
+
|
|
|
+/**
|
|
|
+ * 成本数据归集后列表
|
|
|
+ *
|
|
|
+ * @author KCYG
|
|
|
+ * @date 2021-08-18 15:27:02
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/costAccount/costcostingcollection")
|
|
|
+public class CostCostingCollectionController {
|
|
|
+ @Autowired
|
|
|
+ private CostCostingCollectionService costCostingCollectionService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 分页查询列表
|
|
|
+ * 查询的是
|
|
|
+ */
|
|
|
+ @RequestMapping("/list")
|
|
|
+ public Result list(@RequestParam(value = "current", defaultValue = "1") Integer current,
|
|
|
+ @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){
|
|
|
+ User user = (User) SecurityUtils.getSubject().getPrincipal();
|
|
|
+ return Result.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 信息
|
|
|
+ */
|
|
|
+ @RequestMapping("/info/{id}")
|
|
|
+ public Result info(@PathVariable("id") Long id){
|
|
|
+ CostCostingCollection costCostingCollection = costCostingCollectionService.getById(id);
|
|
|
+ return Result.ok(costCostingCollection);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 保存
|
|
|
+ */
|
|
|
+ @RequestMapping("/save")
|
|
|
+ public Result save(@RequestBody CostCostingCollection costCostingCollection){
|
|
|
+ costCostingCollectionService.save(costCostingCollection);
|
|
|
+ return Result.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改
|
|
|
+ */
|
|
|
+ @RequestMapping("/update")
|
|
|
+ public Result update(@RequestBody CostCostingCollection costCostingCollection){
|
|
|
+ costCostingCollectionService.updateById(costCostingCollection);
|
|
|
+ return Result.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除
|
|
|
+ */
|
|
|
+ @RequestMapping("/delete")
|
|
|
+ public Result delete(@RequestBody Long[] ids){
|
|
|
+ costCostingCollectionService.removeByIds(Arrays.asList(ids));
|
|
|
+ return Result.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+}
|