|
@@ -6,10 +6,14 @@ 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.entity.vo.UserVO;
|
|
|
import com.hssx.cloudmodel.service.*;
|
|
|
import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
|
+import com.hssx.cloudmodel.util.PageUtil;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
@@ -28,10 +32,6 @@ public class MouldController {
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
@Autowired
|
|
|
- private CompanyService companyService;
|
|
|
- @Autowired
|
|
|
- private MouldEquipmentService mouldEquipmentService;
|
|
|
- @Autowired
|
|
|
private ProjectService projectService;
|
|
|
/**
|
|
|
* 添加/修改模具设备
|
|
@@ -66,5 +66,21 @@ public class MouldController {
|
|
|
msg = projectService.getModelListByCompanyId(user);
|
|
|
return msg;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 给项目分配模具获取该公司下的模具列表
|
|
|
+ * token 当前人唯一权限
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("模具列表")
|
|
|
+ @RequestMapping("/list")
|
|
|
+ @ResponseBody
|
|
|
+ public HttpRespMsg list(UserVO userVO, PageUtil page,String token) {
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
+ User user = userService.getOne(new QueryWrapper<User>().eq("head_imgurl", token));
|
|
|
+ BeanUtils.copyProperties(user,userVO);
|
|
|
+ msg = projectService.getModelListByUser(userVO,page);
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
}
|
|
|
|