部门单次查询

master
river 4 years ago
parent 827f6ee24d
commit 480dab6a5b
  1. 95
      .gitignore
  2. 12
      dq-financial-api/src/main/java/com/daqing/financial/crms/CustomerControllerApi.java
  3. 13
      dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java
  4. BIN
      dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/DqFinancialCrmsAuthApplication.class
  5. BIN
      dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/AuthorizationServer.class
  6. BIN
      dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/SecurityConfig.class
  7. BIN
      dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/TokenConfig.class
  8. BIN
      dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/controller/CustomerLoginController.class
  9. BIN
      dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/dao/CustomerLoginDao.class
  10. BIN
      dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/service/CustomerLoginService.class
  11. BIN
      dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/service/impl/CustomerLoginServiceImpl.class
  12. 7
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java
  13. 4
      dq-financial-hrms/pom.xml
  14. 18
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/ResourceServerConfig.java
  15. 11
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java
  16. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java
  17. 7
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java
  18. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java
  19. 4
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java
  20. 25
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java
  21. 5
      dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml
  22. BIN
      dq-framework-common/target/classes/com/daqing/framework/exception/ExceptionCatch.class
  23. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/response/CommonCode.class
  24. BIN
      dq-framework-common/target/classes/com/daqing/framework/model/response/ResponseResult.class
  25. 13
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java
  26. 20
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CustomerEntity.java
  27. 19
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/PersonalCustomerEntity.java
  28. 4
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyTO.java
  29. 17
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java
  30. 3
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalTO.java
  31. 8
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerTO.java
  32. 11
      dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CustomerRequest.java
  33. 4
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DepartmentVO.java
  34. 4
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DeptEntity.java
  35. 2
      dq-govern-gateway/src/main/resources/application.yml

95
.gitignore vendored

@ -1,95 +0,0 @@
### Java template
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/workspace.xml
.idea/tasks.xml
.idea/dictionaries
.idea/vcs.xml
.idea/jsLibraryMappings.xml
# Sensitive or high-churn files:
.idea/dataSources.ids
.idea/dataSources.xml
.idea/dataSources.local.xml
.idea/sqlDataSources.xml
.idea/dynamic.xml
.idea/uiDesigner.xml
# Gradle:
.idea/gradle.xml
.idea/
# Mongo Explorer plugin:
.idea/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
### Windows template
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msm
*.msp
# Windows shortcuts
*.lnk
### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# ignore eclipse files
.project
.classpath
.settings
.metadata
.svn

@ -3,6 +3,7 @@ package com.daqing.financial.crms;
import com.daqing.framework.domain.crms.ext.CustomerCompanyTO; import com.daqing.framework.domain.crms.ext.CustomerCompanyTO;
import com.daqing.framework.domain.crms.ext.CustomerPersonalTO; import com.daqing.framework.domain.crms.ext.CustomerPersonalTO;
import com.daqing.framework.domain.crms.ext.CustomerTO;
import com.daqing.framework.domain.crms.request.CustomerRequest; import com.daqing.framework.domain.crms.request.CustomerRequest;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
@ -10,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
/** /**
* @Author: gongsj. * @Author: gongsj.
@ -23,7 +25,7 @@ public interface CustomerControllerApi {
/** /**
* 列表展示 * 列表展示
*/ */
@ApiOperation(value = "客户信息列表展示", notes = "客户信息列表展示") @ApiOperation(value = "客户信息列表展示", notes = "客户信息列表展示",response = CustomerTO.class)
ResponseResult queryList(Integer page, Integer size, CustomerRequest customerRequest); ResponseResult queryList(Integer page, Integer size, CustomerRequest customerRequest);
/** /**
@ -39,15 +41,15 @@ public interface CustomerControllerApi {
ResponseResult deleteCustomer(Long[] ids); ResponseResult deleteCustomer(Long[] ids);
/** /**
* 插入个人类型客户信息 * 新增个人类型客户信息
*/ */
@ApiOperation(value = "插入个人类型客户信息", notes = "插入个人类型客户信息") @ApiOperation(value = "新增个人类型客户信息", notes = "新增个人类型客户信息")
ResponseResult savePersonal(CustomerPersonalTO customerPersonalTO); ResponseResult savePersonal(CustomerPersonalTO customerPersonalTO);
/** /**
* 插入企业类型客户信息 * 新增企业类型客户信息
*/ */
@ApiOperation(value = "插入企业类型客户信息", notes = "插入企业类型客户信息") @ApiOperation(value = "新增企业类型客户信息", notes = "新增企业类型客户信息")
ResponseResult saveCompany(CustomerCompanyTO customerCompanyTO); ResponseResult saveCompany(CustomerCompanyTO customerCompanyTO);
/** /**

@ -1,5 +1,6 @@
package com.daqing.financial.hrms; package com.daqing.financial.hrms;
import com.daqing.framework.domain.crms.ext.CustomerCompanyVO;
import com.daqing.framework.domain.hrms.DeptEntity; import com.daqing.framework.domain.hrms.DeptEntity;
import com.daqing.framework.domain.hrms.request.DeptAddRequest; import com.daqing.framework.domain.hrms.request.DeptAddRequest;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
@ -42,7 +43,7 @@ public interface DeptControllerApi {
/** /**
* 根据id修改部门信息 * 根据id修改部门信息
*/ */
@ApiOperation(value = "根据id修改部门信息", notes = "根据id修改部门信息") @ApiOperation(value = "根据id修改部门信息", notes = "根据id修改部门信息", response = CustomerCompanyVO.class)
ResponseResult update(DeptEntity dept); ResponseResult update(DeptEntity dept);
/** /**
@ -54,6 +55,12 @@ public interface DeptControllerApi {
/** /**
* 查询所有部门及部门下的员工信息 * 查询所有部门及部门下的员工信息
*/ */
@ApiOperation(value = "查询所有部门及部门下的员工信息", notes = "查询所有部门及部门下的员工信息") /*@ApiOperation(value = "查询所有部门及部门下的员工信息", notes = "查询所有部门及部门下的员工信息")
ResponseResult trees(); ResponseResult trees();*/
/**
* 查询该部门下所有子部门及部门下的的员工
*/
@ApiOperation(value = "查询该部门下所有子部门及部门下的的员工", notes = "查询该部门下所有子部门及部门下的的员工")
ResponseResult children(Long id);
} }

@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import java.util.List; import java.util.List;
import java.util.Objects; import java.util.Objects;
@ -80,14 +81,13 @@ public class CustomerController implements CustomerControllerApi {
else { else {
return new ResponseResult<List<String>>().SUCCESS_DATA(list); return new ResponseResult<List<String>>().SUCCESS_DATA(list);
} }
} }
/** /**
* 保存个人类型客户信息 * 保存个人类型客户信息
*/ */
@PostMapping("/savePersonal") @PostMapping("/savePersonal")
public ResponseResult savePersonal(@RequestBody CustomerPersonalTO customerPersonalTO) { public ResponseResult savePersonal(@RequestBody @Valid CustomerPersonalTO customerPersonalTO) {
boolean result = customerService.saveCustomerPersonal(customerPersonalTO.getCustomerEntity(), customerPersonalTO.getPersonalCustomerEntity()); boolean result = customerService.saveCustomerPersonal(customerPersonalTO.getCustomerEntity(), customerPersonalTO.getPersonalCustomerEntity());
return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL); return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL);
} }
@ -96,8 +96,7 @@ public class CustomerController implements CustomerControllerApi {
* 保存企业类型客户信息 * 保存企业类型客户信息
*/ */
@PostMapping("/saveCompany") @PostMapping("/saveCompany")
@ApiOperation(value = "保存企业类型客户信息", response = CustomerCompanyTO.class) public ResponseResult saveCompany(@RequestBody @Valid CustomerCompanyTO customerCompanyTO) {
public ResponseResult saveCompany(@RequestBody CustomerCompanyTO customerCompanyTO) {
boolean result = customerService.saveCustomerCompany(customerCompanyTO.getCustomerEntity(), customerCompanyTO.getCompanyCustomerEntity()); boolean result = customerService.saveCustomerCompany(customerCompanyTO.getCustomerEntity(), customerCompanyTO.getCompanyCustomerEntity());
return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL); return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL);
} }

