diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerOrganizationDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerAgencyDTO.java similarity index 95% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerOrganizationDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerAgencyDTO.java index 89a5a2f2fa..9523753483 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerOrganizationDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerAgencyDTO.java @@ -23,13 +23,13 @@ import lombok.Data; /** - * 组织机构表 + * 机关单位信息表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Data -public class CustomerOrganizationDTO implements Serializable { +public class CustomerAgencyDTO implements Serializable { private static final long serialVersionUID = 1L; @@ -70,7 +70,7 @@ public class CustomerOrganizationDTO implements Serializable { 市级: city 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) */ - private Integer level; + private String level; /** * 地区编码 diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffOrganizationDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffAgencyDTO.java similarity index 94% rename from epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffOrganizationDTO.java rename to epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffAgencyDTO.java index 4c4abc2f8e..c97e5097a1 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffOrganizationDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffAgencyDTO.java @@ -23,13 +23,13 @@ import lombok.Data; /** - * 组织人员关系表 + * 人员-机关单位关系表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Data -public class CustomerStaffOrganizationDTO implements Serializable { +public class CustomerStaffAgencyDTO implements Serializable { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/OrgTreeNode.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/OrgTreeNode.java new file mode 100644 index 0000000000..064d2173ea --- /dev/null +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/OrgTreeNode.java @@ -0,0 +1,13 @@ +package com.epmet.dto; + +import lombok.Data; + +import java.util.List; + +@Data +public class OrgTreeNode { + private String orgId; + private String orgName; + private String orgType; + private List subOrgs; +} diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerOrganizationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java similarity index 65% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerOrganizationController.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java index c370c04ea3..550cdb1832 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerOrganizationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java @@ -25,9 +25,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.CustomerOrganizationDTO; -import com.epmet.excel.CustomerOrganizationExcel; -import com.epmet.service.CustomerOrganizationService; +import com.epmet.dto.CustomerAgencyDTO; +import com.epmet.excel.CustomerAgencyExcel; +import com.epmet.service.CustomerAgencyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -37,43 +37,43 @@ import java.util.Map; /** - * 组织机构表 + * 机关单位信息表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @RestController -@RequestMapping("customerorganization") -public class CustomerOrganizationController { +@RequestMapping("customeragency") +public class CustomerAgencyController { @Autowired - private CustomerOrganizationService customerOrganizationService; + private CustomerAgencyService customerAgencyService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = customerOrganizationService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = customerAgencyService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - CustomerOrganizationDTO data = customerOrganizationService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + CustomerAgencyDTO data = customerAgencyService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody CustomerOrganizationDTO dto){ + public Result save(@RequestBody CustomerAgencyDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - customerOrganizationService.save(dto); + customerAgencyService.save(dto); return new Result(); } @PutMapping - public Result update(@RequestBody CustomerOrganizationDTO dto){ + public Result update(@RequestBody CustomerAgencyDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - customerOrganizationService.update(dto); + customerAgencyService.update(dto); return new Result(); } @@ -81,14 +81,14 @@ public class CustomerOrganizationController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - customerOrganizationService.delete(ids); + customerAgencyService.delete(ids); return new Result(); } @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = customerOrganizationService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, CustomerOrganizationExcel.class); + List list = customerAgencyService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CustomerAgencyExcel.class); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffOrganizationController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffAgencyController.java similarity index 63% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffOrganizationController.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffAgencyController.java index 9297443b87..58219da027 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffOrganizationController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffAgencyController.java @@ -25,9 +25,9 @@ import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; -import com.epmet.dto.CustomerStaffOrganizationDTO; -import com.epmet.excel.CustomerStaffOrganizationExcel; -import com.epmet.service.CustomerStaffOrganizationService; +import com.epmet.dto.CustomerStaffAgencyDTO; +import com.epmet.excel.CustomerStaffAgencyExcel; +import com.epmet.service.CustomerStaffAgencyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @@ -37,43 +37,43 @@ import java.util.Map; /** - * 组织人员关系表 + * 人员-机关单位关系表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @RestController -@RequestMapping("customerstafforganization") -public class CustomerStaffOrganizationController { +@RequestMapping("customerstaffagency") +public class CustomerStaffAgencyController { @Autowired - private CustomerStaffOrganizationService customerStaffOrganizationService; + private CustomerStaffAgencyService customerStaffAgencyService; @GetMapping("page") - public Result> page(@RequestParam Map params){ - PageData page = customerStaffOrganizationService.page(params); - return new Result>().ok(page); + public Result> page(@RequestParam Map params){ + PageData page = customerStaffAgencyService.page(params); + return new Result>().ok(page); } @GetMapping("{id}") - public Result get(@PathVariable("id") String id){ - CustomerStaffOrganizationDTO data = customerStaffOrganizationService.get(id); - return new Result().ok(data); + public Result get(@PathVariable("id") String id){ + CustomerStaffAgencyDTO data = customerStaffAgencyService.get(id); + return new Result().ok(data); } @PostMapping - public Result save(@RequestBody CustomerStaffOrganizationDTO dto){ + public Result save(@RequestBody CustomerStaffAgencyDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); - customerStaffOrganizationService.save(dto); + customerStaffAgencyService.save(dto); return new Result(); } @PutMapping - public Result update(@RequestBody CustomerStaffOrganizationDTO dto){ + public Result update(@RequestBody CustomerStaffAgencyDTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); - customerStaffOrganizationService.update(dto); + customerStaffAgencyService.update(dto); return new Result(); } @@ -81,14 +81,14 @@ public class CustomerStaffOrganizationController { public Result delete(@RequestBody String[] ids){ //效验数据 AssertUtils.isArrayEmpty(ids, "id"); - customerStaffOrganizationService.delete(ids); + customerStaffAgencyService.delete(ids); return new Result(); } @GetMapping("export") public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { - List list = customerStaffOrganizationService.list(params); - ExcelUtils.exportExcelToTarget(response, null, list, CustomerStaffOrganizationExcel.class); + List list = customerStaffAgencyService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, CustomerStaffAgencyExcel.class); } } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerOrganizationDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java similarity index 85% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerOrganizationDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java index d4f63b08b4..185d2d33a1 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerOrganizationDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java @@ -18,16 +18,16 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.CustomerOrganizationEntity; +import com.epmet.entity.CustomerAgencyEntity; import org.apache.ibatis.annotations.Mapper; /** - * 组织机构表 + * 机关单位信息表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Mapper -public interface CustomerOrganizationDao extends BaseDao { +public interface CustomerAgencyDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffOrganizationDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java similarity index 83% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffOrganizationDao.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java index d51750cbb0..8ac905edcb 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffOrganizationDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java @@ -18,16 +18,16 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; -import com.epmet.entity.CustomerStaffOrganizationEntity; +import com.epmet.entity.CustomerStaffAgencyEntity; import org.apache.ibatis.annotations.Mapper; /** - * 组织人员关系表 + * 人员-机关单位关系表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Mapper -public interface CustomerStaffOrganizationDao extends BaseDao { +public interface CustomerStaffAgencyDao extends BaseDao { } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerOrganizationEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java similarity index 92% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerOrganizationEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java index a9f845f925..b06e833347 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerOrganizationEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java @@ -26,15 +26,15 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 组织机构表 + * 机关单位信息表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("customer_organization") -public class CustomerOrganizationEntity extends BaseEpmetEntity { +@TableName("customer_agency") +public class CustomerAgencyEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; @@ -70,7 +70,7 @@ public class CustomerOrganizationEntity extends BaseEpmetEntity { 市级: city 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) */ - private Integer level; + private String level; /** * 地区编码 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffOrganizationEntity.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffAgencyEntity.java similarity index 90% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffOrganizationEntity.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffAgencyEntity.java index 707ec9544f..9c333137a9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffOrganizationEntity.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffAgencyEntity.java @@ -26,15 +26,15 @@ import lombok.EqualsAndHashCode; import java.util.Date; /** - * 组织人员关系表 + * 人员-机关单位关系表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Data @EqualsAndHashCode(callSuper=false) -@TableName("customer_staff_organization") -public class CustomerStaffOrganizationEntity extends BaseEpmetEntity { +@TableName("customer_staff_agency") +public class CustomerStaffAgencyEntity extends BaseEpmetEntity { private static final long serialVersionUID = 1L; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerOrganizationExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerAgencyExcel.java similarity index 96% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerOrganizationExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerAgencyExcel.java index 8255c59e08..27422f3157 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerOrganizationExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerAgencyExcel.java @@ -23,13 +23,13 @@ import lombok.Data; import java.util.Date; /** - * 组织机构表 + * 机关单位信息表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Data -public class CustomerOrganizationExcel { +public class CustomerAgencyExcel { @Excel(name = "ID") private String id; @@ -50,7 +50,7 @@ public class CustomerOrganizationExcel { private String organizationName; @Excel(name = "机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province)") - private Integer level; + private String level; @Excel(name = "地区编码") private Integer areaCode; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffOrganizationExcel.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffAgencyExcel.java similarity index 95% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffOrganizationExcel.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffAgencyExcel.java index 86fb9daf03..a870073498 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffOrganizationExcel.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffAgencyExcel.java @@ -23,13 +23,13 @@ import lombok.Data; import java.util.Date; /** - * 组织人员关系表 + * 人员-机关单位关系表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Data -public class CustomerStaffOrganizationExcel { +public class CustomerStaffAgencyExcel { @Excel(name = "ID") private String id; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerOrganizationRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java similarity index 95% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerOrganizationRedis.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java index f9d8da03a1..3b8e96c9a2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerOrganizationRedis.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java @@ -22,13 +22,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * 组织机构表 + * 机关单位信息表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Component -public class CustomerOrganizationRedis { +public class CustomerAgencyRedis { @Autowired private RedisUtils redisUtils; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffOrganizationRedis.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffAgencyRedis.java similarity index 94% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffOrganizationRedis.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffAgencyRedis.java index 55a560bc63..fa3f4c59f5 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffOrganizationRedis.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffAgencyRedis.java @@ -22,13 +22,13 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; /** - * 组织人员关系表 + * 人员-机关单位关系表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Component -public class CustomerStaffOrganizationRedis { +public class CustomerStaffAgencyRedis { @Autowired private RedisUtils redisUtils; diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerOrganizationService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java similarity index 73% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerOrganizationService.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java index 847cc4b722..319e26890f 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerOrganizationService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java @@ -19,49 +19,49 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; -import com.epmet.dto.CustomerOrganizationDTO; -import com.epmet.entity.CustomerOrganizationEntity; +import com.epmet.dto.CustomerAgencyDTO; +import com.epmet.entity.CustomerAgencyEntity; import java.util.List; import java.util.Map; /** - * 组织机构表 + * 机关单位信息表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ -public interface CustomerOrganizationService extends BaseService { +public interface CustomerAgencyService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2020-04-20 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2020-04-20 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return CustomerOrganizationDTO + * @return CustomerAgencyDTO * @author generator * @date 2020-04-20 */ - CustomerOrganizationDTO get(String id); + CustomerAgencyDTO get(String id); /** * 默认保存 @@ -71,7 +71,7 @@ public interface CustomerOrganizationService extends BaseService { +public interface CustomerStaffAgencyService extends BaseService { /** * 默认分页 * * @param params - * @return PageData + * @return PageData * @author generator * @date 2020-04-20 */ - PageData page(Map params); + PageData page(Map params); /** * 默认查询 * * @param params - * @return java.util.List + * @return java.util.List * @author generator * @date 2020-04-20 */ - List list(Map params); + List list(Map params); /** * 单条查询 * * @param id - * @return CustomerStaffOrganizationDTO + * @return CustomerStaffAgencyDTO * @author generator * @date 2020-04-20 */ - CustomerStaffOrganizationDTO get(String id); + CustomerStaffAgencyDTO get(String id); /** * 默认保存 @@ -71,7 +71,7 @@ public interface CustomerStaffOrganizationService extends BaseService implements CustomerOrganizationService { +public class CustomerAgencyServiceImpl extends BaseServiceImpl implements CustomerAgencyService { @Autowired - private CustomerOrganizationRedis customerOrganizationRedis; + private CustomerAgencyRedis customerAgencyRedis; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, CustomerOrganizationDTO.class); + return getPageData(page, CustomerAgencyDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, CustomerOrganizationDTO.class); + return ConvertUtils.sourceToTarget(entityList, CustomerAgencyDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public CustomerOrganizationDTO get(String id) { - CustomerOrganizationEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, CustomerOrganizationDTO.class); + public CustomerAgencyDTO get(String id) { + CustomerAgencyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CustomerAgencyDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(CustomerOrganizationDTO dto) { - CustomerOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerOrganizationEntity.class); + public void save(CustomerAgencyDTO dto) { + CustomerAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerAgencyEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(CustomerOrganizationDTO dto) { - CustomerOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerOrganizationEntity.class); + public void update(CustomerAgencyDTO dto) { + CustomerAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerAgencyEntity.class); updateById(entity); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffOrganizationServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java similarity index 58% rename from epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffOrganizationServiceImpl.java rename to epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java index a706d93a95..f1786860da 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffOrganizationServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java @@ -23,11 +23,11 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.constant.FieldConstant; -import com.epmet.dao.CustomerStaffOrganizationDao; -import com.epmet.dto.CustomerStaffOrganizationDTO; -import com.epmet.entity.CustomerStaffOrganizationEntity; -import com.epmet.redis.CustomerStaffOrganizationRedis; -import com.epmet.service.CustomerStaffOrganizationService; +import com.epmet.dao.CustomerStaffAgencyDao; +import com.epmet.dto.CustomerStaffAgencyDTO; +import com.epmet.entity.CustomerStaffAgencyEntity; +import com.epmet.redis.CustomerStaffAgencyRedis; +import com.epmet.service.CustomerStaffAgencyService; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -38,59 +38,59 @@ import java.util.List; import java.util.Map; /** - * 组织人员关系表 + * 人员-机关单位关系表 * * @author generator generator@elink-cn.com * @since v1.0.0 2020-04-20 */ @Service -public class CustomerStaffOrganizationServiceImpl extends BaseServiceImpl implements CustomerStaffOrganizationService { +public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl implements CustomerStaffAgencyService { @Autowired - private CustomerStaffOrganizationRedis customerStaffOrganizationRedis; + private CustomerStaffAgencyRedis customerStaffAgencyRedis; @Override - public PageData page(Map params) { - IPage page = baseDao.selectPage( + public PageData page(Map params) { + IPage page = baseDao.selectPage( getPage(params, FieldConstant.CREATED_TIME, false), getWrapper(params) ); - return getPageData(page, CustomerStaffOrganizationDTO.class); + return getPageData(page, CustomerStaffAgencyDTO.class); } @Override - public List list(Map params) { - List entityList = baseDao.selectList(getWrapper(params)); + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); - return ConvertUtils.sourceToTarget(entityList, CustomerStaffOrganizationDTO.class); + return ConvertUtils.sourceToTarget(entityList, CustomerStaffAgencyDTO.class); } - private QueryWrapper getWrapper(Map params){ + private QueryWrapper getWrapper(Map params){ String id = (String)params.get(FieldConstant.ID_HUMP); - QueryWrapper wrapper = new QueryWrapper<>(); + QueryWrapper wrapper = new QueryWrapper<>(); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); return wrapper; } @Override - public CustomerStaffOrganizationDTO get(String id) { - CustomerStaffOrganizationEntity entity = baseDao.selectById(id); - return ConvertUtils.sourceToTarget(entity, CustomerStaffOrganizationDTO.class); + public CustomerStaffAgencyDTO get(String id) { + CustomerStaffAgencyEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, CustomerStaffAgencyDTO.class); } @Override @Transactional(rollbackFor = Exception.class) - public void save(CustomerStaffOrganizationDTO dto) { - CustomerStaffOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffOrganizationEntity.class); + public void save(CustomerStaffAgencyDTO dto) { + CustomerStaffAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffAgencyEntity.class); insert(entity); } @Override @Transactional(rollbackFor = Exception.class) - public void update(CustomerStaffOrganizationDTO dto) { - CustomerStaffOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffOrganizationEntity.class); + public void update(CustomerStaffAgencyDTO dto) { + CustomerStaffAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffAgencyEntity.class); updateById(entity); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerOrganizationDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml similarity index 86% rename from epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerOrganizationDao.xml rename to epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml index ce9cd564b4..18bb63b7b9 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerOrganizationDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml @@ -1,9 +1,9 @@ - + - + diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffOrganizationDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml similarity index 80% rename from epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffOrganizationDao.xml rename to epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml index b09b2ccbf7..33dbb3e61d 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffOrganizationDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml @@ -1,9 +1,9 @@ - + - +