Commit c563ea75 by zhaoxiaolei

调用PLM

parent 416d8ce9
...@@ -7,16 +7,16 @@ ...@@ -7,16 +7,16 @@
<sourceOutputDir name="target/generated-sources/annotations" /> <sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" /> <outputRelativeToContentRoot value="true" />
<module name="ui-tech-system" /> <module name="config-server-api" />
</profile> </profile>
</annotationProcessing> </annotationProcessing>
<bytecodeTargetLevel> <bytecodeTargetLevel>
<module name="ui-tech-system" target="1.8" /> <module name="config-server-api" target="1.8" />
</bytecodeTargetLevel> </bytecodeTargetLevel>
</component> </component>
<component name="JavacSettings"> <component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE"> <option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="ui-tech-system" options="-parameters" /> <module name="config-server-api" options="-parameters" />
</option> </option>
</component> </component>
</project> </project>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.jetbrains.kotlin:kotlin-runtime:1.0.0">
<CLASSES>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-runtime/1.0.0/kotlin-runtime-1.0.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-runtime/1.0.0/kotlin-runtime-1.0.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-runtime/1.0.0/kotlin-runtime-1.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.0.0">
<CLASSES>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-stdlib/1.0.0/kotlin-stdlib-1.0.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-stdlib/1.0.0/kotlin-stdlib-1.0.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-stdlib/1.0.0/kotlin-stdlib-1.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
<component name="libraryTable">
<library name="Maven: org.jetbrains.kotlin:kotlin-test:1.0.0">
<CLASSES>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-test/1.0.0/kotlin-test-1.0.0.jar!/" />
</CLASSES>
<JAVADOC>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-test/1.0.0/kotlin-test-1.0.0-javadoc.jar!/" />
</JAVADOC>
<SOURCES>
<root url="jar://D:/soft/repo/org/jetbrains/kotlin/kotlin-test/1.0.0/kotlin-test-1.0.0-sources.jar!/" />
</SOURCES>
</library>
</component>
\ No newline at end of file
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<project version="4"> <project version="4">
<component name="ProjectModuleManager"> <component name="ProjectModuleManager">
<modules> <modules>
<module fileurl="file://$PROJECT_DIR$/ui-tech-system.iml" filepath="$PROJECT_DIR$/ui-tech-system.iml" /> <module fileurl="file://$PROJECT_DIR$/config-server-api.iml" filepath="$PROJECT_DIR$/config-server-api.iml" />
</modules> </modules>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -212,8 +212,5 @@ ...@@ -212,8 +212,5 @@
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" /> <orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.1.0.RELEASE" level="project" /> <orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.1.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.5.RELEASE" level="project" /> <orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-stdlib:1.0.0" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains.kotlin:kotlin-runtime:1.0.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.jetbrains.kotlin:kotlin-test:1.0.0" level="project" />
</component> </component>
</module> </module>
\ No newline at end of file
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
<feign.httpVersion>10.1.0</feign.httpVersion> <feign.httpVersion>10.1.0</feign.httpVersion>
<collections.version>3.2.2</collections.version> <collections.version>3.2.2</collections.version>
<security-oauth2-autoconfigure.version>2.1.0.RELEASE</security-oauth2-autoconfigure.version> <security-oauth2-autoconfigure.version>2.1.0.RELEASE</security-oauth2-autoconfigure.version>
<kotlin.version>1.0.0</kotlin.version>
</properties> </properties>
...@@ -244,17 +243,6 @@ ...@@ -244,17 +243,6 @@
<artifactId>spring-cloud-context</artifactId> <artifactId>spring-cloud-context</artifactId>
<version>2.1.0.RELEASE</version> <version>2.1.0.RELEASE</version>
</dependency> </dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
...@@ -273,27 +261,7 @@ ...@@ -273,27 +261,7 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
......
...@@ -345,38 +345,38 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -345,38 +345,38 @@ public class IntegrateServiceImpl implements IntegrateService {
Map<String, Object> o1 = (Map<String, Object>) item.get(0); Map<String, Object> o1 = (Map<String, Object>) item.get(0);
Map<String, Object> attributes = (Map<String, Object>) o1.get("attributes"); Map<String, Object> attributes = (Map<String, Object>) o1.get("attributes");
String nonce = (String) attributes.get("nonce"); String nonce = (String) attributes.get("nonce");
HttpHeaders headers = getHttpHeaderPlm(nonce);
//封装调用plm接口的数据 //封装调用plm接口的数据
ToPLMDto toPLMDto = new ToPLMDto(); ToPLMDto toPLMDto = new ToPLMDto();
toPLMDto.setConfigId(superBomSkuInfo.getConfigId()); toPLMDto.setConfigId(superBomSkuInfo.getConfigId());
toPLMDto.setSpecial(false); toPLMDto.setSpecial(false);
toPLMDto.setSuperNumber(superBomSkuInfo.getSuperBomCode()); toPLMDto.setSuperNumber(superBomSkuInfo.getSuperBomName());
toPLMDto.setH3cSuperNumber(superBomSkuInfo.getH3cPn()); toPLMDto.setH3cSuperNumber(superBomSkuInfo.getH3cPn());
toPLMDto.setGovernmentId(superBomSkuInfo.getPoliticalMiningId()); toPLMDto.setGovernmentId(superBomSkuInfo.getPoliticalMiningId());
toPLMDto.setModel(superBomSkuInfo.getPatern()); toPLMDto.setModel(superBomSkuInfo.getPatern());
toPLMDto.setSpecialDescription(superBomSkuInfo.getDescription()); toPLMDto.setSpecialDescription(superBomSkuInfo.getDescription());
List<ToPLMDto.OptionChoiceMap> maps = new ArrayList<>(); List<ToPLMDto.OptionChoiceMap> maps = new ArrayList<>();
ToPLMDto.OptionChoiceMap map = new ToPLMDto.OptionChoiceMap();
List<SuperBomSkuConfigInfo> characteristicList = superBomSkuInfo.getCharacteristicList(); List<SuperBomSkuConfigInfo> characteristicList = superBomSkuInfo.getCharacteristicList();
if (!CollectionUtils.isEmpty(characteristicList)) { if (!CollectionUtils.isEmpty(characteristicList)) {
for (SuperBomSkuConfigInfo superBomSkuConfigInfo : characteristicList) { for (SuperBomSkuConfigInfo superBomSkuConfigInfo : characteristicList) {
ToPLMDto.OptionChoiceMap map = new ToPLMDto.OptionChoiceMap();
map.setSpecial(false); map.setSpecial(false);
map.setOption(superBomSkuConfigInfo.getCharacteristicCode()); map.setOption(superBomSkuConfigInfo.getCharacteristicName());
map.setChoice(superBomSkuConfigInfo.getCharacteristicValueCode()); map.setChoice(superBomSkuConfigInfo.getCharacteristicValueName());
map.setSpecialDescription(superBomSkuInfo.getDescription()); map.setSpecialDescription(superBomSkuInfo.getDescription());
maps.add(map); maps.add(map);
} }
} }
toPLMDto.setOptionChoiceMaps(maps); toPLMDto.setOptionChoiceMaps(maps);
HttpEntity<Object> requestEntity = new HttpEntity<>(toPLMDto, headers); HttpHeaders headers = getHttpHeaderPlm(nonce);
ResponseEntity<String> responseEntity = restTemplate.exchange(plmUrl, HttpMethod.POST, requestEntity, String.class); HttpEntity<Object> requestEntity = new HttpEntity<>(JSON.toJSON(toPLMDto), headers);
JSONObject object = JSONObject.parseObject(responseEntity.getBody()); Object o2 = restTemplate.exchange(plmUrl, HttpMethod.POST, requestEntity, Object.class);
/*JSONObject object = JSONObject.parseObject(responseEntity.toString());
object.get("data"); object.get("data");
dto.setConfigId("ConfigId"); dto.setConfigId("ConfigId");
dto.setProductSmallType("产品小型号"); dto.setProductSmallType("产品小型号");
dto.setProductType("产品型号"); dto.setProductType("产品型号");
dto.setSkuCode("SkuCode"); dto.setSkuCode("SkuCode");
dto.setSncode("69码"); dto.setSncode("69码");*/
return dto; return dto;
} }
...@@ -583,7 +583,6 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -583,7 +583,6 @@ public class IntegrateServiceImpl implements IntegrateService {
headers.add("Content-Type", "application/json"); headers.add("Content-Type", "application/json");
headers.add("Authorization", headerAuthorization); headers.add("Authorization", headerAuthorization);
headers.add("CSRF_NONCE", headerTokenMsg); headers.add("CSRF_NONCE", headerTokenMsg);
return headers; return headers;
} }
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
c.characteristic_value_code character_value_code, c.characteristic_value_code character_value_code,
d.price_type, d.price_type,
e.actual_price, e.actual_price,
e.cv_price_id,
e.leve0_price, e.leve0_price,
e.leve1_price, e.leve1_price,
e.leve2_price, e.leve2_price,
......
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