|
|
|
@ -289,9 +289,15 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<PlmPropertiesItemData> searchPropertiesItemList(PlmPropertiesModelHeaderData inData){ |
|
|
|
//公共参数 |
|
|
|
String functionType = inData.getFunctionType(); |
|
|
|
List<String> list = inData.getList().stream().map(PlmPropertiesItemData::getPropertiesItemNo).collect(Collectors.toList()); |
|
|
|
return propertiesMapper.searchPropertiesUnChoose(inData.getSite(),inData.getFunctionType(), list); |
|
|
|
|
|
|
|
//区分是否是工具方法过来的参数 |
|
|
|
if("TL".equalsIgnoreCase(functionType) || "TLI".equalsIgnoreCase(functionType)){ |
|
|
|
return propertiesMapper.searchPropertiesChoose("*", functionType, list); |
|
|
|
}else { |
|
|
|
return propertiesMapper.searchPropertiesUnChoose(inData.getSite(), functionType, list); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@ -405,14 +411,26 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
@Override |
|
|
|
@Transactional |
|
|
|
public List<PartSubPropertiesValueData> getPropertiesListByPartAndCodeNo(PartSubPropertiesValueData inData){ |
|
|
|
|
|
|
|
List<PartSubPropertiesValueData> result= propertiesMapper.getPropertiesListByPartAndCodeNo(inData); |
|
|
|
//公共参数 |
|
|
|
String recordType = inData.getRecordType(); |
|
|
|
List<PartSubPropertiesValueData> result = null; |
|
|
|
if("TL".equalsIgnoreCase(recordType) || "TLI".equalsIgnoreCase(recordType)){ |
|
|
|
result = propertiesMapper.getPropertiesListByPartAndCodeNoForTool(inData); |
|
|
|
}else { |
|
|
|
result = propertiesMapper.getPropertiesListByPartAndCodeNo(inData); |
|
|
|
} |
|
|
|
for (int i = 0; i < result.size(); i++) { |
|
|
|
if ("Y".equals(result.get(i).getValueChooseFlag())) { |
|
|
|
//针对工具的情况 需要特殊设置 |
|
|
|
if("TL".equalsIgnoreCase(recordType) || "TLI".equalsIgnoreCase(recordType)){ |
|
|
|
List<PlmPropertiesItemAvailableData> availableList = partInformationMapper.getAvailableValueListForTool(result.get(i)); |
|
|
|
result.get(i).setAvailableValueList(availableList); |
|
|
|
}else { |
|
|
|
List<PlmPropertiesItemAvailableData> availableList = partInformationMapper.getAvailableValueList(result.get(i)); |
|
|
|
result.get(i).setAvailableValueList(availableList); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
@ -605,12 +623,20 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
@Transactional |
|
|
|
public void refreshPropertiesModal(PartSubPropertiesValueData inData){ |
|
|
|
List<Object> params = new ArrayList<>(); |
|
|
|
String recordType = inData.getRecordType(); |
|
|
|
params.add(inData.getSite()); |
|
|
|
params.add(inData.getRecordType()); |
|
|
|
params.add(recordType); |
|
|
|
params.add(inData.getPartNo()); |
|
|
|
params.add(inData.getCodeNo()); |
|
|
|
//针对工具和工具实例走特殊的方法 |
|
|
|
List<Map<String, Object>> resultList = null; |
|
|
|
if ("TL".equalsIgnoreCase(recordType) || "TLI".equalsIgnoreCase(recordType)){ |
|
|
|
//执行方法 |
|
|
|
List<Map<String, Object>> resultList = procedureDao.getProcedureData("plm_refreshPartSubPropertiesValue", params); |
|
|
|
resultList = procedureDao.getProcedureData("plm_refreshPartSubPropertiesValueForTool", params); |
|
|
|
}else{ |
|
|
|
//执行方法 |
|
|
|
resultList = procedureDao.getProcedureData("plm_refreshPartSubPropertiesValue", params); |
|
|
|
} |
|
|
|
//判断是否成功 |
|
|
|
String code = String.valueOf(resultList.get(0).get("resultCode")); |
|
|
|
if ("400".equalsIgnoreCase(code)) { |
|
|
|
|