Commit c3cfaa96 by zhaoxiaolei

选配器规范入参

parent a4424a24
...@@ -186,6 +186,7 @@ public class IntegrateController { ...@@ -186,6 +186,7 @@ public class IntegrateController {
Errors errors) { Errors errors) {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader(); HttpHeaders headers = getHttpHeader();
preVerifyInputDTO.setProductGroupCode(preVerifyInputDTO.getProductClassCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(preVerifyInputDTO), headers); 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); 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()); JSONObject object = JSONObject.parseObject(responseEntity.getBody());
...@@ -220,6 +221,8 @@ public class IntegrateController { ...@@ -220,6 +221,8 @@ public class IntegrateController {
Errors errors) { Errors errors) {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader(); HttpHeaders headers = getHttpHeader();
postVerifyInputDTO.setProductGroupCode(postVerifyInputDTO.getProductClassCode());
postVerifyInputDTO.setMaterialCode(postVerifyInputDTO.getSuperBomCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(postVerifyInputDTO), headers); 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); 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()); JSONObject object = JSONObject.parseObject(responseEntity.getBody());
...@@ -232,6 +235,7 @@ public class IntegrateController { ...@@ -232,6 +235,7 @@ public class IntegrateController {
Errors errors) { Errors errors) {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader(); HttpHeaders headers = getHttpHeader();
buildConfigurationInputDTO.setProductGroupCode(buildConfigurationInputDTO.getProductClassCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(buildConfigurationInputDTO), headers); 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); 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()); JSONObject object = JSONObject.parseObject(responseEntity.getBody());
...@@ -246,6 +250,7 @@ public class IntegrateController { ...@@ -246,6 +250,7 @@ public class IntegrateController {
Errors errors) { Errors errors) {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader(); HttpHeaders headers = getHttpHeader();
conflictAnalysisInputDTO.setProductGroupCode(conflictAnalysisInputDTO.getProductClassCode());
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(conflictAnalysisInputDTO), headers); 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); 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()); JSONObject object = JSONObject.parseObject(responseEntity.getBody());
......
package cn.com.uitech.authorization.pojo.dto; package cn.com.uitech.authorization.pojo.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -26,6 +28,8 @@ public class BuildConfigurationInputDTO implements Serializable { ...@@ -26,6 +28,8 @@ public class BuildConfigurationInputDTO implements Serializable {
*/ */
@NotNull @NotNull
private String productClassCode;
private String productGroupCode; private String productGroupCode;
@NotNull @NotNull
private String materialCode; private String materialCode;
......
...@@ -27,6 +27,7 @@ public class ConflictAnalysisInputDTO implements Serializable { ...@@ -27,6 +27,7 @@ public class ConflictAnalysisInputDTO implements Serializable {
@NotNull @NotNull
private String productGroupCode; private String productGroupCode;
private String productClassCode;
@NotNull @NotNull
private String materialCode; private String materialCode;
@NotNull @NotNull
......
...@@ -22,7 +22,7 @@ public class GetConfigurationInputDTO { ...@@ -22,7 +22,7 @@ public class GetConfigurationInputDTO {
private String operator; private String operator;
@NotNull @NotNull
@Size(min = 1) @Size(min = 1)
private List<Long> configIds; private List<String> configIds;
private String skuCode; private String skuCode;
} }
...@@ -26,8 +26,10 @@ public class PostVerifyInputDTO implements Serializable { ...@@ -26,8 +26,10 @@ public class PostVerifyInputDTO implements Serializable {
@NotNull @NotNull
private String productGroupCode; private String productGroupCode;
private String productClassCode;
@NotNull @NotNull
private String materialCode; private String materialCode;
private String superBomCode;
@NotNull @NotNull
private String operator; private String operator;
@NotNull @NotNull
......
...@@ -31,6 +31,7 @@ public class PreVerifyInputDTO implements Serializable { ...@@ -31,6 +31,7 @@ public class PreVerifyInputDTO implements Serializable {
private String characteristicName; private String characteristicName;
@NotNull @NotNull
private String productGroupCode; private String productGroupCode;
private String productClassCode;
@NotNull @NotNull
private String materialCode; private String materialCode;
@NotNull @NotNull
......
...@@ -820,8 +820,8 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -820,8 +820,8 @@ public class IntegrateServiceImpl implements IntegrateService {
superBomSkuInfo.setPatern("CTO"); superBomSkuInfo.setPatern("CTO");
superBomSkuInfo.setApplyUser("H3C"); superBomSkuInfo.setApplyUser("H3C");
GetConfigurationInputDTO getConfigurationInputDTO = new GetConfigurationInputDTO(); GetConfigurationInputDTO getConfigurationInputDTO = new GetConfigurationInputDTO();
List<Long> configIds = new ArrayList<>(); List<String> configIds = new ArrayList<>();
configIds.add(Long.valueOf(configurableBom.getConfigId())); configIds.add(configurableBom.getConfigId());
getConfigurationInputDTO.setConfigIds(configIds); getConfigurationInputDTO.setConfigIds(configIds);
Object getConfigData = getConfigInfo(getConfigurationInputDTO); Object getConfigData = getConfigInfo(getConfigurationInputDTO);
//撞配 找PLM申请SKU //撞配 找PLM申请SKU
...@@ -861,9 +861,8 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -861,9 +861,8 @@ public class IntegrateServiceImpl implements IntegrateService {
if (CollectionUtils.isEmpty(getConfigurationInputDTO.getConfigIds())) { if (CollectionUtils.isEmpty(getConfigurationInputDTO.getConfigIds())) {
if (!StringUtils.isEmpty(getConfigurationInputDTO.getSkuCode())) { if (!StringUtils.isEmpty(getConfigurationInputDTO.getSkuCode())) {
String configId = superBomSkuInfoMapper.getConfigId(getConfigurationInputDTO.getSkuCode()); String configId = superBomSkuInfoMapper.getConfigId(getConfigurationInputDTO.getSkuCode());
List<Long> configIds = new ArrayList<>(); List<String> configIds = new ArrayList<>();
Long aLong = Long.valueOf(configId); configIds.add(configId);
configIds.add(aLong);
getConfigurationInputDTO.setConfigIds(configIds); getConfigurationInputDTO.setConfigIds(configIds);
} else { } else {
return "请输入skuCode/ConfigId"; return "请输入skuCode/ConfigId";
...@@ -872,6 +871,7 @@ public class IntegrateServiceImpl implements IntegrateService { ...@@ -872,6 +871,7 @@ public class IntegrateServiceImpl implements IntegrateService {
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
HttpHeaders headers = getHttpHeader(); HttpHeaders headers = getHttpHeader();
getConfigurationInputDTO.setOperator("system");
HttpEntity<String> requestEntity = new HttpEntity<String>(JSON.toJSONString(getConfigurationInputDTO), headers); 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); 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()); JSONObject object = JSONObject.parseObject(responseEntity.getBody());
......
...@@ -68,6 +68,6 @@ ...@@ -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 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>
<select id="findVName" resultType="java.lang.String"> <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> </select>
</mapper> </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