同步代码
This commit is contained in:
parent
ab41a4abb8
commit
d9d18e1b27
|
@ -12,10 +12,12 @@ public class LegConstant {
|
|||
public static final String LEG_STATUS_ORDERED_NAME = "已下单";
|
||||
public static final int LEG_STATUS_PAYED = 5;
|
||||
public static final String LEG_STATUS_PAYED_NAME = "已付款";
|
||||
public static final int LEG_STATUS_FINISH = -2;
|
||||
public static final int LEG_STATUS_FINISH = 9;
|
||||
public static final String LEG_STATUS_FINISH_NAME = "已结束";
|
||||
public static final int LEG_STATUS_REJECT = -1;
|
||||
public static final String LEG_STATUS_REJECT_NAME = "审批未通过";
|
||||
|
||||
|
||||
// 规划节点运输方式
|
||||
public static final int LEG_TYPE_TRAIN = 0;
|
||||
public static final String LEG_TYPE_TRAIN_NAME = "火车";
|
||||
|
@ -58,7 +60,7 @@ public class LegConstant {
|
|||
public static final String LEG_EVENT_ORDERED_NAME = "下单事件";
|
||||
public static final int LEG_EVENT_PAYED = 5;
|
||||
public static final String LEG_EVENT_PAYED_NAME = "付款事件";
|
||||
public static final int LEG_EVENT_FINISH = -2;
|
||||
public static final int LEG_EVENT_FINISH = 9;
|
||||
public static final String LEG_EVENT_FINISH_NAME = "结束事件";
|
||||
public static final int LEG_EVENT_REJECT = -1;
|
||||
public static final String LEG_EVENT_REJECT_NAME = "拒绝事件";
|
||||
|
|
|
@ -12,7 +12,7 @@ public class RouteConstant {
|
|||
public static final String ORDER_STATUS_ORDERED_NAME = "已下单";
|
||||
public static final int ORDER_STATUS_PAYED = 4;
|
||||
public static final String ORDER_STATUS_PAYED_NAME = "已付款";
|
||||
public static final int ORDER_STATUS_FINISH = 5;
|
||||
public static final int ORDER_STATUS_FINISH = 9;
|
||||
public static final String ORDER_STATUS_FINISH_NAME = "已结束";
|
||||
public static final int ORDER_STATUS_REJECT = -1;
|
||||
public static final String ORDER_STATUS_REJECT_NAME = "审批拒绝";
|
||||
|
|
|
@ -53,7 +53,7 @@ public class RouteRepositoryImpl implements RouteRepository {
|
|||
String employeeNo = BaseContext.getCurrentUser().getEmployeeNo().toString();
|
||||
return jdbcRouteRepository
|
||||
.findByUserIdAndRouteOrderNoContainingOrApproveOrderNo_CreatorAndRouteOrderNoContaining(
|
||||
Long.valueOf(employeeNo),
|
||||
employeeNo,
|
||||
orderQueryData.getOrderNo(),
|
||||
employeeNo,
|
||||
orderQueryData.getOrderNo(),
|
||||
|
@ -66,7 +66,7 @@ public class RouteRepositoryImpl implements RouteRepository {
|
|||
.of(orderQueryData.getPageNum() - 1, orderQueryData.getPageSize(), Sort.by("updateTime"));
|
||||
String employeeNo = BaseContext.getCurrentUser().getEmployeeNo().toString();
|
||||
return jdbcRouteRepository.findByUserIdAndApproveOrderNo_InstructionsContainingOrApproveOrderNo_CreatorAndApproveOrderNo_InstructionsContaining(
|
||||
Long.valueOf(employeeNo),
|
||||
employeeNo,
|
||||
orderQueryData.getInstructions(),
|
||||
employeeNo,
|
||||
orderQueryData.getInstructions(),
|
||||
|
@ -84,7 +84,7 @@ public class RouteRepositoryImpl implements RouteRepository {
|
|||
.of(orderQueryData.getPageNum() - 1, orderQueryData.getPageSize(), Sort.by("updateTime"));
|
||||
String employeeNo = BaseContext.getCurrentUser().getEmployeeNo().toString();
|
||||
Page<RouteOrder> byUserId = jdbcRouteRepository
|
||||
.findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(Long.valueOf(employeeNo), employeeNo, sort);
|
||||
.findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(employeeNo, employeeNo, sort);
|
||||
List<RouteOrder> orders = byUserId.toList();
|
||||
orders.forEach(RouteOrder::reloadStatus);
|
||||
return new PageResult<>(byUserId.getTotalElements(), orders);
|
||||
|
@ -93,6 +93,6 @@ public class RouteRepositoryImpl implements RouteRepository {
|
|||
@Override
|
||||
public List<RouteOrder> findByActualOrderNoNotNull(OrderQueryData orderQueryData) {
|
||||
String employeeNo = BaseContext.getCurrentUser().getEmployeeNo().toString();
|
||||
return jdbcRouteRepository.findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(Long.valueOf(employeeNo), employeeNo);
|
||||
return jdbcRouteRepository.findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(employeeNo, employeeNo);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,17 +23,17 @@ public interface JdbcRouteRepository extends CrudRepository<RouteOrder, Long> {
|
|||
RouteOrder findByRouteOrderNo(String routeOrderNo);
|
||||
|
||||
|
||||
Page<RouteOrder> findByUserIdAndRouteOrderNoContainingOrApproveOrderNo_CreatorAndRouteOrderNoContaining(Long userId, String routeOrderNo, String approveOrderNo_creator, String routeOrderNo2, Pageable pageable);
|
||||
Page<RouteOrder> findByUserIdAndRouteOrderNoContainingOrApproveOrderNo_CreatorAndRouteOrderNoContaining(String userId, String routeOrderNo, String approveOrderNo_creator, String routeOrderNo2, Pageable pageable);
|
||||
|
||||
|
||||
Page<RouteOrder> findByUserIdAndApproveOrderNo_InstructionsContainingOrApproveOrderNo_CreatorAndApproveOrderNo_InstructionsContaining(Long userId, String approveOrderNo_instructions, String approveOrderNo_creator, String approveOrderNo_instructions2, Pageable pageable);
|
||||
Page<RouteOrder> findByUserIdAndApproveOrderNo_InstructionsContainingOrApproveOrderNo_CreatorAndApproveOrderNo_InstructionsContaining(String userId, String approveOrderNo_instructions, String approveOrderNo_creator, String approveOrderNo_instructions2, Pageable pageable);
|
||||
|
||||
|
||||
Page<RouteOrder> findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(Long userId, String approveOrderNo_creator, Pageable pageable);
|
||||
Page<RouteOrder> findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(String userId, String approveOrderNo_creator, Pageable pageable);
|
||||
|
||||
|
||||
|
||||
List<RouteOrder> findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(Long userId, String approveOrderNo_creator);
|
||||
List<RouteOrder> findByUserIdAndApproveOrderNo_ActualOrderNoNotNullOrApproveOrderNo_CreatorAndApproveOrderNo_ActualOrderNoNotNull(String userId, String approveOrderNo_creator);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -4,8 +4,10 @@ import cn.hutool.extra.pinyin.PinyinUtil;
|
|||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chint.application.services.login.strategy.PailaLoginStrategy;
|
||||
import com.chint.domain.aggregates.order.Leg;
|
||||
import com.chint.domain.aggregates.order.Location;
|
||||
import com.chint.domain.aggregates.user.User;
|
||||
import com.chint.domain.repository.LegRepository;
|
||||
import com.chint.domain.repository.LocationRepository;
|
||||
import com.chint.domain.repository.OrderDetailRepository;
|
||||
import com.chint.domain.repository.RouteRepository;
|
||||
|
@ -53,6 +55,9 @@ class RouteApplicationTests {
|
|||
@Autowired
|
||||
private PailaLoginStrategy pailaLoginStrategy;
|
||||
|
||||
@Autowired
|
||||
private LegRepository legRepository;
|
||||
|
||||
private User user = new User(1L, "230615020", 1, "卢麟哲", "1033719135@qq.com", "15857193365");
|
||||
|
||||
|
||||
|
@ -202,6 +207,12 @@ class RouteApplicationTests {
|
|||
orderDetailRepository.deleteById(31L);
|
||||
orderDetailRepository.deleteById(33L);
|
||||
}
|
||||
@Test
|
||||
void deleteLeg(){
|
||||
|
||||
legRepository.deleteById(Leg.of(506L));
|
||||
legRepository.deleteById(Leg.of(507L));
|
||||
}
|
||||
|
||||
// @Test
|
||||
void ssoLogin(){
|
||||
|
|
Loading…
Reference in New Issue