From 7ea5c88d8b285d09296dc6316e0a5934b68087ac Mon Sep 17 00:00:00 2001 From: caoyizhong <1270296080> Date: Tue, 16 Jan 2024 14:37:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AftersalesWorkOrderController.java | 207 ++++++++++++++---- .../mapper/AftersalesWorkOrderMapper.xml | 29 ++- 2 files changed, 188 insertions(+), 48 deletions(-) diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java index 77b148af1..842a17eb5 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java @@ -98,8 +98,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNotNull(myCurrentWarehouse)){ aftersalesWorkOrder.put("warehouseId", myCurrentWarehouse.getId()); } - IPage pages = aftersalesWorkOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(aftersalesWorkOrder, AftersalesWorkOrderEntity.class)); - return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages)); + try{ + IPage pages = aftersalesWorkOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(aftersalesWorkOrder, AftersalesWorkOrderEntity.class)); + return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages)); + }catch (Exception e ){ + log.info("工单查询系统异常》》》{}",e.getMessage()); + return R.fail("系统异常!"); + } + } /** @@ -110,8 +116,14 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperation(value = "查询异常工单完整数据集合", notes = "传入aftersalesWorkOrder") public R> getListOwn(@ApiIgnore @RequestParam Map aftersalesWorkOrder, Query query) { log.info("异常工单查询参数》》》{}",aftersalesWorkOrder); - IPage pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query)); - return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages)); + try{ + IPage pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query)); + return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages)); + }catch (Exception e){ + log.info("工单查询系统异常》》》{}",e.getMessage()); + return R.fail("系统异常!"); + } + } /** @@ -127,8 +139,14 @@ public class AftersalesWorkOrderController extends BladeController { aftersalesWorkOrder.put("business_id",myCurrentWarehouse.getId()); aftersalesWorkOrder.put("business_name",myCurrentWarehouse.getName()); } - IPage pages = aftersalesWorkOrderService.getListSettlement(aftersalesWorkOrder, Condition.getPage(query)); - return R.data(pages); + try{ + IPage pages = aftersalesWorkOrderService.getListSettlement(aftersalesWorkOrder, Condition.getPage(query)); + return R.data(pages); + }catch(Exception e){ + log.info("查询异常工单理赔信息>>{}",e.getMessage()); + return R.fail("系统异常"); + } + } /** @@ -145,7 +163,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getAftersalesProcessingResultsDTO())){ throw new ServiceException("异常工单处理结果不能为空"); } - return R.status(aftersalesWorkOrderService.addProcessingResults(aftersalesWorkOrderDTO)); + try { + return R.status(aftersalesWorkOrderService.addProcessingResults(aftersalesWorkOrderDTO)); + }catch(Exception e){ + log.info("营业部提交异常工单处理结果>>>{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } @@ -183,8 +207,15 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "查询客服人员信息", notes = "传入aftersalesWorkOrder") public R> listUser() { - List list = aftersalesWorkOrderService.getCustomerServicePersonnel(); - return R.data(list); + try{ + List list = aftersalesWorkOrderService.getCustomerServicePersonnel(); + return R.data(list); + }catch(Exception e){ + log.info("查询客服人员信息>>>>{}",e.getMessage()); + return R.fail("系统异常!!"); + } + + } /** @@ -205,12 +236,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getSurveyRecordDTO().getContent())){ throw new ServiceException("内容不能为空!!"); } - }catch (Exception e ){ + return R.status(aftersalesWorkOrderService.savaSurveyRecord(aftersalesWorkOrderDTO)); + }catch (RuntimeException e ){ log.info("内容不能为空!!"); throw new ServiceException("内容不能为空!!"); + }catch (Exception e){ + log.info(">新增调查记录>>{}",e.getMessage()); + return R.fail("系统异常!!"); } - - return R.status(aftersalesWorkOrderService.savaSurveyRecord(aftersalesWorkOrderDTO)); } /** @@ -225,8 +258,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getId())){ throw new ServiceException("异常工单ID不能为空"); } - AftersalesWorkOrderVO list = aftersalesWorkOrderService.getSurveyRecord(aftersalesWorkOrderDTO); - return R.data(list); + try{ + AftersalesWorkOrderVO list = aftersalesWorkOrderService.getSurveyRecord(aftersalesWorkOrderDTO); + return R.data(list); + }catch(Exception e){ + log.info("查询调查记录>>>{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } @@ -242,8 +281,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrderDTO.getId())){ throw new ServiceException("异常工单ID不能为空"); } - AftersalesWorkOrderVO list = aftersalesWorkOrderService.getTrackRecord(aftersalesWorkOrderDTO); - return R.data(list); + try{ + AftersalesWorkOrderVO list = aftersalesWorkOrderService.getTrackRecord(aftersalesWorkOrderDTO); + return R.data(list); + }catch (Exception e){ + log.info("查询全部跟踪记录>>>{}",e.getMessage()); + return R.fail("系统异常!!!"); + } } @@ -254,8 +298,14 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperationSupport(order = 2) @ApiOperation(value = "查询营业部责任人人员信息", notes = "传入aftersalesWorkOrder") public R> getBusinessDepartmentUser(Long warehouseId) { - List list = aftersalesWorkOrderService.getBusinessDepartmentUser(warehouseId); - return R.data(list); + try { + List list = aftersalesWorkOrderService.getBusinessDepartmentUser(warehouseId); + return R.data(list); + }catch(Exception e){ + log.info("查询营业部责任人人员信息》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -272,8 +322,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceId() ) || ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceName() )){ return R.fail("请填写客服信息 !"); } - R r = aftersalesWorkOrderService.updateAssignCustomerService(aftersalesWorkOrderDTO); - return R.success("提交成功!"); + try{ + R r = aftersalesWorkOrderService.updateAssignCustomerService(aftersalesWorkOrderDTO); + return R.success("提交成功!"); + }catch (Exception e){ + log.info("异常工单分配处理客服信息》》》{}",e.getMessage()); + return R.fail("系统异常!!"); + } } @@ -291,8 +346,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceId() ) || ObjectUtils.isNull( aftersalesWorkOrderDTO.getCustomerServiceName() )){ return R.fail("请填写客服信息 !"); } - R r = aftersalesWorkOrderService.updateAssignArbitrateService(aftersalesWorkOrderDTO); - return R.success("提交成功!"); + try { + R r = aftersalesWorkOrderService.updateAssignArbitrateService(aftersalesWorkOrderDTO); + return R.success("提交成功!"); + }catch (Exception e){ + log.info("异常工单仲裁 分配处理客服信息>>{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } @@ -326,8 +387,13 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperationSupport(order = 4) @ApiOperation(value = "异常工单 客服完结处理", notes = "传入aftersalesWorkOrder") public R addCompletionEnd(@Valid @RequestBody List aftersalesWorkOrder) { + try { + return R.status(aftersalesWorkOrderService.addCompletionEnd(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("客服完结处理>>>{}",e.getMessage()); + return R.fail("系统异常!!"); + } - return R.status(aftersalesWorkOrderService.addCompletionEnd(aftersalesWorkOrder)); } /** @@ -341,7 +407,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){ throw new ServiceException("异常工单ID不能为空!"); } - return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.updateCompletionEnd(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("修改完结处理》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -358,7 +430,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesAppeal.getWorkOrderId())){ throw new ServiceException("异常工单ID不能为空!!"); } - return R.status(aftersalesWorkOrderService.updateByIdAppel(aftersalesAppeal)); + try { + return R.status(aftersalesWorkOrderService.updateByIdAppel(aftersalesAppeal)); + }catch (Exception e){ + log.info("客服操作确定修改》》》{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } /** @@ -371,8 +449,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrder.getId())){ return R.fail("异常工单ID不能为空!!"); } - AftersalesWorkOrderVO workOrderVO = aftersalesWorkOrderService.getProcessingResults(aftersalesWorkOrder); - return R.data(workOrderVO); + try { + AftersalesWorkOrderVO workOrderVO = aftersalesWorkOrderService.getProcessingResults(aftersalesWorkOrder); + return R.data(workOrderVO); + }catch (Exception e){ + log.info("查询详情全部信息数据》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -386,7 +470,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrder) || aftersalesWorkOrder.getAssignList().isEmpty()){ throw new ServiceException("数据不能为空!!"); } - return R.status(aftersalesWorkOrderService.updateArbitrate(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.updateArbitrate(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("申请仲裁》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -400,7 +490,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull(aftersalesWorkOrder) || aftersalesWorkOrder.getAssignList().isEmpty()){ throw new ServiceException("数据不能为空!!"); } - return R.status(aftersalesWorkOrderService.addArbitrateEnd(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.addArbitrateEnd(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("客服仲裁完结操作》》》{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } /** @@ -411,7 +507,13 @@ public class AftersalesWorkOrderController extends BladeController { @ApiOperation(value = "修改", notes = "传入aftersalesWorkOrder") public R update(@Valid @RequestBody AftersalesWorkOrderEntity aftersalesWorkOrder) { log.info("修改参数》》》{}",aftersalesWorkOrder.toString()); - return R.status(aftersalesWorkOrderService.updateById(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.updateById(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("工单修改异常》》》{}",e.getMessage()); + return R.fail("系统异常!!"); + } + } @@ -426,7 +528,13 @@ public class AftersalesWorkOrderController extends BladeController { if(aftersalesWorkOrder.getAssignList().isEmpty()){ throw new ServiceException("确定工单ID不能为空!!"); } - return R.status( aftersalesWorkOrderService.updateManagerConfirmed(aftersalesWorkOrder) ); + try { + return R.status( aftersalesWorkOrderService.updateManagerConfirmed(aftersalesWorkOrder) ); + }catch (Exception e){ + log.info("客服经理确定数据》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -440,7 +548,13 @@ public class AftersalesWorkOrderController extends BladeController { if(aftersalesWorkOrder.getAssignList().isEmpty()){ throw new ServiceException("修改工单数据ID不能为空!!"); } - return R.status(aftersalesWorkOrderService.updateWorkOrderStatus(aftersalesWorkOrder)); + try { + return R.status(aftersalesWorkOrderService.updateWorkOrderStatus(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("批量修改工单状态为已处理>>{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -454,8 +568,13 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNull( aftersalesWorkOrder.getAssignList())){ return R.fail("更新的异常工单不能为空!!"); } - R r = aftersalesWorkOrderService.getUpdateWorkList(aftersalesWorkOrder); - return r; + try{ + return aftersalesWorkOrderService.getUpdateWorkList(aftersalesWorkOrder); + }catch (Exception e){ + log.info("填写钉钉流程号异常》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** @@ -478,8 +597,14 @@ public class AftersalesWorkOrderController extends BladeController { // throw new ServiceException("二级品类未填!"); // } } - aftersalesWorkOrder.setInitiationIdentification("PC"); - return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder)); + try { + aftersalesWorkOrder.setInitiationIdentification("PC"); + return R.status(aftersalesWorkOrderService.saveOrUpdateOwn(aftersalesWorkOrder)); + }catch (Exception e){ + log.info("工单提交异常》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } @@ -496,8 +621,14 @@ public class AftersalesWorkOrderController extends BladeController { if(ObjectUtils.isNotNull(myCurrentWarehouse)){ aftersalesWorkOrder.setWarehouseId(myCurrentWarehouse.getId()); } - IPage list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query)); - return R.data(list); + try { + IPage list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query)); + return R.data(list); + }catch (Exception e){ + log.info("仓库查询待处理的异常工单》》》{}",e.getMessage()); + return R.fail("系统异常!!!"); + } + } /** diff --git a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml index f71a1c364..910dee4b3 100644 --- a/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml +++ b/blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml @@ -64,13 +64,13 @@ and lawo.work_order_type = #{param.workOrderType } and lawo.initiation_identification = #{param.initiationIdentification } and lawo.discovery_node = #{param.discoveryNode } - and lawo.work_order_number = #{param.workOrderNumber } - and lawo.waybill_number = #{param.waybillNumber } - and lawo.order_code = #{param.orderCode } - and lawo.train_number = #{param.trainNumber } - and lawo.first = #{param.first } - and lawo.secondary = #{param.secondary } - and lawo.vehicle_route = #{param.vehicleRoute } + and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') + and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') + and lawo.order_code like concat('%', #{param.orderCode },'%') + and lawo.train_number like concat('%', #{param.trainNumber },'%') + and lawo.first like concat('%', #{param.first },'%') + and lawo.secondary like concat('%', #{param.secondary },'%') + and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') @@ -81,13 +81,13 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') - and lawo.waybill_mall = #{param.waybillMall } + and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') and lawo.delivery_driver = #{param.deliveryDriver } and lawo.work_order_status in ('30','40') and lawo.work_order_status in ('30') and lawo.work_order_status in ('80','100') and lawo.customer_service_id = #{param.customerServiceId } - and lawo.customer_service_name = #{param.customerServiceName } + and lawo.customer_service_name like concat('%', #{param.customerServiceName },'%') and lawo.waybill_mall_id = #{param.waybillMallId } and lawo.problem_description = #{param.problemDescription} and lawo.warehouse_id = #{param.warehouseId} @@ -106,7 +106,16 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} - or 1=1 + or 1=1 + and lawo.work_order_type = #{param.workOrderType } + and lawo.discovery_node = #{param.discoveryNode } + and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') + and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') + and lawo.order_code like concat('%', #{param.orderCode },'%') + and lawo.train_number like concat('%', #{param.trainNumber },'%') + and lawo.first like concat('%', #{param.first },'%') + and lawo.secondary like concat('%', #{param.secondary },'%') + and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') and lap.business_id = #{param.warehouseId} and lawo.work_order_status in ( #{param.workOrderStatus })