|
@@ -10,13 +10,10 @@ import com.boman.common.core.utils.obj.ObjectUtils;
|
|
|
import com.boman.common.core.utils.sql.SqlUtil;
|
|
|
import com.boman.common.core.web.page.PageDomain;
|
|
|
import com.boman.common.core.web.page.TableSupport;
|
|
|
-import com.boman.domain.SysDept;
|
|
|
-import com.boman.domain.SysRole;
|
|
|
+import com.boman.domain.*;
|
|
|
import com.boman.domain.dto.AjaxResult;
|
|
|
import com.boman.system.api.RemoteDeptService;
|
|
|
import com.boman.system.api.RemoteDictDataService;
|
|
|
-import com.boman.domain.VaccineInfoOperation;
|
|
|
-import com.boman.domain.VaccineInfoUser;
|
|
|
import com.boman.web.core.mapper.StandardlyMapper;
|
|
|
import com.boman.web.core.mapper.VaccineInfoMapper;
|
|
|
import com.boman.web.core.mapper.VaccineInfoOperationMapper;
|
|
@@ -1091,4 +1088,60 @@ public class VaccineInfoServiceImpl implements IVaccineInfoService {
|
|
|
public VaccineInfoOperation getById(Long id) {
|
|
|
return vaccineInfoMapper.selectVaccineInfoById(id);
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public JSONObject sts() {
|
|
|
+ Long 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)) {
|
|
|
+ deptId = null;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<Long> deptIdList = new ArrayList<>(16);
|
|
|
+ if (deptId != null) {
|
|
|
+ List<SysDept> sysDepts = remoteDeptService.listChildrenDepts(deptId);
|
|
|
+ if (sysDepts != null && sysDepts.size() > 0) {
|
|
|
+ for (SysDept sysDept : sysDepts) {
|
|
|
+ Long id = sysDept.getId();
|
|
|
+ deptIdList.add(id);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ int yrl = vaccineInfoMapper.stsByYrl(deptIdList);
|
|
|
+ int wrl = vaccineInfoMapper.stsByWrl(deptIdList);
|
|
|
+ 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(6);
|
|
|
+ // 当前登陆人的deptId
|
|
|
+ SysUser sysUser = AuthUtils.getLoginUser().getSysUser();
|
|
|
+ String deptName = sysUser.getDept().getDeptName();
|
|
|
+ result.put("dqdw", deptName);
|
|
|
+
|
|
|
+ Long deptId = AuthUtils.getLoginUser().getSysUser().getDeptId();
|
|
|
+// int village = remoteDeptService.countChildrenByVillage(deptId);
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
}
|