diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/SchBasePoint.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/SchBasePoint.java index 5de6c02..5d75908 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/SchBasePoint.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/dao/SchBasePoint.java @@ -7,6 +7,7 @@ import com.baomidou.mybatisplus.annotation.TableName; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; +import lombok.ToString; import java.math.BigDecimal; import java.io.Serializable; @@ -20,6 +21,7 @@ import java.util.List; @Data @EqualsAndHashCode(callSuper = false) @TableName("sch_base_point") +@ToString public class SchBasePoint implements Serializable { private static final long serialVersionUID = 1L; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java index 64fd43c..52b2366 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/sch/point/service/impl/SchBasePointServiceImpl.java @@ -138,6 +138,7 @@ public class SchBasePointServiceImpl extends ServiceImpl collect = ObjectUtil.isNotEmpty(more_task_status)?Arrays.stream(more_task_status.split(",")).collect(Collectors.toList()):null; + List collect = ObjectUtil.isNotEmpty(more_task_status) ? Arrays.stream(more_task_status.split(",")).collect(Collectors.toList()) : null; String unFinished = null; if (collect != null) { if (collect.contains(TaskStatus.UNFINISHED.getCode())) { @@ -189,30 +189,30 @@ public class SchBaseTaskServiceImpl extends ServiceImpl= Integer.parseInt(TaskStatus.FINISHED.getCode()) - &&!"feedback".equals(method_name)) { + && !"feedback".equals(method_name)) { throw new BadRequestException("任务已完成或已取消!"); } // 根据配置去工厂类获得类对象 @@ -267,12 +267,12 @@ public class SchBaseTaskServiceImpl extends ServiceImpl schBasePointList=schBasePointService.list(new LambdaQueryWrapper() - .eq(SchBasePoint::getIs_used,true) + List schBasePointList = schBasePointService.list(new LambdaQueryWrapper() + .eq(SchBasePoint::getIs_used, true) .eq(SchBasePoint::getRegion_code, "YLHC") - .notLike(SchBasePoint::getVehicle_code2,"YBHC") + .notLike(SchBasePoint::getVehicle_code2, "YBHC") .and(slam -> slam.isNull(SchBasePoint::getIng_task_code) .or() .eq(SchBasePoint::getIng_task_code, "") )); - List nextList=schBasePointService.list(new LambdaQueryWrapper() + List nextList = schBasePointService.list(new LambdaQueryWrapper() .eq(SchBasePoint::getRegion_code, "YL") + .eq(SchBasePoint::getIs_used, true) + .eq(SchBasePoint::getVehicle_qty, 0) .and(slam -> slam.isNull(SchBasePoint::getIng_task_code) .or() .eq(SchBasePoint::getIng_task_code, ""))); - for(SchBasePoint schBasePoint:schBasePointList){ - JSONObject param =new JSONObject(); - param.put("start_point",schBasePoint.getPoint_code()); - param.put("next_point",nextList.get(0).getPoint_code()); + for (SchBasePoint schBasePoint : schBasePointList) { + JSONObject param = new JSONObject(); + param.put("start_point", schBasePoint.getPoint_code()); + param.put("next_point", nextList.get(0).getPoint_code()); param.put("request_medthod_code", "POINTTask"); param.put("request_medthod_name", "点对点任务"); - param.put("device_code",param.getString("start_point")); - BaseResponse baseResponse=acsToWmsService.acsApply(param); + param.put("device_code", param.getString("start_point")); + BaseResponse baseResponse = acsToWmsService.acsApply(param); nextList.remove(0); } }