Browse Source

rev:手持查询点位接口修改:查询时添加是否有载具字段

master
zds 3 months ago
parent
commit
520e95179d
  1. 11
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java
  2. 7
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java
  3. 16
      lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java

11
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pda/controller/PdaController.java

@ -49,13 +49,18 @@ public class PdaController {
@Log("查询设备编号及状态") @Log("查询设备编号及状态")
@ApiOperation("查询设备编号及状态") @ApiOperation("查询设备编号及状态")
@SaIgnore @SaIgnore
//@PreAuthorize("@el.check('sect:list')")
//@RequestBody JSONObject json
public ResponseEntity<Object> queryPoint(@RequestBody Map<String, String> whereJson) { public ResponseEntity<Object> queryPoint(@RequestBody Map<String, String> whereJson) {
SchBasePoint region = new SchBasePoint(); SchBasePoint region = new SchBasePoint();
region.setRegion_code(whereJson.get("region_code")); region.setRegion_code(whereJson.get("region_code"));
region.setPoint_code(whereJson.get("point_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") @PostMapping("/region")

7
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/ISchBasePointService.java

@ -56,6 +56,13 @@ public interface ISchBasePointService extends IService<SchBasePoint> {
*/ */
List<SchBasePoint> getPointList(SchBasePoint region); List<SchBasePoint> getPointList(SchBasePoint region);
/**
* 获取点位
* @param region
* @return
*/
List<SchBasePoint> getPointListByPda(SchBasePoint region);
/** /**
* 获取点位 * 获取点位
* @param RegionCodes * @param RegionCodes

16
lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java

@ -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.point.service.dao.mapper.SchBasePointMapper;
import org.nl.wms.sch.region.service.dao.SchBaseRegion; import org.nl.wms.sch.region.service.dao.SchBaseRegion;
import org.nl.wms.sch.region.service.dao.mapper.SchBaseRegionMapper; 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.sch.task_manage.enums.PointStatusEnum;
import org.nl.wms.util.PointUtils; import org.nl.wms.util.PointUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -186,9 +187,22 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>() return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
.eq(SchBasePoint::getRegion_code, region.getRegion_code()) .eq(SchBasePoint::getRegion_code, region.getRegion_code())
.like(region.getPoint_code()!=null,SchBasePoint::getPoint_code, region.getPoint_code()) .like(region.getPoint_code()!=null,SchBasePoint::getPoint_code, region.getPoint_code())
.eq(SchBasePoint::getIs_used, 1)
.eq(SchBasePoint::getIs_has_workder, 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 @Override
public List<SchBasePoint> getPointsByRegionCodes(String RegionCodes) { public List<SchBasePoint> getPointsByRegionCodes(String RegionCodes) {
Set<String> regions = new HashSet<>(); Set<String> regions = new HashSet<>();
@ -196,7 +210,7 @@ public class SchBasePointServiceImpl extends ServiceImpl<SchBasePointMapper, Sch
regions.addAll(Arrays.asList(split)); regions.addAll(Arrays.asList(split));
return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>() return pointMapper.selectList(new LambdaQueryWrapper<SchBasePoint>()
.in(ObjectUtil.isNotEmpty(RegionCodes),SchBasePoint::getRegion_code,regions) .in(ObjectUtil.isNotEmpty(RegionCodes),SchBasePoint::getRegion_code,regions)
.eq(SchBasePoint::getIs_has_workder, 1) .eq(SchBasePoint::getIs_used, 1)
.orderByAsc(SchBasePoint::getPoint_code) .orderByAsc(SchBasePoint::getPoint_code)
); );
} }

Loading…
Cancel
Save