From d836f3f626f5c47dbba0a684e089125c26001c9f Mon Sep 17 00:00:00 2001 From: TS-QD1 Date: Fri, 27 Oct 2023 17:44:11 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E5=87=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile-jnhb | 7 - readme.md | 70 +++++---- .../apis/community/CommunityController.java | 2 +- .../apis/config/ConfigController.java | 17 --- .../controller/apis/dict/DictController.java | 1 + .../app/config/ConfigAppController.java | 16 +- .../pojo/dtos/community/CommunityDTO.java | 28 ++-- .../pojo/dtos/config/PunchTimeDTOV2.java | 138 ++++++++---------- .../cm/systemcity/pojo/dtos/dict/DictDTO.java | 10 ++ .../pojo/vos/community/CommunityVO.java | 25 ++-- .../cm/systemcity/pojo/vos/dict/DictVO.java | 10 ++ .../service/dict/impl/DictServiceImpl.java | 45 +++--- .../service/user/CityUserService.java | 29 +++- src/main/resources/application-btgxq.yml | 2 +- .../mapper/community/community-mapper.xml | 6 + .../mybatis/mapper/dict/dict-mapper.xml | 14 ++ .../static/route/community/list-tree.html | 99 ++++++------- .../static/route/community/list.html | 58 +++----- .../static/route/community/save.html | 54 ++----- .../static/route/community/update.html | 41 +----- .../resources/static/route/dict/list.html | 11 ++ .../resources/static/route/dict/save.html | 8 +- .../resources/static/route/dict/update.html | 11 +- 23 files changed, 337 insertions(+), 365 deletions(-) delete mode 100644 Dockerfile-jnhb diff --git a/Dockerfile-jnhb b/Dockerfile-jnhb deleted file mode 100644 index 9888b9d..0000000 --- a/Dockerfile-jnhb +++ /dev/null @@ -1,7 +0,0 @@ -FROM openjdk:8u292-jre-buster -ARG JAR_FILE=/target/*.jar -COPY ${JAR_FILE} system-city.jar -ENTRYPOINT ["java","-jar","-Dspring.profiles.active=jnhb","/system-city.jar"] - -# 时区问题 -RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone \ No newline at end of file diff --git a/readme.md b/readme.md index b34c85c..410a49f 100644 --- a/readme.md +++ b/readme.md @@ -1,36 +1,50 @@ -# 系统名称 +# 20231023迭代`未上线` -稀土高新区网格化系统 +## 表结构调整 -# 服务单位 +### city_dict -包头稀土高新区组织部 +| 字段 | 类型 | 默认值 | 描述 | 操作 | +|---------|--------|-----|------|----| +| is_hide | int(1) | 0 | 是否隐藏 | 新增 | -# 核心业务 +### city_community -## 绩效考核 - -绩效扣除逻辑: -1. 每天签到、签退各一次(专管员与网格员一致) -2. 未签到 或 未签退 一次 扣除 2.4%(若同时出现,扣 4.8%) -3. 请假 一次 扣除 2.4% -4. 未签到 或 未签退 中 扣除 请假次数 -5. 旷工(没签到并且没请假) 一次 扣除 5% (不记录签到签退情况) - -# 系统版本 - -> 与POM同步,有业务代码调整时记录 - -当前版本:[1.0.0-SNAPSHOT](#1.0.0-SNAPSHOT) - -历史版本 -- 无 - -# 版本调整历史(倒叙) - -# 1.0.0-SNAPSHOT -### 业务调整 +| 字段 | 类型 | 默认值 | 描述 | 操作 | +|-----------------|---------------|-----|---------|----| +| jump_system_url | varchar(1000) | | 跳转系统的地址 | 新增 | ### 菜单调整 -#### \ No newline at end of file +社区(村)管理: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
变更前变更后
链接接口前缀资源前缀路由前缀链接接口前缀资源前缀路由前缀
list.htmllist-tree.html
diff --git a/src/main/java/com/cm/systemcity/controller/apis/community/CommunityController.java b/src/main/java/com/cm/systemcity/controller/apis/community/CommunityController.java index 0f8bdff..44fb9a4 100755 --- a/src/main/java/com/cm/systemcity/controller/apis/community/CommunityController.java +++ b/src/main/java/com/cm/systemcity/controller/apis/community/CommunityController.java @@ -96,8 +96,8 @@ public class CommunityController extends AbstractController { throw new ParamsException("地区名称不能为空"); } params.put("areaName", communityVO.getAreaName()); - params.put("communitySummary", communityVO.getCommunitySummary()); + params.put("jumpSystemUrl", communityVO.getJumpSystemUrl()); } @ApiOperation(value = "社区列表", notes = "社区列表接口") diff --git a/src/main/java/com/cm/systemcity/controller/apis/config/ConfigController.java b/src/main/java/com/cm/systemcity/controller/apis/config/ConfigController.java index d339430..d03b83c 100644 --- a/src/main/java/com/cm/systemcity/controller/apis/config/ConfigController.java +++ b/src/main/java/com/cm/systemcity/controller/apis/config/ConfigController.java @@ -78,23 +78,6 @@ public class ConfigController extends AbstractController { throw new ParamsException("专管员签退截止时间不能为空"); } params.put("nSignOutEnd", configVO.getnSignOutEnd()); - // 公安打卡设置 - if (StringUtils.isBlank(configVO.getGaSignInStr())) { - throw new ParamsException("公安签到开始时间不能为空"); - } - params.put("gaSignInStr", configVO.getGaSignInStr()); - if (StringUtils.isBlank(configVO.getGaSignInEnd())) { - throw new ParamsException("公安签到截止时间不能为空"); - } - params.put("gaSignInEnd", configVO.getGaSignInEnd()); - if (StringUtils.isBlank(configVO.getGaSignOutStr())) { - throw new ParamsException("公安签退开始时间不能为空"); - } - params.put("gaSignOutStr", configVO.getGaSignOutStr()); - if (StringUtils.isBlank(configVO.getGaSignOutEnd())) { - throw new ParamsException("公安签退截止时间不能为空"); - } - params.put("gaSignOutEnd", configVO.getGaSignOutEnd()); // 不记录轨迹时间设置 if (StringUtils.isBlank(configVO.getPositionRecordStr())) { throw new ParamsException("网格员不记录轨迹开始时间不能为空"); diff --git a/src/main/java/com/cm/systemcity/controller/apis/dict/DictController.java b/src/main/java/com/cm/systemcity/controller/apis/dict/DictController.java index 25dce3e..30b8ec3 100755 --- a/src/main/java/com/cm/systemcity/controller/apis/dict/DictController.java +++ b/src/main/java/com/cm/systemcity/controller/apis/dict/DictController.java @@ -95,6 +95,7 @@ public class DictController extends AbstractController { } params.put("dictOrder", dictVO.getDictOrder()); params.put("industryCode", dictVO.getIndustryCode()); + params.put("isHide", dictVO.getIsHide()); } @ApiOperation(value = "字典列表", notes = "字典列表接口") diff --git a/src/main/java/com/cm/systemcity/controller/app/config/ConfigAppController.java b/src/main/java/com/cm/systemcity/controller/app/config/ConfigAppController.java index 2bd392c..a4081b0 100644 --- a/src/main/java/com/cm/systemcity/controller/app/config/ConfigAppController.java +++ b/src/main/java/com/cm/systemcity/controller/app/config/ConfigAppController.java @@ -58,12 +58,16 @@ public class ConfigAppController extends AbstractController { punchTimeDTOV2.setnSignOutStr(config.get("nSignOutStr").toString()); punchTimeDTOV2.setnSignOutEnd(config.get("nSignOutEnd").toString()); boolean isGa = cityUserService.isGaUser(appTokenUser.getId()); - punchTimeDTOV2.setGa(isGa); - if (isGa) { - punchTimeDTOV2.setGaSignInStr(config.get("gaSignInStr").toString()); - punchTimeDTOV2.setGaSignInEnd(config.get("gaSignInEnd").toString()); - punchTimeDTOV2.setGaSignOutStr(config.get("gaSignOutStr").toString()); - punchTimeDTOV2.setGaSignOutEnd(config.get("gaSignOutEnd").toString()); + String[] signDepartment = cityUserService.getSignDepartment(appTokenUser); + if (signDepartment != null) { + String[] signInEndTime = cityUserService.getSignInEndTime(appTokenUser); + String[] signOutEndTime = cityUserService.getSignOutEndTime(appTokenUser); + punchTimeDTOV2.setCustomSignDepartmentId(signDepartment[0]); + punchTimeDTOV2.setCustomSignDepartmentName(signDepartment[1]); + punchTimeDTOV2.setCustomSignInStr(signInEndTime[0]); + punchTimeDTOV2.setCustomSignInEnd(signInEndTime[1]); + punchTimeDTOV2.setCustomSignOutStr(signOutEndTime[0]); + punchTimeDTOV2.setCustomSignOutEnd(signOutEndTime[1]); } punchTimeDTOV2.setPositionRecordSrt(config.get("positionRecordStr").toString()); punchTimeDTOV2.setPositionRecordEnd(config.get("positionRecordEnd").toString()); diff --git a/src/main/java/com/cm/systemcity/pojo/dtos/community/CommunityDTO.java b/src/main/java/com/cm/systemcity/pojo/dtos/community/CommunityDTO.java index 0e89d82..802747d 100755 --- a/src/main/java/com/cm/systemcity/pojo/dtos/community/CommunityDTO.java +++ b/src/main/java/com/cm/systemcity/pojo/dtos/community/CommunityDTO.java @@ -29,6 +29,8 @@ public class CommunityDTO implements Serializable { private String areaName; @ApiModelProperty(name = "communityBossId", value = "网格员ID") private String communityBossId; + @ApiModelProperty(name = "jumpSystemUrl", value = "跳转地址") + private String jumpSystemUrl; public String getCommunityId() { return communityId; @@ -86,24 +88,12 @@ public class CommunityDTO implements Serializable { this.communityBossId = communityBossId; } - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("{"); - sb.append("\"communityId\":\"") - .append(communityId).append('\"'); - sb.append(",\"communityName\":\"") - .append(communityName).append('\"'); - sb.append(",\"communitySummary\":\"") - .append(communitySummary).append('\"'); - sb.append(",\"communityOrder\":") - .append(communityOrder); - sb.append(",\"areaId\":\"") - .append(areaId).append('\"'); - sb.append(",\"areaName\":\"") - .append(areaName).append('\"'); - sb.append(",\"communityBossId\":\"") - .append(communityBossId).append('\"'); - sb.append('}'); - return sb.toString(); + public String getJumpSystemUrl() { + return jumpSystemUrl; } + + public void setJumpSystemUrl(String jumpSystemUrl) { + this.jumpSystemUrl = jumpSystemUrl; + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/systemcity/pojo/dtos/config/PunchTimeDTOV2.java b/src/main/java/com/cm/systemcity/pojo/dtos/config/PunchTimeDTOV2.java index c456efb..fc259db 100644 --- a/src/main/java/com/cm/systemcity/pojo/dtos/config/PunchTimeDTOV2.java +++ b/src/main/java/com/cm/systemcity/pojo/dtos/config/PunchTimeDTOV2.java @@ -27,16 +27,6 @@ public class PunchTimeDTOV2 { private String nSignOutStr; @ApiModelProperty(name = "nSignOutEnd", value = "专管员签退截止时间") private String nSignOutEnd; - @ApiModelProperty(name = "isGa", value = "是否公安") - private Boolean isGa; - @ApiModelProperty(name = "gaSignInStr", value = "公安签到开始时间") - private String gaSignInStr; - @ApiModelProperty(name = "gaSignInEnd", value = "公安签到截止时间") - private String gaSignInEnd; - @ApiModelProperty(name = "gaSignOutStr", value = "公安签退开始时间") - private String gaSignOutStr; - @ApiModelProperty(name = "gaSignOutEnd", value = "公安签退截止时间") - private String gaSignOutEnd; @ApiModelProperty(name = "positionRecordSrt", value = "网格员不记录轨迹开始时间") private String positionRecordSrt; @ApiModelProperty(name = "positionRecordEnd", value = "网格员不记录轨迹截止时间") @@ -45,6 +35,19 @@ public class PunchTimeDTOV2 { private String nPositionRecordStr; @ApiModelProperty(name = "nPositionRecordEnd", value = "专管员不记录轨迹开始时间") private String nPositionRecordEnd; + @ApiModelProperty(name = "customSignDepartmentId", value = "自定义打卡部门ID") + private String customSignDepartmentId; + @ApiModelProperty(name = "customSignDepartmentName", value = "自定义打卡部门名称") + private String customSignDepartmentName; + @ApiModelProperty(name = "customSignInStr", value = "自定义签到开始时间") + private String customSignInStr; + @ApiModelProperty(name = "customSignInEnd", value = "自定义签到结束时间") + private String customSignInEnd; + @ApiModelProperty(name = "customSignOutStr", value = "自定义签退开始时间") + private String customSignOutStr; + @ApiModelProperty(name = "customSignOutEnd", value = "自定义签退结束时间") + private String customSignOutEnd; + public String getSignInStr() { return signInStr == null ? "" : signInStr; @@ -110,46 +113,6 @@ public class PunchTimeDTOV2 { this.nSignOutEnd = nSignOutEnd; } - public Boolean getGa() { - return isGa; - } - - public void setGa(Boolean ga) { - isGa = ga; - } - - public String getGaSignInStr() { - return gaSignInStr; - } - - public void setGaSignInStr(String gaSignInStr) { - this.gaSignInStr = gaSignInStr; - } - - public String getGaSignInEnd() { - return gaSignInEnd; - } - - public void setGaSignInEnd(String gaSignInEnd) { - this.gaSignInEnd = gaSignInEnd; - } - - public String getGaSignOutStr() { - return gaSignOutStr; - } - - public void setGaSignOutStr(String gaSignOutStr) { - this.gaSignOutStr = gaSignOutStr; - } - - public String getGaSignOutEnd() { - return gaSignOutEnd; - } - - public void setGaSignOutEnd(String gaSignOutEnd) { - this.gaSignOutEnd = gaSignOutEnd; - } - public String getPositionRecordSrt() { return positionRecordSrt == null ? "" : positionRecordSrt; } @@ -182,34 +145,51 @@ public class PunchTimeDTOV2 { this.nPositionRecordEnd = nPositionRecordEnd; } - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("{"); - sb.append("\"signInStr\":\"") - .append(signInStr).append('\"'); - sb.append(",\"signInEnd\":\"") - .append(signInEnd).append('\"'); - sb.append(",\"signOutStr\":\"") - .append(signOutStr).append('\"'); - sb.append(",\"signOutEnd\":\"") - .append(signOutEnd).append('\"'); - sb.append(",\"nSignInStr\":\"") - .append(nSignInStr).append('\"'); - sb.append(",\"nSignInEnd\":\"") - .append(nSignInEnd).append('\"'); - sb.append(",\"nSignOutStr\":\"") - .append(nSignOutStr).append('\"'); - sb.append(",\"nSignOutEnd\":\"") - .append(nSignOutEnd).append('\"'); - sb.append(",\"positionRecordSrt\":\"") - .append(positionRecordSrt).append('\"'); - sb.append(",\"positionRecordEnd\":\"") - .append(positionRecordEnd).append('\"'); - sb.append(",\"nPositionRecordStr\":\"") - .append(nPositionRecordStr).append('\"'); - sb.append(",\"nPositionRecordEnd\":\"") - .append(nPositionRecordEnd).append('\"'); - sb.append('}'); - return sb.toString(); + public String getCustomSignDepartmentId() { + return customSignDepartmentId; + } + + public void setCustomSignDepartmentId(String customSignDepartmentId) { + this.customSignDepartmentId = customSignDepartmentId; + } + + public String getCustomSignDepartmentName() { + return customSignDepartmentName; + } + + public void setCustomSignDepartmentName(String customSignDepartmentName) { + this.customSignDepartmentName = customSignDepartmentName; + } + + public String getCustomSignInStr() { + return customSignInStr; + } + + public void setCustomSignInStr(String customSignInStr) { + this.customSignInStr = customSignInStr; + } + + public String getCustomSignInEnd() { + return customSignInEnd; + } + + public void setCustomSignInEnd(String customSignInEnd) { + this.customSignInEnd = customSignInEnd; + } + + public String getCustomSignOutStr() { + return customSignOutStr; + } + + public void setCustomSignOutStr(String customSignOutStr) { + this.customSignOutStr = customSignOutStr; + } + + public String getCustomSignOutEnd() { + return customSignOutEnd; + } + + public void setCustomSignOutEnd(String customSignOutEnd) { + this.customSignOutEnd = customSignOutEnd; } } diff --git a/src/main/java/com/cm/systemcity/pojo/dtos/dict/DictDTO.java b/src/main/java/com/cm/systemcity/pojo/dtos/dict/DictDTO.java index 9d43e13..9599597 100755 --- a/src/main/java/com/cm/systemcity/pojo/dtos/dict/DictDTO.java +++ b/src/main/java/com/cm/systemcity/pojo/dtos/dict/DictDTO.java @@ -24,6 +24,8 @@ public class DictDTO { private String dictParentName; @ApiModelProperty(name = "isParent", value = "是否父级") private Boolean isParent; + @ApiModelProperty(name = "isHide", value = "是否隐藏") + private Integer isHide; @ApiModelProperty(name = "dictName", value = "字典名称") private String dictName; @ApiModelProperty(name = "dictSummary", value = "字典说明") @@ -69,6 +71,14 @@ public class DictDTO { isParent = parent; } + public Integer getIsHide() { + return isHide; + } + + public void setIsHide(Integer isHide) { + this.isHide = isHide; + } + public String getDictName() { return dictName == null ? "" : dictName.trim(); } diff --git a/src/main/java/com/cm/systemcity/pojo/vos/community/CommunityVO.java b/src/main/java/com/cm/systemcity/pojo/vos/community/CommunityVO.java index ef11844..8ca86cf 100755 --- a/src/main/java/com/cm/systemcity/pojo/vos/community/CommunityVO.java +++ b/src/main/java/com/cm/systemcity/pojo/vos/community/CommunityVO.java @@ -24,6 +24,8 @@ public class CommunityVO { private String areaId; @ApiModelProperty(name = "areaName", value = "地区名称") private String areaName; + @ApiModelProperty(name = "jumpSystemUrl", value = "跳转地址") + private String jumpSystemUrl; public String getCommunityName() { return communityName; @@ -65,21 +67,12 @@ public class CommunityVO { this.areaName = areaName; } - - @Override - public String toString() { - final StringBuilder sb = new StringBuilder("{"); - sb.append(",\"communityName\":") - .append("\"").append(communityName).append("\""); - sb.append(",\"communitySummary\":") - .append("\"").append(communitySummary).append("\""); - sb.append(",\"communityOrder\":") - .append("\"").append(communityOrder).append("\""); - sb.append(",\"areaId\":") - .append("\"").append(areaId).append("\""); - sb.append(",\"areaName\":") - .append("\"").append(areaName).append("\""); - sb.append('}'); - return sb.toString(); + public String getJumpSystemUrl() { + return jumpSystemUrl; } + + public void setJumpSystemUrl(String jumpSystemUrl) { + this.jumpSystemUrl = jumpSystemUrl; + } + } \ No newline at end of file diff --git a/src/main/java/com/cm/systemcity/pojo/vos/dict/DictVO.java b/src/main/java/com/cm/systemcity/pojo/vos/dict/DictVO.java index 49e0b02..144adc9 100755 --- a/src/main/java/com/cm/systemcity/pojo/vos/dict/DictVO.java +++ b/src/main/java/com/cm/systemcity/pojo/vos/dict/DictVO.java @@ -24,6 +24,8 @@ public class DictVO { private Integer dictOrder; @ApiModelProperty(name = "industryCode", value = "行业代码") private String industryCode; + @ApiModelProperty(name = "isHide", value = "是否隐藏") + private Integer isHide; public String getDictParentId() { return dictParentId; @@ -65,6 +67,14 @@ public class DictVO { this.industryCode = industryCode; } + public Integer getIsHide() { + return isHide; + } + + public void setIsHide(Integer isHide) { + this.isHide = isHide; + } + @Override public String toString() { final StringBuilder sb = new StringBuilder("{"); diff --git a/src/main/java/com/cm/systemcity/service/dict/impl/DictServiceImpl.java b/src/main/java/com/cm/systemcity/service/dict/impl/DictServiceImpl.java index ee12311..54dc890 100755 --- a/src/main/java/com/cm/systemcity/service/dict/impl/DictServiceImpl.java +++ b/src/main/java/com/cm/systemcity/service/dict/impl/DictServiceImpl.java @@ -83,7 +83,7 @@ public class DictServiceImpl extends AbstractService implements IDictService { public List listBindCaseTypeAll(Map params) { // 查找所有绑定部门的案件类型父级列表 List dictDTOS = listCaseTypeParentBind(params); - for (DictDTO item : dictDTOS){ + for (DictDTO item : dictDTOS) { params.clear(); params.put("dictParentId", item.getDictId()); List subDTOs = listCaseTypeBind(params); @@ -125,7 +125,7 @@ public class DictServiceImpl extends AbstractService implements IDictService { List dictDTOs = listDict(params); List easyUITreeDTOs = new ArrayList<>(); for (DictDTO dictDTO : dictDTOs) { - easyUITreeDTOs.add(new EasyUITreeDTO("case_"+ dictDTO.getDictId(), dictDTO.getDictName(), null, "icon-case-type")); + easyUITreeDTOs.add(new EasyUITreeDTO("case_" + dictDTO.getDictId(), dictDTO.getDictName(), null, "icon-case-type")); } return easyUITreeDTOs; } @@ -160,15 +160,16 @@ public class DictServiceImpl extends AbstractService implements IDictService { /** * 根据父级ID和名称查询 + * * @param parentId * @param name * @return * @throws SearchException */ - public DictDTO getDictByNameAndParentId(String parentId,String name) throws SearchException{ - Map params = new HashMap<>(); - params.put("dictParentId",parentId); - params.put("dictName",name); + public DictDTO getDictByNameAndParentId(String parentId, String name) throws SearchException { + Map params = new HashMap<>(); + params.put("dictParentId", parentId); + params.put("dictName", name); return dictDao.getDictByNameAndParentId(params); } @@ -180,32 +181,32 @@ public class DictServiceImpl extends AbstractService implements IDictService { */ params.put("dictParentId", "46d108b2-4ef9-4f6f-b30c-0c700e3ee852"); List dictDTOS = dictDao.listDict(params); - if(dictDTOS == null || dictDTOS.size() == 0){ + if (dictDTOS == null || dictDTOS.size() == 0) { return new ArrayList<>(0); } // 查询该案件类型下是否绑定了部门 List bindDictList = new ArrayList<>(); - for (DictDTO item : dictDTOS){ + for (DictDTO item : dictDTOS) { List caseTypeIds = new ArrayList<>(); params.put("dictParentId", item.getDictId()); List subDictDTOs = dictDao.listDict(params); - if(subDictDTOs == null || subDictDTOs.size() == 0){ + if (subDictDTOs == null || subDictDTOs.size() == 0) { continue; } - for(DictDTO subItem : subDictDTOs){ + for (DictDTO subItem : subDictDTOs) { caseTypeIds.add(subItem.getDictId()); } - params.put("caseTypeIds",StringUtils.join(caseTypeIds, ",")); + params.put("caseTypeIds", StringUtils.join(caseTypeIds, ",")); List> deptList = dictDao.listBindDept(params); - if(deptList != null && deptList.size() > 0){ + if (deptList != null && deptList.size() > 0) { List deptIds = new ArrayList<>(); - for (Map deptItem :deptList){ + for (Map deptItem : deptList) { deptIds.add(deptItem.get("department_id").toString()); } // 查询部门集合中是否有专管员 - params.put("deptIds",StringUtils.join(deptIds, ",")); + params.put("deptIds", StringUtils.join(deptIds, ",")); List> deptUserMap = dictDao.listBindDeptUser(params); - if(deptUserMap != null && deptUserMap.size() > 0){ + if (deptUserMap != null && deptUserMap.size() > 0) { bindDictList.add(item); } } @@ -216,24 +217,24 @@ public class DictServiceImpl extends AbstractService implements IDictService { @Override public List listCaseTypeBind(Map params) { List dictDTOS = dictDao.listDict(params); - if(dictDTOS == null || dictDTOS.size() == 0){ + if (dictDTOS == null || dictDTOS.size() == 0) { return new ArrayList<>(0); } List bindDictList = new ArrayList<>(); - for(DictDTO item : dictDTOS){ + for (DictDTO item : dictDTOS) { List caseTypeIds = new ArrayList<>(); caseTypeIds.add(item.getDictId()); - params.put("caseTypeIds",StringUtils.join(caseTypeIds, ",")); + params.put("caseTypeIds", StringUtils.join(caseTypeIds, ",")); List> deptList = dictDao.listBindDept(params); - if(deptList != null && deptList.size() > 0){ + if (deptList != null && deptList.size() > 0) { List deptIds = new ArrayList<>(); - for (Map deptItem :deptList){ + for (Map deptItem : deptList) { deptIds.add(deptItem.get("department_id").toString()); } // 查询部门集合中是否有专管员 - params.put("deptIds",StringUtils.join(deptIds, ",")); + params.put("deptIds", StringUtils.join(deptIds, ",")); List> deptUserMap = dictDao.listBindDeptUser(params); - if(deptUserMap != null && deptUserMap.size() > 0){ + if (deptUserMap != null && deptUserMap.size() > 0) { bindDictList.add(item); } } diff --git a/src/main/java/com/cm/systemcity/service/user/CityUserService.java b/src/main/java/com/cm/systemcity/service/user/CityUserService.java index 3b9c6bc..f2c660f 100644 --- a/src/main/java/com/cm/systemcity/service/user/CityUserService.java +++ b/src/main/java/com/cm/systemcity/service/user/CityUserService.java @@ -3,6 +3,7 @@ package com.cm.systemcity.service.user; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cm.common.exception.base.SystemException; +import com.cm.common.token.app.entity.AppToken; import com.cm.common.token.app.entity.AppTokenUser; import com.cm.common.token.app.entity.AppTokenUserDepartment; import com.cm.systemcity.config.properties.ConstsIdProperties; @@ -44,10 +45,31 @@ public class CityUserService extends BaseService { return count != null && count > 0; } + public String[] getSignDepartment(AppTokenUser appTokenUser) { + appTokenUser.getDepartments(); + Map config = CacheManager.getInstance().getConfig(); + // 先判断部门 + List departmentIds = appTokenUser.getDepartments().stream().map(AppTokenUserDepartment::getDepartmentId).collect(Collectors.toList()); + if (!departmentIds.isEmpty()) { + // 配置 + Object customSignArray = config.get("customSignArray"); + if (!Objects.isNull(customSignArray) && !StringUtils.isBlank(customSignArray.toString())) { + JSONArray array = JSONArray.parseArray(customSignArray.toString()); + for (int i = 0; i < array.size(); i++) { + JSONObject customSignObject = array.getJSONObject(i); + for (String departmentId : departmentIds) { + if (StringUtils.equals(customSignObject.getString("departmentId"), departmentId)) { + return new String[]{customSignObject.getString("departmentId"), customSignObject.getString("departmentName")}; + } + } + } + } + } + return null; + } + public String[] getSignInEndTime(AppTokenUser appTokenUser) { // 所在部门 - Map params = getHashMap(2); - params.put("userId", appTokenUser.getId()); appTokenUser.getDepartments(); Map config = CacheManager.getInstance().getConfig(); // 先判断部门 @@ -77,8 +99,6 @@ public class CityUserService extends BaseService { public String[] getSignOutEndTime(AppTokenUser appTokenUser) { // 所在部门 - Map params = getHashMap(2); - params.put("userId", appTokenUser.getId()); appTokenUser.getDepartments(); Map config = CacheManager.getInstance().getConfig(); // 先判断部门 @@ -106,4 +126,5 @@ public class CityUserService extends BaseService { return new String[]{config.get("signOutStr").toString(), config.get("signOutEnd").toString()}; } + } diff --git a/src/main/resources/application-btgxq.yml b/src/main/resources/application-btgxq.yml index 47c5255..bbcae1c 100644 --- a/src/main/resources/application-btgxq.yml +++ b/src/main/resources/application-btgxq.yml @@ -81,7 +81,7 @@ file: # 安全 security: oauth2: - oauth-server: http://127.0.0.1:7021/usercenter + oauth-server: http://192.168.0.15:7021/usercenter oauth-logout: ${security.oauth2.oauth-server}/logout?redirect_uri=${server.url} client: client-id: c024a89b35b04d4d8b5b4ea4d66a8acb diff --git a/src/main/resources/mybatis/mapper/community/community-mapper.xml b/src/main/resources/mybatis/mapper/community/community-mapper.xml index 450b465..ff57247 100755 --- a/src/main/resources/mybatis/mapper/community/community-mapper.xml +++ b/src/main/resources/mybatis/mapper/community/community-mapper.xml @@ -9,6 +9,7 @@ + @@ -20,6 +21,7 @@ community_order, area_id, area_name, + jump_system_url, creator, gmt_create, modifier, @@ -32,6 +34,7 @@ #{communityOrder}, #{areaId}, #{areaName}, + #{jumpSystemUrl}, #{creator}, #{gmtCreate}, #{modifier}, @@ -74,6 +77,9 @@ area_name = #{areaName}, + + + jump_system_url = #{jumpSystemUrl}, modifier = #{modifier}, gmt_modified = #{gmtModified} diff --git a/src/main/resources/mybatis/mapper/dict/dict-mapper.xml b/src/main/resources/mybatis/mapper/dict/dict-mapper.xml index 52588d5..a8bd6a8 100755 --- a/src/main/resources/mybatis/mapper/dict/dict-mapper.xml +++ b/src/main/resources/mybatis/mapper/dict/dict-mapper.xml @@ -11,6 +11,7 @@ + @@ -29,6 +30,7 @@ dict_code, dict_order, industry_code, + is_hide, creator, gmt_create, modifier, @@ -42,6 +44,7 @@ #{dictCode}, #{dictOrder}, #{industryCode}, + #{isHide}, #{creator}, #{gmtCreate}, #{modifier}, @@ -84,6 +87,9 @@ industry_code = #{industryCode}, + + + is_hide = #{isHide}, modifier = #{modifier}, gmt_modified = #{gmtModified} @@ -99,6 +105,10 @@ city_dict WHERE is_delete = 0 + + AND + is_hide = #{isHide} + AND dict_parent_id = #{dictParentId} @@ -125,6 +135,10 @@ AND t1.gmt_create = ]]> #{startTime} + + AND + t1.is_hide = #{isHide} + AND t1.gmt_create #{endTime} diff --git a/src/main/resources/static/route/community/list-tree.html b/src/main/resources/static/route/community/list-tree.html index ea5b9a2..fd83ec6 100644 --- a/src/main/resources/static/route/community/list-tree.html +++ b/src/main/resources/static/route/community/list-tree.html @@ -11,16 +11,23 @@ +
-
+
-
-
-
    -
    +
    +
    +
    +
    +
    +
    +
    @@ -38,63 +45,49 @@ var $ = layui.$; var $win = $(window); var resizeTimeout = null; - var companyType = top.restAjax.params(window.location.href).companyType; - var j = 0; // 用于控制移除非单位类型数据的次数,确保不会将单位类型的子集移除 + var renderIFrame = function(areaId, areaName) { + $('#listContent').attr('src', top.restAjax.path('route/community/list.html?areaId={areaId}&areaName={areaName}', [areaId, encodeURI(areaName)])) + } + + var renderStreet = function() { + top.restAjax.get(top.restAjax.path('api/dict/listztreedict?id={id}', ['9d179f05-3ea0-48f7-853c-d3b7124b791c']), { + isHide: 0 + }, null, function(code, data) { + var divs = '' + $.each(data, function(index, item) { + divs += `
    ${item.name}
    `; + }); + var $streetContainer = $('#streetContainer'); + $streetContainer.empty(); + $streetContainer.append(divs); + + renderIFrame(data[0].id, data[0].name); + }, function(code, data) { + top.DialogBox.msg(data.msg); + }) + } // 初始化大小 - function initSize() { - $('#leftTreeWrap').css({ - height: $win.height() - 30, + var initSize = function() { + $('#streetContainer').css({ + height: $win.height() - 50, overflow: 'auto' }); - $('#listContentWrap').css({ + $('#listContainer').css({ height: $win.height() - 50, }); } // 初始化树 - function initThree() { - var setting = { - async: { - enable: true, - autoLoad: false, - type: 'get', - url: top.restAjax.path('api/dict/listztreedict?id={id}', ['9d179f05-3ea0-48f7-853c-d3b7124b791c']), - autoParam: ['id'], - otherParam: {}, - dataFilter: function (treeId, parentNode, childNodes) { - if (!childNodes) return null; - for (var i = 0, l = childNodes.length; i < l; i++) { - childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.'); - } - return childNodes; - } - }, - callback: { - onClick: function (event, treeId, treeNode) { - top.dialog.dialogData.areaId = treeNode.id; - top.dialog.dialogData.areaName = treeNode.name; - layer.confirm('您选择的是:' + treeNode.name, function (index) { - var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引 - parent.layer.close(index); - }); - }, - } - }; - - var zTree = $.fn.zTree.init($("#leftTree"), setting); - zTree.addNodes(null, { - id: '0', - pId: '-1', - name: top.dataMessage.tree.rootName, - url: 'javascript:;', - isParent: 'true' - }); - - common.refreshTree('leftTree'); - } - initSize(); - initThree(); + renderStreet(); + + $(document).on('click', '.street', function(e) { + var id = this.dataset.id; + var name = this.dataset.name; + $('.street').removeClass('active'); + $(this).addClass('active'); + renderIFrame(id, this.innerHTML); + }) // 事件 - 页面变化 $win.on('resize', function() { diff --git a/src/main/resources/static/route/community/list.html b/src/main/resources/static/route/community/list.html index 4980331..63c7f7d 100755 --- a/src/main/resources/static/route/community/list.html +++ b/src/main/resources/static/route/community/list.html @@ -11,20 +11,12 @@ -
    +
    -
    -
    @@ -65,26 +57,11 @@ var table = layui.table; var admin = layui.admin; var laytpl = layui.laytpl; + var query = top.restAjax.params(window.location.href); + var areaId = query.areaId; + var areaName = decodeURI(query.areaName); var tableUrl = top.restAjax.path('api/community/listpagecommunity', []); - function init(){ - initArea1Select(); - } - init(); - - // 初始化街镇 - function initArea1Select() { - top.restAjax.get(top.restAjax.path('api/dict/listdict/9d179f05-3ea0-48f7-853c-d3b7124b791c', []), {}, null, function(code, data, args) { - laytpl(document.getElementById('areaSelectTemplate').innerHTML).render(data, function(html) { - document.getElementById('areaSelectTemplateBox').innerHTML = html; - }); - form.render('select', 'areaSelectTemplateBox'); - initTable(); - }, function(code, data) { - top.dialog.msg(data.msg); - }); - } - form.on('select(areaChange)', function(data){ reloadTable(1); }); @@ -96,11 +73,11 @@ id: 'dataTable', url: tableUrl, width: admin.screen() > 1 ? '100%' : '', - height: $win.height() - 100, + height: $win.height() - 68, limit: 20, limits: [20, 40, 60, 80, 100, 200], where : { - areaId : $('#area').val() + areaId: areaId }, toolbar: '#headerToolBar', request: { @@ -115,6 +92,15 @@ {field:'communitySummary', width:160, title: '说明', align:'center',}, {field:'communityOrder', width:160, title: '排序', align:'center',}, {field:'areaName', width:150, title: '地区名称', align:'center',}, + {field:'jumpSystemUrl', width:200, title: '跳转地址', align:'center', + templet: function(row) { + var data = row.jumpSystemUrl; + if(data) { + return `${data}`; + } + return '-'; + } + }, ] ], page: true, @@ -128,6 +114,7 @@ } }); } + initTable(); // 重载表格 function reloadTable(currentPage) { @@ -140,7 +127,6 @@ page: { curr: currentPage }, - height: $win.height() - 100, }); } @@ -157,12 +143,13 @@ if(layEvent === 'save') { layer.open({ type: 2, - title: '新增社区(村)', + title: `${areaName}:新增社区(村)`, closeBtn: 1, - area: ['40%', '50%'], + area: ['40%', '100%'], + offset: 'r', shadeClose: false, anim: 2, - content: top.restAjax.path('route/community/save.html', []), + content: top.restAjax.path('route/community/save.html?areaId={areaId}&areaName={areaName}', [areaId, query.areaName]), end: function() { reloadTable(); } @@ -175,9 +162,10 @@ } else { layer.open({ type: 2, - title: '编辑信息', + title: `${areaName}:编辑社区(村)`, + offset: 'r', closeBtn: 1, - area: ['40%', '50%'], + area: ['40%', '100%'], shadeClose: false, anim: 2, content: top.restAjax.path('route/community/update.html?communityId={id}', [checkDatas[0].communityId]), diff --git a/src/main/resources/static/route/community/save.html b/src/main/resources/static/route/community/save.html index 6f26f15..36cb456 100755 --- a/src/main/resources/static/route/community/save.html +++ b/src/main/resources/static/route/community/save.html @@ -34,6 +34,12 @@
    +
    + +
    + +
    +
    @@ -62,16 +68,16 @@ }).use(['index', 'form', 'laydate'], function() { var $ = layui.$; var form = layui.form; - var dictionaryParentId = top.restAjax.params(window.location.href).dictParentId; - var formObject = { - communityName: null, - communitySummary: null, - communityOrder: '1', - areaId: null, - areaName: null, - } + var query = top.restAjax.params(window.location.href); + var areaId = query.areaId; + var areaName = decodeURI(query.areaName); - $('.layui-card').height($(window).height() - 30); + var init = function() { + $('#areaId').val(areaId); + $('#areaName').val(areaName); + $('.layui-card').height($(window).height() - 30); + } + init(); function closeBox() { parent.layer.close(parent.layer.getFrameIndex(window.name)); @@ -111,36 +117,6 @@ closeBox(); }); - // 点击地区名称选择输入框,弹出层方法 - $(document).on('click', '#areaName', function() { - top.dialog.tree({ - title: '所属地区', - apiUri: 'api/dict/listztreedict', - width: '200px', - height: '400px', - defaultParams: {id: '9d179f05-3ea0-48f7-853c-d3b7124b791c'}, - selectedNodes: [ - { - id: formObject.areaId, - name: formObject.areaName, - title: formObject.areaName - } - ], - onClose: function() { - var selectNodes = top.dialog.dialogTreeData.selectedNodes; - if(typeof(selectNodes) != 'undefined' && selectNodes != null) { - if(selectNodes.length > 0) { - var selectedNode = selectNodes[0]; - $('#areaId').val(selectedNode.id); - $('#areaName').val(selectedNode.name); - } else { - $('#areaId').val(); - $('#areaName').val(); - } - } - } - }); - }); }); diff --git a/src/main/resources/static/route/community/update.html b/src/main/resources/static/route/community/update.html index ea7be6c..45b5e20 100755 --- a/src/main/resources/static/route/community/update.html +++ b/src/main/resources/static/route/community/update.html @@ -34,6 +34,12 @@
    +
    + +
    + +
    +
    @@ -119,41 +125,6 @@ return false; }); - /*// 点击志愿者选择输入框,弹出层方法 - $(document).on('click', '#areaName', function() { - top.dialog.tree({ - title: '选择地区', - apiUri: 'api/dict/listztreedict', - width: '200px', - height: '400px', - defaultParams: {id: '9d179f05-3ea0-48f7-853c-d3b7124b791c'}, - selectedNodes: [ - { - id: $('#areaId').val(), - name: $('#areaName').val(), - title: $('#areaName').val() - } - ], - onClose: function() { - var selectNodes = top.dialog.dialogTreeData.selectedNodes; - if(typeof(selectNodes) != 'undefined' && selectNodes != null) { - if(selectNodes.length > 0) { - var selectedNode = selectNodes[0]; - formObject.areaId = selectedNode.id; - formObject.areaName = selectedNode.name; - $('#areaId').val(selectedNode.id); - $('#areaName').val(selectedNode.name); - } else { - formObject.areaId = null; - formObject.areaName = null; - $('#areaId').val(selectedNode.id); - $('#areaName').val(selectedNode.name); - } - } - } - }); - });*/ - $('.close').on('click', function() { closeBox(); }); diff --git a/src/main/resources/static/route/dict/list.html b/src/main/resources/static/route/dict/list.html index 2353b64..009022c 100755 --- a/src/main/resources/static/route/dict/list.html +++ b/src/main/resources/static/route/dict/list.html @@ -82,6 +82,17 @@ {field:'dictSummary', width:160, title: '字典说明', align:'center',}, {field:'dictCode', width:100, title: '字典编码', align:'center',}, {field:'dictOrder', width:100, title: '排序', align:'center',}, + {field:'isHide', width:100, title: '是否隐藏', align:'center', + templet: function(row) { + if(row.isHide === 0) { + return '否' + } + if(row.isHide === 1) { + return '是'; + } + return '错误'; + } + }, ] ], page: true, diff --git a/src/main/resources/static/route/dict/save.html b/src/main/resources/static/route/dict/save.html index bcaef44..bc9b79a 100755 --- a/src/main/resources/static/route/dict/save.html +++ b/src/main/resources/static/route/dict/save.html @@ -58,7 +58,13 @@
    - +
    + +
    + + +
    +
    - +
    + +
    + + +
    +