|
|
@ -265,9 +265,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) { |
|
|
|
SchBasePoint schBasePoint = schBasePoints.get(0); |
|
|
|
schBasePoint.setIs_lock(true); |
|
|
|
update(Wrappers.lambdaUpdate(SchBasePoint.class) |
|
|
|
.eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code()) |
|
|
|
.set(SchBasePoint::getIs_lock, true)); |
|
|
|
PointUtils.setUpdateByAcs(schBasePoint); |
|
|
|
pointMapper.updateById(schBasePoint); |
|
|
|
return schBasePoint; |
|
|
|
} |
|
|
|
SchBasePoint schBasePoint1 = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class).eq(SchBasePoint::getRegion_code, region_code)).get(0); |
|
|
@ -284,9 +283,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
schBasePoints1.stream().sorted(Comparator.comparingInt(schBasePoint -> Math.abs(schBasePoint1.getRegion_seq() - schBasePoint.getRegion_seq()))); |
|
|
|
SchBasePoint schBasePoint = schBasePoints1.get(0); |
|
|
|
schBasePoint.setIs_lock(true); |
|
|
|
update(Wrappers.lambdaUpdate(SchBasePoint.class) |
|
|
|
.eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code()) |
|
|
|
.set(SchBasePoint::getIs_lock, true)); |
|
|
|
PointUtils.setUpdateByAcs(schBasePoint); |
|
|
|
pointMapper.updateById(schBasePoint); |
|
|
|
return schBasePoint; |
|
|
|
} |
|
|
|
return null; |
|
|
@ -396,8 +394,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
.eq(SchBasePoint::getIs_lock, false) |
|
|
|
.eq(SchBasePoint::getIs_used, true) |
|
|
|
.eq(SchBasePoint::getPoint_status, pointStatus) |
|
|
|
.eq(!vehicle_type.equals("G01"),SchBasePoint::getPoint_type, "1") |
|
|
|
.eq(vehicle_type.equals("G01"),SchBasePoint::getPoint_type, "0") |
|
|
|
.eq(!vehicle_type.equals("G01"), SchBasePoint::getPoint_type, "1") |
|
|
|
.eq(vehicle_type.equals("G01"), SchBasePoint::getPoint_type, "0") |
|
|
|
.eq(StrUtil.isNotBlank(vehicle_type), SchBasePoint::getCan_vehicle_type, vehicle_type) |
|
|
|
.isNull(seq == 2, SchBasePoint::getVehicles) |
|
|
|
.isNull(seq == 1, SchBasePoint::getVehicle_code) |
|
|
@ -417,7 +415,11 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
.eq(SchBasePoint::getCan_vehicle_type, vehicle_type) |
|
|
|
.isNotNull(SchBasePoint::getVehicle_code)); |
|
|
|
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) { |
|
|
|
return schBasePoints.get(0); |
|
|
|
SchBasePoint schBasePoint = schBasePoints.get(0); |
|
|
|
schBasePoint.setIs_lock(true); |
|
|
|
PointUtils.setUpdateByAcs(schBasePoint); |
|
|
|
updateById(schBasePoint); |
|
|
|
return schBasePoint; |
|
|
|
} |
|
|
|
schBasePoints = pointMapper.selectList(Wrappers.lambdaQuery(SchBasePoint.class) |
|
|
|
.eq(SchBasePoint::getIs_lock, false) |
|
|
@ -462,6 +464,9 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
} |
|
|
|
if (ObjectUtil.isEmpty(schBasePoint1)) throw new BadRequestException("该货位不存在!"); |
|
|
|
schBasePoint1.setVehicle_code(s); |
|
|
|
schBasePoint1.setIs_lock(true); |
|
|
|
PointUtils.setUpdateByAcs(schBasePoint1); |
|
|
|
updateById(schBasePoint1); |
|
|
|
return schBasePoint1; |
|
|
|
} |
|
|
|
return null; |
|
|
@ -526,7 +531,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
if (jsonObject.get("point_status").equals(GoodsEnum.EMPTY_PALLETS.getValue()) || jsonObject.get("point_status").equals(GoodsEnum.IN_STOCK.getValue())) { |
|
|
|
jsonObject.put("point_status", "1"); |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
jsonObject.put("point_status", "0"); |
|
|
|
} |
|
|
|
}); |
|
|
@ -550,9 +555,8 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
if (CollUtil.isNotEmpty(schBasePoints) && schBasePoints.size() > 0) { |
|
|
|
SchBasePoint schBasePoint = schBasePoints.get(0); |
|
|
|
schBasePoint.setIs_lock(true); |
|
|
|
update(Wrappers.lambdaUpdate(SchBasePoint.class) |
|
|
|
.eq(SchBasePoint::getPoint_code, schBasePoint.getPoint_code()) |
|
|
|
.set(SchBasePoint::getIs_lock, true)); |
|
|
|
PointUtils.setUpdateByAcs(schBasePoint); |
|
|
|
updateById(schBasePoint); |
|
|
|
return schBasePoint; |
|
|
|
} |
|
|
|
return null; |
|
|
@ -612,9 +616,9 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch |
|
|
|
return null; |
|
|
|
} |
|
|
|
SchBasePoint schBasePoint = schBasePoints.get(0); |
|
|
|
this.update(new UpdateWrapper<SchBasePoint>() |
|
|
|
.set("is_lock", true) |
|
|
|
.eq("point_code", schBasePoint.getPoint_code())); |
|
|
|
schBasePoint.setIs_lock(true); |
|
|
|
PointUtils.setUpdateByAcs(schBasePoint); |
|
|
|
pointMapper.updateById(schBasePoint); |
|
|
|
return schBasePoint; |
|
|
|
} |
|
|
|
} |
|
|
|