insert into test values(1,sysdate);
try{
if(controlSeq==null || "".equals(controlSeq)){
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
sql.append("insert into OUT_FORM_DATA_INFO (seq,c_id,fm_data_id,user_code,create_date) values (?,?,?,?,to_date(?,'yyyy-MM-dd HH24:mi:ss'))");
pst = conn.prepareStatement(sql.toString());
pst.setString(1, getUUIDdwithLendth());
pst.setString(2,cId);
System.out.println(getUUIDdwithLendth());
pst.setString(3, fmDataId);
pst.setString(4, userCode);
pst.setString(5, df.format(new Date()));
int i = pst.executeUpdate();
if (i>0) successed = CommonUtil.createResponseXML(SysParam.SUCCESS_CODE, "", "");
}else{
sql.append("insert into APPR_EXTENDED_XML_DATA (ex_id,control_seq,c_id,fm_data_id,column_name) values (?,?,?,?,?)");
pst = conn.prepareStatement(sql.toString());
// pst.setInt(1, getSeq("SEP_TEST", conn));//
pst.setLong(1, DBManager.getSysSeq("", "APPR_EXTENDED_XML_DATA", "APPR_EXTENDED_XML_DATA"));
pst.setString(2, controlSeq);
pst.setString(3,cId);
pst.setString(4, fmDataId);
pst.setString(5, collmnName);
int i = pst.executeUpdate();
if (i>0) successed = CommonUtil.createResponseXML(SysParam.SUCCESS_CODE, "", "");
}
}catch(Exception e){
successed = CommonUtil.createResponseXML(SysParam.INTERNALSERVER_CODE, "", "");
System.out.println(
" saveForm(String controlSeq, String cId, String fmDataId,String collmnName, String userCode,Connection conn)" +
e.getMessage());
throw e;
}finally{
pst.close();
}
return successed;