|
@@ -4,9 +4,10 @@ package com.hssx.cloudmodel.controller;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
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.mapper.CompanyMapper;
|
|
|
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.util.HttpRespMsg;
|
|
@@ -16,6 +17,8 @@ import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* @author 吴涛涛
|
|
|
* @since 2019-07-30
|
|
@@ -29,9 +32,11 @@ public class MouldController {
|
|
|
private UserService userService;
|
|
|
@Autowired
|
|
|
private CompanyService companyService;
|
|
|
+ @Autowired
|
|
|
+ private MouldEquipmentService mouldEquipmentService;
|
|
|
/**
|
|
|
* 添加/修改模具设备
|
|
|
- * 添加参数:equipmentId 设备id, modelNo 模具编号 ,belongCompanyId 所属公司id,modelName 模具名称
|
|
|
+ * 添加参数:equipmentId 设备id, modelNo 模具编号 ,modelName 模具名称
|
|
|
* 修改参数:id 模具id, settingLife 使用年限, initialModulus 初始模次 equipmentId 设备id,
|
|
|
* produceCompanyId 生产方公司id,ocCycle 每模平均周期,rfid rfid码,area 工厂地址,factoryId 工厂id,factoryName 工厂名称
|
|
|
* equipmentName 设备名称
|
|
@@ -62,5 +67,20 @@ public class MouldController {
|
|
|
msg.data = companyService.list(qw);
|
|
|
return msg;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取资产方公司的设备列表
|
|
|
+ * 参数 belongCompanyId 当前登录人公司id
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @ApiOperation("获取资产方公司的设备列表")
|
|
|
+ @RequestMapping("/getMouldEquipmentList")
|
|
|
+ @ResponseBody
|
|
|
+ public HttpRespMsg getMouldEquipmentList(MouldEquipment mouldEquipment){
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
+ msg.data = mouldEquipmentService.list(new QueryWrapper<MouldEquipment>().eq("belong_company_id", mouldEquipment.getBelongCompanyId()));
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|