@ -62,12 +62,12 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <!-- <dependency>
<groupId>org.springframework.security.oauth</groupId> <groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId> <artifactId>spring-security-oauth2</artifactId>
<version>2.3.5.RELEASE</version> <version>2.3.5.RELEASE</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>-->
</dependencies> </dependencies>
<dependencyManagement> <dependencyManagement>

@ -1,13 +1,18 @@
/*
package com.daqing.financial.hrms.config; package com.daqing.financial.hrms.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer; import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter; import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer; import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
import org.springframework.security.oauth2.provider.token.RemoteTokenServices; import org.springframework.security.oauth2.provider.token.RemoteTokenServices;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
@Configuration @Configuration
@EnableResourceServer @EnableResourceServer
@ -23,13 +28,15 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
@Value("${security.oauth2.authorization.check-token-access}") @Value("${security.oauth2.authorization.check-token-access}")
private String checkTokenEndpointUrl; private String checkTokenEndpointUrl;
/* @Autowired @Autowired
private RedisConnectionFactory redisConnectionFactory;*/ private RedisConnectionFactory redisConnectionFactory;
/* @Bean
@Bean
public TokenStore redisTokenStore (){ public TokenStore redisTokenStore (){
return new RedisTokenStore(redisConnectionFactory); return new RedisTokenStore(redisConnectionFactory);
}*/ }
@Bean @Bean
public RemoteTokenServices tokenService() { public RemoteTokenServices tokenService() {
@ -44,4 +51,5 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
public void configure(ResourceServerSecurityConfigurer resources) throws Exception { public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
resources.tokenServices(tokenService()); resources.tokenServices(tokenService());
} }
} }
*/

@ -100,9 +100,18 @@ public class DeptController implements DeptControllerApi {
/** /**
*所有部门及员工 *所有部门及员工
*/ */
@Override /*@Override
@GetMapping("/trees") @GetMapping("/trees")
public ResponseResult trees() { public ResponseResult trees() {
return new ResponseResult<List<DepartmentVO>>().SUCCESS(deptService.listDepartmentAndEmployeeTree()); return new ResponseResult<List<DepartmentVO>>().SUCCESS(deptService.listDepartmentAndEmployeeTree());
}*/
/**
* 该部门下所有子部门及部门下员工
*/
@Override
@GetMapping("/children")
public ResponseResult children(Long id){
return new ResponseResult<DepartmentVO>().SUCCESS(deptService.getDepartmentAndEmployee(id));
} }
} }

@ -87,7 +87,7 @@ public class EmployeeController implements EmployeeControllerApi {
* @param ids * @param ids
* @return * @return
*/ */
@Override //@Override
@GetMapping("/getEmployeeAndDeptById") @GetMapping("/getEmployeeAndDeptById")
public ResponseResult getEmployeeAndDeptById(@RequestParam("ids") Long[] ids) { public ResponseResult getEmployeeAndDeptById(@RequestParam("ids") Long[] ids) {
List<EmployeeTO> employeeTO = employeeService.getEmployeeAndDeptById(Arrays.asList(ids)); List<EmployeeTO> employeeTO = employeeService.getEmployeeAndDeptById(Arrays.asList(ids));

@ -5,9 +5,6 @@ import com.daqing.framework.domain.hrms.UserEntity;
import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.security.core.Authentication;
import org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationDetails;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Arrays; import java.util.Arrays;
@ -88,7 +85,7 @@ public class UserController {
* @param authentication * @param authentication
* @return * @return
*/ */
@GetMapping(value = "get") /* @GetMapping(value = "get")
@PreAuthorize("hasAnyRole('ROLE_ADMIN')") @PreAuthorize("hasAnyRole('ROLE_ADMIN')")
public Object get(Authentication authentication){ public Object get(Authentication authentication){
//Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); //Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
@ -96,5 +93,5 @@ public class UserController {
OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails)authentication.getDetails(); OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails)authentication.getDetails();
String token = details.getTokenValue(); String token = details.getTokenValue();
return token; return token;
} }*/
} }

@ -25,4 +25,6 @@ public interface DeptDao extends BaseMapper<DeptEntity> {
List<DepartmentVO> listDepartment(); List<DepartmentVO> listDepartment();
List<DepartmentVO> getDepartmentByParentId(Long parentId);
} }

@ -24,8 +24,8 @@ public interface DeptService extends IService<DeptEntity> {
boolean deleteByIds(Long[] ids); boolean deleteByIds(Long[] ids);
List<DepartmentVO> listDepartmentAndEmployeeTree(); /*List<DepartmentVO> listDepartmentAndEmployeeTree();*/
List<DepartmentVO> getDepartmentAndEmployee(Long id); DepartmentVO getDepartmentAndEmployee(Long id);
} }

