[gdc16]<荣耀战魂>(<ForHonor>)的动画技术

本文深入探讨了游戏《For Honor》中使用的Motion Matching动画系统,该系统通过大量动捕资源实现了高质量、高反馈性的动画效果。文章介绍了传统动画技术的状态机+blend方式,并对比了Motion Matching的优势,如手动工作减少、更精细的动画控制。

这里写图片描述
gdc16, ubisoft带来。
这里写图片描述
对于< For Honor>, 之前就被其质感和异常真实连贯的动作所吸引,刚刚发售入了pc版,上手玩起来果然不同凡响。
这里所有的人都会对其非常出色的动画所吸引,这个文章也是谈的这个。
这一套新的动画系统属于motion matching,有这样的优势:

  • 质量很高
  • 高度可控的反应反馈(responsiveness)
  • 手动工作少(生产效率高)

由于是一个讲动画的文章,非常推荐去看视频原版(gdcvault付费有高质量的视频,youtube上有一个观众录制版:https://www.youtube.com/watch?v=4pdcA3mhe0E&feature=youtu.be

之前动画技术的总结和思考

首先回顾了现在动画技术的状态,目前基本就是一个状态机+blend的方式来处理动画。
这里写图片描述
从gameplay部分得到状态以及走向,然后做状态迁移,迁移过程根据可行的点,计算出一个最佳方案出来
这里写图片描述

迁移过程中,在状态之间的时候做动画blend(正常情况)
这里写图片描述
混合的过程是把动画参数化–分成速度,角度等
然后根据目标,包括速度,角度等,来选取需要的动画,根据参数算出权重,进而进行混合。
但是关于混合,作者也提到一些其他的论文,关于motion field等等,也可以直接跳转到某一帧来实现,在motion filed中,在数据充裕的情况下,反馈则更加即时。

《For Honor》的motion matching

这里写图片描述
核心思路非常粗暴,有大量的动捕的动画资源,每一帧根据需要,跳转到最适合的地方。
这里所谓的跳转合适的地方,是根据一些参数来选择接下来要跳转的地方,比如包括骨骼的位置,for honor里面骨骼存成一些object space中的位置,可以选择位置最接近的部分去做跳转,达到最平滑的效果。
骨骼位置也只是其中之一,还有一些其他的参数来达到。

这里是整个过程:

*首先动捕资源调整,导入,并且被各种标记
*这里的标记是用于给高层系统调用时候的决定的关键信息,包括这是一个受击动画,方向是那里等等
*游戏过程中,gameplay系统发过来各种请求,要求动画系统顺着某个路径前进,响应一些事件等等
*动画系统根据这些需求(可以是非常细致的,比传统的简单状态机更多),来在大量的动捕动画中选择最合适的,进行混合以及播放
*这里选择的依据包括最传统的“受击”等,到一些关键骨骼的动作位置等等


比如这个抓领子的动作,两个玩家需要匹配,这个就需要一些对于动画的修改和displacement。

procedural

还有一些动画是procedural部分(procedural就是计算出来的,典型的就是IK和ragdoll),这个部分说了procedual上面的使用和应用心得,是技术和实用的结合,非常赞:
额外旋转:当一些旋转非常重要的时候,就会在动画上根据时间一点点叠加上旋转信息,让最终的表现准确。
时间缩放(timescale):也是同样的道理,根据需要,做一些逐渐的timescale,上下10-20%这种
滑步处理:首先不需要把滑步当做一个必须要干掉的东西来看待,有时候稍微滑步的效果也是非常好的,可以作为一个方案(timescale的时候),另外需要做滑步处理的时候,就lock toe bone的方式来做
这里写图片描述
躯干弯曲倾斜(spine pitch bending):在两个人高度不一样(身高,所站的地势),处理方法直接让躯干部分倾斜弯曲就好,文中也说了使用剑的IK来驱动是不行的
这里写图片描述
斜面弯曲:这个在台阶上时候,一个问题是脚会穿楼梯,但是作者的主张是动作的平滑远比穿石头重要,优先保证平滑

<meta http-equiv="expires" content="0"> <meta http-equiv="pragma" content="no-cache"> <%@ include file="booktop.jsp" %> <%@ include file="connect.jsp" %> <% String materialno; String plant; String stloc; String slotid; String compare; String yield; String pshipid; String pg_die_c; String i_customerid; String grade; String destination; float pyield; int showyield; String status; String show_status = ""; int n; n = 0; materialno=request.getParameter("materialno").toUpperCase(); plant=request.getParameter("plant").toUpperCase(); stloc=request.getParameter("stloc").toUpperCase(); slotid=request.getParameter("slotid").toUpperCase(); compare=request.getParameter("compare").toUpperCase(); yield=request.getParameter("yield"); i_customerid=request.getParameter("i_customerid").toUpperCase(); grade=request.getParameter("grade").toUpperCase(); destination=request.getParameter("destination").toUpperCase(); status=request.getParameter("status").toUpperCase(); if (status.equals("F")){ status = ""; show_status = "FREE"; } //-add by summer gao on 2005-9-20-- String temp1 = ""; String temp2 = ""; int temp_flag = 0; String d_year = ""; String d_month = ""; String d_day = ""; String temp3=new String(); String temp4=new String(); String rec_date = ""; String str = "0"; int over_flag; int length1; int today; int receive_date; int left; java.util.Date cur_today = new java.util.Date(); SimpleDateFormat formatter = new SimpleDateFormat ("yyyyMMdd"); String dateString = formatter.format(cur_today); //out.println(dateString); String subdate = dateString.substring(4,8); //out.println(subdate); %> <script language="javascript" src="tablesort.js"></script> <script language="javascript" src="openwin.js"></script> <script language="javascript" src="calendar_today.js"></script> <script> function clear_date(b){ eval("window.document.querylotid.invduedate"+b).value = "";} </script> <script> function check_date(num){ for(var i=1; i<num+1; i++ ){ if (eval("window.document.querylotid.invduedate"+i).value == "") {if (eval("window.document.querylotid.reason"+i).value != "") {alert( "Reason " +i+ " should be consistent with the blank Due Date."); return(false); } } else {if (eval("window.document.querylotid.reason"+i).value == "") {alert( "Reason " +i+ " should be consistent with the non-blank Due Date."); return(false); } } } } </script> <script> function sumvalue(v){ var wafer = new Number(0); var die = new Number(0); var len = document.querylotid.slotid.length; if(len > 1){ if (v.value != '-') { for(var i=0; i<len; i++ ){ if (document.querylotid.slotid[i].value == v.value) document.querylotid.slotid[i].checked = v.checked; } } for(var i=0;i<len;i++) { if (document.querylotid.slotid[i].checked) { document.querylotid.lotproduct[i].checked = true; wafer = wafer + new Number(document.querylotid.slotid1[i].value); die = die + new Number(document.querylotid.slotid2[i].value); }else{ document.querylotid.lotproduct[i].checked = false; } } } else{ if (document.querylotid.slotid.checked) { document.querylotid.lotproduct.checked = true; wafer = wafer + new Number(document.querylotid.slotid1.value); die = die + new Number(document.querylotid.slotid2.value); }else{ document.querylotid.lotproduct.checked = false; } } document.querylotid.sumwafer.value = wafer; document.querylotid.sumdie.value = die; } </script> <script> function doIt(v) { var len2= document.querylotid.slotid.length; if (len2>1) { for(var i=0;i<document.querylotid.slotid.length;i++) { document.querylotid.slotid[i].checked=eval(v); document.querylotid.lotproduct[i].checked=eval(v); } document.querylotid.c4.checked=false; document.querylotid.c3.checked=false; var wafer = new Number(0); var die = new Number(0); for(var i=0;i<document.querylotid.slotid1.length;i++) { if (document.querylotid.slotid[i].checked) { wafer = wafer + new Number(document.querylotid.slotid1[i].value); die = die + new Number(document.querylotid.slotid2[i].value); } } document.querylotid.sumwafer.value = wafer; document.querylotid.sumdie.value = die; }else{ document.querylotid.slotid.checked=eval(v); document.querylotid.lotproduct.checked=eval(v); document.querylotid.c4.checked=false; document.querylotid.c3.checked=false; var wafer = new Number(0); var die = new Number(0); if (document.querylotid.slotid.checked) { wafer = new Number(document.querylotid.slotid1.value); die = new Number(document.querylotid.slotid2.value); } document.querylotid.sumwafer.value = wafer; document.querylotid.sumdie.value = die; } } </script> <style> THEAD TD {BACKGROUND: #B9BECB; HEIGHT: 20px; PADDING-Right: 2px;CURSOR:s-resize;} THEAD .arrow {COLOR: black; FONT-FAMILY: webdings; FONT-SIZE: 12px; HEIGHT: 13px; MARGIN-BOTTOM: 2px; MARGIN-TOP: -3px; OVERFLOW: hidden; PADDING-BOTTOM: 2px; PADDING-LEFT: 0px; PADDING-RIGHT: 0px; PADDING-TOP: 0px; WIDTH: 10px} .header { background-color: #B9BECB;} </style> <tr><td bgcolor="#E0E4ED"><br> <% JCO.Client client = null; try { IFunctionTemplate ftemplate = repository.getFunctionTemplate("Z_LB_PIV_SEARCH_LOTS"); JCO.Function function = new JCO.Function(ftemplate); client = JCO.getClient(SID); JCO.ParameterList input = function.getImportParameterList(); input.setValue(materialno, "MATERIALNO"); input.setValue(plant, "PLANT"); input.setValue(stloc, "STLOC"); input.setValue(slotid, "SLOTID"); input.setValue(yield, "I_YIELD"); input.setValue(compare, "I_COMPARE"); input.setValue(i_customerid, "I_CUSTOMERID"); input.setValue(grade, "I_GRADE"); input.setValue(destination, "I_DESTINATION"); input.setValue(status, "I_STATUS"); //---Add by Summer Gao in 2004-03-11 for role check---------- input.setValue(session.getAttribute("role"), "I_ROLE"); //---End add by Summer /* input.setValue("Y", "INTEGRATE"); input.setValue("Y", "NO_EMPTY"); */ client.execute(function); JCO.Table e_lotinfo = function.getTableParameterList().getTable("RLOTINFO"); if (e_lotinfo.getNumRows() > 0) { %> <form name="querylotid" method="post" action="inventory_do_update.jsp" onSubmit="return check_date(<%=e_lotinfo.getNumRows()%>)"> <button type="button" name="c4" value="true" onclick="doIt(true)" style="font-family:verdana;background:#ffeeee">Select All</button>    <button type="button" name="c3" value="false" onclick="doIt(false)" style="font-family:verdana;background:#ffeeee">Unselect All</button>    <b>Sum Wafer Qty</b>   <input type=text name="sumwafer" size="8" style="font-family:verdana;font-weight:bold;background:#eeeeff;border-style:none"> <b>Sum Die Qty</b>   <input type=text name="sumdie" size="13" style="font-family:verdana;font-weight:bold;background:#eeeeff;border-style:none"> <%//Angela Zhang 20050221 begin%>    <a href="inventory_do_query_excel.jsp?materialno=<%=request.getParameter("materialno").toUpperCase()%>&plant=<%=request.getParameter("plant").toUpperCase()%>&stloc=<%=request.getParameter("stloc").toUpperCase()%>&slotid=<%=request.getParameter("slotid").toUpperCase()%>&compare=<%=request.getParameter("compare").toUpperCase()%>&yield=<%=request.getParameter("yield")%>&i_customerid=<%=request.getParameter("i_customerid").toUpperCase()%>&destination=<%=request.getParameter("destination").toUpperCase()%>&grade=<%=request.getParameter("grade").toUpperCase()%>&status=<%=request.getParameter("status").toUpperCase()%>&role=<%=session.getAttribute("role")%>" target="_blank">Download </a> <%//Angela Zhang 20050221 end%> <table bgcolor="white" id="oTable" onclick="sortColumn(event)" width="2600" align="center" bordercolorlight="#2D4285" bordercolordark="#ffffff" border="1" cellspacing="0" cellpadding="0"> <thead> <tr> <td><b>Select</b></td><td><b>Status</b></td> <td width=4><b>Book Mark</b></td> <td><b>ProductID</b></td> <td><b>LotID</b></td> <td width=4><b>Lot Type</b></td> <td ><b>Due Date</b>(yyyy-mm-dd)</td> <td ><b>Reason</b></td> <td ><b>Remark</b></td> <td><b>ReceiveDate</b></td> <td><b>TotalQty</b></td> <td><b>Grade</b></td> <td><b>Unit</b></td> <td><b>ShipCode</b></td> <td><b>Yield(%)</b></td> <td><b>G_Die_C</b></td> <td><b>Unrestr.QTY</b></td> <td><b>BatchID</b></td> <td><b>Wafer ID</b></td> <td><b>Destination</b></td><td><b>Wafer Start Date</b></td> <td><b>Customer Lot ID</b></td><td><b>CustomerID</b></td> <td><b>SMICCustomerLotID</b></td><td><b>Term Code</b></td><td><b>Ownership</b></td> <td><b>Plant</b></td><td><b>Storage</b></td><td><b>Reserve No</b></td> <td><b>ReceivePerson</b></td> <td width="60"><b>Customer Criteria</b></td> </tr> </TR> </thead> <% do { n = n + 1; if ((show_status.equals("FREE") && (e_lotinfo.getString("STATUS").equals(""))) || show_status.equals("")) { if (e_lotinfo.getString("SHIPID").equals("")) { pshipid="-"; }else{ pshipid=e_lotinfo.getString("SHIPID"); } if (e_lotinfo.getString("G_DIE_C").equals("")) { pg_die_c="0"; }else{ pg_die_c=e_lotinfo.getString("G_DIE_C"); } //--add by summer gao on 2005-9-20-- over_flag = 0; length1 = 0; temp_flag = 0; d_year = ""; d_month = ""; d_day = ""; temp3 = ""; temp4 = ""; today = 0; receive_date = 0; left = 0; rec_date = e_lotinfo.getString("RECEIVEDATE"); if (rec_date.equals("")) { temp_flag = 4; }else{ length1 = rec_date.length(); if (length1 == 8) { d_year = rec_date.substring(0,4); d_month = rec_date.substring(5,6); temp4=new String(str.concat(d_month.substring(0,1))); d_month = temp4; d_day = rec_date.substring(7,8); temp3=new String(str.concat(d_day.substring(0,1))); d_day = temp3; temp3=new String(d_year.concat(d_month)); temp4=new String(temp3.concat(d_day)); rec_date = temp4; }else{ if (length1 == 10) { d_year = rec_date.substring(0,4); d_month = rec_date.substring(5,7); d_day = rec_date.substring(8,10); temp3=new String(d_year.concat(d_month)); temp4=new String(temp3.concat(d_day)); rec_date = temp4; }else{ if (length1 == 9) { d_year = rec_date.substring(0,4); d_month = rec_date.substring(5,7); if (d_month.substring(1,2).equals("-")) { temp4=new String(str.concat(d_month.substring(0,1))); d_month = temp4; d_day = rec_date.substring(7,9); temp3=new String(d_year.concat(d_month)); temp4=new String(temp3.concat(d_day)); rec_date = temp4; }else{ d_day = rec_date.substring(7,9); temp3=new String(str.concat(d_day.substring(1,2))); d_day = temp3; temp3=new String(d_year.concat(d_month)); temp4=new String(temp3.concat(d_day)); rec_date = temp4; } } } } today = Integer.parseInt(dateString); receive_date= Integer.parseInt(rec_date); left = today - receive_date; if (left > 10000){ over_flag = 8; } } //-- %> <%if ((e_lotinfo.getString("USEQTY").equals("0"))&&( !e_lotinfo.getString("STATUS").equals("S"))) { %> <tr bgcolor=beige> <%}else if ( e_lotinfo.getString("NOT_MATCH").equals("Y")) {%> <tr bgcolor="#E893AF"> <%}else if ( e_lotinfo.getString("STATUS").equals("R")) {%> <tr bgcolor="#eeeeff"> <%}else if ( e_lotinfo.getString("STATUS").equals("S")) {%> <tr bgcolor="#ffeeee"> <%}else if ( e_lotinfo.getString("STATUS").equals("")) { %> <tr> <%}else if ( e_lotinfo.getString("STATUS").equals("B")) {%> <tr bgcolor="orange"> <%//}else if (over_flag == 8) { // out.println("DDDD"); %> <%}%> <td align=center> <!--Add by summer gao in 20040616 for new ship function--> <%if (e_lotinfo.getString("SHIPID").equals("")) { %> <input type="checkbox" name="slotid" onclick=sumvalue(this) value="<%=pshipid%>"> <%}else{ %> <input type="checkbox" name="slotid" onclick=sumvalue(this) value="<%=pshipid+"+"+e_lotinfo.getString("RECEIVEPERSON")%>"> <%}%> <input type="checkbox" name="lotproduct" value="<%=e_lotinfo.getString("PRODUCTID")+"+"+e_lotinfo.getString("PLANT")+"+"+e_lotinfo.getString("SMICLOTID")%>" style="display:none;"> <input type="hidden" name="slotid1" value="<%=e_lotinfo.getString("USEQTY")%>"> <input type="hidden" name="slotid2" value="<%=pg_die_c%>"> </td> <%if (e_lotinfo.getString("STATUS").equals("B")) { %> <td>Error</td> <%}else if ((e_lotinfo.getString("USEQTY").equals("0"))&&(!e_lotinfo.getString("STATUS").equals("S"))) {%> <td>X</td> <%}else if (e_lotinfo.getString("STATUS").equals("")) {%> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("STATUS")%></td> <%}%> <%if (e_lotinfo.getString("MARK").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("MARK")%></td> <%}%> <td><%=e_lotinfo.getString("PRODUCTID")%></td> <input type="hidden" name=<%="ProdID"+n%> value="<%=e_lotinfo.getString("PRODUCTID")%>"> <td><%=e_lotinfo.getString("SMICLOTID")%></td> <input type="hidden" name=<%="LotID"+n%> value="<%=e_lotinfo.getString("SMICLOTID")%>"> <%//Fly Long add Lot Type 20050905 if (e_lotinfo.getString("LOTTYPE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("LOTTYPE")%></td> <%}%> <td nowrap width=135> <%if (e_lotinfo.getString("INVDUEDATE").equals("")) { %> <input type="text" size="9" name=<%="invduedate"+n%> value="" onFocus="this.blur();openWindow('querylotid.invduedate'+<%=n%>,'s');"> <input type="button" name=<%="cleardate"+n%> onclick=clear_date(<%=n%>) value="Reset" size="3"> <%}else{%> <input type="text" size="9" name=<%="invduedate"+n%> value=<%=e_lotinfo.getString("INVDUEDATE")%> onFocus="this.blur();openWindow('querylotid.invduedate'+<%=n%>,'s');"> <input type="button" name=<%="cleardate"+n%> onclick=clear_date(<%=n%>) value="Reset" size="3"> <%}%> </td> <td width=130> <%if (e_lotinfo.getString("REASON").equals("")) { %> <select name=<%="reason"+n%> style="font-size:9pt"> <option value=""> </option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> </select> <%}else if (e_lotinfo.getString("REASON").equals("CUSTOMER PULL IN")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("CUSTOMER PUSH OUT")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("ENG ISSUE")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="ENG ISSUE">Eng Issue</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("OTHER")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="OTHER">Other</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("NO PO") || e_lotinfo.getString("REASON").equals("BACKUP WAFER")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("CUSTOMER RETURN")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="CUSTOMER RETURN">Customer return</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("WAIT SCRAP")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="WAIT SCRAP">Wait scrap</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("PULL AHEAD PO")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("YIELD IMPROVEMENT")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}%> </td> <td width=100><input type="text" size="30" name=<%="reason_remark"+n%> value="<%=e_lotinfo.getString("REASON_REMARK")%>"> <%//--add by lily tian for BJ FG WH if (e_lotinfo.getString("RECEIVEDATE").equals("")) { %> <td> </td> <%}else{ //--add by summer gao if (over_flag == 8) { %> <td><font color="#FF0000"><b><%=e_lotinfo.getString("RECEIVEDATE")%></b></font></td> <%}else{%> <td><%=e_lotinfo.getString("RECEIVEDATE")%></td> <%} } %> <td><%=e_lotinfo.getString("TOTALSTOCKQTY")%></td> <%if (e_lotinfo.getString("ZGRADE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("ZGRADE")%></td> <%}%> <td><%=e_lotinfo.getString("MEINS")%></td> <td><%=e_lotinfo.getString("SHIPPROCESS")%></td> <%if (e_lotinfo.getString("YIELD").equals("")) { %> <td> </td> <%}else{%> <td> <% //=e_lotinfo.getString("YIELD") pyield = Float.parseFloat(e_lotinfo.getString("YIELD")); showyield = (new Float(pyield*100)).intValue(); out.print (showyield); %> </td> <%}%> <td> <%if (e_lotinfo.getString("PRODUCTID").indexOf("-") == -1) {%> <a href="update_gdc.jsp?productid=<%=e_lotinfo.getString("PRODUCTID")%>&plant=<%=e_lotinfo.getString("PLANT")%>&slotid=<%=e_lotinfo.getString("SMICLOTID")%>"> <%=pg_die_c%> </a> <%}else{%> <%=pg_die_c%> <%}%> </td> <td><%=e_lotinfo.getString("USEQTY")%></td> <td><%=pshipid%></td> <%if (e_lotinfo.getString("WAFERID").equals("")) { %> <td> </td> <%}else{%> <td> <%if (e_lotinfo.getString("PRODUCTID").indexOf("-") == -1) {%> <a href="javascript:openwin('wafer_detail.jsp?productid=<%=e_lotinfo.getString("PRODUCTID")%>&plant=<%=e_lotinfo.getString("PLANT")%>&slotid=<%=e_lotinfo.getString("SMICLOTID")%>','','250','800')"> <%=e_lotinfo.getString("WAFERID")%> </a> <%}else{%> <%=e_lotinfo.getString("WAFERID")%> <%}%> </td> <%}%> <%if (e_lotinfo.getString("DESTINATION").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("DESTINATION")%></td> <%}%> <%if (e_lotinfo.getString("STARTDATE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("STARTDATE")%></td> <%}%> <%if (e_lotinfo.getString("CUSTOMERLOTID").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("CUSTOMERLOTID")%></td> <%}%> <%if (e_lotinfo.getString("SMICCUSTID").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("SMICCUSTID")%></td> <%}%> <%if (e_lotinfo.getString("SMICCUSTLOTID").equals("")) { %> <td> </td> <%}else{%> <td align=center><%=e_lotinfo.getString("SMICCUSTLOTID")%></td> <%}%> <%if (e_lotinfo.getString("SMICTERMCODE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("SMICTERMCODE")%></td> <%}%> <%if (e_lotinfo.getString("OWNERSHIP").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("OWNERSHIP")%></td> <%}%> <td><%=e_lotinfo.getString("PLANT")%></td> <td><%=e_lotinfo.getString("SLOC")%></td> <%if (e_lotinfo.getString("RESERVENO").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("RESERVENO")%></td> <%}%> <%//--add by summer gao for ship function if (e_lotinfo.getString("RECEIVEPERSON").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("RECEIVEPERSON")%></td> <%}%> <%if (e_lotinfo.getString("CUSTOMERCRITERIA").equals("")) { %> <td> </td> <%}else{%> <td align=center><%=e_lotinfo.getString("CUSTOMERCRITERIA")%></td> <%}%> </tr> <% } } while(e_lotinfo.nextRow()); %> </table> <%if (!("VIEW_SH01".equals(session.getAttribute("role"))||"VIEW_BJ01".equals(session.getAttribute("role"))||"VIEW_TJ01".equals(session.getAttribute("role")) ||"VIEW_WH01".equals(session.getAttribute("role")) || "SA_SH01".equals(session.getAttribute("role"))||"SA_BJ01".equals(session.getAttribute("role"))||"SA_TJ01".equals(session.getAttribute("role"))||"SA_WH01".equals(session.getAttribute("role")))) {%> //update by maple <tr> <td colspan="2" align="left">                      <input type="submit" name="Submit" value="Submit" style="font-family:verdana;background:#B9BECB">            <input type="reset" name="Submit2" value="Reset" style="font-family:verdana;background:#B9BECB"> <input type="hidden" name="rown" value="<%=n%>"> </td> </tr> <%}%> </form> <% } else { out.println("<img src=pic/wrong.gif> <b> Sorry, system have no fixed Lots data.</b>"); }%> <%} catch (Exception ex) { System.out.println("Caught an exception: \n" + ex); } finally { JCO.releaseClient(client); JCO.removeClientPool(SID); } System.out.println("row n=" + n); %> </td></tr> <%@ include file="bookbottom.jsp" %> 代码转为controller Service ServiceImpl 去掉前端处理
08-29
//-- %> <%if ((e_lotinfo.getString("USEQTY").equals("0"))&&( !e_lotinfo.getString("STATUS").equals("S"))) { %> <tr bgcolor=beige> <%}else if ( e_lotinfo.getString("NOT_MATCH").equals("Y")) {%> <tr bgcolor="#E893AF"> <%}else if ( e_lotinfo.getString("STATUS").equals("R")) {%> <tr bgcolor="#eeeeff"> <%}else if ( e_lotinfo.getString("STATUS").equals("S")) {%> <tr bgcolor="#ffeeee"> <%}else if ( e_lotinfo.getString("STATUS").equals("")) { %> <tr> <%}else if ( e_lotinfo.getString("STATUS").equals("B")) {%> <tr bgcolor="orange"> <%//}else if (over_flag == 8) { // out.println("DDDD"); %> <%}%> <td align=center> <!--Add by summer gao in 20040616 for new ship function--> <%if (e_lotinfo.getString("SHIPID").equals("")) { %> <input type="checkbox" name="slotid" onclick=sumvalue(this) value="<%=pshipid%>"> <%}else{ %> <input type="checkbox" name="slotid" onclick=sumvalue(this) value="<%=pshipid+"+"+e_lotinfo.getString("RECEIVEPERSON")%>"> <%}%> <input type="checkbox" name="lotproduct" value="<%=e_lotinfo.getString("PRODUCTID")+"+"+e_lotinfo.getString("PLANT")+"+"+e_lotinfo.getString("SMICLOTID")%>" style="display:none;"> <input type="hidden" name="slotid1" value="<%=e_lotinfo.getString("USEQTY")%>"> <input type="hidden" name="slotid2" value="<%=pg_die_c%>"> </td> <%if (e_lotinfo.getString("STATUS").equals("B")) { %> <td>Error</td> <%}else if ((e_lotinfo.getString("USEQTY").equals("0"))&&(!e_lotinfo.getString("STATUS").equals("S"))) {%> <td>X</td> <%}else if (e_lotinfo.getString("STATUS").equals("")) {%> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("STATUS")%></td> <%}%> <%if (e_lotinfo.getString("MARK").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("MARK")%></td> <%}%> <td><%=e_lotinfo.getString("PRODUCTID")%></td> <input type="hidden" name=<%="ProdID"+n%> value="<%=e_lotinfo.getString("PRODUCTID")%>"> <td><%=e_lotinfo.getString("SMICLOTID")%></td> <input type="hidden" name=<%="LotID"+n%> value="<%=e_lotinfo.getString("SMICLOTID")%>"> <%if (e_lotinfo.getString("CUSTOMERLOTID").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("CUSTOMERLOTID")%></td> <%}%> <%//Fly Long add Lot Type 20050905 if (e_lotinfo.getString("LOTTYPE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("LOTTYPE")%></td> <%}%> <td nowrap width=135> <%if (e_lotinfo.getString("INVDUEDATE").equals("")) { %> <input type="text" size="9" name=<%="invduedate"+n%> value="" onFocus="this.blur();openWindow('querylotid.invduedate'+<%=n%>,'s');"> <input type="button" name=<%="cleardate"+n%> onclick=clear_date(<%=n%>) value="Reset" size="3"> <%}else{%> <input type="text" size="9" name=<%="invduedate"+n%> value=<%=e_lotinfo.getString("INVDUEDATE")%> onFocus="this.blur();openWindow('querylotid.invduedate'+<%=n%>,'s');"> <input type="button" name=<%="cleardate"+n%> onclick=clear_date(<%=n%>) value="Reset" size="3"> <%}%> </td> <td width=130> <% PreparedStatement psLotid = null; ResultSet rsLotid = null; lotid = ""; lotid1 = ""; lotid = e_lotinfo.getString("SMICLOTID"); psLotid = con_ace.prepareStatement("select unique lot_id from top_oqa_excursion_config where lot_id= '"+lotid+"'"); rsLotid = psLotid.executeQuery(); while(rsLotid.next()){ lotid1 = rsLotid.getString("lot_id"); } psLotid.close(); %> <%if (!lotid1.equals("")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="">Excursion Lot</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> </select> <%}else if (e_lotinfo.getString("REASON").equals("")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value=""> </option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> </select> <%}else if (e_lotinfo.getString("REASON").equals("CUSTOMER PULL IN")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("CUSTOMER PUSH OUT")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("ENG ISSUE")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="ENG ISSUE">Eng Issue</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("OTHER")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="OTHER">Other</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("NO PO") || e_lotinfo.getString("REASON").equals("BACKUP WAFER")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("CUSTOMER RETURN")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="CUSTOMER RETURN">Customer return</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("WAIT SCRAP")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="WAIT SCRAP">Wait scrap</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("PULL AHEAD PO")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}else if (e_lotinfo.getString("REASON").equals("YIELD IMPROVEMENT")) {%> <select name=<%="reason"+n%> style="font-size:9pt"> <option value="YIELD IMPROVEMENT">Yield improvement</option> <option value="WAIT SCRAP">Wait scrap</option> <option value="CUSTOMER PULL IN">Customer pull in</option> <option value="CUSTOMER PUSH OUT">Customer push out</option> <option value="ENG ISSUE">Eng Issue</option> <!-Angela 20061113--> <!--<option value="NO PO">No PO</option>--> <option value="BACKUP WAFER">Backup wafer</option> <option value="PULL AHEAD PO">Pull ahead PO</option> <option value="CUSTOMER RETURN">Customer return</option> <option value="OTHER">Other</option> <option value=""> </option> </select> <%}%> </td> <td width=100><input type="text" size="30" name=<%="reason_remark"+n%> value="<%=e_lotinfo.getString("REASON_REMARK")%>"> <%if (e_lotinfo.getString("FIRSTRECEIVEDATE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("FIRSTRECEIVEDATE")%></td> <%}%> <%//--add by lily tian for BJ FG WH if (e_lotinfo.getString("RECEIVEDATE").equals("")) { %> <td> </td> <%}else{ //--add by summer gao if (days > 180) { %> <td><font color="#FF0000"><b><%=e_lotinfo.getString("RECEIVEDATE")%></b></font></td> <%}else{%> <td><%=e_lotinfo.getString("RECEIVEDATE")%></td> <%} } %> <td><%=e_lotinfo.getString("TOTALSTOCKQTY")%></td> <%if (e_lotinfo.getString("DESTINATION").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("DESTINATION")%></td> <%}%> <td><%=e_lotinfo.getString("MEINS")%></td> <td><%=e_lotinfo.getString("SHIPPROCESS")%></td> <%if (e_lotinfo.getString("YIELD").equals("")) { %> <td> </td> <%}else{%> <td> <% //=e_lotinfo.getString("YIELD") pyield = Float.parseFloat(e_lotinfo.getString("YIELD")); showyield = (new Float(pyield*100)).intValue(); out.print (showyield); %> </td> <%}%> <td> <%if (e_lotinfo.getString("PRODUCTID").indexOf("-") == -1) {%> <a href="update_gdc.jsp?productid=<%=e_lotinfo.getString("PRODUCTID")%>&plant=<%=e_lotinfo.getString("PLANT")%>&slotid=<%=e_lotinfo.getString("SMICLOTID")%>"> <%=pg_die_c%> </a> <%}else{%> <%=pg_die_c%> <%}%> </td> <td><%=e_lotinfo.getString("USEQTY")%></td> <td><%=pshipid%></td> <%if (e_lotinfo.getString("WAFERID").equals("")) { %> <td> </td> <%}else{%> <td> <%if (e_lotinfo.getString("PRODUCTID").indexOf("-") == -1) {%> <a href="javascript:openwin('wafer_detail.jsp?productid=<%=e_lotinfo.getString("PRODUCTID")%>&plant=<%=e_lotinfo.getString("PLANT")%>&slotid=<%=e_lotinfo.getString("SMICLOTID")%>','','250','800')"> <%=e_lotinfo.getString("WAFERID")%> </a> <%}else{%> <%=e_lotinfo.getString("WAFERID")%> <%}%> </td> <%}%> <%if (e_lotinfo.getString("ZGRADE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("ZGRADE")%></td> <%}%> <%if (e_lotinfo.getString("STARTDATE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("STARTDATE")%></td> <%}%> <%if (e_lotinfo.getString("SMICCUSTID").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("SMICCUSTID")%></td> <%}%> <%if (e_lotinfo.getString("SMICCUSTLOTID").equals("")) { %> <td> </td> <%}else{%> <td align=center><%=e_lotinfo.getString("SMICCUSTLOTID")%></td> <%}%> <%if (e_lotinfo.getString("SMICTERMCODE").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("SMICTERMCODE")%></td> <%}%> <%if (e_lotinfo.getString("OWNERSHIP").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("OWNERSHIP")%></td> <%}%> <td><%=e_lotinfo.getString("PLANT")%></td> <td><%=e_lotinfo.getString("SLOC")%></td> <%if (e_lotinfo.getString("RESERVENO").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("RESERVENO")%></td> <%}%> <%//--add by summer gao for ship function if (e_lotinfo.getString("RECEIVEPERSON").equals("")) { %> <td> </td> <%}else{%> <td><%=e_lotinfo.getString("RECEIVEPERSON")%></td> <%}%> <%if (e_lotinfo.getString("CUSTOMERCRITERIA").equals("")) { %> <td> </td> <%}else{%> <td align=center><%=e_lotinfo.getString("CUSTOMERCRITERIA")%></td> <%}%> </tr> <% } } while(e_lotinfo.nextRow()); %> </table> <%if (!("VIEW_SH01".equals(session.getAttribute("role"))||"VIEW_BJ01".equals(session.getAttribute("role"))||"VIEW_TJ01".equals(session.getAttribute("role")) ||"VIEW_WH01".equals(session.getAttribute("role")) || "SA_SH01".equals(session.getAttribute("role"))||"SA_BJ01".equals(session.getAttribute("role"))||"SA_TJ01".equals(session.getAttribute("role"))||"SA_WH01".equals(session.getAttribute("role")))) {%> <tr> <td colspan="2" align="left">                      <input type="submit" name="Submit" value="Submit" style="font-family:verdana;background:#B9BECB">            <input type="reset" name="Submit2" value="Reset" style="font-family:verdana;background:#B9BECB"> <input type="hidden" name="rown" value="<%=n%>"> </td> </tr> <%}%> </form> <% } else { out.println("<img src=pic/wrong.gif> <b> Sorry, system have no fixed Lots data.</b>"); }%> <%} catch (Exception ex) { System.out.println("Caught an exception: \n" + ex); } finally { if (con_ace != null) { con_ace.close(); } JCO.releaseClient(client); JCO.removeClientPool(SID); } System.out.println("row n=" + n); %> </td></tr> 前端 和 后端分离开 dto 逻辑 另一份DTO
08-29
<script setup lang="ts"> import { ref, onMounted, onBeforeMount, onBeforeUnmount, watch, computed } from "vue"; import logoB from "@/assets/map/B.png"; import logoA from "@/assets/map/A.png"; import { useRouter } from "vue-router"; import { number } from "echarts"; import { createConnectionAsync } from "@/utils/signalr"; import gdcPng from "@/assets/map/gdc.png"; import { el } from "element-plus/es/locale/index.mjs"; const router = useRouter(); // 系统名称和logo const systemName = computed(() => props.systemType === 1 ? "地面开门系统" : "地面关门系统" ); const infoStatus = ref(); const logoImg = computed(() => (props.systemType === 1 ? logoA : logoB)); const props = defineProps({ title: { type: String, default: "车辆识别信息" }, trainId: Number, tagCode: { type: String, default: "_______无________" }, tagTime: { type: String, default: "_______无________" }, trainName: { type: String, default: "_______无________" }, systemType: { type: Number, default: 1 } }); //车辆信息 const train = ref<any[]>([]); // 定时器相关 const intervalId = ref<NodeJS.Timeout | null>(null); const connection = ref<any>(null); // 创建SignalR连接并获取数据 const fetchTrainData = async () => { if (!connection.value) { connection.value = await createConnectionAsync(`/train`); } const result = await connection.value.invoke("GetTrainMap"); train.value = result[0] || {}; }; const startDataRefresh = () => { intervalId.value = setInterval(fetchTrainData, 5000); }; const updateTrains = () => { var a = 1; }; // 监听trains数据变化 watch( train, () => { updateTrains(); }, { deep: true } ); onMounted(async () => { await fetchTrainData(); startDataRefresh(); }); onBeforeUnmount(() => { // 清理资源 if (intervalId.value) clearInterval(intervalId.value); if (connection.value) connection.value.stop(); }); </script> <template> <el-card style="padding: 10px; min-height: 730px"> <template #header> <div class="card-header text-center"> <span>当前车辆:{{ props.trainName }}</span> </div> </template> <el-row> <el-col :span="14"> <el-row> <el-avatar :size="80" shape="square" fit="contain" :src="gdcPng" /> </el-row> </el-col> <el-col :span="10" class="p-1" style="align-items: end"> <el-row class="p-5"> <el-button :type="train?.train_Status === 1 ? 'success' : 'info'" round >正  常</el-button > <el-button :type=" train?.train_Status == null || train?.train_Status !== 0 ? 'danger' : 'info' " round >离  线</el-button > </el-row> </el-col> </el-row> <el-divider /> <el-row class="p-2" :gutter="20"> <el-col :span="7"> <el-card style="min-height: 115px"> <el-row :gutter="20"> <el-col :span="14"><h4>电池信息</h4></el-col> <el-col :span="8" style="padding-bottom: 10px"> <el-button :type="train?.battery_Level > 40 ? 'success' : 'info'" round >正  常</el-button > </el-col> <el-col :span="14"> <h4>{{ train?.battery_Level ?? "--" }}%</h4> </el-col> <el-col :span="8"> <el-button :type=" train?.battery_Level == null || train?.battery_Level < 40 ? 'danger' : 'info' " round >异  常</el-button > </el-col> </el-row> </el-card> </el-col> <el-col :span="7"> <el-card style="min-height: 115px"> <el-row :gutter="20"> <el-col :span="14"><h4>气源状态</h4></el-col> <el-col :span="8" style="padding-bottom: 10px"> <el-button :type="train?.mpa > 400 ? 'success' : 'info'" round >正  常</el-button > </el-col> <el-col :span="14"> <h4>{{ train?.mpa ?? "--" }}</h4> </el-col> <el-col :span="8"> <el-button :type=" train?.mpa == null || train?.mpa < 400 ? 'danger' : 'info' " round >异  常</el-button > </el-col> </el-row> </el-card> </el-col> <el-col :span="10"> <el-card style="min-height: 115px"> <el-row :gutter="20"> <el-col :span="24"><h4>顶门状态</h4></el-col> <el-col :span="24" style="padding-top: 15px"> <el-button :type="train?.Dm_State === 1 ? 'success' : 'info'" round >打  开</el-button > <el-button :type="train?.Dm_State === 2 ? 'danger' : 'info'" round >关  闭</el-button > <el-button :type=" train?.Dm_State == null || train?.Dm_State == 0 ? 'danger' : 'info' " round >未  知</el-button > </el-col> </el-row> </el-card> </el-col> </el-row> <el-divider /> <el-row class="p-2" :gutter="20"> <el-col :span="7"> <el-card style="min-height: 115px"> <el-row :gutter="20"> <el-col :span="14"><h4>开门状态</h4></el-col> <el-col :span="8" style="padding-bottom: 10px"> <el-button :type="train?.onoff_State === 1 ? 'success' : 'info'" round >关  门</el-button > </el-col> <el-col :span="14" /> <el-col :span="8"> <el-button :type="train?.onoff_State !== 1 ? 'danger' : 'info'" round >开  门</el-button > </el-col> </el-row> </el-card> </el-col> <el-col :span="7"> <el-card style="min-height: 115px"> <el-row :gutter="20"> <el-col :span="14"><h4>锁闭状态</h4></el-col> <el-col :span="8" style="padding-bottom: 10px"> <el-button :type="train?.bs_State === 1 ? 'success' : 'info'" round >锁  闭</el-button > </el-col> <el-col :span="14" /> <el-col :span="8"> <el-button :type="train?.bs_State !== 1 ? 'danger' : 'info'" round >锁  开</el-button > </el-col> </el-row> </el-card> </el-col> <el-col :span="10"> <el-card style="min-height: 115px"> <el-row :gutter="20"> <el-col :span="24"><h4>故障状态</h4></el-col> <el-col :span="24" style="padding-top: 15px"> {{ train?.故障状态 ? train.故障状态 : "无" }} </el-col> </el-row> </el-card> </el-col> </el-row> </el-card> </template> <style lang="scss" scoped> :deep(.el-card__header) { padding: 5px; } .card-header { font-weight: bold; } </style> 当train值发生改变是页面展现也同时改变
08-23
服务端返回的数据是这样的:<p>本题可通过作辅助线构造等边三角形和全等三角形,进而求出(\angle B)的度数。</p> <h3>步骤一:构造等边三角形</h3> <p>以(AC)为边作等边(\triangle ACE),连接(DE)。 因为(\triangle ACE)是等边三角形,所以(AC = AE = CE)(\angle CAE=\angle AEC=\angle ACE = 60^{\circ})。 已知(\angle CAD = 60^{\circ})(\angle C = 40^{\circ}),则(\angle BAD=\angle CAE-\angle CAD-\angle BAC = 60^{\circ}- 60^{\circ}-\angle BAC = 0^{\circ})(此方法有误,重新构造)</p> <p>重新构造:以(BD)为边作等边(\triangle BDF),连接(AF)。 因为(\triangle BDF)是等边三角形,所以(BD = DF = BF)(\angle DBF=\angle BFD=\angle BDF = 60^{\circ})。 已知(BD = AC),所以(AC = DF)。</p> <h3>步骤二:求(\angle ACB)相关角度</h3> <p>已知(\angle ACB = 40^{\circ})(\angle CAD = 60^{\circ}),根据三角形内角和为(180^{\circ}),可得(\angle ADC=180^{\circ}-\angle C - \angle CAD=180^{\circ}-40^{\circ}-60^{\circ}=80^{\circ})。</p> <h3>步骤三:证明(\triangle ACF\cong\triangle DFB)</h3> <p>因为(\angle ADC = 80^{\circ})(\angle BDF = 60^{\circ}),所以(\angle ADF=\angle ADC-\angle BDF = 80^{\circ}-60^{\circ}=20^{\circ})。 又因为(\angle ACB = 40^{\circ})(\angle ACE = 60^{\circ})(前面构造有误,重新推理) 因为(BD = AC), 设(AC = BD=a)。 在(\triangle ABC)中,(\angle ACB = 40^{\circ})(\angle CAD = 60^{\circ}),所以(\angle ADB=\angle C+\angle CAD=40^{\circ}+60^{\circ} = 100^{\circ})。 以(AD)为边作等边(\triangle ADG),连接(CG)。 因为(\triangle ADG)是等边三角形,所以(AD = AG = DG)(\angle ADG=\angle DAG=\angle AGD = 60^{\circ})。 因为(\angle CAD = 60^{\circ}),所以(\angle CAG=\angle CAD+\angle DAG=60^{\circ}+60^{\circ}=120^{\circ})(\angle ADB = 100^{\circ})(\angle GDC=\angle ADG+\angle ADC=60^{\circ}+(180^{\circ}-40^{\circ}-60^{\circ})=140^{\circ})(错误,重新构造)</p> <p>重新构造:延长(AD)(E),使(DE = AC),连接(BE)。 因为(BD = AC),所以(BD = DE),则(\angle E=\angle DBE)(\angle ADB=\angle C+\angle CAD=40^{\circ}+60^{\circ}=100^{\circ}),所以(\angle BDE = 180^{\circ}-\angle ADB=80^{\circ}),则(\angle E=\angle DBE=(180^{\circ}-\angle BDE)\div2=(180 - 80)^{\circ}\div2 = 50^{\circ})。 又因为(BD = AC)(DE = AC),所以可证(\triangle BDE\cong\triangle CAB)(SAS)(BD = AC)(\angle BDE=\angle CAB = 80^{\circ})(\angle CAB=180^{\circ}-\angle C-\angle ABC),后面推导),(DE = AB)(通过角度推导边)) 因为(\angle CAD = 60^{\circ})(\angle ACB = 40^{\circ}),所以(\angle CAB=180^{\circ}-\angle C - \angle ABC)(\angle ADB=\angle C+\angle CAD = 100^{\circ})。 在(AB)上截取(AF = AC),连接(DF)。 因为(\angle CAD = 60^{\circ}),所以(\triangle ACF)是等边三角形(有一个角是(60^{\circ})的等腰三角形是等边三角形),则(AC = CF)(\angle ACF = 60^{\circ})(\angle FCB=\angle ACB-\angle ACF=40^{\circ}-60^{\circ})(错误,重新来)</p> <p>正确构造:作(AE = BD),且(\angle CAE = \angle BDA = 100^{\circ})(\angle BDA=\angle C+\angle CAD = 40 + 60=100^{\circ})),连接(CE)。 因为(BD = AC)(AE = BD),所以(AE = AC)。 在(\triangle ACE)中,(AE = AC)(\angle CAE = 100^{\circ}),所以(\angle ACE=\angle AEC=(180^{\circ}-\angle CAE)\div2=(180 - 100)^{\circ}\div2 = 40^{\circ})。 又因为(AC = BD)(\angle CAE=\angle BDA)(AE = BD),所以(\triangle CAE\cong\triangle BDA)(SAS))。 所以(\angle B=\angle ACE = 20^{\circ})。</p> <p>综上,(\boldsymbol{\angle B = 20^{\circ}})。 </p>
06-10
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值