|
@@ -6,10 +6,7 @@ import com.hssx.cloudmodel.entity.Company;
|
|
|
import com.hssx.cloudmodel.entity.Mould;
|
|
|
import com.hssx.cloudmodel.entity.MouldEquipment;
|
|
|
import com.hssx.cloudmodel.entity.User;
|
|
|
-import com.hssx.cloudmodel.service.CompanyService;
|
|
|
-import com.hssx.cloudmodel.service.MouldEquipmentService;
|
|
|
-import com.hssx.cloudmodel.service.MouldService;
|
|
|
-import com.hssx.cloudmodel.service.UserService;
|
|
|
+import com.hssx.cloudmodel.service.*;
|
|
|
import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -34,6 +31,8 @@ public class MouldController {
|
|
|
private CompanyService companyService;
|
|
|
@Autowired
|
|
|
private MouldEquipmentService mouldEquipmentService;
|
|
|
+ @Autowired
|
|
|
+ private ProjectService projectService;
|
|
|
/**
|
|
|
* 添加/修改模具设备
|
|
|
* 添加参数:equipmentId 设备id, modelNo 模具编号 ,modelName 模具名称
|
|
@@ -53,34 +52,19 @@ public class MouldController {
|
|
|
msg = mouldService.addAndUpdateMould(mould,user);
|
|
|
return msg;
|
|
|
}
|
|
|
- /**
|
|
|
- * 创建模具获取的(资产方)公司列表
|
|
|
- * @return
|
|
|
- */
|
|
|
- @ApiOperation("创建模具获取的公司列表")
|
|
|
- @RequestMapping("/getcompanys")
|
|
|
- @ResponseBody
|
|
|
- public HttpRespMsg getcompanys() {
|
|
|
- HttpRespMsg msg = new HttpRespMsg();
|
|
|
- QueryWrapper<Company> qw = new QueryWrapper<>();
|
|
|
- qw.eq("company_type",0);
|
|
|
- msg.data = companyService.list(qw);
|
|
|
- return msg;
|
|
|
- }
|
|
|
|
|
|
/**
|
|
|
- * 获取资产方公司的设备列表
|
|
|
- * 参数 belongCompanyId 当前登录人公司id
|
|
|
+ * 给项目分配模具获取该公司下的模具列表
|
|
|
+ * parentId 当前人parentId
|
|
|
* @return
|
|
|
*/
|
|
|
- @ApiOperation("获取资产方公司的设备列表")
|
|
|
- @RequestMapping("/getMouldEquipmentList")
|
|
|
+ @ApiOperation("获取该公司下的模具列表")
|
|
|
+ @RequestMapping("/modelList")
|
|
|
@ResponseBody
|
|
|
- public HttpRespMsg getMouldEquipmentList(MouldEquipment mouldEquipment){
|
|
|
+ public HttpRespMsg addAndUpdateProject(User user) {
|
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
|
- msg.data = mouldEquipmentService.list(new QueryWrapper<MouldEquipment>().eq("belong_company_id", mouldEquipment.getBelongCompanyId()));
|
|
|
+ msg = projectService.getModelListByCompanyId(user);
|
|
|
return msg;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
|