|
|
|
@ -17,6 +17,8 @@ import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
|
|
|
|
import java.time.LocalDate; |
|
|
|
import java.time.LocalDate; |
|
|
|
|
|
|
|
import java.time.LocalTime; |
|
|
|
|
|
|
|
import java.time.format.DateTimeFormatter; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
@ -35,9 +37,23 @@ public class SupRotaService extends ServiceImpl<SupRotaMapper, SupRota> { |
|
|
|
if (StrUtil.isBlank(queryParam.getDeptId()) && (user.getRoleCodes().contains(RoleCodeEnum.FIRST_ADMIN.getCode()) || user.getRoleCodes().contains(RoleCodeEnum.ADMIN.getCode()))) { |
|
|
|
if (StrUtil.isBlank(queryParam.getDeptId()) && (user.getRoleCodes().contains(RoleCodeEnum.FIRST_ADMIN.getCode()) || user.getRoleCodes().contains(RoleCodeEnum.ADMIN.getCode()))) { |
|
|
|
|
|
|
|
|
|
|
|
SupDepart supDepart = departService.getById(AppConstants.ROOT_DEPART_ID); |
|
|
|
SupDepart supDepart = departService.getById(AppConstants.ROOT_DEPART_ID); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取当前的本地时间
|
|
|
|
|
|
|
|
LocalTime currentTime = LocalTime.now(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 定义时间格式化为字符串的格式
|
|
|
|
|
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 将本地时间格式化为字符串
|
|
|
|
|
|
|
|
String timeString = currentTime.format(formatter); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String dateTime=queryParam.getDate() + " "+timeString; |
|
|
|
//市局的数据进行分类
|
|
|
|
//市局的数据进行分类
|
|
|
|
//市局本身
|
|
|
|
//市局本身
|
|
|
|
List<SupRota> supRota = baseMapper.selectList(new LambdaQueryWrapper<SupRota>().eq(SupRota::getDeptCode,supDepart.getId()).eq(SupRota::getRotaTime,queryParam.getDate())); |
|
|
|
List<SupRota> supRota = baseMapper.selectList(new LambdaQueryWrapper<SupRota>() |
|
|
|
|
|
|
|
.eq(SupRota::getDeptCode,supDepart.getId()) |
|
|
|
|
|
|
|
.ge(SupRota::getStartTime,dateTime) |
|
|
|
|
|
|
|
.le(SupRota::getEndTime,dateTime)); |
|
|
|
jsonObject.fluentPut("cityBureau",supRota); |
|
|
|
jsonObject.fluentPut("cityBureau",supRota); |
|
|
|
//分局
|
|
|
|
//分局
|
|
|
|
List<SupRotaVo> suboffice =baseMapper.getSubofficeData(queryParam.getDate(),"3"); |
|
|
|
List<SupRotaVo> suboffice =baseMapper.getSubofficeData(queryParam.getDate(),"3"); |
|
|
|
|