Javas Batch -Daten fügen gleichzeitig Daten hinzu. Heute werden wir ein spezifisches Beispiel für Java verwenden, um Daten hinzuzufügen, um die Oracle -Datenbank zu stellen.
Seite an der Rezeption:
<span style = "Schriftgröße: 14px;"> <body scroll = "no"> <div> <Formular name = "webform" methode = "post"> <div> <div> id = "baseInfo" onclick = " ActiveTabpaanel (1) "style =" margin-right: 2px; "> grundlegende Informationen </div> <div id =" semsinfo "onclick =" activeTabanel (2) "Margin-Right: 2PX";> Paket 1 </ div> <div id = "ChangeInfo" onclick = "activeTabanel (3)" style = "margin-right: 2px;"> pack 2 </div> <div id = "familyInfo" onclick = "activeTabanel (4)" style style style style style = "Margin-Right: 2px;"> Seite 3 </div> <div id = "ChangeInfo" onclick = "activeTabanel (5)" style = "margin-right: 2px;"> Seite 4 </div> <div Id = "familyInfo" onclick = "activeTabanel (6)" style = "margin-right: 2px;"> pack 5 </div> <div id = "familyInfo" onclick = "activeTabanel (7)" style = "margin- Rechts: 2PX; "Neue Zeile" Onclick = "addnewrow (); = 'Content_list'> <tr> <th class = 'content_table_number'> Seriennummer </th> <th> le_thnowarp '> Eigenschaften 1 </th> <th class =' content_thnable_thnowarp '> Eigenschaften 2 </ th> <th class = 'content_table_thnowarp'> Eigenschaften 3 </th> <th class = 'content_table_thnowarp'> </This <Th> <th> <Th> <Th class = 'content_table_thnowarp'> Eigenschaften 5 < /th> <th class = 'content_table_thnowarp'> Eigenschaften 6 </th> <th class = 'content_table_thnowarp'> Eigenschaften 7 </th> <Thnowarp '> Properties 9. </th> <th class = 'content_table_thnowarp'> operation </th> </tr> <c: if test = "$ {fngth (PersonFamilyInfolist)> 0}"> <c: foreach items = "$ {$ { PersonfamilyInfolist} "var =" PersonfamilyInfolist "varstatus =" st "> <!-> <td> $ {St.Count} <Eingabe type =" Hidden "natürliches =" PersonfamilyInfolist [$ {St.Count-1}]. Sguid "value =" $ {PersonfamilyInfolist.sguid} "/> <Eingabe type =" Hidden "name =" PersonfamilyInfolist [$ {St.Count-}]. Typ = "Hidden" name = "PersonfamilyInfolist [$ {St.Count-1}]. -1}]. = "PersonfamilyInfolist [$ {St.Count-1}]. = " td> <!-Attribut 3-> <select id = "ifamilysex $ {St.c {St.C {St.c ouNT-1}" name = "personFamilyInfolist [$ {St.Count-1}]. ifamilysex> <Zws: basiertes ItemCode = "< %= constants.i_person_sex %> OnfamilyInfolist.If Hamilysex}"> </zw: basiertes ICTICTLIST> </select> <font color = "rot">*</font> </td> <! -Attribute 4-> <select id = " > ErsersonFamilyInfolist.SfamilyRelation} "> </zw: basiertes ICTICTLIST> </select> <font color =" rot ">*</font> </td> <!-Eigenschaften 5-> <Eingabe id =" "Text" name = "PersonfamilyInfolist [$ {St.Count-1}]. Id = " sfamilyphone $ {St.Count 1} ErsersonfamilyInfolist [$ {St.Count-1}]. input id = "ddentifySuScessDate $ {St.Count 1}" type = "text" name = "personfamilyInfolist [$ {St.Count-1}]. Infolist.dentifySuScessDate}" onfocus = "wdatepicker ()" Notnull = "true". vDisp = "Die erste Versicherungszeit" size = "18" maxLength = "18"/> <font color = "rot">*</font> </td> <!-Attribut 9-> <td> <Eingabe-ID = "ddentifylostdate $ {st.count -}" Type = "Text" name = "PersonFamilyInfolist [$ {st.Count -1}]. Personfamilyinfolist.dDentifylostdate} " Onfocus = "WDATEPICKER ()" NOTNULL = "TRUE" VDISP = "First Insurance Time" Size = "18" maxLength = "18"/> </td> <td class = 'content_table_centernowrap'> abbrechen </td> </tr> </c: foreach> </c: if> </table> </div> </div> </div> <div> <div> <tabelle> <tr> <td align = "center"> <input id = "btnnextStep" type = "button" value = "Vorher" onclight = "" /> <input id = "btnadd" type = "button" value = "onclick =" saverupdate) " / /> <input id =" "type =" button "value =" komplett "Onclick = "/> <input id =" btnreturn "type =" button "value =" return "onclick =" "/> </td> </tr> </table> </div> </div> </ Form> </div> </body> </span>
JavaScript -Funktion:
<span style = "Schriftfamilie: kaiti_gb2312; Schriftgröße: 14px;"> <script type = "text/javaScript"> $ (function () {loadcheck ()); #PartTable TR '). 2; > '+' <td> '+row+' </td> '+' << td> '+' <input id = "sfamilyname '+num+' text" name = "personfamilyInfolist ['+num+'] "maxLength =" 20 "> </td> '+' <td> '+' <input id =" "> </td> '+' << td> '+' <select id =" ifamilysex '+num+' "name =" personfamilyInfolist ifamilysex "> '+' <ZW: basierend ['+Num+']. sfamilyrelation '+num+' "name =" personfamilyInfolist ['+num+']. <font color = "rot">*</font> </td> '+' <td> '+' <input id = " ']. = "20"> </td> '+' <td> '+' <input id = "sfamilyphone '+num+'" type = "text" name = "personfamilyInfolist ['+num+']. Sfamilyphone" maxLength = " 20 "> </td> ''+'<input id =" ddentifySucessDate'+num+'"type =" text "name =" personfamilyInfolist ['+num+']. "size =" 18 "maxLength =" 18 "/> <font color =" rot ">*</font> </td> ' +' << td> ' +' <input id =" dDentifyLostdate ' +num + '"type =" text "name =" personfamilyInfolist ['+num+']. ' +' <td> ' +' <a onclick = "delinSuranceInfo (this);"> Abbrechen </a> ' +' </td> ' +' </tr> '; Append (htmlText); t) .Parent (). (Dokument. Formulare [0]). Erfolgreiche Erhaltung "function () {});} else if (resobj.trim () == 'update') {ext.messagebox.alert (" Eingabeaufforderung "," update ", function () {}); .MessageBox. alert ("tipps", "speichern");}});} </span> <span style = "font-family: kaiti_gb2312; Schriftgröße: 14px;"> </script> </</script> Spannweite>
Methode zum Hinzufügen von Hintergrund:
<span style = "Schriftfamilie: kaiti_gb2312; Schriftgröße: 14px;">/*** <p> Beschreibung: Fügen Sie mehrere Informationen in Stapel hinzu </p>* @param PersonfamilyInfolist Entity List* @return boolean, treu Erfolge hinzufügen, sonst wird es hinzugefügt. I ++) {String personFamilyID = u u uidhexgenrator.getuuid (); ). i) ) .setdddenfylostdate (null); Bool = true;} else {System.out.println ("Unterstützung des relativen Informationsformulars"+i+". "); Bool = false; return bool;}} catch (Ausnahme e) {e.printstacktrace ();}}} return bool;} </span>
Hintergrund -Update -Methode:
<span style = "Schriftfamilie: kaiti_gb2312; Schriftgröße: 14px;">/*** <p> Beschreibung: Batch-Update-Informationen </p>* @param personfamilyInfolist id id id* @return boolean, true Update, andernfalls fällt das Update fehl Daten gibt es? ; i <num; if (! OldPersonFamilyInfolist. Get (i) .getSfamilyIdcardno (). Equals (PersonfamilyInfolist.get (i) .GetSfamilyIdCardno ()) {bool = false;} if (! OldPersonfamilyInfolist.get.get.get.get.get.get.get.get.get.get.get.get.Get.Get.get.get.get.get.get ich ) .GetIFamilySex (). = false;} if (!! oldPersonFamilyInfolist.get (i) .GetSfamilyInsurancePlace (). Equals (PersonfamilyInfolist.get (i) .GetSfamilyInsurancePlerce ()) {boool = false;} if (! OldPersonfamilyinfolist.Get (i). ). "Vor der Änderung der Zeit:+OldPersonFamilyInfolist.get.get (i) .getDDDentifySucessDate (). GetTime ()); Ist.get (i). .GETDDDENTIFYSUCESSDATE (). Das wurde nicht geändert, fügen Sie eine in die Datenbank hinzu und setzen Sie die aktuelle Zeit des Systems auf die Ausfallzeit der Daten. "Der Hauptschlüssel der Daten:" + PersonfamilyInfo.getsguid ()); . Zeit des Systems (NULL);
Auf diese Weise werden die Beispiele für das Multi -Field und mehrere Datenmodus von Java abgeschlossen. und der Zyklusquellen wird hinzugefügt. Außerdem möchte ich über den folgenden Code sprechen:
Kopieren Sie den Code-Code wie folgt: <span style = "Schriftfamilie: kaiti_gb2312; Schriftgröße: 14px;"> $ (function () {
lastcheck ();
});
Es ist die Abkürzung des folgenden Code:
CODE CODE CODE wie folgt: <span style = "Schriftfamilie: Kaiti_GB2312; Schriftgröße: 14px;"> $ (Dokument).
lastcheck ();
});
Tatsächlich bedeuten dieser Code und der folgende Code:
Kopieren Sie den Code-Code wie folgt: <span style = "Schriftfamilie: kaiti_gb2312; Schriftgröße: 14px;"> Fenster.onload = function () {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{
lastcheck ();
} </span>
Auf diese Weise müssen Sie nicht das Online -Onload -Ereignis anrufen, Sie müssen nur im JS -Programmsegment schreiben. Obwohl der folgende Code mit den beiden oben genannten ausgetauscht werden kann, sind sie unterschiedlich. Das erste ist, dass die Ausführungszeit anders ist. Offensichtlich ist die Ausführungseffizienz des ersteren höher als der letztere. Dann gibt es den Unterschied in der Ausführung, $ (Dokument).
Das obige ist der gesamte Inhalt dieses Artikels.