From fa5076bcabdcbcd45e1c38e79c81b4c96c464c47 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Mon, 4 Nov 2024 11:00:59 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E5=BA=9F?= =?UTF-8?q?=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/iocoder/yudao/common/RecordTypeEnum.java | 8 +++++++- .../tickets/service/impl/DlRepairTicketsServiceImpl.java | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RecordTypeEnum.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RecordTypeEnum.java index 7e43c8a0..92b4373b 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RecordTypeEnum.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RecordTypeEnum.java @@ -64,7 +64,13 @@ public enum RecordTypeEnum { /** * 接单 */ - jd("jd","接单"); + jd("jd","接单"), + + /** 作废工单 */ + ZFGG("zfgg", "作废工单"), + + /** 删除工单 */ + SCGG("scgg", "删除工单"); /** * code diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index e7720842..f9cca09c 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.common.*; import cn.iocoder.yudao.framework.common.util.number.MoneyUtils; +import cn.iocoder.yudao.framework.security.core.LoginUser; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; @@ -383,14 +384,21 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl().eq(RepairOrderInfo::getGoodsId, repairTicketsReqVO.getId())); + // 记录日志 + repairRecordsService.saveRepairRecord(repairTicketsReqVO.getId(), null, RecordTypeEnum.ZFGG.getCode(), repairTicketsReqVO.getRemark(), null); } /** From e4279f87c576ea79704298eabe73a4f56bc8d43a Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Mon, 4 Nov 2024 11:03:01 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=B7=A5=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/tickets/service/impl/DlRepairTicketsServiceImpl.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index f9cca09c..62e73c29 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -1554,6 +1554,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl().eq(DlRepairTitem::getTicketId, id)); + // 记录操作日志 + repairRecordsService.saveRepairRecord(id, null, RecordTypeEnum.SCGG.getCode(), null, null); } } From adba8c0dce801107e8749e545205d6cb094534a7 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Mon, 4 Nov 2024 14:18:29 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E4=BD=9C=E5=BA=9F=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E4=BF=AE=E6=94=B92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tickets/service/impl/DlRepairTicketsServiceImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index 62e73c29..14ecff8a 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -394,7 +394,13 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl().eq(RepairOrderInfo::getGoodsId, repairTicketsReqVO.getId())); // 记录日志 From 3c56602e18d038ea49783cd798f2b0ccf71a3d23 Mon Sep 17 00:00:00 2001 From: PQZ Date: Mon, 4 Nov 2024 14:53:43 +0800 Subject: [PATCH 4/7] 1 --- .../tickets/controller/admin/DlRepairTicketsController.java | 6 ++++-- .../module/tickets/service/DlRepairTicketsService.java | 2 +- .../tickets/service/impl/DlRepairTicketsServiceImpl.java | 6 ++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java index 41fe1162..b9999f3b 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlRepairTicketsController.java @@ -200,8 +200,10 @@ public class DlRepairTicketsController { **/ @GetMapping("/take") @Operation(summary = "接单") - public CommonResult updateTake(@RequestParam("id") String id) { - dlRepairTicketsService.updateTake(id); + public CommonResult updateTake(@RequestParam("id") String id, + @RequestParam(value="image",required = false) String image, + @RequestParam(value="remark",required = false) String remark) { + dlRepairTicketsService.updateTake(id,image); return CommonResult.ok(); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java index 97151564..1992f8c5 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/DlRepairTicketsService.java @@ -108,7 +108,7 @@ public interface DlRepairTicketsService extends IService { * @date 11:48 2024/10/14 * @param id 工单ID **/ - void updateTake(String id); + void updateTake(String id,String image); /** * 指派员工,通知施工 diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index e7720842..34b9b288 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -6,8 +6,6 @@ import cn.hutool.core.util.ObjectUtil; import cn.iocoder.yudao.common.*; import cn.iocoder.yudao.framework.common.util.number.MoneyUtils; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; -import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder; -import cn.iocoder.yudao.framework.tenant.core.util.TenantUtils; import cn.iocoder.yudao.module.base.entity.RepairWorker; import cn.iocoder.yudao.module.base.service.RepairRecordsService; import cn.iocoder.yudao.module.base.service.RepairWorkerService; @@ -910,7 +908,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl() .set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.RECEIVED.getCode()) @@ -922,7 +920,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl Date: Mon, 4 Nov 2024 15:21:54 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=98=E5=B7=A5?= =?UTF-8?q?=E7=A1=AE=E8=AE=A4=E9=A2=86=E6=96=99=E3=80=81=E9=80=80=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/DlRepairSoController.java | 8 +- .../service/DlRepairSoService.java | 4 +- .../service/impl/DlRepairSoServiceImpl.java | 148 +++--------------- 3 files changed, 25 insertions(+), 135 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/controller/admin/DlRepairSoController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/controller/admin/DlRepairSoController.java index 8a8ba885..26cf5395 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/controller/admin/DlRepairSoController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/controller/admin/DlRepairSoController.java @@ -97,8 +97,8 @@ public class DlRepairSoController { **/ @GetMapping("/confirmGet") @Operation(summary = "员工确认领料") - public CommonResult confirmGet(@RequestParam("id") String id) { - dlRepairSoService.confirmGet(id); + public CommonResult confirmGet(@RequestParam("id") String id, @RequestParam(value = "image", required = false) String image) { + dlRepairSoService.confirmGet(id, image); return CommonResult.ok(); } @@ -111,8 +111,8 @@ public class DlRepairSoController { **/ @GetMapping("/confirmBack") @Operation(summary = "员工确认退料") - public CommonResult confirmBack(@RequestParam("id") String id) { - dlRepairSoService.confirmBack(id); + public CommonResult confirmBack(@RequestParam("id") String id, @RequestParam(value = "image", required = false) String image) { + dlRepairSoService.confirmBack(id, image); return CommonResult.ok(); } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/DlRepairSoService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/DlRepairSoService.java index 8893fd34..09e8f8c1 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/DlRepairSoService.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/DlRepairSoService.java @@ -58,7 +58,7 @@ public interface DlRepairSoService extends IService { * @author 小李 * @date 11:58 2024/10/21 **/ - void confirmGet(String id); + void confirmGet(String id, String image); /** * 员工确认退料 @@ -67,7 +67,7 @@ public interface DlRepairSoService extends IService { * @author 小李 * @date 19:41 2024/10/21 **/ - void confirmBack(String id); + void confirmBack(String id, String image); /** * 采购入库 diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java index 06a68890..57df6332 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java @@ -3,9 +3,11 @@ package cn.iocoder.yudao.module.stockOperate.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.util.ObjectUtil; +import cn.iocoder.yudao.common.RecordTypeEnum; import cn.iocoder.yudao.common.RepairErrorCodeConstants; import cn.iocoder.yudao.common.SoStatusEnum; import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils; +import cn.iocoder.yudao.module.base.service.RepairRecordsService; import cn.iocoder.yudao.module.base.service.RepairWorkerService; import cn.iocoder.yudao.module.company.entity.Company; import cn.iocoder.yudao.module.company.service.CompanyService; @@ -99,6 +101,10 @@ public class DlRepairSoServiceImpl extends ServiceImpl sois = repairSoiService - .list(new LambdaQueryWrapper() - .eq(DlRepairSoi::getSoId, id) - ); - // 查库存---生成领料单的时候更新了 -// List wares = waresService -// .list(new LambdaQueryWrapper() -// .in(RepairWares::getId, sois.stream() -// .map(DlRepairSoi::getGoodsId) -// .collect(Collectors.toList()) -// )); -// // 更新库存 -// List newWares = wares.stream().map(item -> { -// RepairWares ware = new RepairWares(); -// ware.setId(item.getId()); -// sois.stream().filter(i -> i.getGoodsId().equals(item.getId())).findFirst().ifPresent(i -> { -// ware.setStock(item.getStock().subtract(BigDecimal.valueOf(i.getGoodsCount()))); -// }); -// return ware; -// }).collect(Collectors.toList()); -// waresService.updateBatchById(newWares); + public void confirmGet(String id, String image) { // 更新主表状态 为已领料 DlRepairSo dlRepairSo = new DlRepairSo(); dlRepairSo.setId(id); dlRepairSo.setSoStatus(SoStatusEnum.PICKED.getCode()); baseMapper.updateById(dlRepairSo); - // 更新申请表的数据----生成领料单的时候更新了 -// // 查申请表的子表对应的配件信息 -// List twItems = twItemService.list(new LambdaQueryWrapper().and(item -> { -// item.eq(DlTwItem::getTwId, so.getTwId()) -// .in(DlTwItem::getWaresId, sois.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList())); -// })); -// // 更新子表 -// List newTwItems = twItems.stream().map(item -> { -// DlTwItem dlTwItem = new DlTwItem(); -// dlTwItem.setId(item.getId()); -// dlTwItem.setWaresAlreadyCount(ObjectUtil.isNotEmpty(item.getWaresAlreadyCount()) ? item.getWaresAlreadyCount() + item.getWaresCouldCount() : item.getWaresCouldCount()); -// dlTwItem.setWaresStatus(dlTwItem.getWaresAlreadyCount().equals(item.getWaresCount()) ? "01" : item.getWaresStatus()); -// return dlTwItem; -// }).collect(Collectors.toList()); -// twItemService.updateBatchById(newTwItems); - // 查最新的子表信息 DlRepairSo so = baseMapper.selectOne(new LambdaQueryWrapper().eq(DlRepairSo::getId, id)); List list = twItemService.list(new LambdaQueryWrapper().eq(DlTwItem::getTwId, so.getTwId())); @@ -369,6 +337,12 @@ public class DlRepairSoServiceImpl extends ServiceImpl() .set(DlRepairSo::getSoStatus, SoStatusEnum.RETURNED.getCode()) .eq(DlRepairSo::getId, id) ); - // 更新配件申请表----生成退料单的时候更新了 -// DlRepairSo so = baseMapper.selectOne(new LambdaQueryWrapper().eq(DlRepairSo::getId, id)); -// // 查配件退料表子表 -// List sois = repairSoiService.list(new LambdaQueryWrapper().eq(DlRepairSoi::getSoId, so.getId())); -// // 查申请表子表 -// List twItems = twItemService.list(new LambdaQueryWrapper().eq(DlTwItem::getTwId, so.getTwId())); -// // 得到需要更新的数据 -// List newTwItems = twItems.stream().map(item -> { -// DlTwItem dlTwItem = new DlTwItem(); -// dlTwItem.setId(item.getId()); -// sois.stream().filter(i -> i.getGoodsId().equals(item.getWaresId())).findFirst().ifPresent(i -> { -// dlTwItem.setWaresBackCount( -// ObjectUtil.isNotEmpty(item.getWaresBackCount()) -// ? item.getWaresCount() + item.getWaresBackCount() -// : i.getGoodsCount()); -// // 如果退料数就是领料申请数,那就是全退了 -// if (i.getGoodsCount().equals(dlTwItem.getWaresCount())) { -// dlTwItem.setWaresStatus("03"); -// } -// }); -// return dlTwItem; -// }).collect(Collectors.toList()); -// twItemService.updateBatchById(newTwItems); -// // 更新库存 -// // 查库存 -// List wares = waresService.list(new LambdaQueryWrapper().in(RepairWares::getId, sois.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList()))); -// // 构建新数据 -// List newWares = wares.stream().map(item -> { -// RepairWares ware = new RepairWares(); -// ware.setId(item.getId()); -// sois.stream().filter(i -> i.getGoodsId().equals(item.getId())).findFirst().ifPresent(i -> { -// ware.setStock(item.getStock().add(BigDecimal.valueOf(i.getGoodsCount()))); -// }); -// return ware; -// }).collect(Collectors.toList()); -// waresService.updateBatchById(newWares); - - // 更新维修工单----最后完成工单的时候来更新 -// // 查配件退料表子表 -// List sois = repairSoiService.list(new LambdaQueryWrapper().eq(DlRepairSoi::getSoId, so.getId())); -// // 查申请表主表 -// DlTicketWares ticketWares = ticketWaresService.getOne(new LambdaQueryWrapper().eq(DlTicketWares::getId, so.getTwId())); -// // 查维修工单子表为配件的数据 -// List titems = titemService.list(new LambdaQueryWrapper().and(item -> { -// item.eq(DlRepairTitem::getTicketId, ticketWares.getTicketId()) -// .eq(DlRepairTitem::getItemType, "02") -// .in(DlRepairTitem::getPartId, sois.stream().map(DlRepairSoi::getGoodsId).collect(Collectors.toList())); -// })); -// // 构建新数据,更新维修工单子表 -// List newTitems = titems.stream().map(item -> { -// DlRepairTitem titem = new DlRepairTitem(); -// titem.setId(item.getId()); -// sois.stream().filter(i -> i.getGoodsId().equals(item.getPartId())).findFirst().ifPresent(i -> { -// titem.setItemCount(item.getItemCount() - i.getGoodsCount()); -// BigDecimal itemDiscount = ObjectUtil.isNotEmpty(item.getItemDiscount()) ? item.getItemDiscount() : BigDecimal.ONE; -// titem.setItemMoney(new BigDecimal(titem.getItemCount()).multiply(item.getItemPrice()).multiply(itemDiscount)); -// }); -// return titem; -// }).collect(Collectors.toList()); -// // 分开全部退料了的和没有全部退料的数据 -// List delTitems = newTitems.stream().filter(item -> item.getItemCount() == 0).collect(Collectors.toList()); -// if (CollectionUtil.isEmpty(delTitems)) { -// titemService.updateBatchById(newTitems); -// } else { -// titemService.removeBatchByIds(delTitems); -// List updateTitems = newTitems.stream().filter(item -> !delTitems.contains(item)).collect(Collectors.toList()); -// if (CollectionUtil.isEmpty(updateTitems)) { -// titemService.updateBatchById(updateTitems); -// } -// -// } -// // 更新维修工单 -// DlRepairTickets tickets = ticketsService.getOne(new LambdaQueryWrapper().eq(DlRepairTickets::getId, ticketWares.getTicketId())); -// // 查最新的子表信息 -// List list = titemService.list(new LambdaQueryWrapper().in(DlRepairTitem::getTicketId, tickets.getId())); -// // 计算工单总子项、工单配件总价、工单总价 -// DlRepairTickets newTickets = new DlRepairTickets(); -// newTickets.setId(tickets.getId()); -// newTickets.setCount(list.stream().mapToInt(DlRepairTitem::getItemCount).sum()); -// newTickets.setPartPrice(list.stream() -// .filter(item -> item.getItemType().equals("02")) -// .map(DlRepairTitem::getItemMoney) -// .reduce(BigDecimal.ZERO, BigDecimal::add)); -// BigDecimal projectPrice = tickets.getProjectPrice() == null ? BigDecimal.ZERO : tickets.getProjectPrice(); -// BigDecimal otherPrice = tickets.getOtherPrice() != null ? tickets.getOtherPrice() : BigDecimal.ZERO; -// BigDecimal partPrice = newTickets.getPartPrice() == null ? BigDecimal.ZERO : newTickets.getPartPrice(); -// newTickets.setTotalPrice(projectPrice.add(partPrice).add(otherPrice)); -// ticketsService.updateById(newTickets); - // 查主表 DlRepairSo newSo = baseMapper.selectById(id); // 通知仓库 repairWorkerService.sentMessage(Long.valueOf(newSo.getCreator()), newSo.getUserName() + "已确认退料单:" + newSo.getSoNo()); + // 记录日志 + // 查申请表 + DlTicketWares byId = ticketWaresService.getById(newSo.getTwId()); + // 记录日志 + recordsService.saveRepairRecord(byId.getTicketId(), null, RecordTypeEnum.TL.getCode(), null, image); } /** From ab35fd68c2075481d8e6635a788302a98134ad10 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Mon, 4 Nov 2024 16:16:41 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=8A=B6=E6=80=81=E7=9A=84=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DlRepairTicketsServiceImpl.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java index 6e58714e..32f6246c 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/service/impl/DlRepairTicketsServiceImpl.java @@ -425,6 +425,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl() - .set(DlRepairTickets::getIsFinish, "1") + // 因为完成状态需要在交车之后,所以注掉这个 +// .set(DlRepairTickets::getIsFinish, "1") .setSql("now_repair_id = adviser_id") .setSql("now_repair_name = adviser_name") .eq(DlRepairTickets::getId, respVO.getId()) From 38395104a8778ebf9655bc447a191714f56b4b91 Mon Sep 17 00:00:00 2001 From: xiaofajia <1665375861@qq.com> Date: Mon, 4 Nov 2024 17:19:40 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=91=98=E5=B7=A5=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E9=A2=86=E6=96=99=E3=80=81=E9=80=80=E6=96=99=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=90=8D=E7=A7=B0=E5=92=8C=E6=95=B0=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DlRepairSoServiceImpl.java | 28 +++++++++++++++---- .../admin/DlTicketWaresController.java | 4 +-- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java index 57df6332..a6f90303 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/stockOperate/service/impl/DlRepairSoServiceImpl.java @@ -323,7 +323,7 @@ public class DlRepairSoServiceImpl extends ServiceImpl().eq(DlRepairSo::getId, id)); + DlRepairSo so = baseMapper.selectById(id); List list = twItemService.list(new LambdaQueryWrapper().eq(DlTwItem::getTwId, so.getTwId())); // 判断是部分完成还是全部完成 DlTicketWares dlTicketWares = new DlTicketWares(); @@ -333,16 +333,22 @@ public class DlRepairSoServiceImpl extends ServiceImpl 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 list = twItemService.list(new LambdaQueryWrapper().eq(DlTwItem::getTwId, newSo.getTwId())); // 查申请表 DlTicketWares byId = ticketWaresService.getById(newSo.getTwId()); + // 取当前操作人的名称 + String remark = SecurityFrameworkUtils.getLoginUserNickname(); + // 构建备注 + /* + 谁,退了什么配件,退了多少个 + */ + List 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); } /** diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlTicketWaresController.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlTicketWaresController.java index a00c74d7..4d598c98 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlTicketWaresController.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/tickets/controller/admin/DlTicketWaresController.java @@ -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 请求对象