本文解答了关于《金蝶出纳反扎帐》相关内容,同时关于1、金蝶出纳反扎帐,2、金蝶出纳反扎帐快捷键,3、金蝶出纳反扎帐怎么操作,4、金蝶出纳反扎帐怎样操作,5、金蝶出纳反扎帐后可以删除一笔账吗,的相关问答本篇文章福途教育网小编也整理了进来,希望对您有帮助。
金蝶出纳反扎帐
*
* @param tf_list
* 反扎list
* @param conn
* 数据库连接
* @return
* @throws Exception
*/
public static boolean saveVoucher(List tf_list,
Connection conn) throws Exception {
PreparedStatement ps = null;
String sql = "INSERT INTO T_H_KF_FZ_VOUCHER("
+ "file_name,fiscal_period,account_date,"
+ "doc_number,doc_name,cash_date,"
+ "doc_company,amount_d,company_codes," + "recorded_amount,original_company,subject_code,"
+ "debit_amount,credit_amount,prepaid_amount,"
+ "transfer_amount,des,r1,r2," + "r3,r4,r5)"
+ " VALUES(?,?,?,"
+ "?,?,?,?,?"
+ ",?,?,?,?,?,?,"
+ "?,?,?,?,?,?)";
try {
ps = conn.prepareStatement(sql);
if (tf_list != null && tf_list.size() > 0) {
for (int i = 0; i < tf_list.size(); i++) {
THKF_FZ_VOUCHER tf = tf_list.get(i);
ps.setString(1, tf.file_name);
ps.setString(2, tf.fiscal_period);
ps.setTimestamp(3, tf.account_date);
ps.setString(4, tf.doc_number);
ps.setString(5, tf.doc_name);
ps.setTimestamp(6, tf.cash_date);
ps.setString(7, tf.doc_company);
ps.setString(8, tf.amount_d);
ps.setString(9, tf.company_codes);
ps.setString(10, tf.recorded_amount);
ps.setString(11, tf.original_company);
ps.setString(12, tf.subject_code);
ps.setString(13, tf.debit_amount);
ps.setString(14, tf.credit_amount);
ps.setString(15, tf.prepaid_amount);
ps.setString(16, tf.transfer_amount);
ps.setString(17, tf.des);
ps.setString(18, tf.fields0);
ps.setString(19, tf.fields1);
ps.setString(20, tf.fields2);
ps.setString(21, tf.fields3);
ps.setString(22, tf.fields4);
ps.addBatch();
}
ps.executeBatch();
} else {
}
conn.commit();
return true;
} catch (Exception e) {
System.err.println("failed to insert data[T_H_KF_FZ_VOUCHER]");
e.printStackTrace();
conn.rollback();
return false;
} finally {
if (ps != null) {
ps.close();
ps = null;
}
if (conn != null) {
conn.close();
conn = null;
}
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}
总结:以上是编辑:【紫馨】整理及AI智能原创关于《金蝶出纳反扎帐
》优质内容解答希望能帮助到您。