Commit 26cbc8e9 authored by 赵啸非's avatar 赵啸非

添加材料排序

parent c068b232
......@@ -10,4 +10,13 @@ public class RedisKey {
*/
public static final String KEY_MENU_CACHE = "iot:base:MenuCacheKey:";
public static final String KEY_DAY_VIEW = "dayView:";
public static final String KEY_DAY_VIEW_TOTAL = "dayViewTotal:";
}
......@@ -8,6 +8,7 @@ import com.mortals.framework.common.Rest;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.service.IUser;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.util.StringUtils;
......@@ -15,6 +16,7 @@ import com.mortals.framework.web.BaseJsonBodyController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.common.key.Constant;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.common.pdu.RespData;
import com.mortals.xhx.common.pdu.dept.DeptPdu;
import com.mortals.xhx.feign.base.IApiBaseManagerFeign;
......@@ -69,6 +71,8 @@ public class HomeController extends BaseJsonBodyController {
private BasesetService basesetService;
@Autowired
private IDeptFeign deptFeign;
@Autowired
private ICacheService cacheService;
@PostMapping({"site/list"})
public Rest<Object> list() {
......@@ -243,10 +247,12 @@ public class HomeController extends BaseJsonBodyController {
model.put("datumList", datumList); //热门表单
model.put("datumCont", datumCont); //入驻表单数量
model.put("localPrint", 20); //本地打印数量
model.put("localPrint", cacheService.getLong(RedisKey.KEY_DAY_VIEW)==null?0:cacheService.getLong(RedisKey.KEY_DAY_VIEW)); //本地打印数量
model.put("onlineSubmit", 0); //在线提交数量
model.put("dayThrift", 66); //今日节约
model.put("totalThrift", 996); //累计节约
//Long todayThrift = cacheService.incrForToday(RedisKey.KEY_DAYTHRIFT);
model.put("dayThrift", cacheService.getLong(RedisKey.KEY_DAY_VIEW)==null?0:cacheService.getLong(RedisKey.KEY_DAY_VIEW)*2); //今日节约
model.put("totalThrift", cacheService.getLong(RedisKey.KEY_DAY_VIEW_TOTAL)==null?0:cacheService.getLong(RedisKey.KEY_DAY_VIEW_TOTAL)*2); //累计节约
Rest<com.mortals.xhx.common.pdu.site.SitePdu> info = siteFeign.info(homeQueryPdu.getSiteId());
model.put("title", info == null ? "" : info.getData().getSiteName()); //标题
......
......@@ -3,8 +3,10 @@ package com.mortals.xhx.module.sample.web;
import com.mortals.framework.annotation.UnAuth;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.OrderCol;
import com.mortals.framework.service.ICacheService;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.key.RedisKey;
import com.mortals.xhx.module.device.model.DeviceEntity;
import com.mortals.xhx.module.device.model.DeviceQuery;
import com.mortals.xhx.module.device.service.DeviceService;
......@@ -48,6 +50,8 @@ public class SampleBillController extends BaseCRUDJsonBodyMappingController<Samp
@Autowired
public DeviceService deviceService;
@Autowired
private ICacheService cacheService;
public SampleBillController() {
super.setModuleDesc("样报服务");
......@@ -74,9 +78,11 @@ public class SampleBillController extends BaseCRUDJsonBodyMappingController<Samp
DeviceEntity deviceEntity = deviceService.selectOne(new DeviceQuery().deviceCode(entity.getDeviceCode()));
entity.setDeviceName(deviceEntity.getDeviceName());
}
entity.setMatterFullName(entity.getMatterName());
entity.setMatterFullName(entity.getMaterialName());
entity.setMaterialFullName(entity.getMaterialFullName());
entity.setMaterialFullName(entity.getMaterialName());
cacheService.incrForToday(RedisKey.KEY_DAY_VIEW);
cacheService.incr(RedisKey.KEY_DAY_VIEW_TOTAL);
return super.save(entity);
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment