|
|
@@ -65,11 +65,19 @@ public class InspectionServiceImpl implements IInspectionService { |
|
|
|
//获取登录人信息,登录人用户名 |
|
|
|
// String username = SecurityUserUtils.username(); |
|
|
|
//获取租户id |
|
|
|
String tenantId = ShiroUtils.getTenantId(); |
|
|
|
//String tenantId = ShiroUtils.getTenantId(); |
|
|
|
String username = "admin"; |
|
|
|
User user = userMapper.selectOne(Wrappers.<User>lambdaQuery() |
|
|
|
.eq(StringUtils.isNotEmpty(username), User::getUsername, username) |
|
|
|
.eq(User::getStatus, 1).eq(User::getMark, 1)); |
|
|
|
if(ObjectUtil.isNull(user)){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
String tenantId = user.getTenantId(); |
|
|
|
if(StringUtils.isEmpty(tenantId)){ |
|
|
|
return null; |
|
|
|
} |
|
|
|
query.setTenantId(tenantId); |
|
|
|
//查询部门及下级部门列表 |
|
|
|
List<Dept> list = deptMapper.selectList(Wrappers.<Dept>lambdaQuery() |
|
|
|
.eq(Dept::getMark, 1)); |
|
|
@@ -87,9 +95,9 @@ public class InspectionServiceImpl implements IInspectionService { |
|
|
|
IPage<InspectionInfoVo> pageDataVo = new Page<>(query.getPage(),query.getLimit()); |
|
|
|
Date startTime = null; |
|
|
|
Date endTime = null; |
|
|
|
if(StringUtils.isNotEmpty(query.getStartTime()) && StringUtils.isNotEmpty(query.getEndTime())){ |
|
|
|
startTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,query.getStartTime()+" 00:00:00"); |
|
|
|
endTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,query.getEndTime()+" 23:59:59"); |
|
|
|
if(null != query.getStartTimeDate()){ |
|
|
|
startTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,query.getTime()+" 00:00:00"); |
|
|
|
endTime = DateUtils.dateTime(DateUtils.YYYY_MM_DD_HH_MM_SS,query.getTime()+" 23:59:59"); |
|
|
|
} |
|
|
|
query.setStartTimeDate(startTime); |
|
|
|
query.setEndTimeDate(endTime); |
|
|
@@ -106,7 +114,7 @@ public class InspectionServiceImpl implements IInspectionService { |
|
|
|
int problemsVerifiedNum = 0; |
|
|
|
List<InspectionFile> inspectionFileList = inspectionFileMapper.selectList(Wrappers.<InspectionFile>lambdaQuery() |
|
|
|
.eq(StringUtils.isNotEmpty(x.getId()), InspectionFile::getInspectionId, x.getId()) |
|
|
|
.eq(InspectionFile::getTenantId, 0) |
|
|
|
.eq(InspectionFile::getTenantId, tenantId) |
|
|
|
.eq(InspectionFile::getMark,1)); |
|
|
|
if(StringUtils.isEmpty(inspectionFileList)){ |
|
|
|
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL); |