{"id":1946,"date":"2019-07-19T09:02:29","date_gmt":"2019-07-19T01:02:29","guid":{"rendered":"http:\/\/www.hefeiyu.com\/?p=1946"},"modified":"2019-07-19T09:02:29","modified_gmt":"2019-07-19T01:02:29","slug":"ecology-oa%e5%a4%9a%e6%95%b0%e6%8d%ae%e6%ba%90%e5%bc%80%e5%8f%91","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=1946","title":{"rendered":"Ecology OA\u591a\u6570\u636e\u6e90\u5f00\u53d1"},"content":{"rendered":"<h2>\u591a\u6570\u636e\u6e90\u5f00\u53d1<\/h2>\n<ol>\n<li>\u521b\u5efa\u6570\u636e\u6e90\uff0c\u70b9\u51fb\u521b\u5efa\u6570\u636e\u6e90\uff0c\u6dfb\u52a0\u6570\u636e\u6e90\u53c2\u6570\uff0c\u4fdd\u5b58\uff0c\u7136\u540e\u6d4b\u8bd5\uff0c\u770b\u662f\u5426\u6210\u529f\u3002<\/li>\n<\/ol>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1920\" height=\"891\" class=\"wp-image-1947\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/07\/word-image-222.png\" srcset=\"https:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/07\/word-image-222.png 1920w, https:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/07\/word-image-222-768x356.png 768w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<ol>\n<li>\u8fde\u63a5\u6570\u636e\u6e90\u7684\u65b9\u6cd5\uff0c\u4ee3\u7801\u5982\u4e0b<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td><strong>weaver.interfaces.datasource.DataSource ds = (weaver.interfaces.datasource.DataSource) StaticObj.<em>getServiceByFullname<\/em>((&#8220;datasource.GSRM&#8221;), weaver.interfaces.datasource.DataSource.class); <\/strong><\/p>\n<p><strong> java.sql.Connection conn = ds.getConnection();<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol>\n<li>\u4ee3\u7801\u64cd\u4f5c\uff0c\u91c7\u8d2djdbc\u65b9\u5f0f\u8fde\u63a5\uff0c\u76f4\u63a5\u64cd\u4f5c\u672c\u5730\u6570\u636e\u5e93<\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td><strong>public String test(String requestId,String lastname){<\/strong><\/p>\n<p><strong> weaver.interfaces.datasource.DataSource ds = (weaver.interfaces.datasource.DataSource) StaticObj.getServiceByFullname((&#8220;datasource.GSRM&#8221;), weaver.interfaces.datasource.DataSource.class); <\/strong><\/p>\n<p><strong> java.sql.Connection conn = ds.getConnection();<\/strong><\/p>\n<p><strong> PreparedStatement ps=null; <\/strong><\/p>\n<p><strong> \/\/\u521b\u5efa\u7ed3\u679c\u96c6 <\/strong><\/p>\n<p><strong> if (null == conn)<\/strong><\/p>\n<p><strong> {<\/strong><\/p>\n<p><strong> writeLog(&#8220;\u8fde\u63a5\u4e3a\u7a7a\u3002&#8221;);<\/strong><\/p>\n<p><strong> } else {<\/strong><\/p>\n<p><strong> writeLog(&#8220;\u5df2\u7ecf\u8fde\u63a5\u3002&#8221;);<\/strong><\/p>\n<p><strong> }<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong> \/\/\u4e3a\u91c7\u8d2d\u7533\u8bf7\u4e3b\u8868\u4fee\u6539\u72b6\u6001<\/strong><\/p>\n<p><strong> try {<\/strong><\/p>\n<p><strong> String sql0 =&#8221;update gsrm_porequest_entry set STATUS_POREQUEST=&#8217;2&#8242; where request_id='&#8221;+requestId+&#8221;&#8216;&#8221;;<\/strong><\/p>\n<p><strong> ps = conn.prepareStatement(sql0); <\/strong><\/p>\n<p><strong> int count = ps.executeUpdate();<\/strong><\/p>\n<p><strong> writeLog(&#8220;============\u4fee\u6539\u6761\u65701:&#8221; + String.valueOf(count));<\/strong><\/p>\n<p><strong> } catch (SQLException e) { <\/strong><\/p>\n<p><strong> e.printStackTrace(); <\/strong><\/p>\n<p><strong> } <\/strong><\/p>\n<p><strong> \/\/\u91c7\u8d2d\u7533\u8bf7\u4ece\u8868\u4fee\u6539\u72b6\u6001<\/strong><\/p>\n<p><strong> try {<\/strong><\/p>\n<p><strong> String sql =&#8221;update gsrm_porequest set BPM_STATUS=&#8217;3&#8242; where request_id='&#8221;+requestId+&#8221;&#8216;&#8221;;<\/strong><\/p>\n<p><strong> ps = conn.prepareStatement(sql); <\/strong><\/p>\n<p><strong> int count = ps.executeUpdate();<\/strong><\/p>\n<p><strong> writeLog(&#8220;============\u4fee\u6539\u6761\u65702:&#8221; + String.valueOf(count));<\/strong><\/p>\n<p><strong> } catch (Exception e) {<\/strong><\/p>\n<p><strong> e.printStackTrace();<\/strong><\/p>\n<p><strong> }<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><strong> \/\/<\/strong><\/p>\n<p><strong> try { <\/strong><\/p>\n<p><strong> String sql1 =&#8221;update GSRM_POREQUEST_ENTRY set POREQ_ENTRY_BUYER='&#8221;+lastname+&#8221;&#8216; where id in( select id from GSRM_POREQUEST_ENTRY where POREQ_ENTRY_FINTERID in(select POREQ_FINTERID from gsrm_porequest where request_id='&#8221;+requestId+&#8221;&#8216; ))&#8221;;<\/strong><\/p>\n<p><strong> ps = conn.prepareStatement(sql1); <\/strong><\/p>\n<p><strong> int count = ps.executeUpdate();<\/strong><\/p>\n<p><strong> writeLog(&#8220;============\u4fee\u6539\u6761\u65703:&#8221; + String.valueOf(count));<\/strong><\/p>\n<p><strong> } catch (Exception e) {<\/strong><\/p>\n<p><strong> e.printStackTrace();<\/strong><\/p>\n<p><strong> }<\/strong><\/p>\n<p><strong> try {<\/strong><\/p>\n<p><strong> ps.close();<\/strong><\/p>\n<p><strong> conn.close();<\/strong><\/p>\n<p><strong> } catch (SQLException e) {<\/strong><\/p>\n<p><strong> e.printStackTrace();<\/strong><\/p>\n<p><strong> }<\/strong><\/p>\n<p><strong>return &#8220;1&#8221;;<\/strong><\/p>\n<p><strong>}<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=1946\">Ecology OA\u591a\u6570\u636e\u6e90\u5f00\u53d1<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u591a\u6570\u636e\u6e90\u5f00\u53d1 \u521b\u5efa\u6570\u636e\u6e90\uff0c\u70b9\u51fb\u521b\u5efa\u6570\u636e\u6e90\uff0c\u6dfb\u52a0\u6570\u636e\u6e90\u53c2\u6570\uff0c\u4fdd\u5b58\uff0c\u7136\u540e\u6d4b\u8bd5\uff0c\u770b\u662f\u5426\u6210\u529f\u3002 \u8fde\u63a5\u6570\u636e\u6e90\u7684\u65b9\u6cd5\uff0c\u4ee3\u7801\u5982\u4e0b weaver.interfaces.datasource.DataSource ds = (weaver.interfaces.dat [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,24],"tags":[626,557,571],"class_list":["post-1946","post","type-post","status-publish","format-standard","hentry","category-install_set","category-code","tag-datasource","tag-weaver","tag-571"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/1946","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1946"}],"version-history":[{"count":1,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/1946\/revisions"}],"predecessor-version":[{"id":1948,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/1946\/revisions\/1948"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}