|
|
@@ -70,4 +70,42 @@ public class MesPdaProductController extends BaseController {
|
|
|
resp.setMessage("OK");
|
|
|
return resp;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 客户码与钢印码直接绑定(不校验)。
|
|
|
+ * 请求参数:sn=客户码,steelSn=钢印码
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "bindSteelSn", method = {RequestMethod.GET, RequestMethod.POST})
|
|
|
+ @ResponseBody
|
|
|
+ public CommonResp<Map<String, String>> bindSteelSn(@RequestParam("sn") String sn,
|
|
|
+ @RequestParam("steelSn") String steelSn) {
|
|
|
+ CommonResp<Map<String, String>> resp = new CommonResp<>();
|
|
|
+ Map<String, String> data = new HashMap<>();
|
|
|
+ resp.setData(data);
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(sn)) {
|
|
|
+ resp.setResult(Global.FALSE);
|
|
|
+ resp.setMessage("客户码不能为空");
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (StringUtils.isBlank(steelSn)) {
|
|
|
+ resp.setResult(Global.FALSE);
|
|
|
+ resp.setMessage("钢印码不能为空");
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ mesLaserService.bindSteelSnDirectly(sn, steelSn);
|
|
|
+ data.put("sn", sn);
|
|
|
+ data.put("steelSn", steelSn);
|
|
|
+ resp.setResult(Global.TRUE);
|
|
|
+ resp.setMessage("绑定成功");
|
|
|
+ } catch (Exception e) {
|
|
|
+ resp.setResult(Global.FALSE);
|
|
|
+ resp.setMessage("绑定失败,请联系管理员");
|
|
|
+ }
|
|
|
+
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
}
|