forked from I3-YF/i3plus-mes-pcn-yfai
新增Leo接口,通过报工条码查询零件号
parent
b775ab0fa1
commit
03f6e6fbce
@ -0,0 +1,30 @@
|
|||||||
|
package cn.estsh.i3plus.ext.mes.pcn.apiservice.controller.base;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.ext.mes.pcn.apiservice.serviceimpl.busi.MesProduceSnExtService;
|
||||||
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/white")
|
||||||
|
public class MesWhiteController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MesProduceSnExtService mesProduceSnExtService;
|
||||||
|
|
||||||
|
@GetMapping("/mesPartSap/{productSn}/{organizeCode}")
|
||||||
|
public ResultBean getPartNo(@PathVariable String productSn,@PathVariable String organizeCode){
|
||||||
|
|
||||||
|
String partNo;
|
||||||
|
try {
|
||||||
|
partNo = mesProduceSnExtService.queryPartNoByProduceSn(productSn, organizeCode);
|
||||||
|
} catch (Exception e) {
|
||||||
|
return ResultBean.fail("查询失败").setErrorMsg(e.getMessage());
|
||||||
|
}
|
||||||
|
return ResultBean.success("查询成功").setResultObject(partNo);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue