You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

337 lines
18 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.jtem.modules.Schedule.dao.ScheduleMapper">
  4. <select id="getShopOrderRoutingData" resultType="ShopOrderRoutingData">
  5. select a.site, a.OrderNo,a.PartNo,a.Status,a.PlanStartDate,a.NeedDate,a.LotSize,a.EnterDate,a.UserName,
  6. P.PartDescription+'/'+isnull(P.Spec,'') PartDescription,P.Spec,isnull(SL.scheduledQty,0) as scheduledQty,s.workCenterNo,S.qtyReported,S.qtyApprove,S.machSetupTime,
  7. S.machRunFactor,S.factorUnit,S.ItemNo,S.OperationDesc,s.Efficiency,isnull(SOP.TotalFinishedQty,0) lastApproveQty
  8. FROM ShopOrder a
  9. LEFT JOIN Part P ON P.PartNo=a.PartNo AND a.site=P.Site
  10. LEFT JOIN v_SORouting S on S.site=a.site and S.OrderNo=a.orderNo
  11. LEFT JOIN ScheduleList SL on S.site=SL.site and S.OrderNo=SL.orderNo and S.ItemNo=SL.ItemNo
  12. LEFT JOIN SORoutingOutput SOP ON a.site=SOP.site and a.OrderNo=SOP.OrderNo and SOP.itemNo=dbo.Get_SORouting_PreviousOperationItemNo(a.site,a.OrderNo,S.itemNo)
  13. <!-- left join user_work_center uwc on a.site=uwc.site and s.workCenterNo =uwc.WorkCenterNo and uwc.userId=#{userId}-->
  14. <!-- left join CODetail cod on a.site=cod.site and a.orderRef1=cod.OrderNo and a.orderRef2= CONVERT(VARCHAR(10),cod.ItemNo)-->
  15. <where>
  16. <!-- and uwc.WorkCenterNo is not null-->
  17. <!-- and a.E_Levels =0-->
  18. <if test="site != null and site != ''">
  19. AND a.site = #{site}
  20. </if>
  21. <if test="orderNo != null and orderNo != ''">
  22. AND a.OrderNo LIKE '%' + #{orderNo} + '%'
  23. </if>
  24. <!-- <if test="status !=null and status != ''">-->
  25. <!-- AND a.Status IN ${status}-->
  26. <!-- </if>-->
  27. and a.status in ('已下达','已发料','已入库','已开工','已排产')
  28. AND S.itemNo is not null
  29. <if test="startDate1 != null ">
  30. AND a.EnterDate >= #{startDate1}
  31. </if>
  32. <if test="endDate1 != null ">
  33. AND #{endDate1} >= DATEADD(dd, -1, a.EnterDate)
  34. </if>
  35. <if test="startDate2 != null ">
  36. AND a.PlanStartDate >= #{startDate2}
  37. </if>
  38. <if test="endDate2 != null ">
  39. AND #{endDate2} >= a.PlanStartDate
  40. </if>
  41. <if test="startDate3 != null ">
  42. AND a.NeedDate >= #{startDate3}
  43. </if>
  44. <if test="endDate3 != null ">
  45. AND #{endDate3} >= a.NeedDate
  46. </if>
  47. <if test="startDate4 != null ">
  48. AND cod.PlanShipDate >= #{startDate4}
  49. </if>
  50. <if test="partNo != null and partNo != ''">
  51. AND a.PartNo LIKE '%' + #{partNo} + '%'
  52. </if>
  53. <if test="planStatus != null and planStatus != ''">
  54. and ${planStatus}
  55. </if>
  56. <if test="itemNo != null and itemNo != ''">
  57. and S.ItemNo = #{itemNo}
  58. </if>
  59. <!-- <if test="eLevels != null ">-->
  60. <!-- and a.E_Levels = #{eLevels}-->
  61. <!-- </if>-->
  62. </where>
  63. order by a.PlanStartDate desc,s.itemNo
  64. </select>
  65. <select id="getOperatorList" resultType="OperatorData">
  66. Select a.OperatorID,a.OperatorName from Operator a where a.site=#{site} and a.Active='Y'
  67. </select>
  68. <select id="checkScheduleQty" resultType="ScheduleCheckData">
  69. Select a.lotSize as Qty,isnull(b.scheduledQty,0) scheduledQty from ShopOrder a left join ScheduleList b on a.site=b.site and a.orderNo=b.orderNo and b.itemNo=#{itemNo} where a.Site=#{site} and a.OrderNo=#{orderNo}
  70. </select>
  71. <select id="checkScheduleList" resultType="ScheduleCheckData">
  72. Select Qty from ScheduleList where Site=#{site} and OrderNo=#{orderNo} and itemNo=#{itemNo}
  73. </select>
  74. <insert id="saveScheduleList">
  75. insert into ScheduleList(Site,OrderNo,ItemNo,Type,Type_db,Qty,scheduledQty) values (#{site},#{orderNo},#{itemNo},'生产订单派工单','S',#{qty},0)
  76. </insert>
  77. <select id="getDataSequence" resultType="integer">
  78. select seqNo from DataSequence where SeqType= 'A'
  79. </select>
  80. <update id="updateDataSequence">
  81. update DataSequence set seqNo=seqNo+1 where SeqType= 'A'
  82. </update>
  83. <insert id="saveSchedule">
  84. Insert into soscheduledrouting(Site,OrderNo,ItemNo,SeqNo,QtyRequired,QtyReported,QtyApprove,TimeRequired,TimeReported,PlanStartTime,PlanFinishTime
  85. ,BarcodeID,Remark,Crewsize,ClosedFlag,QtyScrapt,OutWorkFlag,S_ScheduledDate,S_ResourceID,S_ShiftNo,S_WorkCenterNo
  86. ,SelectedFlag,SourceFlag,ParkFlag,TimeRequired_Original,QtyRequired_Original
  87. ,StartProdFlag,CancelledProdFlag,Efficiency,EnteredDate,scheduleType,operatorId,partNo,OrderRef1,cancelReportFlag,CreateBy,WorkTime,stopTime)
  88. values(#{site},#{orderNo},#{itemNo},#{seqNo},#{scheduleQty},0,0,dbo.Get_SOScheduleRouting_TimeRequired(#{site},#{orderNo},#{itemNo},#{scheduleQty}),0,#{scheduleDate},#{scheduleDate}
  89. ,'*',#{remark},1,'N',0,'Y',#{scheduleDate},#{resourceId},#{shiftNo},#{workCenterNo}
  90. ,'N','N','N',dbo.Get_SOScheduleRouting_TimeRequired(#{site},#{orderNo},#{itemNo},#{scheduleQty}),#{scheduleQty}
  91. ,'N','N',#{efficiency},GETDATE(),'生产订单派工单',#{operatorId},#{partNo},#{orderNo},'N',#{createBy},0,0)
  92. </insert>
  93. <update id="updateScheduleListQty">
  94. update ScheduleList set scheduledQty=scheduledQty+#{sumQty} where Site=#{site} and OrderNo=#{orderNo} and itemNo=#{itemNo} and type=#{scheduleType}
  95. </update>
  96. <select id="searchLastApproveQty" resultType="SORoutingData">
  97. select top 1 isnull(TotalFinishedQty,0) lastApproveQty from v_SORouting where Site=#{site} and OrderNo=#{orderNo} and itemNo=dbo.Get_SORouting_PreviousOperationItemNo(#{site},#{orderNo},#{itemNo})
  98. </select>
  99. <select id="getSOScheduleRoutingData" resultType="SOScheduledRoutingOutData">
  100. select a.Site,a.OrderNo,ItemNo,a.SeqNo,a.QtyRequired,a.QtyReported,a.QtyApprove,a.TimeRequired,a.TimeReported,
  101. a.BarcodeID,a.Remark,a.Crewsize,a.ClosedFlag,S_ScheduledDate,S_ResourceID,S_ScheduledSeqNo,S_ShiftNo,
  102. S_WorkCenterNo, a.EnteredDate,a.scheduleType,a.operatorId,a.partNo,dbo.Get_Part_SpecDesc(a.Site,a.partNo) as partDesc,
  103. dbo.Get_OperatorDesc(a.Site,a.operatorId) as operatorName,dbo.Get_ItemDesc(a.Site,a.OrderNo,ItemNo) as itemDesc,a.orderRef1 ,
  104. dbo.Get_WorkCenterDesc(a.Site,S_WorkCenterNo) as workCenterDesc , dbo.Get_Part_SpecDesc(a.Site,a.partNo) as partSpec,a.circulation_seqNo,a.circulation_qty
  105. ,dbo.Get_Part_UMID(a.Site,a.PartNo) umid,b.lotSize ,b.customerId,a.ClosedDate,a.FirstWorkDate,a.printFlag
  106. from SOScheduledRouting a left join shopOrder b on a.OrderNo=b.OrderNo and a.site=b.site
  107. <!-- left join user_work_center uwc on a.site=uwc.site and a.S_WorkCenterNo =uwc.WorkCenterNo and uwc.userId=#{userId}-->
  108. <where>
  109. <!-- and uwc.WorkCenterNo is not null-->
  110. <if test="site != null and site != ''">
  111. AND a.site = #{site}
  112. </if>
  113. <if test="orderNo != null and orderNo != ''">
  114. AND a.OrderNo LIKE '%' + #{orderNo} + '%'
  115. </if>
  116. <if test="seqNo != null ">
  117. AND a.seqNo = #{seqNo}
  118. </if>
  119. <if test="partNo != null and partNo != ''">
  120. AND a.PartNo LIKE '%' + #{partNo} + '%'
  121. </if>
  122. <if test="sWorkCenterNo != null and sWorkCenterNo != ''">
  123. AND a.S_WorkCenterNo LIKE '%'+#{sWorkCenterNo}+'%'
  124. </if>
  125. <if test="itemNo != null and itemNo != ''">
  126. and a.ItemNo = #{itemNo}
  127. </if>
  128. <if test="itemDesc != null and itemDesc != ''">
  129. and dbo.Get_ItemDesc(a.Site,a.OrderNo,a.ItemNo) = #{itemDesc}
  130. </if>
  131. <if test="closedFlag != null and closedFlag != ''">
  132. and a.ClosedFlag = #{closedFlag}
  133. </if>
  134. <if test="startDate != null ">
  135. and S_ScheduledDate >= #{startDate}
  136. </if>
  137. <if test="endDate != null ">
  138. and #{endDate} >= S_ScheduledDate
  139. </if>
  140. <if test="scheduleType != null and scheduleType != ''">
  141. and a.scheduleType = #{scheduleType}
  142. </if>
  143. <if test="reportFlag != null and reportFlag != ''">
  144. and ${reportFlag}
  145. </if>
  146. <if test="operatorName != null and operatorName != ''">
  147. and dbo.Get_OperatorDesc(a.Site,a.operatorId) like #{operatorName}
  148. </if>
  149. <if test="sResourceID != null and sResourceID != ''">
  150. and S_ResourceID like #{sResourceID}
  151. </if>
  152. <if test="sShiftNo != null and sShiftNo != ''">
  153. and a.S_ShiftNo = #{sShiftNo}
  154. </if>
  155. </where>
  156. order by S_ScheduledDate
  157. </select>
  158. <select id="getOldSOScheduledRoutingOutData" resultType="SOScheduledRoutingOutData">
  159. select Site,OrderNo,ItemNo,SeqNo,QtyRequired,QtyReported,QtyApprove,TimeRequired,TimeReported,PlanStartTime,PlanFinishTime,
  160. BarcodeID,Remark,Crewsize,ClosedFlag,QtyScrapt,OutWorkFlag,S_ScheduledDate,S_ResourceID,S_ScheduledSeqNo,S_ShiftNo,
  161. S_WorkCenterNo,ParkFlag,TimeRequired_Original,QtyRequired_Original,QtyReturntoSchedule,StartProdFlag,CancelledProdFlag,
  162. Efficiency,EnteredDate,SelectedFlag,SourceFlag,Closedby,ClosedDate,VirtualResourceFlag,mat_issueflag,plate_issueflag,
  163. tool_issueflag,scheduleType,operatorId,partNo,orderRef1,circulation_seqNo,circulation_qty from SOScheduledRouting where
  164. site=#{site} and seqNo=#{seqNo}
  165. </select>
  166. <update id="closeOldSchedule">
  167. update SOScheduledRouting set ClosedFlag='Y',circulation_seqNo=#{newSeqNo},circulation_qty=#{circulationQty} where site=#{site} and seqNo=#{oldSeqNo}
  168. </update>
  169. <insert id="saveCirculationSchedule" >
  170. INSERT into SOScheduledRouting (Site,OrderNo,ItemNo,SeqNo,QtyRequired,QtyReported,QtyApprove,TimeRequired,TimeReported,PlanStartTime,PlanFinishTime,
  171. BarcodeID,Remark,Crewsize,ClosedFlag,QtyScrapt,OutWorkFlag,S_ScheduledDate,S_ResourceID,S_ScheduledSeqNo,S_ShiftNo,
  172. S_WorkCenterNo,ParkFlag,TimeRequired_Original,QtyRequired_Original,QtyReturntoSchedule,StartProdFlag,CancelledProdFlag,
  173. Efficiency,EnteredDate,SelectedFlag,SourceFlag,Closedby,ClosedDate,VirtualResourceFlag,mat_issueflag,plate_issueflag,
  174. tool_issueflag,scheduleType,operatorId,partNo,orderRef1) values
  175. (#{site},#{orderNo},#{itemNo},#{seqNo},#{qtyRequired},0,0,0,0,#{planStartTime},#{planFinishTime},
  176. #{barcodeID},#{remark},#{crewsize},'N',0,'Y',#{sScheduledDate},#{sResourceID},#{sScheduledSeqNo},#{sShiftNo},
  177. #{sWorkCenterNo},#{parkFlag},#{timeRequiredOriginal},#{qtyRequiredOriginal},null,'N','N',
  178. 0,GetDate(),'N','N',NULL,NULL,NULL,#{matIssueflag},'N','N',#{scheduleType},#{operatorId},#{partNo},#{orderRef1}
  179. )
  180. </insert>
  181. <update id="closeSchedule">
  182. update SOScheduledRouting set ClosedFlag='Y' ,ClosedDate=GetDate() where site=#{site} and seqNo=#{seqNo}
  183. </update>
  184. <select id="searchReportedQty" resultType="SORoutingData">
  185. select top 1 isnull(a.QtyReported,0) QtyReported,isnull(SOP.TotalFinishedQty,0) lastApproveQty
  186. from v_SORouting a
  187. LEFT JOIN SORoutingOutput SOP ON a.site=SOP.site and a.OrderNo=SOP.OrderNo and SOP.itemNo=dbo.Get_SORouting_PreviousOperationItemNo(a.site,a.OrderNo,a.itemNo)
  188. where a.Site=#{site} and a.OrderNo=#{orderNo} and a.itemNo=#{itemNo}
  189. </select>
  190. <select id="getSeqNoSite" resultType="String">
  191. select site from SOScheduledRouting where SeqNo=#{seqNo}
  192. </select>
  193. <select id="searchSeqNo" resultType="SOScheduledRoutingOutData">
  194. select top 1 Site,OrderNo,ItemNo,SeqNo,QtyRequired,QtyReported,QtyApprove,TimeRequired,TimeReported,
  195. BarcodeID,Remark,Crewsize,ClosedFlag,S_ScheduledDate,S_ResourceID,S_ScheduledSeqNo,S_ShiftNo,
  196. S_WorkCenterNo, EnteredDate,scheduleType,operatorId,partNo,dbo.Get_PartDesc(Site,partNo) as partDesc,
  197. dbo.Get_OperatorDesc(Site,operatorId) as operatorName,dbo.Get_ItemDesc(site,orderNo,ItemNo) as itemDesc,orderRef1 ,
  198. dbo.Get_WorkCenterDesc(Site,S_WorkCenterNo) as workCenterDesc , dbo.Get_Part_SpecDesc(Site,partNo) as partSpec,closedFlag,outWorkFlag,ParkFlag,CancelReportFlag
  199. from SOScheduledRouting
  200. where SeqNo=#{seqNo}
  201. </select>
  202. <select id="checkFirstItem" resultType="SOScheduledRoutingOutData">
  203. select site from v_SORouting where orderNo=#{orderNo} and site=#{site} and #{itemNo} >itemNo
  204. </select>
  205. <update id="updateOutWorkFlag">
  206. update SOScheduledRouting set OutWorkFlag='N' where SeqNo =#{seqNo}
  207. </update>
  208. <update id="updateFirstWorkDate">
  209. update SOScheduledRouting set FirstWorkDate=GetDate() where SeqNo =#{seqNo} and FirstWorkDate is null
  210. </update>
  211. <select id="getSfdcList" resultType="com.jtem.modules.Schedule.entity.SfdcCancel">
  212. select a.site,a.OrderNo,a.ItemNo ,a.SeqNo,a.WorkCenterNo,a.ReportDate,a.OperatorID,a.ReportQty,a.ApproveQty,a.ReportedManfTime,a.StatisticDate,
  213. a.AssJobSeqNo,a.Scheduled_ResourceId ResourceID,b.S_ShiftNo ShiftNo,b.partNo,dbo.Get_ItemDesc(a.site,a.OrderNo,a.ItemNo) operation_desc,c.OperatorName,b.S_ShiftNo ShiftDesc,e.ResourceDesc,Reverseflag
  214. ,dbo.Get_Part_Spec(a.site,b.partNo) partSpec,dbo.Get_PartDesc(a.site,b.partNo) PartDesc
  215. from sfdc a LEFT JOIN SOScheduledRouting b on a.Site=b.Site and a.AssJobSeqNo=b.SeqNo
  216. left join Operator c on a.site=c.site and a.OperatorID=c.OperatorID
  217. left join WorkCenterResource e on a.Site=e.Site and a.Scheduled_ResourceId =e.ResourceID and a.WorkCenterNo=e.WorkCenterNo
  218. <where>
  219. and a.AssJobSeqNo is not null
  220. <if test="orderNo != null and orderNo != ''">
  221. and a.OrderNo like #{orderNo}
  222. </if>
  223. <if test="workCenterNo != null and workCenterNo != ''">
  224. and a.WorkCenterNo like #{workCenterNo}
  225. </if>
  226. <if test="partNo != null and partNo != ''">
  227. and b.partNo like #{partNo}
  228. </if>
  229. <if test="itemNo != null and itemNo != ''">
  230. and a.ItemNo = #{itemNo}
  231. </if>
  232. <if test="operatorName != null and operatorName != ''">
  233. and c.OperatorName like #{operatorName}
  234. </if>
  235. <if test="resourceId != null and resourceId != ''">
  236. and a.Scheduled_ResourceId = #{resourceId}
  237. </if>
  238. <if test="shiftNo != null and shiftNo != ''">
  239. and b.S_ShiftNo = #{shiftNo}
  240. </if>
  241. <if test="startDate != null ">
  242. and ReportDate >= #{startDate}
  243. </if>
  244. <if test="endDate != null ">
  245. and #{endDate} >= ReportDate
  246. </if>
  247. <if test="seqNo != null and seqNo != '' ">
  248. and a.AssJobSeqNo = #{seqNo}
  249. </if>
  250. </where>
  251. order by a.ReportDate desc
  252. </select>
  253. <select id="getStockPrint" resultType="com.jtem.modules.Schedule.entity.InventoryStockData">
  254. select Site,WarehouseID,PartNo,BatchNo,LocationID,FirstInDate,LatestOutDate,LatestInDate,ActiveDate,InQty,OutQty,Round(QtyOnHand,4) QtyOnHand,
  255. QtyReserved,InStandardValue,InActualValue,OutStandardValue,OutActualValue,PartnerID,PartnerType,LatestCountDate,
  256. Freezeflag,QtyTmp,ManufactureDate,ExpiredDate,QtytoIssue,DemandPartnerType,DemandPartnerID,DemandPartnerName
  257. ,dbo.Get_PartDesc(Site,PartNo) partDesc,dbo.Get_Part_Spec(Site,PartNo) partSpec,dbo.Get_Part_UMID(Site,PartNo) as umid
  258. from InventoryStock
  259. <where>
  260. <if test="partNo != null and partNo != '' ">
  261. and PartNo like #{partNo}
  262. </if>
  263. <if test="batchNo != null and batchNo != '' ">
  264. and BatchNo like #{batchNo}
  265. </if>
  266. ${zeroSql}
  267. </where>
  268. </select>
  269. <select id="getUnReportToolList" resultType="com.jtem.modules.pda.entity.SfdcToolingHist">
  270. select Site,OrderNo,ItemNo,SeqNo,HistSeqNo,ReportDate,Reportedby,ToolInstanceID,StartDate,FinishDate,FinishFlag,Remark,StartFromRollNo,
  271. FinishQty,RollNo from SFDC_ToolingHist where SeqNo=#{seqNo} and FinishFlag='N'
  272. </select>
  273. <insert id="saveToolIssuance" >
  274. Insert into SFDC_ToolingHist(Site,OrderNo,ItemNo,SeqNo,HistSeqNo,ReportDate,Reportedby,ToolInstanceID,StartDate,FinishFlag,FinishQty) values
  275. (#{site},#{orderNo},#{itemNo},#{seqNo},(select isnull(max(HistSeqNo)+1,1) from SFDC_ToolingHist where Site=#{site} and SeqNo=#{seqNo} ),GetDate(),#{reportedby},#{toolInstanceId},GetDate(),'N',0)
  276. </insert>
  277. <select id="toolReportCheck" resultType="com.jtem.modules.pda.entity.ToolOutData">
  278. select seqNo from SFDC_ToolingHist where Site=#{site} and SeqNo=#{seqNo} and ToolInstanceID=#{toolInstanceId} and FinishFlag='N'
  279. </select>
  280. <select id="getToolData" resultType="com.jtem.modules.pda.entity.ToolOutData">
  281. select a.Site ,a.ToolInstanceID toolInstanceId,a.ToolID toolId,b.ToolDescription toolDesc,c.NumValue as moQty
  282. from ToolDetail a left join ToolHeader b on a.Site=b.site and a.ToolID=b.ToolID
  283. left join PartSubPropertiesValue c on a.ToolID=c.PartNo and a.Site=c.Site and c.PropertiesItemNo='MOLDCAVITY' and c.RecordType='T'
  284. where a.Site=#{site} and a.ToolInstanceID=#{toolInstanceId}
  285. </select>
  286. <update id="updateToolSfdc">
  287. update SFDC_ToolingHist set FinishFlag='Y',FinishQty=#{finishQty,jdbcType=DOUBLE},Reportedby=#{reportedby,jdbcType=VARCHAR},
  288. FinishDate=GetDate(),moQty=#{moQty,jdbcType=DOUBLE},useQty=#{useQty,jdbcType=DOUBLE}
  289. where Site=#{site} and SeqNo=#{seqNo} and ToolInstanceID=#{toolInstanceId} and FinishFlag='N'
  290. </update>
  291. <update id="updateToolActualUseQty">
  292. update ToolDetail set ActualUseQty=Round(isnull(ActualUseQty,0.0)+#{useQty},0) where Site=#{site} and ToolInstanceID=#{toolInstanceId}
  293. </update>
  294. <select id="toolUseDetail" resultType="com.jtem.modules.pda.entity.ToolOutData">
  295. select Site,OrderNo,ItemNo,SeqNo,HistSeqNo,ReportDate,Reportedby,ToolInstanceID,StartDate,FinishDate,FinishFlag,Remark,
  296. FinishQty,useQty,moQty from SFDC_ToolingHist where SeqNo=#{seqNo} and site=#{site}
  297. </select>
  298. <update id="updateSOSPrintFlag">
  299. update SOScheduledRouting set printFlag='Y' where site=#{site} and seqNo=#{seqNo}
  300. </update>
  301. </mapper>