|
@@ -22,11 +22,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
import javax.validation.Valid;
|
|
import javax.validation.Valid;
|
|
|
-import java.math.BigDecimal;
|
|
|
|
|
import java.text.DateFormat;
|
|
import java.text.DateFormat;
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
-import java.util.Map;
|
|
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 化学品智能终端Controller
|
|
* 化学品智能终端Controller
|
|
@@ -96,7 +94,8 @@ public class HxpAIOController extends BaseController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private IHxpAlarmRecordService hxpAlarmRecordService;
|
|
private IHxpAlarmRecordService hxpAlarmRecordService;
|
|
|
|
|
|
|
|
- /**-------------------------------------BASE 说明---------------------------------------*/
|
|
|
|
|
|
|
+ /**-------------------------------------BASE 说明---------------------------------------
|
|
|
|
|
+ * @return*/
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
|
* 1.获取功能配置基本信息和logo: /system/logo/config/getLogoInfo (无 token 验证,GET)
|
|
* 1.获取功能配置基本信息和logo: /system/logo/config/getLogoInfo (无 token 验证,GET)
|
|
@@ -106,7 +105,12 @@ public class HxpAIOController extends BaseController {
|
|
|
// D:\project\lab2.0\lab-distributed-java-2.0\zd-modules\zd-chemical\src\
|
|
// D:\project\lab2.0\lab-distributed-java-2.0\zd-modules\zd-chemical\src\
|
|
|
// chemical 化学品
|
|
// chemical 化学品
|
|
|
|
|
|
|
|
- public String getTerminalNum(){
|
|
|
|
|
|
|
+ private boolean getCabinetLock(){
|
|
|
|
|
+ LoginUser user = tokenService.getLoginUser();
|
|
|
|
|
+ return user.isCabinetLock();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ private String getTerminalNum(){
|
|
|
LoginUser user = tokenService.getLoginUser();
|
|
LoginUser user = tokenService.getLoginUser();
|
|
|
if(user == null || StringUtils.isBlank(user.getMachineCode())){
|
|
if(user == null || StringUtils.isBlank(user.getMachineCode())){
|
|
|
throw new ServiceException("未获取到设备编号,无效操作!");
|
|
throw new ServiceException("未获取到设备编号,无效操作!");
|
|
@@ -114,7 +118,7 @@ public class HxpAIOController extends BaseController {
|
|
|
return user.getMachineCode();
|
|
return user.getMachineCode();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public Long getSubIdByTerminalNum(){
|
|
|
|
|
|
|
+ private Long getSubIdByTerminalNum(){
|
|
|
Long subId = hxpSmartTerminalService.selectSubIdByTerminalNum(getTerminalNum());
|
|
Long subId = hxpSmartTerminalService.selectSubIdByTerminalNum(getTerminalNum());
|
|
|
if(subId == null){
|
|
if(subId == null){
|
|
|
throw new ServiceException("设备未匹配到实验室,请确认设备信息后重新登录!");
|
|
throw new ServiceException("设备未匹配到实验室,请确认设备信息后重新登录!");
|
|
@@ -122,7 +126,7 @@ public class HxpAIOController extends BaseController {
|
|
|
return subId;
|
|
return subId;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public Long getSubIdByTerminalNum(String machineCode){
|
|
|
|
|
|
|
+ private Long getSubIdByTerminalNum(String machineCode){
|
|
|
|
|
|
|
|
machineCode = StringUtils.isBlank(machineCode) ? getTerminalNum():machineCode;
|
|
machineCode = StringUtils.isBlank(machineCode) ? getTerminalNum():machineCode;
|
|
|
|
|
|
|
@@ -485,6 +489,7 @@ public class HxpAIOController extends BaseController {
|
|
|
@ApiOperation(value = "查询机柜柜锁列表")
|
|
@ApiOperation(value = "查询机柜柜锁列表")
|
|
|
public R<List<AioCabinetLockVo>> queryCabinetLockList(@RequestBody AioCabinetLockVo aioCabinetLockVo) {
|
|
public R<List<AioCabinetLockVo>> queryCabinetLockList(@RequestBody AioCabinetLockVo aioCabinetLockVo) {
|
|
|
aioCabinetLockVo.setSubId(getSubIdByTerminalNum());
|
|
aioCabinetLockVo.setSubId(getSubIdByTerminalNum());
|
|
|
|
|
+ aioCabinetLockVo.setCabinetLock(getCabinetLock());
|
|
|
List<AioCabinetLockVo> list = hxpCabinetService.queryCabinetLockList(aioCabinetLockVo);
|
|
List<AioCabinetLockVo> list = hxpCabinetService.queryCabinetLockList(aioCabinetLockVo);
|
|
|
return R.ok(list);
|
|
return R.ok(list);
|
|
|
}
|
|
}
|