ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TDriverController.java
@@ -2077,7 +2077,11 @@ public String createAllocationReq(Integer companyId,Integer userId,int type,double money) throws Exception { List<TEnterpriseWithdrawal> tEnterpriseWithdrawals = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", companyId)); TDriver tUser = tDriverService.selectById(userId); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>() .eq("userId",tUser.getId()) .eq("userType",2).eq("type",1) ); if(userWithdrawals.size()==0){ return "error"; } ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TPubWithdrawalController.java
@@ -230,7 +230,8 @@ TDriver tUser1 = driverService.selectById(tPubWithdrawal.getUserId()); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() .eq("type",1) .eq("phone", tUser1.getPhone()) .eq("userId",tUser1.getId()) .eq("userType",2) .last("LIMIT 1")); // 先从平台进行分账到用户电子账簿 if(userWithdrawal==null){ ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderCrossCityController.java
@@ -430,7 +430,10 @@ public String createAllocationReq(Integer companyId,Integer userId,int type,double money) throws Exception { List<TEnterpriseWithdrawal> tEnterpriseWithdrawals = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", companyId)); TDriver tUser = tDriverService.selectById(userId); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>() .eq("userId",tUser.getId()) .eq("userType",2).eq("type",1) ); if(userWithdrawals.size()==0){ return "error"; } @@ -475,7 +478,9 @@ public String createAllocationReqUser(Integer companyId,Integer userId,int type,double money) throws Exception { List<TEnterpriseWithdrawal> tEnterpriseWithdrawals = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", companyId)); TUser tUser = userService.selectById(userId); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>() .eq("phone", tUser.getPhone()) ); if(userWithdrawals.size()==0){ return "error"; } ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TOrderLogisticsController.java
@@ -310,7 +310,10 @@ public String createAllocationReq(Integer companyId,Integer userId,int type,double money){ List<TEnterpriseWithdrawal> tEnterpriseWithdrawals = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", companyId)); TDriver tUser = tDriverService.selectById(userId); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>() .eq("userId",tUser.getId()) .eq("userType",2).eq("type",1) ); if(userWithdrawals.size()==0){ return "error"; } ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TReassignController.java
@@ -705,7 +705,10 @@ TDriver driver = itDriverService.selectById(originalDriverId); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>().eq("phone", driver.getPhone()).eq("type", 1).last("limit 1")); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() .eq("userId",driver.getId()) .eq("userType",2).eq("type",1).last("limit 1") ); if(null == userWithdrawal){ return ResultUtil.error("该司机未进件"); } @@ -782,7 +785,9 @@ public String createAllocationReq(Integer companyId,Integer userId,int type,double money){ List<TEnterpriseWithdrawal> tEnterpriseWithdrawals = tEnterpriseWithdrawalService.selectList(new EntityWrapper<TEnterpriseWithdrawal>().eq("companyId", companyId)); TDriver tUser = itDriverService.selectById(userId); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("phone", tUser.getPhone())); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>() .eq("userId",tUser.getId()) .eq("userType",2).eq("type", 1)); if(userWithdrawals.size()==0){ return "error"; } @@ -848,7 +853,9 @@ TDriver driver = itDriverService.selectById(originalDriverId); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>().eq("phone", driver.getPhone()).eq("type", 1).last("limit 1")); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() .eq("userId",driver.getId()) .eq("userType",2).eq("type",1).last("limit 1")); if(null == userWithdrawal){ return ResultUtil.error("该司机未进件"); } @@ -927,7 +934,9 @@ transactionDetailsService.saveData(orderCrossCity.getUserId(), "跨城订单取消退款", orderCrossCity.getPayMoney().doubleValue(), 1, 1, 1, 3, tReassign.getOrderId()); }else{ TDriver driver = itDriverService.selectById(tReassign.getOriginalDriverId()); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>().eq("phone", driver.getPhone()).eq("type", 1).last("limit 1")); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() .eq("userId",driver.getId()) .eq("userType",2).eq("type",1).last("limit 1")); if(null == userWithdrawal){ return ResultUtil.error("该司机未进件"); } @@ -1034,7 +1043,9 @@ TDriver driver = itDriverService.selectById(originalDriverId); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>().eq("phone", driver.getPhone()).eq("type", 1).last("limit 1")); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() .eq("userId",driver.getId()) .eq("userType",2).eq("type",1).last("limit 1")); if(null == userWithdrawal){ return ResultUtil.error("该司机未进件"); } @@ -1180,7 +1191,9 @@ TDriver driver = itDriverService.selectById(originalDriverId); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>().eq("phone", driver.getPhone()).eq("type", 1).last("limit 1")); UserWithdrawal userWithdrawal = userWithdrawalService.selectOne(new EntityWrapper<UserWithdrawal>() .eq("userId",driver.getId()) .eq("userType",2).eq("type",1).last("limit 1")); if(null == userWithdrawal){ return ResultUtil.error("该司机未进件"); } ManagementJYXTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/service/impl/TCompanyServiceImpl.java
@@ -384,7 +384,9 @@ List<TDriver> collect = tDrivers.stream().filter(e -> e.getCompanyId() == tDriverPayDay.getCompanyId()).collect(Collectors.toList()); for (TDriver tDriver : collect) { // 获取司机的电子账簿 List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>().eq("type", 1).eq("phone", tDriver.getPhone())); List<UserWithdrawal> userWithdrawals = userWithdrawalService.selectList(new EntityWrapper<UserWithdrawal>() .eq("userId",tDriver.getId()) .eq("userType",2).eq("type",1)); if (userWithdrawals.size() > 0) { // 当前司机分账金额 Double sum = state.stream().filter(e -> (e.getUserType() == 2 && tDriver.getId().equals(e.getObjectId()))).mapToDouble(Income::getMoney).sum();