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 00ce000f..ecf86a4d 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 @@ -4,7 +4,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * 工单操作记录-工作类型枚举 + * 工单操作记录-工作类型枚举(repair_records_type) * * @author vinjor-m */ @@ -39,6 +39,10 @@ public enum RecordTypeEnum { * 结束工单 */ JSGD("jsgd","结束工单"), + /** + * 通知客户取车 + */ + TZQC("tzqc","通知客户取车"), /** * 开始施工 */ diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RepairCons.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RepairCons.java index d0b8f61c..58848131 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RepairCons.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/common/RepairCons.java @@ -11,4 +11,9 @@ public class RepairCons { public static final String TICKETS_WAITING = "waiting"; /**工单-所有*/ public static final String TICKETS_ALL = "all"; + + /**数据字典常量-repair_records_type-*/ + public static final String DICT_REPAIR_RECORDS_TYPE = "repair_records_type"; + /**数据字典常量-repair_type-*/ + public static final String DICT_REPAIR_TYPE = "repair_type"; } diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/common/TicketsStatusEnum.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/common/TicketsStatusEnum.java index c3284401..26b53e87 100644 --- a/dl-module-repair/src/main/java/cn/iocoder/yudao/common/TicketsStatusEnum.java +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/common/TicketsStatusEnum.java @@ -4,7 +4,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; /** - * 维修工单状态枚举 + * 维修工单状态枚举(repair_tickets_status) * * @author vinjor-m */ @@ -23,6 +23,10 @@ public enum TicketsStatusEnum { * 未结账 */ NO_PAY("01","未结账"), + /** + * 待通知客户取车 + */ + WAITING_NOTICE("07","待通知客户取车"), /** * 挂单/记账 */ 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 1bc1a761..688ffb66 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 @@ -44,6 +44,7 @@ import cn.iocoder.yudao.module.tickets.service.DlRepairTicketsService; import cn.iocoder.yudao.module.tickets.service.DlRepairTitemService; import cn.iocoder.yudao.module.tickets.tools.WordUtil; import cn.iocoder.yudao.module.tickets.vo.*; +import cn.iocoder.yudao.util.SendSmsUtil; import com.baomidou.dynamic.datasource.annotation.DSTransactional; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; @@ -52,8 +53,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.deepoove.poi.XWPFTemplate; import org.apache.commons.lang3.StringUtils; -import org.apache.poi.ss.formula.functions.Na; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; @@ -62,11 +61,12 @@ import javax.servlet.http.HttpServletResponse; import java.io.FileOutputStream; import java.io.InputStream; import java.math.BigDecimal; -import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; import static cn.iocoder.yudao.common.BaseConstants.ORDER_TENANT_NAME; +import static cn.iocoder.yudao.common.RepairCons.DICT_REPAIR_RECORDS_TYPE; +import static cn.iocoder.yudao.common.RepairCons.DICT_REPAIR_TYPE; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception; import static cn.iocoder.yudao.framework.common.exception.util.ServiceExceptionUtil.exception0; @@ -306,7 +306,10 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl records = repairRecordsService.queryList(entity); - result.setRecords(records); + // 操作记录类型 + List recordTypeList = dictDataApi.getDictDataList(DICT_REPAIR_RECORDS_TYPE); + Map typeMap = recordTypeList.stream().collect(Collectors.toMap(DictDataRespDTO::getValue,DictDataRespDTO::getLabel)); + result.setRecords(records.stream().peek(item->item.setType(typeMap.get(item.getType()))).collect(Collectors.toList())); return result; } @@ -768,6 +771,7 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl() .set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.END.getCode()) + .set(DlRepairTickets::getTicketsStatus, TicketsStatusEnum.WAITING_NOTICE.getCode()) .eq(DlRepairTickets::getId, respVO.getId()) ); @@ -814,9 +818,14 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl() + .set(DlRepairTickets::getTicketsStatus, TicketsStatusEnum.NO_PAY.getCode()) + .eq(DlRepairTickets::getId, noticeCusVO.getId()) + ); CustomerMain cus = customerService.getById(tickets.getUserId()); // 维修项目 - List repairType = dictDataApi.getDictDataList("repair_type"); + List repairType = dictDataApi.getDictDataList(DICT_REPAIR_TYPE); // 默认是维修 String type = "维修"; DictDataRespDTO dictDataRespDTO = repairType.stream() @@ -827,25 +836,19 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl