From 00e4d71bd9d504ed25339595690ebe074146b7e7 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 01 九月 2026 15:27:19 +0800
Subject: [PATCH] feat(mes): 新增管理驾驶舱与统计分析模块
---
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/pro/batch/MesProBatchMapper.java | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/pro/batch/MesProBatchMapper.java b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/pro/batch/MesProBatchMapper.java
index f35a1e4..5c3026e 100644
--- a/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/pro/batch/MesProBatchMapper.java
+++ b/yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/dal/mysql/pro/batch/MesProBatchMapper.java
@@ -20,6 +20,15 @@
return selectOne(MesProBatchDO::getCode, code);
}
+ default MesProBatchDO selectByTempCode(String tempCode) {
+ return selectOne(MesProBatchDO::getTempCode, tempCode);
+ }
+
+ /** 鐢熸垚涓存椂鎵规鐮佺敤鐨勫叏灞�搴忓彿锛氳В鏋� temp_code 鐨勬暟瀛楀悗缂�锛屼笉瀛樺湪鍒欒繑鍥� 0銆�
+ * 涓嶈兘杩囨护 deleted锛屽敮涓�绱㈠紩 uk_temp_code 瀵归�昏緫鍒犻櫎琛屼粛鐢熸晥锛屽拷鐣ヨ蒋鍒犱細瀵艰嚧搴忓彿鍥為��銆佺爜鍊奸噸澶� */
+ @Select("SELECT IFNULL(MAX(CAST(SUBSTRING(temp_code, 4) AS UNSIGNED)), 0) FROM mes_pro_batch")
+ Integer selectMaxTempCodeSeq();
+
default Long selectCountByLineId(Long lineId) {
return selectCount(MesProBatchDO::getLineId, lineId);
}
@@ -27,9 +36,14 @@
@Select("SELECT * FROM mes_pro_batch WHERE id = #{id} AND deleted = 0 FOR UPDATE")
MesProBatchDO selectByIdForUpdate(@org.apache.ibatis.annotations.Param("id") Long id);
+ @org.apache.ibatis.annotations.Update("UPDATE mes_pro_batch SET inbound_time = NOW(), inbound_event_id = #{eventId}, inbound_device_code = #{deviceCode}, inbound_line_code = #{lineCode}, inbound_bag_quantity = COALESCE(inbound_bag_quantity, 0) + 1, update_time = NOW() WHERE id = #{id} AND deleted = 0")
+ int markInbound(@org.apache.ibatis.annotations.Param("id") Long id, @org.apache.ibatis.annotations.Param("eventId") Long eventId,
+ @org.apache.ibatis.annotations.Param("deviceCode") String deviceCode, @org.apache.ibatis.annotations.Param("lineCode") String lineCode);
+
default PageResult<MesProBatchDO> selectPage(MesProBatchPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<MesProBatchDO>()
.likeIfPresent(MesProBatchDO::getCode, reqVO.getCode())
+ .likeIfPresent(MesProBatchDO::getTempCode, reqVO.getTempCode())
.eqIfPresent(MesProBatchDO::getItemId, reqVO.getItemId())
.eqIfPresent(MesProBatchDO::getLineId, reqVO.getLineId())
.likeIfPresent(MesProBatchDO::getLineCode, reqVO.getLineCode())
--
Gitblit v1.9.3