编辑工单和删除工单

(cherry picked from commit 4a90687814)
This commit is contained in:
xiaofajia 2024-11-01 20:21:58 +08:00 committed by Vinjor
parent bb93d842ec
commit b463144cac
4 changed files with 43 additions and 0 deletions

View File

@ -348,5 +348,19 @@ public class DlRepairTicketsController {
dlRepairTicketsService.updateTicket(respVO);
return CommonResult.ok();
}
/**
* 删除工单
*
* @author 小李
* @date 20:05 2024/11/1
* @param id 工单ID
**/
@DeleteMapping("/remove")
@Operation(summary = "删除工单")
public CommonResult<?> removeTicketById(@RequestParam("id") String id) {
dlRepairTicketsService.removeTicketById(id);
return CommonResult.ok();
}
}

View File

@ -226,4 +226,13 @@ public interface DlRepairTicketsService extends IService<DlRepairTickets> {
* @param respVO 请求对象
**/
void updateTicket(DlRepairTicketsRespVO respVO);
/**
* 删除工单
*
* @author 小李
* @date 20:05 2024/11/1
* @param id 工单ID
**/
void removeTicketById(String id);
}

View File

@ -1532,6 +1532,24 @@ public class DlRepairTicketsServiceImpl extends ServiceImpl<DlRepairTicketsMappe
throw exception0(500, "系统异常");
}
}
/**
* 删除工单
*
* @author 小李
* @date 20:05 2024/11/1
* @param id 工单ID
**/
@Override
@DSTransactional
public void removeTicketById(String id){
// 删除订单
repairOrderInfoService.remove(new LambdaQueryWrapper<RepairOrderInfo>().eq(RepairOrderInfo::getGoodsId, id));
// 删除工单
baseMapper.deleteById(id);
// 删除工单子表
titemService.remove(new LambdaQueryWrapper<DlRepairTitem>().eq(DlRepairTitem::getTicketId, id));
}
}

View File

@ -56,6 +56,8 @@ spring:
# url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 连接的示例
username: lanan_dev
password: lighting@2024
# username: lanan
# password: 123456
# username: sa # SQL Server 连接的示例
# password: Yudao@2024 # SQL Server 连接的示例
# username: SYSDBA # DM 连接的示例