mes平台Action类模版

Posted Timeleader

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mes平台Action类模版相关的知识,希望对你有一定的参考价值。

Connection conn = null;

         PreparedStatement pst = null;

         ResultSet rs = null;

         @Override

         public String excute() throws ExedoException {

                   // TODO Auto-generated method stub

                   String success = "success";

                   String uid = DOGlobals.getInstance().getSessoinContext().getUser().getUid();

                   String headjson = DOGlobals.getInstance().getSessoinContext().getFormInstance().getValue("jsons");

                   conn = DataSource.getDataSource().getConnection();

                   try {

                            conn.setAutoCommit(false);

                            if(headjson == null ||headjson.equals("")){

                                     return success = "没有接受到前段数据";

                            }

                           

                            JSONArray jsonArr = new JSONArray(headjson);

                            JSONObject jsonObject = jsonArr.getJSONObject(0);

                           

                            String objuid = jsonObject.getString("objuid");

                            String scx_uid = jsonObject.getString("scx_uid");

                            String ph = jsonObject.getString("ph");

                            String pm = jsonObject.getString("pm");

                            String gg = jsonObject.getString("gg");

                            String zt = jsonObject.getString("zt");

                            String ts = jsonObject.getString("ts");

                           

                            StringBuffer sql = new StringBuffer();

                            /*

                             *

                             */

                            sql.append("");

                            pst = conn.prepareStatement(sql.toString());

                            pst.setString(1, "");

                            pst.executeUpdate();

                            sql.delete(start, end)

} catch (SQLException | JSONException e) {

                            // TODO Auto-generated catch block

                            e.printStackTrace();

                            try {

                                     conn.rollback();

                                     success = "error";

                            } catch (SQLException e1) {

                                     // TODO Auto-generated catch block

                                     e1.printStackTrace();

                            }

                   }finally{

                            try {

                                     conn.commit();

                                     if(rs != null){

                                               rs.close();

                                     }

                                     if(pst != null){

                                               pst.close();

                                     }

                                     if(rs != null){

                                               rs.close();

                                     }

                            } catch (SQLException e) {

                                     // TODO Auto-generated catch block

                                     e.printStackTrace();

                            }

                   }

                  

                  

                  

                  

                   return success;

         }

以上是关于mes平台Action类模版的主要内容,如果未能解决你的问题,请参考以下文章

Thinkphp中的系统变量

ThinkPHP模版引擎之变量输出具体解释

ngrx effect 多次调用observer,但只调度了一个action

Android - Intent.Action_Send 发送多个图像而不多次显示选择器对话框

实现Action类

struts笔记02-action和Action类