java´æ´¢¹ý³ÌµÄ´´½¨Óëµ÷ÓÃ
create or replace procedure updateProject is
begin
update project p set p.total_intend_gather =
(select sum(ig.gather_sum) from intend_gather ig where ig.project_number=p.project_number);
update project p set p.total_actual_gather =
(select sum(ag.gahter_sum) from actual_gather ag where ag.project_number=p.project_number);
update project p set p.total_invoice=
(select sum(invoice.invoice_sum) from invoice invoice
where invoice.intend_id in
(select ig.intend_id from intend_gather ig where ig.project_number=p.project_number));
end updateProject;
Session session = this.getSession();
Transaction tx =null;
try {
tx = session.beginTransaction();
Connection con = session.connection();
String procedure = "{call updateproject() }";
CallableStatement cstmt = con.prepareCall(procedure);
cstmt.executeUpdate();
tx.commit();
} catch (Exception e) {
tx.rollback();
}
Ïà¹ØÎĵµ£º
String[] ips = ipValue.split("\\.");
String binaryVal = "";
for (int i = 0; i < ips.length; i++)
{
String binaryStr = Integer.toBinaryString(Integer.parseInt(ips[i]));
Integer times = 8 - binaryStr.length();
......
ÄãÒ²ÐíÊÇÒ»¸ö¹¤³Ìʦ£¬ÕýÔÚʹÓÃEJB¡¢Struts¡¢Hibernate¡¢SpringµÈ¸÷ÖÖ¹úÍâÁ÷ÐеĿò¼Ü¿ª·¢ÄãµÄϵͳÖеĸ÷¸ö²¿·Ö£¬ËüÃÇÖ®¼ä¿¿²»Í¬µÄÅäÖÃÎļþ¡¢½Ó¿Ú¡¢·þÎñÁ¬½ÓÔÚÒ»Æð£¬ÎªÕâЩ½Ó¿Ú¡¢ÅäÖᢷþÎñµÄ±àд¡¢µ÷Óã¬Í·ÌÛÂð£¿
ÄãÒ²ÐíÊÇÒ»¸öPM£¬ ÕýÔÚΪÄãµÄÏîÄ¿²ÉÓÃʲô¿ò¼Ü¡¢ÈçºÎ·Ö×é¡¢ÈçºÎе÷¡¢¸÷ÖÖ¿ò¼ÜµÄÓÅÁÓ×öÆÀ¹À¡¢²âÊÔ£¬ÎªÄãµÄÓ¦Ó ......
package homework02;
import java.util.Scanner;
/*
* ±àдÁ½¸öÀࣺAºÍB£¬ÀàA´´½¨µÄ¶ÔÏó¿ÉÒÔ¼ÆËãÁ½¸öÕýÕûÊýµÄ×î´ó¹«Ô¼Êý£¬ÀàB´´½¨µÄ
* ¶ÔÏó¿ÉÒÔ¼ÆËãÁ½¸öÊýµÄ×îС¹«±¶Êý¡£ÒªÇó£ºÀàBÖÐÓÐÒ»¸ö³ÉÔ±±äÁ¿Ê±ÓÃÀàAµÄÉùÃ÷¶ÔÏó¡£
*/
public class A {
private int m;
private int n;
public A(){
this.intput();
......
²ÉÓô®¿Ú²Ù×÷½øÐжÌÐÅÊÕ·¢,ÊDZȽϳ£¼ûµÄÒ»ÖÖ·½Ê½.±ÈÈç,ºÜ¶àȺ·¢Èí¼þ,ÓõľÍÊÇÕâÖÖ·½·¨.
1.ÅäÖÃcomm.jar.
Comm.jarÊÇSubʵÏֵײ㴮¿Ú²Ù×÷µÄAPI,µ÷ÓÃÁ˱¾µØµÄDLLÎļþ,ÒòΪJava±¾Éí²»¾ß±¸Ö±½Ó·ÃÎÊÓ²¼þÉèÖõÄÄÜÁ¦,¶¼ÊÇͨ¹ýµ÷Óñ¾µØ·½·¨À´Êµ
ÏÖµÄ.¿ÉÒÔJavaµÄ¹Ù·½ÍøÕ¾ÏÂÔØ.ÏÂÔØÖ®ºó°ÑÆäÖÐComm.jar°üµ¼Èëµ½¹¤³ÌµÄClasspathÖÐ,°Ñ ......