调用方只能传入新建的更新对象,不得直接传入数据库查询得到的完整 DO,避免覆盖未变更状态。
+ */ + int updateStateWithVersion(@Param("plan") DailyPlanDO plan); + + /** 原子确认数量并开始未开始订单。 */ + int startOrderWithVersion(@Param("plan") DailyPlanDO plan); + + /** 原子追加需求数量,并重新打开已经完成的备货、套管作业。 */ + int appendQuantityWithVersion(@Param("dailyPlanId") Long dailyPlanId, + @Param("appendQty") Integer appendQty, + @Param("version") Integer version, + @Param("updater") String updater); + + /** + * 乐观锁恢复已取消的订单状态,并清空前一订单状态。 + */ + int restoreOrderWithVersion(@Param("dailyPlanId") Long dailyPlanId, + @Param("version") Integer version, + @Param("updater") String updater); + + /** + * 乐观锁恢复已取消的备货状态,并清空前一备货状态。 + */ + int restoreStockingWithVersion(@Param("dailyPlanId") Long dailyPlanId, + @Param("version") Integer version, + @Param("updater") String updater); + + /** + * 乐观锁恢复已取消的套管状态,并清空前一套管状态。 + */ + int restoreSleevingWithVersion(@Param("dailyPlanId") Long dailyPlanId, + @Param("version") Integer version, + @Param("updater") String updater); + + /** + * 乐观锁更新排序序号。 + */ + int updateSortWithVersion(@Param("dailyPlanId") Long dailyPlanId, + @Param("sortSeq") Integer sortSeq, + @Param("version") Integer version, + @Param("updater") String updater); + + /** + * 乐观锁更新调度权重。 + */ + int updateWeightWithVersion(@Param("dailyPlanId") Long dailyPlanId, + @Param("weight") Integer weight, + @Param("version") Integer version, + @Param("updater") String updater); + + /** + * 原子增加已备货数量,并在达到总量时完成备货。 + */ + int increaseStockedQuantityByClaim(@Param("dailyPlanId") Long dailyPlanId, + @Param("incrementQty") Integer incrementQty, + @Param("expectedQty") Integer expectedQty, + @Param("updater") String updater); + + /** + * 原子增加已套管数量,并在达到总量时完成套管。 + */ + int increaseSleevedQuantityByClaim(@Param("dailyPlanId") Long dailyPlanId, + @Param("incrementQty") Integer incrementQty, + @Param("expectedQty") Integer expectedQty, + @Param("updater") String updater); +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/mysql/dailyplan/DailyPlanOperationLogMapper.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/mysql/dailyplan/DailyPlanOperationLogMapper.java new file mode 100644 index 00000000..c0f4e41f --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/dal/mysql/dailyplan/DailyPlanOperationLogMapper.java @@ -0,0 +1,25 @@ +package cn.code.nl.module.lms.dal.mysql.dailyplan; + +import cn.code.nl.framework.mybatis.core.mapper.BaseMapperX; +import cn.code.nl.module.lms.dal.dataobject.dailyplan.DailyPlanOperationLogDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * LMS 日计划操作日志 Mapper。 + */ +@Mapper +public interface DailyPlanOperationLogMapper extends BaseMapperX{@link TenantJob} 会按租户分别执行;每个租户每次最多创建一条管芯抓取或托盘搬运任务。
+ */ + @XxlJob("dailyPlanStockingJob") + @TenantJob + public void dailyPlanStockingJob() { + String result = dispatchService.dispatchStockingOnce(); + log.info("日计划备货调度完成:{}", result); + XxlJobHelper.log(result); + XxlJobHelper.handleSuccess(result); + } + + /** + * 执行套管调度。 + * + *{@link TenantJob} 会按租户分别执行;每个租户每次最多创建一条单根管芯出库任务。
+ */ + @XxlJob("dailyPlanSleevingJob") + @TenantJob + public void dailyPlanSleevingJob() { + String result = dispatchService.dispatchSleevingOnce(); + log.info("日计划套管调度完成:{}", result); + XxlJobHelper.log(result); + XxlJobHelper.handleSuccess(result); + } +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/coretube/CoreTubeBindingService.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/coretube/CoreTubeBindingService.java new file mode 100644 index 00000000..e993e657 --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/coretube/CoreTubeBindingService.java @@ -0,0 +1,41 @@ +package cn.code.nl.module.lms.service.coretube; + +import cn.code.nl.module.lms.controller.pda.coretube.vo.CoreTubeBindReqVO; +import cn.code.nl.module.lms.controller.pda.coretube.vo.CoreTubeBindRespVO; +import cn.code.nl.module.lms.controller.pda.coretube.vo.CoreTubeMaterialRespVO; +import cn.code.nl.module.lms.controller.pda.coretube.vo.CoreTubePalletRespVO; +import cn.code.nl.module.lms.controller.pda.coretube.vo.CoreTubePointBindReqVO; +import cn.code.nl.module.lms.controller.pda.coretube.vo.CoreTubePointRespVO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 管芯托盘绑定服务。 + */ +public interface CoreTubeBindingService { + + /** 查询管芯托盘详情。 */ + CoreTubePalletRespVO getPallet(String vehicleCode); + + /** 根据物料编码查询待绑定的管芯物料。 */ + CoreTubeMaterialRespVO getMaterial(String materialCode); + + /** 查询可绑定的启用物料列表。 */ + List优先从对接位抓取一根目标管芯;全部候选都不能直接抓取时,本轮最多创建一条托盘任务。
+ */ + String dispatchStockingOnce(); + + /** 从管芯库选择一根目标管芯并创建出库任务;本轮最多创建一条。 */ + String dispatchSleevingOnce(); + + /** 幂等处理现场任务完成,仅单根任务完成时累计对应日计划进度。 */ + void handleFinished(Long taskId, boolean sleeving); + + /** 幂等处理现场任务取消,释放管芯占用及未确认的日计划 Claim。 */ + void handleCancelled(Long taskId, boolean sleeving); +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/coretube/CoreTubeTaskDispatchServiceImpl.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/coretube/CoreTubeTaskDispatchServiceImpl.java new file mode 100644 index 00000000..5778e42a --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/coretube/CoreTubeTaskDispatchServiceImpl.java @@ -0,0 +1,377 @@ +package cn.code.nl.module.lms.service.coretube; + +import cn.code.nl.framework.common.pojo.CommonResult; +import cn.code.nl.framework.common.util.json.JsonUtils; +import cn.code.nl.module.lms.dal.dataobject.coretube.CoreTubeDO; +import cn.code.nl.module.lms.dal.dataobject.stockingivt.StockingIvtDO; +import cn.code.nl.module.lms.dal.mysql.coretube.CoreTubeMapper; +import cn.code.nl.module.lms.dal.mysql.stockingivt.StockingIvtMapper; +import cn.code.nl.module.lms.enums.CoreTubeHandleCodeConstants; +import cn.code.nl.module.lms.enums.CoreTubeLocationTypeEnum; +import cn.code.nl.module.lms.enums.CoreTubeStageEnum; +import cn.code.nl.module.lms.enums.CoreTubeStatusEnum; +import cn.code.nl.module.lms.enums.CoreTubeTaskBizTypeEnum; +import cn.code.nl.module.lms.service.dailyplan.DailyPlanScheduleCandidate; +import cn.code.nl.module.lms.service.dailyplan.DailyPlanScheduleService; +import cn.code.nl.module.task.api.TransportTaskApi; +import cn.code.nl.module.task.dto.TaskInfoDTO; +import cn.code.nl.module.task.dto.TransportTaskCreateReqDTO; +import jakarta.annotation.Resource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +/** 管芯日计划现场任务调度服务实现。 */ +@Slf4j +@Service +public class CoreTubeTaskDispatchServiceImpl implements CoreTubeTaskDispatchService { + + /** 定时调度写入数据库的操作人标识。 */ + private static final String OPERATOR = "SCHEDULER"; + /** Task 模块业务防重使用的归属服务。 */ + private static final String OWNER_SERVICE = "LMS"; + + /** 日计划候选、排他领取及进度确认服务。 */ + @Resource + private DailyPlanScheduleService dailyPlanScheduleService; + /** 管芯实例数据库访问对象。 */ + @Resource + private CoreTubeMapper coreTubeMapper; + /** 备货区点位及托盘格位数据库访问对象。 */ + @Resource + private StockingIvtMapper stockingIvtMapper; + /** 现场运输任务远程服务。 */ + @Resource + private TransportTaskApi transportTaskApi; + + /** AGV 系统类型,由现场 Task/ACS 配置约定。 */ + @Value("${lms.core-tube.agv-system-type:AGV}") + private String agvSystemType; + /** 缓存位到对接位的托盘移入 ACS 任务类型。 */ + @Value("${lms.core-tube.pallet-in-acs-type:CORE_PALLET_IN}") + private String palletInAcsType; + /** 对接位到缓存位的托盘移出 ACS 任务类型。 */ + @Value("${lms.core-tube.pallet-out-acs-type:CORE_PALLET_OUT}") + private String palletOutAcsType; + /** 对接位单根管芯抓取 ACS 任务类型。 */ + @Value("${lms.core-tube.stocking-pick-acs-type:CORE_STOCKING_PICK}") + private String stockingPickAcsType; + /** 管芯库单根出库 ACS 任务类型。 */ + @Value("${lms.core-tube.sleeving-out-acs-type:CORE_SLEEVING_OUT}") + private String sleevingOutAcsType; + /** 备货抓取任务的管芯库入口逻辑点位。 */ + @Value("${lms.core-tube.stocking-target-point:CORE_WAREHOUSE_IN}") + private String stockingTargetPoint; + /** 管芯出库任务的套管机构入口逻辑点位。 */ + @Value("${lms.core-tube.sleeving-target-point:SLEEVING_IN}") + private String sleevingTargetPoint; + + /** + * 执行一轮备货调度。 + * + *按当前顺序/权重策略扫描不同规格,任一对接位存在目标管芯时立即创建一条单根抓取任务。 + * 全部规格都不能直接抓取时,才允许创建一条托盘移出或移入任务,避免一轮产生多条托盘任务。
+ */ + @Override + @Transactional(rollbackFor = Exception.class) + public String dispatchStockingOnce() { + List按策略扫描不同规格,从管芯库选择一根可用管芯创建出库任务。缺货时只记录 + * “正在备货”或“备货区库存不足”,继续尝试下一规格。
+ */ + @Override + @Transactional(rollbackFor = Exception.class) + public String dispatchSleevingOnce() { + List先领取日计划的一根额度,再原子预占管芯并创建 Task。只有 Task 创建及本地绑定都成功, + * 才标记 Claim 已创建任务并推进权重游标;任一步失败由外层事务回滚本地占用。
+ */ + protected Long createSingleTubeTask(DailyPlanScheduleCandidate preview, CoreTubeDO tube, boolean sleeving) { + DailyPlanScheduleCandidate claim = sleeving + ? dailyPlanScheduleService.claimSleevingCandidate(preview.getDailyPlanId(), OPERATOR) + : dailyPlanScheduleService.claimStockingCandidate(preview.getDailyPlanId(), OPERATOR); + int oldStage = sleeving ? CoreTubeStageEnum.CORE_WAREHOUSE.getCode() : CoreTubeStageEnum.STOCKING_AREA.getCode(); + int newStage = sleeving ? CoreTubeStageEnum.CORE_OUTBOUND.getCode() : CoreTubeStageEnum.STOCKING_PICKING.getCode(); + if (coreTubeMapper.reserveTube(tube.getCoreTubeId(), oldStage, newStage, claim.getDailyPlanId(), + claim.getClaimToken(), claim.getClaimExpireTime(), OPERATOR) != 1) { + dailyPlanScheduleService.releaseClaim(claim.getClaimToken(), OPERATOR); + throw new IllegalStateException("管芯已被其他任务占用"); + } + CoreTubeTaskContext context = new CoreTubeTaskContext(); + context.setBizType((sleeving ? CoreTubeTaskBizTypeEnum.CORE_TUBE_SLEEVING_OUT + : CoreTubeTaskBizTypeEnum.CORE_TUBE_STOCKING_PICK).name()); + context.setDailyPlanId(claim.getDailyPlanId()); + context.setClaimToken(claim.getClaimToken()); + context.setCoreTubeId(tube.getCoreTubeId()); + context.setCoreTubeCode(tube.getCoreTubeCode()); + context.setVehicleCode(tube.getVehicleCode()); + context.setSourcePointId(tube.getCurrentLocationId()); + context.setSourcePointCode(tube.getCurrentLocationCode()); + context.setTargetPointCode(sleeving ? sleevingTargetPoint : stockingTargetPoint); + String bizType = context.getBizType(); + String bizId = tube.getCoreTubeCode(); + Long taskId = createTask(buildTubeTask(claim, tube, context, sleeving), bizType, bizId); + if (coreTubeMapper.bindTask(tube.getCoreTubeId(), taskId, OPERATOR) != 1) { + throw new IllegalStateException("管芯任务绑定失败"); + } + dailyPlanScheduleService.confirmTaskCreated(claim.getClaimToken(), OPERATOR); + return taskId; + } + + /** + * 所有规格都不能直接抓取时创建一条托盘任务。 + * + *对接位有托盘时优先移出;对接位为空时,按“可一次满足剩余量的最小托盘, + * 否则库存最多托盘”选择缓存位托盘。业务键保证同规格未完成移入任务唯一。
+ */ + private String createPalletTask(ListTask 模块按 ownerService、bizType、bizId 防重。远程响应丢失时回查未完成任务, + * 避免调用方重试再创建一条相同现场任务。
+ */ + private Long createTask(TransportTaskCreateReqDTO request, String bizType, String bizId) { + request.setBizType(bizType); + request.setBizId(bizId); + CommonResult托盘任务只迁移点位和整托盘管芯位置,不累计日计划数量;单根抓取/出库任务 + * 完成后才清理管芯占用、确认 Claim,并分别累计已备货或已套管数量。
+ */ + @Override + @Transactional(rollbackFor = Exception.class) + public void handleFinished(Long taskId, boolean sleeving) { + TaskInfoDTO task = getTask(taskId); + CoreTubeTaskContext context = JsonUtils.parseObject(task.getRequestParam(), CoreTubeTaskContext.class); + if (CoreTubeTaskBizTypeEnum.CORE_TUBE_PALLET_IN.name().equals(context.getBizType()) + || CoreTubeTaskBizTypeEnum.CORE_TUBE_PALLET_OUT.name().equals(context.getBizType())) { + int affected = stockingIvtMapper.completeVehicleMove(context.getSourcePointId(), + context.getTargetPointId(), context.getVehicleCode(), OPERATOR); + if (affected == 0) { + return; + } + if (affected != 2) { + throw new IllegalStateException("托盘点位转移状态不完整,taskId=" + taskId); + } + int locationType = CoreTubeTaskBizTypeEnum.CORE_TUBE_PALLET_IN.name().equals(context.getBizType()) + ? CoreTubeLocationTypeEnum.STOCKING_DOCK.getCode() + : CoreTubeLocationTypeEnum.STOCKING_CACHE.getCode(); + coreTubeMapper.updateVehicleLocation(context.getVehicleCode(), locationType, + context.getTargetPointId(), context.getTargetPointCode(), OPERATOR); + return; + } + int stage = sleeving ? CoreTubeStageEnum.SLEEVING.getCode() : CoreTubeStageEnum.CORE_WAREHOUSE.getCode(); + int locationType = sleeving ? CoreTubeLocationTypeEnum.EQUIPMENT.getCode() + : CoreTubeLocationTypeEnum.CORE_WAREHOUSE.getCode(); + if (coreTubeMapper.completeTubeTask(context.getCoreTubeId(), taskId, stage, + sleeving ? CoreTubeStatusEnum.PROCESSING.getCode() : CoreTubeStatusEnum.AVAILABLE.getCode(), + locationType, context.getTargetPointId(), context.getTargetPointCode(), true, OPERATOR) == 1) { + if (sleeving) { + dailyPlanScheduleService.increaseSleevedQuantity(context.getClaimToken(), + context.getDailyPlanId(), 1, OPERATOR); + } else { + stockingIvtMapper.deletePaperVehicleCoreTube(context.getCoreTubeId()); + dailyPlanScheduleService.increaseStockedQuantity(context.getClaimToken(), + context.getDailyPlanId(), 1, OPERATOR); + } + } + } + + /** + * 幂等处理任务取消。 + * + *只有仍绑定当前 taskId 的管芯会恢复为可用,同时释放对应 Claim;重复取消不会重复释放。
+ */ + @Override + @Transactional(rollbackFor = Exception.class) + public void handleCancelled(Long taskId, boolean sleeving) { + TaskInfoDTO task = getTask(taskId); + CoreTubeTaskContext context = JsonUtils.parseObject(task.getRequestParam(), CoreTubeTaskContext.class); + if (context.getCoreTubeId() == null) { + return; + } + int affected = coreTubeMapper.cancelTubeTask(context.getCoreTubeId(), taskId, + sleeving ? CoreTubeStageEnum.CORE_WAREHOUSE.getCode() : CoreTubeStageEnum.STOCKING_AREA.getCode(), + OPERATOR); + if (affected == 1) { + dailyPlanScheduleService.releaseClaim(context.getClaimToken(), OPERATOR); + } + } + + /** 查询任务详情。 */ + private TaskInfoDTO getTask(Long taskId) { + CommonResult顺序模式从排序最小的计划开始;权重模式从策略游标开始轮转。预览阶段只决定尝试顺序, + * 不提前分配库存,也不会消耗权重。
+ */ + private List同一日计划的备货与套管使用不同 strategyType,可并行各自领取;同一种作业通过 + * 活动唯一键保证同一时刻最多一个 Claim。
+ */ + private DailyPlanScheduleCandidate claimCandidate(DailyPlanDO plan, int quantity, Integer strategyMode, + DailyPlanStrategyTypeEnum type, String operator) { + LocalDateTime expireTime = nextClaimExpireTime(); + DailyPlanClaimDO claim = new DailyPlanClaimDO(); + claim.setClaimId(IdWorker.getId()); + claim.setClaimToken(IdUtil.fastSimpleUUID()); + claim.setDailyPlanId(plan.getDailyPlanId()); + claim.setStrategyType(type.getCode()); + claim.setClaimedQty(quantity); + claim.setPlanVersion(plan.getVersion()); + claim.setProgressQty(type == DailyPlanStrategyTypeEnum.STOCKING ? plan.getStockedQty() : plan.getSleevedQty()); + claim.setExpireTime(expireTime); + claim.setOperator(normalizedOperator(operator)); + try { + if (dailyPlanClaimMapper.insertClaim(claim) != 1) { + throw exception(DAILY_PLAN_CLAIM_CONFLICT); + } + } catch (DuplicateKeyException ex) { + throw exception(DAILY_PLAN_CLAIM_CONFLICT); + } + DailyPlanScheduleCandidate candidate = convertCandidate(plan, strategyMode, type); + candidate.setSuggestedQuantity(quantity); + candidate.setClaimToken(claim.getClaimToken()); + candidate.setClaimExpireTime(expireTime); + return candidate; + } + + /** 将日计划转换为调度候选。 */ + private DailyPlanScheduleCandidate convertCandidate(DailyPlanDO plan, Integer strategyMode, + DailyPlanStrategyTypeEnum type) { + DailyPlanScheduleCandidate candidate = new DailyPlanScheduleCandidate(); + candidate.setDailyPlanId(plan.getDailyPlanId()); + candidate.setPlanCode(plan.getPlanCode()); + candidate.setMaterialId(plan.getMaterialId()); + candidate.setMaterialCode(plan.getMaterialCode()); + candidate.setMaterialName(plan.getMaterialName()); + candidate.setMaterialSpec(plan.getMaterialSpec()); + candidate.setSuggestedQuantity(1); + int total = Math.addExact(plan.getPlanQty(), plan.getAppendQty()); + int progress = type == DailyPlanStrategyTypeEnum.STOCKING ? plan.getStockedQty() : plan.getSleevedQty(); + candidate.setRemainingQuantity(total - progress); + candidate.setVersion(plan.getVersion()); + candidate.setStrategyMode(strategyMode); + return candidate; + } + + /** + * 现场单根任务创建成功后推进权重轮转。 + * + *AGV 托盘任务和候选跳过都不会调用本方法,因此不会提前消耗某张计划的权重。
+ */ + @Override + @Transactional(rollbackFor = Exception.class) + public void confirmTaskCreated(String claimToken, String operator) { + DailyPlanClaimDO claim = getClaimForUpdate(claimToken); + validateActiveClaim(claim); + if (!claim.getTaskCreated() + && dailyPlanClaimMapper.markTaskCreated(claimToken, normalizedOperator(operator)) != 1) { + throw exception(DAILY_PLAN_CLAIM_INVALID); + } + DailyPlanStrategyTypeEnum type = DailyPlanStrategyTypeEnum.getByCode(claim.getStrategyType()); + if (type == null) { + throw exception(DAILY_PLAN_STRATEGY_NOT_EXISTS); + } + DailyPlanStrategyDO strategy = strategyInitializer.getOrCreate(type); + if (!DailyPlanStrategyModeEnum.WEIGHT_ROUND_ROBIN.getCode().equals(strategy.getStrategyMode())) { + return; + } + if (strategy.getCursorDailyPlanId() != null + && !strategy.getCursorDailyPlanId().equals(claim.getDailyPlanId())) { + return; + } + DailyPlanDO current = dailyPlanMapper.selectDailyPlanById(claim.getDailyPlanId()); + if (current == null) { + throw exception(DAILY_PLAN_NOT_EXISTS); + } + int executedQty = strategy.getCursorExecutedQty() + 1; + Long nextDailyPlanId = current.getDailyPlanId(); + if (executedQty >= current.getWeight()) { + executedQty = 0; + List初始化始终使用独立事务。并发插入冲突后,必须等冲突事务回滚,再使用全新的事务读取 + * 另一线程已经提交的策略,避免 MySQL 可重复读快照导致误判策略仍不存在。
+ */ + public DailyPlanStrategyDO getOrCreate(DailyPlanStrategyTypeEnum type) { + TransactionTemplate transaction = new TransactionTemplate(transactionManager); + transaction.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW); + try { + return transaction.execute(status -> loadOrInsert(type)); + } catch (DuplicateKeyException ignored) { + // 冲突事务已经完整回滚;新事务读取可见的并发提交,规避 MySQL RR 旧快照。 + DailyPlanStrategyDO concurrent = transaction.execute( + status -> strategyMapper.selectByStrategyType(type.getCode())); + if (concurrent != null) { + return concurrent; + } + throw exception(DAILY_PLAN_STRATEGY_NOT_EXISTS); + } + } + + /** 在独立事务内查询或创建默认策略。 */ + private DailyPlanStrategyDO loadOrInsert(DailyPlanStrategyTypeEnum type) { + DailyPlanStrategyDO current = strategyMapper.selectByStrategyType(type.getCode()); + if (current != null) { + return current; + } + // 唯一键不包含 deleted;存在已删除记录时不能另插一条,也不能擅自恢复历史配置。 + if (strategyMapper.selectAnyByStrategyType(type.getCode()) != null) { + throw exception(DAILY_PLAN_STRATEGY_NOT_EXISTS); + } + DailyPlanStrategyDO strategy = new DailyPlanStrategyDO(); + strategy.setStrategyId(IdWorker.getId()); + strategy.setStrategyType(type.getCode()); + strategy.setStrategyMode(DailyPlanStrategyModeEnum.SEQUENCE.getCode()); + strategy.setVersion(0); + strategy.setCreator(SYSTEM_OPERATOR); + strategy.setUpdater(SYSTEM_OPERATOR); + strategyMapper.insert(strategy); + return strategy; + } +} diff --git a/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/stockingivt/StockingIvtService.java b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/stockingivt/StockingIvtService.java new file mode 100644 index 00000000..f939e01d --- /dev/null +++ b/nl-module-lms/nl-module-lms-server/src/main/java/cn/code/nl/module/lms/service/stockingivt/StockingIvtService.java @@ -0,0 +1,36 @@ +package cn.code.nl.module.lms.service.stockingivt; + +import cn.code.nl.framework.common.pojo.PageResult; +import cn.code.nl.module.lms.controller.admin.stockingivt.vo.PaperVehicleInventoryRespVO; +import cn.code.nl.module.lms.controller.admin.stockingivt.vo.StockingIvtPageReqVO; +import cn.code.nl.module.lms.controller.admin.stockingivt.vo.StockingIvtRespVO; +import cn.code.nl.module.lms.controller.admin.stockingivt.vo.StockingIvtUpdateReqVO; +import jakarta.validation.Valid; + +import java.util.List; + +/** + * 备货区域服务。 + */ +public interface StockingIvtService { + + /** + * 分页查询备货区域。 + */ + PageResult