From 4dc71747463308f8216af38302a733f4b73131af Mon Sep 17 00:00:00 2001 From: wu ming <569287825@qq.com> Date: Sun, 28 Aug 2016 10:04:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=BB=8E=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=8E=B7=E5=8F=96=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebContent/WEB-INF/config/log4j-config.xml | 32 ++- .../config/mybatis-applicationConfig.xml | 13 +- .../config/spring-applicationContext.xml | 57 ++---- .../com/dao/mapper/data-detaisl-mapper.xml | 93 +++++++++ .../controller/DataModelController.class | Bin 0 -> 2755 bytes .../com/platform/dao/DataInfoDao.class | Bin 0 -> 1329 bytes .../com/platform/entities/BasedType.class | Bin 0 -> 2635 bytes .../platform/entities/DataInfoEntity.class | Bin 0 -> 4733 bytes .../com/platform/entities/PagerOptions.class | Bin 0 -> 2169 bytes .../platform/service/DataInfoService.class | Bin 0 -> 234 bytes .../platform/service/DataInfoServiceImp.class | Bin 0 -> 1680 bytes .../service/EncodeInfoServiceImpl.class | Bin 1467 -> 1459 bytes .../com/platform/test/TestController.class | Bin 2340 -> 2717 bytes .../com/platform/test/testSystemInfoDao.class | Bin 0 -> 2085 bytes .../com/platform/utils/UtilsHelper.class | Bin 0 -> 3763 bytes .../spring-applicationContext-test.xml | 1 + src/com/dao/mapper/data-detaisl-mapper.xml | 93 +++++++++ .../controller/DataModelController.java | 38 ++++ src/com/platform/dao/DataInfoDao.java | 31 +++ src/com/platform/entities/BasedType.java | 48 +++++ src/com/platform/entities/DataInfoEntity.java | 186 ++++++++++++++++++ src/com/platform/entities/PagerOptions.java | 94 +++++++++ src/com/platform/service/DataInfoService.java | 9 + .../platform/service/DataInfoServiceImp.java | 34 ++++ .../service/EncodeInfoServiceImpl.java | 2 +- src/com/platform/utils/UtilsHelper.java | 90 +++++++++ test/com/platform/test/TestController.java | 22 ++- test/com/platform/test/testSystemInfoDao.java | 50 +++++ test/spring-applicationContext-test.xml | 1 + 29 files changed, 835 insertions(+), 59 deletions(-) create mode 100644 build/classes/com/dao/mapper/data-detaisl-mapper.xml create mode 100644 build/classes/com/platform/controller/DataModelController.class create mode 100644 build/classes/com/platform/dao/DataInfoDao.class create mode 100644 build/classes/com/platform/entities/BasedType.class create mode 100644 build/classes/com/platform/entities/DataInfoEntity.class create mode 100644 build/classes/com/platform/entities/PagerOptions.class create mode 100644 build/classes/com/platform/service/DataInfoService.class create mode 100644 build/classes/com/platform/service/DataInfoServiceImp.class create mode 100644 build/classes/com/platform/test/testSystemInfoDao.class create mode 100644 build/classes/com/platform/utils/UtilsHelper.class create mode 100644 src/com/dao/mapper/data-detaisl-mapper.xml create mode 100644 src/com/platform/controller/DataModelController.java create mode 100644 src/com/platform/dao/DataInfoDao.java create mode 100644 src/com/platform/entities/BasedType.java create mode 100644 src/com/platform/entities/DataInfoEntity.java create mode 100644 src/com/platform/entities/PagerOptions.java create mode 100644 src/com/platform/service/DataInfoService.java create mode 100644 src/com/platform/service/DataInfoServiceImp.java create mode 100644 src/com/platform/utils/UtilsHelper.java create mode 100644 test/com/platform/test/testSystemInfoDao.java diff --git a/WebContent/WEB-INF/config/log4j-config.xml b/WebContent/WEB-INF/config/log4j-config.xml index 1b1f2a1e..0a2755c5 100644 --- a/WebContent/WEB-INF/config/log4j-config.xml +++ b/WebContent/WEB-INF/config/log4j-config.xml @@ -2,7 +2,7 @@ - + @@ -34,14 +34,28 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/WebContent/WEB-INF/config/mybatis-applicationConfig.xml b/WebContent/WEB-INF/config/mybatis-applicationConfig.xml index ed1d5322..02e5011b 100644 --- a/WebContent/WEB-INF/config/mybatis-applicationConfig.xml +++ b/WebContent/WEB-INF/config/mybatis-applicationConfig.xml @@ -3,9 +3,12 @@ "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> - - - - - + + + + + + + + \ No newline at end of file diff --git a/WebContent/WEB-INF/config/spring-applicationContext.xml b/WebContent/WEB-INF/config/spring-applicationContext.xml index 4eba9ce3..33ffe0a4 100644 --- a/WebContent/WEB-INF/config/spring-applicationContext.xml +++ b/WebContent/WEB-INF/config/spring-applicationContext.xml @@ -24,26 +24,16 @@ - - - - - - - - - - - - + - + + @@ -52,38 +42,31 @@ - - + - + - + diff --git a/build/classes/com/dao/mapper/data-detaisl-mapper.xml b/build/classes/com/dao/mapper/data-detaisl-mapper.xml new file mode 100644 index 00000000..e5833f2e --- /dev/null +++ b/build/classes/com/dao/mapper/data-detaisl-mapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and data_details.data_type=#{PagerOptions.dataType} + + + and + data_details.submitted_batch=#{PagerOptions.submittedBatch} + + + and data_details.city_name=#{PagerOptions.cityName} + + + and + data_details.district_name=#{PagerOptions.districtName} + + + and + data_details.data_version=#{PagerOptions.dataVersion} + + + and data_details=#{PagerOptions.systemName} + + + and data_details.data_year=#{PagerOptions.dataYear} + + + + and data_details.id>=#{idIndex} + + + and data_details.id>=0 + + + + ORDER BY data_details.id + LIMIT #{PagerOptions.limit} + + + + + + + + \ No newline at end of file diff --git a/build/classes/com/platform/controller/DataModelController.class b/build/classes/com/platform/controller/DataModelController.class new file mode 100644 index 0000000000000000000000000000000000000000..fed287c86a7b07884f19c6115b051b028e803d12 GIT binary patch literal 2755 zcmb7GYj+bx7=9*AyEI)a6sQygz7R{m<`z0=S6pEu;kc3t`!*_^v92 zQQ0Ykfr>)kmyvVTRqm~@DE+a`Jqu}peGBfA>-cUk=S=1oWI+iu6-%+exm?0jETbi_ zAdQ{zpcKy3-m?N-)73zEWjX7`Uf!1@K@cied0{{!M|0ZzisNo>I@2-^t5HExGaa~P zDbQYIYz;OATCRA3r-m6yPwy<{#u#`8O=!2#2Adi=FOU<}a$ZKaUHTO0$b|*hpLHWo zz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T7PMB#YDR7J@>JhiuLrCzc4qEz;jzq6`95wncMJ1$WIPdL^5IO;B;6d6xTw| zu;s0<_?g%sKwu3Y6@WE-FxFuMGLXel26C{8|AHZG;g?rXK*n|0#=)N=J5a<`H*k$% z+%!u*08y}O*=ISNi1XY^;q4UON#WfT-b>+L3infZA4LzW;RjYckD-V7q2EV80SJ?j ABLDyZ literal 0 HcmV?d00001 diff --git a/build/classes/com/platform/entities/BasedType.class b/build/classes/com/platform/entities/BasedType.class new file mode 100644 index 0000000000000000000000000000000000000000..30ba1020422be7a94ab5a7a37e334b92c28b877a GIT binary patch literal 2635 zcma)7TUQfT7~LngnZ%LH2oV$uSkxp4siL+5QV=3i16U@|Mtd8=2*HqGGI1^JYuD;; z=wqLJ)u@%#uCn^vf6_lu`+aAIWC(P@%bb~g&i>B+uJiZ5zwZGUL0N%Mpf^|AN^TcS z`$?(1m9&a>-p*T<FAmQC}ynJk#a^<=78-4X~HnWedfS%LoaG5j$B zWo{vpnoTVU1daQPOBsPcdXdS2nW;>Q7Mt!7(9?}u47;2!t`j$yE0`}{2()`PrweAK zLVIB&zg{%$YMIC#&HLkt2|98rwXi%turifiP8k9hAD=+2I-V=!i+OuOz#ogRki6;A znx!JBqD!ESH4bwmh8>Lx&bg=)9|w&w5(2Faso=jl>$UBSqKx?qe+H#LNr6jAZnKB;Qw3&S&}O~o|2Phu>|7?Z{|L=fV) z2@UPgNl!Xov=*vct5!Kh7ljLZl`k6_I? zQNE|)6f{o|}cLMQR3O@#AZmnTCc8mWgRStC|I3c6#q!T-~&C_E`LpfN#|nIBnQw?&-X_ zEqzls5sK>`wOGvSN4-OpisOHiX?LF+NF@^#9d6?@2W;#&a`Z6jw699GU1o<@w?kyx zXAi+ny6INCwBL&ss9c{MY}1{JZEb1TK%NGPSuUG9xzhHIK*DR#jgPlU_aUkm3XaUj zBALGFrS1EE?6l#cBoUh^Hd$~S^ps8AWMfA1B&I@&7^P}CXWh$lleE<5_Ann581dL( z!uYY8CdMYOQQ`RMAE8cm^UMKgr2!&Wnh0{GCYLMqEuHjn*T|K6hS;t0y{+vWcQd_5 zXp)>k2kmsy*GtI(e*6O>t4IC%S-tx`&c8vg1o{K|MSVa5mn9Gj>T!Kg0z(o=hV)PL z>k_yjfm@3HseW4mW9pw|)n7xekqy*v*~kWK7&5Y<8g3X_rG_!%4eq>_0zapxjsQJr zjFZGsnqAA}@}%5lw`hXX({X1?iZ4=Vg3L<{_Pod4#LzpW65WA!m}Q%OG;Fqzo2?X> zHVQ(!wAm-as$0GZ(ZJq> z|ISNvbq9K`rw0?iVd)pBgKshW>L;J*x$x_Uf5a;~>`04BVh3H=NiIjxOIf*sE-5cc zX340VOO~`kLIu7ev;+PR1OydyLkI<51MNQA%i@un)g-MfJeYWk6kq6*v0wv0kG#O~ zEa>_#@EG5?>mxmIA6wgL>A`HmExx0(PNu$>QSu6!Z5A|e zq@W*Q){U%6BM<4jF3gi+M_7!6#s5c`(+Q1)hA4b(Bvc@GvX~7WAu-H90yk#2=yI-| zXbpF=5B!O}>^PVHy#M?z)~+@?ETlDdB}@b7scR!a&T)Psx=8Gz@E2sMcr(}F`B0*h KK5V;De)b>T3m$C% literal 0 HcmV?d00001 diff --git a/build/classes/com/platform/entities/DataInfoEntity.class b/build/classes/com/platform/entities/DataInfoEntity.class new file mode 100644 index 0000000000000000000000000000000000000000..0bc0b835b636abc99c4db7ddc0ee1fbd9eeaecd0 GIT binary patch literal 4733 zcmbW3{Z~{)7{{NBysXQG1q5x?3K4O+E-xY?BA9|$YxoLMC{~x{3YYc;cP|$9s%5EV z=hUem>YRSabNr!Br?kA-DNlbue?)&ur|&bfu*)#p;q=R$?>zI&%xC7AdFKB0&+mT{ z(LVaDf=Uc(j;E6y^9kF#oX#XWoRsH!u9NLJW_xxlbvZrEhQ$ghHK=CJzG`8Uv6K*y+l%94BsvF6>k9rw5HFLVy?qsr<%Ao4(!c@}rJZE~)_TsY`otw|t9%OYq zok#!?(~h}3U2V>g&J3kfo*nnH235po?M&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YrRL0-~>bgLk@0dl7Z2tNf3 z^0F4BM+Ld71)0!;^r#@81LTV$Ap8bYwgS?^z=~qGSYe8PsgB1ME$k+FKfc#Jdgnt7V1izQ~ z@())ven>-GriUUg~Dn8L3-Xds0W(|Ekm$+uxKr z%KDnr?d$*|955t!y6^&$ufYL`5lAEAcN3SdKxg-Yyy6aR< z98b`?xfzkC!e=m_|9?R+n|PVaTq}JHoa+MyQx^0PLfvc7?`LOE+so zE@mx=LJZZ>MMr%+byJ(1CeUf&T3N}*q6K~ABY{4ypEfYE&AOBBvIX&0yw*OJj9|N3 zLYlS({iHcWWL;<2*=B0Zj*;@Z1r}9eu$e}?nFB=J?kA~kSuj9;2Z*+P(kU1U*Mls#j@7VFt~@cpds6M7_hm z5H&zaETWQFASE$`DKG(eFxa9KXG4GYk{> zZ#5KP5^mv&!ELyM-|NOdAo*1@o-`WYg?mlo3}zCdQ0e3qBs-zwYB!15PALx)4XtK) zLZdnm^)%c!fXsZ;K&Fi#b1;7cWcdnabdWg=Hy;2(jUbQ*Mvw&^WYGwcGJ`DWAj=4{ z5&%MzKp;y-khBhB8$njgAZZsO&``hBglq%Sl4urEP@;afY46Own#~fh>$=aksnx`_36m@&N?6PZxs1}d=$b?s-zjs zN;9iB-}l=WfL9DNbO_IRD7kWyiV#b#HC}A4yp$wsUxdT&o#BZvKFLMci8s7Eo-|K{ ziP5wdqw!siPTLaU?Pc@lrTS!()tY~TyDHh>>&0vnqT#xV)|(H}MSTDO literal 0 HcmV?d00001 diff --git a/build/classes/com/platform/service/DataInfoServiceImp.class b/build/classes/com/platform/service/DataInfoServiceImp.class new file mode 100644 index 0000000000000000000000000000000000000000..822685eac17a0983632c11cc0d1a5201abc3fec8 GIT binary patch literal 1680 zcma)7Yg1EK6kR7IB!t@nK@`g)La8QzURwlhLs8_>$xMKbI5>VhBq#Cc&Apj>PiXyD zI-}LLGyMVmQJt>)kPyZPA8yWT?{(JRd+n2d|NHA704vzdA|-I6?zQcXBTduu+jgM* z6J1yKwluQpHoe1mU2S)=NDGWUmnYJ8q}#F&j-RW#$zo7o;UW+MgNNc}3vrqpoXoTOH{@A3JK(bv+}E_S`^Vsupti-Ik}D_9GQ|UB9mAnRaDc2@E$9 z{?UDd>)O?3Ltvm(KBCQ**HC#3V9df-_*!73rd_q)Z67QDvE+RMg_>8F&XM$WxK1|H z=9wmeazFb|XN+`)0%f+7sOL)kj_1QJ9}R(_TgW0OFxFD$SJ_G!h2;?VA+M%2G=dzKuKV{AAifEN+{rq z0atTaWbH#?grO~4xQSZ=mTWXOjq&wy*Rb$RaZloh+;&@)Gdr>9FOcFKZd34%a$DwE z9zWnt7Aq`j54-9b#p+sE#hO6&L^@q{&=j~_s+P}On3z#YRwqA4W~Q ztHTDo^1-0@0No0cCs6um7=cl~@(hXCi3brgQC8XCVbRaLW|(864e-nGONIT$afol? zFvmQ<;Q&@-z~_O>5gyqb1;@CL)B(u~mW)qQ~6WT9`_(-jY~`SgU_y`sq8&?k&E-(D%z!v+Vz;PTiC}Nh)R^;EqwTRN4 z__9+^L%{D_}OcpUSnV4b){hWs;wP2)bX!*s-F4|tZsCihZ!c$(-fo^J=( F`5&$bwdeo< literal 0 HcmV?d00001 diff --git a/build/classes/com/platform/service/EncodeInfoServiceImpl.class b/build/classes/com/platform/service/EncodeInfoServiceImpl.class index e057d40e17c29b5d1b18598cdf2efe0703f9f4a7..56590e83955b96571380e243be49139ff02e3cd0 100644 GIT binary patch delta 97 zcmdnZy_tK%Q7hBBo~loV9;jZVbEm| k2C}pusu@HWM1ee@J_bz&6$VByOBu*w0;*)1?8I6L0FqG(DF6Tf delta 105 zcmdnYy_1A{gL s4}%Va0D~@rFp#GO(ZwLbAPVFG^)qNPs4y^sS;{~b6HqnVWGmK602x{fPyhe` diff --git a/build/classes/com/platform/test/TestController.class b/build/classes/com/platform/test/TestController.class index d61e98fd4a9439f99f025b22eb57c983403ffa7b..3abc9c417a0ea91ae274d86187f6fffc8e4c785c 100644 GIT binary patch delta 990 zcmZu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E$006}P%4>NP;-gEXjXYX^*@BjSr0>F8cO(X;c9KT{$ z%Q9N=gNhxgFp6KrZ^B4b^4^L+EqxP)z~SA7#o0+2s?q|T1X@cgG!-~f*kM?bzCA4? z*?`Ikv|VsLH@YOyGBms>U`+WXl|lL?u%D~nC zjZGuE3?*o@n-XoScO z$EW8kjN!aM(xV!>izwGnbIlDJl6Xfzw5RYMJ}~jV!2Va6vM>%dO>0Pvsq4wT61v?) zW&^k#7xAG9_I5L3e3dMGgbDV%Un5>u-Idv2r!En_m8|4an8IZf(*l`I{+f<0%-~}R zteYz;Q($8#uglKk6BAcArHIwevmIAeV4;9nvQd>msJQnZ#O9N@##{O4;~)O`?$-|V z;ZqCqD6%hIE%dx{ctHj3?!iHRHwAla?KXOyo#DI|{Dy@^++;3yWH`5_DksOS6qaz? z#4S#yO}2Em&H2%cU-L?r?>nlhud;>Dmj?z^MbnBbAV@i+e3~`jVwT1JY_310imBBR!E8p$>v-uVLwvIeS>LC{iSbVp| zo1NIlwN*F38|dU8dzsD&9B5dj`PD!Z45NWEBO{NINx%6F*#v$=-%mKY4V$7Pa1dz@ z&28w+7WBYoUg8o`%oo^rj^j(uF}Rc-dJ5)vrqFWn0Sc#{;OyL)^xIGH?zr&?7qZ5S zCz$*;AsGB<)@T{a8phbqxRRdB8f|)!HB9a$`Rs4gFLUe}uD9bRffl}h`6D5E3Ge_( z4gJ}}xReU2Y^s)+kgLoY9L7oXF!Mt!zZV(K*lrx*P9Fx)kJDt^#xdUP0bFCVE^+-8 zZB{tTDj33DjG#shQu=C58whEl&IWYK8kn( zt8q5Q-{>}RT>OPAFR6<#dBWF{*7(j2nOxdynNIQ1GKpRO*`5=3kXvPRPc*8c?~ CU;7IH literal 0 HcmV?d00001 diff --git a/build/classes/com/platform/utils/UtilsHelper.class b/build/classes/com/platform/utils/UtilsHelper.class new file mode 100644 index 0000000000000000000000000000000000000000..6bd08b732a1a236ca4bd1828584de4d0c666c1bb GIT binary patch literal 3763 zcmbVP`*$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{%cC^Xw(b zw;wNXZyQ;*;|dmFl4A^4$u>%ss`nlC-qOAAvUgMWUSjXI?!C-jP4`}5?^E6T9(&&> z!%gHAFn*P7!0uJ9y~fcv+V0Ru2?IL}WDG=g=XD5S;C0|%7>nE?)nHn!gA2Kn2A=0P z#qR|4T*KjR>LNk+9n19}NKS h3eRe#U4c056Lq + diff --git a/src/com/dao/mapper/data-detaisl-mapper.xml b/src/com/dao/mapper/data-detaisl-mapper.xml new file mode 100644 index 00000000..e5833f2e --- /dev/null +++ b/src/com/dao/mapper/data-detaisl-mapper.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and data_details.data_type=#{PagerOptions.dataType} + + + and + data_details.submitted_batch=#{PagerOptions.submittedBatch} + + + and data_details.city_name=#{PagerOptions.cityName} + + + and + data_details.district_name=#{PagerOptions.districtName} + + + and + data_details.data_version=#{PagerOptions.dataVersion} + + + and data_details=#{PagerOptions.systemName} + + + and data_details.data_year=#{PagerOptions.dataYear} + + + + and data_details.id>=#{idIndex} + + + and data_details.id>=0 + + + + ORDER BY data_details.id + LIMIT #{PagerOptions.limit} + + + + + + + + \ No newline at end of file diff --git a/src/com/platform/controller/DataModelController.java b/src/com/platform/controller/DataModelController.java new file mode 100644 index 00000000..965b3aad --- /dev/null +++ b/src/com/platform/controller/DataModelController.java @@ -0,0 +1,38 @@ +package com.platform.controller; + +import java.util.Map; +import java.util.Set; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.platform.entities.PagerOptions; +import com.platform.service.DataInfoService; +import com.platform.utils.UtilsHelper; + +@Controller +public class DataModelController { + @Resource(name = "dataInfoService") + private DataInfoService dfs; + + public void setDfsImp(DataInfoService dfs) { + this.dfs = dfs; + } + + @RequestMapping("/data.json") + @ResponseBody + public ModelMap getAllDataToJson(HttpServletRequest res, HttpServletResponse req) { + Map paramMap = res.getParameterMap(); + Set keySet= paramMap.keySet(); + for(String str: keySet){ + System.out.println(str+":"+paramMap.get(str)); + } + return dfs.getPagerTableData((PagerOptions) UtilsHelper.newObjAndSetAttrsByClass(PagerOptions.class, res)); + } +} diff --git a/src/com/platform/dao/DataInfoDao.java b/src/com/platform/dao/DataInfoDao.java new file mode 100644 index 00000000..b367fd05 --- /dev/null +++ b/src/com/platform/dao/DataInfoDao.java @@ -0,0 +1,31 @@ +package com.platform.dao; + +import java.util.List; + +import org.apache.ibatis.annotations.Insert; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import com.platform.entities.DataInfoEntity; +import com.platform.entities.PagerOptions; + +@Repository(value = "dataInfoDao") +public interface DataInfoDao { + + public List getLimitedDataInfoEntities( + @Param(value = "PagerOptions") PagerOptions pagerOptions); + + public int getLimitedDataCount( + @Param(value = "PagerOptions") PagerOptions pagerOptions); + + @Insert("INSERT INTO data_info(regionalism_code, system_code, data_type, data_version, submitted_batch, data_path, collection_time, data_charset)" + + " values(#{regionalismCcode},#{systemCcode},#{dataType},#{dataVersion},#{submittedBbatch},#{dataPath},#{collectionTime},#{dataCharset})") + public int inserRecode(@Param("regionalismCcode") String regionalismCcode, + @Param("systemCcode") int systemCcode, + @Param("dataType") String dataType, + @Param("dataVersion") int dataVersion, + @Param("submittedBbatch") String submittedBbatch, + @Param("dataPath") String dataPath, + @Param("collectionTime") String collectionTime, + @Param("dataCharset") String dataCharset); +} diff --git a/src/com/platform/entities/BasedType.java b/src/com/platform/entities/BasedType.java new file mode 100644 index 00000000..d133a0eb --- /dev/null +++ b/src/com/platform/entities/BasedType.java @@ -0,0 +1,48 @@ +package com.platform.entities; + +import java.util.Date; + +public enum BasedType { + + STRING("java.lang.String", String.class), INTEGER("java.lang.Integer", + Integer.class), SHORT("java.lang.Short", Short.class), LONG( + "java.lang.Long", Long.class), DATE("java.util.Date", Date.class); + + private String type; + private Class clazz; + + private BasedType(String type, Class clazz) { + this.type = type; + this.clazz = clazz; + } + + public static Class getTypeClass(String type) { + for (BasedType bt : BasedType.values()) { + if (bt.equals(type)) + return bt.clazz; + } + return null; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Class getClazz() { + return clazz; + } + + public void setClazz(Class clazz) { + this.clazz = clazz; + } + + @Override + public String toString() { + return this.type; + } + +} diff --git a/src/com/platform/entities/DataInfoEntity.java b/src/com/platform/entities/DataInfoEntity.java new file mode 100644 index 00000000..d3581c89 --- /dev/null +++ b/src/com/platform/entities/DataInfoEntity.java @@ -0,0 +1,186 @@ +package com.platform.entities; + +/** + * Ϣʵ + * + * @author wuming + * + */ +public class DataInfoEntity { + private int id; + private String regionalismCode; // + private String cityName; // + private String districtName; // + private int systemCode; // ϵͳ + private String systemName; // ϵͳ + private String dataType; // ͣ\籣\... + private int dataVersion; // ݰ汾 + private String submittedBatch; // ϱ + private String dataPath; // · + private String collectingTime; // ɼʱ + private String collectorContacts; // ɼ˵ϵ + private String charset; // ݵַ + private String collectorName; // ɼ + private String year; // + + public DataInfoEntity() { + } + + public DataInfoEntity(int id, String regionalismCode, String cityName, + String districtName, int systemCode, String systemName, + String dataType, int dataVersion, String submittedBatch, + String dataPath, String collectingTime, String collectorContacts, + String charset, String collectorName, String year) { + super(); + this.id = id; + this.regionalismCode = regionalismCode; + this.cityName = cityName; + this.districtName = districtName; + this.systemCode = systemCode; + this.systemName = systemName; + this.dataType = dataType; + this.dataVersion = dataVersion; + this.submittedBatch = submittedBatch; + this.dataPath = dataPath; + this.collectingTime = collectingTime; + this.collectorContacts = collectorContacts; + this.charset = charset; + this.collectorName = collectorName; + this.year = year; + } + + public int getId() { + return id; + } + + public void setId(int id) { + this.id = id; + } + + public String getRegionalismCode() { + return regionalismCode; + } + + public void setRegionalismCode(String regionalismCode) { + this.regionalismCode = regionalismCode; + } + + public String getCityName() { + return cityName; + } + + public void setCityName(String cityName) { + this.cityName = cityName; + } + + public String getDistrictName() { + return districtName; + } + + public void setDistrictName(String districtName) { + this.districtName = districtName; + } + + public int getSystemCode() { + return systemCode; + } + + public void setSystemCode(int systemCode) { + this.systemCode = systemCode; + } + + public String getSystemName() { + return systemName; + } + + public void setSystemName(String systemName) { + this.systemName = systemName; + } + + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + public int getDataVersion() { + return dataVersion; + } + + public void setDataVersion(int dataVersion) { + this.dataVersion = dataVersion; + } + + public String getSubmittedBatch() { + return submittedBatch; + } + + public void setSubmittedBatch(String submittedBatch) { + this.submittedBatch = submittedBatch; + } + + public String getDataPath() { + return dataPath; + } + + public void setDataPath(String dataPath) { + this.dataPath = dataPath; + } + + public String getCollectingTime() { + return collectingTime; + } + + public void setCollectingTime(String collectingTime) { + this.collectingTime = collectingTime; + } + + public String getCollectorContacts() { + return collectorContacts; + } + + public void setCollectorContacts(String collectorContacts) { + this.collectorContacts = collectorContacts; + } + + public String getCharset() { + return charset; + } + + public void setCharset(String charset) { + this.charset = charset; + } + + public String getCollectorName() { + return collectorName; + } + + public void setCollectorName(String collectorName) { + this.collectorName = collectorName; + } + + public String getYear() { + return year; + } + + public void setYear(String year) { + this.year = year; + } + + @Override + public String toString() { + return "id=" + this.id + " ,regionalismCode=" + this.regionalismCode + + " ,cityName=" + this.cityName + " ,districtName=" + + this.districtName + " ,systemCode=" + this.systemCode + + " ,systemName" + this.systemName + " ,dataType=" + + this.dataType + " ,dataVersion=" + this.dataVersion + + " ,submittedBatch=" + this.submittedBatch + " ,dataPath=" + + this.dataPath + " ,collectingTime=" + this.collectingTime + + " ,collectorContacts=" + this.collectorContacts + + " ,charset=" + this.charset + " ,collectorName=" + + this.collectorName + " ,year=" + this.year + ""; + } + +} diff --git a/src/com/platform/entities/PagerOptions.java b/src/com/platform/entities/PagerOptions.java new file mode 100644 index 00000000..e58d7813 --- /dev/null +++ b/src/com/platform/entities/PagerOptions.java @@ -0,0 +1,94 @@ +package com.platform.entities; + +public class PagerOptions { + private int idIndex; + + private String dataType; + + private String submittedBatch; + + private String cityName; + + private String districtName; + + private int dataVersion; + + private String systemName; + + private String dataYear; + + private int limit; + + public int getIdIndex() { + return idIndex; + } + + public void setIdIndex(int idIndex) { + this.idIndex = idIndex; + } + + public String getDataType() { + return dataType; + } + + public void setDataType(String dataType) { + this.dataType = dataType; + } + + public String getSubmittedBatch() { + return submittedBatch; + } + + public void setSubmittedBatch(String submittedBatch) { + this.submittedBatch = submittedBatch; + } + + public String getCityName() { + return cityName; + } + + public void setCityName(String cityName) { + this.cityName = cityName; + } + + public String getDistrictName() { + return districtName; + } + + public void setDistrictName(String districtName) { + this.districtName = districtName; + } + + public int getDataVersion() { + return dataVersion; + } + + public void setDataVersion(int dataVersion) { + this.dataVersion = dataVersion; + } + + public String getSystemName() { + return systemName; + } + + public void setSystemName(String systemName) { + this.systemName = systemName; + } + + public String getDataYear() { + return dataYear; + } + + public void setDataYear(String dataYear) { + this.dataYear = dataYear; + } + + public int getLimit() { + return limit; + } + + public void setLimit(int limit) { + this.limit = limit; + } + +} diff --git a/src/com/platform/service/DataInfoService.java b/src/com/platform/service/DataInfoService.java new file mode 100644 index 00000000..e6eb52c4 --- /dev/null +++ b/src/com/platform/service/DataInfoService.java @@ -0,0 +1,9 @@ +package com.platform.service; + +import org.springframework.ui.ModelMap; + +import com.platform.entities.PagerOptions; + +public interface DataInfoService { + public ModelMap getPagerTableData(PagerOptions pagerOptions); +} diff --git a/src/com/platform/service/DataInfoServiceImp.java b/src/com/platform/service/DataInfoServiceImp.java new file mode 100644 index 00000000..023ae251 --- /dev/null +++ b/src/com/platform/service/DataInfoServiceImp.java @@ -0,0 +1,34 @@ +package com.platform.service; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; +import org.springframework.ui.ModelMap; + +import com.platform.dao.DataInfoDao; +import com.platform.entities.DataInfoEntity; +import com.platform.entities.PagerOptions; + +@Service(value = "dataInfoService") +public class DataInfoServiceImp implements DataInfoService { + @Resource(name = "dataInfoDao") + private DataInfoDao dfdDao; + + public void setDfdDao(DataInfoDao dfdDao) { + this.dfdDao = dfdDao; + } + + @Override + public ModelMap getPagerTableData(PagerOptions pagerOptions) { + // TODO Auto-generated method stub + ModelMap modelMap = new ModelMap(); + List result = dfdDao + .getLimitedDataInfoEntities(pagerOptions); + int count = dfdDao.getLimitedDataCount(pagerOptions); + modelMap.addAttribute("data", result); + modelMap.addAttribute("length", count); + return modelMap; + } +} diff --git a/src/com/platform/service/EncodeInfoServiceImpl.java b/src/com/platform/service/EncodeInfoServiceImpl.java index 06770367..3e5fe735 100644 --- a/src/com/platform/service/EncodeInfoServiceImpl.java +++ b/src/com/platform/service/EncodeInfoServiceImpl.java @@ -41,7 +41,7 @@ public class EncodeInfoServiceImpl implements EncodeInfoService { public int deleteEncodeByCode(String code, String tableName) { // TODO Auto-generated method stub int cursor = eiDao.deleteEncodeByCode(code, tableName); - cursor = cursor / 0; + //cursor = cursor / 0; return cursor; } diff --git a/src/com/platform/utils/UtilsHelper.java b/src/com/platform/utils/UtilsHelper.java new file mode 100644 index 00000000..1c10ecbd --- /dev/null +++ b/src/com/platform/utils/UtilsHelper.java @@ -0,0 +1,90 @@ +package com.platform.utils; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import javax.servlet.http.HttpServletRequest; + +import org.apache.log4j.Logger; + +import com.platform.entities.BasedType; + +public class UtilsHelper { + public static Logger logger = Logger.getLogger(UtilsHelper.class); + + /** + * + * @param clazz + * @param req + * @return + */ + public static Object newObjAndSetAttrsByClass(Class clazz, + HttpServletRequest req) { + Object object = null; + try { + Class cls = Class.forName(clazz.getName()); + object = cls.newInstance(); + Field[] fileds = clazz.getDeclaredFields(); + for (Field fs : fileds) { + String fieldName = fs.getName(); + String fieldType = fs.getGenericType().toString(); + Object value = req.getAttribute(fieldName); + if (null != value) { + Method method = cls.getDeclaredMethod( + getAttributeSetName(fs), + BasedType.getTypeClass(fieldType)); + method.invoke(object, value); + } + } + } catch (ClassNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InstantiationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalAccessException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (NoSuchMethodException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (SecurityException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IllegalArgumentException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (InvocationTargetException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + return object; + }; + + /** + * + * @param object + * @param req + * @return + */ + public static Object newObjAndSetAttrsByInstance(Object object, + HttpServletRequest req) { + return newObjAndSetAttrsByClass(object.getClass(), req); + } + + /** + * {@fs}set + * + * @param fs + * Զ + * @return set + */ + private static String getAttributeSetName(Field fs) { + String fieldName = fs.getName(); + char[] cs = fieldName.toCharArray(); + cs[0] -= 32; + return "set" + String.valueOf(cs); + } + +} diff --git a/test/com/platform/test/TestController.java b/test/com/platform/test/TestController.java index 4b19c6ca..662ee505 100644 --- a/test/com/platform/test/TestController.java +++ b/test/com/platform/test/TestController.java @@ -11,22 +11,24 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import com.platform.entities.EncodedInfoEntity; import com.platform.service.EncodeInfoService; @Controller public class TestController { - //private static Logger logger = Logger.getLogger(TestController.class); - @Resource(name = "encodeInfoService") - private EncodeInfoService eis; - + // private static Logger logger = Logger.getLogger(TestController.class); + @Resource(name = "encodeInfoService") + private EncodeInfoService eis; + public void setEis(EncodeInfoService eis) { this.eis = eis; } @RequestMapping("/hello") - public String hello(String name, HttpServletResponse res) { - System.out.println(name); - return "index.html"; + @ResponseBody + public List hello(String name, HttpServletResponse res) { + System.out.println(name); + return eis.getAllEncodeInfo("system_info"); } @RequestMapping("/json") @@ -42,4 +44,10 @@ public class TestController { public void testLog(HttpServletResponse res) { System.out.println(eis.getEncodeNameByCode("1", "system_info")); } + + @RequestMapping("/data111.json") + public void test(String name, HttpServletResponse res){ + + + } } diff --git a/test/com/platform/test/testSystemInfoDao.java b/test/com/platform/test/testSystemInfoDao.java new file mode 100644 index 00000000..c6d55374 --- /dev/null +++ b/test/com/platform/test/testSystemInfoDao.java @@ -0,0 +1,50 @@ +package com.platform.test; + +import java.io.File; +import java.io.FileNotFoundException; +import java.util.List; +import java.util.Scanner; + +import org.junit.Before; +import org.junit.Test; + +import com.platform.dao.DataInfoDao; +import com.platform.entities.DataInfoEntity; +import com.platform.entities.PagerOptions; + +public class testSystemInfoDao extends SMBasedTest { + private DataInfoDao dfDao; + + @Before + public void initBeforeFunction() { + dfDao = (DataInfoDao) this.applicationContext.getBean("dataInfoDao"); + } + + // @Test + public void testInsert() { + try { + Scanner in = new Scanner(new File( + "C:/Users/wuming/Desktop/data.txt")); + int count = 0; + while (in.hasNextLine()) { + String str = in.nextLine(); + String[] values = str.split("\t"); + System.out.println(values.length); + count++; + dfDao.inserRecode(values[0], Integer.parseInt(values[1]), "", + Integer.parseInt(values[3]), values[4], values[5], + values[6], values[7]); + } + System.out.println(count); + + } catch (FileNotFoundException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Test + public void test() { + //System.out.println(dfDao.getCount()); + } +} diff --git a/test/spring-applicationContext-test.xml b/test/spring-applicationContext-test.xml index 2bdabb7c..27b1248b 100644 --- a/test/spring-applicationContext-test.xml +++ b/test/spring-applicationContext-test.xml @@ -26,6 +26,7 @@ +