|
@@ -1,21 +1,49 @@
|
|
package com.hssx.cloudmodel.controller;
|
|
package com.hssx.cloudmodel.controller;
|
|
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.hssx.cloudmodel.entity.Mould;
|
|
|
|
+import com.hssx.cloudmodel.entity.MouldEquipment;
|
|
|
|
+import com.hssx.cloudmodel.entity.User;
|
|
|
|
+import com.hssx.cloudmodel.service.MouldService;
|
|
|
|
+import com.hssx.cloudmodel.util.HttpRespMsg;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+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.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * <p>
|
|
|
|
- * 前端控制器
|
|
|
|
- * </p>
|
|
|
|
- *
|
|
|
|
* @author 吴涛涛
|
|
* @author 吴涛涛
|
|
* @since 2019-07-30
|
|
* @since 2019-07-30
|
|
*/
|
|
*/
|
|
-@RestController
|
|
|
|
|
|
+@Controller
|
|
@RequestMapping("/mould")
|
|
@RequestMapping("/mould")
|
|
public class MouldController {
|
|
public class MouldController {
|
|
|
|
+ @Autowired
|
|
|
|
+ private MouldService mouldService;
|
|
|
|
+ /**
|
|
|
|
+ * 添加/修改模具设备
|
|
|
|
+ * 添加参数:modelName ,useLife 使用年限, equipmentNo 设备编号 ,
|
|
|
|
+ * belongCompanyId 所属公司id ,equipmentName 设备名称
|
|
|
|
+ * 修改时需多传的参数 id 设备id
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation("添加/修改模具")
|
|
|
|
+ @RequestMapping("/addOrUpdate")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public HttpRespMsg addOrUpdate(Mould mould, String token) {
|
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
|
+// QueryWrapper<User> qw = new QueryWrapper<>();
|
|
|
|
+// qw.eq("head_imgurl",token);
|
|
|
|
+// User user = userService.getOne(qw);
|
|
|
|
+// msg = mouldEquipmentService.addAndUpdateMouldEquipment(mouldEquipment,user);
|
|
|
|
+ return msg;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|