更新
This commit is contained in:
@@ -134,7 +134,7 @@ public class HFHandController {
|
|||||||
return new ResponseEntity<>(HandService.updateDeviceStatus(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(HandService.updateDeviceStatus(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/handlogin")
|
@PostMapping("/login")
|
||||||
@Log("手持登陆验证")
|
@Log("手持登陆验证")
|
||||||
@ApiOperation("手持登陆验证")
|
@ApiOperation("手持登陆验证")
|
||||||
@SaIgnore
|
@SaIgnore
|
||||||
@@ -162,4 +162,14 @@ public class HFHandController {
|
|||||||
return new ResponseEntity<>(HandService.createTask2(whereJson), HttpStatus.OK);
|
return new ResponseEntity<>(HandService.createTask2(whereJson), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/queryDevice")
|
||||||
|
@Log("查询设备起点和终点")
|
||||||
|
@ApiOperation("查询设备起点和终点")
|
||||||
|
@SaIgnore
|
||||||
|
//@PreAuthorize("@el.check('sect:list')")
|
||||||
|
//@RequestBody JSONObject json
|
||||||
|
public ResponseEntity<Object> queryDevice() {
|
||||||
|
return new ResponseEntity<>(HandService.queryDevice(), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,4 +112,6 @@ public interface HFHandService {
|
|||||||
Map<String, Object> queryMaterial();
|
Map<String, Object> queryMaterial();
|
||||||
|
|
||||||
Map<String, Object> createTask2(Map<String, String> whereJson);
|
Map<String, Object> createTask2(Map<String, String> whereJson);
|
||||||
|
|
||||||
|
Map<String, Object> queryDevice();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -303,6 +303,12 @@ public class HFHandServiceImpl implements HFHandService {
|
|||||||
resultJson.put("result", "");
|
resultJson.put("result", "");
|
||||||
return resultJson;
|
return resultJson;
|
||||||
}
|
}
|
||||||
|
if (StrUtil.isEmpty(task_type)) {
|
||||||
|
resultJson.put("code", "0");
|
||||||
|
resultJson.put("desc", "任务类型不能为空");
|
||||||
|
resultJson.put("result", "");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
if (StrUtil.isEmpty(next_devicecode)) {
|
if (StrUtil.isEmpty(next_devicecode)) {
|
||||||
resultJson.put("code", "0");
|
resultJson.put("code", "0");
|
||||||
resultJson.put("desc", "终点不能为空");
|
resultJson.put("desc", "终点不能为空");
|
||||||
@@ -317,24 +323,24 @@ public class HFHandServiceImpl implements HFHandService {
|
|||||||
// return resultJson;
|
// return resultJson;
|
||||||
// }
|
// }
|
||||||
//判断起点有货,终点为空
|
//判断起点有货,终点为空
|
||||||
if (ObjectUtil.isEmpty(startDevice.getMaterial_type()) || Integer.parseInt(startDevice.getMaterial_type()) == 0) {
|
// if (ObjectUtil.isEmpty(startDevice.getMaterial_type()) || Integer.parseInt(startDevice.getMaterial_type()) == 0) {
|
||||||
resultJson.put("code", "0");
|
// resultJson.put("code", "0");
|
||||||
resultJson.put("desc", "起点必须有货");
|
// resultJson.put("desc", "起点必须有货");
|
||||||
resultJson.put("result", "");
|
// resultJson.put("result", "");
|
||||||
return resultJson;
|
// return resultJson;
|
||||||
}
|
// }
|
||||||
if (!ObjectUtil.isEmpty(nextDevice.getMaterial_type()) && !StrUtil.equals(nextDevice.getMaterial_type(), "0")) {
|
// if (!ObjectUtil.isEmpty(nextDevice.getMaterial_type()) && !StrUtil.equals(nextDevice.getMaterial_type(), "0")) {
|
||||||
resultJson.put("code", "0");
|
// resultJson.put("code", "0");
|
||||||
resultJson.put("desc", "终点必须为空");
|
// resultJson.put("desc", "终点必须为空");
|
||||||
resultJson.put("result", "");
|
// resultJson.put("result", "");
|
||||||
return resultJson;
|
// return resultJson;
|
||||||
}
|
// }
|
||||||
if (Boolean.parseBoolean(startDevice.getIslock()) || Boolean.parseBoolean(nextDevice.getIslock())) {
|
// if (Boolean.parseBoolean(startDevice.getIslock()) || Boolean.parseBoolean(nextDevice.getIslock())) {
|
||||||
resultJson.put("code", "0");
|
// resultJson.put("code", "0");
|
||||||
resultJson.put("desc", "起点或终点设备已被锁定");
|
// resultJson.put("desc", "起点或终点设备已被锁定");
|
||||||
resultJson.put("result", "");
|
// resultJson.put("result", "");
|
||||||
return resultJson;
|
// return resultJson;
|
||||||
}
|
// }
|
||||||
if (StrUtil.isEmpty(priority)) {
|
if (StrUtil.isEmpty(priority)) {
|
||||||
priority = "1";
|
priority = "1";
|
||||||
}
|
}
|
||||||
@@ -359,10 +365,10 @@ public class HFHandServiceImpl implements HFHandService {
|
|||||||
dto.setVehicle_code(carrier);
|
dto.setVehicle_code(carrier);
|
||||||
try {
|
try {
|
||||||
taskService.create(dto);
|
taskService.create(dto);
|
||||||
startDevice.setIslock("true");
|
// startDevice.setIslock("true");
|
||||||
nextDevice.setIslock("true");
|
// nextDevice.setIslock("true");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
resultJson.put("code", "2");
|
resultJson.put("code", "0");
|
||||||
resultJson.put("desc", e.getMessage());
|
resultJson.put("desc", e.getMessage());
|
||||||
resultJson.put("result", "");
|
resultJson.put("result", "");
|
||||||
return resultJson;
|
return resultJson;
|
||||||
@@ -760,5 +766,14 @@ public class HFHandServiceImpl implements HFHandService {
|
|||||||
return jo;
|
return jo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryDevice() {
|
||||||
|
WQLObject wo = WQLObject.getWQLObject("acs_device");
|
||||||
|
JSONArray resultJSONArray = wo.query("1 = 1", "device_code").getResultJSONArray(0);
|
||||||
|
JSONObject jo = new JSONObject();
|
||||||
|
jo.put("code", "1");
|
||||||
|
jo.put("desc", "查询成功");
|
||||||
|
jo.put("result", resultJSONArray);
|
||||||
|
return jo;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user