|
@@ -1,29 +1,40 @@
|
|
package com.boman.web.core.service.czrk;
|
|
package com.boman.web.core.service.czrk;
|
|
|
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
|
+import com.boman.common.core.utils.DateUtils;
|
|
|
|
+import com.boman.common.core.utils.SecurityUtils;
|
|
import com.boman.common.core.utils.StringUtils;
|
|
import com.boman.common.core.utils.StringUtils;
|
|
|
|
+import com.boman.common.core.utils.number.NumberUtils;
|
|
import com.boman.common.core.utils.sql.SqlUtil;
|
|
import com.boman.common.core.utils.sql.SqlUtil;
|
|
import com.boman.common.core.web.page.PageDomain;
|
|
import com.boman.common.core.web.page.PageDomain;
|
|
import com.boman.common.core.web.page.TableSupport;
|
|
import com.boman.common.core.web.page.TableSupport;
|
|
-import com.boman.domain.Czrk;
|
|
|
|
-import com.boman.domain.SysDept;
|
|
|
|
-import com.boman.domain.SysRole;
|
|
|
|
-import com.boman.domain.VaccineInfoOperation;
|
|
|
|
|
|
+import com.boman.common.redis.service.RedisService;
|
|
|
|
+import com.boman.domain.*;
|
|
|
|
+import com.boman.domain.dto.AjaxResult;
|
|
|
|
+import com.boman.domain.utils.ThreadPoolService;
|
|
import com.boman.system.api.RemoteDeptService;
|
|
import com.boman.system.api.RemoteDeptService;
|
|
import com.boman.web.core.mapper.CzrkMapper;
|
|
import com.boman.web.core.mapper.CzrkMapper;
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
import com.boman.web.core.utils.AuthUtils;
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.apache.commons.lang3.BooleanUtils;
|
|
|
|
+import org.checkerframework.checker.units.qual.C;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
|
|
+import java.sql.Date;
|
|
|
|
+import java.util.ArrayList;
|
|
import java.util.Collections;
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
|
|
+import java.util.concurrent.TimeUnit;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
import static com.boman.common.core.utils.StringUtils.isNotEmpty;
|
|
import static com.boman.common.core.utils.StringUtils.isNotEmpty;
|
|
import static com.boman.common.core.utils.obj.ObjectUtils.isEmpty;
|
|
import static com.boman.common.core.utils.obj.ObjectUtils.isEmpty;
|
|
import static com.boman.common.core.utils.obj.ObjectUtils.map;
|
|
import static com.boman.common.core.utils.obj.ObjectUtils.map;
|
|
|
|
+import static com.boman.common.redis.RedisKey.STS_CZRK_;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 常住人口Service业务层处理
|
|
* 常住人口Service业务层处理
|
|
@@ -35,10 +46,14 @@ import static com.boman.common.core.utils.obj.ObjectUtils.map;
|
|
@Slf4j
|
|
@Slf4j
|
|
public class CzrkServiceImpl implements ICzrkService {
|
|
public class CzrkServiceImpl implements ICzrkService {
|
|
|
|
|
|
|
|
+ private static JSONObject QIANSHANSHI = null, ZHEN = null, QIANSHANSHI_SINGEL = null;
|
|
|
|
+
|
|
@Autowired
|
|
@Autowired
|
|
private CzrkMapper czrkMapper;
|
|
private CzrkMapper czrkMapper;
|
|
@Resource
|
|
@Resource
|
|
private RemoteDeptService remoteDeptService;
|
|
private RemoteDeptService remoteDeptService;
|
|
|
|
+ @Resource
|
|
|
|
+ private RedisService redisService;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
@@ -124,6 +139,31 @@ public class CzrkServiceImpl implements ICzrkService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ private List<Long> getDeptIdList(Long deptId) {
|
|
|
|
+ if (deptId == null) {
|
|
|
|
+ deptId = AuthUtils.getLoginUser().getSysUser().getDeptId();
|
|
|
|
+ //判断是否是管理员
|
|
|
|
+ List<SysRole> roles = AuthUtils.getLoginUser().getSysUser().getRoles();
|
|
|
|
+ if (isNotEmpty(roles)) {
|
|
|
|
+ for (SysRole role : roles) {
|
|
|
|
+ String roleKey = role.getRoleKey();
|
|
|
|
+ if ("admin".equals(roleKey) || "city".equals(roleKey)) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (deptId != null) {
|
|
|
|
+ List<SysDept> sysDepts = remoteDeptService.listChildrenDepts(deptId);
|
|
|
|
+ if (isNotEmpty(sysDepts)) {
|
|
|
|
+ return map(sysDepts, SysDept::getId);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询常住人口
|
|
* 查询常住人口
|
|
*
|
|
*
|
|
@@ -224,4 +264,323 @@ public class CzrkServiceImpl implements ICzrkService {
|
|
handleList(czrks);
|
|
handleList(czrks);
|
|
return czrks;
|
|
return czrks;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Czrk getById(Long id) {
|
|
|
|
+ if (isEmpty(id)) {
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+ return czrkMapper.selectCzrkById(id);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public AjaxResult addRlry(Czrk czrk) {
|
|
|
|
+ if (isNotEmpty(czrk.getVillageTowns())) {
|
|
|
|
+ czrk.setRlr(SecurityUtils.getUsername());
|
|
|
|
+ czrk.setIsRl("是");
|
|
|
|
+ czrk.setRlTime(new Date(System.currentTimeMillis()));
|
|
|
|
+ } else {
|
|
|
|
+ czrk.setIsRl("否");
|
|
|
|
+ czrk.setRlTime(null);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int count = czrkMapper.countIdCard(czrk.getIdCard());
|
|
|
|
+ if (count > 0) {
|
|
|
|
+ return AjaxResult.error(String.format("该人员[身份证号为: %s]已存在,请勿重复添加", czrk.getIdCard()));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ count = czrkMapper.insertCzrk(czrk);
|
|
|
|
+ return count > 0 ? AjaxResult.success() : AjaxResult.error();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public int editRlry(Czrk czrk) {
|
|
|
|
+ if (isNotEmpty(czrk.getVillageTowns())) {
|
|
|
|
+ czrk.setRlr(SecurityUtils.getUsername());
|
|
|
|
+ czrk.setIsRl("是");
|
|
|
|
+ czrk.setRlTime(new Date(System.currentTimeMillis()));
|
|
|
|
+ } else {
|
|
|
|
+ czrk.setIsRl("否");
|
|
|
|
+ czrk.setRlTime(null);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return czrkMapper.updateCzrk(czrk);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public JSONObject stsByApplet(Long townId, Long villageId, String userName) {
|
|
|
|
+ List<Long> deptIdList = new ArrayList<>(16);
|
|
|
|
+ // 未加搜索条件
|
|
|
|
+ if (isEmpty(townId) && isEmpty(villageId)) {
|
|
|
|
+ deptIdList = getDeptIdList(null);
|
|
|
|
+ } else {
|
|
|
|
+ // 查村
|
|
|
|
+ if (!isEmpty(townId) && !isEmpty(villageId)) {
|
|
|
|
+ List<SysDept> sysDepts = remoteDeptService.listChildrenDepts(villageId);
|
|
|
|
+ deptIdList = sysDepts.stream().map(SysDept::getId).collect(Collectors.toList());
|
|
|
|
+ } else if (!isEmpty(townId) && isEmpty(villageId)) {
|
|
|
|
+ // 查镇
|
|
|
|
+ List<SysDept> sysDepts = remoteDeptService.listChildrenDepts(townId);
|
|
|
|
+ deptIdList = sysDepts.stream().map(SysDept::getId).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int yrl = czrkMapper.stsByYrl(deptIdList, userName);
|
|
|
|
+ int wrl = czrkMapper.stsByWrl(deptIdList, userName);
|
|
|
|
+ JSONObject result = new JSONObject(3);
|
|
|
|
+ result.put("yrl", yrl);
|
|
|
|
+ result.put("wrl", wrl);
|
|
|
|
+ result.put("total", wrl + yrl);
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 功能描述: 当前单位:镇,村:7个,组:300个,常住人口:5000人,新增 2人 减少 2人
|
|
|
|
+ *
|
|
|
|
+ * @return com.alibaba.fastjson.JSONObject
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public JSONObject stsByCzrk() {
|
|
|
|
+ JSONObject result = new JSONObject(16);
|
|
|
|
+ SysUser sysUser = AuthUtils.getLoginUser().getSysUser();
|
|
|
|
+
|
|
|
|
+ Long deptId = sysUser.getDeptId(); // 当前登陆人的deptId
|
|
|
|
+ result.put("dqdw", sysUser.getDept().getDeptName()); // 当前单位
|
|
|
|
+
|
|
|
|
+ Czrk condition = new Czrk();
|
|
|
|
+ condition.setStartTime(DateUtils.getTodayStartStr());
|
|
|
|
+ condition.setEndTime(DateUtils.getTodayEndStr());
|
|
|
|
+ condition.setIsRl("是");
|
|
|
|
+
|
|
|
|
+ // 市领导
|
|
|
|
+ List<String> roleKeySets = map(sysUser.getRoles(), SysRole::getRoleKey);
|
|
|
|
+ if (roleKeySets.contains("city") || roleKeySets.contains("admin") || roleKeySets.contains("yanshi")) {
|
|
|
|
+ JSONObject jsonObject = redisService.getCacheObject(packRedisKey("single:" + deptId));
|
|
|
|
+ if (isNotEmpty(jsonObject)) {
|
|
|
|
+ QIANSHANSHI_SINGEL = jsonObject;
|
|
|
|
+ return jsonObject;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ThreadPoolService.execute(() -> {
|
|
|
|
+ List<SysDept> allDepts = remoteDeptService.listChildrenDepts(1L);
|
|
|
|
+ List<SysDept> townsDepts = new ArrayList<>(16);
|
|
|
|
+ for (SysDept allDept : allDepts) {
|
|
|
|
+ if (isEmpty(allDept.getParentId())) continue;
|
|
|
|
+ if (allDept.getParentId() == (1L)) {
|
|
|
|
+ townsDepts.add(allDept);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ result.put("zhen", townsDepts.size()); // 镇
|
|
|
|
+
|
|
|
|
+ List<SysDept> cunDepts = new ArrayList<>(16);
|
|
|
|
+ for (SysDept townsDept : townsDepts) {
|
|
|
|
+ for (SysDept allDept : allDepts) {
|
|
|
|
+ if (isEmpty(allDept.getParentId())) continue;
|
|
|
|
+ if (townsDept.getId().equals(allDept.getParentId())) {
|
|
|
|
+ cunDepts.add(allDept);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ result.put("cun", isEmpty(cunDepts) ? 0 : cunDepts.size());
|
|
|
|
+
|
|
|
|
+ List<SysDept> zuDept = new ArrayList<>(16);
|
|
|
|
+ for (SysDept cunDept : cunDepts) {
|
|
|
|
+ for (SysDept allDept : allDepts) {
|
|
|
|
+ if (cunDept.getId().equals(allDept.getParentId())) {
|
|
|
|
+ zuDept.add(allDept);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ result.put("zu", isEmpty(zuDept) ? 0 : zuDept.size()); // 组
|
|
|
|
+ int czrk = czrkMapper.countCzrk(condition); // 常住人口
|
|
|
|
+ result.put("czrk", czrk);
|
|
|
|
+
|
|
|
|
+ int xz = czrkMapper.countByXz(condition); // 新增
|
|
|
|
+ int js = czrkMapper.countByJs(condition);// 减少
|
|
|
|
+ result.put("xz", xz);
|
|
|
|
+ result.put("js", js);
|
|
|
|
+
|
|
|
|
+ condition.setIsRl(null); // 查全部
|
|
|
|
+ int zrs = czrkMapper.countCzrk(condition);
|
|
|
|
+ String bfb = NumberUtils.percent(czrk, zrs);
|
|
|
|
+ result.put("bfb", bfb);
|
|
|
|
+ result.put("zrs", zrs);
|
|
|
|
+ setIntoRedis(packRedisKey("single:" + deptId), result);
|
|
|
|
+ QIANSHANSHI_SINGEL = result;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return QIANSHANSHI_SINGEL;
|
|
|
|
+ } else if (roleKeySets.contains("sys:town")) {
|
|
|
|
+ JSONObject jsonObject = redisService.getCacheObject(packRedisKey("town:" + deptId));
|
|
|
|
+ if (isNotEmpty(jsonObject)) {
|
|
|
|
+ return jsonObject;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ townSts(result, condition, deptId, sysUser.getDept().getDeptName(), true);
|
|
|
|
+// redisService.setCacheObject(packRedisKey("town:" + deptId), result, 1L, TimeUnit.DAYS);
|
|
|
|
+ setIntoRedis(packRedisKey("town:" + deptId), result);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 功能描述: 项目首页统计信息,
|
|
|
|
+ * 当前单位:镇,村:7个,组:300个,常住人口:5000人,新增 2人 减少 2人
|
|
|
|
+ *
|
|
|
|
+ * @return com.boman.domain.dto.AjaxResult
|
|
|
|
+ */
|
|
|
|
+ @Override
|
|
|
|
+ public JSONObject stsByCzrkHomePage() {
|
|
|
|
+ JSONObject result = new JSONObject(16);
|
|
|
|
+ // 当前登陆人的deptId
|
|
|
|
+ SysUser sysUser = AuthUtils.getLoginUser().getSysUser();
|
|
|
|
+ String deptName = sysUser.getDept().getDeptName();
|
|
|
|
+ result.put("dqdw", deptName); // 当前单位
|
|
|
|
+
|
|
|
|
+ List<String> roleKeySets = map(sysUser.getRoles(), SysRole::getRoleKey);
|
|
|
|
+
|
|
|
|
+ Czrk condition = new Czrk();
|
|
|
|
+ condition.setStartTime(DateUtils.getTodayStartStr());
|
|
|
|
+ condition.setEndTime(DateUtils.getTodayEndStr());
|
|
|
|
+ condition.setIsRl("是");
|
|
|
|
+ Long deptId = sysUser.getDeptId();
|
|
|
|
+
|
|
|
|
+ // 市领导 todo 此处不应该写死
|
|
|
|
+ if (roleKeySets.contains("city") || roleKeySets.contains("admin") || roleKeySets.contains("yanshi")) {
|
|
|
|
+ JSONObject jsonObject = redisService.getCacheObject(packRedisKey(deptId + ""));
|
|
|
|
+ if (isNotEmpty(jsonObject)) {
|
|
|
|
+ QIANSHANSHI = jsonObject;
|
|
|
|
+ return jsonObject;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ThreadPoolService.execute(()->{
|
|
|
|
+ List<SysDept> allDepts = remoteDeptService.listChildrenDepts(1L);
|
|
|
|
+ List<SysDept> townsDepts = new ArrayList<>(16);
|
|
|
|
+ for (SysDept allDept : allDepts) {
|
|
|
|
+ if (isEmpty(allDept.getParentId())) continue;
|
|
|
|
+ if (allDept.getParentId() == (1L)) {
|
|
|
|
+ townsDepts.add(allDept);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ result.put("zhen", townsDepts.size()); // 镇
|
|
|
|
+
|
|
|
|
+ List<SysDept> cunDepts = new ArrayList<>(16);
|
|
|
|
+ for (SysDept townsDept : townsDepts) {
|
|
|
|
+ for (SysDept allDept : allDepts) {
|
|
|
|
+ if (isEmpty(allDept.getParentId())) continue;
|
|
|
|
+ if (townsDept.getId().equals(allDept.getParentId())) {
|
|
|
|
+ cunDepts.add(allDept);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ result.put("cun", isEmpty(cunDepts) ? 0 : cunDepts.size());
|
|
|
|
+
|
|
|
|
+ List<SysDept> zuDept = new ArrayList<>(16);
|
|
|
|
+ for (SysDept cunDept : cunDepts) {
|
|
|
|
+ for (SysDept allDept : allDepts) {
|
|
|
|
+ if (cunDept.getId().equals(allDept.getParentId())) {
|
|
|
|
+ zuDept.add(allDept);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ result.put("zu", isEmpty(zuDept) ? 0 : zuDept.size()); // 组
|
|
|
|
+ int czrk = czrkMapper.countCzrk(condition); // 常住人口
|
|
|
|
+ result.put("czrk", czrk);
|
|
|
|
+
|
|
|
|
+ int xz = czrkMapper.countByXz(condition); // 新增
|
|
|
|
+ int js = czrkMapper.countByJs(condition);// 减少
|
|
|
|
+ result.put("xz", xz);
|
|
|
|
+ result.put("js", js);
|
|
|
|
+
|
|
|
|
+ condition.setIsRl(null); // 查全部
|
|
|
|
+ int zrs = czrkMapper.countCzrk(condition);
|
|
|
|
+ String bfb = NumberUtils.percent(czrk, zrs);
|
|
|
|
+ result.put("bfb", bfb);
|
|
|
|
+ result.put("zrs", zrs);
|
|
|
|
+
|
|
|
|
+ // 以各个镇为单位单独处理 townsDepts
|
|
|
|
+ ArrayList<JSONObject> towsDataList = new ArrayList<>(20);
|
|
|
|
+ for (SysDept townsDept : townsDepts) {
|
|
|
|
+ JSONObject townsResult = new JSONObject(16);
|
|
|
|
+ townSts(townsResult, condition, townsDept.getId(), townsDept.getDeptName(), false);
|
|
|
|
+ towsDataList.add(townsResult);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ result.put("townDatas", towsDataList);
|
|
|
|
+// redisService.setCacheObject(packRedisKey(deptId + ""), result, 1L, TimeUnit.DAYS);
|
|
|
|
+ setIntoRedis(packRedisKey(deptId + ""), result);
|
|
|
|
+ QIANSHANSHI = result;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return QIANSHANSHI;
|
|
|
|
+ } else if (roleKeySets.contains("sys:town")) {
|
|
|
|
+ JSONObject jsonObject = redisService.getCacheObject(packRedisKey("town:" + deptId));
|
|
|
|
+ if (isNotEmpty(jsonObject)) {
|
|
|
|
+ ZHEN = jsonObject;
|
|
|
|
+ return jsonObject;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ ThreadPoolService.execute(() -> {
|
|
|
|
+ townSts(result, condition, deptId, deptName, true);
|
|
|
|
+// redisService.setCacheObject(packRedisKey("town:" + deptId), result, 1L, TimeUnit.DAYS);
|
|
|
|
+ setIntoRedis(packRedisKey("town:" + deptId), result);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ return ZHEN;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void townSts(JSONObject result, Czrk condition, Long deptId, String deptName, boolean percent) {
|
|
|
|
+ // 乡镇以下的所有部门
|
|
|
|
+ List<SysDept> depts = remoteDeptService.listChildrenDepts(deptId);
|
|
|
|
+ List<SysDept> cunDepts = new ArrayList<>(16);
|
|
|
|
+ for (SysDept dept : depts) {
|
|
|
|
+ if (isEmpty(dept.getParentId())) continue;
|
|
|
|
+ if (deptId.equals(dept.getParentId())) {
|
|
|
|
+ cunDepts.add(dept);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ result.put("cun", isEmpty(cunDepts) ? 0 : cunDepts.size());
|
|
|
|
+
|
|
|
|
+ List<SysDept> zuDept = new ArrayList<>(16);
|
|
|
|
+ for (SysDept cunDept : cunDepts) {
|
|
|
|
+ for (SysDept dept : depts) {
|
|
|
|
+ if (cunDept.getId().equals(dept.getParentId())) {
|
|
|
|
+ zuDept.add(dept);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ result.put("zu", isEmpty(zuDept) ? 0 : zuDept.size());
|
|
|
|
+ condition.setDeptIdList(map(depts, SysDept::getId));
|
|
|
|
+ int czrk = czrkMapper.countCzrk(condition);
|
|
|
|
+ result.put("czrk", czrk);
|
|
|
|
+
|
|
|
|
+ // 常住人口占总人口的百分比
|
|
|
|
+ if (BooleanUtils.isTrue(percent)) {
|
|
|
|
+ condition.setIsRl(null); // 查全部
|
|
|
|
+ int zrs = czrkMapper.countCzrk(condition);
|
|
|
|
+ String bfb = NumberUtils.percent(czrk, zrs);
|
|
|
|
+ result.put("bfb", bfb);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ int xz = czrkMapper.countByXz(condition);
|
|
|
|
+ int js = czrkMapper.countByJs(condition);
|
|
|
|
+ result.put("xz", xz);
|
|
|
|
+ result.put("js", js);
|
|
|
|
+ result.put("zhen", deptName);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private String packRedisKey(String deptId){
|
|
|
|
+ return STS_CZRK_ + deptId + ":" + DateUtils.getDate();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private void setIntoRedis(String key, Object result){
|
|
|
|
+ redisService.setCacheObject(key, result, 1L, TimeUnit.HOURS);
|
|
|
|
+ }
|
|
}
|
|
}
|