fix:盘点单明细绑定任务id

This commit is contained in:
2026-11-24 17:38:50 +08:00
parent bfae016836
commit d0cd01c7f8
2 changed files with 21 additions and 16 deletions

View File

@@ -377,6 +377,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
@Override
public void changeStruct(StructattrChangeDto changeDto) {
log.info("changeStruct:{}", JSON.toJSONString(changeDto));
String now = DateUtil.now();
UpdateWrapper<Structattr> wrapper = new UpdateWrapper<Structattr>()
.set("update_time", now)
@@ -391,6 +392,7 @@ public class StructattrServiceImpl extends ServiceImpl<StructattrMapper, Structa
List<GroupPlate> groupPlates = iMdPbGroupplateService.list(new QueryWrapper<GroupPlate>()
.eq("storagevehicle_code", changeDto.getStoragevehicleCode())
.lt("status", IOSEnum.GROUP_PLATE_STATUS.code("出库")));
log.info("changeStruct组盘记录数量:{}", groupPlates.size());
List<StIvtStructivtflow> records = new ArrayList<>();
//更新冻结数量
Structattr structattr = this.getByCode(changeDto.getStructCode());

View File

@@ -533,22 +533,7 @@ public class VoiceCallbackService {
for (int i = 0; i < shallowList.size(); i++) {
Structattr structattr = shallowList.get(i);
GroupPlate groupPlate = stockVehicles.get(structattr.getStoragevehicle_code());
StIvtCheckdtl dao = new StIvtCheckdtl();
dao.setCheckdtl_id(IdUtil.getStringId());
dao.setCheck_id(mstDao.getCheck_id());
dao.setSeq_no(BigDecimal.valueOf(i+1));
dao.setSect_code(structattr.getSect_code());
dao.setStruct_code(structattr.getStruct_code());
dao.setStoragevehicle_code(structattr.getStoragevehicle_code());
dao.setMaterial_id(groupPlate.getMaterial_id());
dao.setPcsn(groupPlate.getPcsn());
dao.setBase_qty(groupPlate.getQty());
dao.setFac_qty(groupPlate.getQty());
dao.setQty_unit_id(groupPlate.getQty_unit_id());
dao.setQty_unit_name(groupPlate.getQty_unit_name());
dao.setStatus(IOSEnum.CHECK_DTL_STATUS.code("盘点中"));
dao.setRemark("");
dtlDaoList.add(dao);
// 创建盘点任务:起点终点一致(都是被盘点仓位)
JSONObject taskForm = new JSONObject();
taskForm.put("config_code", "InventoryCountTask");
@@ -564,6 +549,24 @@ public class VoiceCallbackService {
jsonAttr.put("struct_code", structattr.getStruct_code());
jsonAttr.put("lock_type", IOSEnum.LOCK_TYPE.code("盘点锁"));
lockList.add(jsonAttr);
StIvtCheckdtl dao = new StIvtCheckdtl();
dao.setCheckdtl_id(IdUtil.getStringId());
dao.setCheck_id(mstDao.getCheck_id());
dao.setSeq_no(BigDecimal.valueOf(i+1));
dao.setSect_code(structattr.getSect_code());
dao.setStruct_code(structattr.getStruct_code());
dao.setStoragevehicle_code(structattr.getStoragevehicle_code());
dao.setMaterial_id(groupPlate.getMaterial_id());
dao.setPcsn(groupPlate.getPcsn());
dao.setBase_qty(groupPlate.getQty());
dao.setFac_qty(groupPlate.getQty());
dao.setQty_unit_id(groupPlate.getQty_unit_id());
dao.setQty_unit_name(groupPlate.getQty_unit_name());
dao.setStatus(IOSEnum.CHECK_DTL_STATUS.code("盘点中"));
dao.setRemark("");
dao.setTask_id(taskId);
dtlDaoList.add(dao);
}
iStIvtCheckdtlService.saveBatch(dtlDaoList);
mstDao.setCheck_id(mstDao.getCheck_id());