Browse Source

Merge branch 'develop' of gitadmin/tuoheng_freeway into release

tags/v1.0.0^2
chengwang 1 year ago
parent
commit
4c416a54ba
3 changed files with 9 additions and 2 deletions
  1. +1
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/dao/InspectionFileMapper.java
  2. +7
    -1
      tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionFileServiceImpl.java
  3. +1
    -0
      tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionFileMapper.xml

+ 1
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/dao/InspectionFileMapper.java View File

@@ -16,5 +16,5 @@ public interface InspectionFileMapper extends BaseMapper<InspectionFile> {
//查询当前登录人处理问题总数
Integer getInspectionFileCount(@Param("today") String s,@Param("userId") String id);

Integer getInspectionFileHandleCount(@Param("today") String s,@Param("userId") String id);
Integer getInspectionFileHandleCount(@Param("today") String s,@Param("tenantId") String id);
}

+ 7
- 1
tuoheng-service/tuoheng-miniprogram/src/main/java/com/tuoheng/miniprogram/service/impl/InspectionFileServiceImpl.java View File

@@ -365,6 +365,12 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
if (null == user.getRoleId()) {
throw new ServiceException(ServiceExceptionEnum.PARAMETER_IS_NULL);
}
//获取当前租户id
String tenantId = CurrentUserUtil.getTenantId();
if(StringUtils.isEmpty(tenantId)){
return JsonResult.error(InspectionFileEnum.TENANT_ID_IS_NULL.getCode(),InspectionFileEnum.TENANT_ID_IS_NULL.getMsg());
}

//今日
DateTime endTime = DateUtil.endOfDay(DateUtil.date());
//一周前的时间
@@ -378,7 +384,7 @@ public class InspectionFileServiceImpl implements IInspectionFileService {
InspectionFileCountVo vo = new InspectionFileCountVo();
vo.setCheckTime(s);
//查询当日登录用户的已处理问题总数,创建时间
Integer num = inspectionFileMapper.getInspectionFileHandleCount(s, user.getId());
Integer num = inspectionFileMapper.getInspectionFileHandleCount(s, tenantId);
if (null != num) {
vo.setInspectionHandleSum(num);
}

+ 1
- 0
tuoheng-service/tuoheng-miniprogram/src/main/resources/mapper/InspectionFileMapper.xml View File

@@ -36,5 +36,6 @@
from th_inspection_file
where date_format(update_time, '%Y-%m-%d') = #{today}
and mark = 1
and tenant_id = #{tenantId}
</select>
</mapper>

Loading…
Cancel
Save