refactor(台账): 优化 验证rfid方法
This commit is contained in:
parent
41b78fa0af
commit
3732544474
@ -321,7 +321,7 @@ public class BaseKnifeController extends BaseController {
|
|||||||
|
|
||||||
// 齐套性检查
|
// 齐套性检查
|
||||||
AjaxResult ajaxResult = this.checkForAlignment(processCodeList);
|
AjaxResult ajaxResult = this.checkForAlignment(processCodeList);
|
||||||
if (Integer.parseInt(String.valueOf(ajaxResult.get("code"))) != 200){
|
if (Integer.parseInt(String.valueOf(ajaxResult.get("code"))) != 200) {
|
||||||
return AjaxResult.error(ajaxResult.get("msg").toString(), ajaxResult.get("data"));
|
return AjaxResult.error(ajaxResult.get("msg").toString(), ajaxResult.get("data"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -988,7 +988,15 @@ public class BaseKnifeController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('md:baseKnife:query')")
|
@PreAuthorize("@ss.hasPermi('md:baseKnife:query')")
|
||||||
@GetMapping(value = "/isDuplicateRfid/{rfid}")
|
@GetMapping(value = "/isDuplicateRfid/{rfid}")
|
||||||
public AjaxResult isDuplicateRfid(@PathVariable("rfid") String rfid) {
|
public AjaxResult isDuplicateRfid(@PathVariable("rfid") String rfid) {
|
||||||
return AjaxResult.success(baseKnifeService.isDuplicateRfid(rfid));
|
String[] split = rfid.split(",");
|
||||||
|
// 验证失败的rfid
|
||||||
|
ArrayList<String> errorList = new ArrayList<>();
|
||||||
|
for (String s : split) {
|
||||||
|
if (baseKnifeService.isDuplicateRfid(rfid)) {
|
||||||
|
errorList.add(s);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return AjaxResult.success(errorList);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user