|
@@ -75,7 +75,13 @@ public class AppDeviceLogServiceImpl extends JpaServiceImp<AppDeviceLog, String>
|
|
|
batchNum = appDevice.getBatchNum();
|
|
|
if (appDevice.getStatus() < 1) {
|
|
|
appDevice.setStatus(1); // 已入库
|
|
|
- appDevice.setCheckStatus(BooleanUtils.toInteger(appDeviceLogService.selfCheck(p))); //自检
|
|
|
+ appDevice.setCheckStatus(BooleanUtils.toInteger(appDeviceLogService.selfCheck(p).get("checkResult"))); //自检
|
|
|
+ appDevice.setCheckStatusDataConnect(BooleanUtils.toInteger(appDeviceLogService.selfCheck(p).get("checkDataConnectResult"))); //自检
|
|
|
+ appDevice.setCheckStatusLocation(BooleanUtils.toInteger(appDeviceLogService.selfCheck(p).get("checkLocationResult"))); //自检
|
|
|
+ appDevice.setCheckStatusLock(BooleanUtils.toInteger(appDeviceLogService.selfCheck(p).get("checkLockResult"))); //自检
|
|
|
+ appDevice.setCheckStatusFault(BooleanUtils.toInteger(appDeviceLogService.selfCheck(p).get("checkFaultResult"))); //自检
|
|
|
+ appDevice.setCheckStatusVoltage(BooleanUtils.toInteger(appDeviceLogService.selfCheck(p).get("checkVoltageResult"))); //自检
|
|
|
+ //TODO 发送解锁指令
|
|
|
appDevice.setInstorageTime(time);
|
|
|
appDeviceService.save(appDevice);
|
|
|
|
|
@@ -89,12 +95,25 @@ public class AppDeviceLogServiceImpl extends JpaServiceImp<AppDeviceLog, String>
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public boolean selfCheck(String sn) {
|
|
|
- boolean checkResult = false;
|
|
|
+ public Map<String, Boolean> selfCheck(String sn) {
|
|
|
+ //TODO 添加自检
|
|
|
+ Map<String, Boolean> res = new HashMap<>();
|
|
|
+ Boolean checkResult = false;
|
|
|
+ Boolean checkDataConnectResult = false;
|
|
|
+ Boolean checkLocationResult = false;
|
|
|
+ Boolean checkLockResult = false;
|
|
|
+ Boolean checkFaultResult = false;
|
|
|
+ Boolean checkVoltageResult = false;
|
|
|
if (true){
|
|
|
checkResult = true;
|
|
|
}
|
|
|
- return checkResult;
|
|
|
+ res.put("checkResult", checkResult);
|
|
|
+ res.put("checkDataConnectResult", checkDataConnectResult);
|
|
|
+ res.put("checkLocationResult", checkLocationResult);
|
|
|
+ res.put("checkLockResult", checkLockResult);
|
|
|
+ res.put("checkFaultResult", checkFaultResult);
|
|
|
+ res.put("checkVoltageResult", checkVoltageResult);
|
|
|
+ return res;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -257,7 +276,7 @@ public class AppDeviceLogServiceImpl extends JpaServiceImp<AppDeviceLog, String>
|
|
|
appDevice.setHandleTime(time);
|
|
|
appDevice.setStatus(4); // 处置
|
|
|
appDeviceService.save(appDevice);
|
|
|
-
|
|
|
+ //TODO 发送上锁指令
|
|
|
AppDeviceLog appDeviceLog = new AppDeviceLog(p, appDevice.getImei()).toHandle(param, time, batchNum, finalOperateID);
|
|
|
appDeviceLog.setOperator(utilService.getUserName());
|
|
|
save(appDeviceLog); // 记录处置日志
|