|
@@ -3,17 +3,15 @@ package com.hssx.cloudmodel.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.hssx.cloudmodel.entity.Mould;
|
|
import com.hssx.cloudmodel.entity.Mould;
|
|
-import com.hssx.cloudmodel.entity.MouldEquipment;
|
|
|
|
import com.hssx.cloudmodel.entity.User;
|
|
import com.hssx.cloudmodel.entity.User;
|
|
import com.hssx.cloudmodel.service.MouldService;
|
|
import com.hssx.cloudmodel.service.MouldService;
|
|
|
|
+import com.hssx.cloudmodel.service.UserService;
|
|
import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
-
|
|
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
import org.springframework.web.bind.annotation.ResponseBody;
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* @author 吴涛涛
|
|
* @author 吴涛涛
|
|
@@ -24,11 +22,14 @@ import org.springframework.web.bind.annotation.RestController;
|
|
public class MouldController {
|
|
public class MouldController {
|
|
@Autowired
|
|
@Autowired
|
|
private MouldService mouldService;
|
|
private MouldService mouldService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private UserService userService;
|
|
/**
|
|
/**
|
|
* 添加/修改模具设备
|
|
* 添加/修改模具设备
|
|
- * 添加参数:modelName ,settingLife 使用年限, equipmentNo 设备编号 ,
|
|
|
|
|
|
+ * 添加参数:equipmentId 设备id, modelNo 模具编号
|
|
|
|
+ * 修改参数:id 模具id, modelName 模具名称,settingLife 使用年限, initialModulus 初始模次 equipmentId 设备id,
|
|
|
|
+ * produceCompanyId 生产方公司id,ocCycle 每模平均周期,rfid rfid码,area 工厂地址,factoryId 工厂id,factoryName 工厂名称
|
|
* belongCompanyId 所属公司id ,equipmentName 设备名称
|
|
* belongCompanyId 所属公司id ,equipmentName 设备名称
|
|
- * 修改时需多传的参数 id 设备id
|
|
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation("添加/修改模具")
|
|
@ApiOperation("添加/修改模具")
|
|
@@ -38,12 +39,9 @@ public class MouldController {
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
HttpRespMsg msg = new HttpRespMsg();
|
|
QueryWrapper<User> qw = new QueryWrapper<>();
|
|
QueryWrapper<User> qw = new QueryWrapper<>();
|
|
qw.eq("head_imgurl",token);
|
|
qw.eq("head_imgurl",token);
|
|
-// User user = userService.getOne(qw);
|
|
|
|
-// msg = mouldService.addAndUpdateMould(mouldEquipment,user);
|
|
|
|
|
|
+ User user = userService.getOne(qw);
|
|
|
|
+ msg = mouldService.addAndUpdateMould(mould,user);
|
|
return msg;
|
|
return msg;
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|