@ -130,7 +130,7 @@
</where>
</select>
<select id= "searchItemAvailable" resultType= "EamPropertiesItemAvailableData" >
<select id= "searchItemAvailable" resultType= "com.xujie.sys.modules.pms.data. EamPropertiesItemAvailableData" >
SELECT ItemNo,ValueNo,AvailableValue,CreatedDate,CreatedBy,ItemType
from eam_properties_item_available where itemNo=#{itemNo} and ItemType=#{itemType}
</select>
@ -139,7 +139,9 @@
<select id= "getItemValueNo" resultType= "Double" >
SELECT isnull( max(valueNo),0)+1 from eam_properties_item_available where itemNo=#{itemNo} and ItemType=#{itemType}
</select>
<select id= "getItemValueNoForPlan" resultType= "Double" >
SELECT isnull( max(valueNo),0)+1 from eam_workPlan_item_available where itemNo=#{itemNo} and ItemType=#{itemType} and site=#{site} and PlanID=#{planID}
</select>
<insert id= "saveItemAvailable" >
insert into eam_properties_item_available (ItemNo,ValueNo,AvailableValue,CreatedDate,CreatedBy,ItemType)
values(#{itemNo},#{valueNo},#{availableValue},GetDate(),#{createdBy},#{itemType})
@ -277,8 +279,24 @@ ItemRemark=#{itemRemark}
<update id= "updatePlanItemsForNull" >
update eam_workPlan_item set DefaultValue=#{defaultValue},ValueType=#{valueType},ValueType_DB=#{valueTypeDb}
,ValueChooseFlag=#{valueChooseFlag},UpdateDate=GetDate(),UpdateBy=#{createdBy},MaxValue=null,MinValue=null,
ItemRemark=#{itemRemark}
where site=#{site} and planID=#{planID} and ItemType=#{itemType}
and ItemNo=#{itemNo}
ItemRemark=#{itemRemark}
where site=#{site} and planID=#{planID} and ItemType=#{itemType}
and ItemNo=#{itemNo}
</update>
<insert id= "saveItemAvailableForPlan" >
insert into eam_workPlan_item_available (Site,PlanID,ItemNo,ValueNo,AvailableValue,CreatedDate,CreatedBy,ItemType)
values(#{site},#{planID},#{itemNo},#{valueNo},#{availableValue},GetDate(),#{createdBy},#{itemType})
</insert>
<update id= "updateItemAvailableForPlan" >
update eam_workPlan_item_available set AvailableValue=#{availableValue},updateBy=#{createdBy},updateDate=GetDate()
where itemNo=#{itemNo} and ItemType=#{itemType} and ValueNo=#{valueNo} AND site=#{site} and planID=#{planID}
</update>
<delete id= "deletePlanItemAvailable" >
delete from eam_workPlan_item_available where itemNo=#{itemNo} and ItemType=#{itemType} and ValueNo=#{valueNo} AND site=#{site} and planID=#{planID}
</delete>
</mapper>