|
|
|
@ -41,6 +41,10 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
inData.setValueType("文本"); |
|
|
|
inData.setMaxValue(null); |
|
|
|
inData.setMinValue(null); |
|
|
|
}else if("S".equals(inData.getValueTypeDb())){ |
|
|
|
inData.setValueType("超链接"); |
|
|
|
inData.setMaxValue(null); |
|
|
|
inData.setMinValue(null); |
|
|
|
}else { |
|
|
|
inData.setValueType("数字"); |
|
|
|
if(inData.getMaxValue() != null&&inData.getMinValue()!=null){ |
|
|
|
@ -66,7 +70,11 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
inData.setValueType("文本"); |
|
|
|
inData.setMaxValue(null); |
|
|
|
inData.setMinValue(null); |
|
|
|
}else { |
|
|
|
}else if("S".equals(inData.getValueTypeDb())){ |
|
|
|
inData.setValueType("超链接"); |
|
|
|
inData.setMaxValue(null); |
|
|
|
inData.setMinValue(null); |
|
|
|
} else { |
|
|
|
inData.setValueType("数字"); |
|
|
|
if(inData.getMaxValue() != null&&inData.getMinValue() != null) { |
|
|
|
if (inData.getMaxValue() < inData.getMinValue()) { |
|
|
|
@ -131,12 +139,9 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
public void propertiesModelSave(PlmPropertiesModelHeaderData inData){ |
|
|
|
List<PlmPropertiesModelHeaderData> checkPropertiesModel = propertiesMapper.checkPropertiesModel(inData); |
|
|
|
if(checkPropertiesModel.size() > 0) { |
|
|
|
if("A".equals(inData.getFunctionType())) { |
|
|
|
throw new RuntimeException("该模板编码已存在!"); |
|
|
|
} |
|
|
|
if("B".equals(inData.getFunctionType())) { |
|
|
|
|
|
|
|
throw new RuntimeException("该模板编码已存在!"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
propertiesMapper.plmPropertiesModelSave(inData); |
|
|
|
@ -166,18 +171,15 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
itemDate.setUserId(inData.getUserId()); |
|
|
|
List<PlmPropertiesModelDetailData> checkDetail = propertiesMapper.checkModalDetails(itemDate); |
|
|
|
if(checkDetail.size() > 0){ |
|
|
|
if("A".equals(inData.getFunctionType()) || "B".equals(inData.getFunctionType())) { |
|
|
|
throw new RuntimeException("该项目已存在在这个模板中!"); |
|
|
|
} |
|
|
|
|
|
|
|
throw new RuntimeException("该属性已存在在这个模板中!"); |
|
|
|
|
|
|
|
} |
|
|
|
List<PlmPropertiesModelDetailData> checkItem = propertiesMapper.checkItem(itemDate); |
|
|
|
if(checkItem.size() == 0){ |
|
|
|
if("A".equals(inData.getFunctionType())) { |
|
|
|
throw new RuntimeException("该项目编码不存在!"); |
|
|
|
} |
|
|
|
if("B".equals(inData.getFunctionType())) { |
|
|
|
throw new RuntimeException("该项目编码不存在!"); |
|
|
|
} |
|
|
|
|
|
|
|
throw new RuntimeException("该属性编码不存在!"); |
|
|
|
|
|
|
|
} |
|
|
|
itemDate.setSeqNo(propertiesMapper.getModalDetailSeqNo(itemDate)); |
|
|
|
itemDate.setOrderId(propertiesMapper.getModalDetailOrderId(itemDate)); |
|
|
|
@ -297,7 +299,7 @@ public class PropertiesServiceImpl implements PropertiesService { |
|
|
|
List<PlmBmModelDetailData> checkDetail = propertiesMapper.checkModalDetailsForBM(itemDate); |
|
|
|
if(checkDetail.size() > 0){ |
|
|
|
|
|
|
|
throw new RuntimeException("该项目已存在在这个模板中!"); |
|
|
|
throw new RuntimeException("该属性已存在在这个模板中!"); |
|
|
|
|
|
|
|
} |
|
|
|
itemDate.setSeqNo(propertiesMapper.getModalDetailSeqNoForBM(itemDate)); |
|
|
|
|