|
|
|
@ -471,4 +471,39 @@ |
|
|
|
and RecordType = #{recordType} |
|
|
|
</select> |
|
|
|
|
|
|
|
<!-- 新增材料属性 --> |
|
|
|
<insert id="savePartSubPropertiesValueHeader"> |
|
|
|
insert into PartSubPropertiesValueHeader |
|
|
|
(PartNo, Site, CodeNo, SubCodeSeqNo, SubCodeDesc, RecordType) |
|
|
|
select |
|
|
|
#{partNo}, |
|
|
|
#{site}, |
|
|
|
#{codeNo}, |
|
|
|
1, |
|
|
|
Code_Desc, |
|
|
|
#{recordType} |
|
|
|
from plm_properties_model_header |
|
|
|
where Code_No = #{codeNo} and site = #{site} and function_type = #{recordType} |
|
|
|
</insert> |
|
|
|
|
|
|
|
<!-- 新增材料属性值 --> |
|
|
|
<insert id="savePartSubPropertiesValue"> |
|
|
|
insert into PartSubPropertiesValue (PartNo, Site, CodeNo, SubCodeSeqNo, SubCodeDesc, ItemNo, PropertiesItemNo, TextValue, NumValue, RecordType) |
|
|
|
select |
|
|
|
#{partNo}, |
|
|
|
#{site}, |
|
|
|
#{codeNo}, |
|
|
|
1, |
|
|
|
a.Code_Desc, |
|
|
|
b.seq_No, |
|
|
|
b.properties_item_no, |
|
|
|
case when c.ValueType_DB = 'T' then c.DefaultValue else null end, |
|
|
|
case when c.ValueType_DB = 'N' and c.DefaultValue != '' then c.DefaultValue else null end, |
|
|
|
#{recordType} |
|
|
|
from plm_properties_model_header a |
|
|
|
left join plm_properties_model_detail b on a.Code_No = b.Code_No and a.site = b.site and a.function_type = b.function_type |
|
|
|
left join plm_properties_item c on b.properties_item_no = c.ItemNo and b.site = c.site and a.function_type = c.itemType |
|
|
|
where a.Code_No = #{codeNo} and a.site = #{site} AND B.SITE IS NOT NULL AND A.function_type = #{recordType} |
|
|
|
</insert> |
|
|
|
|
|
|
|
</mapper> |