Compare commits

..

4 Commits

Author SHA1 Message Date
xiaofajia
4436bb236f Merge branch 'repair' of http://122.51.230.86:3000/dianliang/lanan-system into repair 2024-11-04 14:54:51 +08:00
xiaofajia
adba8c0dce 作废工单修改2 2024-11-04 14:18:29 +08:00
xiaofajia
e4279f87c5 修改删除工单 2024-11-04 11:03:01 +08:00
xiaofajia
fa5076bcab 修改作废工单 2024-11-04 11:00:59 +08:00
2 changed files with 24 additions and 2 deletions

View File

@ -64,7 +64,13 @@ public enum RecordTypeEnum {
/**
* 接单
*/
jd("jd","接单");
jd("jd","接单"),
/** 作废工单 */
ZFGG("zfgg", "作废工单"),
/** 删除工单 */
SCGG("scgg", "删除工单");
/**
* code

View File

@ -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.module.base.entity.RepairWorker;
import cn.iocoder.yudao.module.base.service.RepairRecordsService;
@ -381,14 +382,27 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
/**
* 维修工单表 作废
* 传对象是因为需要有作废备注
*
* @param repairTicketsReqVO 工单对象
* @author 小李
* @date 19:46 2024/9/22
**/
@Override
@DSTransactional
public void setTicketsVoid(DlRepairTicketsReqVO repairTicketsReqVO) {
baseMapper.updateById(repairTicketsReqVO);
// 作废维修工单
DlRepairTickets tickets = new DlRepairTickets();
tickets.setId(repairTicketsReqVO.getId());
if (ObjectUtil.isNotEmpty(repairTicketsReqVO.getRemark())){
tickets.setRemark(repairTicketsReqVO.getRemark());
}
tickets.setTicketsStatus("03");
baseMapper.updateById(tickets);
// 删除订单
repairOrderInfoService.remove(new LambdaQueryWrapper<RepairOrderInfo>().eq(RepairOrderInfo::getGoodsId, repairTicketsReqVO.getId()));
// 记录日志
repairRecordsService.saveRepairRecord(repairTicketsReqVO.getId(), null, RecordTypeEnum.ZFGG.getCode(), repairTicketsReqVO.getRemark(), null);
}
/**
@ -1544,6 +1558,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
baseMapper.deleteById(id);
// 删除工单子表
titemService.remove(new LambdaQueryWrapper<DlRepairTitem>().eq(DlRepairTitem::getTicketId, id));
// 记录操作日志
repairRecordsService.saveRepairRecord(id, null, RecordTypeEnum.SCGG.getCode(), null, null);
}
}