@ -7,6 +7,7 @@ import com.daqing.financial.hrms.dao.EmployeeDao;
import com.daqing.financial.hrms.service.DeptService; import com.daqing.financial.hrms.service.DeptService;
import com.daqing.framework.domain.hrms.DepartmentVO; import com.daqing.framework.domain.hrms.DepartmentVO;
import com.daqing.framework.domain.hrms.DeptEntity; import com.daqing.framework.domain.hrms.DeptEntity;
import com.daqing.framework.domain.hrms.ext.EmployeeVO;
import com.daqing.framework.domain.hrms.request.DeptAddRequest; import com.daqing.framework.domain.hrms.request.DeptAddRequest;
import com.daqing.framework.domain.hrms.response.HrmsCode; import com.daqing.framework.domain.hrms.response.HrmsCode;
import com.daqing.framework.exception.ExceptionCast; import com.daqing.framework.exception.ExceptionCast;
@ -64,7 +65,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
//实体类 //实体类
DeptEntity deptEntity = new DeptEntity(); DeptEntity deptEntity = new DeptEntity();
//设置id //设置id
deptEntity.setId(SnowflakeIdUtils.getRandomid()); //deptEntity.setId(SnowflakeIdUtils.getRandomid());
//属性拷贝,将上级部门id(如果有)、部门名称设置到实体类 //属性拷贝,将上级部门id(如果有)、部门名称设置到实体类
BeanUtils.copyProperties(deptAddRequest, deptEntity); BeanUtils.copyProperties(deptAddRequest, deptEntity);
//2、判断部门上级id是否为空,为空则此部门是一级部门,否则查询并计算部门层级,并判断部门层级是否大于5级或小于1级 //2、判断部门上级id是否为空,为空则此部门是一级部门,否则查询并计算部门层级,并判断部门层级是否大于5级或小于1级
@ -154,7 +155,7 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
* 获取所有的部门及部门下的员工信息 * 获取所有的部门及部门下的员工信息
* @return * @return
*/ */
@Override /* @Override
public List<DepartmentVO> listDepartmentAndEmployeeTree() { public List<DepartmentVO> listDepartmentAndEmployeeTree() {
return this.getListDepartmentAndEmployeeTree(deptDao.listDepartment(), 0L); return this.getListDepartmentAndEmployeeTree(deptDao.listDepartment(), 0L);
} }
@ -167,10 +168,24 @@ public class DeptServiceImpl extends ServiceImpl<DeptDao, DeptEntity> implements
}) })
.sorted(Comparator.comparingInt(menu -> (menu.getSort() == null ? 0 : menu.getSort()))) // 根据所选排序信息进行排序 .sorted(Comparator.comparingInt(menu -> (menu.getSort() == null ? 0 : menu.getSort()))) // 根据所选排序信息进行排序
.collect(Collectors.toList()); .collect(Collectors.toList());
} }*/
/**
* 获取该部门下子部门及部门下的员工
*/
@Override @Override
public List<DepartmentVO> getDepartmentAndEmployee(Long id) { public DepartmentVO getDepartmentAndEmployee(Long id) {
return null; DepartmentVO departmentVO = new DepartmentVO();
if (id == null){
List<DepartmentVO> departments = deptDao.getDepartmentByParentId(0L);
departmentVO.setChildren(departments);
return departmentVO;
}else {
List<DepartmentVO> departments = deptDao.getDepartmentByParentId(id);
List<EmployeeVO> employeeS = employeeDao.listEmployeeByDeptId(id);
departmentVO.setChildren(departments);
departmentVO.setEmployee(employeeS);
return departmentVO;
}
} }
} }

