|
@@ -1,8 +1,6 @@
|
|
|
package com.hssx.cloudmodel.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
-import com.hssx.cloudmodel.entity.Factory;
|
|
|
import com.hssx.cloudmodel.entity.Project;
|
|
|
import com.hssx.cloudmodel.entity.User;
|
|
|
import com.hssx.cloudmodel.service.ProjectService;
|
|
@@ -13,8 +11,8 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
-
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
@@ -76,11 +74,26 @@ public class ProjectController{
|
|
|
@ApiOperation("项目列表")
|
|
|
@RequestMapping("/list")
|
|
|
@ResponseBody
|
|
|
- public HttpRespMsg handOutProject(String keyName, PageUtil page, String token) {
|
|
|
+ public HttpRespMsg handOutProject(@RequestParam(required = false) String keyName, PageUtil page, String token) {
|
|
|
User currentUser = userService.getOne(new QueryWrapper<User>().eq("head_imgurl", token));
|
|
|
HttpRespMsg msg = projectService.getList(keyName,page,currentUser);
|
|
|
return msg;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 分配项目
|
|
|
+ * 参数: companyId 公司id,subordinateType 所属方 0-供应商 1-客户
|
|
|
+ * 以上两参数可以都不传,或者选择传其中一个
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("获取用户列表")
|
|
|
+ @RequestMapping("/getUserList")
|
|
|
+ @ResponseBody
|
|
|
+ public HttpRespMsg getUserByCompanyIdOrSubordinateType(User user) {
|
|
|
+ HttpRespMsg msg = projectService.getUserByCompanyIdOrSubordinateType(user);
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|