Browse Source

Merge branches 'dev' and 'dev_govorg' of http://git.elinkit.com.cn:7070/r/epmet-cloud into dev_govorg

master
yinzuomei 5 years ago
parent
commit
db83b28be0
  1. 6
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerAgencyDTO.java
  2. 4
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffAgencyDTO.java
  3. 13
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/OrgTreeNode.java
  4. 40
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java
  5. 40
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffAgencyController.java
  6. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java
  7. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java
  8. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerAgencyEntity.java
  9. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffAgencyEntity.java
  10. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerAgencyExcel.java
  11. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffAgencyExcel.java
  12. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerAgencyRedis.java
  13. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffAgencyRedis.java
  14. 24
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java
  15. 24
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffAgencyService.java
  16. 46
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java
  17. 46
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffAgencyServiceImpl.java
  18. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml
  19. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml

6
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerOrganizationDTO.java → 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 * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Data @Data
public class CustomerOrganizationDTO implements Serializable { public class CustomerAgencyDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -70,7 +70,7 @@ public class CustomerOrganizationDTO implements Serializable {
市级: city 市级: city
省级:province 机关级别社区级community街道:street,区县级: district,市级: city省级:province 省级:province 机关级别社区级community街道:street,区县级: district,市级: city省级:province
*/ */
private Integer level; private String level;
/** /**
* 地区编码 * 地区编码

4
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/CustomerStaffOrganizationDTO.java → 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 * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Data @Data
public class CustomerStaffOrganizationDTO implements Serializable { public class CustomerStaffAgencyDTO implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

13
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<OrgTreeNode> subOrgs;
}

40
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerOrganizationController.java → 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.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.CustomerOrganizationDTO; import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.excel.CustomerOrganizationExcel; import com.epmet.excel.CustomerAgencyExcel;
import com.epmet.service.CustomerOrganizationService; import com.epmet.service.CustomerAgencyService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -37,43 +37,43 @@ import java.util.Map;
/** /**
* 组织机构表 * 机关单位信息表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@RestController @RestController
@RequestMapping("customerorganization") @RequestMapping("customeragency")
public class CustomerOrganizationController { public class CustomerAgencyController {
@Autowired @Autowired
private CustomerOrganizationService customerOrganizationService; private CustomerAgencyService customerAgencyService;
@GetMapping("page") @GetMapping("page")
public Result<PageData<CustomerOrganizationDTO>> page(@RequestParam Map<String, Object> params){ public Result<PageData<CustomerAgencyDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerOrganizationDTO> page = customerOrganizationService.page(params); PageData<CustomerAgencyDTO> page = customerAgencyService.page(params);
return new Result<PageData<CustomerOrganizationDTO>>().ok(page); return new Result<PageData<CustomerAgencyDTO>>().ok(page);
} }
@GetMapping("{id}") @GetMapping("{id}")
public Result<CustomerOrganizationDTO> get(@PathVariable("id") String id){ public Result<CustomerAgencyDTO> get(@PathVariable("id") String id){
CustomerOrganizationDTO data = customerOrganizationService.get(id); CustomerAgencyDTO data = customerAgencyService.get(id);
return new Result<CustomerOrganizationDTO>().ok(data); return new Result<CustomerAgencyDTO>().ok(data);
} }
@PostMapping @PostMapping
public Result save(@RequestBody CustomerOrganizationDTO dto){ public Result save(@RequestBody CustomerAgencyDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
customerOrganizationService.save(dto); customerAgencyService.save(dto);
return new Result(); return new Result();
} }
@PutMapping @PutMapping
public Result update(@RequestBody CustomerOrganizationDTO dto){ public Result update(@RequestBody CustomerAgencyDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
customerOrganizationService.update(dto); customerAgencyService.update(dto);
return new Result(); return new Result();
} }
@ -81,14 +81,14 @@ public class CustomerOrganizationController {
public Result delete(@RequestBody String[] ids){ public Result delete(@RequestBody String[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
customerOrganizationService.delete(ids); customerAgencyService.delete(ids);
return new Result(); return new Result();
} }
@GetMapping("export") @GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<CustomerOrganizationDTO> list = customerOrganizationService.list(params); List<CustomerAgencyDTO> list = customerAgencyService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomerOrganizationExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, CustomerAgencyExcel.class);
} }
} }

40
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerStaffOrganizationController.java → 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.AddGroup;
import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.commons.tools.validator.group.UpdateGroup;
import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.DefaultGroup;
import com.epmet.dto.CustomerStaffOrganizationDTO; import com.epmet.dto.CustomerStaffAgencyDTO;
import com.epmet.excel.CustomerStaffOrganizationExcel; import com.epmet.excel.CustomerStaffAgencyExcel;
import com.epmet.service.CustomerStaffOrganizationService; import com.epmet.service.CustomerStaffAgencyService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@ -37,43 +37,43 @@ import java.util.Map;
/** /**
* 组织人员关系表 * 人员-机关单位关系表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@RestController @RestController
@RequestMapping("customerstafforganization") @RequestMapping("customerstaffagency")
public class CustomerStaffOrganizationController { public class CustomerStaffAgencyController {
@Autowired @Autowired
private CustomerStaffOrganizationService customerStaffOrganizationService; private CustomerStaffAgencyService customerStaffAgencyService;
@GetMapping("page") @GetMapping("page")
public Result<PageData<CustomerStaffOrganizationDTO>> page(@RequestParam Map<String, Object> params){ public Result<PageData<CustomerStaffAgencyDTO>> page(@RequestParam Map<String, Object> params){
PageData<CustomerStaffOrganizationDTO> page = customerStaffOrganizationService.page(params); PageData<CustomerStaffAgencyDTO> page = customerStaffAgencyService.page(params);
return new Result<PageData<CustomerStaffOrganizationDTO>>().ok(page); return new Result<PageData<CustomerStaffAgencyDTO>>().ok(page);
} }
@GetMapping("{id}") @GetMapping("{id}")
public Result<CustomerStaffOrganizationDTO> get(@PathVariable("id") String id){ public Result<CustomerStaffAgencyDTO> get(@PathVariable("id") String id){
CustomerStaffOrganizationDTO data = customerStaffOrganizationService.get(id); CustomerStaffAgencyDTO data = customerStaffAgencyService.get(id);
return new Result<CustomerStaffOrganizationDTO>().ok(data); return new Result<CustomerStaffAgencyDTO>().ok(data);
} }
@PostMapping @PostMapping
public Result save(@RequestBody CustomerStaffOrganizationDTO dto){ public Result save(@RequestBody CustomerStaffAgencyDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
customerStaffOrganizationService.save(dto); customerStaffAgencyService.save(dto);
return new Result(); return new Result();
} }
@PutMapping @PutMapping
public Result update(@RequestBody CustomerStaffOrganizationDTO dto){ public Result update(@RequestBody CustomerStaffAgencyDTO dto){
//效验数据 //效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
customerStaffOrganizationService.update(dto); customerStaffAgencyService.update(dto);
return new Result(); return new Result();
} }
@ -81,14 +81,14 @@ public class CustomerStaffOrganizationController {
public Result delete(@RequestBody String[] ids){ public Result delete(@RequestBody String[] ids){
//效验数据 //效验数据
AssertUtils.isArrayEmpty(ids, "id"); AssertUtils.isArrayEmpty(ids, "id");
customerStaffOrganizationService.delete(ids); customerStaffAgencyService.delete(ids);
return new Result(); return new Result();
} }
@GetMapping("export") @GetMapping("export")
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<CustomerStaffOrganizationDTO> list = customerStaffOrganizationService.list(params); List<CustomerStaffAgencyDTO> list = customerStaffAgencyService.list(params);
ExcelUtils.exportExcelToTarget(response, null, list, CustomerStaffOrganizationExcel.class); ExcelUtils.exportExcelToTarget(response, null, list, CustomerStaffAgencyExcel.class);
} }
} }

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerOrganizationDao.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java

@ -18,16 +18,16 @@
package com.epmet.dao; package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.CustomerOrganizationEntity; import com.epmet.entity.CustomerAgencyEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
* 组织机构表 * 机关单位信息表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Mapper @Mapper
public interface CustomerOrganizationDao extends BaseDao<CustomerOrganizationEntity> { public interface CustomerAgencyDao extends BaseDao<CustomerAgencyEntity> {
} }

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffOrganizationDao.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerStaffAgencyDao.java

@ -18,16 +18,16 @@
package com.epmet.dao; package com.epmet.dao;
import com.epmet.commons.mybatis.dao.BaseDao; import com.epmet.commons.mybatis.dao.BaseDao;
import com.epmet.entity.CustomerStaffOrganizationEntity; import com.epmet.entity.CustomerStaffAgencyEntity;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
/** /**
* 组织人员关系表 * 人员-机关单位关系表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Mapper @Mapper
public interface CustomerStaffOrganizationDao extends BaseDao<CustomerStaffOrganizationEntity> { public interface CustomerStaffAgencyDao extends BaseDao<CustomerStaffAgencyEntity> {
} }

8
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerOrganizationEntity.java → 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; import java.util.Date;
/** /**
* 组织机构表 * 机关单位信息表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Data @Data
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper=false)
@TableName("customer_organization") @TableName("customer_agency")
public class CustomerOrganizationEntity extends BaseEpmetEntity { public class CustomerAgencyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ -70,7 +70,7 @@ public class CustomerOrganizationEntity extends BaseEpmetEntity {
市级: city 市级: city
省级:province 机关级别社区级community街道:street,区县级: district,市级: city省级:province 省级:province 机关级别社区级community街道:street,区县级: district,市级: city省级:province
*/ */
private Integer level; private String level;
/** /**
* 地区编码 * 地区编码

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/entity/CustomerStaffOrganizationEntity.java → 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; import java.util.Date;
/** /**
* 组织人员关系表 * 人员-机关单位关系表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Data @Data
@EqualsAndHashCode(callSuper=false) @EqualsAndHashCode(callSuper=false)
@TableName("customer_staff_organization") @TableName("customer_staff_agency")
public class CustomerStaffOrganizationEntity extends BaseEpmetEntity { public class CustomerStaffAgencyEntity extends BaseEpmetEntity {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

6
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerOrganizationExcel.java → 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; import java.util.Date;
/** /**
* 组织机构表 * 机关单位信息表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Data @Data
public class CustomerOrganizationExcel { public class CustomerAgencyExcel {
@Excel(name = "ID") @Excel(name = "ID")
private String id; private String id;
@ -50,7 +50,7 @@ public class CustomerOrganizationExcel {
private String organizationName; private String organizationName;
@Excel(name = "机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province)") @Excel(name = "机关级别(社区级:community, 乡(镇、街道)级:street, 区县级: district, 市级: city 省级:province) 机关级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province)")
private Integer level; private String level;
@Excel(name = "地区编码") @Excel(name = "地区编码")
private Integer areaCode; private Integer areaCode;

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/excel/CustomerStaffOrganizationExcel.java → 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; import java.util.Date;
/** /**
* 组织人员关系表 * 人员-机关单位关系表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Data @Data
public class CustomerStaffOrganizationExcel { public class CustomerStaffAgencyExcel {
@Excel(name = "ID") @Excel(name = "ID")
private String id; private String id;

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerOrganizationRedis.java → 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; import org.springframework.stereotype.Component;
/** /**
* 组织机构表 * 机关单位信息表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Component @Component
public class CustomerOrganizationRedis { public class CustomerAgencyRedis {
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/redis/CustomerStaffOrganizationRedis.java → 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; import org.springframework.stereotype.Component;
/** /**
* 组织人员关系表 * 人员-机关单位关系表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Component @Component
public class CustomerStaffOrganizationRedis { public class CustomerStaffAgencyRedis {
@Autowired @Autowired
private RedisUtils redisUtils; private RedisUtils redisUtils;

24
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerOrganizationService.java → 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.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CustomerOrganizationDTO; import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.entity.CustomerOrganizationEntity; import com.epmet.entity.CustomerAgencyEntity;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 组织机构表 * 机关单位信息表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
public interface CustomerOrganizationService extends BaseService<CustomerOrganizationEntity> { public interface CustomerAgencyService extends BaseService<CustomerAgencyEntity> {
/** /**
* 默认分页 * 默认分页
* *
* @param params * @param params
* @return PageData<CustomerOrganizationDTO> * @return PageData<CustomerAgencyDTO>
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
PageData<CustomerOrganizationDTO> page(Map<String, Object> params); PageData<CustomerAgencyDTO> page(Map<String, Object> params);
/** /**
* 默认查询 * 默认查询
* *
* @param params * @param params
* @return java.util.List<CustomerOrganizationDTO> * @return java.util.List<CustomerAgencyDTO>
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
List<CustomerOrganizationDTO> list(Map<String, Object> params); List<CustomerAgencyDTO> list(Map<String, Object> params);
/** /**
* 单条查询 * 单条查询
* *
* @param id * @param id
* @return CustomerOrganizationDTO * @return CustomerAgencyDTO
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
CustomerOrganizationDTO get(String id); CustomerAgencyDTO get(String id);
/** /**
* 默认保存 * 默认保存
@ -71,7 +71,7 @@ public interface CustomerOrganizationService extends BaseService<CustomerOrganiz
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
void save(CustomerOrganizationDTO dto); void save(CustomerAgencyDTO dto);
/** /**
* 默认更新 * 默认更新
@ -81,7 +81,7 @@ public interface CustomerOrganizationService extends BaseService<CustomerOrganiz
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
void update(CustomerOrganizationDTO dto); void update(CustomerAgencyDTO dto);
/** /**
* 批量删除 * 批量删除

24
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffOrganizationService.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerStaffAgencyService.java

@ -19,49 +19,49 @@ package com.epmet.service;
import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.mybatis.service.BaseService;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.dto.CustomerStaffOrganizationDTO; import com.epmet.dto.CustomerStaffAgencyDTO;
import com.epmet.entity.CustomerStaffOrganizationEntity; import com.epmet.entity.CustomerStaffAgencyEntity;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 组织人员关系表 * 人员-机关单位关系表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
public interface CustomerStaffOrganizationService extends BaseService<CustomerStaffOrganizationEntity> { public interface CustomerStaffAgencyService extends BaseService<CustomerStaffAgencyEntity> {
/** /**
* 默认分页 * 默认分页
* *
* @param params * @param params
* @return PageData<CustomerStaffOrganizationDTO> * @return PageData<CustomerStaffAgencyDTO>
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
PageData<CustomerStaffOrganizationDTO> page(Map<String, Object> params); PageData<CustomerStaffAgencyDTO> page(Map<String, Object> params);
/** /**
* 默认查询 * 默认查询
* *
* @param params * @param params
* @return java.util.List<CustomerStaffOrganizationDTO> * @return java.util.List<CustomerStaffAgencyDTO>
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
List<CustomerStaffOrganizationDTO> list(Map<String, Object> params); List<CustomerStaffAgencyDTO> list(Map<String, Object> params);
/** /**
* 单条查询 * 单条查询
* *
* @param id * @param id
* @return CustomerStaffOrganizationDTO * @return CustomerStaffAgencyDTO
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
CustomerStaffOrganizationDTO get(String id); CustomerStaffAgencyDTO get(String id);
/** /**
* 默认保存 * 默认保存
@ -71,7 +71,7 @@ public interface CustomerStaffOrganizationService extends BaseService<CustomerSt
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
void save(CustomerStaffOrganizationDTO dto); void save(CustomerStaffAgencyDTO dto);
/** /**
* 默认更新 * 默认更新
@ -81,7 +81,7 @@ public interface CustomerStaffOrganizationService extends BaseService<CustomerSt
* @author generator * @author generator
* @date 2020-04-20 * @date 2020-04-20
*/ */
void update(CustomerStaffOrganizationDTO dto); void update(CustomerStaffAgencyDTO dto);
/** /**
* 批量删除 * 批量删除

46
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerOrganizationServiceImpl.java → epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.CustomerOrganizationDao; import com.epmet.dao.CustomerAgencyDao;
import com.epmet.dto.CustomerOrganizationDTO; import com.epmet.dto.CustomerAgencyDTO;
import com.epmet.entity.CustomerOrganizationEntity; import com.epmet.entity.CustomerAgencyEntity;
import com.epmet.redis.CustomerOrganizationRedis; import com.epmet.redis.CustomerAgencyRedis;
import com.epmet.service.CustomerOrganizationService; import com.epmet.service.CustomerAgencyService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -38,59 +38,59 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 组织机构表 * 机关单位信息表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Service @Service
public class CustomerOrganizationServiceImpl extends BaseServiceImpl<CustomerOrganizationDao, CustomerOrganizationEntity> implements CustomerOrganizationService { public class CustomerAgencyServiceImpl extends BaseServiceImpl<CustomerAgencyDao, CustomerAgencyEntity> implements CustomerAgencyService {
@Autowired @Autowired
private CustomerOrganizationRedis customerOrganizationRedis; private CustomerAgencyRedis customerAgencyRedis;
@Override @Override
public PageData<CustomerOrganizationDTO> page(Map<String, Object> params) { public PageData<CustomerAgencyDTO> page(Map<String, Object> params) {
IPage<CustomerOrganizationEntity> page = baseDao.selectPage( IPage<CustomerAgencyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false), getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params) getWrapper(params)
); );
return getPageData(page, CustomerOrganizationDTO.class); return getPageData(page, CustomerAgencyDTO.class);
} }
@Override @Override
public List<CustomerOrganizationDTO> list(Map<String, Object> params) { public List<CustomerAgencyDTO> list(Map<String, Object> params) {
List<CustomerOrganizationEntity> entityList = baseDao.selectList(getWrapper(params)); List<CustomerAgencyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CustomerOrganizationDTO.class); return ConvertUtils.sourceToTarget(entityList, CustomerAgencyDTO.class);
} }
private QueryWrapper<CustomerOrganizationEntity> getWrapper(Map<String, Object> params){ private QueryWrapper<CustomerAgencyEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP); String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CustomerOrganizationEntity> wrapper = new QueryWrapper<>(); QueryWrapper<CustomerAgencyEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper; return wrapper;
} }
@Override @Override
public CustomerOrganizationDTO get(String id) { public CustomerAgencyDTO get(String id) {
CustomerOrganizationEntity entity = baseDao.selectById(id); CustomerAgencyEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CustomerOrganizationDTO.class); return ConvertUtils.sourceToTarget(entity, CustomerAgencyDTO.class);
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void save(CustomerOrganizationDTO dto) { public void save(CustomerAgencyDTO dto) {
CustomerOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerOrganizationEntity.class); CustomerAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerAgencyEntity.class);
insert(entity); insert(entity);
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void update(CustomerOrganizationDTO dto) { public void update(CustomerAgencyDTO dto) {
CustomerOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerOrganizationEntity.class); CustomerAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerAgencyEntity.class);
updateById(entity); updateById(entity);
} }

46
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerStaffOrganizationServiceImpl.java → 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.page.PageData;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.dao.CustomerStaffOrganizationDao; import com.epmet.dao.CustomerStaffAgencyDao;
import com.epmet.dto.CustomerStaffOrganizationDTO; import com.epmet.dto.CustomerStaffAgencyDTO;
import com.epmet.entity.CustomerStaffOrganizationEntity; import com.epmet.entity.CustomerStaffAgencyEntity;
import com.epmet.redis.CustomerStaffOrganizationRedis; import com.epmet.redis.CustomerStaffAgencyRedis;
import com.epmet.service.CustomerStaffOrganizationService; import com.epmet.service.CustomerStaffAgencyService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -38,59 +38,59 @@ import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 组织人员关系表 * 人员-机关单位关系表
* *
* @author generator generator@elink-cn.com * @author generator generator@elink-cn.com
* @since v1.0.0 2020-04-20 * @since v1.0.0 2020-04-20
*/ */
@Service @Service
public class CustomerStaffOrganizationServiceImpl extends BaseServiceImpl<CustomerStaffOrganizationDao, CustomerStaffOrganizationEntity> implements CustomerStaffOrganizationService { public class CustomerStaffAgencyServiceImpl extends BaseServiceImpl<CustomerStaffAgencyDao, CustomerStaffAgencyEntity> implements CustomerStaffAgencyService {
@Autowired @Autowired
private CustomerStaffOrganizationRedis customerStaffOrganizationRedis; private CustomerStaffAgencyRedis customerStaffAgencyRedis;
@Override @Override
public PageData<CustomerStaffOrganizationDTO> page(Map<String, Object> params) { public PageData<CustomerStaffAgencyDTO> page(Map<String, Object> params) {
IPage<CustomerStaffOrganizationEntity> page = baseDao.selectPage( IPage<CustomerStaffAgencyEntity> page = baseDao.selectPage(
getPage(params, FieldConstant.CREATED_TIME, false), getPage(params, FieldConstant.CREATED_TIME, false),
getWrapper(params) getWrapper(params)
); );
return getPageData(page, CustomerStaffOrganizationDTO.class); return getPageData(page, CustomerStaffAgencyDTO.class);
} }
@Override @Override
public List<CustomerStaffOrganizationDTO> list(Map<String, Object> params) { public List<CustomerStaffAgencyDTO> list(Map<String, Object> params) {
List<CustomerStaffOrganizationEntity> entityList = baseDao.selectList(getWrapper(params)); List<CustomerStaffAgencyEntity> entityList = baseDao.selectList(getWrapper(params));
return ConvertUtils.sourceToTarget(entityList, CustomerStaffOrganizationDTO.class); return ConvertUtils.sourceToTarget(entityList, CustomerStaffAgencyDTO.class);
} }
private QueryWrapper<CustomerStaffOrganizationEntity> getWrapper(Map<String, Object> params){ private QueryWrapper<CustomerStaffAgencyEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get(FieldConstant.ID_HUMP); String id = (String)params.get(FieldConstant.ID_HUMP);
QueryWrapper<CustomerStaffOrganizationEntity> wrapper = new QueryWrapper<>(); QueryWrapper<CustomerStaffAgencyEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id);
return wrapper; return wrapper;
} }
@Override @Override
public CustomerStaffOrganizationDTO get(String id) { public CustomerStaffAgencyDTO get(String id) {
CustomerStaffOrganizationEntity entity = baseDao.selectById(id); CustomerStaffAgencyEntity entity = baseDao.selectById(id);
return ConvertUtils.sourceToTarget(entity, CustomerStaffOrganizationDTO.class); return ConvertUtils.sourceToTarget(entity, CustomerStaffAgencyDTO.class);
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void save(CustomerStaffOrganizationDTO dto) { public void save(CustomerStaffAgencyDTO dto) {
CustomerStaffOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffOrganizationEntity.class); CustomerStaffAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffAgencyEntity.class);
insert(entity); insert(entity);
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void update(CustomerStaffOrganizationDTO dto) { public void update(CustomerStaffAgencyDTO dto) {
CustomerStaffOrganizationEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffOrganizationEntity.class); CustomerStaffAgencyEntity entity = ConvertUtils.sourceToTarget(dto, CustomerStaffAgencyEntity.class);
updateById(entity); updateById(entity);
} }

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerOrganizationDao.xml → epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.CustomerOrganizationDao"> <mapper namespace="com.epmet.dao.CustomerAgencyDao">
<resultMap type="com.epmet.entity.CustomerOrganizationEntity" id="customerOrganizationMap"> <resultMap type="com.epmet.entity.CustomerAgencyEntity" id="customerAgencyMap">
<result property="id" column="ID"/> <result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/> <result property="customerId" column="CUSTOMER_ID"/>
<result property="pid" column="PID"/> <result property="pid" column="PID"/>

4
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffOrganizationDao.xml → epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerStaffAgencyDao.xml

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.epmet.dao.CustomerStaffOrganizationDao"> <mapper namespace="com.epmet.dao.CustomerStaffAgencyDao">
<resultMap type="com.epmet.entity.CustomerStaffOrganizationEntity" id="customerStaffOrganizationMap"> <resultMap type="com.epmet.entity.CustomerStaffAgencyEntity" id="customerStaffAgencyMap">
<result property="id" column="ID"/> <result property="id" column="ID"/>
<result property="customerId" column="CUSTOMER_ID"/> <result property="customerId" column="CUSTOMER_ID"/>
<result property="userId" column="USER_ID"/> <result property="userId" column="USER_ID"/>
Loading…
Cancel
Save