|
|
@@ -69,7 +69,7 @@ public class MesDeviceController extends BaseController {
|
|
|
model.addAttribute("mesDevice", mesDevice);
|
|
|
return "modules/mes/mesDeviceIndex";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 查询列表
|
|
|
*/
|
|
|
@@ -80,7 +80,7 @@ public class MesDeviceController extends BaseController {
|
|
|
model.addAttribute("mesDeviceCate", mesDeviceCateService.findList(mesDeviceCate));
|
|
|
return "modules/mes/mesDeviceList";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 查询列表数据
|
|
|
*/
|
|
|
@@ -249,7 +249,7 @@ public class MesDeviceController extends BaseController {
|
|
|
return renderResult(Global.FALSE, "posfull:"+ex.getMessage());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 停用数据
|
|
|
*/
|
|
|
@@ -268,7 +268,7 @@ public class MesDeviceController extends BaseController {
|
|
|
mesDeviceService.updateStatus(mesDevice);
|
|
|
return renderResult(Global.TRUE, text("停用设备成功"));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 启用数据
|
|
|
*/
|
|
|
@@ -280,7 +280,7 @@ public class MesDeviceController extends BaseController {
|
|
|
mesDeviceService.updateStatus(mesDevice);
|
|
|
return renderResult(Global.TRUE, text("启用设备成功"));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 删除数据
|
|
|
*/
|
|
|
@@ -291,7 +291,7 @@ public class MesDeviceController extends BaseController {
|
|
|
mesDeviceService.delete(mesDevice);
|
|
|
return renderResult(Global.TRUE, text("删除设备成功!"));
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 获取树结构数据
|
|
|
* @param excludeCode 排除的Code
|
|
|
@@ -383,6 +383,35 @@ public class MesDeviceController extends BaseController {
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 按设备识别码校验验收状态是否合格(1=合格)
|
|
|
+ * @param
|
|
|
+ * @return result=true 合格;result=false 不合格/不存在/参数为空
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "checkStatus")
|
|
|
+ @ResponseBody
|
|
|
+ public CommonResp checkStatus(HttpServletRequest request) {
|
|
|
+ CommonResp<Boolean> resp = new CommonResp<>();
|
|
|
+ String deviceCode = request.getParameter("deviceCode");
|
|
|
+ if (StringUtils.isBlank(deviceCode)) {
|
|
|
+ resp.setResult("false");
|
|
|
+// resp.setData(false);
|
|
|
+ resp.setMessage("设备识别码不能为空");
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+ MesDevice info = mesDeviceService.findInfoByDeviceCode(deviceCode.trim());
|
|
|
+ if (ObjectUtils.isEmpty(info) || !"1".equals(info.getCheckStatus())) {
|
|
|
+ resp.setResult("false");
|
|
|
+// resp.setData(false);
|
|
|
+ resp.setMessage("验收状态不合格");
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+ resp.setResult("true");
|
|
|
+// resp.setData(true);
|
|
|
+ resp.setMessage("验收状态合格");
|
|
|
+ return resp;
|
|
|
+ }
|
|
|
+
|
|
|
@RequiresPermissions("mes:mesDevice:view")
|
|
|
@RequestMapping(value = "map")
|
|
|
public String map(MesDevice mesDevice, Model model) {
|
|
|
@@ -390,4 +419,4 @@ public class MesDeviceController extends BaseController {
|
|
|
return "modules/mes/equipment/equipment_map";
|
|
|
}
|
|
|
|
|
|
-}
|
|
|
+}
|