|
@@ -1,42 +1,27 @@
|
|
|
package org.jeecg.modules.projectCost.controller;
|
|
|
|
|
|
-import java.util.Arrays;
|
|
|
-import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.UnsupportedEncodingException;
|
|
|
-import java.net.URLDecoder;
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import org.jeecg.common.api.vo.Result;
|
|
|
-import org.jeecg.common.system.query.QueryGenerator;
|
|
|
-import org.jeecg.common.util.oConvertUtils;
|
|
|
-import org.jeecg.modules.projectCost.entity.ProjectCost;
|
|
|
-import org.jeecg.modules.projectCost.service.IProjectCostService;
|
|
|
-
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-
|
|
|
-import org.jeecgframework.poi.excel.ExcelImportUtil;
|
|
|
-import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
|
|
-import org.jeecgframework.poi.excel.entity.ExportParams;
|
|
|
-import org.jeecgframework.poi.excel.entity.ImportParams;
|
|
|
-import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
+import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
import org.jeecg.common.system.base.controller.JeecgController;
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
+import org.jeecg.modules.projectCost.entity.ProjectCost;
|
|
|
+import org.jeecg.modules.projectCost.service.IProjectCostService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
-import org.springframework.web.multipart.MultipartHttpServletRequest;
|
|
|
import org.springframework.web.servlet.ModelAndView;
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
-import io.swagger.annotations.Api;
|
|
|
-import io.swagger.annotations.ApiOperation;
|
|
|
-import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
|
|
|
- /**
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
* @Description: 项目成本
|
|
|
* @Author: jeecg-boot
|
|
|
* @Date: 2023-08-15
|
|
@@ -48,8 +33,19 @@ import org.jeecg.common.aspect.annotation.AutoLog;
|
|
|
@Slf4j
|
|
|
public class ProjectCostController extends JeecgController<ProjectCost, IProjectCostService> {
|
|
|
@Autowired
|
|
|
+ @SuppressWarnings("all")
|
|
|
private IProjectCostService projectCostService;
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 对比
|
|
|
+ */
|
|
|
+ @ApiOperation(value="项目成本——对比", notes="项目成本——对比")
|
|
|
+ @GetMapping(value = "/compareList")
|
|
|
+ public List<ProjectCost> compareList(String ids) {
|
|
|
+ List<ProjectCost> list = projectCostService.compareListByIds(Arrays.asList(ids.split(",")));
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 分页列表查询
|
|
|
*
|
|
@@ -71,7 +67,7 @@ public class ProjectCostController extends JeecgController<ProjectCost, IProject
|
|
|
IPage<ProjectCost> pageList = projectCostService.page(page, queryWrapper);
|
|
|
return Result.OK(pageList);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 添加
|
|
|
*
|
|
@@ -86,7 +82,7 @@ public class ProjectCostController extends JeecgController<ProjectCost, IProject
|
|
|
projectCostService.save(projectCost);
|
|
|
return Result.OK("添加成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 编辑
|
|
|
*
|
|
@@ -101,7 +97,7 @@ public class ProjectCostController extends JeecgController<ProjectCost, IProject
|
|
|
projectCostService.updateById(projectCost);
|
|
|
return Result.OK("编辑成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id删除
|
|
|
*
|
|
@@ -116,7 +112,7 @@ public class ProjectCostController extends JeecgController<ProjectCost, IProject
|
|
|
projectCostService.removeById(id);
|
|
|
return Result.OK("删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 批量删除
|
|
|
*
|
|
@@ -131,7 +127,7 @@ public class ProjectCostController extends JeecgController<ProjectCost, IProject
|
|
|
this.projectCostService.removeByIds(Arrays.asList(ids.split(",")));
|
|
|
return Result.OK("批量删除成功!");
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 通过id查询
|
|
|
*
|