This commit is contained in:
PQZ 2024-10-26 15:06:10 +08:00
parent d42b25596a
commit 76cc2cc0b3
2 changed files with 20 additions and 1 deletions

View File

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

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") ? "您有新的领料单需要确认" : "您有新的退料单需要确认");