Commit c3cfaa96 by zhaoxiaolei

选配器规范入参

parent a4424a24
......@@ -186,6 +186,7 @@ public class IntegrateController {
Errors errors) {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader();
preVerifyInputDTO.setProductGroupCode(preVerifyInputDTO.getProductClassCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(preVerifyInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange("http://127.0.0.1:8080/api/v1/selector/preVerify", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody());
......@@ -220,6 +221,8 @@ public class IntegrateController {
Errors errors) {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader();
postVerifyInputDTO.setProductGroupCode(postVerifyInputDTO.getProductClassCode());
postVerifyInputDTO.setMaterialCode(postVerifyInputDTO.getSuperBomCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(postVerifyInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange("http://127.0.0.1:8080/api/v1/selector/postVerify", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody());
......@@ -232,6 +235,7 @@ public class IntegrateController {
Errors errors) {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader();
buildConfigurationInputDTO.setProductGroupCode(buildConfigurationInputDTO.getProductClassCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(buildConfigurationInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange("http://127.0.0.1:8080/api/v1/selector/buildConfiguration", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody());
......@@ -246,6 +250,7 @@ public class IntegrateController {
Errors errors) {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader();
conflictAnalysisInputDTO.setProductGroupCode(conflictAnalysisInputDTO.getProductClassCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(conflictAnalysisInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange("http://127.0.0.1:8080/api/v1/selector/conflictAnalysis", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody());
......
package cn.com.uitech.authorization.pojo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -26,6 +28,8 @@ public class BuildConfigurationInputDTO implements Serializable {
*/
@NotNull
private String productClassCode;
private String productGroupCode;
@NotNull
private String materialCode;
......
......@@ -27,6 +27,7 @@ public class ConflictAnalysisInputDTO implements Serializable {
@NotNull
private String productGroupCode;
private String productClassCode;
@NotNull
private String materialCode;
@NotNull
......
......@@ -22,7 +22,7 @@ public class GetConfigurationInputDTO {
private String operator;
@NotNull
@Size(min = 1)
private List<Long> configIds;
private List<String> configIds;
private String skuCode;
}
......@@ -26,8 +26,10 @@ public class PostVerifyInputDTO implements Serializable {
@NotNull
private String productGroupCode;
private String productClassCode;
@NotNull
private String materialCode;
private String superBomCode;
@NotNull
private String operator;
@NotNull
......
......@@ -31,6 +31,7 @@ public class PreVerifyInputDTO implements Serializable {
private String characteristicName;
@NotNull
private String productGroupCode;
private String productClassCode;
@NotNull
private String materialCode;
@NotNull
......
......@@ -820,8 +820,8 @@ public class IntegrateServiceImpl implements IntegrateService {
superBomSkuInfo.setPatern("CTO");
superBomSkuInfo.setApplyUser("H3C");
GetConfigurationInputDTO getConfigurationInputDTO = new GetConfigurationInputDTO();
List<Long> configIds = new ArrayList<>();
configIds.add(Long.valueOf(configurableBom.getConfigId()));
List<String> configIds = new ArrayList<>();
configIds.add(configurableBom.getConfigId());
getConfigurationInputDTO.setConfigIds(configIds);
Object getConfigData = getConfigInfo(getConfigurationInputDTO);
//撞配 找PLM申请SKU
......@@ -861,9 +861,8 @@ public class IntegrateServiceImpl implements IntegrateService {
if (CollectionUtils.isEmpty(getConfigurationInputDTO.getConfigIds())) {
if (!StringUtils.isEmpty(getConfigurationInputDTO.getSkuCode())) {
String configId = superBomSkuInfoMapper.getConfigId(getConfigurationInputDTO.getSkuCode());
List<Long> configIds = new ArrayList<>();
Long aLong = Long.valueOf(configId);
configIds.add(aLong);
List<String> configIds = new ArrayList<>();
configIds.add(configId);
getConfigurationInputDTO.setConfigIds(configIds);
} else {
return "请输入skuCode/ConfigId";
......@@ -872,6 +871,7 @@ public class IntegrateServiceImpl implements IntegrateService {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader();
getConfigurationInputDTO.setOperator("system");
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(getConfigurationInputDTO), headers);
ResponseEntity<String> responseEntity = restTemplate.exchange("http://10.0.4.24:8080/api/v1/selector/configurations", HttpMethod.POST, requestEntity, String.class);
JSONObject object = JSONObject.parseObject(responseEntity.getBody());
......
......@@ -68,6 +68,6 @@
select distinct c.characteristic_code characteristiccode,c.characteristic_name characteristicname from super_table_item_info b left join super_characteristic_info c on b.characteristic_code = c.characteristic_code where b.table_number =#{tablenumber} and b.group_number = #{groupNumber}
</select>
<select id="findVName" resultType="java.lang.String">
select distinct d.characteristic_value_name from super_table_item_info b left join super_characteristic_value_info d on b.characteristic_value_code = d.characteristic_value_code where b.table_number =#{tablenumber} and b.group_number = #{groupNumber} and b.characteristic_code = #{characteristiccode}
select distinct COALESCE(d.characteristic_value_name,'None') from super_table_item_info b left join super_characteristic_value_info d on b.characteristic_value_code = d.characteristic_value_code where b.table_number =#{tablenumber} and b.group_number = #{groupNumber} and b.characteristic_code = #{characteristiccode}
</select>
</mapper>
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