|
|
@ -109,6 +109,7 @@ public class RfidCountHeaderServiceImpl extends ServiceImpl<RfidCountHeaderMappe |
|
|
* - 从pallet_detail查询标签列表 |
|
|
* - 从pallet_detail查询标签列表 |
|
|
* - 从handling_unit查询标签详细信息 |
|
|
* - 从handling_unit查询标签详细信息 |
|
|
* - 批量保存到rfid_count_detail |
|
|
* - 批量保存到rfid_count_detail |
|
|
|
|
|
* - 更新handling_unit:count_flag='Y',last_count_date=盘点时间 |
|
|
* - 更新或新增到rfid_count_snapshot |
|
|
* - 更新或新增到rfid_count_snapshot |
|
|
* - 更新rfid_count_header:label_count=标签数量,is_used='Y' |
|
|
* - 更新rfid_count_header:label_count=标签数量,is_used='Y' |
|
|
* 3. 每条主表记录独立事务处理 |
|
|
* 3. 每条主表记录独立事务处理 |
|
|
@ -161,6 +162,17 @@ public class RfidCountHeaderServiceImpl extends ServiceImpl<RfidCountHeaderMappe |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @Description 处理单条主表记录(独立事务)- rqrq |
|
|
* @Description 处理单条主表记录(独立事务)- rqrq |
|
|
|
|
|
* |
|
|
|
|
|
* <p><b>处理步骤:</b></p> |
|
|
|
|
|
* <pre> |
|
|
|
|
|
* 1. 从pallet_detail查询标签列表 |
|
|
|
|
|
* 2. 从handling_unit查询标签详细信息 |
|
|
|
|
|
* 3. 批量保存到rfid_count_detail |
|
|
|
|
|
* 4. 更新handling_unit的盘点标记(count_flag='Y',last_count_date) |
|
|
|
|
|
* 5. 更新或新增到rfid_count_snapshot(有则累加count_times,无则新增) |
|
|
|
|
|
* 6. 更新主表:label_count=标签数量,is_used='Y' |
|
|
|
|
|
* </pre> |
|
|
|
|
|
* |
|
|
* @param header 主表记录 |
|
|
* @param header 主表记录 |
|
|
* @author rqrq |
|
|
* @author rqrq |
|
|
* @date 2026/03/04 |
|
|
* @date 2026/03/04 |
|
|
@ -245,6 +257,19 @@ public class RfidCountHeaderServiceImpl extends ServiceImpl<RfidCountHeaderMappe |
|
|
log.info("保存{}条明细记录 - rqrq,palletId={}", detailList.size(), header.getPalletId()); |
|
|
log.info("保存{}条明细记录 - rqrq,palletId={}", detailList.size(), header.getPalletId()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 5.5 更新handling_unit的盘点标记和盘点时间 - rqrq |
|
|
|
|
|
if (!detailList.isEmpty()) { |
|
|
|
|
|
for (RfidCountDetail detail : detailList) { |
|
|
|
|
|
handlingUnitService.lambdaUpdate() |
|
|
|
|
|
.eq(HandlingUnit::getSite, detail.getSite()) |
|
|
|
|
|
.eq(HandlingUnit::getUnitId, detail.getUnitId()) |
|
|
|
|
|
.set(HandlingUnit::getCountFlag, "Y") |
|
|
|
|
|
.set(HandlingUnit::getLastCountDate, header.getCountTime()) |
|
|
|
|
|
.update(); |
|
|
|
|
|
} |
|
|
|
|
|
log.info("更新{}个标签的盘点标记 - rqrq,palletId={}", detailList.size(), header.getPalletId()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 6. 更新或新增快照(联合主键需要用LambdaUpdateWrapper)- rqrq |
|
|
// 6. 更新或新增快照(联合主键需要用LambdaUpdateWrapper)- rqrq |
|
|
if (!snapshotList.isEmpty()) { |
|
|
if (!snapshotList.isEmpty()) { |
|
|
for (RfidCountSnapshot snapshot : snapshotList) { |
|
|
for (RfidCountSnapshot snapshot : snapshotList) { |
|
|
|