update code
parent
706c95a767
commit
1b1f60fd3a
|
@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
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.core.redis.RedisCache;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
|
@ -191,19 +192,12 @@ public class ProblemmodifyController extends BaseController {
|
||||||
where.setPrjIds(getProjectIds());
|
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);
|
List<SmzSspProblemmodify> list=smzSspProblemmodifyService.groupByInfotypeCheckState(where);
|
||||||
SmzSspProblemmodify spObj=new SmzSspProblemmodify();
|
SmzSspProblemmodify spObj=new SmzSspProblemmodify();
|
||||||
spObj.setId(smzSspProblemmodifyService.countTimeout(where));
|
spObj.setId(smzSspProblemmodifyService.countTimeout(where));
|
||||||
spObj.setCheckState(5l);
|
spObj.setCheckState(5l);
|
||||||
spObj.setInfoType(where.getInfoType());
|
spObj.setInfoType(where.getInfoType());
|
||||||
list.add(spObj);
|
list.add(spObj);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,21 +236,15 @@ public class ProblemmodifyController extends BaseController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/listSspProblemmodify")
|
@PostMapping("/listSspProblemmodify")
|
||||||
public AjaxResult listSspProblemmodify(@RequestBody SmzSspProblemmodifyWhere where){
|
public TableDataInfo listSspProblemmodify(@RequestBody SmzSspProblemmodifyWhere where){
|
||||||
Long deptId=where.getDeptId();
|
Long deptId=where.getDeptId();
|
||||||
if(deptId==null||deptId<=0){
|
if(deptId==null||deptId<=0){
|
||||||
if (SecurityUtils.isUserB()) {
|
if (SecurityUtils.isUserB()) {
|
||||||
where.setPrjIds(getProjectIds());
|
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()));
|
startPage();
|
||||||
String key="problemmodify_getMonitAndWarning-"+params;
|
|
||||||
Object obj=redisCache.getCacheObject(key);
|
|
||||||
if(obj!=null){
|
|
||||||
return AjaxResult.success(obj);
|
|
||||||
}
|
|
||||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSmzSspProblemmodifyListAndUnitName(where);
|
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSmzSspProblemmodifyListAndUnitName(where);
|
||||||
redisCache.setCacheObject(key, list, Constants.BIGSCREEN_QUERY_CACHE, TimeUnit.MINUTES);
|
return getDataTable(list);
|
||||||
return AjaxResult.success(list);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,8 +269,8 @@ public class ProjectAttendanceController extends BaseController {
|
||||||
Integer pageNum = pageDomain.getPageNum();
|
Integer pageNum = pageDomain.getPageNum();
|
||||||
Integer pageSize = pageDomain.getPageSize();
|
Integer pageSize = pageDomain.getPageSize();
|
||||||
|
|
||||||
startPage();
|
|
||||||
where.setAttendanceTime(DateUtil.formatDate(DateTime.now()));
|
where.setAttendanceTime(DateUtil.formatDate(DateTime.now()));
|
||||||
|
startPage();
|
||||||
List<SurProjectAttendanceData> list = attendanceDataService.todayAttendance(where);
|
List<SurProjectAttendanceData> list = attendanceDataService.todayAttendance(where);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue