bug
This commit is contained in:
@ -16,6 +16,7 @@ import org.dromara.device.domain.DeviceAccessRecord;
|
|||||||
import org.dromara.device.mapper.DeviceAccessRecordMapper;
|
import org.dromara.device.mapper.DeviceAccessRecordMapper;
|
||||||
import org.dromara.device.service.IDeviceAccessRecordService;
|
import org.dromara.device.service.IDeviceAccessRecordService;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
@ -77,6 +78,16 @@ public class DeviceAccessRecordServiceImpl extends ServiceImpl<DeviceAccessRecor
|
|||||||
lqw.eq(bo.getDeviceId() != null, DeviceAccessRecord::getDeviceId, bo.getDeviceId());
|
lqw.eq(bo.getDeviceId() != null, DeviceAccessRecord::getDeviceId, bo.getDeviceId());
|
||||||
lqw.like(StringUtils.isNotBlank(bo.getDeviceName()), DeviceAccessRecord::getDeviceName, bo.getDeviceName());
|
lqw.like(StringUtils.isNotBlank(bo.getDeviceName()), DeviceAccessRecord::getDeviceName, bo.getDeviceName());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), DeviceAccessRecord::getStatus, bo.getStatus());
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), DeviceAccessRecord::getStatus, bo.getStatus());
|
||||||
|
|
||||||
|
if(bo.getOperateTime() != null){
|
||||||
|
LocalDateTime operateTime = bo.getOperateTime();
|
||||||
|
//一天的开始
|
||||||
|
LocalDateTime startTime = operateTime.withHour(0).withMinute(0).withSecond(0);
|
||||||
|
//一天的结束
|
||||||
|
LocalDateTime endTime = operateTime.withHour(23).withMinute(59).withSecond(59);
|
||||||
|
lqw.between(DeviceAccessRecord::getOperateTime,startTime,endTime);
|
||||||
|
}
|
||||||
|
|
||||||
lqw.eq(bo.getOperateTime() != null, DeviceAccessRecord::getOperateTime, bo.getOperateTime());
|
lqw.eq(bo.getOperateTime() != null, DeviceAccessRecord::getOperateTime, bo.getOperateTime());
|
||||||
lqw.eq(StringUtils.isNotBlank(bo.getLocation()), DeviceAccessRecord::getLocation, bo.getLocation());
|
lqw.eq(StringUtils.isNotBlank(bo.getLocation()), DeviceAccessRecord::getLocation, bo.getLocation());
|
||||||
lqw.eq(bo.getOperatorId() != null, DeviceAccessRecord::getOperatorId, bo.getOperatorId());
|
lqw.eq(bo.getOperatorId() != null, DeviceAccessRecord::getOperatorId, bo.getOperatorId());
|
||||||
|
|||||||
@ -55,7 +55,10 @@ public class DeviceInfoServiceImpl extends ServiceImpl<DeviceInfoMapper, DeviceI
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public DeviceInfoVo queryById(Long id){
|
public DeviceInfoVo queryById(Long id){
|
||||||
return baseMapper.selectVoById(id);
|
DeviceInfoVo deviceInfoVo = baseMapper.selectVoById(id);
|
||||||
|
DeviceType byId = deviceTypeService.getById(deviceInfoVo.getTypeId());
|
||||||
|
deviceInfoVo.setTypeName(byId.getTypeName());
|
||||||
|
return deviceInfoVo;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -165,6 +165,7 @@ public class DeviceTypeServiceImpl extends ServiceImpl<DeviceTypeMapper, DeviceT
|
|||||||
List<DeviceType> list = baseMapper.selectList(queryWrapper);
|
List<DeviceType> list = baseMapper.selectList(queryWrapper);
|
||||||
checkIds.addAll(list.stream().map(DeviceType::getId).toList());
|
checkIds.addAll(list.stream().map(DeviceType::getId).toList());
|
||||||
}
|
}
|
||||||
|
checkIds.addAll(ids);
|
||||||
List<DeviceInfo> list = deviceInfoService.lambdaQuery().in(DeviceInfo::getTypeId, checkIds).list();
|
List<DeviceInfo> list = deviceInfoService.lambdaQuery().in(DeviceInfo::getTypeId, checkIds).list();
|
||||||
if(CollectionUtil.isNotEmpty(list)){
|
if(CollectionUtil.isNotEmpty(list)){
|
||||||
throw new ServiceException("当前类型或子级类型存在设备");
|
throw new ServiceException("当前类型或子级类型存在设备");
|
||||||
|
|||||||
@ -4,12 +4,17 @@ import jakarta.annotation.Resource;
|
|||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
import org.dromara.common.core.domain.R;
|
import org.dromara.common.core.domain.R;
|
||||||
import org.dromara.common.web.core.BaseController;
|
import org.dromara.common.web.core.BaseController;
|
||||||
|
import org.dromara.contractor.domain.dto.contractor.SubContractorQueryReq;
|
||||||
|
import org.dromara.contractor.domain.vo.contractor.SubContractorVo;
|
||||||
|
import org.dromara.contractor.service.ISubContractorService;
|
||||||
import org.dromara.project.domain.dto.projectteam.BusProjectTeamQueryReq;
|
import org.dromara.project.domain.dto.projectteam.BusProjectTeamQueryReq;
|
||||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamAppVo;
|
import org.dromara.project.domain.vo.projectteam.BusProjectTeamAppVo;
|
||||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
import org.dromara.project.domain.vo.projectteam.BusProjectTeamForemanVo;
|
||||||
import org.dromara.project.domain.vo.projectteam.BusProjectTeamVo;
|
import org.dromara.project.domain.vo.projectteam.BusProjectTeamVo;
|
||||||
import org.dromara.project.domain.vo.projectteam.TeamManageVo;
|
import org.dromara.project.domain.vo.projectteam.TeamManageVo;
|
||||||
import org.dromara.project.service.IBusProjectTeamService;
|
import org.dromara.project.service.IBusProjectTeamService;
|
||||||
|
import org.dromara.system.domain.vo.SysUserVo;
|
||||||
|
import org.dromara.system.service.ISysUserService;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@ -32,6 +37,12 @@ public class BusProjectTeamAppController extends BaseController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IBusProjectTeamService projectTeamService;
|
private IBusProjectTeamService projectTeamService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISysUserService userService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private ISubContractorService contractorService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id查询项目班组班组长信息列表
|
* 根据id查询项目班组班组长信息列表
|
||||||
*/
|
*/
|
||||||
@ -76,4 +87,21 @@ public class BusProjectTeamAppController extends BaseController {
|
|||||||
return R.ok(projectTeamService.getManager(teamId));
|
return R.ok(projectTeamService.getManager(teamId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询分包单位列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/contractorList")
|
||||||
|
public R<List<SubContractorVo>> contractorList(SubContractorQueryReq req) {
|
||||||
|
return R.ok(contractorService.queryList(req));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取所有分包管理人员
|
||||||
|
*/
|
||||||
|
@GetMapping("/listSubContractor")
|
||||||
|
public R<List<SysUserVo>> listSubContractor(Long projectId, Long contractorId) {
|
||||||
|
return R.ok(userService.selectUserListByAppUserType("2",projectId,contractorId));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,6 +41,11 @@ public class SysRole extends TenantEntity {
|
|||||||
*/
|
*/
|
||||||
private String roleKey;
|
private String roleKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色标识
|
||||||
|
*/
|
||||||
|
private String roleIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色排序
|
* 角色排序
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -47,6 +47,11 @@ public class SysRoleBo extends BaseEntity {
|
|||||||
@Size(min = 0, max = 100, message = "权限字符长度不能超过{max}个字符")
|
@Size(min = 0, max = 100, message = "权限字符长度不能超过{max}个字符")
|
||||||
private String roleKey;
|
private String roleKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色身份
|
||||||
|
*/
|
||||||
|
private String roleIdentity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 显示顺序
|
* 显示顺序
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -17,4 +17,5 @@ public class ProjectRolesItem {
|
|||||||
private String dataScope;
|
private String dataScope;
|
||||||
private String status;
|
private String status;
|
||||||
private String isSpecial;
|
private String isSpecial;
|
||||||
|
private String roleIdentity;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -126,4 +126,9 @@ public class SysRoleVo implements Serializable {
|
|||||||
* 角色类型 1-web 2-app
|
* 角色类型 1-web 2-app
|
||||||
*/
|
*/
|
||||||
private String roleSource;
|
private String roleSource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 角色身份
|
||||||
|
*/
|
||||||
|
private String roleIdentity;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -21,7 +21,8 @@
|
|||||||
r.create_time,
|
r.create_time,
|
||||||
r.remark,
|
r.remark,
|
||||||
r.is_special,
|
r.is_special,
|
||||||
r.role_source
|
r.role_source,
|
||||||
|
r.role_identity
|
||||||
from sys_role r
|
from sys_role r
|
||||||
left join sys_user_role sur on sur.role_id = r.role_id
|
left join sys_user_role sur on sur.role_id = r.role_id
|
||||||
left join sys_user u on u.user_id = sur.user_id
|
left join sys_user u on u.user_id = sur.user_id
|
||||||
|
|||||||
Reference in New Issue
Block a user