|
@@ -10,18 +10,11 @@ import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
import com.hssx.cloudmodel.util.PageUtil;
|
|
import com.hssx.cloudmodel.util.PageUtil;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
-import org.springframework.web.multipart.MultipartFile;
|
|
|
|
-
|
|
|
|
import javax.servlet.http.HttpServletRequest;
|
|
import javax.servlet.http.HttpServletRequest;
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
|
-import java.io.File;
|
|
|
|
-import java.io.IOException;
|
|
|
|
-import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -39,13 +32,12 @@ public class ProjectController {
|
|
/**
|
|
/**
|
|
* 添加/修改项目
|
|
* 添加/修改项目
|
|
* 参数:projectName 项目名 ,customerCompanyIds 客户方公司ids "1,2,3",customerCompanyNames 客户方公司名字“1,2,3”
|
|
* 参数:projectName 项目名 ,customerCompanyIds 客户方公司ids "1,2,3",customerCompanyNames 客户方公司名字“1,2,3”
|
|
- * modelIds 模具ids 如 :"1,2,3"
|
|
|
|
|
|
+ * modelIds 模具ids 如 :"1,2,3",managerId 项目经理id ,manager 项目经理name
|
|
* 修改时/添加时分配项目: id 项目id ,userIds 参与项目的用户id 如:“1,2,3”(多个或者一个)()
|
|
* 修改时/添加时分配项目: id 项目id ,userIds 参与项目的用户id 如:“1,2,3”(多个或者一个)()
|
|
* customerApproverId 生产方审批人id,ownerApproverId 资产方审批人id
|
|
* customerApproverId 生产方审批人id,ownerApproverId 资产方审批人id
|
|
* managerId 项目经理id ,manager 项目经理name ,modelIds 模具ids 如 :"1,2,3"
|
|
* managerId 项目经理id ,manager 项目经理name ,modelIds 模具ids 如 :"1,2,3"
|
|
* flag 0-添加,1-修改
|
|
* flag 0-添加,1-修改
|
|
*
|
|
*
|
|
- * @return
|
|
|
|
*/
|
|
*/
|
|
@ApiOperation("添加/修改项目")
|
|
@ApiOperation("添加/修改项目")
|
|
@RequestMapping("/add")
|
|
@RequestMapping("/add")
|
|
@@ -54,11 +46,10 @@ public class ProjectController {
|
|
@RequestParam(required = false) Integer customerApproverId, String customerCompanyNames,
|
|
@RequestParam(required = false) Integer customerApproverId, String customerCompanyNames,
|
|
@RequestParam(required = false) Integer ownerApproverId, String modelIds,
|
|
@RequestParam(required = false) Integer ownerApproverId, String modelIds,
|
|
String token, @RequestParam(required = false) String userIds) {
|
|
String token, @RequestParam(required = false) String userIds) {
|
|
- HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
QueryWrapper<User> qw = new QueryWrapper<>();
|
|
QueryWrapper<User> qw = new QueryWrapper<>();
|
|
qw.eq("head_imgurl", token);
|
|
qw.eq("head_imgurl", token);
|
|
User user = userService.getOne(qw);
|
|
User user = userService.getOne(qw);
|
|
- msg = projectService.addAndUpdateProject(project, flag, user, userIds, customerCompanyIds, customerCompanyNames, modelIds, ownerApproverId, customerApproverId);
|
|
|
|
|
|
+ HttpRespMsg msg = projectService.addAndUpdateProject(project, flag, user, userIds, customerCompanyIds, customerCompanyNames, modelIds, ownerApproverId, customerApproverId);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -66,7 +57,6 @@ public class ProjectController {
|
|
* 项目列表
|
|
* 项目列表
|
|
* 参数: pageNum 当前页码,pageSize 每页条数 keyName 关键字查询 token 用户唯一凭证
|
|
* 参数: pageNum 当前页码,pageSize 每页条数 keyName 关键字查询 token 用户唯一凭证
|
|
*
|
|
*
|
|
- * @return
|
|
|
|
*/
|
|
*/
|
|
@ApiOperation("项目列表")
|
|
@ApiOperation("项目列表")
|
|
@RequestMapping("/list")
|
|
@RequestMapping("/list")
|
|
@@ -81,14 +71,12 @@ public class ProjectController {
|
|
* 项目详情
|
|
* 项目详情
|
|
* 参数: id 项目id,token 用户凭证
|
|
* 参数: id 项目id,token 用户凭证
|
|
*
|
|
*
|
|
- * @return
|
|
|
|
*/
|
|
*/
|
|
@ApiOperation("项目详情")
|
|
@ApiOperation("项目详情")
|
|
@RequestMapping("/detail")
|
|
@RequestMapping("/detail")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public HttpRespMsg getUserByCompanyIdOrSubordinateType(Project project,String token) {
|
|
public HttpRespMsg getUserByCompanyIdOrSubordinateType(Project project,String token) {
|
|
- HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
- msg = projectService.getProjectDetail(project,token);
|
|
|
|
|
|
+ HttpRespMsg msg = projectService.getProjectDetail(project,token);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -96,14 +84,12 @@ public class ProjectController {
|
|
* 筛选模具列表时作为筛选条件所加载的项目列表
|
|
* 筛选模具列表时作为筛选条件所加载的项目列表
|
|
* 参数: token 用户身份凭证
|
|
* 参数: token 用户身份凭证
|
|
*
|
|
*
|
|
- * @return
|
|
|
|
*/
|
|
*/
|
|
@ApiOperation("筛选模具项目列表")
|
|
@ApiOperation("筛选模具项目列表")
|
|
@RequestMapping("/projectList")
|
|
@RequestMapping("/projectList")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public HttpRespMsg getProjectList(String token) {
|
|
public HttpRespMsg getProjectList(String token) {
|
|
- HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
- msg = projectService.getListByUser(token);
|
|
|
|
|
|
+ HttpRespMsg msg = projectService.getListByUser(token);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -116,8 +102,7 @@ public class ProjectController {
|
|
@RequestMapping("/getProjectListByUserAndCompany")
|
|
@RequestMapping("/getProjectListByUserAndCompany")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public HttpRespMsg getProjectListByUserAndCompany(UserVO userVO){
|
|
public HttpRespMsg getProjectListByUserAndCompany(UserVO userVO){
|
|
- HttpRespMsg msg= new HttpRespMsg();
|
|
|
|
- msg = projectService.getProjectListByUserAndCompany(userVO);
|
|
|
|
|
|
+ HttpRespMsg msg = projectService.getProjectListByUserAndCompany(userVO);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
|
|
|