更新10.16
This commit is contained in:
parent
e677e8cc5d
commit
5c3391599e
@ -128,18 +128,17 @@ public class FleetMemberServiceImpl extends ServiceImpl<FleetMemberMapper, Fleet
|
|||||||
// if (ObjectUtil.isNotEmpty(fleetInfoUniVo) && (fleetInfoUniVo.getUserId() != nowAccountInfo.getId())) {
|
// if (ObjectUtil.isNotEmpty(fleetInfoUniVo) && (fleetInfoUniVo.getUserId() != nowAccountInfo.getId())) {
|
||||||
// throw new RuntimeException("请由车队负责人进行此操作");
|
// throw new RuntimeException("请由车队负责人进行此操作");
|
||||||
// }
|
// }
|
||||||
//判断用户是否存在选择的车队
|
//判断用户是否加入车队
|
||||||
FleetMember fleetMember2 = baseMapper.selectOne(new LambdaQueryWrapper<FleetMember>()
|
FleetMember fleetMember2 = baseMapper.selectOne(new LambdaQueryWrapper<FleetMember>()
|
||||||
.eq(FleetMember::getMobile, fleetMember.getMobile())
|
.eq(FleetMember::getMobile, fleetMember.getMobile())
|
||||||
.eq(FleetMember::getFleetId, fleetMember.getFleetId())
|
|
||||||
.last("limit 1"));
|
.last("limit 1"));
|
||||||
if (ObjectUtil.isNotEmpty(fleetMember2)) {
|
if (ObjectUtil.isNotEmpty(fleetMember2)) {
|
||||||
throw new RuntimeException("该用户已加入该车队");
|
throw new RuntimeException("该用户已绑定车队");
|
||||||
}
|
}
|
||||||
// if (ObjectUtil.isNotEmpty(fleetMember1)) {
|
// if (ObjectUtil.isNotEmpty(fleetMember1)) {
|
||||||
// return 0;
|
// return 0;
|
||||||
// }
|
// }
|
||||||
// LJUserVo user = userService.selectUserByMobileAndChantStoreId(fleetMember.getMobile());
|
|
||||||
//判断当前车队成员否存在账号
|
//判断当前车队成员否存在账号
|
||||||
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
|
MtUser mtUser = mtUserMapper.selectOne(new LambdaQueryWrapper<MtUser>()
|
||||||
.eq(MtUser::getMobile, fleetMember.getMobile())
|
.eq(MtUser::getMobile, fleetMember.getMobile())
|
||||||
|
@ -1873,12 +1873,16 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
List<OilNumber> oilNumbers = oilNumberMapper.selectAllOil(nowAccountInfo.getStoreId());
|
List<OilNumber> oilNumbers = oilNumberMapper.selectAllOil(nowAccountInfo.getStoreId());
|
||||||
List<String> oilNames = oilNumbers.stream().map(oil -> oil.getOilNames() + oil.getOilType()).collect(Collectors.toList());
|
List<String> oilNames = oilNumbers.stream().map(oil -> oil.getOilNames() + oil.getOilType()).collect(Collectors.toList());
|
||||||
homeDataShowVo.setOilNames(oilNames);
|
homeDataShowVo.setOilNames(oilNames);
|
||||||
//判断开始时间减去结束时间是否大于等于一年
|
//判断开始时间减去结束时间是否大于等于60天
|
||||||
List<String> days = getAllDatesBetween(startTime, endTime);
|
List<String> days = getAllDatesBetween(startTime, endTime);
|
||||||
Integer type = 0;
|
Integer type = 0;
|
||||||
if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) >= 60) {
|
if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) >= 60) {
|
||||||
days = getAllDatesBetweenYear(startTime, endTime);
|
days = getAllDatesBetweenYear(startTime, endTime);
|
||||||
type = 1;
|
type = 1;
|
||||||
|
//判断是否小于等于1天
|
||||||
|
} else if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) <= 1) {
|
||||||
|
days = getAllDatesBetweenDay(DateUtil.beginOfDay(DateUtil.parse(startTime)).toString(), DateUtil.endOfDay(DateUtil.parse(endTime)).toString());
|
||||||
|
type = 2;
|
||||||
}
|
}
|
||||||
//根据开始时间与结束时间获取所有天数
|
//根据开始时间与结束时间获取所有天数
|
||||||
//查询所有订单
|
//查询所有订单
|
||||||
@ -1898,6 +1902,10 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
mapData.put("day", parse.toString("yyyy-MM"));
|
mapData.put("day", parse.toString("yyyy-MM"));
|
||||||
dateTime = DateUtil.beginOfMonth(parse);
|
dateTime = DateUtil.beginOfMonth(parse);
|
||||||
dateTime1 = DateUtil.endOfMonth(parse);
|
dateTime1 = DateUtil.endOfMonth(parse);
|
||||||
|
} else if (type == 2) {
|
||||||
|
mapData.put("day", day);
|
||||||
|
dateTime = DateUtil.beginOfHour(DateUtil.parse(day));
|
||||||
|
dateTime1 = DateUtil.endOfHour(dateTime);
|
||||||
} else {
|
} else {
|
||||||
mapData.put("day", day);
|
mapData.put("day", day);
|
||||||
dateTime = DateUtil.beginOfDay(DateUtil.parse(day));
|
dateTime = DateUtil.beginOfDay(DateUtil.parse(day));
|
||||||
@ -1946,12 +1954,28 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
List<String> dateList = new ArrayList<>();
|
List<String> dateList = new ArrayList<>();
|
||||||
while (!startDate.isAfter(endDate)) {
|
while (!startDate.isAfter(endDate)) {
|
||||||
dateList.add(startDate.format(formatter));
|
dateList.add(startDate.format(formatter));
|
||||||
startDate = startDate.plusDays(30);
|
startDate = startDate.plusMonths(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return dateList;
|
return dateList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<String> getAllDatesBetweenDay(String startTime, String endTime) {
|
||||||
|
|
||||||
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
||||||
|
LocalDateTime startDate = LocalDateTime.parse(startTime, formatter);
|
||||||
|
LocalDateTime endDate = LocalDateTime.parse(endTime, formatter);
|
||||||
|
|
||||||
|
List<String> dateList = new ArrayList<>();
|
||||||
|
while (!startDate.isAfter(endDate)) {
|
||||||
|
dateList.add(startDate.format(formatter));
|
||||||
|
startDate = startDate.plusHours(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return dateList;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 计算指定支付时间范围和油品名称下的累计支付金额
|
* 计算指定支付时间范围和油品名称下的累计支付金额
|
||||||
*
|
*
|
||||||
@ -2085,6 +2109,9 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) >= 60) {
|
if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) >= 60) {
|
||||||
allDatesBetween = getAllDatesBetweenYear(startTime, endTime);
|
allDatesBetween = getAllDatesBetweenYear(startTime, endTime);
|
||||||
type = 1;
|
type = 1;
|
||||||
|
} else if (DateUtil.between(DateUtil.parse(startTime), DateUtil.parse(endTime), DateUnit.DAY) <= 1) {
|
||||||
|
allDatesBetween = getAllDatesBetweenDay(DateUtil.beginOfDay(DateUtil.parse(startTime)).toString(), DateUtil.endOfDay(DateUtil.parse(endTime)).toString());
|
||||||
|
type = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<String> oilNames = new ArrayList<>();
|
List<String> oilNames = new ArrayList<>();
|
||||||
@ -2105,6 +2132,11 @@ public class AllOrderInfoServiceImpl extends ServiceImpl<AllOrderInfoMapper, All
|
|||||||
params.put("time", parse.toString("yyyy-MM"));
|
params.put("time", parse.toString("yyyy-MM"));
|
||||||
dateTime = DateUtil.beginOfMonth(parse);
|
dateTime = DateUtil.beginOfMonth(parse);
|
||||||
dateTime1 = DateUtil.endOfMonth(parse);
|
dateTime1 = DateUtil.endOfMonth(parse);
|
||||||
|
} else if (type == 2) {
|
||||||
|
DateTime parse = DateUtil.parse(time);
|
||||||
|
params.put("time", time);
|
||||||
|
dateTime = DateUtil.beginOfHour(parse);
|
||||||
|
dateTime1 = DateUtil.endOfHour(dateTime);
|
||||||
} else {
|
} else {
|
||||||
params.put("time", time);
|
params.put("time", time);
|
||||||
dateTime = DateUtil.beginOfDay(DateUtil.parse(time));
|
dateTime = DateUtil.beginOfDay(DateUtil.parse(time));
|
||||||
|
Loading…
Reference in New Issue
Block a user