Commit a085cf00 by 何熠

Initial commit

parents
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/../../../../:\workspace\product-service-new1\.idea/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/
product-service
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ApifoxUploaderProjectSetting">
<option name="apiAccessToken" value="APS-jd8PFBfgqbPxe0QnHceEhjnkRIxlM1kO" />
<option name="apiSyncFolder" value="true" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile default="true" name="Default" enabled="true" />
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="product-service" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="cfcrm" uuid="d8cead10-f4de-4728-8d51-267877a02e22">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://10.101.49.3:5432/selector_test</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
<option name="TOP_LEVEL_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="INNER_CLASS_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="METHOD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="@return@param@throws or @exception" />
</value>
</option>
<option name="FIELD_OPTIONS">
<value>
<option name="ACCESS_JAVADOC_REQUIRED_FOR" value="none" />
<option name="REQUIRED_TAGS" value="" />
</value>
</option>
<option name="IGNORE_DEPRECATED" value="false" />
<option name="IGNORE_JAVADOC_PERIOD" value="true" />
<option name="IGNORE_DUPLICATED_THROWS" value="false" />
<option name="IGNORE_POINT_TO_ITSELF" value="false" />
<option name="myAdditionalJavadocTags" value="date" />
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/product-service.iml" filepath="$PROJECT_DIR$/product-service.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>product-service</groupId>
<artifactId>product-service</artifactId>
<version>1.0-SNAPSHOT</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-parent</artifactId>
<version>2.2.6.RELEASE</version>
</parent>
<properties>
<pagehelper-version>1.3.1</pagehelper-version>
<collections4-version>4.4</collections4-version>
<feign.version>2.2.6.RELEASE</feign.version>
<security.version>2.2.6.RELEASE</security.version>
<swagger.version>2.9.2</swagger.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.oauth.boot</groupId>
<artifactId>spring-security-oauth2-autoconfigure</artifactId>
<version>${security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
<version>${feign.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
<version>2.3.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.4</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.73</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${collections4-version}</version>
</dependency>
<dependency>
<groupId>jakarta.persistence</groupId>
<artifactId>jakarta.persistence-api</artifactId>
<version>2.2.3</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>${swagger.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>${swagger.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module version="4">
<component name="FacetManager">
<facet type="hibernate" name="Hibernate">
<configuration>
<datasource-map />
<naming-strategy-map />
</configuration>
</facet>
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<setting name="provider-name" value="Hibernate" />
<datasource-mapping>
<factory-entry name="entityManagerFactory" value="d8cead10-f4de-4728-8d51-267877a02e22" />
</datasource-mapping>
<naming-strategy-map />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
</module>
\ No newline at end of file
package cn.com.uitech;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
* @Author: ZXN
* @Date: 2021/09/24/11:00
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@SpringBootApplication
@EnableTransactionManagement
@EnableScheduling
@EnableJpaAuditing
@EnableFeignClients
@MapperScan("cn.com.uitech.mapper")
public class ProductServiceApplication {
public static void main(String[] args) {
SpringApplication.run(ProductServiceApplication.class);
}
}
package cn.com.uitech.api;
import cn.com.uitech.dto.RelationshipDto;
import com.alibaba.fastjson.JSONObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
/**
* @Author: ZXN
* @Date: 2021/10/14/14:11
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Component
@FeignClient(name = "crm-apo",url = "${crm.url}",fallbackFactory = CrmApiHystrix.class)
public interface CrmApi {
/**
* 产品型号查询
* @return
*/
@GetMapping("/v1/forchooser/models/sel")
JSONObject queryModels();
/**
* 物料查询
* @param data 物料
* @return
*/
@GetMapping("/v1/forchooser/materiel/sel")
JSONObject queryMateriels(@RequestParam(value = "data",required = false) String data);
/**
* 配件物料关系接收
* @return
*/
@PostMapping("/v1/forchooser/comp/materiel/relationship")
JSONObject sendRelationship(@RequestBody RelationshipDto relationshipDto);
}
package cn.com.uitech.api;
import cn.com.uitech.dto.RelationshipDto;
import com.alibaba.fastjson.JSONObject;
import feign.hystrix.FallbackFactory;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName CrmApiHystrix
* @createDate 2021/11/16 15:45
* @updateDate 2021/11/16 15:45
*/
@Component
public class CrmApiHystrix implements FallbackFactory<CrmApi> {
@Override
public CrmApi create(Throwable throwable) {
return new CrmApi(){
@Override
public JSONObject queryModels() {
JSONObject jsonObject = new JSONObject();
jsonObject.put("msg","产品型号查询失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
@Override
public JSONObject queryMateriels(String data) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("msg","物料查询失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
@Override
public JSONObject sendRelationship(RelationshipDto relationshipDto) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("msg","配件物料关系推送失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
};
}
}
package cn.com.uitech.api;
import cn.com.uitech.dto.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.Map;
/**
* @Author: ZXN
* @Date: 2021/10/14/14:11
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Component
@FeignClient(name = "selector-apo",url = "${selector.url}",fallbackFactory = SelectorApiHystrix.class)
public interface SelectorApi {
/**
* 初始化选配器数据
* @param initializationInputDTO
* @return
*/
@PostMapping("/api/v1/selector/initialization")
Map<String,Object> initialization(@RequestBody Map initializationInputDTO);
@PostMapping("/api/v1/selector/preVerify")
Map<String,Object> preVerify(@RequestBody PreVerifyInputDTO preVerifyInputDTO);
@PostMapping("/api/v1/selector/postVerify")
Map<String, Object> postVerify(PostVerifyInputDTO postVerifyInputDTO);
@PostMapping("/api/v1/selector/buildConfiguration")
Map<String, Object> buildConfiguration(BuildConfigurationInputDTO buildConfigurationInputDTO);
@PostMapping("/api/v1/selector/configurations")
Map<String, Object> configurations(GetConfigurationInputDTO getConfigurationInputDTO);
@PostMapping("/api/v1/selector/conflictAnalysis")
Map<String, Object> conflictAnalysis(ConflictAnalysisInputDTO conflictAnalysisInputDTO);
@PostMapping("/api/v1/selector/copyConfiguration")
Map<String, Object> copyConfiguration(CopyConfigurationInputDTO copyConfigurationInputDTO);
}
package cn.com.uitech.api;
import cn.com.uitech.dto.*;
import feign.hystrix.FallbackFactory;
import org.springframework.http.HttpStatus;
import org.springframework.stereotype.Component;
import java.util.HashMap;
import java.util.Map;
/**
* @author hu
* @description
* @date 2021/3/22
**/
@Component
public class SelectorApiHystrix implements FallbackFactory<SelectorApi> {
@Override
public SelectorApi create(Throwable throwable) {
return new SelectorApi() {
@Override
public Map<String,Object> initialization(Map initializationInputDTO) {
Map jsonObject = new HashMap<>();
jsonObject.put("msg","初始化选配器数据失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
@Override
public Map<String,Object> preVerify(PreVerifyInputDTO preVerifyInputDTO) {
Map jsonObject = new HashMap<>();
jsonObject.put("msg","前置验证失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
@Override
public Map<String,Object> postVerify(PostVerifyInputDTO postVerifyInputDTO) {
Map jsonObject = new HashMap<>();
jsonObject.put("msg","后置验证失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
@Override
public Map<String,Object> buildConfiguration(BuildConfigurationInputDTO buildConfigurationInputDTO) {
Map jsonObject = new HashMap<>();
jsonObject.put("msg","生成配置单失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
@Override
public Map<String,Object> configurations(GetConfigurationInputDTO getConfigurationInputDTO) {
Map jsonObject = new HashMap<>();
jsonObject.put("msg","获取配置信息失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
@Override
public Map<String, Object> conflictAnalysis(ConflictAnalysisInputDTO conflictAnalysisInputDTO) {
Map jsonObject = new HashMap<>();
jsonObject.put("msg","校验分析失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
@Override
public Map<String, Object> copyConfiguration(CopyConfigurationInputDTO copyConfigurationInputDTO) {
Map jsonObject = new HashMap<>();
jsonObject.put("msg","复制配置失败");
jsonObject.put("code", HttpStatus.INTERNAL_SERVER_ERROR.value());
return jsonObject;
}
};
}
}
package cn.com.uitech.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class CorsConfig implements WebMvcConfigurer {
@Bean
public WebMvcConfigurer corsConfigurer()
{
return new WebMvcConfigurer() {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").
allowedOrigins("*"). //允许跨域的域名,可以用*表示允许任何域名使用
allowedMethods("*"). //允许任何方法(post、get等)
allowedHeaders("*"). //允许任何请求头
allowCredentials(true). //带上cookie信息
exposedHeaders(HttpHeaders.SET_COOKIE).maxAge(3600L); //maxAge(3600)表明在3600秒内,不需要再发送预检验请求,可以缓存该结果
}
};
}
}
package cn.com.uitech.config;
import com.google.common.collect.Lists;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.List;
@Configuration
@EnableSwagger2
//@ConditionalOnProperty(name = "swagger.enable", havingValue = "true")
public class Swagger2Config {
@Bean
public Docket reportApi() {
return new Docket(DocumentationType.SWAGGER_2)
.globalOperationParameters(Parameters())
.apiInfo(apiInfo())
.globalOperationParameters(Parameters())
.select()
.apis(RequestHandlerSelectors.basePackage("cn.com.uitech.controller"))
.paths(PathSelectors.any())
.build();
}
private ApiInfo apiInfo() {
return new ApiInfoBuilder()
.title("customerservice service ")
.description("uitech customerservice service api")
.version("1.0")
.termsOfServiceUrl("NO terms of service")
.license("The Apache License, Version 2.0")
.licenseUrl("http://www.apache.org/licenses/LICENSE-2.0.html")
.build();
}
private List<Parameter> Parameters(){
ParameterBuilder builder = new ParameterBuilder();
return Lists.newArrayList(
builder.name("Authorization")
.description("认证信息 [Bearer token]")
.modelRef(new ModelRef("string"))
.parameterType("header")
.required(true)
.build());
}
}
\ No newline at end of file
package cn.com.uitech.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.domain.AuditorAware;
import java.util.Optional;
/**
* @Author: ZXN
* @Date: 2021/09/24/18:35
* @Description: JPA审计模式获取当前操作人员
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Configuration
public class UserAuditor implements AuditorAware<String> {
@Override
public Optional<String> getCurrentAuditor() {
// todo 获取用户信息,此处后续补全
return Optional.ofNullable("admin");
}
}
package cn.com.uitech.config;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.web.cors.CorsConfiguration;
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
import org.springframework.web.filter.CorsFilter;
import java.util.ArrayList;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true)
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.cors().and().csrf().disable();
}
// springSecurityFilterChain中配置了 CorsFilter [http.cors()] 需要手工指定Bean
@Bean
public CorsFilter corsFilter() {
final UrlBasedCorsConfigurationSource urlBasedCorsConfigurationSource = new UrlBasedCorsConfigurationSource();
final CorsConfiguration corsConfiguration = new CorsConfiguration();
corsConfiguration.setAllowCredentials(true);
corsConfiguration.addAllowedOrigin("*");
corsConfiguration.addAllowedHeader("*");
corsConfiguration.addAllowedMethod("*");
urlBasedCorsConfigurationSource.registerCorsConfiguration("/**", corsConfiguration);
return new CorsFilter(urlBasedCorsConfigurationSource);
}
@Bean
public FilterRegistrationBean<CorsFilter> customCorsFilter() {
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
ArrayList<String> exposedHeaders = new ArrayList<>();
exposedHeaders.add("Access-Control-Allow-Credentials");
exposedHeaders.add("Access-Control-Allow-Headers");
exposedHeaders.add("Access-Control-Allow-Methods");
exposedHeaders.add("Access-Control-Allow-Origin");
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOrigin("*");
config.addAllowedHeader("*");
config.addAllowedMethod("*");
config.setAllowCredentials(true);
config.setExposedHeaders(exposedHeaders);
source.registerCorsConfiguration("/**", config);
FilterRegistrationBean<CorsFilter> bean = new FilterRegistrationBean<>(new CorsFilter(source));
/**
* IMPORTANT #2: I didn't stress enough the importance of this line in my original answer,
* but it's here where we tell Spring to load this filter at the right point in the chain
* (with an order of precedence higher than oauth2's filters)
*/
bean.setOrder(Ordered.HIGHEST_PRECEDENCE);
return bean;
}
}
package cn.com.uitech.controller;
import cn.com.uitech.api.CrmApi;
import cn.com.uitech.dto.CrmApiQueryParamDto;
import cn.com.uitech.dto.ProductPrototypeApiDTO;
import cn.com.uitech.dto.RelationshipDto;
import cn.com.uitech.entity.FeatureAccessoriesBomMiddleTableEntity;
import cn.com.uitech.exception.SelectorException;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName CrmApiController
* @createDate 2021/11/10 11:17
* @updateDate 2021/11/10 11:17
*/
@RestController
@RequestMapping("/crmApi")
public class CrmApiController {
@Resource
private CrmApi crmApi;
/**
* 产品类型、项目信息列表获取
* @return
*/
@GetMapping("/models/sel")
public List<ProductPrototypeApiDTO> queryModels() {
JSONObject initialization = crmApi.queryModels();
List<ProductPrototypeApiDTO> result = new ArrayList<>();
if(!"0".equals(initialization.get("code"))){
throw new SelectorException(HttpStatus.INTERNAL_SERVER_ERROR.value(), "请求CRM-产品类型接口异常!");
}
if(null==initialization.get("data") || StringUtils.isBlank(initialization.get("data").toString())){
return result;
}
JSONArray data = initialization.getJSONArray("data");
for (int i = 0;i<data.size();i++) {
JSONObject jsonObject = data.getJSONObject(i);
ProductPrototypeApiDTO productPrototypeApiDTO = new ProductPrototypeApiDTO();
productPrototypeApiDTO.setCode(jsonObject.get("code").toString());
productPrototypeApiDTO.setName(jsonObject.get("name").toString());
productPrototypeApiDTO.setProjectCode(jsonObject.get("project").toString());
result.add(productPrototypeApiDTO);
}
return result;
}
/**
* 物料查询
* @param crmApiQueryParamDto 物料编码查询参数
* @return
*/
@PostMapping("/materiel/sel")
public PageInfo<FeatureAccessoriesBomMiddleTableEntity> queryMateriels(@RequestBody CrmApiQueryParamDto crmApiQueryParamDto) {
PageInfo<FeatureAccessoriesBomMiddleTableEntity> pageInfo = new PageInfo();
pageInfo.setPageNum(crmApiQueryParamDto.getPageNum());
pageInfo.setPageSize(crmApiQueryParamDto.getPageSize());
JSONObject queryParam = new JSONObject();
queryParam.put("code",crmApiQueryParamDto.getBomCode());
queryParam.put("name",crmApiQueryParamDto.getBomName());
queryParam.put("curr_page",crmApiQueryParamDto.getPageNum());
queryParam.put("page_size",crmApiQueryParamDto.getPageSize());
System.out.println(queryParam.toJSONString());
JSONObject initialization = crmApi.queryMateriels(queryParam.toJSONString());
if(!"0".equals(initialization.get("code"))){
throw new SelectorException(HttpStatus.INTERNAL_SERVER_ERROR.value(), "请求CRM-物料查询接口异常!");
}
if(null==initialization.get("data") || StringUtils.isBlank(initialization.get("data").toString())){
return pageInfo;
}
JSONObject data = initialization.getJSONObject("data");
pageInfo.setTotal(Long.parseLong(data.get("total").toString()));
if(pageInfo.getTotal()>0){
List<FeatureAccessoriesBomMiddleTableEntity> result = new ArrayList<>();
JSONArray dataArray = data.getJSONArray("data");
for (int i = 0;i<dataArray.size();i++) {
JSONObject jsonObject = dataArray.getJSONObject(i);
FeatureAccessoriesBomMiddleTableEntity productPrototypeApiDTO = new FeatureAccessoriesBomMiddleTableEntity();
productPrototypeApiDTO.setBomCode(jsonObject.get("code").toString());
productPrototypeApiDTO.setBomName(jsonObject.get("name").toString());
productPrototypeApiDTO.setBomDescription(jsonObject.get("materialspec").toString());
result.add(productPrototypeApiDTO);
}
pageInfo.setList(result);
}
return pageInfo;
}
/**
* 配件物料关系接收
* @return
*/
@GetMapping("/comp/materiel/relationship")
public void sendRelationship() {
RelationshipDto relationshipDto = new RelationshipDto();
relationshipDto.setComp_code("11");
relationshipDto.setMateriel_code("222");
relationshipDto.setIs_default("333");
relationshipDto.setIs_delete("444");
JSONObject initialization = crmApi.sendRelationship(relationshipDto);
if(!"0".equals(initialization.get("code"))){
throw new SelectorException(HttpStatus.INTERNAL_SERVER_ERROR.value(), "请求CRM接口异常!");
}
System.out.println(initialization.toString());
}
}
package cn.com.uitech.controller;
import cn.com.uitech.dto.ComboBox;
import cn.com.uitech.dto.FeatureAccessoriesClassifyDTO;
import cn.com.uitech.entity.FeatureAccessoriesClassifyEntity;
import cn.com.uitech.entity.FeatureAccessoriesEntity;
import cn.com.uitech.service.FeatureAccessoriesClassifyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: zhangjunwei
* @Date: 2021/11/9/10:35
* @Description:
* @version: 1.0
*/
@RestController
@RequestMapping("/classify")
@Api(tags = {"配件分类管理"})
public class FeatureAccessoriesClassifyController {
@Resource
private FeatureAccessoriesClassifyService featureAccessoriesClassifyService;
/**
* 配件分类列表查询
* @return
*/
@GetMapping("/list")
@ApiOperation(value = "获取配件分类列表", tags = {"获取配件分类列表"})
public List<FeatureAccessoriesClassifyDTO> getFeatureAccessoriesClassifyList() {
return featureAccessoriesClassifyService.getFeatureAccessoriesClassifyList();
}
/**
* 新增或修改配件分类
* @param featureAccessoriesClassifyEntity
*/
@PostMapping("/insertOrUpdate")
public FeatureAccessoriesClassifyEntity insertOrUpdateFeatureAccessoriesClassify(@RequestBody FeatureAccessoriesClassifyEntity featureAccessoriesClassifyEntity) {
featureAccessoriesClassifyService.insertOrUpdateFeatureAccessoriesClassify(featureAccessoriesClassifyEntity);
return featureAccessoriesClassifyEntity;
}
/**
* 删除配件分类
* @param featureAccessoriesClassifyEntity
*/
@PostMapping("/delete")
public void deleteFeatureAccessoriesClassify(@RequestBody FeatureAccessoriesClassifyEntity featureAccessoriesClassifyEntity) {
featureAccessoriesClassifyService.deleteFeatureAccessoriesClassify(featureAccessoriesClassifyEntity);
}
/**
* 查询所有配件分类-下拉框
* @return
*/
@GetMapping("/comboBox")
public List<ComboBox> getComboBox() {
return featureAccessoriesClassifyService.getComboBox();
}
/**
* 根据配件分类code查询配件列表
* @return
*/
@GetMapping("/getFeatureAccessories/{featureAccessoriesClassifyCode}")
public List<FeatureAccessoriesEntity> getFeatureAccessories(@PathVariable String featureAccessoriesClassifyCode) {
return featureAccessoriesClassifyService.getFeatureAccessories(featureAccessoriesClassifyCode);
}
}
package cn.com.uitech.controller;
import cn.com.uitech.dto.FeatureAccessoriesDTO;
import cn.com.uitech.entity.FeatureAccessoriesEntity;
import cn.com.uitech.service.FeatureAccessoriesService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @Author: ZXN
* @Date: 2021/10/29/15:41
* @Description: 配件维护
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@RestController
@RequestMapping("/accessories")
public class FeatureAccessoriesController {
@Resource
private FeatureAccessoriesService featureAccessoriesService;
/**
* 查询配件列表
*
* @param featureAccessoriesDTO
* @return
*/
@PostMapping("/list")
public PageInfo<FeatureAccessoriesEntity> getFeatureAccessoriesList(@RequestBody FeatureAccessoriesDTO featureAccessoriesDTO) {
return featureAccessoriesService.getFeatureAccessoriesList(featureAccessoriesDTO);
}
/**
* 新增或修改配件信息
*
* @param featureAccessoriesEntity
* @return
*/
@PostMapping("/insertOrUpdate")
public void insertOrUpdateFeatureAccessories(@RequestBody FeatureAccessoriesEntity featureAccessoriesEntity) {
featureAccessoriesService.insertOrUpdateFeatureAccessories(featureAccessoriesEntity);
}
/**
* 获取配件详情
*
* @param id
* @return
*/
@GetMapping("/getById/{id}")
public FeatureAccessoriesEntity getById(@PathVariable String id) {
return featureAccessoriesService.getById(id);
}
/**
* 删除配件信息
*
* @param id
* @return
*/
@GetMapping("/delete/{id}")
public void deleteFeatureAccessories(@PathVariable String id) {
featureAccessoriesService.deleteFeatureAccessories(id);
}
}
package cn.com.uitech.controller;
import cn.com.uitech.dto.FeatureComponentDTO;
import cn.com.uitech.entity.FeatureComponentEntity;
import cn.com.uitech.service.FeatureComponentService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @Author: ZXN
* @Date: 2021/10/15/15:52
* @Description: 部件管理
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@RestController
@RequestMapping("/component")
public class FeatureComponentController {
@Resource
private FeatureComponentService featureComponentService;
/**
* 分页获取部件列表
*
* @param featureComponentDTO
* @return
*/
@PostMapping("/list")
private PageInfo<FeatureComponentEntity> getFeatureComponentList(@RequestBody FeatureComponentDTO featureComponentDTO) {
return featureComponentService.getFeatureComponentList(featureComponentDTO);
}
/**
* 查询部件详情
*
* @param
* @return
*/
@GetMapping("/getByFeatureComponentCode/{featureComponentCode}")
private FeatureComponentEntity getFeatureComponentByFeatureComponentCode(@PathVariable String featureComponentCode) {
return featureComponentService.getFeatureComponentByFeatureComponentCode(featureComponentCode);
}
/**
* 新增部件信息
* @param featureComponentEntity
*/
@PostMapping("/insertOrUpdate")
private void insertOrUpdateFeatureComponent(@RequestBody FeatureComponentEntity featureComponentEntity) {
featureComponentService.insertOrUpdateFeatureComponent(featureComponentEntity);
}
/**
* 删除部件信息
* @param featureComponentEntity
*/
@PostMapping("/delete")
private void deleteFeatureComponent(@RequestBody FeatureComponentEntity featureComponentEntity) {
featureComponentService.deleteFeatureComponent(featureComponentEntity);
}
}
package cn.com.uitech.controller;
import cn.com.uitech.dto.ProductFeatureConstraintRelationshipDTO;
import cn.com.uitech.entity.FeatureComponentEntity;
import cn.com.uitech.entity.ProductFeatureConstraintRelationshipEntity;
import cn.com.uitech.exception.SelectorException;
import cn.com.uitech.service.ProductFeatureConstraintRelationshipService;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: ZXN
* @Date: 2021/11/07/14:15
* @Description: 约束关系维护
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@RestController
@RequestMapping("/constraint")
public class ProductFeatureConstraintRelationshipController {
@Resource
private ProductFeatureConstraintRelationshipService productFeatureConstraintRelationshipService;
/**
* 分页查询产品约束关系
*
* @param productFeatureConstraintRelationshipDTO
* @return
*/
@PostMapping("/list")
public PageInfo<ProductFeatureConstraintRelationshipEntity> getConstraintRelationshipList(@RequestBody ProductFeatureConstraintRelationshipDTO productFeatureConstraintRelationshipDTO) {
if (StringUtils.isBlank(productFeatureConstraintRelationshipDTO.getProductPrototypeCode())) {
throw new SelectorException(HttpStatus.INTERNAL_SERVER_ERROR.value(), "产品编号不能为空");
}
return productFeatureConstraintRelationshipService.getConstraintRelationshipList(productFeatureConstraintRelationshipDTO);
}
/**
* 根据约束关系ID查询约束关系详情
*
* @param tableId
* @return
*/
@GetMapping("/getOne/{tableId}")
public ProductFeatureConstraintRelationshipDTO getConstraintRelationshipById(@PathVariable String tableId) {
return productFeatureConstraintRelationshipService.getConstraintRelationshipById(tableId);
}
/**
* 新增或修改约束关系
*
* @param productFeatureConstraintRelationshipDTO
*/
@PostMapping("/insertOrUpdate")
public void insertOrUpdateConstraintRelationship(@RequestBody ProductFeatureConstraintRelationshipDTO productFeatureConstraintRelationshipDTO) {
productFeatureConstraintRelationshipService.insertOrUpdateConstraintRelationship(productFeatureConstraintRelationshipDTO);
}
/**
* 删除约束关系
*
* @param tableId
*/
@GetMapping("/delete/{tableId}")
public void deleteByTableId(@PathVariable String tableId) {
productFeatureConstraintRelationshipService.deleteByTableId(tableId);
}
/**
* 根据约束关系获取部件列表
* @param tableId
*/
@GetMapping("/getComponent/{tableId}")
public List<FeatureComponentEntity> getProductComponentRelation(@PathVariable String tableId) {
return productFeatureConstraintRelationshipService.getProductComponentRelation(tableId);
}
}
package cn.com.uitech.controller;
import cn.com.uitech.dto.ComboBox;
import cn.com.uitech.dto.ProductGroupDTO;
import cn.com.uitech.entity.ProductGroupEntity;
import cn.com.uitech.service.ProductGroupService;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:51
* @Description: 产品组管理
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@RestController
@RequestMapping("/productGroup")
public class ProductGroupController {
@Resource
private ProductGroupService productGroupService;
/**
* 分页查询产品组信息
* @return
*/
@PostMapping("/list")
public PageInfo<ProductGroupEntity> getProductGroupList(@RequestBody ProductGroupDTO productGroupDTO) {
return productGroupService.getProductGroupList(productGroupDTO);
}
/**
* 查询所有产品组
* @return
*/
@GetMapping("/listAll")
public List<ProductGroupEntity> getProductGroupListAll(@RequestHeader(name = "userId",required = false)String userId1,@RequestParam(name = "userId",required = false)String userId) {
if(StringUtils.isNotBlank(userId1)){
return productGroupService.getProductGroupListAll(userId1);
}
return productGroupService.getProductGroupListAll(userId);
}
/**
* 新增或修改产品组信息
* @param productGroupEntity
*/
@PostMapping("/insertOrUpdate")
public void insertOrUpdateProductGroup(@RequestBody ProductGroupEntity productGroupEntity) {
productGroupService.insertOrUpdateProductGroup(productGroupEntity);
}
/**
* 删除产品组信息
* @param productGroupEntity
*/
@PostMapping("/delete")
public void deleteProductGroup(@RequestBody ProductGroupEntity productGroupEntity) {
productGroupService.deleteProductGroup(productGroupEntity);
}
/**
* 查询所有产品组-下拉框
* @return
*/
@GetMapping("/comboBox")
public List<ComboBox> getComboBox(@RequestHeader(name = "userId",required = false)String userId) {
return productGroupService.getComboBox(userId);
}
/**
* 查询所有产品组-下拉框
* @return
*/
@GetMapping("/comboBoxProduct")
public List<ComboBox> getComboBoxProduct(@RequestHeader(name = "userId",required = false)String userId) {
return productGroupService.getComboBoxProduct(userId);
}
}
package cn.com.uitech.controller;
import cn.com.uitech.dto.ProductGroupUserMiddleDto;
import cn.com.uitech.service.ProductGroupUserMiddleService;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName ProductGroupUserMiddleController
* @createDate 2021/11/17 11:42
* @updateDate 2021/11/17 11:42
*/
@RestController
@RequestMapping("/userProductGroup")
public class ProductGroupUserMiddleController {
@Resource
private ProductGroupUserMiddleService productGroupUserMiddleService;
/**
* 新增或修改用户产品组信息
* @param productGroupUserMiddleDto
*/
@PostMapping("/insertOrUpdate")
public void insertOrUpdateProductGroup(@RequestBody ProductGroupUserMiddleDto productGroupUserMiddleDto) {
productGroupUserMiddleService.insertOrUpdate(productGroupUserMiddleDto);
}
/**
* 获取用户产品组信息
*
* @param userId 用户ID
* @return
*/
@GetMapping("/getByUserId/{userId}")
public ProductGroupUserMiddleDto getById(@PathVariable(name = "userId") String userId) {
return productGroupUserMiddleService.getByUserId(userId);
}
}
package cn.com.uitech.controller;
import cn.com.uitech.dto.ComboBox;
import cn.com.uitech.dto.FeatureComponentDTO;
import cn.com.uitech.dto.ProductLevelDTO;
import cn.com.uitech.entity.FeatureComponentEntity;
import cn.com.uitech.entity.ProductLevelEntity;
import cn.com.uitech.service.ProductLevelService;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @Author: ZXN
* @Date: 2021/10/13/16:35
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@RestController
@RequestMapping("/productLevel")
@Api(tags = {"产品层次管理"})
public class ProductLevelController {
@Resource
private ProductLevelService productLevelService;
/**
* 产品层次列表查询
* @return
*/
@GetMapping("/list")
@ApiOperation(value = "获取产品层次列表", tags = {"获取产品层次列表"})
public Map<String, List<ProductLevelDTO>> getProductLevelList(@RequestHeader(name = "userId",required = false)String userId) {
return productLevelService.getProductLevelList(userId);
}
/**
* 新增或修改产品层次
* @param productLevelEntity
*/
@PostMapping("/insertOrUpdate")
public ProductLevelEntity insertOrUpdateProductLevel(@RequestBody ProductLevelEntity productLevelEntity) {
productLevelService.insertOrUpdateProductLevel(productLevelEntity);
return productLevelEntity;
}
/**
* 删除产品层次
* @param productLevelEntity
*/
@PostMapping("/delete")
public void deleteProductLevel(@RequestBody ProductLevelEntity productLevelEntity) {
productLevelService.deleteProductLevel(productLevelEntity);
}
/**
* 查询所有产品层次-下拉框
* @return
*/
@GetMapping("/comboBox/{groupCode}")
public List<ComboBox> getComboBox(@PathVariable String groupCode) {
return productLevelService.getComboBox(groupCode);
}
/**
* 查询所有产品层次-下拉框-ALL
* @param userId 用户ID
* @return
*/
@GetMapping("/allComboBox")
public List<ComboBox> getAllComboBox(@RequestHeader(name = "userId",required = false)String userId) {
return productLevelService.getAllComboBox(userId);
}
/**
* 根据产品层次编码获取部件列表
* @return
*/
@PostMapping("/getComponentListByLevelCode")
public PageInfo<FeatureComponentEntity> getComponentList(@RequestBody FeatureComponentDTO featureComponentDTO) {
return productLevelService.getComponentList(featureComponentDTO);
}
/**
* 根据产品层次编码获取产品列表-下拉框
* @return
*/
@GetMapping("/getProductListByLevelCode/{levelCode}")
public List<ComboBox> getProductListByLevelCode(@PathVariable String levelCode) {
return productLevelService.getProductListByLevelCode(levelCode);
}
}
package cn.com.uitech.controller;
import cn.com.uitech.dto.ComboBox;
import cn.com.uitech.dto.ProductPrototypeDTO;
import cn.com.uitech.entity.FeatureComponentEntity;
import cn.com.uitech.entity.ProductPrototypeEntity;
import cn.com.uitech.service.ProductPrototypeService;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author: ZXN
* @Date: 2021/11/02/13:38
* @Description: 产品维护
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@RestController
@RequestMapping("/product")
public class ProductPrototypeController {
@Resource
private ProductPrototypeService productPrototypeService;
/**
* 分页查询产品信息列表
*
* @param productPrototypeDTO
* @return
*/
@PostMapping("/list")
public PageInfo<ProductPrototypeEntity> getProductPrototypeList(@RequestBody ProductPrototypeDTO productPrototypeDTO) {
return productPrototypeService.getProductPrototypeList(productPrototypeDTO);
}
/**
* 根据产品ID查询产品详细信息
*
* @param productPrototypeDTO
* @return
*/
@PostMapping("/getProductPrototype")
public ProductPrototypeEntity getProductPrototype(@RequestBody ProductPrototypeDTO productPrototypeDTO) {
return productPrototypeService.getProductPrototype(productPrototypeDTO);
}
/**
* 新增或修改产品
*
* @param productPrototypeEntity
* @return
*/
@PostMapping("/insertOrUpdate")
public void insertOrUpdateProductPrototype(@RequestBody ProductPrototypeEntity productPrototypeEntity) {
productPrototypeService.insertOrUpdateProductPrototype(productPrototypeEntity);
}
/**
* 删除产品
*
* @param productPrototypeCode
* @return
*/
@GetMapping("/delete/{productPrototypeCode}")
public void deleteProductPrototype(@PathVariable String productPrototypeCode) {
productPrototypeService.deleteProductPrototype(productPrototypeCode);
}
/**
* 查询所有产品-下拉框
* @return
*/
@GetMapping("/comboBox/{groupCode}")
public List<ComboBox> getComboBox(@PathVariable String groupCode) {
return productPrototypeService.getComboBox(groupCode);
}
/**
* 根据产品ID获取产品部件配件信息
*
* @param productPrototypeCode
* @return
*/
@GetMapping("/getComponent/{productPrototypeCode}")
public List<FeatureComponentEntity> getProductComponentRelation(@PathVariable String productPrototypeCode) {
return productPrototypeService.getProductComponentRelation(productPrototypeCode);
}
/**
* 修改产品状态
* @param productPrototypeEntity 产品信息
*/
@PostMapping("/updateStatus")
public void updateStatus(@RequestBody ProductPrototypeEntity productPrototypeEntity) {
productPrototypeService.updateStatus(productPrototypeEntity);
}
/**
* 根据CONFIGID校验产品信息是否不符合当前产品
*
* @param configId 配置单号
* @return
*/
@GetMapping("/verify/{configId}")
public Boolean verifyByConfigId(@PathVariable Long configId) {
return productPrototypeService.verifyByConfigId(configId);
}
/**
* 校验是否有约束关系失效问题
*
* @param productPrototypeEntity
*/
@PostMapping("/isAvailableUpdate")
public void isAvailableUpdate(@RequestBody ProductPrototypeEntity productPrototypeEntity) {
productPrototypeService.isAvailableUpdate(productPrototypeEntity);
}
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* @author ###
*/
@NoArgsConstructor
@Data
public class BuildConfigurationInputDTO implements Serializable {
/**
* productGroupCode : ###
* materialCode : ###
* operator : ###
* selectedComplete : true
* sessionId : 会话Id,服务记录total信息的值
* selectedCharacteristicList : [{"characteristicName":"特征名称","characteristicValueName":"特征值名称","quantity":1}]
* keyValues : [{"key":"mode","value":"edit"}]
*/
@NotNull
private String productGroupCode;
@NotNull
private String materialCode;
@NotNull
private String operator;
@NotNull
private Boolean selectedComplete;
@NotNull
private String sessionId;
@NotNull
@Size(min = 1)
private List<SelectedCharacteristicListBean> selectedCharacteristicList;
private List<KeyValuesBean> keyValues;
@NoArgsConstructor
@Data
public static class SelectedCharacteristicListBean implements Serializable {
/**
* characteristicName : 特征名称
* characteristicValueName : 特征值名称
* quantity : 1
*/
private String characteristicName;
private String characteristicValueName;
private int quantity;
private String desc;
}
@NoArgsConstructor
@Data
public static class KeyValuesBean implements Serializable {
/**
* key : mode
* value : edit
*/
private String key;
private String value;
}
}
package cn.com.uitech.dto;
import lombok.Data;
import java.util.List;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName ComboBox
* @createDate 2021/11/8 17:10
* @updateDate 2021/11/8 17:10
*/
@Data
public class ComboBox {
private String code;
private String value;
private String type;
private String parentGroupCode;
private List<ComboBox> childrenComboBox;
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @author ###
*/
@NoArgsConstructor
@Data
public class ConflictAnalysisInputDTO implements Serializable {
/**
* productGroupCode : 03
* materialCode : 90FYCTO1WW
* operator : LIUJJ16
* characteristicName : 特征名称
* characteristicValueName : 特征值名称
* sessionId : 会话Id,redis记录total特征信息,不用再传
* selectedCharacteristicList : [{"characteristicName":"特征名称","characteristicValueName":"特征值名称"}]
* mustSelection : false
*/
@NotNull
private String productGroupCode;
@NotNull
private String materialCode;
@NotNull
private String operator;
@NotNull
private String characteristicName;
@NotNull
private String characteristicValueName;
@NotNull
private String sessionId;
@NotNull
private Boolean mustSelection;
@NotNull
private List<SelectedCharacteristicListBean> selectedCharacteristicList;
@NoArgsConstructor
@Data
public static class SelectedCharacteristicListBean implements Serializable {
/**
* characteristicName : 特征名称
* characteristicValueName : 特征值名称
*/
private String characteristicName;
private String characteristicValueName;
}
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* @author ###
*/
@NoArgsConstructor
@Data
public class CopyConfigurationInputDTO implements Serializable {
/**
* operator : LIUJJ16
* configIds : ["1446766968451108866","1447040066106716161"]
*/
@NotNull
private String operator;
@NotNull
@Size(min =1)
private List<String> configIds;
}
package cn.com.uitech.dto;
import cn.com.uitech.entity.BasePageParam;
import lombok.Data;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName CrmApiQueryParamDto
* @createDate 2021/11/17 17:06
* @updateDate 2021/11/17 17:06
*/
@Data
public class CrmApiQueryParamDto extends BasePageParam {
/**
* 编号
*/
private String bomCode;
/**
* 名称
*/
private String bomName;
}
package cn.com.uitech.dto;
import lombok.Data;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName FeatureAccessoriesBomMiddleDto
* @createDate 2021/11/17 18:04
* @updateDate 2021/11/17 18:04
*/
@Data
public class FeatureAccessoriesBomMiddleDto {
private String featureAccessoriesCode;
private Integer isDefault;
private String bomCode;
private String bomDescription;
private String bomSpecification;
}
package cn.com.uitech.dto;
import lombok.Data;
import java.util.List;
/**
* @Author: zhangjunwei
* @Date: 2021/11/9/10:45
* @Description:
* @version: 1.0
*/
@Data
public class FeatureAccessoriesClassifyDTO {
private String featureAccessoriesClassifyCode;
private String featureAccessoriesClassifyName;
private String parentFeatureAccessoriesClassifyCode;
private String parentFeatureAccessoriesClassifyName;
private Integer sort;
private String description;
private String status;
private List<FeatureAccessoriesClassifyDTO> childFeatureAccessoriesClassify;
}
package cn.com.uitech.dto;
import cn.com.uitech.entity.BasePageParam;
import lombok.Data;
/**
* @Author: ZXN
* @Date: 2021/10/27/17:26
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
public class FeatureAccessoriesDTO extends BasePageParam {
private String featureAccessoriesCode;
private String featureAccessoriesName;
private Integer isSell;
private Integer isShow;
private Integer sort;
private String description;
private String remark;
private String salesType;
private String accessoriesType;
private String isServer;
private String serverCoefficient;
private String bomCode;
private String bomDescription;
private String bomSpecification;
private String id;
private String featureAccessoriesClassify;
}
package cn.com.uitech.dto;
import cn.com.uitech.entity.BasePageParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class FeatureComponentDTO extends BasePageParam {
private String productGroupCode;
private String productLevelCode;
private String featureComponentCode;
private String featureComponentName;
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
/**
* @author ###
*/
@NoArgsConstructor
@Data
public class GetConfigurationInputDTO {
/**
* operator : LIUJJ16
* configIds : ["1446766968451108866","1447040066106716161"]
*/
@NotNull
private String operator;
@NotNull
@Size(min = 1)
private List<String> configIds;
}
package cn.com.uitech.dto;
import lombok.Data;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName GroupUserMiddleDto
* @createDate 2021/11/22 17:35
* @updateDate 2021/11/22 17:35
*/
@Data
public class GroupUserMiddleDto {
private String user_id;
private String user_name;
private String id;
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@NoArgsConstructor
@Data
@Getter
public class InitializationInputDTO implements Serializable {
/**
* system : 调用系统
* productGroupCode : 产品组编号
* materialCode : 物料编号
* operator : ###
* configId :
* characteristicList : [{"Name":"特征名称,CTO下唯一","pairCharacteristicName":"匹配的数量型C","type":0,"isDerive":0,"values":[{"Name":"特征值Name,特征下唯一"}]}]
* keyValues : [{"key":"action","value":"edit"},{"key":"###","value":"###"}]
*/
private String system;
private String productGroupCode;
private String materialCode;
private String operator;
private String configId;
private List<CharacteristicListBean> characteristicList;
private List<KeyValuesBean> keyValues;
@NoArgsConstructor
@Data
public static class CharacteristicListBean implements Serializable {
/**
* Name : 特征名称,CTO下唯一
* pairCharacteristicName : 匹配的数量型C
* type : 0
* isDerive : 0
* values : [{"Name":"特征值Name,特征下唯一"}]
*/
private String name;
private String pairCharacteristicName;
private int type;
private int isDerive;
private List<ValuesBean> values;
@NoArgsConstructor
@Data
public static class ValuesBean implements Serializable {
/**
* Name : 特征值Name,特征下唯一
*/
private String name;
}
}
@NoArgsConstructor
@Data
public static class KeyValuesBean implements Serializable {
/**
* key : action
* value : edit
*/
private String key;
private String value;
}
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;
/**
* @author ###
*/
@NoArgsConstructor
@Data
public class PostVerifyInputDTO implements Serializable {
/**
* productGroupCode : 03
* materialCode : 90G3CTO1WW
* operator : LIUJJ16
* sessionId : 1447404367220871169
* selectedCharacteristicList : [{"characteristicName":"DTEXTERNAL_USB_PORT_CABLE","characteristicValueName":"FRONT_X4_REAR_X4_USB_PORTS","quantity":1},{"characteristicName":"DTPOWER_SUPPLY","characteristicValueName":"180W_85_ES_TFX","quantity":1}]
* keyValues : [{"key":"mode","value":"edit"}]
*/
@NotNull
private String productGroupCode;
@NotNull
private String materialCode;
@NotNull
private String operator;
@NotNull
private String sessionId;
@NotNull
@Size(min = 1)
private List<SelectedCharacteristicListBean> selectedCharacteristicList;
private List<KeyValuesBean> keyValues;
@NoArgsConstructor
@Data
public static class SelectedCharacteristicListBean implements Serializable {
/**
* characteristicName : DTEXTERNAL_USB_PORT_CABLE
* characteristicValueName : FRONT_X4_REAR_X4_USB_PORTS
* quantity : 1
*/
private String characteristicName;
private String characteristicValueName;
private int quantity;
}
@NoArgsConstructor
@Data
public static class KeyValuesBean implements Serializable {
/**
* key : mode
* value : edit
*/
private String key;
private String value;
}
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @author ###
*/
@NoArgsConstructor
@Data
public class PreVerifyInputDTO implements Serializable {
/**
* characteristicName : 特征Name
* productGroupCode : ##
* materialCode : ###
* operator : ###
* characteristicValueName : 特征值Name
* sessionId : 会话Id,redis记录total特征信息,不用再传
* keyValues : [{"key":"mode","value":"edit"}]
*/
@NotNull
private String characteristicName;
@NotNull
private String productGroupCode;
@NotNull
private String materialCode;
@NotNull
private String operator;
@NotNull
private String characteristicValueName;
@NotNull
private String sessionId;
@NotNull
private List<SelectedCharacteristicListBean> selectedCharacteristicList;
private List<KeyValuesBean> keyValues;
@NoArgsConstructor
@Data
public static class KeyValuesBean implements Serializable {
/**
* key : mode
* value : edit
*/
private String key;
private String value;
}
@NoArgsConstructor
@Data
public static class SelectedCharacteristicListBean implements Serializable {
/**
* characteristicName : ###
* characteristicValueName : ##
*/
private String characteristicName;
private String characteristicValueName;
}
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author ###
*/
@NoArgsConstructor
@Data
public class PreVerifyOutputDTO implements Serializable {
/**
* activeValues : [{"characteristicName":"###","values":["##"]},{"characteristicName":"###","values":["##","##","##"]}]
* message :
* result : true
*/
private String message;
private Boolean result;
private List<String> conflictingCharacteristicList;
private List<ActiveValuesBean> activeValues;
@NoArgsConstructor
@Data
public static class ActiveValuesBean implements Serializable {
/**
* characteristicName : ###
* values : ["##"]
*/
private String characteristicName;
private List<String> values;
}
}
package cn.com.uitech.dto;
import cn.com.uitech.entity.BasePageParam;
import lombok.Data;
import java.util.List;
/**
* @Author: ZXN
* @Date: 2021/11/07/14:14
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
public class ProductFeatureConstraintRelationshipDTO extends BasePageParam {
private String id;
private String productPrototypeCode;
private String tableName;
private String tableId;
private String productGroupCode;
private List<ProductFeatureConstraintRelationshipItemDTO> data;
}
package cn.com.uitech.dto;
import cn.com.uitech.entity.FeatureComponentEntity;
import lombok.Data;
import java.util.List;
/**
* @Author: ZXN
* @Date: 2021/11/07/14:40
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
public class ProductFeatureConstraintRelationshipItemDTO {
private String tableId;
private String groupNumber;
private List<FeatureComponentEntity> featureComponentEntityList;
}
package cn.com.uitech.dto;
import cn.com.uitech.entity.BasePageParam;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@EqualsAndHashCode(callSuper = true)
@Data
public class ProductGroupDTO extends BasePageParam {
/**
* 产品组编号
*/
private String productGroupCode;
/**
* 产品组名称
*/
private String productGroupName;
}
package cn.com.uitech.dto;
import cn.com.uitech.entity.ProductGroupEntity;
import lombok.Data;
import java.util.List;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName ProductGroupUserMiddleDto
* @createDate 2021/11/17 11:37
* @updateDate 2021/11/17 11:37
*/
@Data
public class ProductGroupUserMiddleDto {
private String userId;
private List<ProductGroupEntity> groupCodes;
}
package cn.com.uitech.dto;
import lombok.Data;
import java.util.List;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
public class ProductLevelDTO {
private String productLevelCode;
private String productLevelName;
private String productGroupCode;
private String productGroupName;
private String parentProductLevelCode;
private Integer sort;
private String description;
private String status;
private List<ProductLevelDTO> childProductLevel;
}
package cn.com.uitech.dto;
import lombok.Data;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName ProductPrototypeApiDTO
* @createDate 2021/11/10 11:21
* @updateDate 2021/11/10 11:21
*/
@Data
public class ProductPrototypeApiDTO {
/**
* 编号
*/
private String code;
/**
* 名称
*/
private String name;
/**
* 项目编号
*/
private String projectCode;
/**
* 物料规格
*/
private String materialSpec;
}
package cn.com.uitech.dto;
import cn.com.uitech.entity.BasePageParam;
import lombok.Data;
/**
* @Author: ZXN
* @Date: 2021/10/28/14:02
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
public class ProductPrototypeDTO extends BasePageParam {
private String productGroupCode;
private String productLevelCode;
private String productPrototypeCode;
private String productPrototypeName;
private String productPrototypeType;
private String productPrototypeModelNumber;
private String projectCode;
private Integer productPrototypeStatus;
private String description;
private String remark;
private Integer sort;
private String productPrototypeImagePath;
private String processorClassify;
private String libertyCondition;
}
package cn.com.uitech.dto;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @author zhangjunwei
* @version 0.0.1
* @ClassName RelationshipDto
* @createDate 2021/11/16 18:07
* @updateDate 2021/11/16 18:07
*/
@Data
@NoArgsConstructor
public class RelationshipDto {
private String comp_code;
private String materiel_code;
private String is_default;
private String is_delete;
}
package cn.com.uitech.entity;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import java.sql.Timestamp;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/20:46
* @Description: 抽取统一的操作信息
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public class BaseOperationParam{
private Timestamp createTime;
private Timestamp lastModifiedTime;
private String createBy;
private String lastModifiedBy;
@Basic
@Column(name = "create_time", nullable = true,updatable = false)
@CreatedDate
public Timestamp getCreateTime() {
return createTime;
}
public void setCreateTime(Timestamp createTime) {
this.createTime = createTime;
}
@Basic
@Column(name = "last_modified_time", nullable = true)
@LastModifiedDate
public Timestamp getLastModifiedTime() {
return lastModifiedTime;
}
public void setLastModifiedTime(Timestamp lastModifiedTime) {
this.lastModifiedTime = lastModifiedTime;
}
@Basic
@Column(name = "create_by", nullable = true, length = 50,updatable = false)
@CreatedBy
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
@Basic
@Column(name = "last_modified_by", nullable = true, length = 50)
@LastModifiedBy
public String getLastModifiedBy() {
return lastModifiedBy;
}
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BaseOperationParam that = (BaseOperationParam) o;
return Objects.equals(createTime, that.createTime) &&
Objects.equals(lastModifiedTime, that.lastModifiedTime) &&
Objects.equals(createBy, that.createBy) &&
Objects.equals(lastModifiedBy, that.lastModifiedBy);
}
@Override
public int hashCode() {
return Objects.hash(createTime, lastModifiedTime, createBy, lastModifiedBy);
}
}
package cn.com.uitech.entity;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/18:23
* @Description: 分页参数
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
public class BasePageParam implements Serializable {
@Transient
private Integer pageNum = 1;
@Transient
private Integer pageSize = 10;
public Integer getPageNum() {
return pageNum;
}
public void setPageNum(Integer pageNum) {
this.pageNum = pageNum;
}
public Integer getPageSize() {
return pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BasePageParam that = (BasePageParam) o;
return Objects.equals(pageNum, that.pageNum) &&
Objects.equals(pageSize, that.pageSize);
}
@Override
public int hashCode() {
return Objects.hash(pageNum, pageSize);
}
@Override
public String toString() {
return "BasePageParam{" +
"pageNum=" + pageNum +
", pageSize=" + pageSize +
'}';
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/27/17:26
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "feature_accessories_bom_middle_table", schema = "public", catalog = "selector")
public class FeatureAccessoriesBomMiddleTableEntity extends BaseOperationParam {
private String featureAccessoriesCode;
private Integer isDefault;
private String bomCode;
private String bomName;
private String bomDescription;
private String bomSpecification;
private String id;
@Basic
@Column(name = "feature_accessories_code", nullable = true, length = 255)
public String getFeatureAccessoriesCode() {
return featureAccessoriesCode;
}
public void setFeatureAccessoriesCode(String featureAccessoriesCode) {
this.featureAccessoriesCode = featureAccessoriesCode;
}
@Basic
@Column(name = "is_default", nullable = true)
public Integer getIsDefault() {
return isDefault;
}
public void setIsDefault(Integer isDefault) {
this.isDefault = isDefault;
}
@Id
@Basic
@Column(name = "id", nullable = true, length = 255)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Basic
@Column(name = "bom_code", nullable = true, length = 255)
public String getBomCode() {
return bomCode;
}
public void setBomCode(String bomCode) {
this.bomCode = bomCode;
}
@Basic
@Column(name = "bom_name", nullable = true, length = 255)
public String getBomName() {
return bomName;
}
public void setBomName(String bomName) {
this.bomName = bomName;
}
@Basic
@Column(name = "bom_description", nullable = true, length = 255)
public String getBomDescription() {
return bomDescription;
}
public void setBomDescription(String bomDescription) {
this.bomDescription = bomDescription;
}
@Basic
@Column(name = "bom_specification", nullable = true, length = 255)
public String getBomSpecification() {
return bomSpecification;
}
public void setBomSpecification(String bomSpecification) {
this.bomSpecification = bomSpecification;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
FeatureAccessoriesBomMiddleTableEntity that = (FeatureAccessoriesBomMiddleTableEntity) o;
return Objects.equals(featureAccessoriesCode, that.featureAccessoriesCode) &&
Objects.equals(isDefault, that.isDefault) &&
Objects.equals(bomCode, that.bomCode) &&
Objects.equals(bomDescription, that.bomDescription) &&
Objects.equals(bomSpecification, that.bomSpecification);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), featureAccessoriesCode, isDefault, bomCode, bomDescription, bomSpecification);
}
}
package cn.com.uitech.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: zhangjunwei
* @Date: 2021/11/9/10:49
* @Description:
* @version: 1.0
*/
@Entity
@Table(name = "feature_accessories_classify", schema = "public", catalog = "selector")
@ApiModel(description = "配件分类实体类")
public class FeatureAccessoriesClassifyEntity extends BaseOperationParam{
@ApiModelProperty(name = "featureAccessoriesClassifyCode", value = "配件分类编号", required = true)
private String featureAccessoriesClassifyCode;
@ApiModelProperty(name = "parentFeatureAccessoriesClassifyCode", value = "父级配件分类编号", required = true)
private String parentFeatureAccessoriesClassifyCode;
@ApiModelProperty(name = "featureAccessoriesClassifyName", value = "配件分类名称", required = true)
private String featureAccessoriesClassifyName;
@ApiModelProperty(name = "sort", value = "排序", required = true)
private Integer sort;
@ApiModelProperty(name = "description", value = "描述", required = true)
private String description;
@ApiModelProperty(name = "status", value = "状态", required = true)
private String status;
@Basic
@Column(name = "status", nullable = true)
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Id
@Basic
@Column(name = "feature_accessories_classify_code", nullable = true, length = 255)
public String getFeatureAccessoriesClassifyCode() {
return featureAccessoriesClassifyCode;
}
public void setFeatureAccessoriesClassifyCode(String featureAccessoriesClassifyCode) {
this.featureAccessoriesClassifyCode = featureAccessoriesClassifyCode;
}
@Basic
@Column(name = "feature_accessories_classify_name", nullable = true, length = 255)
public String getFeatureAccessoriesClassifyName() {
return featureAccessoriesClassifyName;
}
public void setFeatureAccessoriesClassifyName(String featureAccessoriesClassifyName) {
this.featureAccessoriesClassifyName = featureAccessoriesClassifyName;
}
@Basic
@Column(name = "sort", nullable = true)
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Basic
@Column(name = "description", nullable = true, length = -1)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Basic
@Column(name = "parent_feature_accessories_classify_code", nullable = true, length = 255)
public String getParentFeatureAccessoriesClassifyCode() {
return parentFeatureAccessoriesClassifyCode;
}
public void setParentFeatureAccessoriesClassifyCode(String parentFeatureAccessoriesClassifyCode) {
this.parentFeatureAccessoriesClassifyCode = parentFeatureAccessoriesClassifyCode;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
FeatureAccessoriesClassifyEntity that = (FeatureAccessoriesClassifyEntity) o;
return Objects.equals(featureAccessoriesClassifyCode, that.featureAccessoriesClassifyCode) &&
Objects.equals(featureAccessoriesClassifyName, that.featureAccessoriesClassifyName) &&
Objects.equals(sort, that.sort) &&
Objects.equals(description, that.description) &&
Objects.equals(status, that.status);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), featureAccessoriesClassifyCode, featureAccessoriesClassifyName, sort, description, status);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/27/17:26
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "feature_accessories", schema = "public", catalog = "selector")
public class FeatureAccessoriesEntity extends BaseOperationParam {
private String featureAccessoriesCode;
private String featureAccessoriesName;
private Integer isSell;
private Integer isShow;
private Integer sort;
private String description;
private String remark;
private String salesType;
private String accessoriesType;
private String isServer;
private String serverCoefficient;
private String bomCode;
private String bomDescription;
private String bomSpecification;
private Integer isScalarAccessories;
private String id;
private String productModel;
private String projectCode;
private String featureAccessoriesClassify;
private String featureAccessoriesClassifyName;
private Boolean isDefault;
private String factoryName;
private String salesName;
private String salesWay;
/**
* 配件物料关系列表
*/
private List<FeatureAccessoriesBomMiddleTableEntity> bomMiddleTableEntityList;
@Basic
@Column(name = "feature_accessories_code", nullable = true, length = 255)
public String getFeatureAccessoriesCode() {
return featureAccessoriesCode;
}
public void setFeatureAccessoriesCode(String featureAccessoriesCode) {
this.featureAccessoriesCode = featureAccessoriesCode;
}
@Basic
@Column(name = "feature_accessories_name", nullable = true, length = 255)
public String getFeatureAccessoriesName() {
return featureAccessoriesName;
}
public void setFeatureAccessoriesName(String featureAccessoriesName) {
this.featureAccessoriesName = featureAccessoriesName;
}
@Basic
@Column(name = "is_sell", nullable = true)
public Integer getIsSell() {
return isSell;
}
public void setIsSell(Integer isSell) {
this.isSell = isSell;
}
@Basic
@Column(name = "is_show", nullable = true)
public Integer getIsShow() {
return isShow;
}
public void setIsShow(Integer isShow) {
this.isShow = isShow;
}
@Basic
@Column(name = "sort", nullable = true)
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Basic
@Column(name = "description", nullable = true, length = -1)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Basic
@Column(name = "remark", nullable = true, length = -1)
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Basic
@Column(name = "sales_type", nullable = true, length = 255)
public String getSalesType() {
return salesType;
}
public void setSalesType(String salesType) {
this.salesType = salesType;
}
@Basic
@Column(name = "accessories_type", nullable = true, length = 255)
public String getAccessoriesType() {
return accessoriesType;
}
public void setAccessoriesType(String accessoriesType) {
this.accessoriesType = accessoriesType;
}
@Basic
@Column(name = "is_server", nullable = true, length = 255)
public String getIsServer() {
return isServer;
}
public void setIsServer(String isServer) {
this.isServer = isServer;
}
@Basic
@Column(name = "server_coefficient", nullable = true, length = 255)
public String getServerCoefficient() {
return serverCoefficient;
}
public void setServerCoefficient(String serverCoefficient) {
this.serverCoefficient = serverCoefficient;
}
@Basic
@Column(name = "bom_code", nullable = true, length = 255)
public String getBomCode() {
return bomCode;
}
public void setBomCode(String bomCode) {
this.bomCode = bomCode;
}
@Basic
@Column(name = "bom_description", nullable = true, length = 255)
public String getBomDescription() {
return bomDescription;
}
public void setBomDescription(String bomDescription) {
this.bomDescription = bomDescription;
}
@Basic
@Column(name = "bom_specification", nullable = true, length = 255)
public String getBomSpecification() {
return bomSpecification;
}
public void setBomSpecification(String bomSpecification) {
this.bomSpecification = bomSpecification;
}
@Basic
@Column(name = "is_scalar_accessories", nullable = true, length = 255)
public Integer getIsScalarAccessories() {
return isScalarAccessories;
}
public void setIsScalarAccessories(Integer isScalarAccessories) {
this.isScalarAccessories = isScalarAccessories;
}
@Id
@Basic
@Column(name = "id", nullable = true, length = 255)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Basic
@Column(name = "product_model", nullable = true, length = 255)
public String getProductModel() {
return productModel;
}
public void setProductModel(String productModel) {
this.productModel = productModel;
}
@Basic
@Column(name = "project_code", nullable = true, length = 255)
public String getProjectCode() {
return projectCode;
}
public void setProjectCode(String projectCode) {
this.projectCode = projectCode;
}
@Basic
@Column(name = "feature_accessories_classify", nullable = true, length = 255)
public String getFeatureAccessoriesClassify() {
return featureAccessoriesClassify;
}
public void setFeatureAccessoriesClassify(String featureAccessoriesClassify) {
this.featureAccessoriesClassify = featureAccessoriesClassify;
}
@Transient
public String getFeatureAccessoriesClassifyName() {
return featureAccessoriesClassifyName;
}
public void setFeatureAccessoriesClassifyName(String featureAccessoriesClassifyName) {
this.featureAccessoriesClassifyName = featureAccessoriesClassifyName;
}
@Transient
public Boolean getDefault() {
return isDefault;
}
public void setDefault(Boolean aDefault) {
isDefault = aDefault;
}
@Basic
@Column(name = "factory_name", nullable = true, length = 255)
public String getFactoryName() {
return factoryName;
}
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
@Basic
@Column(name = "sales_name", nullable = true, length = 255)
public String getSalesName() {
return salesName;
}
public void setSalesName(String salesName) {
this.salesName = salesName;
}
@Basic
@Column(name = "sales_way", nullable = true, length = 255)
public String getSalesWay() {
return salesWay;
}
public void setSalesWay(String salesWay) {
this.salesWay = salesWay;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
FeatureAccessoriesEntity that = (FeatureAccessoriesEntity) o;
return Objects.equals(featureAccessoriesCode, that.featureAccessoriesCode) &&
Objects.equals(featureAccessoriesName, that.featureAccessoriesName) &&
Objects.equals(isSell, that.isSell) &&
Objects.equals(isShow, that.isShow) &&
Objects.equals(sort, that.sort) &&
Objects.equals(description, that.description) &&
Objects.equals(remark, that.remark) &&
Objects.equals(salesType, that.salesType) &&
Objects.equals(accessoriesType, that.accessoriesType) &&
Objects.equals(isServer, that.isServer) &&
Objects.equals(serverCoefficient, that.serverCoefficient) &&
Objects.equals(bomCode, that.bomCode) &&
Objects.equals(bomDescription, that.bomDescription) &&
Objects.equals(bomSpecification, that.bomSpecification) &&
Objects.equals(isScalarAccessories, that.isScalarAccessories) &&
Objects.equals(id, that.id) &&
Objects.equals(productModel, that.productModel) &&
Objects.equals(projectCode, that.projectCode) &&
Objects.equals(featureAccessoriesClassify, that.featureAccessoriesClassify);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), featureAccessoriesCode, featureAccessoriesName, isSell, isShow, sort, description, remark, salesType, accessoriesType, isServer, serverCoefficient, bomCode, bomDescription, bomSpecification, isScalarAccessories, id, productModel, projectCode, featureAccessoriesClassify);
}
@Transient
public List<FeatureAccessoriesBomMiddleTableEntity> getBomMiddleTableEntityList() {
return bomMiddleTableEntityList;
}
public void setBomMiddleTableEntityList(List<FeatureAccessoriesBomMiddleTableEntity> bomMiddleTableEntityList) {
this.bomMiddleTableEntityList = bomMiddleTableEntityList;
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "feature_component_accessories_middle_table", schema = "public", catalog = "selector")
public class FeatureComponentAccessoriesMiddleTableEntity extends BaseOperationParam {
private String id;
private String featureComponentCode;
private String featureAccessoriesCode;
public FeatureComponentAccessoriesMiddleTableEntity() {
}
public FeatureComponentAccessoriesMiddleTableEntity(String id, String featureComponentCode, String featureAccessoriesCode) {
this.id = id;
this.featureComponentCode = featureComponentCode;
this.featureAccessoriesCode = featureAccessoriesCode;
}
@Id
@Basic
@Column(name = "id", nullable = true, length = 255)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Basic
@Column(name = "feature_component_code", nullable = true, length = 255)
public String getFeatureComponentCode() {
return featureComponentCode;
}
public void setFeatureComponentCode(String featureComponentCode) {
this.featureComponentCode = featureComponentCode;
}
@Basic
@Column(name = "feature_accessories_code", nullable = true, length = 255)
public String getFeatureAccessoriesCode() {
return featureAccessoriesCode;
}
public void setFeatureAccessoriesCode(String featureAccessoriesCode) {
this.featureAccessoriesCode = featureAccessoriesCode;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
FeatureComponentAccessoriesMiddleTableEntity that = (FeatureComponentAccessoriesMiddleTableEntity) o;
return Objects.equals(id, that.id) &&
Objects.equals(featureComponentCode, that.featureComponentCode) &&
Objects.equals(featureAccessoriesCode, that.featureAccessoriesCode);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), id, featureComponentCode, featureAccessoriesCode);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "feature_component", schema = "public", catalog = "selector")
public class FeatureComponentEntity extends BaseOperationParam {
private String productGroupCode;
private String productLevelCode;
private String featureComponentCode;
private String featureComponentName;
private String factoryName;
private String salesName;
private Integer isShow;
private Integer sort;
private String remark;
private Integer isScalarType;
private String description;
private Boolean isDefault;
private String status;
private String featureAccessoriesClassify;
/**
* 配件信息列表
*/
private List<FeatureAccessoriesEntity> featureAccessoriesEntityList;
private List<FeatureAccessoriesEntity> featureAccessoriesCodes;
/**
* 数量型C数量列表
*/
private List<FeatureAccessoriesEntity> scalarTypeList;
public FeatureComponentEntity() {
}
public FeatureComponentEntity(String featureComponentCode) {
this.featureComponentCode = featureComponentCode;
}
@Transient
public List<FeatureAccessoriesEntity> getFeatureAccessoriesEntityList() {
return featureAccessoriesEntityList;
}
public void setFeatureAccessoriesEntityList(List<FeatureAccessoriesEntity> featureAccessoriesEntityList) {
this.featureAccessoriesEntityList = featureAccessoriesEntityList;
}
@Basic
@Column(name = "product_group_code", nullable = true, length = 255)
public String getProductGroupCode() {
return productGroupCode;
}
public void setProductGroupCode(String productGroupCode) {
this.productGroupCode = productGroupCode;
}
@Basic
@Column(name = "product_level_code", nullable = true, length = 255)
public String getProductLevelCode() {
return productLevelCode;
}
public void setProductLevelCode(String productLevelCode) {
this.productLevelCode = productLevelCode;
}
@Id
@Basic
@Column(name = "feature_component_code", nullable = true, length = 255)
public String getFeatureComponentCode() {
return featureComponentCode;
}
public void setFeatureComponentCode(String featureComponentCode) {
this.featureComponentCode = featureComponentCode;
}
@Basic
@Column(name = "feature_component_name", nullable = true, length = 255)
public String getFeatureComponentName() {
return featureComponentName;
}
public void setFeatureComponentName(String featureComponentName) {
this.featureComponentName = featureComponentName;
}
@Basic
@Column(name = "factory_name", nullable = true, length = 255)
public String getFactoryName() {
return factoryName;
}
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
@Basic
@Column(name = "sales_name", nullable = true, length = 255)
public String getSalesName() {
return salesName;
}
public void setSalesName(String salesName) {
this.salesName = salesName;
}
@Basic
@Column(name = "is_show", nullable = true)
public Integer getIsShow() {
return isShow;
}
public void setIsShow(Integer isShow) {
this.isShow = isShow;
}
@Basic
@Column(name = "sort", nullable = true)
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Basic
@Column(name = "remark", nullable = true, length = -1)
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Basic
@Column(name = "is_scalar_type", nullable = true)
public Integer getIsScalarType() {
return isScalarType;
}
public void setIsScalarType(Integer isScalarType) {
this.isScalarType = isScalarType;
}
@Basic
@Column(name = "description", nullable = true, length = -1)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Basic
@Column(name = "feature_accessories_classify", nullable = true, length = 255)
public String getFeatureAccessoriesClassify() {
return featureAccessoriesClassify;
}
public void setFeatureAccessoriesClassify(String featureAccessoriesClassify) {
this.featureAccessoriesClassify = featureAccessoriesClassify;
}
@Transient
public List<FeatureAccessoriesEntity> getScalarTypeList() {
return scalarTypeList;
}
public void setScalarTypeList(List<FeatureAccessoriesEntity> scalarTypeList) {
this.scalarTypeList = scalarTypeList;
}
@Transient
public List<FeatureAccessoriesEntity> getFeatureAccessoriesCodes() {
return featureAccessoriesCodes;
}
public void setFeatureAccessoriesCodes(List<FeatureAccessoriesEntity> featureAccessoriesCodes) {
this.featureAccessoriesCodes = featureAccessoriesCodes;
}
@Transient
public Boolean getDefault() {
return isDefault;
}
public void setDefault(Boolean aDefault) {
isDefault = aDefault;
}
@Transient
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
FeatureComponentEntity that = (FeatureComponentEntity) o;
return Objects.equals(productGroupCode, that.productGroupCode) &&
Objects.equals(productLevelCode, that.productLevelCode) &&
Objects.equals(featureComponentCode, that.featureComponentCode) &&
Objects.equals(featureComponentName, that.featureComponentName) &&
Objects.equals(factoryName, that.factoryName) &&
Objects.equals(salesName, that.salesName) &&
Objects.equals(isShow, that.isShow) &&
Objects.equals(sort, that.sort) &&
Objects.equals(remark, that.remark) &&
Objects.equals(isScalarType, that.isScalarType) &&
Objects.equals(description, that.description) &&
Objects.equals(featureAccessoriesClassify, that.featureAccessoriesClassify) &&
Objects.equals(featureAccessoriesEntityList, that.featureAccessoriesEntityList) &&
Objects.equals(scalarTypeList, that.scalarTypeList);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), productGroupCode, productLevelCode, featureComponentCode, featureComponentName, factoryName, salesName, isShow, sort, remark, isScalarType, description, featureAccessoriesEntityList, scalarTypeList);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "feature_scalar_type_middle_table", schema = "public", catalog = "selector")
public class FeatureScalarTypeMiddleTableEntity extends BaseOperationParam {
private String featureComponentCode;
private String featureScalarTypeCode;
public FeatureScalarTypeMiddleTableEntity() {
}
public FeatureScalarTypeMiddleTableEntity(String featureComponentCode, String featureScalarTypeCode) {
this.featureComponentCode = featureComponentCode;
this.featureScalarTypeCode = featureScalarTypeCode;
}
@Id
@Basic
@Column(name = "feature_component_code", nullable = true, length = 255)
public String getFeatureComponentCode() {
return featureComponentCode;
}
public void setFeatureComponentCode(String featureComponentCode) {
this.featureComponentCode = featureComponentCode;
}
@Basic
@Column(name = "feature_scalar_type_code", nullable = true, length = 255)
public String getFeatureScalarTypeCode() {
return featureScalarTypeCode;
}
public void setFeatureScalarTypeCode(String featureScalarTypeCode) {
this.featureScalarTypeCode = featureScalarTypeCode;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FeatureScalarTypeMiddleTableEntity that = (FeatureScalarTypeMiddleTableEntity) o;
return Objects.equals(featureComponentCode, that.featureComponentCode) &&
Objects.equals(featureScalarTypeCode, that.featureScalarTypeCode);
}
@Override
public int hashCode() {
return Objects.hash(featureComponentCode, featureScalarTypeCode);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/11/07/14:14
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_feature_constraint_relationship", schema = "public", catalog = "selector")
public class ProductFeatureConstraintRelationshipEntity extends BaseOperationParam{
private String id;
private String productPrototypeCode;
private String tableName;
private String tableId;
private List<ProductFeatureConstraintRelationshipItemEntity> productFeatureConstraintRelationshipItemEntities;
public ProductFeatureConstraintRelationshipEntity() {
}
public ProductFeatureConstraintRelationshipEntity(String id, String productPrototypeCode, String tableName, String tableId) {
this.id = id;
this.productPrototypeCode = productPrototypeCode;
this.tableName = tableName;
this.tableId = tableId;
}
@Id
@Basic
@Column(name = "id", nullable = false, length = 255)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Basic
@Column(name = "product_prototype_code", nullable = true, length = 255)
public String getProductPrototypeCode() {
return productPrototypeCode;
}
public void setProductPrototypeCode(String productPrototypeCode) {
this.productPrototypeCode = productPrototypeCode;
}
@Basic
@Column(name = "table_name", nullable = true, length = 255)
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
@Basic
@Column(name = "table_id", nullable = true, length = 255)
public String getTableId() {
return tableId;
}
public void setTableId(String tableId) {
this.tableId = tableId;
}
@Transient
public List<ProductFeatureConstraintRelationshipItemEntity> getProductFeatureConstraintRelationshipItemEntities() {
return productFeatureConstraintRelationshipItemEntities;
}
public void setProductFeatureConstraintRelationshipItemEntities(List<ProductFeatureConstraintRelationshipItemEntity> productFeatureConstraintRelationshipItemEntities) {
this.productFeatureConstraintRelationshipItemEntities = productFeatureConstraintRelationshipItemEntities;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ProductFeatureConstraintRelationshipEntity that = (ProductFeatureConstraintRelationshipEntity) o;
return Objects.equals(id, that.id) &&
Objects.equals(productPrototypeCode, that.productPrototypeCode) &&
Objects.equals(tableName, that.tableName) &&
Objects.equals(tableId, that.tableId);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), id, productPrototypeCode, tableName, tableId);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/11/07/14:40
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_feature_constraint_relationship_item", schema = "public", catalog = "selector")
public class ProductFeatureConstraintRelationshipItemEntity extends BaseOperationParam{
private String id;
private String tableId;
private String groupNumber;
private String featureComponentCode;
private String featureAccessoriesCode;
public ProductFeatureConstraintRelationshipItemEntity() {
}
public ProductFeatureConstraintRelationshipItemEntity(String id, String tableId, String groupNumber, String featureComponentCode, String featureAccessoriesCode) {
this.id = id;
this.tableId = tableId;
this.groupNumber = groupNumber;
this.featureComponentCode = featureComponentCode;
this.featureAccessoriesCode = featureAccessoriesCode;
}
@Id
@Basic
@Column(name = "id", nullable = true)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Basic
@Column(name = "table_id", nullable = true)
public String getTableId() {
return tableId;
}
public void setTableId(String tableId) {
this.tableId = tableId;
}
@Basic
@Column(name = "group_number", nullable = true)
public String getGroupNumber() {
return groupNumber;
}
public void setGroupNumber(String groupNumber) {
this.groupNumber = groupNumber;
}
@Basic
@Column(name = "feature_component_code", nullable = true, length = 255)
public String getFeatureComponentCode() {
return featureComponentCode;
}
public void setFeatureComponentCode(String featureComponentCode) {
this.featureComponentCode = featureComponentCode;
}
@Basic
@Column(name = "feature_accessories_code", nullable = true, length = 255)
public String getFeatureAccessoriesCode() {
return featureAccessoriesCode;
}
public void setFeatureAccessoriesCode(String featureAccessoriesCode) {
this.featureAccessoriesCode = featureAccessoriesCode;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ProductFeatureConstraintRelationshipItemEntity that = (ProductFeatureConstraintRelationshipItemEntity) o;
return Objects.equals(id, that.id) &&
Objects.equals(tableId, that.tableId) &&
Objects.equals(groupNumber, that.groupNumber) &&
Objects.equals(featureComponentCode, that.featureComponentCode) &&
Objects.equals(featureAccessoriesCode, that.featureAccessoriesCode);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), id, tableId, groupNumber, featureComponentCode, featureAccessoriesCode);
}
}
package cn.com.uitech.entity;
import cn.com.uitech.dto.GroupUserMiddleDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_group", schema = "public", catalog = "selector")
@ApiModel(description = "产品组实体类")
public class ProductGroupEntity extends BaseOperationParam {
private String id;
@Id
@Basic
@Column(name = "id", nullable = false)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@ApiModelProperty(name = "productGroupCode", value = "产品组编号", required = true)
private String productGroupCode;
@ApiModelProperty(name = "productGroupName", value = "产品组名称", required = true)
private String productGroupName;
@ApiModelProperty(name = "sort", value = "排序", required = true)
private Integer sort;
@ApiModelProperty(name = "description", value = "描述", required = true)
private String description;
@ApiModelProperty(name = "userList", value = "所选用户", required = true)
private List<GroupUserMiddleDto> groupUserMiddleDtoList;
public ProductGroupEntity(String productGroupCode, String productGroupName, Integer sort, String description) {
this.productGroupCode = productGroupCode;
this.productGroupName = productGroupName;
this.sort = sort;
this.description = description;
}
public ProductGroupEntity() {
super();
}
@Basic
@Column(name = "product_group_code", nullable = false, length = 50)
public String getProductGroupCode() {
return productGroupCode;
}
public void setProductGroupCode(String productGroupCode) {
this.productGroupCode = productGroupCode;
}
@Basic
@Column(name = "product_group_name", nullable = false, length = 255)
public String getProductGroupName() {
return productGroupName;
}
public void setProductGroupName(String productGroupName) {
this.productGroupName = productGroupName;
}
@Basic
@Column(name = "sort", nullable = true)
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Basic
@Column(name = "description", nullable = true, length = -1)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Transient
public List<GroupUserMiddleDto> getGroupUserMiddleDtoList() {
return groupUserMiddleDtoList;
}
public void setGroupUserMiddleDtoList(List<GroupUserMiddleDto> groupUserMiddleDtoList) {
this.groupUserMiddleDtoList = groupUserMiddleDtoList;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ProductGroupEntity that = (ProductGroupEntity) o;
return Objects.equals(id, that.id) &&
Objects.equals(productGroupCode, that.productGroupCode) &&
Objects.equals(productGroupName, that.productGroupName) &&
Objects.equals(sort, that.sort) &&
Objects.equals(description, that.description);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), id, productGroupCode, productGroupName, sort, description);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_group_level_component_middle_table", schema = "public", catalog = "selector")
public class ProductGroupLevelComponentMiddleTableEntity extends BaseOperationParam{
private String productGroupCode;
private String productLevelCode;
private String featureComponentCode;
@Id
@Basic
@Column(name = "product_group_code", nullable = false, length = 255)
public String getProductGroupCode() {
return productGroupCode;
}
public void setProductGroupCode(String productGroupCode) {
this.productGroupCode = productGroupCode;
}
@Basic
@Column(name = "product_level_code", nullable = true, length = 255)
public String getProductLevelCode() {
return productLevelCode;
}
public void setProductLevelCode(String productLevelCode) {
this.productLevelCode = productLevelCode;
}
@Basic
@Column(name = "feature_component_code", nullable = false, length = 255)
public String getFeatureComponentCode() {
return featureComponentCode;
}
public void setFeatureComponentCode(String featureComponentCode) {
this.featureComponentCode = featureComponentCode;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ProductGroupLevelComponentMiddleTableEntity that = (ProductGroupLevelComponentMiddleTableEntity) o;
return Objects.equals(productGroupCode, that.productGroupCode) &&
Objects.equals(productLevelCode, that.productLevelCode) &&
Objects.equals(featureComponentCode, that.featureComponentCode);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), productGroupCode, productLevelCode, featureComponentCode);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_group_level_middle_table", schema = "public", catalog = "selector")
public class ProductGroupLevelMiddleTableEntity extends BaseOperationParam{
private String productGroupCode;
private String productLevelCode;
@Id
@Basic
@Column(name = "product_group_code", nullable = false, length = 255)
public String getProductGroupCode() {
return productGroupCode;
}
public void setProductGroupCode(String productGroupCode) {
this.productGroupCode = productGroupCode;
}
@Basic
@Column(name = "product_level_code", nullable = false, length = 255)
public String getProductLevelCode() {
return productLevelCode;
}
public void setProductLevelCode(String productLevelCode) {
this.productLevelCode = productLevelCode;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ProductGroupLevelMiddleTableEntity that = (ProductGroupLevelMiddleTableEntity) o;
return Objects.equals(productGroupCode, that.productGroupCode) &&
Objects.equals(productLevelCode, that.productLevelCode);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), productGroupCode, productLevelCode);
}
}
package cn.com.uitech.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: zhangjunwei
* @Date: 2021/11/17/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_group_user_middle_table", schema = "public", catalog = "selector")
@ApiModel(description = "产品组用户中间表实体类")
public class ProductGroupUserMiddleTableEntity extends BaseOperationParam {
@ApiModelProperty(name = "productGroupCode", value = "产品组编号", required = true)
private String productGroupCode;
@ApiModelProperty(name = "userId", value = "用户ID", required = true)
private String userId;
private String id;
@ApiModelProperty(name = "userName", value = "用户名称", required = true)
private String userName;
public ProductGroupUserMiddleTableEntity() {
super();
}
@Basic
@Column(name = "product_group_code", nullable = false, length = 50)
public String getProductGroupCode() {
return productGroupCode;
}
public void setProductGroupCode(String productGroupCode) {
this.productGroupCode = productGroupCode;
}
@Basic
@Column(name = "user_id", nullable = false, length = 255)
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ProductGroupUserMiddleTableEntity that = (ProductGroupUserMiddleTableEntity) o;
return Objects.equals(productGroupCode, that.productGroupCode) &&
Objects.equals(userId, that.userId);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), productGroupCode, userId);
}
@Id
@Basic
@Column(name = "id", nullable = false, length = 255)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Basic
@Column(name = "user_name", nullable = false, length = 255)
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
}
package cn.com.uitech.entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_level", schema = "public", catalog = "selector")
@ApiModel(description = "产品层次实体类")
public class ProductLevelEntity extends BaseOperationParam{
@ApiModelProperty(name = "productLevelCode", value = "产品层次编号", required = true)
private String productLevelCode;
@ApiModelProperty(name = "parentProductLevelCode", value = "父级层次编号", required = true)
private String parentProductLevelCode;
@ApiModelProperty(name = "productGroupCode", value = "产品组编号", required = true)
private String productGroupCode;
@ApiModelProperty(name = "productLevelName", value = "产品层次名称", required = true)
private String productLevelName;
@ApiModelProperty(name = "sort", value = "排序", required = true)
private Integer sort;
@ApiModelProperty(name = "description", value = "描述", required = true)
private String description;
@ApiModelProperty(name = "status", value = "状态", required = true)
private String status;
@Basic
@Column(name = "status", nullable = true)
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Id
@Basic
@Column(name = "product_level_code", nullable = true, length = 255)
public String getProductLevelCode() {
return productLevelCode;
}
public void setProductLevelCode(String productLevelCode) {
this.productLevelCode = productLevelCode;
}
@Basic
@Column(name = "product_group_code", nullable = true, length = 255)
public String getProductGroupCode() {
return productGroupCode;
}
public void setProductGroupCode(String productGroupCode) {
this.productGroupCode = productGroupCode;
}
@Basic
@Column(name = "product_level_name", nullable = true, length = 255)
public String getProductLevelName() {
return productLevelName;
}
public void setProductLevelName(String productLevelName) {
this.productLevelName = productLevelName;
}
@Basic
@Column(name = "sort", nullable = true)
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Basic
@Column(name = "description", nullable = true, length = -1)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Basic
@Column(name = "parent_product_level_code", nullable = true, length = -1)
public String getParentProductLevelCode() {
return parentProductLevelCode;
}
public void setParentProductLevelCode(String parentProductLevelCode) {
this.parentProductLevelCode = parentProductLevelCode;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ProductLevelEntity that = (ProductLevelEntity) o;
return Objects.equals(productLevelCode, that.productLevelCode) &&
Objects.equals(productGroupCode, that.productGroupCode) &&
Objects.equals(productLevelName, that.productLevelName) &&
Objects.equals(sort, that.sort) &&
Objects.equals(description, that.description) &&
Objects.equals(status, that.status);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), productLevelCode, productGroupCode, productLevelName, sort, description, status);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/12/15:45
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_prototype_component_accessories_middle_table", schema = "public", catalog = "selector")
public class ProductPrototypeComponentAccessoriesMiddleTableEntity extends BaseOperationParam{
private String id;
private String productPrototypeCode;
private String featureComponentCode;
private String featureAccessoriesCode;
private String status;
@Id
@Basic
@Column(name = "id", nullable = true, length = 255)
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Basic
@Column(name = "product_prototype_code", nullable = true, length = 255)
public String getProductPrototypeCode() {
return productPrototypeCode;
}
public void setProductPrototypeCode(String productPrototypeCode) {
this.productPrototypeCode = productPrototypeCode;
}
@Basic
@Column(name = "feature_component_code", nullable = true, length = 255)
public String getFeatureComponentCode() {
return featureComponentCode;
}
public void setFeatureComponentCode(String featureComponentCode) {
this.featureComponentCode = featureComponentCode;
}
@Basic
@Column(name = "status", nullable = true, length = 255)
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Basic
@Column(name = "feature_accessories_code", nullable = true, length = 255)
public String getFeatureAccessoriesCode() {
return featureAccessoriesCode;
}
public void setFeatureAccessoriesCode(String featureAccessoriesCode) {
this.featureAccessoriesCode = featureAccessoriesCode;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
ProductPrototypeComponentAccessoriesMiddleTableEntity that = (ProductPrototypeComponentAccessoriesMiddleTableEntity) o;
return Objects.equals(productPrototypeCode, that.productPrototypeCode) &&
Objects.equals(featureComponentCode, that.featureComponentCode) &&
Objects.equals(featureAccessoriesCode, that.featureAccessoriesCode);
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), productPrototypeCode, featureComponentCode, featureAccessoriesCode);
}
}
package cn.com.uitech.entity;
import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/**
* @Author: ZXN
* @Date: 2021/10/28/14:02
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Entity
@Table(name = "product_prototype", schema = "public", catalog = "selector")
public class ProductPrototypeEntity extends BaseOperationParam{
private String productGroupCode;
private String productGroupName;
private String productLevelCode;
private String productPrototypeCode;
private String productPrototypeName;
private String productPrototypeType;
private String productPrototypeModelNumber;
private String projectCode;
private Integer productPrototypeStatus;
private String description;
private String remark;
private Integer sort;
private String productPrototypeImagePath;
private String processorClassify;
private String libertyCondition;
private List<FeatureComponentEntity> featureComponentEntityList;
@Basic
@Column(name = "product_group_code", nullable = false, length = 255)
public String getProductGroupCode() {
return productGroupCode;
}
public void setProductGroupCode(String productGroupCode) {
this.productGroupCode = productGroupCode;
}
@Transient
public String getProductGroupName() {
return productGroupName;
}
public void setProductGroupName(String productGroupName) {
this.productGroupName = productGroupName;
}
@Basic
@Column(name = "product_level_code", nullable = true, length = 255)
public String getProductLevelCode() {
return productLevelCode;
}
public void setProductLevelCode(String productLevelCode) {
this.productLevelCode = productLevelCode;
}
@Id
@Basic
@Column(name = "product_prototype_code", nullable = false, length = 255)
public String getProductPrototypeCode() {
return productPrototypeCode;
}
public void setProductPrototypeCode(String productPrototypeCode) {
this.productPrototypeCode = productPrototypeCode;
}
@Basic
@Column(name = "product_prototype_name", nullable = false, length = 255)
public String getProductPrototypeName() {
return productPrototypeName;
}
public void setProductPrototypeName(String productPrototypeName) {
this.productPrototypeName = productPrototypeName;
}
@Basic
@Column(name = "product_prototype_type", nullable = false, length = 50)
public String getProductPrototypeType() {
return productPrototypeType;
}
public void setProductPrototypeType(String productPrototypeType) {
this.productPrototypeType = productPrototypeType;
}
@Basic
@Column(name = "product_prototype_model_number", nullable = true, length = 50)
public String getProductPrototypeModelNumber() {
return productPrototypeModelNumber;
}
public void setProductPrototypeModelNumber(String productPrototypeModelNumber) {
this.productPrototypeModelNumber = productPrototypeModelNumber;
}
@Basic
@Column(name = "project_code", nullable = true, length = 50)
public String getProjectCode() {
return projectCode;
}
public void setProjectCode(String projectCode) {
this.projectCode = projectCode;
}
@Basic
@Column(name = "product_prototype_status", nullable = true)
public Integer getProductPrototypeStatus() {
return productPrototypeStatus;
}
public void setProductPrototypeStatus(Integer productPrototypeStatus) {
this.productPrototypeStatus = productPrototypeStatus;
}
@Basic
@Column(name = "description", nullable = true, length = -1)
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
@Basic
@Column(name = "remark", nullable = true, length = -1)
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
@Basic
@Column(name = "sort", nullable = true)
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
@Basic
@Column(name = "product_prototype_image_path", nullable = true, length = -1)
public String getProductPrototypeImagePath() {
return productPrototypeImagePath;
}
public void setProductPrototypeImagePath(String productPrototypeImagePath) {
this.productPrototypeImagePath = productPrototypeImagePath;
}
@Basic
@Column(name = "processor_classify", nullable = true, length = 255)
public String getProcessorClassify() {
return processorClassify;
}
public void setProcessorClassify(String processorClassify) {
this.processorClassify = processorClassify;
}
@Basic
@Column(name = "liberty_condition", nullable = true, length = 255)
public String getLibertyCondition() {
return libertyCondition;
}
public void setLibertyCondition(String libertyCondition) {
this.libertyCondition = libertyCondition;
}
@Transient
public List<FeatureComponentEntity> getFeatureComponentEntityList() {
return featureComponentEntityList;
}
public void setFeatureComponentEntityList(List<FeatureComponentEntity> featureComponentEntityList) {
this.featureComponentEntityList = featureComponentEntityList;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProductPrototypeEntity that = (ProductPrototypeEntity) o;
return Objects.equals(productGroupCode, that.productGroupCode) &&
Objects.equals(productLevelCode, that.productLevelCode) &&
Objects.equals(productPrototypeCode, that.productPrototypeCode) &&
Objects.equals(productPrototypeName, that.productPrototypeName) &&
Objects.equals(productPrototypeType, that.productPrototypeType) &&
Objects.equals(productPrototypeModelNumber, that.productPrototypeModelNumber) &&
Objects.equals(projectCode, that.projectCode) &&
Objects.equals(productPrototypeStatus, that.productPrototypeStatus) &&
Objects.equals(description, that.description) &&
Objects.equals(remark, that.remark) &&
Objects.equals(sort, that.sort) &&
Objects.equals(productPrototypeImagePath, that.productPrototypeImagePath) &&
Objects.equals(processorClassify, that.processorClassify) &&
Objects.equals(libertyCondition, that.libertyCondition);
}
@Override
public int hashCode() {
return Objects.hash(productGroupCode, productLevelCode, productPrototypeCode, productPrototypeName, productPrototypeType, productPrototypeModelNumber, projectCode, productPrototypeStatus, description, remark, sort, productPrototypeImagePath, processorClassify, libertyCondition);
}
}
package cn.com.uitech.entity;
import lombok.Data;
import java.util.Map;
/**
* @Author: ZXN
* @Date: 2021/11/08/16:42
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
public class RedisEntity {
private String tableName;
private String tableId;
private Map<String,Object> data;
}
package cn.com.uitech.entity;
import java.text.MessageFormat;
/**
* @author ###
*/
public class RedisKey {
/**
* 系统:产品组:物料编号
*/
private static final String VARIANT_TABLE = "selector:{0}:{1}:{2}:variantTable";
private static final String QUANTITY_MAPPING = "selector:{0}:quantityMapping";
/**
* TOTAL特征和特征值的缓存id
*/
private static final String TOTAL_CHARACTERISTIC = "selector:characteristic:total:{0}";
/**
* 选中的特征和特征值的缓存id
*/
private static final String SELECTED_CHARACTERISTIC = "selector:characteristic:selected:{0}";
public static String getVariantTableKey(String systemCode,
String productGroupCode,
String materialCode) {
return MessageFormat.format(VARIANT_TABLE, systemCode, productGroupCode, materialCode);
}
public static String getQuantityMapping(String systemCode) {
return MessageFormat.format(QUANTITY_MAPPING, systemCode);
}
public static String getTotalCharacteristicKey(String snowFlakeId) {
return MessageFormat.format(TOTAL_CHARACTERISTIC, snowFlakeId);
}
public static String getSelectedCharacteristicKey(String snowFlakeId) {
return MessageFormat.format(SELECTED_CHARACTERISTIC, snowFlakeId);
}
}
package cn.com.uitech.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
/**
* @Author: ZXN
* @Date: 2021/09/24/13:11
* @Description: 出参数据封装实体类及异常处理实体类
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
public class ResultResponse<T> {
private Integer result;
private String message = "成功";
private T data;
private ResultResponse(Integer result, T data) {
this.data = data;
this.result = result;
}
public static <T> ResultResponse<T> success(Integer result, T data) {
return new ResultResponse<>(result, data);
}
public static <T> ResultResponse<T> fail(Integer result, String message, T data) {
ResultResponse<T> resultResponse = new ResultResponse<>();
resultResponse.setData(data);
resultResponse.setResult(result);
resultResponse.setMessage(message);
return resultResponse;
}
}
package cn.com.uitech.entity;
import lombok.Data;
/**
* @Author: ZXN
* @Date: 2021/10/14/14:16
* @Description:
* @version: 1.0
* This Class Created with IntelliJ IDEA 2019.1.4
*/
@Data
public class SelectorEntity {
private String system;
private String productGroupCode;
private String operator;
private String configId;
private String productLevelCode;
private String productCode;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment