提交 5664d9ff authored 作者: 刘海泉's avatar 刘海泉

增加异常上报的排序

上级 d17771d3
......@@ -4,6 +4,8 @@ import com.clx.performance.mapper.OrderChildExceptionReportOperationLogMapper;
import com.clx.performance.model.OrderChildExceptionReportOperationLog;
import com.msl.common.dao.BaseDao;
import java.util.List;
/**
* @Author: aiqinguo
* @Description: 运单日志
......@@ -11,4 +13,5 @@ import com.msl.common.dao.BaseDao;
* @Version: 1.0
*/
public interface OrderChildExceptionReportOperationLogDao extends BaseDao<OrderChildExceptionReportOperationLogMapper, OrderChildExceptionReportOperationLog, Integer> {
List<OrderChildExceptionReportOperationLog> getLogs(String reportNo);
}
package com.clx.performance.dao.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.clx.performance.dao.OrderChildExceptionReportOperationLogDao;
import com.clx.performance.mapper.OrderChildExceptionReportOperationLogMapper;
import com.clx.performance.model.OrderChildExceptionReportOperationLog;
import com.msl.common.dao.impl.BaseDaoImpl;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @Author: aiqinguo
* @Description: 运单图片
......@@ -14,4 +17,11 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public class OrderChildExceptionReportOperationLogDaoImpl extends BaseDaoImpl<OrderChildExceptionReportOperationLogMapper, OrderChildExceptionReportOperationLog, Integer> implements OrderChildExceptionReportOperationLogDao {
@Override
public List<OrderChildExceptionReportOperationLog> getLogs(String reportNo) {
LambdaQueryWrapper<OrderChildExceptionReportOperationLog> query = new LambdaQueryWrapper<>();
query.eq(OrderChildExceptionReportOperationLog::getReportNo,reportNo);
query.orderByDesc(OrderChildExceptionReportOperationLog :: getId);
return baseMapper.selectList(query);
}
}
......@@ -365,8 +365,7 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
vo.setAppealPictureUrlList(JSON.parseArray(dealLog.getPictureUrl(),String.class));
vo.setAppealVideoUrlList(JSON.parseArray(dealLog.getVideoUrl(),String.class));
}
List<OrderChildExceptionReportOperationLog> list = orderChildExceptionReportOperationLogDao.listByField(
OrderChildExceptionReportOperationLog::getReportNo, report.getReportNo());
List<OrderChildExceptionReportOperationLog> list = orderChildExceptionReportOperationLogDao.getLogs(report.getReportNo());
List<OrderChildExceptionReportOperationLogVO> logs = orderChildExceptionReportOperationLogStruct.convertList(list);
vo.setOperationLogs(logs);
return vo;
......@@ -379,17 +378,19 @@ public class OrderChildExceptionReportServiceImpl implements OrderChildExceptio
if(Objects.equals(report.getStatus(),CarrierExceptionReportEnum.Status.PROCESSED.getCode())
&& Objects.equals(report.getDealResult(),ExceptionReportEnum.DealResult.CARRIER_BREAK_CONTRACT.getCode())){
//创建司机违约记录
saveDriverBreakContractRecord(report);
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
report.setTransferDriverBreakContract(1);
report.setBreakContractReason(param.getReason());
orderChildExceptionReportDao.updateEntityByKey(report);
saveOperationLog(report.getReportNo(),CarrierExceptionLogEnum.Type.TRANSFER_DRIVER_BREAK_CONTRACT,null,loginUserInfo.getUserNo(),
loginUserInfo.getUserName());
}else{
throw new ServiceSystemException(ResultEnum.DATA_ERROR);
}
//创建司机违约记录
saveDriverBreakContractRecord(report);
UserSessionData loginUserInfo = TokenUtil.getLoginUserInfo();
report.setTransferDriverBreakContract(1);
report.setBreakContractReason(param.getReason());
orderChildExceptionReportDao.updateEntityByKey(report);
saveOperationLog(report.getReportNo(),CarrierExceptionLogEnum.Type.TRANSFER_DRIVER_BREAK_CONTRACT,null,loginUserInfo.getUserNo(),
loginUserInfo.getUserName());
}
public void saveOperationLog(String reportNo, CarrierExceptionLogEnum.Type type,String result,Long createBy,String createName){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论