修改了工单bug
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 6m25s
All checks were successful
Build and Push to Target Registry / 构建并推送镜像到目标仓库 (push) Successful in 6m25s
This commit is contained in:
parent
37966e73c1
commit
2a143bb147
@ -62,7 +62,7 @@ public class ApplicationController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
//@SaCheckPermission("property:application:query")
|
||||
@SaCheckPermission("property:application:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<ApplicationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
|
@ -40,7 +40,7 @@ public class CostItemsController extends BaseController {
|
||||
/**
|
||||
* 查询费用项设置列表
|
||||
*/
|
||||
@SaCheckPermission("property:costItems:list")
|
||||
@SaCheckPermission("property:costItemSetting:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CostItemsVo> list(CostItemsBo bo, PageQuery pageQuery) {
|
||||
return costItemsService.queryPageList(bo, pageQuery);
|
||||
@ -49,7 +49,7 @@ public class CostItemsController extends BaseController {
|
||||
/**
|
||||
* 导出费用项设置列表
|
||||
*/
|
||||
@SaCheckPermission("property:costItems:export")
|
||||
@SaCheckPermission("property:costItemSetting:export")
|
||||
@Log(title = "费用项设置", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CostItemsBo bo, HttpServletResponse response) {
|
||||
@ -62,7 +62,7 @@ public class CostItemsController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("property:costItems:query")
|
||||
@SaCheckPermission("property:costItemSetting:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CostItemsVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
@ -72,7 +72,7 @@ public class CostItemsController extends BaseController {
|
||||
/**
|
||||
* 新增费用项设置
|
||||
*/
|
||||
@SaCheckPermission("property:costItems:add")
|
||||
@SaCheckPermission("property:costItemSetting:add")
|
||||
@Log(title = "费用项设置", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@ -83,7 +83,7 @@ public class CostItemsController extends BaseController {
|
||||
/**
|
||||
* 修改费用项设置
|
||||
*/
|
||||
@SaCheckPermission("property:costItems:edit")
|
||||
@SaCheckPermission("property:costItemSetting:edit")
|
||||
@Log(title = "费用项设置", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
@ -96,7 +96,7 @@ public class CostItemsController extends BaseController {
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("property:costItems:remove")
|
||||
@SaCheckPermission("property:costItemSetting:remove")
|
||||
@Log(title = "费用项设置", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
|
@ -40,7 +40,7 @@ public class CostMeterWaterController extends BaseController {
|
||||
/**
|
||||
* 查询费用-水电抄列表
|
||||
*/
|
||||
@SaCheckPermission("system:meterWater:list")
|
||||
@SaCheckPermission("property:costMeterWater:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<CostMeterWaterVo> list(CostMeterWaterBo bo, PageQuery pageQuery) {
|
||||
return costMeterWaterService.queryPageList(bo, pageQuery);
|
||||
@ -49,7 +49,7 @@ public class CostMeterWaterController extends BaseController {
|
||||
/**
|
||||
* 导出费用-水电抄列表
|
||||
*/
|
||||
@SaCheckPermission("system:meterWater:export")
|
||||
@SaCheckPermission("property:costMeterWater:export")
|
||||
@Log(title = "费用-水电抄", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(CostMeterWaterBo bo, HttpServletResponse response) {
|
||||
@ -62,7 +62,7 @@ public class CostMeterWaterController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:meterWater:query")
|
||||
@SaCheckPermission("property:costMeterWater:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<CostMeterWaterVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
@ -82,7 +82,7 @@ public class CostMeterWaterController extends BaseController {
|
||||
/**
|
||||
* 新增费用-水电抄
|
||||
*/
|
||||
@SaCheckPermission("system:meterWater:add")
|
||||
@SaCheckPermission("property:costMeterWater:add")
|
||||
@Log(title = "费用-水电抄", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@ -93,7 +93,7 @@ public class CostMeterWaterController extends BaseController {
|
||||
/**
|
||||
* 修改费用-水电抄
|
||||
*/
|
||||
@SaCheckPermission("system:meterWater:edit")
|
||||
@SaCheckPermission("property:costMeterWater:edit")
|
||||
@Log(title = "费用-水电抄", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
@ -106,7 +106,7 @@ public class CostMeterWaterController extends BaseController {
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:meterWater:remove")
|
||||
@SaCheckPermission("property:costMeterWater:remove")
|
||||
@Log(title = "费用-水电抄", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
|
@ -33,4 +33,15 @@ public class EnumFetcherController {
|
||||
List<Map<Object, Object>> map = enumFetcherService.getEnumValues(name);
|
||||
return R.ok(map);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据工单类型或部门下的排班人员
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/enum-getShiftScheduler/{type}")
|
||||
public R<List<Map<Object, Object>>> getShiftScheduler(@PathVariable("type") String type) {
|
||||
List<Map<Object, Object>> map = enumFetcherService.getShiftScheduler(type);
|
||||
return R.ok(map);
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class InspectionItemController extends BaseController {
|
||||
/**
|
||||
* 查询巡检项目列表
|
||||
*/
|
||||
@SaCheckPermission("system:item:list")
|
||||
@SaCheckPermission("property:inspectionItem:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<InspectionItemVo> list(InspectionItemBo bo, PageQuery pageQuery) {
|
||||
return inspectionItemService.queryPageList(bo, pageQuery);
|
||||
@ -49,7 +49,7 @@ public class InspectionItemController extends BaseController {
|
||||
/**
|
||||
* 导出巡检项目列表
|
||||
*/
|
||||
@SaCheckPermission("system:item:export")
|
||||
@SaCheckPermission("property:inspectionItem:export")
|
||||
@Log(title = "巡检项目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(InspectionItemBo bo, HttpServletResponse response) {
|
||||
@ -62,7 +62,7 @@ public class InspectionItemController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:item:query")
|
||||
@SaCheckPermission("property:inspectionItem:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<InspectionItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
@ -72,7 +72,7 @@ public class InspectionItemController extends BaseController {
|
||||
/**
|
||||
* 新增巡检项目
|
||||
*/
|
||||
@SaCheckPermission("system:item:add")
|
||||
@SaCheckPermission("property:inspectionItem:add")
|
||||
@Log(title = "巡检项目", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@ -83,7 +83,7 @@ public class InspectionItemController extends BaseController {
|
||||
/**
|
||||
* 修改巡检项目
|
||||
*/
|
||||
@SaCheckPermission("system:item:edit")
|
||||
@SaCheckPermission("property:inspectionItem:edit")
|
||||
@Log(title = "巡检项目", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
@ -96,7 +96,7 @@ public class InspectionItemController extends BaseController {
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:item:remove")
|
||||
@SaCheckPermission("property:inspectionItem:remove")
|
||||
@Log(title = "巡检项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
|
@ -40,7 +40,7 @@ public class InspectionPointController extends BaseController {
|
||||
/**
|
||||
* 查询巡检点列表
|
||||
*/
|
||||
@SaCheckPermission("system:point:list")
|
||||
@SaCheckPermission("property:inspectionPoint:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<InspectionPointVo> list(InspectionPointBo bo, PageQuery pageQuery) {
|
||||
return inspectionPointService.queryPageList(bo, pageQuery);
|
||||
@ -49,7 +49,7 @@ public class InspectionPointController extends BaseController {
|
||||
/**
|
||||
* 导出巡检点列表
|
||||
*/
|
||||
@SaCheckPermission("system:point:export")
|
||||
@SaCheckPermission("property:inspectionPoint:export")
|
||||
@Log(title = "巡检点", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(InspectionPointBo bo, HttpServletResponse response) {
|
||||
@ -62,7 +62,7 @@ public class InspectionPointController extends BaseController {
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("system:point:query")
|
||||
@SaCheckPermission("property:inspectionPoint:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<InspectionPointVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable("id") Long id) {
|
||||
@ -72,7 +72,7 @@ public class InspectionPointController extends BaseController {
|
||||
/**
|
||||
* 新增巡检点
|
||||
*/
|
||||
@SaCheckPermission("system:point:add")
|
||||
@SaCheckPermission("property:inspectionPoint:add")
|
||||
@Log(title = "巡检点", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
@ -83,7 +83,7 @@ public class InspectionPointController extends BaseController {
|
||||
/**
|
||||
* 修改巡检点
|
||||
*/
|
||||
@SaCheckPermission("system:point:edit")
|
||||
@SaCheckPermission("property:inspectionPoint:edit")
|
||||
@Log(title = "巡检点", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
@ -96,7 +96,7 @@ public class InspectionPointController extends BaseController {
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("system:point:remove")
|
||||
@SaCheckPermission("property:inspectionPoint:remove")
|
||||
@Log(title = "巡检点", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
|
@ -145,6 +145,7 @@ public class TbVisitorManagementController extends BaseController {
|
||||
if (info==null){
|
||||
return R.fail("请确认Qr码有效");
|
||||
}
|
||||
bo.setType(0);
|
||||
return toAjax(tbVisitorManagementService.insertByBo(bo));
|
||||
}
|
||||
|
||||
@ -156,6 +157,7 @@ public class TbVisitorManagementController extends BaseController {
|
||||
@RepeatSubmit()
|
||||
@PostMapping
|
||||
public R<Void> addVistorManagement(@Validated(AddGroup.class) @RequestBody TbVisitorManagementBo bo) {
|
||||
bo.setType(1);
|
||||
return toAjax(tbVisitorManagementService.insertVistorManagementByBo(bo));
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package org.dromara.property.controller.mobile;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
@ -46,4 +47,13 @@ public class MServiceWorkOrdersController extends BaseController {
|
||||
public TableDataInfo<ServiceWorkOrdersVo> list(ServiceWorkOrdersBo bo, PageQuery pageQuery) {
|
||||
return serviceWorkOrdersService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
/**
|
||||
* 修改【工单处理】
|
||||
*/
|
||||
@Log(title = "【工单处理】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody ServiceWorkOrdersBo bo) {
|
||||
return toAjax(serviceWorkOrdersService.updateByBo(bo));
|
||||
}
|
||||
}
|
||||
|
@ -15,4 +15,12 @@ public interface EnumFetcherService {
|
||||
* @return
|
||||
*/
|
||||
List<Map<Object, Object>> getEnumValues(String type);
|
||||
|
||||
/**
|
||||
* 获取排班信息人员下拉
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
|
||||
List<Map<Object, Object>> getShiftScheduler(String type);
|
||||
}
|
||||
|
@ -1,17 +1,25 @@
|
||||
package org.dromara.property.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.property.domain.AttendanceUserGroup;
|
||||
import org.dromara.property.domain.ServiceWorkOrdersType;
|
||||
import org.dromara.property.domain.enums.BookingPayStatusEnum;
|
||||
import org.dromara.property.domain.enums.BookingStatusEnum;
|
||||
import org.dromara.property.domain.enums.MeetAttachStatusEnum;
|
||||
import org.dromara.property.domain.enums.MeetStatusEnum;
|
||||
import org.dromara.property.mapper.ServiceWorkOrdersTypeMapper;
|
||||
import org.dromara.property.mapper.attendanceMapper.AttendanceUserGroupMapper;
|
||||
import org.dromara.property.service.*;
|
||||
import org.dromara.system.api.RemoteUserService;
|
||||
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@ -34,6 +42,11 @@ public class EnumFetcherServiceImpl implements EnumFetcherService {
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
@Autowired
|
||||
private ServiceWorkOrdersTypeMapper serviceWorkOrdersTypeMapper;
|
||||
@Autowired
|
||||
private AttendanceUserGroupMapper attendanceUserGroupMapper;
|
||||
|
||||
@Override
|
||||
public List<Map<Object, Object>> getEnumValues(String type) {
|
||||
switch (type) {
|
||||
@ -57,13 +70,13 @@ public class EnumFetcherServiceImpl implements EnumFetcherService {
|
||||
return getMeetBookingStatus();
|
||||
case "getServiceWorkOrdersHandler":
|
||||
return serviceWorkOrdersService.getServiceWorkOrdersHandler(type);
|
||||
case "getAccount":
|
||||
return getAccount();
|
||||
default:
|
||||
throw new IllegalArgumentException("Unknown type: " + type);
|
||||
}
|
||||
}
|
||||
/**
|
||||
|
||||
|
||||
/**
|
||||
* 获取会议室状态枚举接口
|
||||
*/
|
||||
List<Map<Object, Object>> getMeetStatus() {
|
||||
@ -110,15 +123,35 @@ public class EnumFetcherServiceImpl implements EnumFetcherService {
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<Map<Object, Object>> getShiftScheduler(String type) {
|
||||
ServiceWorkOrdersType serviceWorkOrdersType = serviceWorkOrdersTypeMapper.selectById(type);
|
||||
LocalDate today = LocalDate.now();
|
||||
List<AttendanceUserGroup> attendanceUserGroups = attendanceUserGroupMapper.selectList(
|
||||
new LambdaQueryWrapper<AttendanceUserGroup>()
|
||||
//查询今天上班的人员
|
||||
.eq(AttendanceUserGroup::getStartDate, today)
|
||||
.eq(ObjectUtil.isNotNull(serviceWorkOrdersType),AttendanceUserGroup::getDeptId, serviceWorkOrdersType.getCreateDept())
|
||||
);
|
||||
if (CollUtil.isEmpty(attendanceUserGroups)) {
|
||||
return List.of();
|
||||
}
|
||||
// 收集用户id
|
||||
List<Long> userIdList = attendanceUserGroups.stream().map(AttendanceUserGroup::getEmployeeId).toList();
|
||||
return getAccount(userIdList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取账户信息
|
||||
*/
|
||||
List<Map<Object, Object>> getAccount() {
|
||||
List<RemoteUserVo> remoteUserVos = remoteUserService.selectUserList(new ArrayList<>());
|
||||
List<Map<Object, Object>> getAccount(List<Long> userIdList) {
|
||||
List<RemoteUserVo> remoteUserVos = remoteUserService.selectUserList(userIdList);
|
||||
return remoteUserVos.stream()
|
||||
.map(e -> {
|
||||
Map<Object, Object> map = new HashMap<>();
|
||||
map.put("value", e.getUserName());
|
||||
map.put("value", e.getUserId());
|
||||
map.put("name", e.getNickName());
|
||||
return map;
|
||||
})
|
||||
|
@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.dubbo.config.annotation.DubboReference;
|
||||
import org.dromara.common.core.utils.MapstructUtils;
|
||||
import org.dromara.common.core.utils.StringUtils;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
@ -19,6 +20,8 @@ import org.dromara.property.domain.bo.MeetBookingBo;
|
||||
import org.dromara.property.domain.vo.*;
|
||||
import org.dromara.property.mapper.*;
|
||||
import org.dromara.property.service.IMeetBookingService;
|
||||
import org.dromara.system.api.RemoteUserService;
|
||||
import org.dromara.system.api.domain.vo.RemoteUserVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@ -46,6 +49,8 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
private final TbRoomMapper roomMapper;
|
||||
private final MeetMapper meetMapper;
|
||||
private final ResidentUnitMapper residentUnitMapper;
|
||||
@DubboReference
|
||||
private RemoteUserService remoteUserService;
|
||||
|
||||
/**
|
||||
* 查询会议预约
|
||||
@ -80,8 +85,8 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
LambdaQueryWrapper<MeetBooking> lqw = buildQueryWrapper(bo);
|
||||
Page<MeetBookingVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoList();
|
||||
|
||||
List<Long> userId = result.getRecords().stream().map(vo -> vo.getPerson()).distinct().map(Long::parseLong).collect(Collectors.toList());
|
||||
List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
List<MeetBookingVo> meetBookingVoList = new ArrayList<>();
|
||||
result.getRecords().stream().forEach(s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
@ -89,11 +94,11 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||
s.setUnitName(ObjectUtil.isNotEmpty(residentUnitVo) ? residentUnitVo.getName() : null);
|
||||
}
|
||||
if (CollUtil.isNotEmpty(residentPersonsVolist)) {
|
||||
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getUserName() : null);
|
||||
s.setPhone(ObjectUtil.isNotEmpty(residentPersonVo) ? residentPersonVo.getPhone() : null);
|
||||
if (CollUtil.isNotEmpty(remoteUserVos)) {
|
||||
RemoteUserVo remoteUserVo = remoteUserVos.stream()
|
||||
.filter(vo -> vo.getUserId() != null && String.valueOf(vo.getUserId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getNickName() : null);
|
||||
s.setPhone(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getPhonenumber() : null);
|
||||
}
|
||||
meetBookingVoList.add(s);
|
||||
});
|
||||
@ -122,7 +127,8 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
List<MeetBookingAppointmentVo> meetBookingAppointmentVoList = BeanUtil.copyToList(meetBookings, MeetBookingAppointmentVo.class);
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoList();
|
||||
List<Long> userId = meetBookingAppointmentVoList.stream().map(vo -> vo.getPerson()).distinct().map(Long::parseLong).collect(Collectors.toList());
|
||||
List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
meetBookingAppointmentVoList.stream().forEach(
|
||||
s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
@ -130,11 +136,11 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||
s.setUnitName(residentUnitVo.getName());
|
||||
}
|
||||
if (CollUtil.isNotEmpty(residentPersonsVolist)) {
|
||||
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(residentPersonVo.getUserName());
|
||||
s.setPhone(residentPersonVo.getPhone());
|
||||
if (CollUtil.isNotEmpty(remoteUserVos)) {
|
||||
RemoteUserVo remoteUserVo = remoteUserVos.stream()
|
||||
.filter(vo -> vo.getUserId() != null && String.valueOf(vo.getUserId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getNickName() : null);
|
||||
s.setPhone(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getPhonenumber() : null);
|
||||
}
|
||||
String str = df.format(s.getScheduledStarttime());
|
||||
int a = Integer.parseInt(str);
|
||||
@ -181,17 +187,18 @@ public class MeetBookingServiceImpl implements IMeetBookingService {
|
||||
List<MeetBookingWeekVo> meetBookingWeekList = new ArrayList<>();
|
||||
SimpleDateFormat df = new SimpleDateFormat("HH");
|
||||
List<ResidentUnitVo> residentUnitVolist = residentUnitMapper.selectVoList();
|
||||
List<ResidentPersonVo> residentPersonsVolist = residentPersonMapper.selectVoList();
|
||||
List<Long> userId = meetBookingWeekVoList.stream().map(vo -> vo.getPerson()).distinct().map(Long::parseLong).collect(Collectors.toList());
|
||||
List<RemoteUserVo> remoteUserVos = remoteUserService.selectListByIds(userId);
|
||||
meetBookingWeekVoList.stream().forEach(s -> {
|
||||
if (CollUtil.isNotEmpty(residentUnitVolist)) {
|
||||
ResidentUnitVo residentUnitVo = residentUnitVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getUnit())).findFirst().orElse(null);
|
||||
s.setUnitName(residentUnitVo.getName());
|
||||
}
|
||||
if (CollUtil.isNotEmpty(residentPersonsVolist)) {
|
||||
ResidentPersonVo residentPersonVo = residentPersonsVolist.stream()
|
||||
.filter(vo -> vo.getId() != null && String.valueOf(vo.getId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(residentPersonVo.getUserName());
|
||||
if (CollUtil.isNotEmpty(remoteUserVos)) {
|
||||
RemoteUserVo remoteUserVo = remoteUserVos.stream()
|
||||
.filter(vo -> vo.getUserId() != null && String.valueOf(vo.getUserId()).equals(s.getPerson())).findFirst().orElse(null);
|
||||
s.setPersonName(ObjectUtil.isNotEmpty(remoteUserVo) ? remoteUserVo.getNickName() : null);
|
||||
}
|
||||
//设置指定的Date对象不设置默认返回当天的星期
|
||||
calendar.setTime(s.getScheduledStarttime());
|
||||
|
@ -21,6 +21,8 @@ import org.springframework.scheduling.annotation.Scheduled;
|
||||
import java.time.LocalDate;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -31,12 +33,12 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
* @Description:自动派单
|
||||
**/
|
||||
@Slf4j
|
||||
//@Component
|
||||
//@RequiredArgsConstructor
|
||||
|
||||
@Component
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/serviceWorkOrderTasks")
|
||||
|
||||
//@RequiredArgsConstructor
|
||||
//@RestController
|
||||
//@RequestMapping("/serviceWorkOrderTasks")
|
||||
public class ServiceWorkOrderTasks {
|
||||
private ServiceWorkOrdersMapper workOrdersMapper;
|
||||
private ServiceWorkOrdersRecordMapper workOrdersRecordMapper;
|
||||
@ -53,13 +55,13 @@ public class ServiceWorkOrderTasks {
|
||||
new LambdaQueryWrapper<ServiceWorkOrders>()
|
||||
.eq(ServiceWorkOrders::getStatus, WorkOrderStatusEnum.CREATE_ORDER.getValue()));
|
||||
if(CollUtil.isNotEmpty(serviceWorkOrderList)){
|
||||
serviceWorkOrderList.stream().forEach(s->{
|
||||
//查询今天上班的人员
|
||||
LocalDate today = LocalDate.now();
|
||||
List<AttendanceUserGroup> attendanceUserGroups = attendanceUserGroupMapper.selectList(
|
||||
new LambdaQueryWrapper<AttendanceUserGroup>()
|
||||
//查询今天上班的人员
|
||||
.eq(AttendanceUserGroup::getStartDate, today)
|
||||
);
|
||||
serviceWorkOrderList.stream().forEach(s->{
|
||||
if(CollUtil.isNotEmpty(attendanceUserGroups)){
|
||||
attendanceUserGroups.stream().forEach(s1->{
|
||||
ServiceWorkOrdersRecord serviceWorkOrdersRecord = new ServiceWorkOrdersRecord();
|
||||
|
Loading…
Reference in New Issue
Block a user