@ -36,4 +36,9 @@
FROM hrms_dept FROM hrms_dept
</select> </select>
<select id="getDepartmentByParentId" parameterType="long" resultType="com.daqing.framework.domain.hrms.DepartmentVO">
SELECT id,name,parent_id,sort
FROM hrms_dept WHERE parent_id = #{parentId}
</select>
</mapper> </mapper>

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
@ -23,47 +25,58 @@ public class CompanyCustomerEntity implements Serializable {
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Long id; private Long id;
/** /**
* 注册资金 * 注册资金
*/ */
@ApiModelProperty(value = "注册资金")
private String registeredCapital; private String registeredCapital;
/** /**
* 所属行业 * 所属行业
*/ */
@ApiModelProperty(value = "所属行业")
private String industry; private String industry;
/** /**
* 成立年限 * 成立年限
*/ */
@ApiModelProperty(value = "成立年限")
private Integer years; private Integer years;
/** /**
* 所在区域 * 所在区域
*/ */
@ApiModelProperty(value = "所在区域")
private String region; private String region;
/** /**
* 股东名称 * 股东名称
*/ */
@ApiModelProperty(value = "股东名称")
private String shareholder; private String shareholder;
/** /**
* 关联企业 * 关联企业
*/ */
@ApiModelProperty(value = "关联企业")
private String affiliatedCompany; private String affiliatedCompany;
/** /**
* 员工个数 * 员工个数
*/ */
@ApiModelProperty(value = "员工个数")
private String empNum; private String empNum;
/** /**
* 联系人 * 联系人
*/ */
@ApiModelProperty(value = "联系人")
private String linkman; private String linkman;
/** /**
* 业务来源 * 业务来源
*/ */
@ApiModelProperty(value = "业务来源")
private String businessSource; private String businessSource;
/** /**
* 客户基本信息表id * 客户基本信息表id
*/ */
@ApiModelProperty(value = "客户基本信息表id")
private Long customerId; private Long customerId;
} }

@ -6,8 +6,12 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
/** /**
* 记录客户基本信息 * 记录客户基本信息
* *
@ -23,55 +27,71 @@ public class CustomerEntity implements Serializable {
/** /**
* 主键 * 主键
*/ */
@NotNull(message = "id不能为空")
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Long id; private Long id;
/** /**
* 客户编号 * 客户编号
*/ */
@ApiModelProperty(value = "客户编号")
private String code; private String code;
/** /**
* 客户类型1企业类型0个人类型 * 客户类型1企业类型0个人类型
*/ */
@NotNull(message = "客户类型不能为空")
@ApiModelProperty(value = "客户类型")
private Integer type; private Integer type;
/** /**
* 客户的经理人id * 客户的经理人id
*/ */
@ApiModelProperty(value = "客户经理人id")
private Long manager; private Long manager;
/** /**
* 客户名称 * 客户名称
*/ */
@ApiModelProperty(value = "客户名称")
private String name; private String name;
/** /**
* 联系地址 * 联系地址
*/ */
@ApiModelProperty(value = "联系地址")
private String addr; private String addr;
/** /**
* 联系电话 * 联系电话
*/ */
@NotNull(message = "联系电话不能为空")
@ApiModelProperty(value = "联系电话")
private String phone; private String phone;
/** /**
* 密码 * 密码
*/ */
@ApiModelProperty(value = "密码")
private String password; private String password;
/** /**
* 微信唯一标识 * 微信唯一标识
*/ */
@ApiModelProperty(value = "微信唯一标识")
private String wechatId; private String wechatId;
/** /**
* 0未删除1已删除 * 0未删除1已删除
*/ */
@ApiModelProperty(value = "是否删除")
private Integer delOrNot; private Integer delOrNot;
/** /**
* 0启用1禁用 * 0启用1禁用
*/ */
@ApiModelProperty(value = "是否禁用")
private Integer status; private Integer status;
/** /**
* 创建时间 * 创建时间
*/ */
@ApiModelProperty(value = "创建时间")
private Date createTime; private Date createTime;
/** /**
* 修改时间 * 修改时间
*/ */
@ApiModelProperty(value = "修改时间")
private Date motifyTime; private Date motifyTime;
} }

@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
@ -25,71 +27,88 @@ public class PersonalCustomerEntity implements Serializable {
/** /**
* 主键 * 主键
*/ */
@ApiModelProperty(value = "id")
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Long id; private Long id;
/** /**
* 客户基本信息表id * 客户基本信息表id
*/ */
@ApiModelProperty(value = "客户基本表id")
private Long customerId; private Long customerId;
/** /**
* 身份证号 * 身份证号
*/ */
@ApiModelProperty(value = "身份证号")
private String idCard; private String idCard;
/** /**
* 年龄 * 年龄
*/ */
@ApiModelProperty(value = "年龄")
private Integer age; private Integer age;
/** /**
* 性别10 * 性别10
*/ */
@ApiModelProperty(value = "性别")
private Integer gender; private Integer gender;
/** /**
* 婚姻状况,0:未婚,1:已婚,2:离异,3:再婚 * 婚姻状况,0:未婚,1:已婚,2:离异,3:再婚
*/ */
@ApiModelProperty(value = "婚姻状况")
private Integer maritalStatus; private Integer maritalStatus;
/** /**
* 学历,0:本科,1:大专,2:高职,3:中专,4:其他 * 学历,0:本科,1:大专,2:高职,3:中专,4:其他
*/ */
@ApiModelProperty(value = "学历")
private Integer education; private Integer education;
/** /**
* 工作单位 * 工作单位
*/ */
@ApiModelProperty(value = "工作单位")
private String employer; private String employer;
/** /**
* 职务 * 职务
*/ */
@ApiModelProperty(value = "职务")
private String position; private String position;
/** /**
* 工作年限 * 工作年限
*/ */
@ApiModelProperty(value = "工作年限")
private Integer workingYears; private Integer workingYears;
/** /**
* 社保账号 * 社保账号
*/ */
@ApiModelProperty(value = "社保账号")
private String socialSecurityNum; private String socialSecurityNum;
/** /**
* 居住情况 * 居住情况
*/ */
@ApiModelProperty(value = "居住情况")
private String livingSituation; private String livingSituation;
/** /**
* 户籍地址 * 户籍地址
*/ */
@ApiModelProperty(value = "户籍地址")
private String residenceAddr; private String residenceAddr;
/** /**
* 业务来源 * 业务来源
*/ */
@ApiModelProperty(value = "业务来源")
private String businessSource; private String businessSource;
/** /**
* 紧急联系人 * 紧急联系人
*/ */
@ApiModelProperty(value = "紧急联系人")
private String emergencyLinkman; private String emergencyLinkman;
/** /**
* 紧急联系人关系 * 紧急联系人关系
*/ */
@ApiModelProperty(value = "紧急联系人关系")
private String emergencyLinkmanRelationship; private String emergencyLinkmanRelationship;
/** /**
* 紧急联系人电话 * 紧急联系人电话
*/ */
@ApiModelProperty(value = "紧急联系人电话")
private String emergencyLinkmanPhone; private String emergencyLinkmanPhone;
} }

@ -2,6 +2,7 @@ package com.daqing.framework.domain.crms.ext;
import com.daqing.framework.domain.crms.CompanyCustomerEntity; import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.daqing.framework.domain.crms.CustomerEntity; import com.daqing.framework.domain.crms.CustomerEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
@ -18,10 +19,11 @@ public class CustomerCompanyTO implements Serializable {
/** /**
* 客户基本信息 * 客户基本信息
*/ */
@ApiModelProperty(value = "客户基本信息")
private CustomerEntity customerEntity; private CustomerEntity customerEntity;
/** /**
* 企业类型信息 * 企业类型信息
*/ */
@ApiModelProperty(value = "客户企业信息")
private CompanyCustomerEntity companyCustomerEntity; private CompanyCustomerEntity companyCustomerEntity;
} }

@ -2,9 +2,11 @@ package com.daqing.framework.domain.crms.ext;
import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.metadata.BaseRowModel; import com.alibaba.excel.metadata.BaseRowModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
import javax.validation.constraints.Email;
import java.io.Serializable; import java.io.Serializable;
/** /**
@ -21,75 +23,90 @@ public class CustomerCompanyVO extends BaseRowModel implements Serializable {
* 客户编号 * 客户编号
*/ */
@ExcelProperty(value = "编号",index = 0) @ExcelProperty(value = "编号",index = 0)
@ApiModelProperty(value = "客户编号")
private String code; private String code;
/** /**
* 客户类型1企业类型0个人类型 * 客户类型1企业类型0个人类型
*/ */
@ApiModelProperty(value = "企业类型")
@ExcelProperty(value = "企业类型",index = 1) @ExcelProperty(value = "企业类型",index = 1)
private Integer type; private Integer type;
/** /**
* 客户经理 * 客户经理
*/ */
@ExcelProperty(value = "客户经理",index = 2) @ExcelProperty(value = "客户经理",index = 2)
@ApiModelProperty(value = "客户经理")
private String manager; private String manager;
/** /**
* 客户名称 * 客户名称
*/ */
@ApiModelProperty(value = "客户名称")
@ExcelProperty(value = "姓名",index = 3) @ExcelProperty(value = "姓名",index = 3)
private String name; private String name;
/** /**
* 联系地址 * 联系地址
*/ */
@ApiModelProperty(value = "联系地址")
@ExcelProperty(value = "地址",index = 4) @ExcelProperty(value = "地址",index = 4)
private String addr; private String addr;
/** /**
* 联系电话 * 联系电话
*/ */
@ApiModelProperty(value = "联系电话")
@ExcelProperty(value = "电话",index = 5) @ExcelProperty(value = "电话",index = 5)
private String phone; private String phone;
/** /**
* 注册资金 * 注册资金
*/ */
@ApiModelProperty(value = "注册资金")
@ExcelProperty(value = "注册资金",index = 6) @ExcelProperty(value = "注册资金",index = 6)
private String registeredCapital; private String registeredCapital;
/** /**
* 所属行业 * 所属行业
*/ */
@ApiModelProperty(value = "所属行业")
@ExcelProperty(value = "所属行业",index = 7) @ExcelProperty(value = "所属行业",index = 7)
private String industry; private String industry;
/** /**
* 成立年限 * 成立年限
*/ */
@ApiModelProperty(value = "成立年限")
@ExcelProperty(value = "成立年限",index = 8) @ExcelProperty(value = "成立年限",index = 8)
private Integer years; private Integer years;
/** /**
* 所在区域 * 所在区域
*/ */
@ApiModelProperty(value = "所在区域")
@ExcelProperty(value = "所在区域",index = 9) @ExcelProperty(value = "所在区域",index = 9)
private String region; private String region;
/** /**
* 股东名称 * 股东名称
*/ */
@ApiModelProperty(value = "股东名称")
@ExcelProperty(value = "股东名称",index = 10) @ExcelProperty(value = "股东名称",index = 10)
private String shareholder; private String shareholder;
/** /**
* 关联企业 * 关联企业
*/ */
@ApiModelProperty(value = "关联企业")
@ExcelProperty(value = "关联企业",index = 11) @ExcelProperty(value = "关联企业",index = 11)
private String affiliatedCompany; private String affiliatedCompany;
/** /**
* 员工个数 * 员工个数
*/ */
@ApiModelProperty(value = "员工个数")
@ExcelProperty(value = "员工个数",index = 12) @ExcelProperty(value = "员工个数",index = 12)
private String employeeNumber; private String employeeNumber;
/** /**
* 联系人 * 联系人
*/ */
@ApiModelProperty(value = "联系人")
@ExcelProperty(value = "联系人",index = 13) @ExcelProperty(value = "联系人",index = 13)
private String linkman; private String linkman;
/** /**
* 业务来源 * 业务来源
*/ */
@ApiModelProperty(value = "业务来源")
@ExcelProperty(value = "业务来源",index = 14) @ExcelProperty(value = "业务来源",index = 14)
private String businessSource; private String businessSource;
} }

@ -2,6 +2,7 @@ package com.daqing.framework.domain.crms.ext;
import com.daqing.framework.domain.crms.CustomerEntity; import com.daqing.framework.domain.crms.CustomerEntity;
import com.daqing.framework.domain.crms.PersonalCustomerEntity; import com.daqing.framework.domain.crms.PersonalCustomerEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
@ -18,10 +19,12 @@ public class CustomerPersonalTO implements Serializable {
/** /**
* 客户基本信息 * 客户基本信息
*/ */
@ApiModelProperty(value = "客户基本信息")
private CustomerEntity customerEntity; private CustomerEntity customerEntity;
/** /**
* 客户个人信息 * 客户个人信息
*/ */
@ApiModelProperty(value = "客户个人信息")
private PersonalCustomerEntity personalCustomerEntity; private PersonalCustomerEntity personalCustomerEntity;
} }

@ -1,5 +1,6 @@
package com.daqing.framework.domain.crms.ext; package com.daqing.framework.domain.crms.ext;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import lombok.ToString; import lombok.ToString;
@ -19,34 +20,41 @@ public class CustomerTO implements Serializable {
/** /**
* id * id
*/ */
@ApiModelProperty(value = "id")
private Long id; private Long id;
/** /**
* 客户编号 * 客户编号
*/ */
@ApiModelProperty(value = "客户编号")
private String code; private String code;
/** /**
* 客户姓名 * 客户姓名
*/ */
@ApiModelProperty(value = "客户名称")
private String name; private String name;
/** /**
* 联系电话 * 联系电话
*/ */
@ApiModelProperty(value = "联系电话")
private String phone; private String phone;
/** /**
* 客户类型 * 客户类型
*/ */
@ApiModelProperty(value = "客户类型")
private Integer type; private Integer type;
/** /**
* 客户经理 * 客户经理
*/ */
@ApiModelProperty(value = "客户经理")
private String manager; private String manager;
/** /**
* 所属部门 * 所属部门
*/ */
@ApiModelProperty(value = "所属部门")
private List<String> departments; private List<String> departments;
} }

@ -4,7 +4,10 @@ package com.daqing.framework.domain.crms.request;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
import lombok.ToString; import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@ -23,25 +26,27 @@ public class CustomerRequest implements Serializable {
/** /**
* 客户编号或者名称 * 客户编号或者名称
*/ */
@ApiModelProperty(value = "客户编号或者名称")
@ApiModelProperty(value = "订单名")
@NotNull(message = "啊啊啊不能为空")
private String codeOrName; private String codeOrName;
/** /**
* 客户类型 * 客户类型
*/ */
@ApiModelProperty(value = "客户类型")
private Integer customerType; private Integer customerType;
/** /**
* 创建时间 * 创建时间
*/ */
@ApiModelProperty(value = "创建时间")
private Integer createTime; private Integer createTime;
/** /**
* 起始时间 * 起始时间
*/ */
@ApiModelProperty(value = "起始时间")
private String startTime; private String startTime;
/** /**
* 结束时间 * 结束时间
*/ */
@ApiModelProperty(value = "结束时间")
private String endTime; private String endTime;
} }

@ -25,19 +25,23 @@ public class DepartmentVO implements Serializable{
/** /**
* 主键 * 主键
*/ */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.INPUT)
private Long id; private Long id;
/** /**
* 部门名称 * 部门名称
*/ */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private String name; private String name;
/** /**
* 上级部门id * 上级部门id
*/ */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Long parentId; private Long parentId;
/** /**
* 排序 * 排序
*/ */
@JsonInclude(JsonInclude.Include.NON_EMPTY)
private Integer sort; private Integer sort;
/** /**
* 子部门 * 子部门

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -26,11 +27,12 @@ public class DeptEntity implements Serializable {
/** /**
* 主键 * 主键
*/ */
@TableId(value = "id", type = IdType.INPUT) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;
/** /**
* 部门名称 * 部门名称
*/ */
@ApiModelProperty(value = "部门名称")
private String name; private String name;
/** /**
* 上级部门id * 上级部门id

@ -13,7 +13,7 @@ spring:
# - Query=url,qq # - Query=url,qq
# #
- id: hrms_route - id: hrms_route
uri: lb://dq-financial-hrms uri: lb://localhost:7000/dq-financial-hrms
predicates: predicates:
- Path=/api/** - Path=/api/**
filters: filters:

Loading…
Cancel
Save