Compare commits

...

2 Commits

Author SHA1 Message Date
caoyizhong 641c78d990 Merge remote-tracking branch 'origin/dev' into dev 10 months ago
caoyizhong 7ea5c88d8b 调整查询 10 months ago
  1. 207
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/controller/AftersalesWorkOrderController.java
  2. 29
      blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

207
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<AftersalesWorkOrderEntity> pages = aftersalesWorkOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(aftersalesWorkOrder, AftersalesWorkOrderEntity.class));
return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
try{
IPage<AftersalesWorkOrderEntity> 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<IPage<AftersalesWorkOrderVO>> getListOwn(@ApiIgnore @RequestParam Map<String, Object> aftersalesWorkOrder, Query query) {
log.info("异常工单查询参数》》》{}",aftersalesWorkOrder);
IPage<AftersalesWorkOrderEntity> pages = aftersalesWorkOrderService.pageListOwn(aftersalesWorkOrder, Condition.getPage(query));
return R.data(AftersalesWorkOrderWrapper.build().pageVO(pages));
try{
IPage<AftersalesWorkOrderEntity> 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<AftersalesSettlementEntity> pages = aftersalesWorkOrderService.getListSettlement(aftersalesWorkOrder, Condition.getPage(query));
return R.data(pages);
try{
IPage<AftersalesSettlementEntity> 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<List<User>> listUser() {
List<User> list = aftersalesWorkOrderService.getCustomerServicePersonnel();
return R.data(list);
try{
List<User> 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<List<User>> getBusinessDepartmentUser(Long warehouseId) {
List<User> list = aftersalesWorkOrderService.getBusinessDepartmentUser(warehouseId);
return R.data(list);
try {
List<User> 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<AftersalesWorkOrderDTO> 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<AftersalesWorkOrderVO> list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query));
return R.data(list);
try {
IPage<AftersalesWorkOrderVO> list= aftersalesWorkOrderService.getPendingWorkOrder(aftersalesWorkOrder,Condition.getPage(query));
return R.data(list);
}catch (Exception e){
log.info("仓库查询待处理的异常工单》》》{}",e.getMessage());
return R.fail("系统异常!!!");
}
}
/**

29
blade-service/logpm-aftersales/src/main/java/com/logpm/aftersales/mapper/AftersalesWorkOrderMapper.xml

@ -64,13 +64,13 @@
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
<if test="param.initiationIdentification != null and param.initiationIdentification != '' ">and lawo.initiation_identification = #{param.initiationIdentification } </if>
<if test="param.discoveryNode != null and param.discoveryNode != '' ">and lawo.discovery_node = #{param.discoveryNode } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number = #{param.workOrderNumber } </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number = #{param.waybillNumber } </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code = #{param.orderCode } </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number = #{param.trainNumber } </if>
<if test="param.first != null and param.first != '' ">and lawo.first = #{param.first } </if>
<if test="param.secondary != null and param.secondary != '' ">and lawo.secondary = #{param.secondary } </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route = #{param.vehicleRoute } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test="param.first != null and param.first != '' ">and lawo.first like concat('%', #{param.first },'%') </if>
<if test="param.secondary != null and param.secondary != '' ">and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<!-- create_time >= unix_timestamp('2013-10-24 00:00:00') and create_time <= unix_timestamp('2013-10-24 23:59:59')
date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d')
-->
@ -81,13 +81,13 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test="param.auditTime != null and param.auditTime != '' ">and date_format(from_unixtime(lawo.audit_time),'%Y-%m-%d') = date_format(#{param.auditTime},'%Y-%m-%d') </if>
<if test="param.entryTime != null and param.entryTime != '' ">and date_format(from_unixtime(lawo.entry_time),'%Y-%m-%d') = date_format(#{param.entryTime},'%Y-%m-%d') </if>
<if test="param.overTime != null and param.overTime != '' ">and date_format(from_unixtime(lawo.over_time),'%Y-%m-%d') = date_format(#{param.overTime}),'%Y-%m-%d') </if>
<if test="param.waybillMall != null and param.waybillMall != '' ">and lawo.waybill_mall = #{param.waybillMall } </if>
<if test="param.waybillMall != null and param.waybillMall != '' ">and lawo.waybill_mall like concat('%', #{param.waybillMall },'%') </if>
<if test="param.deliveryDriver != null and param.deliveryDriver != '' ">and lawo.delivery_driver = #{param.deliveryDriver } </if>
<if test="param.customerServiceState != null and param.customerServiceState == 30 "> and lawo.work_order_status in ('30','40') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 20 "> and lawo.work_order_status in ('30') </if>
<if test="param.customerServiceState != null and param.customerServiceState == 10 "> and lawo.work_order_status in ('80','100') </if>
<if test="param.customerServiceId != null and param.customerServiceId != '' ">and lawo.customer_service_id = #{param.customerServiceId } </if>
<if test="param.customerServiceName != null and param.customerServiceName != '' ">and lawo.customer_service_name = #{param.customerServiceName } </if>
<if test="param.customerServiceName != null and param.customerServiceName != '' ">and lawo.customer_service_name like concat('%', #{param.customerServiceName },'%') </if>
<if test="param.waybillMallId != null and param.waybillMallId != '' ">and lawo.waybill_mall_id = #{param.waybillMallId } </if>
<if test="param.problemDescription != null and param.problemDescription != '' ">and lawo.problem_description = #{param.problemDescription} </if>
<if test="param.warehouseId != null and param.warehouseId != '' and param.handleStatus != 20">and lawo.warehouse_id = #{param.warehouseId} </if>
@ -106,7 +106,16 @@ date_format(from_unixtime(create_time),'%Y-%m-%d') = date_format(now(),'%Y-%m-%d
<if test="param.handleStatus!= null and param.handleStatus == 30">and lawo.work_order_status in (21,30) and lap.processing_status = '4' and lap.business_id = #{param.warehouseId} </if>
<!-- <if test="param.handleStatus!= null and param.handleStatus == 10 ">and lawo.warehouse_id = #{param.warehouseId} </if>-->
<if test="param.handleStatus!= null and param.handleStatus == 20 ">and lawo.work_order_status in (80,100) and lacr.warehouse_id=#{param.warehouseId} </if>
<if test="param.handleStatus != null "> or 1=1 </if>
<if test="param.handleStatus != null "> or 1=1 </if>
<if test="param.workOrderType != null and param.workOrderType != '' ">and lawo.work_order_type = #{param.workOrderType } </if>
<if test="param.discoveryNode != null and param.discoveryNode != '' ">and lawo.discovery_node = #{param.discoveryNode } </if>
<if test="param.workOrderNumber != null and param.workOrderNumber != '' ">and lawo.work_order_number like concat('%',#{param.workOrderNumber },'%') </if>
<if test="param.waybillNumber != null and param.waybillNumber != '' ">and lawo.waybill_number like concat('%', #{param.waybillNumber },'%') </if>
<if test="param.orderCode != null and param.orderCode != '' ">and lawo.order_code like concat('%', #{param.orderCode },'%') </if>
<if test="param.trainNumber != null and param.trainNumber != '' ">and lawo.train_number like concat('%', #{param.trainNumber },'%') </if>
<if test="param.first != null and param.first != '' ">and lawo.first like concat('%', #{param.first },'%') </if>
<if test="param.secondary != null and param.secondary != '' ">and lawo.secondary like concat('%', #{param.secondary },'%') </if>
<if test="param.vehicleRoute != null and param.vehicleRoute != '' ">and lawo.vehicle_route like concat('%', #{param.vehicleRoute },'%') </if>
<if test="param.warehouseId != null and param.warehouseId != '' and param.handleStatus != 20 "> and lap.business_id = #{param.warehouseId} </if>
<if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.handleStatus != 40 "> and lawo.work_order_status in ( #{param.workOrderStatus }) </if>
<!-- <if test="param.workOrderStatus != null and param.workOrderStatus != '' and param.customerServiceState == null "> and lawo.work_order_status in ( #{param.workOrderStatus }) and lap.types_of = '2' </if>-->

Loading…
Cancel
Save