From 7feb7ef3c8c4e86e0598c6c8a4eef50e17ce4fbc Mon Sep 17 00:00:00 2001 From: ly19960718 <1622779752@qq.com> Date: Sat, 1 May 2021 10:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/institution/InstitutionApi.java | 112 +++++++++++++++++ .../service/organization/OrganizationApi.java | 117 ++++++++++++++++++ module-institution-management/pom.xml | 3 + .../institution/IInstitutionService.java | 0 .../impl/InstitutionServiceImpl.java | 4 +- .../resources/templates/institution/list.html | 39 +++--- .../resources/templates/institution/save.html | 22 ++-- .../templates/institution/update.html | 30 +++-- .../organization/OrganizationController.java | 3 +- .../OrganizationRouteController.java | 6 - .../organization/IOrganizationService.java | 0 .../impl/OrganizationServiceImpl.java | 9 +- .../templates/organization/save.html | 4 +- .../templates/organization/update.html | 4 +- .../pojo/vos/institution/InstitutionVO.java | 1 - .../pojo/vos/organization/OrganizationVO.java | 1 - 16 files changed, 293 insertions(+), 62 deletions(-) create mode 100644 interface-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/InstitutionApi.java create mode 100644 interface-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/OrganizationApi.java rename {interface-institution-management => module-institution-management}/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/IInstitutionService.java (100%) rename {interface-organization-management => module-organization-management}/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/IOrganizationService.java (100%) diff --git a/interface-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/InstitutionApi.java b/interface-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/InstitutionApi.java new file mode 100644 index 0000000..cf613ef --- /dev/null +++ b/interface-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/InstitutionApi.java @@ -0,0 +1,112 @@ +package cn.com.tenlion.institutionmanagement.service.institution; + +import cn.com.tenlion.institutionmanagement.pojo.bos.institution.InstitutionBO; +import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO; +import cn.com.tenlion.institutionmanagement.pojo.pos.institution.InstitutionPO; +import cn.com.tenlion.institutionmanagement.pojo.vos.institution.InstitutionVO; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; + + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IInstitutionService + * @Description: 机构管理 + * @Author: CodeFactory + * @Date: 2021-04-28 17:58:49 + * @Version: 3.0 + **/ +public interface InstitutionApi { + + + /** + * 机构管理详情 + * + * @param params 参数Map + * @return + */ + InstitutionDTO get(Map params); + + /** + * 机构管理详情 + * + * @param institutionId + * @return + */ + InstitutionDTO get(String institutionId); + + /** + * 机构管理详情 + * + * @param params 参数Map + * @return + */ + InstitutionBO getBO(Map params); + + /** + * 机构管理详情 + * + * @param institutionId + * @return + */ + InstitutionBO getBO(String institutionId); + + /** + * 机构管理详情 + * + * @param params 参数Map + * @return + */ + InstitutionPO getPO(Map params); + + /** + * 机构管理详情 + * + * @param institutionId + * @return + */ + InstitutionPO getPO(String institutionId); + + /** + * 机构管理列表 + * + * @param params + * @return + */ + List list(Map params); + + /** + * 机构管理列表 + * + * @param params + * @return + */ + List listBO(Map params); + + /** + * 机构管理列表 + * + * @param params + * @return + */ + List listPO(Map params); + + /** + * 机构管理分页列表 + * + * @param page + * @return + */ + SuccessResultList> listPage(ListPage page); + + /** + * 机构管理统计 + * + * @param params + * @return + */ + Integer count(Map params); + +} \ No newline at end of file diff --git a/interface-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/OrganizationApi.java b/interface-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/OrganizationApi.java new file mode 100644 index 0000000..98a406c --- /dev/null +++ b/interface-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/OrganizationApi.java @@ -0,0 +1,117 @@ +package cn.com.tenlion.organizationmanagement.service.organization; + +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; +import cn.com.tenlion.organizationmanagement.pojo.dtos.organization.OrganizationDTO; +import cn.com.tenlion.organizationmanagement.pojo.vos.organization.OrganizationVO; +import cn.com.tenlion.organizationmanagement.pojo.bos.organization.OrganizationBO; +import cn.com.tenlion.organizationmanagement.pojo.pos.organization.OrganizationPO; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IOrganizationService + * @Description: 组织管理 + * @Author: CodeFactory + * @Date: 2021-04-28 11:06:42 + * @Version: 3.0 + **/ +public interface OrganizationApi { + + + + + + + + + /** + * 组织管理详情 + * + * @param params 参数Map + * @return + */ + OrganizationDTO get(Map params); + + /** + * 组织管理详情 + * + * @param organizationId + * @return + */ + OrganizationDTO get(String organizationId); + + /** + * 组织管理详情 + * + * @param params 参数Map + * @return + */ + OrganizationBO getBO(Map params); + + /** + * 组织管理详情 + * + * @param organizationId + * @return + */ + OrganizationBO getBO(String organizationId); + + /** + * 组织管理详情 + * + * @param params 参数Map + * @return + */ + OrganizationPO getPO(Map params); + + /** + * 组织管理详情 + * + * @param organizationId + * @return + */ + OrganizationPO getPO(String organizationId); + + /** + * 组织管理列表 + * + * @param params + * @return + */ + List list(Map params); + + /** + * 组织管理列表 + * + * @param params + * @return + */ + List listBO(Map params); + + /** + * 组织管理列表 + * + * @param params + * @return + */ + List listPO(Map params); + + /** + * 组织管理分页列表 + * + * @param page + * @return + */ + SuccessResultList> listPage(ListPage page); + + /** + * 组织管理统计 + * + * @param params + * @return + */ + Integer count(Map params); + +} \ No newline at end of file diff --git a/module-institution-management/pom.xml b/module-institution-management/pom.xml index a3b6b01..44c1e2e 100644 --- a/module-institution-management/pom.xml +++ b/module-institution-management/pom.xml @@ -18,6 +18,7 @@ interface-institution-management 1.0-SNAPSHOT + ink.wgink module-dictionary @@ -25,6 +26,8 @@ compile + + diff --git a/interface-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/IInstitutionService.java b/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/IInstitutionService.java similarity index 100% rename from interface-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/IInstitutionService.java rename to module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/IInstitutionService.java diff --git a/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/impl/InstitutionServiceImpl.java b/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/impl/InstitutionServiceImpl.java index 11e55af..c80b296 100644 --- a/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/impl/InstitutionServiceImpl.java +++ b/module-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/service/institution/impl/InstitutionServiceImpl.java @@ -6,9 +6,9 @@ import cn.com.tenlion.institutionmanagement.pojo.dtos.institution.InstitutionDTO import cn.com.tenlion.institutionmanagement.pojo.pos.institution.InstitutionPO; import cn.com.tenlion.institutionmanagement.pojo.vos.institution.InstitutionVO; import cn.com.tenlion.institutionmanagement.service.institution.IInstitutionService; +import cn.com.tenlion.institutionmanagement.service.institution.InstitutionApi; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.pojo.ListPage; -import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.map.HashMapUtil; import ink.wgink.util.UUIDUtil; @@ -29,7 +29,7 @@ import java.util.*; * @Version: 3.0 **/ @Service -public class InstitutionServiceImpl extends DefaultBaseService implements IInstitutionService { +public class InstitutionServiceImpl extends DefaultBaseService implements IInstitutionService,InstitutionApi { @Autowired private IInstitutionDao institutionDao; diff --git a/module-institution-management/src/main/resources/templates/institution/list.html b/module-institution-management/src/main/resources/templates/institution/list.html index eb960f3..e9be5b1 100644 --- a/module-institution-management/src/main/resources/templates/institution/list.html +++ b/module-institution-management/src/main/resources/templates/institution/list.html @@ -116,24 +116,6 @@ return rowData; } }, - {field: 'institutionDesc', width: 180, title: '机构描述', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, - {field: 'institutionAddress', width: 350, title: '机构详情地址', align:'center', - templet: function(row) { - var rowData = row[this.field]; - if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { - return '-'; - } - return rowData; - } - }, {field: 'institutionFoundingTime', width: 180, title: '机构成立时间', align:'center', templet: function(row) { var rowData = row[this.field]; @@ -152,7 +134,7 @@ return rowData; } }, - {field: 'institutionContact', width: 180, title: '机构联系方式', align:'center', + {field: 'institutionContact', width: 250, title: '机构联系方式', align:'center', templet: function(row) { var rowData = row[this.field]; if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { @@ -161,6 +143,25 @@ return rowData; } }, + {field: 'institutionAddress', width: 350, title: '机构详情地址', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, + {field: 'institutionDesc', width: 180, title: '机构描述', align:'center', + templet: function(row) { + var rowData = row[this.field]; + if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { + return '-'; + } + return rowData; + } + }, + ] ], page: true, diff --git a/module-institution-management/src/main/resources/templates/institution/save.html b/module-institution-management/src/main/resources/templates/institution/save.html index 2bf6464..4a895ce 100644 --- a/module-institution-management/src/main/resources/templates/institution/save.html +++ b/module-institution-management/src/main/resources/templates/institution/save.html @@ -39,7 +39,7 @@
- +
@@ -81,7 +81,7 @@
- +
@@ -110,7 +110,7 @@
@@ -120,12 +120,12 @@
- +
@@ -167,7 +167,7 @@ var wangEditor = window.wangEditor; var wangEditorObj = {}; var viewerObj = {}; - var dictId = 'cce46439-d5de-4687-8a9b-cb22817daad5'; + var dictId = '0'; function closeBox() { parent.layer.close(parent.layer.getFrameIndex(window.name)); @@ -361,7 +361,7 @@ //c初始化数据字典 function initDataDict(dictId,tabId){ - top.restAjax.get(top.restAjax.path("api/data/listbyparentid/{dataParentId}",[dictId]),{},null,function (code,data,args) { + top.restAjax.get(top.restAjax.path("api/area/listallbyparentid/{areaParentId}",[dictId]),{},null,function (code,data,args) { $("#"+tabId).empty(); var html = ''; if ('institutionRegionProvince' === tabId){ @@ -371,17 +371,17 @@ html += ''; } if ('institutionRegionArea' === tabId){ - html += ''; + html += ''; } if ('institutionRegionVillage' === tabId){ - html += ''; + html += ''; } if ('institutionRegionStreet' === tabId){ - html += ''; + html += ''; } $.each(data, function (index, item) { - html += ''; + html += ''; }); $("#"+tabId).append(html); form.render('select'); diff --git a/module-institution-management/src/main/resources/templates/institution/update.html b/module-institution-management/src/main/resources/templates/institution/update.html index 3e1f3ee..a1f98ca 100644 --- a/module-institution-management/src/main/resources/templates/institution/update.html +++ b/module-institution-management/src/main/resources/templates/institution/update.html @@ -39,7 +39,7 @@
- +
@@ -81,7 +81,7 @@
- +
@@ -110,7 +110,7 @@
@@ -120,12 +120,12 @@
- +
@@ -165,7 +165,7 @@ var laytpl = layui.laytpl; var laydate = layui.laydate; var institutionId = top.restAjax.params(window.location.href).institutionId; - var dictId = 'cce46439-d5de-4687-8a9b-cb22817daad5'; + var dictId = '0'; var wangEditor = window.wangEditor; var wangEditorObj = {}; @@ -352,6 +352,10 @@ //初始化百度地图 function initMap(longitude, latitude) { + if (longitude == '' || latitude == ''){ + longitude = '109.85017859252311'; + latitude = '40.66017700460503'; + } map = new BMap.Map("mapContainer", {enableMapClick: false,}); var point = new BMap.Point(longitude, latitude); map.centerAndZoom(point, 13); @@ -388,7 +392,7 @@ if(dictId == null || dictId == ''){ return; } - top.restAjax.get(top.restAjax.path("api/data/listbyparentid/{dataParentId}",[dictId]),{},null,function (code,data,args) { + top.restAjax.get(top.restAjax.path("api/area/listallbyparentid/{areaParentId}",[dictId]),{},null,function (code,data,args) { $("#"+tabId).empty(); var html = ''; if ('institutionRegionProvince' === tabId){ @@ -398,20 +402,20 @@ html += ''; } if ('institutionRegionArea' === tabId){ - html += ''; + html += ''; } if ('institutionRegionVillage' === tabId){ - html += ''; + html += ''; } if ('institutionRegionStreet' === tabId){ - html += ''; + html += ''; } $.each(data, function (index, item) { - if(selectVelue == item.dataId){ - html += ''; + if(selectVelue == item.areaId){ + html += ''; }else{ - html += ''; + html += ''; } }); $("#"+tabId).append(html); diff --git a/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/controller/api/organization/OrganizationController.java b/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/controller/api/organization/OrganizationController.java index 178722b..ef9efcb 100644 --- a/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/controller/api/organization/OrganizationController.java +++ b/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/controller/api/organization/OrganizationController.java @@ -1,5 +1,6 @@ package cn.com.tenlion.organizationmanagement.controller.api.organization; +import cn.com.tenlion.organizationmanagement.service.organization.IOrganizationService; import ink.wgink.annotation.CheckRequestBodyAnnotation; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.interfaces.consts.ISystemConstant; @@ -10,7 +11,7 @@ import ink.wgink.pojo.result.SuccessResultData; import ink.wgink.pojo.result.SuccessResultList; import cn.com.tenlion.organizationmanagement.pojo.dtos.organization.OrganizationDTO; import cn.com.tenlion.organizationmanagement.pojo.vos.organization.OrganizationVO; -import cn.com.tenlion.organizationmanagement.service.organization.IOrganizationService; +import cn.com.tenlion.organizationmanagement.service.organization.OrganizationApi; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; diff --git a/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/controller/route/organization/OrganizationRouteController.java b/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/controller/route/organization/OrganizationRouteController.java index 476bf91..0ffd199 100644 --- a/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/controller/route/organization/OrganizationRouteController.java +++ b/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/controller/route/organization/OrganizationRouteController.java @@ -2,16 +2,10 @@ package cn.com.tenlion.organizationmanagement.controller.route.organization; import ink.wgink.common.base.DefaultBaseController; import ink.wgink.interfaces.consts.ISystemConstant; -import cn.com.tenlion.organizationmanagement.service.organization.IOrganizationService; import io.swagger.annotations.*; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; -import java.util.Arrays; -import java.util.List; -import java.util.Map; - /** * @ClassName: OrganizationController * @Description: 组织管理 diff --git a/interface-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/IOrganizationService.java b/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/IOrganizationService.java similarity index 100% rename from interface-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/IOrganizationService.java rename to module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/IOrganizationService.java diff --git a/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/impl/OrganizationServiceImpl.java b/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/impl/OrganizationServiceImpl.java index fbecee3..3cba978 100644 --- a/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/impl/OrganizationServiceImpl.java +++ b/module-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/service/organization/impl/OrganizationServiceImpl.java @@ -1,17 +1,18 @@ package cn.com.tenlion.organizationmanagement.service.organization.impl; +import cn.com.tenlion.organizationmanagement.dao.organization.IOrganizationDao; +import cn.com.tenlion.organizationmanagement.service.organization.IOrganizationService; import ink.wgink.common.base.DefaultBaseService; import ink.wgink.pojo.ListPage; -import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.util.map.HashMapUtil; import ink.wgink.util.UUIDUtil; -import cn.com.tenlion.organizationmanagement.dao.organization.IOrganizationDao; + import cn.com.tenlion.organizationmanagement.pojo.dtos.organization.OrganizationDTO; import cn.com.tenlion.organizationmanagement.pojo.vos.organization.OrganizationVO; import cn.com.tenlion.organizationmanagement.pojo.bos.organization.OrganizationBO; import cn.com.tenlion.organizationmanagement.pojo.pos.organization.OrganizationPO; -import cn.com.tenlion.organizationmanagement.service.organization.IOrganizationService; +import cn.com.tenlion.organizationmanagement.service.organization.OrganizationApi; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; @@ -30,7 +31,7 @@ import java.util.*; **/ @Primary @Service -public class OrganizationServiceImpl extends DefaultBaseService implements IOrganizationService { +public class OrganizationServiceImpl extends DefaultBaseService implements IOrganizationService,OrganizationApi { @Autowired private IOrganizationDao organizationDao; diff --git a/module-organization-management/src/main/resources/templates/organization/save.html b/module-organization-management/src/main/resources/templates/organization/save.html index 662c13a..4edd1c6 100644 --- a/module-organization-management/src/main/resources/templates/organization/save.html +++ b/module-organization-management/src/main/resources/templates/organization/save.html @@ -39,13 +39,13 @@
- +
- +
diff --git a/module-organization-management/src/main/resources/templates/organization/update.html b/module-organization-management/src/main/resources/templates/organization/update.html index 1fce0ac..163dc52 100644 --- a/module-organization-management/src/main/resources/templates/organization/update.html +++ b/module-organization-management/src/main/resources/templates/organization/update.html @@ -39,13 +39,13 @@
- +
- +
diff --git a/pojo-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/pojo/vos/institution/InstitutionVO.java b/pojo-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/pojo/vos/institution/InstitutionVO.java index cd0cea3..5d0e4d1 100644 --- a/pojo-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/pojo/vos/institution/InstitutionVO.java +++ b/pojo-institution-management/src/main/java/cn/com/tenlion/institutionmanagement/pojo/vos/institution/InstitutionVO.java @@ -29,7 +29,6 @@ public class InstitutionVO { @ApiModelProperty(name = "institutionY", value = "机构纬度") private String institutionY; @ApiModelProperty(name = "institutionFoundingTime", value = "机构成立时间") - @CheckEmptyAnnotation(name = "机构成立时间", verifyType = "datetime") private String institutionFoundingTime; @ApiModelProperty(name = "institutionPrincipal", value = "机构负责人") private String institutionPrincipal; diff --git a/pojo-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/pojo/vos/organization/OrganizationVO.java b/pojo-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/pojo/vos/organization/OrganizationVO.java index 679044c..fc7ed06 100644 --- a/pojo-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/pojo/vos/organization/OrganizationVO.java +++ b/pojo-organization-management/src/main/java/cn/com/tenlion/organizationmanagement/pojo/vos/organization/OrganizationVO.java @@ -19,7 +19,6 @@ public class OrganizationVO { @ApiModelProperty(name = "organizationName", value = "组织名称") private String organizationName; @ApiModelProperty(name = "organizationUserNum", value = "组织人员数量") - @CheckNumberAnnotation(name = "组织人员数量") private Integer organizationUserNum; @ApiModelProperty(name = "organizationPrincipal", value = "组织负责人") private String organizationPrincipal;