diff --git a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java index 564a4167..24281f66 100644 --- a/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java +++ b/dl-module-base/src/main/java/cn/iocoder/yudao/common/BaseConstants.java @@ -105,21 +105,6 @@ public class BaseConstants { /**维修记录*/ public static final String REPAIR_RECORD_TYPE_RECORD = "record"; - /**创建工单*/ - public static final String REPAIR_RECORD_TYPE_CJGD = "cjgd"; - /**指派施工*/ - public static final String REPAIR_RECORD_TYPE_ZPSG = "zpsg"; - /**领料*/ - public static final String REPAIR_RECORD_TYPE_LL = "ll"; - /**退料*/ - public static final String REPAIR_RECORD_TYPE_TL = "tl"; - /**施工完成(自检)*/ - public static final String REPAIR_RECORD_TYPE_SGWCZJ = "sgwczj"; - /**总检*/ - public static final String REPAIR_RECORD_TYPE_ZJ = "zj"; - /**结束工单*/ - public static final String REPAIR_RECORD_TYPE_JSGD = "jsgd"; - } 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 442558c7..00ce000f 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 @@ -46,7 +46,11 @@ public enum RecordTypeEnum { /** * 施工中 */ - SGZ("sgz","施工中"); + SGZ("sgz","施工中"), + /** + * 接单 + */ + jd("jd","接单"); /** * 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 9cdd4c24..cd677d1b 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 @@ -3,12 +3,10 @@ package cn.iocoder.yudao.module.tickets.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.RepairErrorCodeConstants; -import cn.iocoder.yudao.common.RepairRoleEnum; -import cn.iocoder.yudao.common.TicketsStatusEnum; -import cn.iocoder.yudao.common.TicketsWorkStatusEnum; +import cn.iocoder.yudao.common.*; 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.booking.entity.DlRepairBooking; import cn.iocoder.yudao.module.booking.service.DlRepairBookingService; @@ -52,6 +50,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.deepoove.poi.XWPFTemplate; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; @@ -135,6 +134,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl() - .set(DlRepairTickets::getTicketsWorkStatus, "02") + .set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.RECEIVED) .and(item -> { item.eq(DlRepairTickets::getId, id) - .eq(DlRepairTickets::getTicketsWorkStatus, "01"); + .eq(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.WAITING_RECEIVING); })); if (update != 1){ throw exception0(500, "工单已被其他人接单了"); } + //最后记录操作日志--接单 + repairRecordsService.saveRepairRecord(id,null, RecordTypeEnum.jd.getCode(), "接单",null); } /** @@ -509,6 +514,8 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl