diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 49f72f7b..00000000 --- a/.gitignore +++ /dev/null @@ -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 - diff --git a/dq-financial-api/src/main/java/com/daqing/financial/crms/CustomerControllerApi.java b/dq-financial-api/src/main/java/com/daqing/financial/crms/CustomerControllerApi.java index 6f35451c..0612b05b 100644 --- a/dq-financial-api/src/main/java/com/daqing/financial/crms/CustomerControllerApi.java +++ b/dq-financial-api/src/main/java/com/daqing/financial/crms/CustomerControllerApi.java @@ -3,6 +3,7 @@ package com.daqing.financial.crms; import com.daqing.framework.domain.crms.ext.CustomerCompanyTO; 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.model.response.ResponseResult; import io.swagger.annotations.Api; @@ -10,6 +11,7 @@ import io.swagger.annotations.ApiOperation; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; /** * @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); /** @@ -39,15 +41,15 @@ public interface CustomerControllerApi { ResponseResult deleteCustomer(Long[] ids); /** - * 插入个人类型客户信息 + * 新增个人类型客户信息 */ - @ApiOperation(value = "插入个人类型客户信息", notes = "插入个人类型客户信息") + @ApiOperation(value = "新增个人类型客户信息", notes = "新增个人类型客户信息") ResponseResult savePersonal(CustomerPersonalTO customerPersonalTO); /** - * 插入企业类型客户信息 + * 新增企业类型客户信息 */ - @ApiOperation(value = "插入企业类型客户信息", notes = "插入企业类型客户信息") + @ApiOperation(value = "新增企业类型客户信息", notes = "新增企业类型客户信息") ResponseResult saveCompany(CustomerCompanyTO customerCompanyTO); /** diff --git a/dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java b/dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java index 90225fab..39cfd3cf 100644 --- a/dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java +++ b/dq-financial-api/src/main/java/com/daqing/financial/hrms/DeptControllerApi.java @@ -1,5 +1,6 @@ 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.request.DeptAddRequest; import com.daqing.framework.model.response.ResponseResult; @@ -42,7 +43,7 @@ public interface DeptControllerApi { /** * 根据id修改部门信息 */ - @ApiOperation(value = "根据id修改部门信息", notes = "根据id修改部门信息") + @ApiOperation(value = "根据id修改部门信息", notes = "根据id修改部门信息", response = CustomerCompanyVO.class) ResponseResult update(DeptEntity dept); /** @@ -54,6 +55,12 @@ public interface DeptControllerApi { /** * 查询所有部门及部门下的员工信息 */ - @ApiOperation(value = "查询所有部门及部门下的员工信息", notes = "查询所有部门及部门下的员工信息") - ResponseResult trees(); + /*@ApiOperation(value = "查询所有部门及部门下的员工信息", notes = "查询所有部门及部门下的员工信息") + ResponseResult trees();*/ + + /** + * 查询该部门下所有子部门及部门下的的员工 + */ + @ApiOperation(value = "查询该部门下所有子部门及部门下的的员工", notes = "查询该部门下所有子部门及部门下的的员工") + ResponseResult children(Long id); } diff --git a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/DqFinancialCrmsAuthApplication.class b/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/DqFinancialCrmsAuthApplication.class deleted file mode 100644 index 63b95197..00000000 Binary files a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/DqFinancialCrmsAuthApplication.class and /dev/null differ diff --git a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/AuthorizationServer.class b/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/AuthorizationServer.class deleted file mode 100644 index d60a76b8..00000000 Binary files a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/AuthorizationServer.class and /dev/null differ diff --git a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/SecurityConfig.class b/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/SecurityConfig.class deleted file mode 100644 index 65a8ced3..00000000 Binary files a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/SecurityConfig.class and /dev/null differ diff --git a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/TokenConfig.class b/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/TokenConfig.class deleted file mode 100644 index 5e113698..00000000 Binary files a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/config/TokenConfig.class and /dev/null differ diff --git a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/controller/CustomerLoginController.class b/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/controller/CustomerLoginController.class deleted file mode 100644 index 8d4b500d..00000000 Binary files a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/controller/CustomerLoginController.class and /dev/null differ diff --git a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/dao/CustomerLoginDao.class b/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/dao/CustomerLoginDao.class deleted file mode 100644 index ed12926e..00000000 Binary files a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/dao/CustomerLoginDao.class and /dev/null differ diff --git a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/service/CustomerLoginService.class b/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/service/CustomerLoginService.class deleted file mode 100644 index 27441924..00000000 Binary files a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/service/CustomerLoginService.class and /dev/null differ diff --git a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/service/impl/CustomerLoginServiceImpl.class b/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/service/impl/CustomerLoginServiceImpl.class deleted file mode 100644 index a6e458b4..00000000 Binary files a/dq-financial-crms-auth/target/classes/com/daqing/financial/crauth/service/impl/CustomerLoginServiceImpl.class and /dev/null differ diff --git a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java index a38c37a5..b5d664e1 100644 --- a/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java +++ b/dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java @@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; import java.util.List; import java.util.Objects; @@ -80,14 +81,13 @@ public class CustomerController implements CustomerControllerApi { else { return new ResponseResult>().SUCCESS_DATA(list); } - } /** * 保存个人类型客户信息 */ @PostMapping("/savePersonal") - public ResponseResult savePersonal(@RequestBody CustomerPersonalTO customerPersonalTO) { + public ResponseResult savePersonal(@RequestBody @Valid CustomerPersonalTO customerPersonalTO) { boolean result = customerService.saveCustomerPersonal(customerPersonalTO.getCustomerEntity(), customerPersonalTO.getPersonalCustomerEntity()); return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL); } @@ -96,8 +96,7 @@ public class CustomerController implements CustomerControllerApi { * 保存企业类型客户信息 */ @PostMapping("/saveCompany") - @ApiOperation(value = "保存企业类型客户信息", response = CustomerCompanyTO.class) - public ResponseResult saveCompany(@RequestBody CustomerCompanyTO customerCompanyTO) { + public ResponseResult saveCompany(@RequestBody @Valid CustomerCompanyTO customerCompanyTO) { boolean result = customerService.saveCustomerCompany(customerCompanyTO.getCustomerEntity(), customerCompanyTO.getCompanyCustomerEntity()); return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL); } diff --git a/dq-financial-hrms/pom.xml b/dq-financial-hrms/pom.xml index 5543ca6f..a5788153 100644 --- a/dq-financial-hrms/pom.xml +++ b/dq-financial-hrms/pom.xml @@ -62,12 +62,12 @@ - + diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/ResourceServerConfig.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/ResourceServerConfig.java index e04fd7d8..30735ec4 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/ResourceServerConfig.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/config/ResourceServerConfig.java @@ -1,13 +1,18 @@ +/* package com.daqing.financial.hrms.config; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; 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.oauth2.config.annotation.web.configuration.EnableResourceServer; 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.provider.token.RemoteTokenServices; +import org.springframework.security.oauth2.provider.token.TokenStore; +import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore; @Configuration @EnableResourceServer @@ -23,13 +28,15 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter { @Value("${security.oauth2.authorization.check-token-access}") private String checkTokenEndpointUrl; - /* @Autowired - private RedisConnectionFactory redisConnectionFactory;*/ + @Autowired + private RedisConnectionFactory redisConnectionFactory; -/* @Bean + + @Bean public TokenStore redisTokenStore (){ return new RedisTokenStore(redisConnectionFactory); - }*/ + } + @Bean public RemoteTokenServices tokenService() { @@ -44,4 +51,5 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter { public void configure(ResourceServerSecurityConfigurer resources) throws Exception { resources.tokenServices(tokenService()); } -} \ No newline at end of file +} +*/ diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java index 0a5c2482..11e198a3 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/DeptController.java @@ -100,9 +100,18 @@ public class DeptController implements DeptControllerApi { /** *所有部门及员工 */ - @Override + /*@Override @GetMapping("/trees") public ResponseResult trees() { return new ResponseResult>().SUCCESS(deptService.listDepartmentAndEmployeeTree()); + }*/ + + /** + * 该部门下所有子部门及部门下员工 + */ + @Override + @GetMapping("/children") + public ResponseResult children(Long id){ + return new ResponseResult().SUCCESS(deptService.getDepartmentAndEmployee(id)); } } diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java index a4f13137..f3c08f73 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/EmployeeController.java @@ -87,7 +87,7 @@ public class EmployeeController implements EmployeeControllerApi { * @param ids * @return */ - @Override + //@Override @GetMapping("/getEmployeeAndDeptById") public ResponseResult getEmployeeAndDeptById(@RequestParam("ids") Long[] ids) { List employeeTO = employeeService.getEmployeeAndDeptById(Arrays.asList(ids)); diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java index a2545da2..220c0eaa 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java @@ -5,9 +5,6 @@ import com.daqing.framework.domain.hrms.UserEntity; import com.daqing.framework.model.response.ResponseResult; import com.daqing.framework.utils.PageUtils; 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 java.util.Arrays; @@ -88,7 +85,7 @@ public class UserController { * @param authentication * @return */ - @GetMapping(value = "get") + /* @GetMapping(value = "get") @PreAuthorize("hasAnyRole('ROLE_ADMIN')") public Object get(Authentication authentication){ //Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); @@ -96,5 +93,5 @@ public class UserController { OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails)authentication.getDetails(); String token = details.getTokenValue(); return token; - } + }*/ } diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java index 17dc3ff0..f6718ebc 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/DeptDao.java @@ -25,4 +25,6 @@ public interface DeptDao extends BaseMapper { List listDepartment(); + List getDepartmentByParentId(Long parentId); + } diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java index c80b9576..5d09a6c8 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/DeptService.java @@ -24,8 +24,8 @@ public interface DeptService extends IService { boolean deleteByIds(Long[] ids); - List listDepartmentAndEmployeeTree(); + /*List listDepartmentAndEmployeeTree();*/ - List getDepartmentAndEmployee(Long id); + DepartmentVO getDepartmentAndEmployee(Long id); } diff --git a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java index df39dadb..847edf66 100644 --- a/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java +++ b/dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/DeptServiceImpl.java @@ -7,6 +7,7 @@ import com.daqing.financial.hrms.dao.EmployeeDao; import com.daqing.financial.hrms.service.DeptService; import com.daqing.framework.domain.hrms.DepartmentVO; 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.response.HrmsCode; import com.daqing.framework.exception.ExceptionCast; @@ -64,7 +65,7 @@ public class DeptServiceImpl extends ServiceImpl implements //实体类 DeptEntity deptEntity = new DeptEntity(); //设置id - deptEntity.setId(SnowflakeIdUtils.getRandomid()); + //deptEntity.setId(SnowflakeIdUtils.getRandomid()); //属性拷贝,将上级部门id(如果有)、部门名称设置到实体类 BeanUtils.copyProperties(deptAddRequest, deptEntity); //2、判断部门上级id是否为空,为空则此部门是一级部门,否则查询并计算部门层级,并判断部门层级是否大于5级或小于1级 @@ -154,7 +155,7 @@ public class DeptServiceImpl extends ServiceImpl implements * 获取所有的部门及部门下的员工信息 * @return */ - @Override + /* @Override public List listDepartmentAndEmployeeTree() { return this.getListDepartmentAndEmployeeTree(deptDao.listDepartment(), 0L); } @@ -167,10 +168,24 @@ public class DeptServiceImpl extends ServiceImpl implements }) .sorted(Comparator.comparingInt(menu -> (menu.getSort() == null ? 0 : menu.getSort()))) // 根据所选排序信息进行排序 .collect(Collectors.toList()); - } + }*/ + /** + * 获取该部门下子部门及部门下的员工 + */ @Override - public List getDepartmentAndEmployee(Long id) { - return null; + public DepartmentVO getDepartmentAndEmployee(Long id) { + DepartmentVO departmentVO = new DepartmentVO(); + if (id == null){ + List departments = deptDao.getDepartmentByParentId(0L); + departmentVO.setChildren(departments); + return departmentVO; + }else { + List departments = deptDao.getDepartmentByParentId(id); + List employeeS = employeeDao.listEmployeeByDeptId(id); + departmentVO.setChildren(departments); + departmentVO.setEmployee(employeeS); + return departmentVO; + } } } \ No newline at end of file diff --git a/dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml b/dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml index 294e0608..8ffcc49b 100644 --- a/dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml +++ b/dq-financial-hrms/src/main/resources/mapper/hrms/DeptDao.xml @@ -36,4 +36,9 @@ FROM hrms_dept + + \ No newline at end of file diff --git a/dq-framework-common/target/classes/com/daqing/framework/exception/ExceptionCatch.class b/dq-framework-common/target/classes/com/daqing/framework/exception/ExceptionCatch.class index 16e314dd..f9d340bb 100644 Binary files a/dq-framework-common/target/classes/com/daqing/framework/exception/ExceptionCatch.class and b/dq-framework-common/target/classes/com/daqing/framework/exception/ExceptionCatch.class differ diff --git a/dq-framework-common/target/classes/com/daqing/framework/model/response/CommonCode.class b/dq-framework-common/target/classes/com/daqing/framework/model/response/CommonCode.class index a66c7457..a15c2503 100644 Binary files a/dq-framework-common/target/classes/com/daqing/framework/model/response/CommonCode.class and b/dq-framework-common/target/classes/com/daqing/framework/model/response/CommonCode.class differ diff --git a/dq-framework-common/target/classes/com/daqing/framework/model/response/ResponseResult.class b/dq-framework-common/target/classes/com/daqing/framework/model/response/ResponseResult.class index 63461c4a..271cc3e5 100644 Binary files a/dq-framework-common/target/classes/com/daqing/framework/model/response/ResponseResult.class and b/dq-framework-common/target/classes/com/daqing/framework/model/response/ResponseResult.class differ diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java index 6a85275b..068eed16 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CompanyCustomerEntity.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** @@ -23,47 +25,58 @@ public class CompanyCustomerEntity implements Serializable { /** * 主键 */ + @ApiModelProperty(value = "id") @TableId(value = "id", type = IdType.INPUT) private Long id; /** * 注册资金 */ + @ApiModelProperty(value = "注册资金") private String registeredCapital; /** * 所属行业 */ + @ApiModelProperty(value = "所属行业") private String industry; /** * 成立年限 */ + @ApiModelProperty(value = "成立年限") private Integer years; /** * 所在区域 */ + @ApiModelProperty(value = "所在区域") private String region; /** * 股东名称 */ + @ApiModelProperty(value = "股东名称") private String shareholder; /** * 关联企业 */ + @ApiModelProperty(value = "关联企业") private String affiliatedCompany; /** * 员工个数 */ + @ApiModelProperty(value = "员工个数") private String empNum; /** * 联系人 */ + @ApiModelProperty(value = "联系人") private String linkman; /** * 业务来源 */ + @ApiModelProperty(value = "业务来源") private String businessSource; /** * 客户基本信息表id */ + @ApiModelProperty(value = "客户基本信息表id") private Long customerId; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CustomerEntity.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CustomerEntity.java index e3c41162..9a30c284 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CustomerEntity.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/CustomerEntity.java @@ -6,8 +6,12 @@ import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; 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) private Long id; /** * 客户编号 */ + @ApiModelProperty(value = "客户编号") private String code; /** * 客户类型:1、企业类型,0:个人类型 */ + @NotNull(message = "客户类型不能为空") + @ApiModelProperty(value = "客户类型") private Integer type; /** * 客户的经理人id */ + @ApiModelProperty(value = "客户经理人id") private Long manager; /** * 客户名称 */ + @ApiModelProperty(value = "客户名称") private String name; /** * 联系地址 */ + @ApiModelProperty(value = "联系地址") private String addr; /** * 联系电话 */ + @NotNull(message = "联系电话不能为空") + @ApiModelProperty(value = "联系电话") private String phone; /** * 密码 */ + @ApiModelProperty(value = "密码") private String password; /** * 微信唯一标识 */ + @ApiModelProperty(value = "微信唯一标识") private String wechatId; /** * 0:未删除,1:已删除 */ + @ApiModelProperty(value = "是否删除") private Integer delOrNot; /** * 0:启用,1:禁用 */ + @ApiModelProperty(value = "是否禁用") private Integer status; /** * 创建时间 */ + @ApiModelProperty(value = "创建时间") private Date createTime; /** * 修改时间 */ + @ApiModelProperty(value = "修改时间") private Date motifyTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/PersonalCustomerEntity.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/PersonalCustomerEntity.java index b2dc52e2..d4004855 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/PersonalCustomerEntity.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/PersonalCustomerEntity.java @@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableName; import java.io.Serializable; import java.util.Date; + +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; @@ -25,71 +27,88 @@ public class PersonalCustomerEntity implements Serializable { /** * 主键 */ + @ApiModelProperty(value = "id") @TableId(value = "id", type = IdType.INPUT) private Long id; /** * 客户基本信息表id */ + @ApiModelProperty(value = "客户基本表id") private Long customerId; /** * 身份证号 */ + @ApiModelProperty(value = "身份证号") private String idCard; /** * 年龄 */ + @ApiModelProperty(value = "年龄") private Integer age; /** * 性别:1、男,0、女 */ + @ApiModelProperty(value = "性别") private Integer gender; /** * 婚姻状况,0:未婚,1:已婚,2:离异,3:再婚 */ + @ApiModelProperty(value = "婚姻状况") private Integer maritalStatus; /** * 学历,0:本科,1:大专,2:高职,3:中专,4:其他 */ + @ApiModelProperty(value = "学历") private Integer education; /** * 工作单位 */ + @ApiModelProperty(value = "工作单位") private String employer; /** * 职务 */ + @ApiModelProperty(value = "职务") private String position; /** * 工作年限 */ + @ApiModelProperty(value = "工作年限") private Integer workingYears; /** * 社保账号 */ + @ApiModelProperty(value = "社保账号") private String socialSecurityNum; /** * 居住情况 */ + @ApiModelProperty(value = "居住情况") private String livingSituation; /** * 户籍地址 */ + @ApiModelProperty(value = "户籍地址") private String residenceAddr; /** * 业务来源 */ + @ApiModelProperty(value = "业务来源") private String businessSource; /** * 紧急联系人 */ + @ApiModelProperty(value = "紧急联系人") private String emergencyLinkman; /** * 紧急联系人关系 */ + @ApiModelProperty(value = "紧急联系人关系") private String emergencyLinkmanRelationship; /** * 紧急联系人电话 */ + @ApiModelProperty(value = "紧急联系人电话") private String emergencyLinkmanPhone; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyTO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyTO.java index 9c9f7752..82166d16 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyTO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyTO.java @@ -2,6 +2,7 @@ package com.daqing.framework.domain.crms.ext; import com.daqing.framework.domain.crms.CompanyCustomerEntity; import com.daqing.framework.domain.crms.CustomerEntity; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; @@ -18,10 +19,11 @@ public class CustomerCompanyTO implements Serializable { /** * 客户基本信息 */ - + @ApiModelProperty(value = "客户基本信息") private CustomerEntity customerEntity; /** * 企业类型信息 */ + @ApiModelProperty(value = "客户企业信息") private CompanyCustomerEntity companyCustomerEntity; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java index 9272e633..696d4aaa 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerCompanyVO.java @@ -2,9 +2,11 @@ package com.daqing.framework.domain.crms.ext; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.metadata.BaseRowModel; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; +import javax.validation.constraints.Email; import java.io.Serializable; /** @@ -21,75 +23,90 @@ public class CustomerCompanyVO extends BaseRowModel implements Serializable { * 客户编号 */ @ExcelProperty(value = "编号",index = 0) + @ApiModelProperty(value = "客户编号") private String code; /** * 客户类型:1、企业类型,0:个人类型 */ + @ApiModelProperty(value = "企业类型") @ExcelProperty(value = "企业类型",index = 1) private Integer type; /** * 客户经理 */ @ExcelProperty(value = "客户经理",index = 2) + @ApiModelProperty(value = "客户经理") private String manager; /** * 客户名称 */ + @ApiModelProperty(value = "客户名称") @ExcelProperty(value = "姓名",index = 3) private String name; /** * 联系地址 */ + @ApiModelProperty(value = "联系地址") @ExcelProperty(value = "地址",index = 4) private String addr; /** * 联系电话 */ + @ApiModelProperty(value = "联系电话") @ExcelProperty(value = "电话",index = 5) private String phone; /** * 注册资金 */ + @ApiModelProperty(value = "注册资金") @ExcelProperty(value = "注册资金",index = 6) private String registeredCapital; /** * 所属行业 */ + @ApiModelProperty(value = "所属行业") @ExcelProperty(value = "所属行业",index = 7) private String industry; /** * 成立年限 */ + @ApiModelProperty(value = "成立年限") @ExcelProperty(value = "成立年限",index = 8) private Integer years; /** * 所在区域 */ + @ApiModelProperty(value = "所在区域") @ExcelProperty(value = "所在区域",index = 9) private String region; /** * 股东名称 */ + @ApiModelProperty(value = "股东名称") @ExcelProperty(value = "股东名称",index = 10) private String shareholder; /** * 关联企业 */ + @ApiModelProperty(value = "关联企业") @ExcelProperty(value = "关联企业",index = 11) private String affiliatedCompany; /** * 员工个数 */ + @ApiModelProperty(value = "员工个数") @ExcelProperty(value = "员工个数",index = 12) private String employeeNumber; /** * 联系人 */ + @ApiModelProperty(value = "联系人") @ExcelProperty(value = "联系人",index = 13) private String linkman; /** * 业务来源 */ + @ApiModelProperty(value = "业务来源") @ExcelProperty(value = "业务来源",index = 14) private String businessSource; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalTO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalTO.java index f0a1b18b..b8ae1334 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalTO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerPersonalTO.java @@ -2,6 +2,7 @@ package com.daqing.framework.domain.crms.ext; import com.daqing.framework.domain.crms.CustomerEntity; import com.daqing.framework.domain.crms.PersonalCustomerEntity; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; @@ -18,10 +19,12 @@ public class CustomerPersonalTO implements Serializable { /** * 客户基本信息 */ + @ApiModelProperty(value = "客户基本信息") private CustomerEntity customerEntity; /** * 客户个人信息 */ + @ApiModelProperty(value = "客户个人信息") private PersonalCustomerEntity personalCustomerEntity; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerTO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerTO.java index 2af040ac..b988e56e 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerTO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/ext/CustomerTO.java @@ -1,5 +1,6 @@ package com.daqing.framework.domain.crms.ext; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.ToString; @@ -19,34 +20,41 @@ public class CustomerTO implements Serializable { /** * id */ + @ApiModelProperty(value = "id") private Long id; /** * 客户编号 */ + @ApiModelProperty(value = "客户编号") private String code; /** * 客户姓名 */ + @ApiModelProperty(value = "客户名称") private String name; /** * 联系电话 */ + @ApiModelProperty(value = "联系电话") private String phone; /** * 客户类型 */ + @ApiModelProperty(value = "客户类型") private Integer type; /** * 客户经理 */ + @ApiModelProperty(value = "客户经理") private String manager; /** * 所属部门 */ + @ApiModelProperty(value = "所属部门") private List departments; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CustomerRequest.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CustomerRequest.java index 2d3bdcd8..7c6be69d 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CustomerRequest.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/crms/request/CustomerRequest.java @@ -4,7 +4,10 @@ package com.daqing.framework.domain.crms.request; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.util.Date; + import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; import javax.validation.constraints.NotNull; @@ -23,25 +26,27 @@ public class CustomerRequest implements Serializable { /** * 客户编号或者名称 */ - - @ApiModelProperty(value = "订单名") - @NotNull(message = "啊啊啊不能为空") + @ApiModelProperty(value = "客户编号或者名称") private String codeOrName; /** * 客户类型 */ + @ApiModelProperty(value = "客户类型") private Integer customerType; /** * 创建时间 */ + @ApiModelProperty(value = "创建时间") private Integer createTime; /** * 起始时间 */ + @ApiModelProperty(value = "起始时间") private String startTime; /** * 结束时间 */ + @ApiModelProperty(value = "结束时间") private String endTime; } diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DepartmentVO.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DepartmentVO.java index c4eb1399..be598047 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DepartmentVO.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DepartmentVO.java @@ -25,19 +25,23 @@ public class DepartmentVO implements Serializable{ /** * 主键 */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) @TableId(value = "id", type = IdType.INPUT) private Long id; /** * 部门名称 */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) private String name; /** * 上级部门id */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) private Long parentId; /** * 排序 */ + @JsonInclude(JsonInclude.Include.NON_EMPTY) private Integer sort; /** * 子部门 diff --git a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DeptEntity.java b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DeptEntity.java index 7c639157..31c9b955 100644 --- a/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DeptEntity.java +++ b/dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/DeptEntity.java @@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonInclude; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; 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; /** * 部门名称 */ + @ApiModelProperty(value = "部门名称") private String name; /** * 上级部门id diff --git a/dq-govern-gateway/src/main/resources/application.yml b/dq-govern-gateway/src/main/resources/application.yml index 6ea9f3a1..87f1dd6f 100644 --- a/dq-govern-gateway/src/main/resources/application.yml +++ b/dq-govern-gateway/src/main/resources/application.yml @@ -13,7 +13,7 @@ spring: # - Query=url,qq # - id: hrms_route - uri: lb://dq-financial-hrms + uri: lb://localhost:7000/dq-financial-hrms predicates: - Path=/api/** filters: