|
|
@@ -242,4 +242,41 @@ public class MesLaserController extends BaseController {
|
|
|
}
|
|
|
return resp;
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 根据客户码查询钢印码(用于打印流转卡)
|
|
|
+ * 请求参数(form):customerSn
|
|
|
+ * 返回 data 为钢印码字符串
|
|
|
+ */
|
|
|
+ @PostMapping(value = "getSteelSn")
|
|
|
+ @ResponseBody
|
|
|
+ public CommonResp<Map<String, String>> getSteelSn(HttpServletRequest request) {
|
|
|
+ CommonResp<Map<String, String>> resp = new CommonResp<>();
|
|
|
+ String customerSn = request.getParameter("customerSn");
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(customerSn)) {
|
|
|
+ resp.setResult(Global.FALSE);
|
|
|
+ resp.setMessage("customerSn 不能为空");
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
+ try {
|
|
|
+ String steelSn = mesLaserService.getSteelSnByCustomerSn(customerSn);
|
|
|
+ if (steelSn != null) {
|
|
|
+ Map<String, String> data = new HashMap<>();
|
|
|
+ data.put("steelSn", steelSn);
|
|
|
+ resp.setData(data);
|
|
|
+ resp.setResult(Global.TRUE);
|
|
|
+ resp.setMessage("查询成功");
|
|
|
+ } else {
|
|
|
+ resp.setResult(Global.FALSE);
|
|
|
+ resp.setMessage("未找到该客户码对应的钢印码");
|
|
|
+ }
|
|
|
+ } catch (Exception e) {
|
|
|
+ logger.error("查询钢印码失败:customerSn=" + customerSn, e);
|
|
|
+ resp.setResult(Global.FALSE);
|
|
|
+ resp.setMessage("查询失败:" + e.getMessage());
|
|
|
+ }
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
}
|