Ver código fonte

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

# Conflicts:
#	cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/MouldFileServiceImpl.java
5 anos atrás
pai
commit
5614e2f270

+ 1 - 1
cloud-model/src/main/java/com/hssx/cloudmodel/controller/CompanyController.java

@@ -115,7 +115,7 @@ public class CompanyController {
     }
 
     /**
-     * 创建账号是所获取的公司列表
+     * 创建账号是所获取的本公司和关联公司列表
      * parentId 当前用户的上级id id 当前用户id
      * @return
      */

+ 5 - 20
cloud-model/src/main/java/com/hssx/cloudmodel/controller/ProjectController.java

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

+ 2 - 2
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/ProjectServiceImpl.java

@@ -176,7 +176,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 this.handOutProject(project, userIds);
                 //重新添加审批人
                 //1.添加生产方审批人
-                if (null != customerApproverId) {
+                if (null != customerApproverId && !"".equals(customerApproverId)) {
                     User customerExaminer = userMapper.selectById(customerApproverId);
                     Company company = companyMapper.selectById(customerExaminer.getCompanyId());
                     ProjectApprove projectApprove = new ProjectApprove();
@@ -206,7 +206,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     projectUser.setRoleType(1);//审批人
                     projectUserMapper.insert(projectUser);
                 }
-                if (null != ownerApproverId) {
+                if (null != ownerApproverId && !"".equals(ownerApproverId)) {
                     //2.添加资产方审批人
                     User ownerExaminer = userMapper.selectById(ownerApproverId);
                     Company company = companyMapper.selectById(ownerExaminer.getCompanyId());