This commit is contained in:
Vinjor 2024-11-13 17:12:28 +08:00
parent 407c7c20c1
commit 4920ad7b25
6 changed files with 55 additions and 4 deletions

View File

@ -76,6 +76,9 @@ public enum RecordTypeEnum {
/** 删除工单 */ /** 删除工单 */
SCGG("scgg", "删除工单"), SCGG("scgg", "删除工单"),
/** 删除工单 */
JC("jc", "交车"),
/** 内返派工 */ /** 内返派工 */
NFPG("nfpg", "内返派工"); NFPG("nfpg", "内返派工");

View File

@ -27,6 +27,10 @@ public enum TicketsStatusEnum {
* 待通知客户取车 * 待通知客户取车
*/ */
WAITING_NOTICE("07","待通知客户取车"), WAITING_NOTICE("07","待通知客户取车"),
/**
* 已交车
*/
OVER("08","已交车"),
/** /**
* 挂单/记账 * 挂单/记账
*/ */

View File

@ -297,6 +297,19 @@ public class DlRepairTicketsController {
return CommonResult.ok(); return CommonResult.ok();
} }
/**
* 服务顾问交车
* @author vinjor-M
* @date 16:51 2024/11/13
* @param respVO
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<?>
**/
@PostMapping("/overOrder")
@Operation(summary = "服务顾问交车")
public CommonResult<?> overOrder(@RequestBody DlRepairTicketsRespVO respVO) {
dlRepairTicketsService.overOrder(respVO);
return CommonResult.ok();
}
/** /**
* 从总检的角度差维修中已完成的工单数量 * 从总检的角度差维修中已完成的工单数量
* @author vinjor-M * @author vinjor-M

View File

@ -235,4 +235,12 @@ public interface DlRepairTicketsService extends IService<DlRepairTickets> {
* @param id 工单ID * @param id 工单ID
**/ **/
void removeTicketById(String id); void removeTicketById(String id);
/**
* 服务顾问交车
* @author vinjor-M
* @date 16:51 2024/11/13
* @param respVO
**/
void overOrder(DlRepairTicketsRespVO respVO);
} }

View File

@ -1637,6 +1637,28 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
// 记录操作日志 // 记录操作日志
repairRecordsService.saveRepairRecord(id, null, RecordTypeEnum.SCGG.getCode(), null, null); repairRecordsService.saveRepairRecord(id, null, RecordTypeEnum.SCGG.getCode(), null, null);
} }
/**
* 服务顾问交车
*
* @param respVO
* @author vinjor-M
* @date 16:51 2024/11/13
**/
@Override
public void overOrder(DlRepairTicketsRespVO respVO) {
// 更新工单状态
baseMapper.update(new LambdaUpdateWrapper<DlRepairTickets>()
.set(DlRepairTickets::getTicketsWorkStatus, TicketsWorkStatusEnum.END.getCode())
.set(DlRepairTickets::getTicketsStatus, TicketsStatusEnum.OVER.getCode())
//交车时才能把工单置为完成
.set(DlRepairTickets::getIsFinish,"1")
.eq(DlRepairTickets::getId, respVO.getId())
);
// 记录日志
repairRecordsService.saveRepairRecord(respVO.getId(), null, RecordTypeEnum.JC.getCode(), respVO.getRemark(), respVO.getImage());
}
} }

View File

@ -216,7 +216,7 @@
from dl_repair_tickets drt from dl_repair_tickets drt
left join dl_repair_titem drti left join dl_repair_titem drti
on drt.id = drti.ticket_id AND drti.deleted = '0' on drt.id = drti.ticket_id AND drti.deleted = '0'
where (drt.deleted = '0') AND drt.tickets_status IN ('04','05','01','07') where (drt.deleted = '0') AND drt.tickets_status IN ('04','05','01','07','06','02')
<if test="map.ticketNo != null and map.ticketNo != ''"> <if test="map.ticketNo != null and map.ticketNo != ''">
and ( and (
drt.ticket_no like concat('%', #{map.ticketNo}, '%') drt.ticket_no like concat('%', #{map.ticketNo}, '%')
@ -255,10 +255,11 @@
) )
</when> </when>
<otherwise> <otherwise>
-- 服务顾问和仓管查待办都是查未结束的工单 --
AND drt.is_finish = '0'
<if test="map.adviserId != null and map.adviserId != ''"> <if test="map.adviserId != null and map.adviserId != ''">
-- 查服务顾问 待处理的 工单未完成并且服务顾问是自己的 工单已完成且当前处理人是自己的-- -- 查服务顾问 当前处理人或服务顾问是自己的--
AND ( drt.is_finish = '0' AND drt.adviser_id = #{map.adviserId} ) AND ( drt.adviser_id = #{map.adviserId} OR drt.now_repair_id = #{map.adviserId})
OR (drt.is_finish = '1' AND drt.now_repair_id = #{map.adviserId})
</if> </if>
<if test="map.userIds != null and map.userIds.size > 0"> <if test="map.userIds != null and map.userIds.size > 0">
-- 查总检待处理的 -- -- 查总检待处理的 --