rev:手持查询点位接口修改:查询时添加是否有载具字段
This commit is contained in:
@@ -49,13 +49,18 @@ public class PdaController {
|
||||
@Log("查询设备编号及状态")
|
||||
@ApiOperation("查询设备编号及状态")
|
||||
@SaIgnore
|
||||
//@PreAuthorize("@el.check('sect:list')")
|
||||
//@RequestBody JSONObject json
|
||||
public ResponseEntity<Object> queryPoint(@RequestBody Map<String, String> whereJson) {
|
||||
SchBasePoint region = new SchBasePoint();
|
||||
region.setRegion_code(whereJson.get("region_code"));
|
||||
region.setPoint_code(whereJson.get("point_code"));
|
||||
return new ResponseEntity<>(pointService.getPointList(region), HttpStatus.OK);
|
||||
if(whereJson.containsKey("need_emtpy")){
|
||||
if("1".equals(whereJson.get("need_emtpy"))){
|
||||
region.setVehicle_qty(1);
|
||||
}else{
|
||||
region.setVehicle_qty(0);
|
||||
}
|
||||
}
|
||||
return new ResponseEntity<>(pointService.getPointListByPda(region), HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/region")
|
||||
|
||||
@@ -56,6 +56,13 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
|
||||
*/
|
||||
List<SchBasePoint> getPointList(SchBasePoint region);
|
||||
|
||||
/**
|
||||
* 获取点位
|
||||
* @param region
|
||||
* @return
|
||||
*/
|
||||
List<SchBasePoint> getPointListByPda(SchBasePoint region);
|
||||
|
||||
/**
|
||||
* 获取点位
|
||||
* @param RegionCodes
|
||||
|
||||
@@ -19,6 +19,7 @@ import org.nl.wms.sch.point.service.dao.SchBasePoint;
|
||||
import org.nl.wms.sch.point.service.dao.mapper.SchBasePointMapper;
|
||||
import org.nl.wms.sch.region.service.dao.SchBaseRegion;
|
||||
import org.nl.wms.sch.region.service.dao.mapper.SchBaseRegionMapper;
|
||||
import org.nl.wms.sch.task.service.dao.SchBaseTask;
|
||||
import org.nl.wms.sch.task_manage.enums.PointStatusEnum;
|
||||
import org.nl.wms.util.PointUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -186,9 +187,22 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getRegion_code, region.getRegion_code())
|
||||
.like(region.getPoint_code()!=null,SchBasePoint::getPoint_code, region.getPoint_code())
|
||||
.eq(SchBasePoint::getIs_used, 1)
|
||||
.eq(SchBasePoint::getIs_has_workder, 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SchBasePoint> getPointListByPda(SchBasePoint region) {
|
||||
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(ObjectUtil.isNotEmpty(region.getRegion_code()),SchBasePoint::getRegion_code, region.getRegion_code())
|
||||
.like(ObjectUtil.isNotEmpty(region.getPoint_code()),SchBasePoint::getPoint_code, region.getPoint_code())
|
||||
.and(slam -> slam.eq(SchBasePoint::getIng_task_code, "")
|
||||
.or()
|
||||
.isNull(SchBasePoint::getIng_task_code))
|
||||
.eq(SchBasePoint::getIs_used, 1)
|
||||
.eq(ObjectUtil.isNotEmpty(region.getVehicle_qty()),SchBasePoint::getVehicle_qty, region.getVehicle_qty()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SchBasePoint> getPointsByRegionCodes(String RegionCodes) {
|
||||
Set<String> regions = new HashSet<>();
|
||||
@@ -196,7 +210,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
|
||||
regions.addAll(Arrays.asList(split));
|
||||
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.in(ObjectUtil.isNotEmpty(RegionCodes),SchBasePoint::getRegion_code,regions)
|
||||
.eq(SchBasePoint::getIs_has_workder, 1)
|
||||
.eq(SchBasePoint::getIs_used, 1)
|
||||
.orderByAsc(SchBasePoint::getPoint_code)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user