Browse Source

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 years ago
parent
commit
3ed4d9b605

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

@@ -82,6 +82,19 @@ public class CompanyController {
         msg = companyService.pageList(page,keyName,companyType);
         msg = companyService.pageList(page,keyName,companyType);
         return msg;
         return msg;
     }
     }
+    /**
+     * 建立关联公司时的公司列表
+     * 参数:companyType 公司类型 0-资产方 1-生产方
+     * @return
+     */
+    @ApiOperation("公司列表")
+    @RequestMapping("/relationList")
+    @ResponseBody
+    public HttpRespMsg relationList(@RequestParam(required = false)Integer companyType) {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = companyService.relationList(companyType);
+        return msg;
+    }
 
 
     /**
     /**
      * 创建模具获取的(资产方)公司列表
      * 创建模具获取的(资产方)公司列表
@@ -139,18 +152,18 @@ public class CompanyController {
         msg = companyService.getCoutomCompanyAndMouldsByUser(userVO);
         msg = companyService.getCoutomCompanyAndMouldsByUser(userVO);
         return msg;
         return msg;
     }
     }
-//    /**
-//     * 公司详情
-//     * 参数 token 用户身份凭证
-//     * @return
-//     */
-//    @ApiOperation(value = "生产方公司和公司下所属的模具")
-//    @RequestMapping("/getCoutomCompanyAndMouldsByUser")
-//    @ResponseBody
-//    public HttpRespMsg getCoutomCompanyAndMouldsByUser(UserVO userVO){
-//        HttpRespMsg msg = new HttpRespMsg();
-//        msg = companyService.getCoutomCompanyAndMouldsByUser(userVO);
-//        return msg;
-//    }
+    /**
+     * 公司详情
+     * 参数 token 用户身份凭证
+     * @return
+     */
+    @ApiOperation(value = "公司详情")
+    @RequestMapping("/detail")
+    @ResponseBody
+    public HttpRespMsg detail(UserVO userVO){
+        HttpRespMsg msg = new HttpRespMsg();
+        msg = companyService.getCoutomCompanyAndMouldsByUser(userVO);
+        return msg;
+    }
 }
 }
 
 

+ 2 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/CompanyService.java

@@ -31,4 +31,6 @@ public interface CompanyService extends IService<Company> {
     List<Company> addCompanyListToProject(User user);
     List<Company> addCompanyListToProject(User user);
 
 
     HttpRespMsg getCoutomCompanyAndMouldsByUser(UserVO userVO);
     HttpRespMsg getCoutomCompanyAndMouldsByUser(UserVO userVO);
+
+    HttpRespMsg relationList(Integer companyType);
 }
 }

+ 8 - 0
cloud-model/src/main/java/com/hssx/cloudmodel/service/impl/CompanyServiceImpl.java

@@ -14,6 +14,7 @@ import com.hssx.cloudmodel.util.PageUtil;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
+import sun.plugin.com.event.COMEventHandler;
 
 
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.util.ArrayList;
 import java.util.ArrayList;
@@ -278,6 +279,13 @@ public class CompanyServiceImpl extends ServiceImpl<CompanyMapper, Company> impl
         return msg;
         return msg;
     }
     }
 
 
+    @Override
+    public HttpRespMsg relationList(Integer companyType) {
+        HttpRespMsg msg = new HttpRespMsg();
+        msg.data = companyMapper.selectList(new QueryWrapper<Company>().eq("company_type", companyType));
+        return msg;
+    }
+
     @Override
     @Override
     public HttpRespMsg deleteById(Integer id) {
     public HttpRespMsg deleteById(Integer id) {
         HttpRespMsg msg = new HttpRespMsg();
         HttpRespMsg msg = new HttpRespMsg();