@ -297,6 +297,23 @@
select SiteName,SiteID from Site where SiteID=#{siteID} and Active='Y'
</select>
<select id= "checkCal" resultType= "com.gaotao.modules.base.entity.CalendarData" >
select calendarID from calendar where Site=#{site} and status='使用中' and calendarID=#{calendarID}
</select>
<select id= "checkResource" resultType= "com.gaotao.modules.base.entity.WorkCenterResourceData" >
select site from WorkCenterResource where Site=#{site} and ResourceID=#{resourceID}
</select>
<insert id= "saveResource" parameterType= "com.gaotao.modules.base.entity.WorkCenterResourceData" >
INSERT INTO WorkCenterResource (Site,WorkCenterNo,ResourceID,ResourceDesc,Efficiency,Utilization,Active,Remark,CreatedDate,CalendarID,VirturlFlag)
VALUES(#{site},#{workCenterNo},#{resourceID},#{resourceDesc},#{efficiency},#{utilization},#{active},#{remark},GetDate(),#{calendarID},'N')
</insert>
<update id= "editResource" parameterType= "com.gaotao.modules.base.entity.WorkCenterResourceData" >
update WorkCenterResource SET ResourceDesc=#{resourceDesc},Efficiency=#{efficiency},Utilization=#{utilization},Active=#{active},Remark=#{remark},CalendarID=#{calendarID}
where Site=#{site} and ResourceID=#{resourceID}
</update>
<insert id= "saveSite" parameterType= "com.gaotao.modules.base.entity.SiteData" >
INSERT INTO Site (SiteID,SiteName,SiteName_E,Address,Address_E,ContactName,PostCode,Email,FaxNo,PhoneNo,Active,Website,CompanyID,ShipTime,
ReferenceCustomerID)
@ -524,6 +541,14 @@ CapacityType,UMID,Active,Remark,CreatedDate,ProLineNo,CanCreateNewRollFlag,NeedS
delete from WorkCenter where WorkCenterNo=#{workCenterNo} and Site=#{site}
</delete>
<delete id= "deleteResource" parameterType= "com.gaotao.modules.base.entity.WorkCenterResourceData" >
delete from WorkCenterResource where ResourceID=#{resourceID} and Site=#{site}
</delete>
<update id= "setResourceFlag" parameterType= "com.gaotao.modules.base.entity.WorkCenterResourceData" >
UPDATE WorkCenterResource SET VirturlFlag=#{virturlFlag} where ResourceID=#{resourceID} and Site=#{site}
</update>
<select id= "checkCustomerID" resultType= "com.gaotao.modules.base.entity.PartData" >
select PartNo,ConfigurationTemplateID from Part WHERE site=#{site} and ConfigurationTemplateID=#{configurationTemplateID}
</select>