Java의 배치 추가 데이터와 여러 필드가 동시에 추가되었습니다. 오늘날 우리는 Java의 특정 예를 사용하여 Oracle 데이터베이스를 향한 데이터를 추가 할 것입니다.
프론트 데스크 페이지 :
<span style = "font-size : 14px;"> <body scroll = "no"> <div> <form "method ="post "> <div> <div id ="baseinfo "onclick =" Activetabpaanel (1) "style ="margin-right : 2px; "> 기본 정보 </div> <div id ="semsinfo "onclick ="actizetabanel (2) ""마진-오른쪽 : 2px ";> 패키지 1 </ div> <div id = "changeInfo"onclick = "actizetabanel (3)"스타일 = "마진-오른쪽 : 2px;"> pack 2 </div> <div id = "familyInfo"onclick = "actietAbanel (4)"스타일 = "마진-오른쪽 : 2px;"> Page 3 </div> <div id = "changeInfo"onclick = "actietAbanel (5)"스타일 = "마진-오른쪽 : 2px;"> Page 4 </div> <div id = "familyInfo"onclick = "ActiveTabanel (6)"Style = "margin-right : 2px;"> pack 5 </div> <div id = "familyInfo"onclick = "ActiveTabanel (7) 스타일 ="Margin- 오른쪽 : 2px; "> 페이지 6 </div> </div> </div> <div id ="bankcarddiv "> <div> <div> 정보 표시 <입력 ID ="addbank "type ="button "value = "new line"onclick = "addnewrow ();" /> < /div> <div> <table id = "parttable"width = '100%'border = '0'CellSpacing = '셀 패딩 ='0 '클래스 = 'content_list'> <tr> <th class = 'content_table_number'> 일련 번호 </th> <th> le_thnowarp '> 속성 1 </th> <th class ='content_table_thnowarp '> 속성 2 </ th> <th class = 'content_table_thnowarp'> 속성 3 </th> <th class = 'content_table_thnowarp'> </this <th> <th> <th> <th> <th class = 'content_table_thnowarp'> 속성 5 < /th> <th class = 'content_table_thnowarp'> 속성 6 </th> <th class = 'content_table_thnowarp'> properties 7 </th> <th> <content_table_thnowarp '> th> <th class ='content_table_thnowarp '> Properties 9 </th> <th class = 'content_table_thnowarp'> 작동 </th> </tr> <c : if test = "$ {fngth (personfamilyinfolist)> 0}"> <c : foreach items = "$ { PersonFamilyInfolist} "var ="PersonFamilyInfolist "varstatus ="st "> <!-> <td> $ {St.Count} <입력 유형 ="hidden "natural ="personfamilyinfolist [$ {St.Count-1}]. sguid "value ="$ {personfamilyinfolist.sguid} "/> <input type ="hidden "name ="personfamilyinfolist [$ {st.count-}] type = "hidden"name = "personfamilyinfolist [$ {st.count-1}]. sunitguid"= "$ {person familyinfolist.sunitguid}"> <입력 유형 = "hidden"name = "personfamilyinfolist [$ {st.count -1}]]. isenable "value ="$ {personfamilyinfolist.isenable} "> </td> <!-속성 1-> <입력 id ="sfamilyname $ {st.count-1} "type ="text "이름 = "PersonFamilyInfolist [$ {St.Count-1}]. SfamlyName"maxLength = "20"= "$ {Porson FamilyInfolist.sfamilyName}">> </td> <!-속성 2-> <TD> <입력 ID = "sfamilyidcadno $ {St.Count-}" "type ="text "name ="personfamilyinfolist [$ {st.count-}] .sfamilyidcardno "maxlength ="20 "value ="$ {personfamilyInfolist.sfamilyIdcardno} "> td> <!-속성 3-> <select id = "ifamilysex $ {st.c {st.c {st.c {st.c ount-1}"name = "personfamilyinfolist [$ {st.count-1}]. ifamilysex> <zw : basedictlist itemcode = "< %= constants.i_person_sex %> onfamilyinfolist.ifamilysex}"> </zw : basedictlist> </select> <font color = "red"> </font> </td> <! -Attribute 4-> <select id = "sfamilyRelation $ {stfamilyRelation $ {st.Count-}"namee = "personfamilyInfolist [$ {St.Count-1}]. sfamilyrelelellation> <ZW : BasedictList itemcode ="< %= constants.s_oldily_relation % > ErsonFamilyInfolist.sfamilyRelation} "> </zw : basedictlist> </select> <font color ="red ">*</font> </td> <!-속성 5-> <입력 id ="sfamilyOnsurancePlace $ { "text"name = "PersonFamilyInfolist [$ {St.Count-1}]. SfamilyInsurancePlace"maxLength = "20"Lace} "> </td> <!-속성 6-> <TD class = 'content_table_td_centernowrap'> id = "sfamilyresidencerce $ {st.count-}"type = "text"natural st.count-1}]. sfamilyphone $ {St.Count 1} Eshonfamilyinfolist [$ {St.Count-1}] "maxlength ="20 "value ="$ {personfamilyinfolist.sfamilyphone} "> </td> <! 입력 ID = "DDENTIFYSUCESSDATE $ {St.COUNT 1}"type = "text"name = "PersonFamilyInfolist [$ {St.Count-1}]. Infolist.ddentifySucessDate}"onfocus = "wdatepicker ()"notnull = "true" vdisp = "첫 보험 시간"크기 = "18"maxlength = "18"/> <font color = "red">*</font> </td> <!-속성 9-> <td> <입력 ID = "ddentifylostdate $ {st.count -}" "type ="text "name ="personfamilyinfolist [$ {st.count -1}]. personfamilyinfolist.ddentifylostdate} "onfocus ="wdatepicker () "notnull ="true "vdisp = "첫 번째 보험 시간"size = "18"maxlength = "18"/> </td> <td class = 'content_table_centernowrap'> 취소 </td> </tr> </c : foreach> </c : if> </table> </div> </div> </div> <div> <div> <table> <tr> <td align = "center"> <input id = "btnnextStep"type = "button"value = "이전"onclight = "" /> <input id = "btnadd"type = "button"value = "onclick ="saverupdate) " / /> <입력 id =" "type ="button "value ="완료 "on Click = ""/> <input id = "btnreturn"type = "button"value = "return"onclick = "/> </td> </tr> </table> </div> </div> </ 양식> </div> </body> </span>
자바 스크립트 기능 :
<span style = "font-family : kaiti_gb2312; font-size : 14px;"> <script type = "text/javaScript"> $ (function () {loadCheck ()) {var trs = $ ( '); #parttable tr ') 2; 목록 변수 변수 함수 addnewrow ( '#parttable tr') > '+'<td> '+row+'</td> '+'<< td> '+'<input id = "sfamilyname '+num+'"text "name ="personfamilyinfolist [ '+num+'] "maxlength ="20 "> </td> '+'<td> '+'<input id ="sfamilyidno '+num+' "type ="text "Infolist [ '+num+'] .sfamilyidcardno"maxlength = "20 "> </td> '+'<< td> '+'<select id ="ifamilysex '+num+' "name ="personfamilyinfolist ifamilysex "> '+'<zw : basedictlist itemcode ="2000 "selectValue ="personfamilyin olis [ '+num+']. sfamilyrelation '+num+' "name ="personfamilyinfolist [ '+num+'] "135"selectValue = "personfamilyinfolist [ '+num+']. <font color = "red">*</font> </td> '+'<td> '+'<input id = "sfamilyinsurancorpleplaceplaceplace '+num+'"type = "text"name = "personfamilyinfolist [ '+num+ '. = "20"> </td> '+'<td> '+'<입력 id = "sfamilyphone '+num+'"type = "text"name = "personfamilyinfolist [ '+num+']. sfamilyphone"maxlength = " 20 "> </td> ''+'<input id ="ddentifysucessdate'+num+' "type ="personfamilyinfolist ['+num+']] "size ="18 "maxlength ="18 "/> <font color ="red ">*</font> </td> ' +'<< td> ' +'<입력 id ="ddentifyLostDate ' +num + 'type = "text"name = "personfamilyinfolist ['+num+'] onfocus ="wdatepicker () "notnull ="true "vdisp ="18 "="18 "/> </td> ' +'<td> ' +'<a onclick = "delinsuranceinfo (this);"> 취소 </a> ' +'</td> ' +'</tr> '; Append (htmlText); NUM + 1; t) .parent (). (문서 양식 [0]) 성공적인 보존 "function () {});} else if (resobj.trim () == 'update') {ext.messagebox.alert ("Prompt ","update ", function () {}); .MessageBox. ALERT ( "팁", "저장 실패");}});} </span> <span style = "font-family : kaiti_gb2312; font-size : 14px;"> </script> </script> 스팬>
배경 추가 방법 :
<span style = "font-family : kaiti_gb2312; font-size : 14px;">/*** <p> 설명 : 배치에 여러 정보 추가 </p>* @param personfamilyinfolist 엔티티 목록* @return boolean, true to 성공을 추가하십시오. 그렇지 않으면 Eshonfamilyinfolist가 추가됩니다. i ++) {string personfamilyid = u u uidhexgenrator.getuuid = "11111111"; ). I) ) .setdddenfylostdate (null); try {String sguidstring = personfamilyinfoserv ice.saveneedpk (personfamilyinfolist.get. bool = true;} else {system.out.println ( "지원 상대 정보 양식"+I+"Bar Information Storage가 실패했습니다! ".
배경 업데이트 방법 :
<span style = "font-family : kaiti_gb2312; font-size : 14px;">/*** <p> 설명 : 배치 업데이트 정보 </p>* @param personfamilyinfolist id 직원 id* @return boolean, true는 업데이트, 그렇지 않으면 업데이트가 실패 * @throws 예외 * @Author : Gaoying * @update : * @Date : 2015-7-20 */ public void (list <personfa milyinfo> personfamilyinfolist, String personid) 예외 {// 데이터가 있습니까? i <num; i ++) {// 부울 값을 설정하십시오. if (! OldPersonFamilyInfolist. get (i) .getSfamilyIdcardNo (). Equals (perientFamilyInfolist.get (i) .getSfamilyIdcardNo ()) {bool = false;} if (! OldPersonFamilyInfolist.get.get.get.get.get.get.get.get. ) .getifamilysex (). = false;} if (!! OldPersonFamilyInfolist.get (i) .getSfamilyInsurancePlace (). Equals (I) .getSfamilyInsurancePlerce ()) {boool = false;} if (! OldPersonFamilyInfolist.get (i) .getSfamilyrrsidepalce (getsfamilyrrsidepalce (! ). (i) .getSfamilyResidePalce ())) {bool = false;} if (! OldPersonFamilyInfolist.get (i) .getSfamilyphone ().) "시간을 바꾸기 전에 :+OldPersonFamilyInfolist.get.get (i) .getDdDentifysucessDate (). getTime ()); ist.get (i). getDentifySucesssDate (). gettime ()); if (oldpersonfamilyinfolist.get.get (i). .getDentifysucessDate () gettime () {bool = false; 이는 데이터베이스에 하나를 추가하고 시스템의 현재 시간을 데이터의 실패 시간으로 설정합니다. "데이터의 주요 키 :" + personfamilyinfo.getsguid ()); .setDoperatedate (새로운 날짜); 시스템의 시간 (null); personfamilyinfoservice.merge (personfamilyinfolist.get (i));}} catch (예외 e) {e.printstacktrace ();}} </span>
이러한 방식으로 Java의 멀티 필드 및 여러 데이터 배치 추가의 예는 완료됩니다 및 사이클 트래버스가 추가됩니다. 또한 다음 코드에 대해 이야기하고 싶습니다.
다음과 같이 코드 코드 복사 : <span style = "font-family : kaiti_gb2312; font-size : 14px;"> $ (function () {
로드 체크 ();
}); <span>
다음 코드의 약어입니다.
코드 코드를 다음과 같이 복사하십시오. <span style = "font-family : kaiti_gb2312; font-size;"> $ (document).
로드 체크 ();
}); <span>
실제로이 코드와 다음 코드는 다음을 의미합니다.
다음과 같이 코드 코드를 복사하십시오 : <span style = "font-family : kaiti_gb2312; font-size : 14px;"> window.onload = function () {{{
로드 체크 ();
} </span>
이런 식으로 온라인 온로드 이벤트에서 전화 할 필요가 없으며 JS 프로그램 세그먼트에만 쓸 필요가 있습니다. 다음 코드는 위의 두 가지와 교환 할 수 있지만 다릅니다. 첫 번째는 실행 시간이 $ (docume)가 페이지 프레임 워크를 다운로드 한 후에 실행되며, 모든 페이지가로드 된 후에는 수행해야합니다. 분명히 전자의 실행 효율은 후자보다 높다. 그런 다음 실행의 차이가 있습니다.
위는이 기사의 모든 내용입니다.