员工确认领料、退料时,记录名称和数量
This commit is contained in:
parent
ab35fd68c2
commit
38395104a8
@ -323,7 +323,7 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
baseMapper.updateById(dlRepairSo);
|
||||
|
||||
// 查最新的子表信息
|
||||
DlRepairSo so = baseMapper.selectOne(new LambdaQueryWrapper<DlRepairSo>().eq(DlRepairSo::getId, id));
|
||||
DlRepairSo so = baseMapper.selectById(id);
|
||||
List<DlTwItem> list = twItemService.list(new LambdaQueryWrapper<DlTwItem>().eq(DlTwItem::getTwId, so.getTwId()));
|
||||
// 判断是部分完成还是全部完成
|
||||
DlTicketWares dlTicketWares = new DlTicketWares();
|
||||
@ -333,16 +333,22 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
// 更新主表的状态
|
||||
ticketWaresService.updateById(dlTicketWares);
|
||||
|
||||
// 查主表记录
|
||||
DlRepairSo newSo = baseMapper.selectById(id);
|
||||
// 通知仓库
|
||||
repairWorkerService.sentMessage(Long.valueOf(newSo.getCreator()), newSo.getUserName() + "已确认领料单:" + newSo.getSoNo());
|
||||
repairWorkerService.sentMessage(Long.valueOf(so.getCreator()), so.getUserName() + "已确认领料单:" + so.getSoNo());
|
||||
|
||||
// 记录日志
|
||||
// 查配件申请表
|
||||
DlTicketWares byId = ticketWaresService.getById(so.getTwId());
|
||||
// 取当前操作人的名称
|
||||
String remark = SecurityFrameworkUtils.getLoginUserNickname();
|
||||
// 构建备注
|
||||
/*
|
||||
谁,领了什么配件,领了多少个
|
||||
*/
|
||||
List<String> nameAndCount = list.stream().map(item -> item.getWaresName() + "(" + item.getWaresCount() + ")").collect(Collectors.toList());
|
||||
remark += "确认领料" + String.join(",", nameAndCount);
|
||||
// 记录日志
|
||||
recordsService.saveRepairRecord(byId.getTicketId(), null, RecordTypeEnum.LL.getCode(), null, image);
|
||||
recordsService.saveRepairRecord(byId.getTicketId(), null, RecordTypeEnum.LL.getCode(), remark, image);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -365,10 +371,20 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
|
||||
// 通知仓库
|
||||
repairWorkerService.sentMessage(Long.valueOf(newSo.getCreator()), newSo.getUserName() + "已确认退料单:" + newSo.getSoNo());
|
||||
// 记录日志
|
||||
// 查子表信息
|
||||
List<DlTwItem> list = twItemService.list(new LambdaQueryWrapper<DlTwItem>().eq(DlTwItem::getTwId, newSo.getTwId()));
|
||||
// 查申请表
|
||||
DlTicketWares byId = ticketWaresService.getById(newSo.getTwId());
|
||||
// 取当前操作人的名称
|
||||
String remark = SecurityFrameworkUtils.getLoginUserNickname();
|
||||
// 构建备注
|
||||
/*
|
||||
谁,退了什么配件,退了多少个
|
||||
*/
|
||||
List<String> nameAndCount = list.stream().map(item -> item.getWaresName() + "(" + item.getWaresCount() + ")").collect(Collectors.toList());
|
||||
remark += "确认退料" + String.join(",", nameAndCount);
|
||||
// 记录日志
|
||||
recordsService.saveRepairRecord(byId.getTicketId(), null, RecordTypeEnum.TL.getCode(), null, image);
|
||||
recordsService.saveRepairRecord(byId.getTicketId(), null, RecordTypeEnum.TL.getCode(), remark, image);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -131,7 +131,7 @@ public class DlTicketWaresController {
|
||||
|
||||
/**
|
||||
* 员工确认领料
|
||||
*
|
||||
* 弃用
|
||||
* @author 小李
|
||||
* @date 22:07 2024/10/16
|
||||
* @param respVO 请求对象
|
||||
@ -145,7 +145,7 @@ public class DlTicketWaresController {
|
||||
|
||||
/**
|
||||
* 仓库确认退料
|
||||
*
|
||||
* 弃用
|
||||
* @author 小李
|
||||
* @date 22:03 2024/10/17
|
||||
* @param respVO 请求对象
|
||||
|
Loading…
Reference in New Issue
Block a user