update code

dev_xds
haha 2024-05-25 21:58:32 +08:00
parent 706c95a767
commit 1b1f60fd3a
2 changed files with 5 additions and 17 deletions

View File

@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
import com.ruoyi.common.constant.Constants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
@ -191,19 +192,12 @@ public class ProblemmodifyController extends BaseController {
where.setPrjIds(getProjectIds());
}
}
String key="problemmodify_groupByInfotypeCheckState-"+where.getDeptId()+"-"+where.getProjectId()+"-"+where.getProType()+Md5Utils.hash(where.getPrjIds());
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return success(obj);
}
List<SmzSspProblemmodify> list=smzSspProblemmodifyService.groupByInfotypeCheckState(where);
SmzSspProblemmodify spObj=new SmzSspProblemmodify();
spObj.setId(smzSspProblemmodifyService.countTimeout(where));
spObj.setCheckState(5l);
spObj.setInfoType(where.getInfoType());
list.add(spObj);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
}
@ -242,21 +236,15 @@ public class ProblemmodifyController extends BaseController {
}
@PostMapping("/listSspProblemmodify")
public AjaxResult listSspProblemmodify(@RequestBody SmzSspProblemmodifyWhere where){
public TableDataInfo listSspProblemmodify(@RequestBody SmzSspProblemmodifyWhere where){
Long deptId=where.getDeptId();
if(deptId==null||deptId<=0){
if (SecurityUtils.isUserB()) {
where.setPrjIds(getProjectIds());
}
}
String params = Md5Utils.hash(deptId+"_"+where.getProjectId()+"_"+where.getInfoType()+"_"+where.getRoleType()+"_"+where.getActiveName()+"_"+where.getCheckState()+"_"+where.getStartDate()+"_"+where.getEndDate()+where.getProType()+Md5Utils.hash(where.getPrjIds()));
String key="problemmodify_getMonitAndWarning-"+params;
Object obj=redisCache.getCacheObject(key);
if(obj!=null){
return AjaxResult.success(obj);
}
startPage();
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSmzSspProblemmodifyListAndUnitName(where);
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
return AjaxResult.success(list);
return getDataTable(list);
}
}

View File

@ -269,8 +269,8 @@ public class ProjectAttendanceController extends BaseController {
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
startPage();
where.setAttendanceTime(DateUtil.formatDate(DateTime.now()));
startPage();
List<SurProjectAttendanceData> list = attendanceDataService.todayAttendance(where);
return getDataTable(list);
}