Esempio n. 1
0
  public void sjPrint(String sheetid) {
    String sqlUp = "update paymentnotevenderask set sjprintdate=sysdate,sjflag=1 where sheetid=?";

    String sqlIns =
        "insert into paymentnotevenderask(sheetid,sjflag,sjprintdate) values(?,1,sysdate)";

    // 先更新,更新失败,直接插入

    int rows = SqlUtil.executePS(conn, sqlUp, new String[] {sheetid});

    if (rows == 0) {
      rows = SqlUtil.executePS(conn, sqlIns, new String[] {sheetid});
    }
  }