|
|
@@ -3322,14 +3322,14 @@ public class MesProductRecordController extends BaseController {
|
|
|
}
|
|
|
|
|
|
try{
|
|
|
- // 保存漏点:只要客户端提交了漏点索引,就按当前工位保存,不再限制工位白名单。
|
|
|
+ // 保存漏点:新客户端提交 A1/B2 等名称,旧客户端提交数字时转换为新名称。
|
|
|
String ldFlag = request.getParameter("ldFlag");
|
|
|
if(!StringUtils.isEmpty(ldFlag)){
|
|
|
MesProductHf mesProductHf = new MesProductHf();
|
|
|
mesProductHf.setSn(sn);
|
|
|
mesProductHf.setOprno(oprno);
|
|
|
mesProductHf.setLineSn(lineSn);
|
|
|
- mesProductHf.setHfFlag(ldFlag);
|
|
|
+ mesProductHf.setHfFlag(normalizeLeakPointLabels(ldFlag));
|
|
|
mesProductHf.setResult(result);
|
|
|
mesProductHfService.save(mesProductHf);
|
|
|
}
|
|
|
@@ -3352,6 +3352,31 @@ public class MesProductRecordController extends BaseController {
|
|
|
return renderResult(Global.TRUE, text("操作成功!"));
|
|
|
}
|
|
|
|
|
|
+ /** Converts legacy numeric point indexes to A1-A9, B1-B16, C1-C2, D1-D12. */
|
|
|
+ private String normalizeLeakPointLabels(String value) {
|
|
|
+ String[] values = value.split(",");
|
|
|
+ StringBuilder result = new StringBuilder();
|
|
|
+ for (String item : values) {
|
|
|
+ String point = item.trim();
|
|
|
+ if (point.matches("\\d+")) {
|
|
|
+ try {
|
|
|
+ int index = Integer.parseInt(point);
|
|
|
+ if (index >= 1 && index <= 39) {
|
|
|
+ if (index <= 9) point = "A" + index;
|
|
|
+ else if (index <= 25) point = "B" + (index - 9);
|
|
|
+ else if (index <= 27) point = "C" + (index - 25);
|
|
|
+ else point = "D" + (index - 27);
|
|
|
+ }
|
|
|
+ } catch (NumberFormatException ignored) {
|
|
|
+ // Keep malformed legacy values unchanged for traceability.
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (result.length() > 0) result.append(",");
|
|
|
+ result.append(point);
|
|
|
+ }
|
|
|
+ return result.toString();
|
|
|
+ }
|
|
|
+
|
|
|
// 绑定底护板
|
|
|
@PostMapping(value = "binddhb")
|
|
|
@ResponseBody
|