|
@ -108,6 +108,7 @@ public class HandheldServiceImpl implements HandheldService { |
|
|
private void applyDeliveryRacks(String vehicle, String device_code, JSONObject param) { |
|
|
private void applyDeliveryRacks(String vehicle, String device_code, JSONObject param) { |
|
|
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code); |
|
|
SchBasePoint schBasePoint = iSchBasePointService.selectByPointCode(device_code); |
|
|
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!"); |
|
|
if (ObjectUtil.isEmpty(schBasePoint)) throw new BadRequestException("设备点位不存在!"); |
|
|
|
|
|
if (schBasePoint.getIs_lock()) throw new BadRequestException("当前点位存在任务!"); |
|
|
MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.selectByVehicleCode(vehicle); |
|
|
MdBaseVehicle mdBaseVehicle = iMdBaseVehicleService.selectByVehicleCode(vehicle); |
|
|
if (ObjectUtil.isEmpty(mdBaseVehicle)) |
|
|
if (ObjectUtil.isEmpty(mdBaseVehicle)) |
|
|
throw new BadRequestException("载具不存在!"); |
|
|
throw new BadRequestException("载具不存在!"); |
|
@ -127,7 +128,9 @@ public class HandheldServiceImpl implements HandheldService { |
|
|
jo.put("vehicle_type", mdBaseVehicle.getVehicle_type()); |
|
|
jo.put("vehicle_type", mdBaseVehicle.getVehicle_type()); |
|
|
jo.put("ext_data", param); |
|
|
jo.put("ext_data", param); |
|
|
connectorTask.apply(jo); |
|
|
connectorTask.apply(jo); |
|
|
|
|
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class) |
|
|
|
|
|
.eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code()) |
|
|
|
|
|
.set(SchBasePoint::getIs_lock, true)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -285,7 +288,7 @@ public class HandheldServiceImpl implements HandheldService { |
|
|
/** |
|
|
/** |
|
|
* connector下料入库 |
|
|
* connector下料入库 |
|
|
* |
|
|
* |
|
|
* @param schBasePoint |
|
|
* @param |
|
|
* @param param |
|
|
* @param param |
|
|
* @param region_code |
|
|
* @param region_code |
|
|
* @param device_code |
|
|
* @param device_code |
|
@ -305,9 +308,7 @@ public class HandheldServiceImpl implements HandheldService { |
|
|
connectorTask.apply(jo); |
|
|
connectorTask.apply(jo); |
|
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class) |
|
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class) |
|
|
.eq(SchBasePoint::getPoint_code, device_code) |
|
|
.eq(SchBasePoint::getPoint_code, device_code) |
|
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()) |
|
|
.set(SchBasePoint::getIs_lock, true)); |
|
|
.set(SchBasePoint::getIs_lock, true) |
|
|
|
|
|
.set(SchBasePoint::getVehicle_code, null)); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -330,12 +331,12 @@ public class HandheldServiceImpl implements HandheldService { |
|
|
if (StrUtil.isBlank(region_code)) { |
|
|
if (StrUtil.isBlank(region_code)) { |
|
|
JSONObject json = new JSONObject(); |
|
|
JSONObject json = new JSONObject(); |
|
|
JSONArray jsonArray = new JSONArray(); |
|
|
JSONArray jsonArray = new JSONArray(); |
|
|
HashMap<String, Object> map = new HashMap<>(); |
|
|
|
|
|
materials.stream().forEach(material2 -> { |
|
|
materials.stream().forEach(material2 -> { |
|
|
boolean material_code = ObjectUtil.isEmpty(((LinkedHashMap) material2).get("material_code")); |
|
|
boolean material_code = ObjectUtil.isEmpty(((LinkedHashMap) material2).get("material_code")); |
|
|
if (material_code) { |
|
|
if (material_code) { |
|
|
((LinkedHashMap) material2).remove("material_code"); |
|
|
((LinkedHashMap) material2).remove("material_code"); |
|
|
} |
|
|
} |
|
|
|
|
|
HashMap<String, Object> map = new HashMap<>(); |
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material2); |
|
|
cn.hutool.json.JSONObject jsonObject = JSONUtil.parseObj(material2); |
|
|
map.put("order_code", jsonObject.get("order_code")); |
|
|
map.put("order_code", jsonObject.get("order_code")); |
|
|
map.put("qty", jsonObject.get("material_qty")); |
|
|
map.put("qty", jsonObject.get("material_qty")); |
|
@ -428,9 +429,7 @@ public class HandheldServiceImpl implements HandheldService { |
|
|
connectorTask.apply(jo); |
|
|
connectorTask.apply(jo); |
|
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class) |
|
|
iSchBasePointService.update(Wrappers.lambdaUpdate(SchBasePoint.class) |
|
|
.eq(SchBasePoint::getPoint_code, device_code) |
|
|
.eq(SchBasePoint::getPoint_code, device_code) |
|
|
.set(SchBasePoint::getPoint_status, GoodsEnum.OUT_OF_STOCK.getValue()) |
|
|
.set(SchBasePoint::getIs_lock, true)); |
|
|
.set(SchBasePoint::getIs_lock, true) |
|
|
|
|
|
.set(SchBasePoint::getVehicle_code, null)); |
|
|
|
|
|
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class) |
|
|
iSchBaseVehiclematerialgroupService.remove(Wrappers.lambdaQuery(SchBaseVehiclematerialgroup.class) |
|
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code)); |
|
|
.eq(SchBaseVehiclematerialgroup::getVehicle_code, vehicle_code)); |
|
|
materials.stream().forEach(material -> { |
|
|
materials.stream().forEach(material -> { |
|
|