From 274e35670847fdee0028d4e6b96d6efe54da5605 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=B8=85?= <3115919733@qq.com> Date: Thu, 8 May 2025 14:21:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E8=BE=86=E5=87=BA=E5=85=A5=E5=8E=82?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/VehicleInOutController.java | 13 +++++++++++++ .../carinout/vehicleinout/entity/VehicleInOut.java | 11 ++++++----- .../vehicleinout/mapper/VehicleInOutMapper.java | 2 ++ .../vehicleinout/mapper/xml/VehicleInOutMapper.xml | 9 +++++++++ .../vehicleinout/service/IVehicleInOutService.java | 2 ++ .../service/impl/VehicleInOutServiceImpl.java | 5 +++++ .../controller/DeliveryDemandController.java | 2 +- 7 files changed, 38 insertions(+), 6 deletions(-) diff --git a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/controller/VehicleInOutController.java b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/controller/VehicleInOutController.java index 5b5add9..c37612d 100644 --- a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/controller/VehicleInOutController.java +++ b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/controller/VehicleInOutController.java @@ -181,6 +181,10 @@ public class VehicleInOutController extends JeecgController handleConfirm(@RequestBody VehicleInOut vehicleInOut) { + VehicleInOut byId = vehicleInOutService.getById(vehicleInOut.getId()); + if (Integer.parseInt(vehicleInOut.getCurrentStatus()) <= Integer.parseInt(byId.getCurrentStatus())) { + return Result.error("操作失败,请按照流程操作!"); + } if ("3".equals(vehicleInOut.getCurrentStatus())) { vehicleInOut.setAtaTime(new Date()); } else if ("4".equals(vehicleInOut.getCurrentStatus())) { @@ -233,4 +237,13 @@ public class VehicleInOutController extends JeecgController getCarNum() { + List vehicleInOuts = vehicleInOutService.getCarNum(); + IPage page = new Page<>(1, vehicleInOuts.size()); + page.setRecords(vehicleInOuts); + page.setTotal(vehicleInOuts.size()); + return Result.OK(page); + } } diff --git a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/entity/VehicleInOut.java b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/entity/VehicleInOut.java index d79413e..4db0a4a 100644 --- a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/entity/VehicleInOut.java +++ b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/entity/VehicleInOut.java @@ -4,10 +4,8 @@ import java.io.Serializable; import java.io.UnsupportedEncodingException; import java.util.Date; import java.math.BigDecimal; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.TableLogic; + +import com.baomidou.mybatisplus.annotation.*; import lombok.Data; import com.fasterxml.jackson.annotation.JsonFormat; import org.springframework.format.annotation.DateTimeFormat; @@ -100,7 +98,7 @@ public class VehicleInOut implements Serializable { @Excel(name = "出厂门", width = 15) @ApiModelProperty(value = "出厂门") private java.lang.String exitFactoryDoor; - /**当前状态 创建-0,对接人确认-1,预约入厂-2,审核入库-3,审核出厂-4*/ + /**当前状态 创建-0,预约入厂-1,对接人确认-2,审核入库-3,审核出厂-4*/ @Excel(name = "当前状态", width = 15, dicCode = "currentStatus") @Dict(dicCode = "currentStatus") @ApiModelProperty(value = "当前状态") @@ -141,4 +139,7 @@ public class VehicleInOut implements Serializable { private java.lang.Double exitWeight; /**用车需求计算id*/ private java.lang.String vehicleDemandCountId; + /** 当前排队数 */ + @TableField(exist = false) + private Integer lineUpCount; } diff --git a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/mapper/VehicleInOutMapper.java b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/mapper/VehicleInOutMapper.java index e2765fb..b3f2a8a 100644 --- a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/mapper/VehicleInOutMapper.java +++ b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/mapper/VehicleInOutMapper.java @@ -18,4 +18,6 @@ public interface VehicleInOutMapper extends BaseMapper { VehicleInOutCount getCount(); List getVehicle(VehicleParam vehicleParam); + + List getCarNum(); } diff --git a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/mapper/xml/VehicleInOutMapper.xml b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/mapper/xml/VehicleInOutMapper.xml index 998e6df..3ce07cf 100644 --- a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/mapper/xml/VehicleInOutMapper.xml +++ b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/mapper/xml/VehicleInOutMapper.xml @@ -23,4 +23,13 @@ WHERE b.SHIP_DATE >= #{beginDate} and b.SHIP_DATE <= #{endDate}; + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/service/IVehicleInOutService.java b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/service/IVehicleInOutService.java index 4d1e98f..5b3696b 100644 --- a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/service/IVehicleInOutService.java +++ b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/service/IVehicleInOutService.java @@ -18,4 +18,6 @@ public interface IVehicleInOutService extends IService { VehicleInOutCount getCount(); List getVehicle(VehicleParam vehicleParam); + + List getCarNum(); } diff --git a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/service/impl/VehicleInOutServiceImpl.java b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/service/impl/VehicleInOutServiceImpl.java index 8bcdc43..0d60b09 100644 --- a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/service/impl/VehicleInOutServiceImpl.java +++ b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/carinout/vehicleinout/service/impl/VehicleInOutServiceImpl.java @@ -32,4 +32,9 @@ public class VehicleInOutServiceImpl extends ServiceImpl getVehicle(VehicleParam vehicleParam) { return vehicleInOutMapper.getVehicle(vehicleParam); } + + @Override + public List getCarNum() { + return vehicleInOutMapper.getCarNum(); + } } diff --git a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/outbound/deliverydemand/controller/DeliveryDemandController.java b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/outbound/deliverydemand/controller/DeliveryDemandController.java index 7ef56eb..218fdee 100644 --- a/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/outbound/deliverydemand/controller/DeliveryDemandController.java +++ b/jeecg-boot/jeecg-module-tms/src/main/java/org/jeecg/modules/tms/outbound/deliverydemand/controller/DeliveryDemandController.java @@ -225,7 +225,7 @@ public class DeliveryDemandController extends JeecgController