Commit c563ea75 by zhaoxiaolei

调用PLM

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