add: 手持备货区管理
This commit is contained in:
@@ -139,4 +139,16 @@ public class SlitterPdaController {
|
|||||||
public ResponseEntity<Object> queryCacheDownSubVolumeInfos(@RequestBody JSONObject param) {
|
public ResponseEntity<Object> queryCacheDownSubVolumeInfos(@RequestBody JSONObject param) {
|
||||||
return new ResponseEntity<>(slitterDevices.queryCacheDownSubVolumeInfos(param), HttpStatus.OK);
|
return new ResponseEntity<>(slitterDevices.queryCacheDownSubVolumeInfos(param), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@PostMapping("/doStockAreaBinding")
|
||||||
|
@Log("手持备货区绑定")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> doStockAreaBinding(@RequestBody JSONObject param) {
|
||||||
|
return new ResponseEntity<>(slitterDevices.doStockAreaBinding(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
@PostMapping("/doStockAreaUnbinding")
|
||||||
|
@Log("手持备货区解除绑定")
|
||||||
|
@SaIgnore
|
||||||
|
public ResponseEntity<Object> doStockAreaUnbinding(@RequestBody JSONObject param) {
|
||||||
|
return new ResponseEntity<>(slitterDevices.doStockAreaUnbinding(param), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -228,4 +228,18 @@ public interface SlitterService {
|
|||||||
* @return /
|
* @return /
|
||||||
*/
|
*/
|
||||||
JSONObject queryCacheDownSubVolumeInfos(JSONObject param);
|
JSONObject queryCacheDownSubVolumeInfos(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手持备货区绑定
|
||||||
|
* @param param /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
JSONObject doStockAreaBinding(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 手持备货区解除绑定
|
||||||
|
* @param param /
|
||||||
|
* @return /
|
||||||
|
*/
|
||||||
|
JSONObject doStockAreaUnbinding(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1452,4 +1452,41 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject doStockAreaBinding(JSONObject param) {
|
||||||
|
// param: point_code vehicle_code
|
||||||
|
log.info("手持备货区绑定的数据:{}", param);
|
||||||
|
String pointCode = param.getString("point_code");
|
||||||
|
String vehicleCode = param.getString("vehicle_code");
|
||||||
|
BstIvtStockingivt pointByCode = stockingivtService.getPointByCode(pointCode, true);
|
||||||
|
if (ObjectUtil.isEmpty(pointByCode)) {
|
||||||
|
throw new BadRequestException("点位 [" + pointCode + "] 不存在或者已被禁用!");
|
||||||
|
}
|
||||||
|
pointByCode.setVehicle_code(vehicleCode);
|
||||||
|
pointByCode.setIvt_status("1");
|
||||||
|
TaskUtils.updateOptMessageByBStockingPoint(pointByCode);
|
||||||
|
JSONObject res = new JSONObject();
|
||||||
|
res.put("status", HttpStatus.HTTP_OK);
|
||||||
|
res.put("message", "备货区绑定成功!");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject doStockAreaUnbinding(JSONObject param) {
|
||||||
|
// param: point_code
|
||||||
|
log.info("手持备货区解除绑定的数据:{}", param);
|
||||||
|
String pointCode = param.getString("point_code");
|
||||||
|
BstIvtStockingivt pointByCode = stockingivtService.getPointByCode(pointCode, true);
|
||||||
|
if (ObjectUtil.isEmpty(pointByCode)) {
|
||||||
|
throw new BadRequestException("点位 [" + pointCode + "] 不存在或者已被禁用!");
|
||||||
|
}
|
||||||
|
pointByCode.setVehicle_code("");
|
||||||
|
pointByCode.setIvt_status("0");
|
||||||
|
TaskUtils.updateOptMessageByBStockingPoint(pointByCode);
|
||||||
|
JSONObject res = new JSONObject();
|
||||||
|
res.put("status", HttpStatus.HTTP_OK);
|
||||||
|
res.put("message", "备货区解绑成功!");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user