1
This commit is contained in:
parent
407c7c20c1
commit
4920ad7b25
@ -76,6 +76,9 @@ public enum RecordTypeEnum {
|
||||
/** 删除工单 */
|
||||
SCGG("scgg", "删除工单"),
|
||||
|
||||
/** 删除工单 */
|
||||
JC("jc", "交车"),
|
||||
|
||||
/** 内返派工 */
|
||||
NFPG("nfpg", "内返派工");
|
||||
|
||||
|
@ -27,6 +27,10 @@ public enum TicketsStatusEnum {
|
||||
* 待通知客户取车
|
||||
*/
|
||||
WAITING_NOTICE("07","待通知客户取车"),
|
||||
/**
|
||||
* 已交车
|
||||
*/
|
||||
OVER("08","已交车"),
|
||||
/**
|
||||
* 挂单/记账
|
||||
*/
|
||||
|
@ -297,6 +297,19 @@ public class DlRepairTicketsController {
|
||||
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
|
||||
|
@ -235,4 +235,12 @@ public interface DlRepairTicketsService extends IService<DlRepairTickets> {
|
||||
* @param id 工单ID
|
||||
**/
|
||||
void removeTicketById(String id);
|
||||
|
||||
/**
|
||||
* 服务顾问交车
|
||||
* @author vinjor-M
|
||||
* @date 16:51 2024/11/13
|
||||
* @param respVO
|
||||
**/
|
||||
void overOrder(DlRepairTicketsRespVO respVO);
|
||||
}
|
||||
|
@ -1637,6 +1637,28 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
|
||||
// 记录操作日志
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -216,7 +216,7 @@
|
||||
from dl_repair_tickets drt
|
||||
left join dl_repair_titem drti
|
||||
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 != ''">
|
||||
and (
|
||||
drt.ticket_no like concat('%', #{map.ticketNo}, '%')
|
||||
@ -255,10 +255,11 @@
|
||||
)
|
||||
</when>
|
||||
<otherwise>
|
||||
-- 服务顾问和仓管查待办都是查未结束的工单 --
|
||||
AND drt.is_finish = '0'
|
||||
<if test="map.adviserId != null and map.adviserId != ''">
|
||||
-- 查服务顾问 待处理的 工单未完成并且服务顾问是自己的 工单已完成且当前处理人是自己的--
|
||||
AND ( drt.is_finish = '0' AND drt.adviser_id = #{map.adviserId} )
|
||||
OR (drt.is_finish = '1' AND drt.now_repair_id = #{map.adviserId})
|
||||
-- 查服务顾问 当前处理人或服务顾问是自己的--
|
||||
AND ( drt.adviser_id = #{map.adviserId} OR drt.now_repair_id = #{map.adviserId})
|
||||
</if>
|
||||
<if test="map.userIds != null and map.userIds.size > 0">
|
||||
-- 查总检待处理的 --
|
||||
|
Loading…
Reference in New Issue
Block a user