This commit is contained in:
Vinjor 2024-10-26 16:07:40 +08:00
commit 24ab2d1b5d
3 changed files with 21 additions and 2 deletions

View File

@ -51,6 +51,16 @@ public enum RecordTypeEnum {
* 施工中
*/
SGZ("sgz","施工中"),
/**
* 通知领料
*/
TZLL("tzll","通知领料"),
/**
* 通知退料
*/
TZTL("tztl","通知退料"),
/**审批配件申请单*/
SPPJSQD("sppjsqd","审批配件申请单"),
/**
* 接单
*/

View File

@ -520,7 +520,7 @@ public class DlRepairSoServiceImpl extends ServiceImpl<DlRepairSoMapper, DlRepai
Map<String, DlRepairSoi> filterWareMap = filterWare.stream().collect(Collectors.toMap(DlRepairSoi::getId, soi -> soi));
pmsWaresList.forEach(item -> {
DlRepairSoi filterSoi = filterWareMap.get(item.getId());
DlRepairSoi inWares = item;
DlRepairSoi inWares = BeanUtil.copyProperties(item, DlRepairSoi.class);
//采购单id
inWares.setSoId(inSo.getId());
//采购品原始id

View File

@ -2,12 +2,14 @@ package cn.iocoder.yudao.module.tickets.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.iocoder.yudao.common.RecordTypeEnum;
import cn.iocoder.yudao.common.RepairRoleEnum;
import cn.iocoder.yudao.common.SoStatusEnum;
import cn.iocoder.yudao.common.TicketsItemStatusEnum;
import cn.iocoder.yudao.framework.security.core.LoginUser;
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
import cn.iocoder.yudao.module.base.entity.RepairWorker;
import cn.iocoder.yudao.module.base.service.RepairRecordsService;
import cn.iocoder.yudao.module.base.service.RepairWorkerService;
import cn.iocoder.yudao.module.project.entity.RepairWares;
import cn.iocoder.yudao.module.project.service.RepairWaresService;
@ -94,6 +96,8 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
@Resource
@Lazy
private PermissionApi permissionApi;
@Resource
private RepairRecordsService repairRecordsService;
/**
* 分页查询
@ -345,6 +349,8 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
DlTicketWares ticketWares = baseMapper.selectById(respVO.getId());
repairWorkerService.sentMessage(ticketWares.getRepairId(), "您的配件申请单被驳回了");
}
//插入记录
repairRecordsService.saveRepairRecord(respVO.getTicketId(),null,RecordTypeEnum.SPPJSQD.getCode(),"审批配件申请单",null);
// 下面的代码为退料申请单通过的代码但没有退料申请单可以注掉但防止有问题所以先不删除
// } else if (ObjectUtil.isNotEmpty(respVO.getStatus()) && respVO.getStatus().equals("02") && respVO.getType().equals("02")) {
// // 如果通过退料也需要更新
@ -546,7 +552,10 @@ public class DlTicketWaresServiceImpl extends ServiceImpl<DlTicketWaresMapper, D
// }).collect(Collectors.toList());
// twItemService.updateBatchById(newData);
// }
//插入记录
//最后记录操作日志--创建工单
repairRecordsService.saveRepairRecord(respVO.getTicketId(), null, "02".equals(type)?RecordTypeEnum.TZLL.getCode():RecordTypeEnum.TZTL.getCode(),
"02".equals(type)?"通知领料":"通知退料", null);
// 通知维修工
// 查维修工的userId
repairWorkerService.sentMessage(respVO.getRepairId(), type.equals("02") ? "您有新的领料单需要确认" : "您有新的退料单需要确认");